Skip to content

Instantly share code, notes, and snippets.

@kiasaki
Created December 22, 2014 19:07
Show Gist options
  • Save kiasaki/1691c5504c9b8cde6dac to your computer and use it in GitHub Desktop.
Save kiasaki/1691c5504c9b8cde6dac to your computer and use it in GitHub Desktop.
Terraform Makefile
.PHONY: all setup pull push plan apply destroy
all: plan apply
setup:
terraform remote -backend=HTTP -address=$(TERRAFORM_BACKEND_ADDRESS)/merd.tfstate
pull:
terraform pull
push:
terraform push
plan:
terraform plan -out terraform.tfplan
apply:
terraform apply terraform.tfplan
destroy:
terraform plan -destroy -out terraform.tfplan
terraform apply terraform.tfplan
@miguelaferreira
Copy link

Great gist! Simple but complete.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment