Skip to content
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

bigquery datamasking #6425

Merged
merged 6 commits into from Oct 5, 2022
Merged

Conversation

DrFaust92
Copy link
Contributor

@DrFaust92 DrFaust92 commented Aug 17, 2022

Closes hashicorp/terraform-provider-google#12269

If this PR is for Terraform, I acknowledge that I have:

  • Searched through the issue tracker for an open issue that this either resolves or contributes to, commented on it to claim it, and written "fixes {url}" or "part of {url}" in this PR description. If there were no relevant open issues, I opened one and commented that I would like to work on it (not necessary for very small changes).
  • Generated Terraform, and ran make test and make lint to ensure it passes unit and linter tests.
  • Ensured that all new fields I added that can be set by a user appear in at least one example (for generated resources) or third_party test (for handwritten resources or update tests).
  • Ran relevant acceptance tests (If the acceptance tests do not yet pass or you are unable to run them, please let your reviewer know).
  • Read the Release Notes Guide before writing my release note below.

Release Note Template for Downstream PRs (will be copied)

google_bigquery_datapolicy_data_policy
google_bigquery_datapolicy_data_policy_iam_binding
google_bigquery_datapolicy_data_policy_iam_member
google_bigquery_datapolicy_data_policy_iam_policy

@modular-magician
Copy link
Collaborator

Oops! It looks like no changelog entry is attached to this PR. Please include a release note block in the PR body, as described in https://github.com/GoogleCloudPlatform/magic-modules/blob/master/.ci/RELEASE_NOTES_GUIDE.md:

```release-note:TYPE
Release note
```

@modular-magician
Copy link
Collaborator

Hello! I am a robot who works on Magic Modules PRs.

I've detected that you're a community contributor. @slevenick, a repository maintainer, has been assigned to assist you and help review your changes.

❓ First time contributing? Click here for more details

Your assigned reviewer will help review your code by:

  • Ensuring it's backwards compatible, covers common error cases, etc.
  • Summarizing the change into a user-facing changelog note.
  • Passes tests, either our "VCR" suite, a set of presubmit tests, or with manual test runs.

You can help make sure that review is quick by running local tests and ensuring they're passing in between each push you make to your PR's branch. Also, try to leave a comment with each push you make, as pushes generally don't generate emails.

If your reviewer doesn't get back to you within a week after your most recent change, please feel free to leave a comment on the issue asking them to take a look! In the absence of a dedicated review dashboard most maintainers manage their pending reviews through email, and those will sometimes get lost in their inbox.


@modular-magician
Copy link
Collaborator

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform GA: Diff ( 2 files changed, 298 insertions(+))
Terraform Beta: Diff ( 9 files changed, 1481 insertions(+), 3 deletions(-))
TF Validator: Diff ( 2 files changed, 3 insertions(+), 3 deletions(-))
TF OiCS: Diff ( 4 files changed, 123 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2138
Passed tests 1897
Skipped tests: 227
Failed tests: 14

Action taken

Triggering VCR tests in RECORDING mode for the tests that failed during VCR. Click here to see the failed tests
TestAccFirebaserulesRelease_BasicRelease|TestAccBigqueryDatapolicyDataPolicyIamPolicyGenerated|TestAccBigqueryDatapolicyDataPolicyIamMemberGenerated|TestAccBigqueryDatapolicyDataPolicyIamBindingGenerated|TestAccComputeInstance_networkPerformanceConfig|TestAccCloudfunctions2function_cloudfunctions2BasicAuditlogsExample|TestAccComputeInstance_soleTenantNodeAffinities|TestAccCloudfunctions2function_cloudfunctions2BasicGcsExample|TestAccComputeGlobalForwardingRule_internalLoadBalancing|TestAccCGCSnippet_eventarcWorkflowsExample|TestAccCloudFunctions2Function_fullUpdate|TestAccCloudRunService_cloudRunServiceStaticOutboundExample|TestAccBigqueryDatapolicyDataPolicy_bigqueryDatapolicyDataPolicyBasicExample|TestAccPrivatecaCertificateAuthority_privatecaCertificateAuthoritySubordinateExample

@modular-magician
Copy link
Collaborator

Tests passed during RECORDING mode:
TestAccFirebaserulesRelease_BasicRelease[view]
TestAccCloudfunctions2function_cloudfunctions2BasicAuditlogsExample[view]
TestAccCloudfunctions2function_cloudfunctions2BasicGcsExample[view]
TestAccCGCSnippet_eventarcWorkflowsExample[view]
TestAccCloudFunctions2Function_fullUpdate[view]
TestAccPrivatecaCertificateAuthority_privatecaCertificateAuthoritySubordinateExample[view]

Tests failed during RECORDING mode:
TestAccBigqueryDatapolicyDataPolicyIamPolicyGenerated[view]
TestAccBigqueryDatapolicyDataPolicyIamMemberGenerated[view]
TestAccBigqueryDatapolicyDataPolicyIamBindingGenerated[view]
TestAccComputeInstance_networkPerformanceConfig[view]
TestAccComputeInstance_soleTenantNodeAffinities[view]
TestAccComputeGlobalForwardingRule_internalLoadBalancing[view]
TestAccCloudRunService_cloudRunServiceStaticOutboundExample[view]
TestAccBigqueryDatapolicyDataPolicy_bigqueryDatapolicyDataPolicyBasicExample[view]

Please fix these to complete your PR
View the build log or the debug log for each test

@slevenick
Copy link
Contributor

/gcbrun enabled API in CI

@modular-magician
Copy link
Collaborator

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform GA: Diff ( 2 files changed, 298 insertions(+))
Terraform Beta: Diff ( 9 files changed, 1481 insertions(+), 3 deletions(-))
TF Validator: Diff ( 2 files changed, 3 insertions(+), 3 deletions(-))
TF OiCS: Diff ( 4 files changed, 123 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2148
Passed tests 1899
Skipped tests: 230
Failed tests: 19

Action taken

Triggering VCR tests in RECORDING mode for the tests that failed during VCR. Click here to see the failed tests
TestAccSqlDatabaseInstance_withPrivateNetwork_withAllocatedIpRange|TestAccBigqueryDatapolicyDataPolicyIamPolicyGenerated|TestAccBigqueryDatapolicyDataPolicyIamMemberGenerated|TestAccBigqueryDatapolicyDataPolicyIamBindingGenerated|TestAccDataSourceGoogleServiceAccountIdToken_impersonation|TestAccComputeInstance_soleTenantNodeAffinities|TestAccCloudfunctions2function_cloudfunctions2BasicAuditlogsExample|TestAccCloudfunctions2function_cloudfunctions2BasicGcsExample|TestAccCloudFunctions2Function_fullUpdate|TestAccCloudRunService_cloudRunServiceScheduledExample|TestAccComputeGlobalForwardingRule_internalLoadBalancing|TestAccCloudRunService_cloudRunServiceStaticOutboundExample|TestAccCGCSnippet_eventarcWorkflowsExample|TestAccBigtableAppProfile_bigtableAppProfileAnyclusterExample|TestAccBigqueryDatapolicyDataPolicy_bigqueryDatapolicyDataPolicyBasicExample|TestAccCGCSnippet_storageObjectLifecycleSettingExample|TestAccBigtableAppProfile_bigtableAppProfileMulticlusterExample|TestAccSqlDatabaseInstance_SqlServerAuditConfig|TestAccPrivatecaCertificateAuthority_privatecaCertificateAuthoritySubordinateExample

@modular-magician
Copy link
Collaborator

Tests passed during RECORDING mode:
TestAccDataSourceGoogleServiceAccountIdToken_impersonation[view]
TestAccCloudfunctions2function_cloudfunctions2BasicAuditlogsExample[view]
TestAccCloudfunctions2function_cloudfunctions2BasicGcsExample[view]
TestAccCGCSnippet_eventarcWorkflowsExample[view]
TestAccBigtableAppProfile_bigtableAppProfileAnyclusterExample[view]
TestAccBigqueryDatapolicyDataPolicy_bigqueryDatapolicyDataPolicyBasicExample[view]
TestAccBigtableAppProfile_bigtableAppProfileMulticlusterExample[view]

Tests failed during RECORDING mode:
TestAccSqlDatabaseInstance_withPrivateNetwork_withAllocatedIpRange[view]
TestAccBigqueryDatapolicyDataPolicyIamPolicyGenerated[view]
TestAccBigqueryDatapolicyDataPolicyIamMemberGenerated[view]
TestAccBigqueryDatapolicyDataPolicyIamBindingGenerated[view]
TestAccComputeInstance_soleTenantNodeAffinities[view]
TestAccCloudFunctions2Function_fullUpdate[view]
TestAccCloudRunService_cloudRunServiceScheduledExample[view]
TestAccComputeGlobalForwardingRule_internalLoadBalancing[view]
TestAccCloudRunService_cloudRunServiceStaticOutboundExample[view]
TestAccCGCSnippet_storageObjectLifecycleSettingExample[view]
TestAccSqlDatabaseInstance_SqlServerAuditConfig[view]
TestAccPrivatecaCertificateAuthority_privatecaCertificateAuthoritySubordinateExample[view]

Please fix these to complete your PR
View the build log or the debug log for each test

Copy link
Contributor

@slevenick slevenick left a comment

Choose a reason for hiding this comment

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

It looks like the taxonomy is created with a static name (due to the display_name?) and this is causing 409 conflict errors when we run the tests if it is already created.

Can you add the taxonomy identifier to the example :vars so it gets a random suffix attached?

@DrFaust92
Copy link
Contributor Author

fixed slevenick, thanks for catching this!

@modular-magician
Copy link
Collaborator

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform GA: Diff ( 2 files changed, 298 insertions(+))
Terraform Beta: Diff ( 9 files changed, 1481 insertions(+), 3 deletions(-))
TF Validator: Diff ( 2 files changed, 3 insertions(+), 3 deletions(-))
TF OiCS: Diff ( 4 files changed, 123 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2150
Passed tests 1905
Skipped tests: 232
Failed tests: 13

Action taken

Triggering VCR tests in RECORDING mode for the tests that failed during VCR. Click here to see the failed tests
TestAccFirebaserulesRelease_BasicRelease|TestAccComputeInstance_soleTenantNodeAffinities|TestAccCloudRunService_cloudRunServiceStaticOutboundExample|TestAccCloudFunctions2Function_fullUpdate|TestAccCGCSnippet_eventarcWorkflowsExample|TestAccBigqueryDatapolicyDataPolicy_bigqueryDatapolicyDataPolicyBasicExample|TestAccComputeGlobalForwardingRule_internalLoadBalancing|TestAccPrivatecaCertificateAuthority_privatecaCertificateAuthoritySubordinateExample|TestAccBigqueryDatapolicyDataPolicyIamBindingGenerated|TestAccBigqueryDatapolicyDataPolicyIamPolicyGenerated|TestAccBigqueryDatapolicyDataPolicyIamMemberGenerated|TestAccSqlDatabaseInstance_SqlServerAuditConfig|TestAccSqlDatabaseInstance_withPrivateNetwork_withAllocatedIpRange

@modular-magician
Copy link
Collaborator

Tests passed during RECORDING mode:
TestAccFirebaserulesRelease_BasicRelease[view]
TestAccCloudFunctions2Function_fullUpdate[view]
TestAccBigqueryDatapolicyDataPolicy_bigqueryDatapolicyDataPolicyBasicExample[view]
TestAccBigqueryDatapolicyDataPolicyIamBindingGenerated[view]
TestAccBigqueryDatapolicyDataPolicyIamPolicyGenerated[view]
TestAccBigqueryDatapolicyDataPolicyIamMemberGenerated[view]

Tests failed during RECORDING mode:
TestAccComputeInstance_soleTenantNodeAffinities[view]
TestAccCloudRunService_cloudRunServiceStaticOutboundExample[view]
TestAccCGCSnippet_eventarcWorkflowsExample[view]
TestAccComputeGlobalForwardingRule_internalLoadBalancing[view]
TestAccPrivatecaCertificateAuthority_privatecaCertificateAuthoritySubordinateExample[view]
TestAccSqlDatabaseInstance_SqlServerAuditConfig[view]
TestAccSqlDatabaseInstance_withPrivateNetwork_withAllocatedIpRange[view]

Please fix these to complete your PR
View the build log or the debug log for each test

Copy link
Contributor

@slevenick slevenick left a comment

Choose a reason for hiding this comment

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

Some small comments, looks good overall

mmv1/products/bigquerydatapolicy/api.yaml Outdated Show resolved Hide resolved
mmv1/products/bigquerydatapolicy/api.yaml Show resolved Hide resolved
mmv1/products/bigquerydatapolicy/terraform.yaml Outdated Show resolved Hide resolved
mmv1/products/bigquerydatapolicy/api.yaml Show resolved Hide resolved
@DrFaust92
Copy link
Contributor Author

thanks @slevenick addressed comments

@modular-magician
Copy link
Collaborator

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform GA: Diff ( 3 files changed, 297 insertions(+))
Terraform Beta: Diff ( 10 files changed, 1547 insertions(+), 3 deletions(-))
TF Validator: Diff ( 2 files changed, 3 insertions(+), 3 deletions(-))
TF OiCS: Diff ( 4 files changed, 123 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2152
Passed tests 1907
Skipped tests: 233
Failed tests: 12

Action taken

Triggering VCR tests in RECORDING mode for the tests that failed during VCR. Click here to see the failed tests
TestAccFirebaserulesRelease_BasicRelease|TestAccBigqueryDatapolicyDataPolicyIamPolicyGenerated|TestAccBigqueryDatapolicyDataPolicyIamBindingGenerated|TestAccBigqueryDatapolicyDataPolicyIamMemberGenerated|TestAccPrivatecaCertificateAuthority_privatecaCertificateAuthoritySubordinateExample|TestAccComputeInstance_soleTenantNodeAffinities|TestAccComputeGlobalForwardingRule_internalLoadBalancing|TestAccCGCSnippet_eventarcWorkflowsExample|TestAccCloudRunService_cloudRunServiceStaticOutboundExample|TestAccBigqueryDatapolicyDataPolicy_bigqueryDatapolicyDataPolicyUpdate|TestAccSqlDatabaseInstance_withPrivateNetwork_withAllocatedIpRange|TestAccSqlDatabaseInstance_SqlServerAuditConfig

@modular-magician
Copy link
Collaborator

Tests passed during RECORDING mode:
TestAccFirebaserulesRelease_BasicRelease[view]
TestAccBigqueryDatapolicyDataPolicy_bigqueryDatapolicyDataPolicyUpdate[view]

Tests failed during RECORDING mode:
TestAccBigqueryDatapolicyDataPolicyIamPolicyGenerated[view]
TestAccBigqueryDatapolicyDataPolicyIamBindingGenerated[view]
TestAccBigqueryDatapolicyDataPolicyIamMemberGenerated[view]
TestAccPrivatecaCertificateAuthority_privatecaCertificateAuthoritySubordinateExample[view]
TestAccComputeInstance_soleTenantNodeAffinities[view]
TestAccComputeGlobalForwardingRule_internalLoadBalancing[view]
TestAccCGCSnippet_eventarcWorkflowsExample[view]
TestAccCloudRunService_cloudRunServiceStaticOutboundExample[view]
TestAccSqlDatabaseInstance_withPrivateNetwork_withAllocatedIpRange[view]
TestAccSqlDatabaseInstance_SqlServerAuditConfig[view]

Please fix these to complete your PR
View the build log or the debug log for each test

@modular-magician
Copy link
Collaborator

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform GA: Diff ( 3 files changed, 297 insertions(+))
Terraform Beta: Diff ( 10 files changed, 1547 insertions(+), 3 deletions(-))
TF Validator: Diff ( 2 files changed, 3 insertions(+), 3 deletions(-))
TF OiCS: Diff ( 4 files changed, 123 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2156
Passed tests 1913
Skipped tests: 233
Failed tests: 10

Action taken

Triggering VCR tests in RECORDING mode for the tests that failed during VCR. Click here to see the failed tests
TestAccFirebaserulesRelease_BasicRelease|TestAccComputeInstance_soleTenantNodeAffinities|TestAccCloudRunService_cloudRunServiceStaticOutboundExample|TestAccComputeGlobalForwardingRule_internalLoadBalancing|TestAccSqlDatabaseInstance_SqlServerAuditConfig|TestAccBigqueryDatapolicyDataPolicyIamMemberGenerated|TestAccBigqueryDatapolicyDataPolicyIamBindingGenerated|TestAccBigqueryDatapolicyDataPolicyIamPolicyGenerated|TestAccSqlDatabaseInstance_withPrivateNetwork_withAllocatedIpRange|TestAccPrivatecaCertificateAuthority_privatecaCertificateAuthoritySubordinateExample

@modular-magician
Copy link
Collaborator

Tests passed during RECORDING mode:
TestAccFirebaserulesRelease_BasicRelease[Debug log]
TestAccPrivatecaCertificateAuthority_privatecaCertificateAuthoritySubordinateExample[Debug log]

Tests failed during RECORDING mode:
TestAccComputeInstance_soleTenantNodeAffinities[Error message] [Debug log]
TestAccCloudRunService_cloudRunServiceStaticOutboundExample[Error message] [Debug log]
TestAccComputeGlobalForwardingRule_internalLoadBalancing[Error message] [Debug log]
TestAccSqlDatabaseInstance_SqlServerAuditConfig[Error message] [Debug log]
TestAccBigqueryDatapolicyDataPolicyIamMemberGenerated[Error message] [Debug log]
TestAccBigqueryDatapolicyDataPolicyIamBindingGenerated[Error message] [Debug log]
TestAccBigqueryDatapolicyDataPolicyIamPolicyGenerated[Error message] [Debug log]
TestAccSqlDatabaseInstance_withPrivateNetwork_withAllocatedIpRange[Error message] [Debug log]

Please fix these to complete your PR
View the build log or the debug log for each test

@franviera92
Copy link

i need this resources, merge soon. please

@harry-comparis
Copy link

harry-comparis commented Oct 3, 2022

@DrFaust92 How to adjust the principle when adding a masking rule with this?

@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've sorted out the following information about your changes, here it is - !

Diff report

Terraform GA: Diff ( 3 files changed, 298 insertions(+))
Terraform Beta: Diff ( 10 files changed, 1548 insertions(+), 3 deletions(-))
TF Validator: Diff ( 2 files changed, 3 insertions(+), 3 deletions(-))
TF OiCS: Diff ( 4 files changed, 123 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2205
Passed tests 1963
Skipped tests: 240
Failed tests: 2

Action taken

Triggering VCR tests in RECORDING mode for the tests that failed during VCR. Click here to see the failed tests
TestAccComputeInstance_soleTenantNodeAffinities|TestAccCGCSnippet_eventarcWorkflowsExample

@modular-magician
Copy link
Collaborator

Tests failed during RECORDING mode:
TestAccComputeInstance_soleTenantNodeAffinities[Error message] [Debug log]
TestAccCGCSnippet_eventarcWorkflowsExample[Error message] [Debug log]

Please fix these to complete your PR
View the build log or the debug log for each test

Copy link
Contributor

@slevenick slevenick left a comment

Choose a reason for hiding this comment

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

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants