-
Notifications
You must be signed in to change notification settings - Fork 286
feat(bigquery): adds Bigquery datapolicies samples for C.G.C. documentation #902
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
Here is the summary of changes. You are about to add 4 region tags.
This comment is generated by snippet-bot.
|
|
/gcbrun |
2 similar comments
|
/gcbrun |
|
/gcbrun |
glasnt
left a comment
There was a problem hiding this 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]" |
There was a problem hiding this comment.
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\"}" |
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
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?
Description
Adds Bigquery datapolicies samples for C.G.C. documentation
Checklist
Readiness
Style
guide
Testing
I have performed tests described in the Contributing guide:
terraform applyterraform fmtcheckIntended location
Yes, this sample will be (or already is) included on cloud.google.com
Location(s): https://cloud.google.com/bigquery/docs/column-data-masking#work_with_data_policies
No, this sample won't be included on cloud.google.com
Reason:
API enablement
Review