Skip to content

Instantly share code, notes, and snippets.

@nilium nilium/GNUmakefile
Created Jan 19, 2019

Embed
What would you like to do?
Terraform makefiles (bmake, gmake)
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 $@
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
You can’t perform that action at this time.