Method: Formatron::CloudFormation.outputs

Defined in:
lib/formatron/cloud_formation.rb

.outputs(aws:, bucket:, name:, target:) ⇒ Object

rubocop:disable Metrics/MethodLength



35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# File 'lib/formatron/cloud_formation.rb', line 35

def self.outputs(aws:, bucket:, name:, target:)
  if S3::CloudFormationTemplate.exists?(
    aws: aws,
    bucket: bucket,
    name: name,
    target: target
  )
    stack_name = _stack_name name, target
    Formatron::LOG.info do
      "Query CloudFormation stack outputs: #{stack_name}"
    end
    aws.stack_outputs stack_name: stack_name
  else
    {}
  end
end