Challenge 5: Automation
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 theCompute Engine Default Service Account
, but typically you’d want to create a specific service account for the build with limited permissions.
Success Criteria
- There’s a new Cloud Build push trigger using the provided
cloudbuild.yaml
- The trigger is connected to the Cloud Source Repository created in the first challenge
- The trigger uses the provided (fully configured) build configuration from the repository
- And there’s at least one successful build
Tips
- Did you consider the permissions?