diff options
| author | Alex Schofield <git@ajschof.me> | 2024-08-19 20:22:16 +0100 |
|---|---|---|
| committer | Alex Schofield <git@ajschof.me> | 2024-08-19 20:22:16 +0100 |
| commit | 22e7de562e62495e547eeff187d86bf9524ae5ca (patch) | |
| tree | fb91932ba6617273240e59b2d086c0c0a5adee02 /scripts | |
| parent | 95c4fe80aea75a9a63b1cfd85abadaab6b96b876 (diff) | |
| download | de-project-bentley-22e7de562e62495e547eeff187d86bf9524ae5ca.tar.gz de-project-bentley-22e7de562e62495e547eeff187d86bf9524ae5ca.zip | |
feat: create shell script for terraform destroy/apply
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/deploy.sh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/scripts/deploy.sh b/scripts/deploy.sh new file mode 100755 index 0000000..0446184 --- /dev/null +++ b/scripts/deploy.sh @@ -0,0 +1,15 @@ +# Deploy Script +# Description: Deploy and destroy Terraform +# WARNING: This will most likely destroy any current infrastructure if protections +# are not in place. Be careful! + +echo "WARNING: This script will destroy any infrastructure for testing." +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 +done |
