Skip to content

google_bigquery_table: Add support for dataPolicyList field on TableFieldSchema #28509

Description

@justin-rudio-sada

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)

  • google_bigquery_table

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions