-
Notifications
You must be signed in to change notification settings - Fork 12
/
Makefile
46 lines (36 loc) · 1015 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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# Makefile to kickoff terraform.
# ####################################################
#
## Before we start test that we have the mandatory executables available
EXECUTABLES = git terraform
K := $(foreach exec,$(EXECUTABLES),\
$(if $(shell which $(exec)),some string,$(error "No $(exec) in PATH, consider apt-get install $(exec)")))
.PHONY: build
first-run:
@echo "initialize remote state file"
cd layer && \
terraform init
init:
@echo "initialize remote state file"
cd layer && \
terraform init
validate: init
@echo "running terraform validate"
cd layer && \
terraform validate -no-color
plan: validate
@echo "running terraform plan"
cd layer && \
terraform plan -no-color
apply: plan
@echo "running terraform apply"
cd layer && \
terraform apply -auto-approve -no-color
plan-destroy: validate
@echo "running terraform plan -destroy"
cd layer && \
terraform plan -destroy -no-color
destroy: init
@echo "running terraform destroy"
cd layer && \
terraform destroy -force -no-color