cfn_lookup_acm

package module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 20, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

package cfn_lookup_acm implementes an AWS Cloudformation Custom Resource Lambda

To use, add the following anywhere in the lambda application

import (
	_ "github.com/bmoffatt/cfn-lookup-acm.go" // import for side effect
)

Then, in the SAM template.yml, configure a custom resource

Acm:
  Type: Custom::Acm
  Properties:
    ServiceToken: !GetAtt LookupAcm.Arn
    DomainName: !Sub "${SubDomain}.${ApexDomain}"
LookupAcm:
  Type: AWS::Serverless::Function
  Metadata:
    BuildMethod: go1.x
  Properties:
  CodeUri: . # or wherever 🤷
  Environment:
    Variables:
      LOOKUP_ACM: yes # any value is fine
  Policies:
  - Statement:
    - Effect: Allow
      Action:
      - acm:ListCertificates
      Resource: "*"

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL