A cloud administrator manages resource constraints across an enterprise Google Cloud hierarchy. An Organization Policy using the Boolean constraint constraints/compute.vmCanIpForward is set to Enforced at the Analytics folder level to prevent virtual machines from enabling IP forwarding. A specific workload inside this folder, located in the Network-Appliance project, requires a virtual machine to act as a router with IP forwarding enabled. How should the administrator configure the environment to allow IP forwarding specifically for the Network-Appliance project while maintaining the constraint for all other projects in the folder?
- Override the inherited policy by configuring the constraints/compute.vmCanIpForward constraint to Enforced: Off specifically at the Network-Appliance project level.Answer
- BGrant the Compute Admin (roles/compute.admin) IAM role to the service account in the Network-Appliance project so it can bypass the folder Organization Policy.
- CAssign the primitive Owner role on the Network-Appliance project to override inherited folder constraints.
- DCreate an IAM Deny policy at the Analytics folder level blocking compute.instances.create and add an IAM policy binding exception for the Network-Appliance project.
Answer
Override the inherited policy by setting the constraints/compute.vmCanIpForward Organization Policy constraint to Enforced: Off explicitly at the Network-Appliance project level.
Google Cloud Organization Policies evaluate constraints hierarchically. When a parent folder enforces a Boolean constraint such as disabling IP forwarding, all descendant projects inherit that restriction. To create an exception for a single project, an administrator configures an explicit Organization Policy on that project with the Boolean constraint enforcement set to Off (unenforced), which overrides the inherited policy for that project only.
Step-by-Step Solution
Key Concept
Organization Policy Boolean Constraint Inheritance and Explicit Overrides
Estimated Time:1m 30s