Skip to content

Commit

Permalink
use Terraform CLI variables with Travis secure variables
Browse files Browse the repository at this point in the history
  • Loading branch information
7hunderbird committed May 9, 2016
1 parent 8e84bf6 commit 1dd3cb8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
language: c
before_install:
- wget https://releases.hashicorp.com/terraform/0.5.3/terraform_0.5.3_linux_amd64.zip
- wget https://releases.hashicorp.com/terraform/0.6.15/terraform_0.6.15_linux_amd64.zip
-O /tmp/terraform.zip
- sudo unzip -d /usr/local/bin/ /tmp/terraform.zip
script: make test
2 changes: 1 addition & 1 deletion scripts/testPlan
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ OUTPUT=$(terraform get -update)
CLEANUP "$?" "$desc" "Unable to fetch the modules we depend on"

desc="Does the plan compile?"
OUTPUT=$(terraform plan -var-file terraform.tfvars.example)
OUTPUT=$(TF_VAR_aws_access_key=${TRAVIS_aws_access_key} TF_VAR_aws_secret_key=${TRAVIS_aws_secret_key} terraform plan -var-file terraform.tfvars.example)
CLEANUP "$?" "$desc" "$OUTPUT"

desc="Did the baseline terraform plan change?"
Expand Down
4 changes: 2 additions & 2 deletions terraform.tfvars.example
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
aws_access_key = "${AWS_ACCESS_KEY_ID}"
aws_secret_key = "${AWS_SECRET_ACCESS_KEY}"
aws_access_key = "XXXXXXXXXXXXXXXXXXXX"
aws_secret_key = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
aws_key_path = "~/.ssh/bosh.pem"
aws_key_name = "bosh"
aws_region = "us-east-1"
Expand Down

0 comments on commit 1dd3cb8

Please sign in to comment.