Prepare and test your skills

Prepare and test your skills

Free sample question, answered and explained below. The Professional Data Engineer practice bank has 1,353 more like it. Try 10 free: instant score, no account.
A multinational enterprise operating in the European Union must enforce strict data residency and sovereignty requirements across all its Google Cloud projects. The lead data engineer needs to systematically prevent teams from creating data storage and processing services—such as Cloud Storage buckets, BigQuery datasets, and Dataplex metadata assets—outside of approved European locations, while ensuring that existing production workloads are not abruptly disrupted.
Which strategy should the engineer implement to meet these requirements, and how will it behave upon enforcement?
gcp.restrictServiceUsage) with allowedValues set to European regional endpoints; this will retroactively disable existing services operating outside of Europe.The Restrict Resource Service Usage constraint (constraints/gcp.restrictServiceUsage) is designed to control which Google Cloud APIs and services can be enabled or used within a project or folder hierarchy.
gcp.restrictServiceUsage constraint manages service API enablement (for example, allowing bigquery.googleapis.com while blocking unapproved APIs), rather than restricting the physical geographic deployment locations of resources.gcp.restrictServiceUsage accepts API service names, not regional identifiers or geographic location value groups like in:eu-locations.location metadata during provisioning.The objective was to create an allowlist of specific Google Cloud services (such as preventing developers from enabling unapproved AI or third-party APIs) across sensitive projects.
To enforce geographical data sovereignty, organizations must use constraints/gcp.resourceLocations specifically, as gcp.restrictServiceUsage operates strictly at the service and API enablement level.
gcp.resourceLocations) with deniedValues set to us-locations; this will automatically migrate all existing out-of-region storage objects into European regions.This approach attempts to use a denylist on the Resource Location Restriction constraint (gcp.resourceLocations) to prevent resource creation in US locations, expecting the platform to migrate existing data automatically.
us-locations leaves other non-European regions (such as Asia, South America, or Australia) open for resource provisioning, failing comprehensive European data sovereignty requirements.The organization wanted to specifically block US locations while allowing all other global regions, and had already planned a separate manual or scripted migration process for existing assets.
Best practices for regulatory data residency mandate using an allowlist (allowedValues) rather than a denylist (deniedValues), ensuring that only vetted geopolitical regions are permitted by default.
gcp.resourceLocations) with allowedValues set to in:eu-locations at the organization node; this will block the creation of non-compliant new resources while allowing existing resources to continue operating.The Resource Location Restriction constraint (constraints/gcp.resourceLocations) is a managed organization policy constraint provided by the Organization Policy Service. It allows cloud administrators and governance teams to define an allowlist or denylist of physical locations and value groups where supported Google Cloud resources can be created.
allowedValues to the value group in:eu-locations ensures that all supported services (including Cloud Storage, BigQuery, Dataplex, and Compute Engine) are restricted to European regions and multi-regions.gcp.resourceLocations constraint are not retroactive. When the policy is enforced, resources provisioned before the constraint was added will continue to run and perform their functions without immediate disruption.in:eu-locations simplifies governance by dynamically encompassing all current and newly added European regions without requiring manual updates for each new datacenter.Owner or Editor).Using native organization policy constraints provides centralized, automated governance that prevents non-compliant provisioning before it occurs. Alternative methods, such as custom scripts or reactive log audits, either fail to prevent deployments or introduce significant management overhead without providing native policy inheritance.
cloudresourcemanager.googleapis.com/Project to delete non-compliant resources; this enforces immediate compliance across past and future resources.This approach proposes defining a custom organization policy constraint using Common Expression Language (CEL) targeted at the Project resource to automatically remove non-compliant storage and compute instances.
CREATE and UPDATE method types. They cannot execute retroactive deletion actions on existing resources.storage.googleapis.com/Bucket), not on the parent Project resource.gcp.resourceLocations) that natively covers all supported data services without needing custom CEL logic.ALLOW or DENY), returning an error to the caller when a condition is violated.You needed to restrict a specific non-location resource attribute that lacks a pre-defined managed constraint, such as restricting specific cluster flags or repository configurations.
Google-managed constraints are preferred over custom constraints whenever standard guardrails (like geographic location restriction or public IP restriction) are required.
Answer them yourself and get your score the moment you finish. No account needed.
Full access includes
Keep the momentum going with these hand-picked practice scenarios
Last updated Validated