forked from SRKRCC/iconcoderz
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
26 lines (20 loc) · 709 Bytes
/
Makefile
File metadata and controls
26 lines (20 loc) · 709 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
.PHONY: help deploy destroy plan init
.DEFAULT_GOAL := help
help:
@echo "Frontend Infrastructure Makefile"
@echo " make init - Initialize Terraform"
@echo " make plan - Plan Terraform changes"
@echo " make deploy - Apply Terraform changes"
@echo " make destroy - Destroy Terraform resources"
init:
cd terraform && terraform init
plan:
cd terraform && terraform plan -out=.tfplan
deploy:
@test -f terraform/.tfplan || (echo "Run 'make plan' first" && exit 1)
cd terraform && terraform apply .tfplan
destroy:
@echo "This will DESTROY frontend infrastructure!"
@read -p "Type 'yes' to continue: " confirm && \
[ "$$confirm" = "yes" ] && \
cd terraform && terraform destroy