Community Note
- Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request.
- Please do not leave +1 or me too comments, they generate extra noise for issue followers and do not help prioritize the request.
- If you are interested in working on this issue or have submitted a pull request, please leave a comment.
- If an issue is assigned to a user, that user is claiming responsibility for the issue.
- Customers working with a Google Technical Account Manager or Customer Engineer can ask them to reach out internally to expedite investigation and resolution of this issue.
Description
In the BigQuery Table REST API, the legacy dataPolicies field on TableFieldSchema has a known limitation where clearing or removing the last remaining data policy from a column fails.
To address this, Google BigQuery engineering introduced a new API field named dataPolicyList on TableFieldSchema that natively supports clearing column-level data policies.
Currently, google_bigquery_table schema handling still relies on the legacy field behavior, making it impossible to remove data policies from table columns via Terraform without resorting to manual SQL DDL queries. Supporting dataPolicyList in the provider will allow practitioners to manage and fully remove column-level data policies declaratively.
New or Affected Resource(s)
Potential Terraform Configuration
resource "google_bigquery_table" "default" {
dataset_id = "example_dataset"
table_id = "example_table"
schema = jsonencode([
{
"name": "user_id",
"type": "STRING",
"mode": "NULLABLE",
"dataPolicyList": [
"projects/my-project/locations/us/dataPolicies/pii_policy"
]
}
])
}
References
BigQuery Rest API TableFieldSchema reference:
dataPolicyList
Community Note
Description
In the BigQuery Table REST API, the legacy
dataPoliciesfield onTableFieldSchemahas a known limitation where clearing or removing the last remaining data policy from a column fails.To address this, Google BigQuery engineering introduced a new API field named
dataPolicyListonTableFieldSchemathat natively supports clearing column-level data policies.Currently,
google_bigquery_tableschema handling still relies on the legacy field behavior, making it impossible to remove data policies from table columns via Terraform without resorting to manual SQL DDL queries. SupportingdataPolicyListin the provider will allow practitioners to manage and fully remove column-level data policies declaratively.New or Affected Resource(s)
Potential Terraform Configuration
References
BigQuery Rest API TableFieldSchema reference:
dataPolicyList