A cloud engineer needs to ensure that no Virtual Machine instances created inside any project within the 'Data-Analytics' folder can be provisioned with external IP addresses. Developers currently hold project-level permissions that allow them to configure network interfaces. Which configuration should the engineer implement to enforce this restriction across all current and future projects in the folder?
- Set the `constraints/compute.vmExternalIpAccess` Organization Policy constraint at the 'Data-Analytics' folder level to block external IPs.Answer
- BRemove the `roles/compute.networkAdmin` IAM role at the Organization root node so it inherits down to the 'Data-Analytics' folder.
- CAssign the primitive `Viewer` role to developers at the 'Data-Analytics' folder level to override project-level Compute Engine permissions.
- DReplace all predefined Compute Engine roles across projects with a custom IAM role that disables external IP provisioning capabilities.
Answer
Enforce the Organization Policy constraint `constraints/compute.vmExternalIpAccess` at the 'Data-Analytics' folder level to restrict external IP assignment for all child projects.
The correct approach is applying the Organization Policy constraint `constraints/compute.vmExternalIpAccess` at the folder level. Organization Policies allow administrators to restrict resource configuration attributes across all projects contained within a folder, overriding any individual user's IAM permissions to create external IP interfaces.
Step-by-Step Solution
Key Concept
Organization Policies vs IAM Governance in Google Cloud