18 lines
373 B
Text
18 lines
373 B
Text
|
#!/usr/bin/bash
|
||
|
|
||
|
# Destroys resources for the given project.
|
||
|
#
|
||
|
# The project name is expected to be passed as an environment variable,
|
||
|
# i.e. PROJECT=app . script/destroy
|
||
|
|
||
|
(
|
||
|
source $(dirname $0)/../.config
|
||
|
|
||
|
PROJECT_ROOT=$(realpath $BOOTSTRAP_ROOT/infrastructure/$PROJECT)
|
||
|
|
||
|
cd $PROJECT_ROOT
|
||
|
|
||
|
terraform init
|
||
|
terraform destroy --var-file $VARIABLES_PATH
|
||
|
)
|