Created
October 15, 2015 19:42
-
-
Save pmoust/fd9fad71d818fef32b76 to your computer and use it in GitHub Desktop.
terraform sync test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
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