Class: Formatron::External::Outputs

Inherits:
Object
  • Object
show all
Defined in:
lib/formatron/external/outputs.rb

Overview

queries and merges CloudFormation outputs for external stacks

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(aws:, target:) ⇒ Outputs

Returns a new instance of Outputs.



9
10
11
12
13
# File 'lib/formatron/external/outputs.rb', line 9

def initialize(aws:, target:)
  @aws = aws
  @target = target
  @hash = {}
end

Instance Attribute Details

#hashObject (readonly)

Returns the value of attribute hash.



7
8
9
# File 'lib/formatron/external/outputs.rb', line 7

def hash
  @hash
end

Instance Method Details

#merge(bucket:, dependency:, configuration:) ⇒ Object



15
16
17
18
19
20
21
22
23
# File 'lib/formatron/external/outputs.rb', line 15

def merge(bucket:, dependency:, configuration:)
  @hash.merge! configuration
  @hash.merge! CloudFormation.outputs(
    aws: @aws,
    bucket: bucket,
    name: dependency,
    target: @target
  )
end