cloudsecuritycompliace: replace organization with parent to support PLE#17644
Conversation
|
Googlers: For automatic test runs see go/terraform-auto-test-runs. @slevenick, 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. |
|
@slevenick Can you please review the PR. |
slevenick
left a comment
There was a problem hiding this comment.
We can't remove a field like organization on these resources as it will be a breaking change for users who have current configurations that use it.
We can discuss other options to achieve the goals here
|
Hi there, I'm the Modular magician. I've detected the following information about your changes for commit 96969a5: Diff reportYour PR generated the following diffs in downstream repositories:
Breaking Change(s) DetectedThe following breaking change(s) were detected within your pull request.
If you believe this detection to be incorrect please raise the concern with your reviewer. Missing test reportYour PR includes resource fields which are not covered by any test. Resource: resource "google_cloud_security_compliance_cloud_control" "primary" {
organization = # value needed
}
Resource: resource "google_cloud_security_compliance_framework" "primary" {
organization = # value needed
}
Test reportAnalytics
Affected Service Packages
Step 1: Replaying Mode Action takenFound 10 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
View the replaying VCR build log Step 2: Recording Mode
🟢 All tests passed! View the recording VCR build log or the debug logs folder for detailed results. @priyankksingh VCR tests complete for 96969a5! |
slevenick
left a comment
There was a problem hiding this comment.
Per offline comms, dismissing review until it's fully implemented
|
@slevenick PR is ready for review. I have tested locally for all the 3 resources with old and new schema changes.
|
|
Hi there, I'm the Modular magician. I've detected the following information about your changes for commit 3a2cfcd: Diff reportYour PR generated the following diffs in downstream repositories:
Test reportAnalytics
Affected Service Packages
Step 1: Replaying Mode 🟢 All tests passed in Replaying mode! No Recording was needed. View the replaying VCR build log @priyankksingh, @slevenick VCR tests complete for 3a2cfcd! |
|
Hi there, I'm the Modular magician. I've detected the following information about your changes for commit 70a0a41: Diff reportYour PR generated the following diffs in downstream repositories:
Test reportAnalytics
Affected Service Packages
Step 1: Replaying Mode 🟢 All tests passed in Replaying mode! No Recording was needed. View the replaying VCR build log @priyankksingh, @slevenick VCR tests complete for 70a0a41! |
|
Hi there, I'm the Modular magician. I've detected the following information about your changes for commit 2333782: Diff reportYour PR generated the following diffs in downstream repositories:
Test reportAnalytics
Affected Service Packages
Step 1: Replaying Mode Action takenFound 11 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
View the replaying VCR build log Step 2: Recording Mode
Caution Issues requiring attention before PR completion 🔴 Initial Recording Failed: Some tests failed during the recording step. See the table above for details. Please address these issues to complete your PR. If you believe these detections are incorrect or unrelated to your change, please raise the concern with your reviewer. View the recording VCR build log or the debug logs folder for detailed results. @priyankksingh, @slevenick VCR tests complete for 2333782! |
|
Hi there, I'm the Modular magician. I've detected the following information about your changes for commit fc8b5e7: Diff reportYour PR generated the following diffs in downstream repositories:
Test reportAnalytics
Affected Service Packages
Step 1: Replaying Mode Action takenFound 11 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
View the replaying VCR build log Step 2: Recording Mode
Caution Issues requiring attention before PR completion 🔴 Initial Recording Failed: Some tests failed during the recording step. See the table above for details. 🔴 Replaying Rerun Failed: Some tests failed due to non-determinism when VCR replayed the response. See the table above for details. Please address these issues to complete your PR. If you believe these detections are incorrect or unrelated to your change, please raise the concern with your reviewer. View the recording VCR build log or the debug logs folder for detailed results. @priyankksingh, @slevenick VCR tests complete for fc8b5e7! |
|
Hi there, I'm the Modular magician. I've detected the following information about your changes for commit 042b12f: Diff reportYour PR generated the following diffs in downstream repositories:
Test reportAnalytics
Affected Service Packages
Step 1: Replaying Mode Action takenFound 9 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
View the replaying VCR build log Step 2: Recording Mode
Caution Issues requiring attention before PR completion 🔴 Initial Recording Failed: Some tests failed during the recording step. See the table above for details. 🔴 Replaying Rerun Failed: Some tests failed due to non-determinism when VCR replayed the response. See the table above for details. Please address these issues to complete your PR. If you believe these detections are incorrect or unrelated to your change, please raise the concern with your reviewer. View the recording VCR build log or the debug logs folder for detailed results. @priyankksingh, @slevenick VCR tests complete for 042b12f! |
|
@slevenick This PR has been waiting for review for 3 weekdays. Please take a look! Use the label |
|
Hi there, I'm the Modular magician. I've detected the following information about your changes for commit c2e3ad8: Diff reportYour PR generated the following diffs in downstream repositories:
Test reportAnalytics
Affected Service Packages
Step 1: Replaying Mode Action takenFound 29 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
View the replaying VCR build log Step 2: Recording Mode
Caution Issues requiring attention before PR completion 🔴 Initial Recording Failed: Some tests failed during the recording step. See the table above for details. 🔴 Replaying Rerun Failed: Some tests failed due to non-determinism when VCR replayed the response. See the table above for details. Please address these issues to complete your PR. If you believe these detections are incorrect or unrelated to your change, please raise the concern with your reviewer. View the recording VCR build log or the debug logs folder for detailed results. @priyankksingh, @slevenick VCR tests complete for c2e3ad8! |
fbe417a

Description
This PR introduces Project Level Enablement (PLE) support for Cloud Security Compliance resources. Previously, these resources were strictly bound to the organization level. This change allows users to create and manage controls, frameworks, and deployments at the project level as well.
Key Changes:
parent: Replaced the hardcodedorganizationparameter with a flexibleparentparameter acrossCloudControl,Framework, andFrameworkDeployment.organizationfield is now marked as deprecated, but old configurations remain fully supported.exactly_one_of: [parent, organization]with both fields marked asoptional: trueto allow seamless migration.pre_createcustom code hook (cloudsecuritycompliance_set_parent.go.tmpl) to automatically construct theparentstring for users who only provideorganization.organizations/{{%organization}}/...format as the first entry inimport_format, ensuring no state corruption for existing users.diff_suppress_func: 'tpgresource.CompareResourceNames'totargetResourceConfig.existingTargetResourceinFrameworkDeployment.yamlto prevent state drift when the API normalizes between project IDs and project numbers.Release Note Template for Downstream PRs
See Write release notes for guidance.