QuestionQ115

VerifiedBuilding and implementing CI/CD pipelines, including continuous testing, for application, infrastructure, and machine learning workloads

You recently created a Cloud Build pipeline to deploy Terraform code kept in a GitHub repository. You make Terraform code changes in short-lived branches and occasionally use tags during development. When releases are ready for deployment, you tag them with a semantic version. You need the pipeline to apply the Terraform code whenever there is a new release, while minimizing operational overhead. What should you do?

Explanation

Cloud Build supports triggers for a new tag and evaluates the tag value against a regular expression. Restricting a tag trigger to \d+\.\d+\.\d+ runs the Terraform deployment only for semantic-version release tags, excluding development tags and all branch changes.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!