-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
25 lines (19 loc) · 665 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
#!/usr/bin/env make
# vim: tabstop=8 noexpandtab
# Grab some ENV stuff
newClusterName ?= $(shell $(newClusterName))
planFile ?= $(shell $(planFile))
# Start Terraforming
tf-init:
terraform init -get=true
plan: tf-init
terraform plan -no-color \
-out=$(planFile) 2>&1 | tee /tmp/tf-$(newClusterName)-plan.out
apply: tf-init
terraform apply --auto-approve -no-color \
-input=false "$(planFile)" 2>&1 | tee /tmp/tf-$(newClusterName)-apply.out
clean: ## Destroy existing resources, current build, and all generated files
terraform destroy --force -auto-approve 2>&1 | \
tee /tmp/tf-$(newClusterName)-destroy.out
rm -f "$(planFile)"
rm -rf .terraform