Skip to content
This repository has been archived by the owner on Oct 12, 2023. It is now read-only.

Commit

Permalink
Support Terraform v0.12 (#16)
Browse files Browse the repository at this point in the history
* add terraform init

* fix terraform validate
  • Loading branch information
yupwei68 authored Mar 19, 2020
1 parent 0eab717 commit 8122349
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion build/static_utils.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ def lint_tf
print "INFO: Linting Terraform configurations...\n".yellow

if ENV['TERRAFORM_VERSION'].start_with?("0.12")
message = `terraform validate >/dev/null`
success = system ("terraform init")
if not success
raise "ERROR: terraform init failed!\n".red
end
message = `terraform validate ./ >/dev/null`
elsif ENV['TERRAFORM_VERSION'].start_with?("0.11")
message = `terraform validate -check-variables=false 2>&1`
end
Expand Down

0 comments on commit 8122349

Please sign in to comment.