diff --git a/.env b/.env index 828d055..fe4f4a2 100644 --- a/.env +++ b/.env @@ -1,13 +1,13 @@ -TERRAFORM_VERSION=1.1.8 -TF_PLUGIN_CACHE_DIR?=~/.terraform.d/plugin-cache/ + TERRAFORM_VERSION=1.6.1 +TF_PLUGIN_CACHE_DIR?=${HOME}/.terraform.d/plugin-cache/ AWS_DEFAULT_REGION?=ap-southeast-2 ifneq (, $(shell which terraform)) TERRAFORM=TF_PLUGIN_CACHE_DIR=$(TF_PLUGIN_CACHE_DIR) terraform else TERRAFORM=docker run --rm -v "${PWD}:/work" -v "$(TF_PLUGIN_CACHE_DIR):/plugin-cache" \ - -e AWS_DEFAULT_REGION=$(AWS_DEFAULT_REGION) -e http_proxy=$(http_proxy) -e TF_PLUGIN_CACHE_DIR=/plugin-cache \ - --net=host -w /work hashicorp/terraform:$(TERRAFORM_VERSION) + -e AWS_DEFAULT_REGION=$(AWS_DEFAULT_REGION) -e http_proxy=$(http_proxy) \ + --net=host figurate/terraform:$(TERRAFORM_VERSION) endif TERRAFORM_DOCS=docker run --rm -v "${PWD}:/work" tmknom/terraform-docs diff --git a/Makefile b/Makefile index 1d7faad..5ba5031 100644 --- a/Makefile +++ b/Makefile @@ -12,9 +12,7 @@ clean: rm -rf .terraform/ validate: - $(TERRAFORM) init -upgrade && $(TERRAFORM) validate && \ - $(TERRAFORM) -chdir=modules/terraform-lock init -upgrade && $(TERRAFORM) -chdir=modules/terraform-lock validate && \ - $(TERRAFORM) -chdir=modules/single-table init -upgrade && $(TERRAFORM) -chdir=modules/single-table validate + $(TERRAFORM) init && $(TERRAFORM) validate test: validate $(CHECKOV) -d /work @@ -29,12 +27,10 @@ docs: diagram $(TERRAFORM_DOCS) markdown ./modules/single-table >./modules/single-table/README.md format: - $(TERRAFORM) fmt -list=true ./ && \ - $(TERRAFORM) fmt -list=true ./modules/terraform-lock && \ - $(TERRAFORM) fmt -list=true ./modules/single-table + $(TERRAFORM) fmt -list=true -recursive example: - $(TERRAFORM) -chdir=examples/$(EXAMPLE) init -upgrade && $(TERRAFORM) -chdir=examples/$(EXAMPLE) plan -input=false + $(TERRAFORM) -chdir=examples/$(EXAMPLE) init && $(TERRAFORM) -chdir=examples/$(EXAMPLE) plan -input=false release: test git tag $(VERSION) && git push --tags