aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/deploy.sh30
1 files changed, 26 insertions, 4 deletions
diff --git a/scripts/deploy.sh b/scripts/deploy.sh
index 16a9e13..d7d18ff 100755
--- a/scripts/deploy.sh
+++ b/scripts/deploy.sh
@@ -11,8 +11,30 @@ echo "It should not be used once a proper deployment has been setup."
echo "Would you like to continue?"
select yn in "Yes" "No"; do
- case $yn in
- Yes ) cd ../terraform/; terraform destroy -auto-approve; terraform apply -auto-approve; terraform destroy -auto-approve; break;;
- No ) exit;;
- esac
+ case $yn in
+ Yes)
+ cd ../terraform/
+ echo "Would you like to destroy the current infrastructure?"
+ select destroy_1 in "Yes" "No"; do
+ case $destroy_1 in
+ Yes)
+ terraform destroy
+ break
+ ;;
+ No)
+ echo "Skipping initial destroy..."
+ break
+ ;;
+ esac
+ done
+
+ terraform apply -auto-approve
+
+ break
+ ;;
+ No)
+ echo "Operation cancelled..."
+ exit
+ ;;
+ esac
done
git.ajschof.me — hosted by ajschofield — powered by cgit