Adding terraform destroy to makefile.
This commit is contained in:
5
Makefile
5
Makefile
@@ -2,7 +2,7 @@ TERRAFORM_ENV=production
|
||||
|
||||
# .dirstamp plus && $@ is like make magic to get this rule
|
||||
# to only run if the contents of all-apps changes
|
||||
app/.dirstamp: all-apps/app.service all-apps/docker-compose.yaml $(wildcard all-apps/lb/*) $(wildcard all-apps/Nextcloud/*) $(wildcard all-apps/wg-easy/*)
|
||||
app/.dirstamp: all-apps/app.service all-apps/docker-compose.yaml $(wildcard all-apps/lb/*) $(wildcard all-apps/nextcloud/*) $(wildcard all-apps/wg-easy/*)
|
||||
rm -Rf app/
|
||||
cp -a all-apps app && touch $@
|
||||
|
||||
@@ -21,6 +21,9 @@ plan: ignition.json $(TERRAFORM_ENV).tfvars generated.tfvars
|
||||
apply: ignition.json $(TERRAFORM_ENV).tfvars generated.tfvars
|
||||
bash -c "terraform apply -var-file=<(cat $(TERRAFORM_ENV).tfvars generated.tfvars)"
|
||||
|
||||
destroy: ignition.json $(TERRAFORM_ENV).tfvars generated.tfvars
|
||||
bash -c "terraform destroy -var-file=<(cat $(TERRAFORM_ENV).tfvars generated.tfvars)"
|
||||
|
||||
## to help me remember the command to run to test the config locally
|
||||
testlocalhost:
|
||||
curl -k --resolve localhost:443:146.190.12.129 https://localhost
|
||||
|
||||
Reference in New Issue
Block a user