TERRAFORM_VERSION = 0.12.16
DOCKER_TF_FMT = docker run --rm -v $(PWD):$(PWD):delegated -w $(PWD)/terraform --entrypoint '' hashicorp/terraform:$(TERRAFORM_VERSION)

terraform-fmt-check:
	$(DOCKER_TF_FMT) terraform fmt -write=false -list=true -check=true

terraform-fmt:
	$(DOCKER_TF_FMT) terraform fmt

.PHONY: terraform-fmt-check terraform-fmt
