hashicorp / terraform-provider-google

Terraform Provider for Google Cloud Platform
https://registry.terraform.io/providers/hashicorp/google/latest/docs
Mozilla Public License 2.0
2.29k stars 1.72k forks source link

Location based tags are not possible with multi-region resources, specifically BigQuery datasets #18254

Open lazarillo opened 3 months ago

lazarillo commented 3 months ago

Community Note

Description

Sorry, I wrote a really long description with details, but then this page crashed and all was lost. So here is the quick summary:

I cannot use google_tags_tag_binding or google_tags_location_tag_binding to bind to a resource with a location if that resource is multi-region. I discovered this with BigQuery datasets, but it's probably true with other multi-regional resources like Pub/Sub.

This is not a Google issue, because I was able to successfully do this via gcloud:

gcloud alpha resource-manager tags bindings create \
    --tag-value=tagValues/<my_tag> \
    --parent=//bigquery.googleapis.com/projects/<my_project>/datasets/<my_dataset> \
    --location=US

New or Affected Resource(s)

google_tags_location_tag_binding google_tags_tag_binding google_tags_tag_value google_bigquery_dataset

Potential Terraform Configuration

I don't think anything further is needed. I think that google_tags_location_tag_binding just needs to be amended so that it can manage multi-region.

References

No response

b/343221074

rileykarson commented 3 months ago

We'd need to check the URL with -log-http to see what's not right in the Terraform resource here, I think