Soru

Zorluk: Çok zorOrganization Policies and Constraints

A global online retailer uses Google Cloud with a multi-level resource hierarchy: Organization Root → Production Folder → E-Commerce Folder → Payment-Service Project. An Organization Policy applied at the Production Folder sets the `gcp.resourceLocations` constraint to `allowedValues: ["in:us-locations"]` with `inheritFromParent: false`. The security team now needs to permit a specialized payment module inside the Payment-Service Project to deploy resources in `europe-west3`, while ensuring three strict governance rules:
1. All sibling projects under the E-Commerce Folder must remain restricted to `us-locations`.
2. Any new location constraints added at the Organization Root or Production Folder in the future must automatically merge and apply to the Payment-Service Project.
3. The security team must test a new constraint restricting public IP addresses (`compute.vmExternalIpAccess`) across the Production Folder to measure compliance impact without blocking active developer deployments.

Which combination of Organization Policy configurations correctly fulfills all security and operational requirements?

  1. At the Payment-Service Project level, configure `gcp.resourceLocations` with `allowedValues: ["europe-west3"]` and set `inheritFromParent: true`. At the Production Folder level, apply `compute.vmExternalIpAccess` in dry-run mode.Cevap
  2. B
    Grant the primitive Owner role (`roles/owner`) to the Payment-Service Project leads so their deployments bypass folder-level Organization Policies, while enforcing `compute.vmExternalIpAccess` directly at the project level.
  3. C
    Establish a VPC Service Controls perimeter encompassing the Payment-Service Project to allow `europe-west3` data access, while configuring an egress rule to audit public IP address usage across the Production Folder.
  4. D
    Grant the `roles/iam.serviceAccountUser` role at the Organization Root to the deployment service account, allowing it to modify the `gcp.resourceLocations` enforcement behavior on the Payment-Service Project.

Cevap

Configure the `gcp.resourceLocations` policy at the Payment-Service Project level to explicitly allow `europe-west3` while setting `inheritFromParent: true`, and apply the `compute.vmExternalIpAccess` constraint in dry-run mode at the Production Folder level.
The correct approach configures `gcp.resourceLocations` on the target project with `allowedValues: ["europe-west3"]` and `inheritFromParent: true`. This inherits `in:us-locations` from the parent Production Folder while permitting `europe-west3` specifically for this project, and guarantees that any future parent-level restrictions are inherited. Additionally, applying `compute.vmExternalIpAccess` in dry-run mode at the Production Folder allows the security team to audit non-compliant public IP configurations in Cloud Logging without interrupting current deployments.

Adım Adım Çözüm

1
Analyze the location constraint hierarchy requirement
The Production Folder restricts deployments to `us-locations`. To add `europe-west3` at the Payment-Service Project without overriding parent policies or affecting sibling projects, the project policy must append `europe-west3` to `allowedValues` and set `inheritFromParent: true`.
Setting `inheritFromParent: true` ensures that the local allowed values are evaluated in addition to inherited parent values (`us-locations`), and allows future parent policy additions to propagate automatically.
2
Evaluate the requirement for testing public IP restrictions without breaking operations
Configure the `compute.vmExternalIpAccess` constraint at the Production Folder level using `dry-run` enforcement.
Dry-run enforcement logs policy violations to Cloud Logging and Security Command Center, enabling security teams to audit compliance impact without blocking existing CI/CD pipelines or developer workflows.

Anahtar Kavram

Google Cloud Organization Policy inheritance, list constraint merging via inheritFromParent, and dry-run policy enforcement.
Tahmini Süre:3m 0s
Bu soruyu puanla