Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
341 views
in Technique[技术] by (71.8m points)

google cloud platform - Data Catalog: error updating Tag - Error 400: Unsupported field mask path: "column", supported field masks are: fields

I am attaching a tag-template to a column of a BigQuery table. For this, I am using Terraform and I have just recreated the code in the terraform documentation.

resource "google_data_catalog_entry" "entry" {
  entry_group = google_data_catalog_entry_group.entry_group.id
  entry_id = "my_entry"

  user_specified_type = "my_custom_type"
  user_specified_system = "SomethingExternal"

  schema = <<EOF
{
  "columns": [...]
}
EOF
}

resource "google_data_catalog_entry_group" "entry_group" {
  entry_group_id = "my_entry_group"
}

resource "google_data_catalog_tag_template" "tag_template" {
  tag_template_id = "my_template"
  region = "us-central1"
  display_name = "Demo Tag Template"

  fields {
    field_id = "source"
    display_name = "Source of data asset"
    type {
      primitive_type = "STRING"
    }
    is_required = true
  }
  force_delete = "true"
}

resource "google_data_catalog_tag" "basic_tag" {
  parent   = google_data_catalog_entry.entry.id
  template = google_data_catalog_tag_template.tag_template.id

  fields {
    field_name   = "source"
    string_value = "my-string"
  }
  column = "address"
}

Docs: https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/data_catalog_tag

Unfortunately, every time I run 'terraform apply' twice, I obtain the next API error:

Error: Error updating Tag "projects/xxxx/locations/europe-west2/entryGroups/xxxx/entries/xxxx/tags/xxx": googleapi: Error 400: Unsupported field mask path: "column", supported field masks are:
fields

It is like Terraform is not happy when I create this resource twice. To avoid this I have used:

  count    = local.created_tag ? 1 : 0

But I wonder what might be the cause and if there is a better way to solve the issue.

question from:https://stackoverflow.com/questions/66067073/data-catalog-error-updating-tag-error-400-unsupported-field-mask-path-colu

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

57.0k users

...