Sha256: 5b942ceefe47aeb0da5f6cc230c4bd6a8c6259e4ca0cad21f7d1b751da8c8acc

Contents?: true

Size: 597 Bytes

Versions: 13

Compression:

Stored size: 597 Bytes

Contents

module Ufo::TaskDefinition::Helpers
  module StackOutput
    include Ufo::AwsServices
    include Ufo::Concerns::Names

    def stack_output(name)
      stack_name, output_key = name.split(".")
      stack_name = names.expansion(stack_name)
      resp = cloudformation.describe_stacks(stack_name: stack_name)
      stack = resp.stacks.first
      if stack
        o = stack.outputs.detect { |h| h.output_key == output_key }
      end

      if o
        o.output_value
      else
        logger.info "WARN: NOT FOUND: output #{key} for stack #{stack_name}"
        nil
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
ufo-6.1.2 lib/ufo/task_definition/helpers/stack_output.rb
ufo-6.1.1 lib/ufo/task_definition/helpers/stack_output.rb
ufo-6.1.0 lib/ufo/task_definition/helpers/stack_output.rb
ufo-6.0.9 lib/ufo/task_definition/helpers/stack_output.rb
ufo-6.0.8 lib/ufo/task_definition/helpers/stack_output.rb
ufo-6.0.7 lib/ufo/task_definition/helpers/stack_output.rb
ufo-6.0.6 lib/ufo/task_definition/helpers/stack_output.rb
ufo-6.0.5 lib/ufo/task_definition/helpers/stack_output.rb
ufo-6.0.4 lib/ufo/task_definition/helpers/stack_output.rb
ufo-6.0.3 lib/ufo/task_definition/helpers/stack_output.rb
ufo-6.0.2 lib/ufo/task_definition/helpers/stack_output.rb
ufo-6.0.1 lib/ufo/task_definition/helpers/stack_output.rb
ufo-6.0.0 lib/ufo/task_definition/helpers/stack_output.rb