Sha256: 4d74b1eb4e6bd694a53c7b958866e329af401d126ee90bb56a434529efcd27aa

Contents?: true

Size: 727 Bytes

Versions: 15

Compression:

Stored size: 727 Bytes

Contents

module Ufo::TaskDefinition::Helpers
  module Acm
    include Ufo::Utils::CallLine
    include Ufo::Utils::Pretty

    # returns cert arn
    def acm_cert(domain)
      certs = acm_certs
      cert = certs.find do |c|
        c.domain_name == domain
      end
      if cert
        cert.certificate_arn
      else
        # Logger causes infinite loop when waf helper used in .ufo/
        logger.warn "WARN: ACM cert not found: #{domain}".color(:yellow)
        call_line = ufo_call_line
        DslEvaluator.print_code(call_line)
        nil
      end
    end

    # TODO: handle when there are lots of certs by paging
    def acm_certs
      resp = acm.list_certificates
      resp.certificate_summary_list
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
ufo-6.3.13 lib/ufo/task_definition/helpers/acm.rb
ufo-6.3.12 lib/ufo/task_definition/helpers/acm.rb
ufo-6.3.11 lib/ufo/task_definition/helpers/acm.rb
ufo-6.3.10 lib/ufo/task_definition/helpers/acm.rb
ufo-6.3.9 lib/ufo/task_definition/helpers/acm.rb
ufo-6.3.8 lib/ufo/task_definition/helpers/acm.rb
ufo-6.3.7 lib/ufo/task_definition/helpers/acm.rb
ufo-6.3.6 lib/ufo/task_definition/helpers/acm.rb
ufo-6.3.5 lib/ufo/task_definition/helpers/acm.rb
ufo-6.3.4 lib/ufo/task_definition/helpers/acm.rb
ufo-6.3.3 lib/ufo/task_definition/helpers/acm.rb
ufo-6.3.2 lib/ufo/task_definition/helpers/acm.rb
ufo-6.3.1 lib/ufo/task_definition/helpers/acm.rb
ufo-6.3.0 lib/ufo/task_definition/helpers/acm.rb
ufo-6.2.5 lib/ufo/task_definition/helpers/acm.rb