Last active
August 26, 2019 13:52
-
-
Save javatarz/52c755ca164de009f1e37bebfdac46ea to your computer and use it in GitHub Desktop.
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 "init default.tfstate" | |
terraform init -backend-config="key=default.tfstate" | |
echo "select or create new workspace $WORKSPACE_NAME" | |
terraform workspace select $WORKSPACE_NAME || terraform workspace new $WORKSPACE_NAME | |
echo "init $MODULE_NAME/terraform.tfstate" | |
terraform init -backend-config="key=$MODULE_NAME/terraform.tfstate" -force-copy -reconfigure |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment