Created
August 26, 2019 13:50
-
-
Save javatarz/48795c981c5495d38184a4cf52a1cd2c 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 "apply with var file ~/terraform_variables/$WORKSPACE_NAME/$MODULE_NAME.tfvars" | |
terraform apply -var-file=~/terraform_variables/$WORKSPACE_NAME/$MODULE_NAME.tfvars -auto-approve |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment