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.
A DevOps team is developing a continuous integration and continuous delivery (CI/CD) pipeline using Cloud Build to automate project environment bootstrapping and resource configuration. The workflow must execute custom Python automation scripts that interact with Google Cloud APIs and configure external third-party services.
The pipeline implementation must satisfy the following criteria:
How should the team design the Cloud Build configuration and Python automation workflow?
Cloud Build user substitution variables (prefixed with an underscore, such as _API_KEY) allow parameterized inputs to be passed to build triggers at run time or invocation.
cloudbuild.builds.get permission can inspect the substitution values.The parameter being passed was non-sensitive build metadata, such as an environment identifier (_ENVIRONMENT: production) or an application version tag.
This pattern stores sensitive credential files in a standard Cloud Storage (GCS) bucket and relies on object-level access controls to restrict download access to the pipeline service account.
/workspace persists raw credentials to disk during pipeline execution, which makes them vulnerable to inadvertent capture in build artifact uploads or diagnostic dumps.The CI/CD pipeline required staging large, non-sensitive static binary assets, machine learning models, or intermediate build artifacts.
Secret Manager is Google Cloud's fully managed service designed to store, manage, and access sensitive metadata and operational credentials. Integrating Secret Manager natively with Cloud Build allows build steps to inject secrets into memory as environment variables or retrieve them dynamically via API clients.
availableSecrets block ensures tokens are mounted directly into containerized build step environments rather than stored in cleartext source files or configuration manifests.roles/secretmanager.secretAccessor) role limits permissions to reading only the necessary secret payload without granting broader administrative rights.os.environ['SECRET_KEY']) or the Secret Manager client library to provision infrastructure, after which a secondary test step validates the environment.cloudbuild.yaml without needing custom decryption tooling.This approach aligns with Google Cloud security best practices by separating configuration from credentials, leveraging native service-level IAM controls, and preventing secret exposure across CI/CD log streams.
This method involves using Cloud Key Management Service (Cloud KMS) to manually encrypt sensitive payloads offline and storing the resulting ciphertext inside the application repository or configuration files.
/workspace) leaves sensitive cleartext files accessible across subsequent build steps and risks accidentally archiving credentials into output build artifacts.CryptoKey Encrypter/Decrypter provides encryption capabilities that are not needed for a read-only CI/CD pipeline execution.The workload required application-layer client-side envelope encryption across multi-cloud environments where a managed cloud secret manager is unavailable.
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