cloudsecuritycompliace: replace organization with parent to support PLE#1342
Merged
Conversation
…LE (#17644) [upstream:fbe417ab7d4cc96c24d79137c2b492289a2f6f06] Signed-off-by: Modular Magician <magic-modules@google.com>
c240667
into
terraform-google-modules:master
3 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
Derived from GoogleCloudPlatform/magic-modules#17644