Skip to content

Fixes #207, supplying AWS_DEFAULT_REGION fixes v0.12 tf validate #208

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 9 commits into from
5 changes: 4 additions & 1 deletion modules/terraform/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,12 @@ terraform/get-modules:
@$(TERRAFORM) init -get -backend=false -input=false >/dev/null

## Basic terraform sanity check
## For v0.12.x, we supply a random region to AWS_DEFAULT_REGION so as to fix the
## "The argument "region" is required" error when validating independent modules.
## More info: https://github.com/hashicorp/terraform/issues/21408#issuecomment-495746582
terraform/validate:
ifeq ("12","$(word 2, $(subst ., ,$(TERRAFORM_VERSION)))")
@echo "Terraform 0.12 does not support validate without skipping variables"
@AWS_DEFAULT_REGION="us-west-2" $(TERRAFORM) validate
else
@$(TERRAFORM) validate -check-variables=false
endif
Expand Down