diff options
| author | Alex Schofield <git@ajschof.me> | 2024-08-19 20:51:30 +0100 |
|---|---|---|
| committer | Alex Schofield <git@ajschof.me> | 2024-08-19 20:51:30 +0100 |
| commit | 68be61c22703d56a10e654702d15407231385b65 (patch) | |
| tree | b1982a67912f83584e83fa818b6d51fc3214c2fb /scripts/deploy.sh | |
| parent | 18f7ea0e4254890cd810ff2ee257306d94467faf (diff) | |
| download | de-project-bentley-68be61c22703d56a10e654702d15407231385b65.tar.gz de-project-bentley-68be61c22703d56a10e654702d15407231385b65.zip | |
feat: ask user if they want to destroy new infrastructure
Diffstat (limited to 'scripts/deploy.sh')
| -rwxr-xr-x | scripts/deploy.sh | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/scripts/deploy.sh b/scripts/deploy.sh index d7d18ff..e56088e 100755 --- a/scripts/deploy.sh +++ b/scripts/deploy.sh @@ -28,7 +28,21 @@ select yn in "Yes" "No"; do esac done - terraform apply -auto-approve + terraform apply + + echo "Would you like to destroy the newly-created infrastructure?" + select destroy_2 in "Yes" "No"; do + case $destroy_2 in + Yes) + terraform destroy + break + ;; + No) + echo "Skipping final destroy... Infrastructure will remain." + break + ;; + esac + done break ;; |
