Created
January 19, 2019 22:05
-
-
Save nilium/cc07b9c7991d5e5f2410cca81482a6fe to your computer and use it in GitHub Desktop.
Terraform makefiles (bmake, gmake)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TF_MODULES := $(shell find . -type f -iname '*.tf') | |
.PHONY: all plan apply | |
all: plan | |
plan: tf.plan | |
apply: tf.plan | |
terraform apply $< | |
tf.plan: ${TF_MODULES} | |
terraform plan -out $@ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TF_MODULES != find . -type f -iname '*.tf' | |
.PHONY: all plan apply | |
all: plan | |
plan: tf.plan | |
apply: tf.plan | |
terraform apply ${.ALLSRC} | |
tf.plan: ${TF_MODULES} | |
terraform plan -out ${.TARGET} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment