Skip to content

Commit

Permalink
[deploy] add Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
capcom6 committed Jul 4, 2024
1 parent dd47eca commit 160bfad
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions deployments/docker-swarm-terraform/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.tfplan
17 changes: 17 additions & 0 deletions deployments/docker-swarm-terraform/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
SHELL:=/bin/bash
TF_DIR=.
TF_PLAN=${TF_DIR}/terraform.tfplan

.PHONY: init plan apply destroy

init:
cd ${TF_DIR} && terraform init

plan:
cd ${TF_DIR} && terraform plan -var-file="secrets.tfvars" -out=${TF_PLAN}

apply:
cd ${TF_DIR} && terraform apply ${TF_PLAN}

destroy:
cd ${TF_DIR} && terraform destroy -var-file="secrets.tfvars"

0 comments on commit 160bfad

Please sign in to comment.