An enterprise security team requires that Compute Engine virtual machines in the 'Data-Processing' folder be prevented from enabling IP forwarding (acting as routers or network gateways), except for one specialized project named 'gw-prod-100' located inside that folder. A cloud engineer must implement this guardrail using the Google Cloud resource hierarchy while granting the explicit exception. Which configuration should the engineer apply?
- Enforce the `constraints/compute.vmCanActAsIpForwarder` Organization Policy constraint on the 'Data-Processing' folder, and set the policy constraint to false (enforcement off) at the 'gw-prod-100' project level.Cevap
- BGrant the `roles/orgpolicy.policyAdmin` IAM role at the 'gw-prod-100' project level and assign the Compute Instance Admin role at the 'Data-Processing' folder level.
- CApply an IAM deny policy for `compute.instances.create` on the 'Data-Processing' folder and remove all subnet bindings from the 'gw-prod-100' project.
- DAssign the primitive Owner role to administrators of the 'gw-prod-100' project so that inherited folder constraints are automatically bypassed.
Cevap
Enforce the `constraints/compute.vmCanActAsIpForwarder` Organization Policy constraint on the 'Data-Processing' folder, and set the policy constraint enforcement to false at the 'gw-prod-100' project level.
Organization Policy constraints set at a folder level automatically inherit down to all child projects. To grant an exception to a specific project within that folder, the constraint must be explicitly set to false (off) at the project level, which overrides the inherited folder policy.
Adım Adım Çözüm
Anahtar Kavram
Organization Policy Hierarchy and Constraint Inheritance Overrides