nerdexam
Google

PROFESSIONAL-CLOUD-DEVOPS-ENGINEER · Question #209

You recently created a Cloud Build pipeline for deploying Terraform code stored in a GitHub repository. You make Terraform code changes in short-lived branches and sometimes use tags during developmen

The correct answer is A. Create a build trigger with the \d+\.\d+\.\d+ tag pattern.. \d+\.\d+\.\d+ matches semantic versioning (e.g., 1.2.3), which you use for releases. A tag pattern ensures the trigger only runs on release tags, not on development branches. This setup minimizes operational overhead by automating deployments only when a release is tagged.

Submitted by viktor_hu· Apr 18, 2026Building and implementing CI/CD pipelines for a service

Question

You recently created a Cloud Build pipeline for deploying Terraform code stored in a GitHub repository. You make Terraform code changes in short-lived branches and sometimes use tags during development. You tag releases with a semantic version when they are ready for deployment. You require your pipeline to apply the Terraform code whenever there is a new release, and you need to minimize operational overhead. What should you do?

Options

  • ACreate a build trigger with the \d+.\d+.\d+ tag pattern.
  • BCreate a build trigger with the \d+.\d+.\d+ branch pattern.
  • CCreate a build trigger with the .* tag pattern.
  • DCreate a build trigger with the branch pattern.

How the community answered

(54 responses)
  • A
    74% (40)
  • B
    17% (9)
  • C
    6% (3)
  • D
    4% (2)

Explanation

\d+.\d+.\d+ matches semantic versioning (e.g., 1.2.3), which you use for releases. A tag pattern ensures the trigger only runs on release tags, not on development branches. This setup minimizes operational overhead by automating deployments only when a release is tagged.

Topics

#Cloud Build#CI/CD Pipelines#Build Triggers#Semantic Versioning

Community Discussion

No community discussion yet for this question.

Full PROFESSIONAL-CLOUD-DEVOPS-ENGINEER Practice