Module: Pipedream::Dsl::Ssm

Included in:
Pipeline, Webhook
Defined in:
lib/pipedream/dsl/ssm.rb

Instance Method Summary collapse

Instance Method Details

#ssm(name) ⇒ Object

This method grabs the ssm parameter store value at “compile” time vs CloudFormation run time. In case we need it as part of the DSL compile phase.



7
8
9
10
11
12
13
14
15
16
# File 'lib/pipedream/dsl/ssm.rb', line 7

def ssm(name)
  resp = ssm_client.get_parameter(name: name)
  if resp.parameter.type == "SecureString"
    resp = ssm_client.get_parameter(name: name, with_decryption: true)
  end

  resp.parameter.value
rescue Aws::SSM::Errors::ParameterNotFound
  puts "WARN: #{name} found on AWS SSM.".color(:yellow)
end

#ssm_clientObject



18
19
20
# File 'lib/pipedream/dsl/ssm.rb', line 18

def ssm_client
  @ssm_client ||= Aws::SSM::Client.new
end