Skip to content

Commit

Permalink
Add terraform fmt to terraform_lint
Browse files Browse the repository at this point in the history
@dcarley has implemented new canonical formatting functionality, which has
been accepted to terraform (hashicorp/hcl#80). Use
the new command to check if any files need formatting.
  • Loading branch information
mtekel committed Nov 11, 2016
1 parent 70d671a commit dfee257
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ lint_terraform: dev
$(eval export TF_VAR_system_dns_zone_name=$SYSTEM_DNS_ZONE_NAME)
$(eval export TF_VAR_apps_dns_zone_name=$APPS_DNS_ZONE_NAME)
find terraform -mindepth 1 -maxdepth 1 -type d -not -path 'terraform/providers' -not -path 'terraform/scripts' -print0 | xargs -0 -n 1 -t terraform graph > /dev/null
@if [ "$$(terraform fmt -write=false terraform)" != "" ] ; then echo "Use 'terraform fmt' to fix HCL formatting:"; terraform fmt -write=false -diff=true terraform ; exit 1; fi

lint_shellcheck:
find . -name '*.sh' -not -path '*/vendor/*' | xargs $(SHELLCHECK)
Expand Down

0 comments on commit dfee257

Please sign in to comment.