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

Enable `google_bigquery_datapolicy_data_policy` resources to use a `google_bigquery_routine` resource to define the data masking policy #17341

Closed chasinandrew closed 6 months ago

chasinandrew commented 8 months ago

Community Note

Description

The google_bigquery_datapolicy_data_policy resource does not currently support creating custom masking routines. Users are not able to manage their own user-defined functions in Terraform which can be a risk for potential misconfigurations.

New or Affected Resource(s)

Potential Terraform Configuration

References

N/A

b/327064415

SarahFrench commented 8 months ago

Note from triage: It looks like the custom masking routine would be made via the google_bigquery_routine resource, and then that would be referenced in the configuration of a google_bigquery_datapolicy_data_policy resource to enable custom masking routines.

This section of the API docs shows that referencing a routine is possible, and means the google_bigquery_datapolicy_data_policy resource would need to add a routine field to the data_masking_policy block in the resource.

wj-chen commented 7 months ago

The prerequisite change https://github.com/hashicorp/terraform-provider-google/issues/17061 is now complete and I will pick up this work.

wj-chen commented 6 months ago

Support has been added in https://github.com/GoogleCloudPlatform/magic-modules/pull/10388. @trodge Could you help me close this issue?

SarahFrench commented 6 months ago

Closed in https://github.com/GoogleCloudPlatform/magic-modules/pull/10388

github-actions[bot] commented 5 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.