-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
31 lines (25 loc) · 817 Bytes
/
Makefile
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
26
27
28
29
30
31
# Source: http://clarkgrubb.com/makefile-style-guide
MAKEFLAGS += --warn-undefined-variables
.DEFAULT_GOAL := help
.PHONY: plan
plan: ## Generate a (speculative) Terraform plan
terraform -chdir=src plan
.PHONY: apply
apply: ## Generate, confirm and apply a Terraform plan
terraform -chdir=src apply
.PHONY: upgrade
upgrade: ## Upgrade Terraform providers
terraform -chdir=src init -upgrade
.PHONY: destroy
destroy: ## Destroy infrastructure managed by Terraform
terraform -chdir=src destroy
.PHONY: format
format: ## Format Terraform files
terraform -chdir=src fmt
terraform -chdir=src validate
# Source: https://www.client9.com/self-documenting-makefiles/
.PHONY: help
help: ## Show help message
@awk -F ':|##' '/^[^\t].+?:.*?##/ {\
printf "\033[36m%-40s\033[0m %s\n", $$1, $$NF \
}' $(MAKEFILE_LIST)