Skip to content

Instantly share code, notes, and snippets.

@stmllr
Forked from undeadops/circle.yml
Created December 26, 2016 23:38
Show Gist options
  • Save stmllr/db0257650742bb9e2be617719e06e56e to your computer and use it in GitHub Desktop.
Save stmllr/db0257650742bb9e2be617719e06e56e to your computer and use it in GitHub Desktop.
Terraform circleci.yml
dependencies:
cache_directories:
- terraform_0.6.16
pre:
- mkdir -p terraform_0.6.16
- wget -O terraform_0.6.16/terraform_0.6.16_linux_amd64.zip https://releases.hashicorp.com/terraform/0.6.16/terraform_0.6.16_linux_amd64.zip
- unzip terraform_0.6.16/terraform_0.6.16_linux_amd64.zip
test:
override:
- ./terraform remote config --backend=S3 --backend-config="bucket=$BUCKET" --backend-config="key=terraform.tfstate" --backend-config="region=us-east-1"
- ./terraform plan --out=terraform.plan
deployment:
production:
branch: master
commands:
- ./terraform apply terraform.plan
- ./terraform remote push
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment