Skip to content

Conversation

@ankitiit84
Copy link

@ankitiit84 ankitiit84 commented Oct 9, 2025

Description

Adds Bigquery datapolicies samples for C.G.C. documentation

Checklist

Readiness

  • Yes, merge this PR after it is approved
  • No, don't merge this PR after it is approved

Style

Testing

Intended location

API enablement

  • If the sample needs an API enabled to pass testing, I have added the service to the Test setup file

Review

  • If this sample adds a new directory, I have added codeowners to the CODEOWNERS file

@ankitiit84 ankitiit84 requested review from a team as code owners October 9, 2025 22:19
@snippet-bot
Copy link

snippet-bot bot commented Oct 9, 2025

Here is the summary of changes.

You are about to add 4 region tags.

This comment is generated by snippet-bot.
If you find problems with this result, please file an issue at:
https://github.com/googleapis/repo-automation-bots/issues.
To update this comment, add snippet-bot:force-run label or use the checkbox below:

  • Refresh this comment

@msampathkumar
Copy link
Contributor

/gcbrun

2 similar comments
@ankitiit84
Copy link
Author

/gcbrun

@msampathkumar
Copy link
Contributor

/gcbrun

@glasnt glasnt changed the title Adds Bigquery datapolicies samples for C.G.C. documentation feat(bigquery): adds Bigquery datapolicies samples for C.G.C. documentation Oct 27, 2025
Copy link
Contributor

@glasnt glasnt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some questions on the default values being used in this sample that require addressing

location = "US"
data_policy_type = "RAW_DATA_ACCESS_POLICY"
grantees = [
"principal://goog/subject/[email protected]"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This princpal has been referenced in a handful of other BigQuery samples. Is this a testing account? Could it be replaced with a more obvious testing value?

language = "SQL"
data_governance_type = "DATA_MASKING"
definition_body = "SAFE.REGEXP_REPLACE(ssn, '[0-9]', 'X')"
return_type = "{\"typeKind\" : \"STRING\"}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason why this has to be an escape-encoded string, and not use jsonencode?

Same for the arguments.data_type.


resource "google_bigquery_datapolicyv2_data_policy" "default" {
location = "US"
data_policy_id = "custom_masking_policy"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The value used here looks too close to the faux enum in the next like. Could it be changed to "my_custom_policy" or similar?

@glasnt glasnt added the waiting-response Waiting for issue author to respond. label Nov 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

waiting-response Waiting for issue author to respond.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants