Sha256: 8c7a58645a5f6eff93912624370f8463eb8cc53708edf42a9c6f7529a8e45e68
Contents?: true
Size: 1.03 KB
Versions: 9
Compression:
Stored size: 1.03 KB
Contents
# frozen_string_literal: true require 'ruby_terraform' require_relative './base' require_relative './actions' module RSpec module Terraform module Helpers class Output < Base include Actions::Validate include Actions::Clean include Actions::Init include Actions::Output def execute(overrides = {}) parameters = resolve_parameters(overrides) validate(parameters) clean(parameters) init(parameters) output_value = output(parameters) parse(output_value) end private def mandatory_parameters { json: true } end def required_parameters(execution_mode) { in_place: %i[name configuration_directory], isolated: %i[name source_directory configuration_directory] }[execution_mode] || [] end def parse(output_value) JSON.parse(output_value, symbolize_names: true) end end end end end
Version data entries
9 entries across 9 versions & 1 rubygems