-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Apply policy tag to existing BigQuery table's columns #18130
Comments
Note from triage: We are not familiar enough with the product to determine whether or not this operation should be supported (or whether or not it currently is possible.) Forwarding to the service team for resolution. |
Hi @adivardhansingh, thanks for trying out BigQuery Terraform. Could you describe more what you are trying to achieve with the following:
Do you have any link to any documentation that describes the equivalent use case using another client (UI/CLI/API/client libraries)? And do you have a sample config for how you are currently doing the following:
And in response to the following question:
There is a BigQuery Data Policy resource in Terraform (https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/bigquery_datapolicy_data_policy) that build on top of |
Hello @wj-chen
Let me describe my problem in simpler words, and I apologize that I was not clear earlier. In a nutshell, I want to use terraform to add policy tags to any existing table's column. What is possible? -- Only way to add a policy tag, is while creating a new table (by passing schema). But for an existing BigQuery service - tables are already existing and I only want to add policy tag, using terraform.
https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/bigquery_table But this is when you are creating a new table. Hope I am a little bit more clear with my explanation. |
Thank you @adivardhan for the clarifications. It's currently by design that policy tags can only be set as part of a table's schema. For the existing BigQuery tables you have, if they are managed by Terraform, you should be able to update the schema field value to add policy tags the same way you specify schema for a new table. Please give that a try and see if it helps with your use case. |
Community Note
Description
I want to apply policy tags (existing or new) to any existing BigQuery table's column in any dataset
I think it would be very good to have an option to apply policy tags to existing column
BTW - isn't policy tag moved from data catalog to Big Query now?
New or Affected Resource(s)
Potential Terraform Configuration
JSON file
References
#6075
b/341750789
The text was updated successfully, but these errors were encountered: