Challenge 5: Automation

Previous Challenge

Introduction

We can run the Terraform commands locally but ideally they should be executed in a headless fashion so the configuration is reproducable. This task will introduce you to Cloud Build to automate the process of Terraform provisioning.

Description

Create a new Cloud Build push trigger using the cloudbuild.yaml in the provided sample project. Make sure that the variables for the build are configured properly. Note that you might need to edit this file to get a successful build.

Warning
For the sake of simplicity we’ll stick to the Compute Engine Default Service Account, but typically you’d want to create a specific service account for the build with limited permissions.

Success Criteria

  1. There’s a new Cloud Build push trigger using the provided cloudbuild.yaml
  2. The trigger is connected to the Cloud Source Repository created in the first challenge
  3. The trigger uses the provided (fully configured) build configuration from the repository
  4. And there’s at least one successful build

Tips

  • Did you consider the permissions?

Previous Challenge