From 22e7de562e62495e547eeff187d86bf9524ae5ca Mon Sep 17 00:00:00 2001 From: Alex Schofield Date: Mon, 19 Aug 2024 20:22:16 +0100 Subject: feat: create shell script for terraform destroy/apply --- scripts/deploy.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 scripts/deploy.sh (limited to 'scripts/deploy.sh') 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 -- cgit v1.2.3