Class: Kitchen::Terraform::OutputsParser
- Inherits:
-
Object
- Object
- Kitchen::Terraform::OutputsParser
- Defined in:
- lib/kitchen/terraform/outputs_parser.rb
Overview
OutputsParser parses Terraform output variables as JSON.
Instance Method Summary collapse
-
#parse(json_outputs:) {|parsed_outputs| ... } ⇒ self
#parse parses the outputs.
Instance Method Details
#parse(json_outputs:) {|parsed_outputs| ... } ⇒ self
#parse parses the outputs.
30 31 32 33 34 35 36 |
# File 'lib/kitchen/terraform/outputs_parser.rb', line 30 def parse(json_outputs:) yield parsed_outputs: ::JSON.parse(json_outputs) self rescue ::JSON::ParserError raise ::Kitchen::TransientFailure, "Parsing the Terraform output variables as JSON failed." end |