-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Remove redundant cloud_control_metadata block #16130
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?
Remove redundant cloud_control_metadata block #16130
Conversation
|
Hello! I am a robot. Tests will require approval from a repository maintainer to run. Googlers: For automatic test runs see go/terraform-auto-test-runs. @BBBmau, a repository maintainer, has been assigned to review your changes. If you have not received review feedback within 2 business days, please leave a comment on this PR asking them to take a look. You can help make sure that review is quick by doing a self-review and by running impacted tests locally. |
Tests analyticsTotal tests: 7 Click here to see the affected service packages
Action takenFound 1 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
|
| } | ||
| } | ||
|
|
||
| cloud_control_metadata { |
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.
can you provide more info on how this is a duplicate? The API reference of this resource has CloudControlMetadata as a List allowing multiple blocks of cloud_control_metadata to be set in configuration.

We've also had passing nightly tests for this test case, providing another reason for this to be left as is.
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.
If you see the examle here: https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/cloud_security_compliance_framework_deployment#example-usage---cloudsecuritycompliance-framework-deployment-basic
First we create the "google_cloud_security_compliance_framework" resource which has only one cloud control details organizations/%{org_id}/locations/global/cloudControls/builtin-detective-policy-for-vertex-ai-runtime-template-idle-shutdown
Then we use the above created framework to create the "google_cloud_security_compliance_framework_deployment" resource, now the cloudcontrol metadata field should have only the cloud controls that are defined in the framework i.e organizations/%{org_id}/locations/global/cloudControls/builtin-detective-policy-for-vertex-ai-runtime-template-idle-shutdown but the example has one more cloud control metadata in the deployment request which should not be there.
Thats why removing the cloud control metadata for this control organizations/123456789/locations/global/cloudControls/builtin-assign-correct-bucket-label
https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/cloud_security_compliance_framework_deployment has incorrect information (specifying the AUDIT enforcement mode) in the deployment request.
Also the framework resource created above does not have the cloud control
builtin-assign-correct-bucket-labelso it should not be added in the framework deployment resource creationFixes hashicorp/terraform-provider-google#25770