Skip to content

Instantly share code, notes, and snippets.

@pmoust
Created October 15, 2015 19:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pmoust/fd9fad71d818fef32b76 to your computer and use it in GitHub Desktop.
Save pmoust/fd9fad71d818fef32b76 to your computer and use it in GitHub Desktop.
terraform sync test
---
machine:
environment:
TF_VERSION: 0.6.4
INFRASTRUCTURE: "peopleperhour supertasker mailchap"
AWS_DEFAULT_REGION: us-east-1
AWS_ACCESS_KEY_ID: readonly
AWS_SECRET_ACCESS_KEY: readonly
FOO: LOL
BAR: YO
SSH_KEY: /root/.ssh/id_rsa
checkout:
post:
- git submodule sync
- git submodule update --init
dependencies:
override:
- cd /usr/bin; sudo wget -q https://dl.bintray.com/mitchellh/terraform/terraform_${TF_VERSION}_linux_amd64.zip; sudo unzip terraform_${TF_VERSION}_linux_amd64.zip
- terraform -v
test:
override:
- for i in $(echo $INFRASTRUCTURE | tr " " "\n"); do cd $i; envsubst < "terraform.tfvars.example" > "terraform.tfvars"; terraform plan -out /tmp/plan; cd ..; done
- if [ -f /tmp/plan ]; then false; else true; fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment