-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
61 lines (48 loc) · 1.3 KB
/
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
SHELL := bash
.ONESHELL:
.SHELLFLAGS := -eu -o pipefail -c
.DELETE_ON_ERROR:
MAKEFLAGS += --warn-undefined-variables
MAKEFLAGS += --no-builtin-rules
.DEFAULT_GOAL := help
ifeq ($(origin .RECIPEPREFIX), undefined)
$(error This Make does not support .RECIPEPREFIX. Please use GNU Make 3.82 or later)
endif
.RECIPEPREFIX = >
init: ## runs terraform init
> terraform init
.PHONY: init
plan: ## runs terraform plan
> terraform plan
.PHONY: plan
apply: ## runs terraform apply
> terraform apply -auto-approve
.PHONY: apply
validate: ## runs terraform validate
> terraform validate
.PHONY: validate
format: ## runs terraform fmt
> terraform fmt -diff=true
.PHONY: format
destroy: ## runs terraform destroy
> terraform destroy
.PHONY: destroy
clean: ## cleans up any terraform temporary files
> rm -rf .terraform
> rm -rf terraform.tfstate*
> rm -f terra.plan
.PHONY: clean
scan: ## runs docker compose up
> docker compose up
.PHONY: scan
tflint: ## runs docker:wata727/tflint
> docker compose run tflint
.PHONY: tflint
tfsec: ## runs docker:liamg/tfsec
> docker compose run tfsec
.PHONY: tfsec
tfscan: ## runs docker:accurics/terrascan
> docker compose run tfscan
.PHONY: tfscan
help:
> @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'