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 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…