- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMAKEFILE
More file actions
Latest commit
22 lines (15 loc) · 462 Bytes
/
Copy pathMAKEFILE
File metadata and controls
22 lines (15 loc) · 462 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# Makefile for Terraform deployment
TF_DIR=terraform
ENV_DIR=environments
# Usage: make apply ENV=prod
ENV ?= 20250428
TFVARS_FILE=$(ENV_DIR)/$(ENV).tfvars
init:
cd $(TF_DIR) && terraform init
plan:
cd $(TF_DIR) && terraform plan -var-file=$(abspath $(TFVARS_FILE))
apply:
cd $(TF_DIR) && terraform apply -var-file=$(abspath $(TFVARS_FILE))
destroy:
cd $(TF_DIR) && terraform destroy -var-file=$(abspath $(TFVARS_FILE))
.PHONY: init plan apply destroy