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

Commit

Permalink
Add TF_WARN_OUTPUT_ERRORS to shell out environment
Browse files Browse the repository at this point in the history
This variable is a workaround for
hashicorp/terraform#17655.
  • Loading branch information
ncs-alane committed Jun 12, 2018
1 parent 5a013db commit 7de0830
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/kitchen/terraform/shell_out.rb
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def self.run_shell_out(command:, options:)
::Mixlib::ShellOut
.new(
"terraform #{command}",
options.merge(environment: {"TF_IN_AUTOMATION" => "true"})
options.merge(environment: {"TF_IN_AUTOMATION" => "true", "TF_WARN_OUTPUT_ERRORS" => "1"})
)
.tap do |shell_out|
shell_out
Expand Down
2 changes: 1 addition & 1 deletion spec/lib/kitchen/terraform/shell_out_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
end

let :environment do
{"TF_IN_AUTOMATION" => "true"}
{"TF_IN_AUTOMATION" => "true", "TF_WARN_OUTPUT_ERRORS" => "1"}
end

let :logger do
Expand Down

0 comments on commit 7de0830

Please sign in to comment.