Method: TFWrapper::RakeTasks#landscape_format
- Defined in:
- lib/tfwrapper/raketasks.rb
#landscape_format(output) ⇒ Object
Given a string of terraform plan output, format it with terraform_landscape and print the result to STDOUT.
351 352 353 354 355 356 357 358 359 360 |
# File 'lib/tfwrapper/raketasks.rb', line 351 def landscape_format(output) p = TerraformLandscape::Printer.new( TerraformLandscape::Output.new(STDOUT) ) p.process_string(output) rescue StandardError, ScriptError => ex STDERR.puts 'Exception calling terraform_landscape to reformat ' \ "output: #{ex.class.name}: #{ex}" puts output unless @landscape_progress == :stream end |