An enterprise Google Cloud organization enforces a list constraint at the root organization node using `constraints/compute.trustedImageProjects`, which explicitly allows images only from `projects/corp-base-images`. A cloud team managing a folder named `DataOps` needs to deploy Virtual Machine instances using custom images from `projects/dataops-custom-images`. However, instances in `DataOps` must also remain capable of using images from `projects/corp-base-images`. Which policy configuration on the `DataOps` folder will fulfill these security requirements?
- Enforce `constraints/compute.trustedImageProjects` on the `DataOps` folder, set the allowed values to include `projects/dataops-custom-images`, and retain policy inheritance from the parent node.Cevap
- BGrant the Compute Admin (`roles/compute.admin`) IAM role to the deployment service account at the `DataOps` folder level to bypass organization policy restrictions.
- CEnforce `constraints/compute.trustedImageProjects` on the `DataOps` folder, set the rule to replace the parent policy, and list only `projects/dataops-custom-images`.
- DAssign the primitive Owner (`roles/owner`) role on target projects inside the `DataOps` folder to grant an explicit policy enforcement exemption.
Cevap
Enforce constraints/compute.trustedImageProjects on the DataOps folder, add projects/dataops-custom-images to the allowed values list, and retain policy inheritance from the parent node.
For list constraints such as `constraints/compute.trustedImageProjects`, setting an allowed value at a child folder level while inheriting from the parent node merges the allowed values. This allows Compute Engine workloads within the `DataOps` folder to consume images from both `projects/corp-base-images` (inherited from the organization root) and `projects/dataops-custom-images` (defined at the folder level).
Adım Adım Çözüm
Anahtar Kavram
Organization Policy List Constraint Inheritance and Merging