module Codepipe::Dsl::Ssm

Public Instance Methods

ssm(name) click to toggle source

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.

# File lib/codepipe/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_client() click to toggle source
# File lib/codepipe/dsl/ssm.rb, line 18
def ssm_client
  @ssm_client ||= Aws::SSM::Client.new
end