Created
August 26, 2019 13:50
-
-
Save javatarz/5ab158cd0aa7ba492872cff7061d8814 to your computer and use it in GitHub Desktop.
script to load variables from local file
This file contains 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
#!/bin/bash | |
set -e | |
cd $MODULE_NAME | |
echo "select or create new workspace $WORKSPACE_NAME" | |
terraform workspace select $WORKSPACE_NAME || terraform workspace new $WORKSPACE_NAME | |
echo "plan with var file ~/terraform_variables/$WORKSPACE_NAME/$MODULE_NAME.tfvars" | |
terraform plan -var-file=~/terraform_variables/$WORKSPACE_NAME/$MODULE_NAME.tfvars -out=$MODULE_NAME.tfplan -input=false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment