mirror of
https://github.com/bunkerity/bunkerized-nginx
synced 2023-12-13 21:30:18 +01:00
19 lines
276 B
Bash
Executable file
19 lines
276 B
Bash
Executable file
#!/bin/bash
|
|
|
|
# drop and export secrets
|
|
echo "${CICD_SECRETS}" > /opt/.env
|
|
chmod +x /opt/.env
|
|
. /opt/.env
|
|
|
|
# go to terraform env
|
|
cd "/tmp/$1"
|
|
if [ $? -ne 0 ] ; then
|
|
echo "terraform env is absent"
|
|
exit 1
|
|
fi
|
|
|
|
# terraform destroy
|
|
terraform destroy -auto-approve
|
|
|
|
# done
|
|
exit $?
|