Sha256: 5b7c0c55d91dbc700a6c6d02a58f9fb9befc338dbfd17054b7e13e96e6417bfd
Contents?: true
Size: 649 Bytes
Versions: 12
Compression:
Stored size: 649 Bytes
Contents
require "aws-sdk-ssm" module Codebuild::Dsl::Project module Ssm # 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. 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 def ssm_client @ssm_client ||= Aws::SSM::Client.new end end end
Version data entries
12 entries across 12 versions & 1 rubygems