A simple starter kit for running your terraform code on every checkin.
The example has a master and staging environment, but you can have as many branches and environments as you want to automatically deploy to
Currently this template only uses auto-approve on the terraform apply
so when you setup your branch
tiggers in GCP make sure you only trigger builds to branches you want to automatically apply.
A work around for manually looking at terraform plan output is not developed yet in this example.
- Clone this repo and change the project name in all the environments folders main.tf
- checkin your code
- setup your GCP Project and and enable Cloud Build
- setup your google build account to read from your repo
- setup a trigger to master on every checking
- test your deployment by going to /environments/master and typing
terraform plan
- check your changes into master and watch it deploy