Prepare and test your skills
Prepare and test your skills
Free sample question, answered and explained below. The Professional Cloud DevOps Engineer practice bank has 1,455 more like it. Try 10 free: instant score, no account.
Your enterprise organization uses Google Cloud Deploy to manage progressive delivery across three environments: development, staging, and production.
To satisfy strict regulatory compliance and risk-mitigation policies, the organization must enforce deployment blackout windows during end-of-quarter financial auditing periods. During these scheduled windows:
production target.development and staging must continue uninterrupted.Which solution should you implement to enforce these criteria?
DeployPolicy configuration specifying a selectors stanza matching the production target.id, configure a rolloutRestriction rule restricting APPROVE and CREATE actions across the scheduled time windows, and apply it using gcloud deploy apply.Cloud Deploy Policies (DeployPolicy) provide declarative governance and operational guardrails for delivery pipelines and deployment targets in Google Cloud Deploy. They allow DevOps administrators to enforce compliance rules—such as change freeze windows, rollout restrictions, and approval policies—without modifying core pipeline architectures or underlying infrastructure.
selectors block to target the specific target.id (or target labels) representing the production environment, the policy applies strictly to production while leaving development and staging unaffected.rolloutRestriction rule supports granular action restrictions, specifically preventing APPROVE (approving rollout promotions) and CREATE (creating new rollouts) during designated windows.oneTimeWindows or recurring weeklyWindows to cleanly define blackout and audit periods.gcloud deploy apply --file=FILENAME.APPROVE, CREATE, ADVANCE, ROLLBACK, RETRY_JOB, and CANCEL.id or dynamically using resource labels.Using native DeployPolicy resources is the Google-recommended approach for enforcing temporal restrictions and risk gates on Cloud Deploy targets. It requires zero custom webhook development, prevents human error during change freezes, and natively intercepts API actions at the control plane level.
roles/clouddeploy.operator that denies clouddeploy.rollouts.approve permissions using GKE cluster resource tags and temporal attributes.IAM Deny policies and IAM Conditions allow organizations to restrict specific IAM permissions across GCP resource hierarchies based on attributes such as request time, resource tags, or principal identity.
clouddeploy.googleapis.com), which are separate from the destination GKE clusters.You needed a global, top-down security perimeter blocking specific IAM principals or roles from accessing GCP APIs across an entire project or folder regardless of the CI/CD tooling in use.
Cloud Build approval gates pause pipeline build executions until authorized principals approve them. Cloud Scheduler paired with Pub/Sub is frequently used to automate custom cron tasks or invoke Cloud Functions.
You needed custom build-time approval orchestration for source-code compilation workflows inside Cloud Build before artifacts are handed over to release management.
DeliveryPipeline definition YAML to add a requireApproval: true parameter configured with a CEL time-window expression directly inside the production stage.In Google Cloud Deploy, individual targets or pipeline stages can require manual approval by configuring requireApproval: true directly on the Target resource configuration.
DeliveryPipeline stage definition or Target specification.requireApproval: true on a target mandates approval for every rollout to that target permanently; it cannot dynamically toggle or restrict approvals according to audit calendar windows.DeployPolicy resources, not inline pipeline schema parameters.requireApproval: true lives on the Target resource schema, not inside the DeliveryPipeline stage schema.You simply needed to require manual human approval for every promotion into the production target, without any calendar-based or recurring time-window restrictions.
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