Skip to content

Instantly share code, notes, and snippets.

@wojciechpuchta
Created September 26, 2019 14:54
Show Gist options
  • Save wojciechpuchta/a5c5777e7abca40b4980e652788bcc5b to your computer and use it in GitHub Desktop.
Save wojciechpuchta/a5c5777e7abca40b4980e652788bcc5b to your computer and use it in GitHub Desktop.
Makefile for hicrondss/terraform-azure-cli
IMAGE=hicrondss/terraform-azure-cli
TAG=tf-v0.12.8
DOCKER_RUN=docker run -v "$(shell pwd):/workdir" -w /workdir -it $(IMAGE):$(TAG)
OUT_FILE=/tmp/plan.terraform
cli:
$(DOCKER_RUN)
apply-greedy:
$(DOCKER_RUN) terraform apply
apply:
$(DOCKER_RUN) terraform apply "$(OUT_FILE)"
plan:
$(DOCKER_RUN) terraform plan -out $(OUT_FILE)
validate:
$(DOCKER_RUN) terraform validate
init-no-backend:
$(DOCKER_RUN) terraform init -backend=false
clear-terraform-temp:
@-rm -rf .terraform
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment