Question

Difficulty: MediumOrganization Policies and Constraints

A enterprise governance team is updating security guardrails for a dedicated `Production` folder containing multiple Google Cloud projects. The team must enforce two main requirements: prevent any newly created Compute Engine VMs or Cloud SQL instances from receiving public IP addresses, and evaluate potential pipeline disruptions by auditing policy violations before actively blocking non-compliant resource deployments. Which TWO actions should you recommend to fulfill these requirements? (Select TWO.)

  1. Apply Organization Policy constraints `compute.vmExternalIpAccess` and `sql.restrictPublicIp` at the `Production` folder level.Answer
  2. B
    Assign the primitive `roles/viewer` role to project developers to prevent them from allocating external network interfaces.
  3. Configure the `dryRunPolicy` specification on the Organization Policy constraints to monitor non-compliant resource requests in Cloud Audit Logs prior to active enforcement.Answer
  4. D
    Construct a VPC Service Controls perimeter around the `Production` folder to block public IP assignment on Compute Engine and Cloud SQL instances.

Answer

Enforce the `compute.vmExternalIpAccess` and `sql.restrictPublicIp` Organization Policy constraints on the target folder, and utilize the `dryRunPolicy` specification to audit policy violations in Cloud Audit Logs without blocking active operations.
Applying boolean Organization Policy constraints (`compute.vmExternalIpAccess` and `sql.restrictPublicIp`) at the target folder level ensures programmatic guardrails against public IP assignment across all underlying projects. Configuring the `dryRunPolicy` specification enables auditing violations via Cloud Logging before enforcing blocking actions, satisfying the mandate to assess impact on CI/CD pipelines.

Step-by-Step Solution

1
Identify the proper Google Cloud mechanism for enforcing infrastructure configuration guardrails across resource hierarchies.
Organization Policy constraints (`compute.vmExternalIpAccess` and `sql.restrictPublicIp`) targeted at the folder level prevent public IP assignments.
Organization Policies enforce programmatic configuration restrictions hierarchically across all projects contained within a folder.
2
Determine how to test policy enforcement without breaking existing CI/CD automation pipelines.
Use Organization Policy dry-run mode (`dryRunPolicy`).
Dry-run mode evaluates policy compliance against incoming requests and writes log entries to Cloud Audit Logs without rejecting non-compliant requests.

Key Concept

Organization Policy constraints and dry-run evaluation mode
Rate this question