How to restrict resource location to europe-west3?

You are on the data governance team and are implementing security requirements to deploy resources. You need to ensure that resources are limited to only the europe-west3 region. You want to follow Google-recommended practices. What should you do?

  1. Set the constraints/gcp.resourceLocations organization policy constraint to in:europe-west3-locations. Source Reference Answer
  2. Deploy resources with Terraform and implement a variable validation rule to ensure that the region is set to the europe-west3 region for all resources.
  3. Set the constraints/gcp.resourceLocations organization policy constraint to in:eu-locations.
  4. Create a Cloud Function to monitor all resources created and automatically destroy the ones created outside the europe-west3 region.

Community Votes

A
100%

100% of anonymous learners picked answer A. Votes are pick records left by other test-takers — they are not the verified answer.

Community Insight

This tests knowledge of Organization Policy constraints for location governance, specifically distinguishing between specific regions like europe-west3 and broader multi-regions like eu.

To restrict resource locations in Google Cloud, use the constraints/gcp.resourceLocations organization policy. The community confirms that setting this constraint to in:europe-west3-locations is the correct method to enforce regional limits.

Selecting Option C (in:eu-locations) is a common error because it restricts resources to all of Europe rather than specifically to the europe-west3 region.

Community Discussion (6 comments)

raaad 👍 11 Selected: A
  • The constraints/gcp.resourceLocations organization policy constraint is used to define where resources in the organization can be created. - Setting it to in:europe-west3-locations would specify that resources can only be created in the europe-west3 region.
b3e59c2 👍 2 Selected: A
https://cloud.google.com/resource-manager/docs/organization-policy/defining-locations#location_types
chrissamharris 👍 1
B, D B - Increase the Cloud Composer 2 environment size from medium to large. Increasing the environment size will provide more resources (including memory) to the entire environment, which should help mitigate memory usage issues. This will also support scaling if the jobs demand more resources. D. Increase the memory available to the Airflow workers. Increasing memory for Airflow workers will directly address the memory usage issue that's causing the pod evictions. By allocating more memory to the workers, they can handle larger tasks or more intensive workloads without failing due to memory constraints.
JyoGCP 👍 1 Selected: A
Option A
Matt_108 👍 2 Selected: A
Option A
scaenruy 👍 2 Selected: A
Set the constraints/gcp.resourceLocations organization policy constraint to in:europe-west3-locations.

Comments & Corrections

No comments yet — spotted an error or have a note? Share it below.

Log in to comment, report an error, or add a note about this question.

Submitted for moderation before publishing. Keep it helpful and respectful.

Expert Analysis

Why the Answer Is Correct

Option A is correct because the constraints/gcp.resourceLocations Organization Policy is the Google-recommended method to enforce where resources can be created. Setting the value to in:europe-west3-locations ensures strict compliance by preventing resource creation in any other region.

Why the Other Options Are Wrong

Option B is incorrect because Terraform validations are client-side and can be bypassed by deploying via the Console or API. Option C is incorrect because in:eu-locations permits resources in any European region, violating the requirement for europe-west3 only. Option D is incorrect because reactive remediation (destroying resources) is inefficient and risky compared to preventive policy enforcement.

Community Comment Notes

Community comments overwhelmingly support Option A, citing the official Google Cloud documentation on defining location types. Commenters emphasize that this specific constraint syntax is the standard way to implement data residency and governance controls.

Official Reference

Exam Strategy

For governance questions involving resource restrictions, prioritize Organization Policies over Infrastructure as Code (IaC) logic or reactive scripts. Pay close attention to whether the question requires a specific region or a broader multi-region to avoid selecting overly permissive options.

Related Analysis

← Back to PDE Study Guide