diff options
author | EuAndreh <eu@euandre.org> | 2019-06-09 20:32:09 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2019-06-09 21:04:31 -0300 |
commit | c8963acd02a5095bafb46c79abd45eec45059707 (patch) | |
tree | 5b05b12cea1ec74e7f7685c743404310eb93be70 | |
parent | Quote $() call (ShellCheck offense) (diff) | |
download | toph-c8963acd02a5095bafb46c79abd45eec45059707.tar.gz toph-c8963acd02a5095bafb46c79abd45eec45059707.tar.xz |
Create Terraform plan before shutting down running containers
-rwxr-xr-x | scripts/ci/provision.sh | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/scripts/ci/provision.sh b/scripts/ci/provision.sh index b0e381c..9e5bfcc 100755 --- a/scripts/ci/provision.sh +++ b/scripts/ci/provision.sh @@ -8,6 +8,14 @@ cd ../../ VPS_COMMIT_SHA="$(git rev-parse HEAD)" export VPS_COMMIT_SHA +echo "Initializing Terraform..." +TF_PLUGINS_DIR='terraform.d/plugins/linux_amd64/' +mkdir -p "${TF_PLUGINS_DIR}" +ln -s "$(command -v terraform-provider-godaddy)" "${TF_PLUGINS_DIR}/terraform-provider-goddady" +terraform --version +terraform init +echo "Done." + setup_borg_files() { local -r template_file="${1}" local -r destination_name="${2}" @@ -27,14 +35,6 @@ setup_borg_files ./scripts/box/create-backup.env.sh create-backup.sh ssh "$TLD" /home/vps/create-backup.sh || echo "FAILED TO CREATE BACKUP." echo "Done." -echo "Initializing Terraform..." -TF_PLUGINS_DIR='terraform.d/plugins/linux_amd64/' -mkdir -p "${TF_PLUGINS_DIR}" -ln -s "$(command -v terraform-provider-godaddy)" "${TF_PLUGINS_DIR}/terraform-provider-goddady" -terraform --version -terraform init -echo "Done." - if [[ "${DESTROY_VOLUME:-}" != "" ]]; then echo "Destroying existing infrastructure..." terraform destroy -input=false -auto-approve |