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.35k stars 1.75k forks source link

Support data_governance_type in google_bigquery_routine #17061

Closed hrfmmr closed 7 months ago

hrfmmr commented 9 months ago

Community Note

Description

In certain cases, BigQuery user-defined functions require the specification of data_governance_type. Currently, the google_bigquery_routine resource definition does not allow for this specification. It would be nice to enable the specification of data_governance_type.

New or Affected Resource(s)

Potential Terraform Configuration

# Propose what you think the configuration to take advantage of this feature should look like.
# We may not use it verbatim, but it's helpful in understanding your intent.
resource "google_bigquery_routine" "example" {
  dataset_id      = "dataset_id"
  routine_id      = "routine_id"
  routine_type    = "SCALAR_FUNCTION"
  language        = "SQL"
  definition_body = "'*'"

  // 👇Add this option
  data_governance_type = "DATA_MASKING" 

  arguments {
    name = "s"
    data_type = jsonencode(
      {
        typeKind = "STRING"
      }
    )
  }

  return_type = jsonencode(
    {
      typeKind = "STRING"
    }
  )
}

References

b/321923926

Kulja commented 9 months ago

Once this is merged would it be possible to use it in https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/bigquery_datapolicy_data_policy#data_masking_policy?

github-actions[bot] commented 6 months ago

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.