aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorAlex Schofield <git@ajschof.me>2024-08-19 20:49:28 +0100
committerAlex Schofield <git@ajschof.me>2024-08-19 20:49:28 +0100
commit18f7ea0e4254890cd810ff2ee257306d94467faf (patch)
treeb9645ec1734741e4cf2d410476f701782a655c2b /scripts
parent50302044c64e414ffe0435908146bc718bf6bed9 (diff)
downloadde-project-bentley-18f7ea0e4254890cd810ff2ee257306d94467faf.tar.gz
de-project-bentley-18f7ea0e4254890cd810ff2ee257306d94467faf.zip
refactor: Improve deploy script user interaction
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