Skip to content

Instantly share code, notes, and snippets.

@pmoust
Created Oct 15, 2015
Embed
What would you like to do?
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