supsup / cfm-reslib

CloudFormation Resource Library: a collection of useful custom resources that are missing from CloudFormation

Home Page:https://cfm-reslib.readthedocs.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build Status

cfm-reslib

CloudFormation Resource Library: a collection of useful custom resources that are missing from CloudFormation.

Available Resources

Open issues to ask for more resources or pull requests with implementation.

Instructions

cfm-reslib is delivered as a single CloudFormation template that exports a single output called cfm-reslib. To use it you must first install it in the account and region where it will be used.

Install

aws cloudformation create-stack --stack-name cfm-reslib --template-url https://s3.amazonaws.com/cfm-reslib/cfm-reslib-latest.template --capabilities CAPABILITY_IAM

Update

aws cloudformation update-stack --stack-name cfm-reslib --template-url https://s3.amazonaws.com/cfm-reslib/cfm-reslib-latest.template --capabilities CAPABILITY_IAM

Usage

Once installed cfm-reslib can be used by defining a custom resource with ServiceToken set to the exported value.

YAML

Resources:
  TranscoderPipeline:
    Type: Custom::ElasticTranscoderPipeline
    Properties:
      ServiceToken: !ImportValue cfm-reslib
      Name: test
      InputBucket: input-bucket
      OutputBucket: output-bucket
      Role: arn:aws:iam::xxxxx:role/foobar
  Certificate:
    Type: Custom::Route53Certificate
    Properties:
      ServiceToken: !ImportValue cfm-reslib
      DomainName: foobar.acme.com
      SubjectAlternativeNames:
        - foobar2.acme.com
        - foobar3.acme.com

JSON

{
  "Resources": {
    "TranscoderPipeline": {
      "Type": "Custom::ElasticTranscoderPipeline",
      "Properties": {
        "ServiceToken": {"Fn::ImportValue": "cfm-reslib"},
        "Name": "test",
        "InputBucket": "input-bucket",
        "OutputBucket": "output-bucket",
        "Role": "arn:aws:iam::xxxxx:role/foobar"
      }
    },
    "Certificate: {
      "Type": "Custom::ElasticTranscoderPipeline",
      "Properties": {
        "ServiceToken": {"Fn::ImportValue": "cfm-reslib"},
        "DomainName": "foobar.acme.com",
        "SubjectAlternativeNames": [
          "foobar2.acme.com",
          "foobar3.acme.com"
        ]
      }
    }
  }
}

About

CloudFormation Resource Library: a collection of useful custom resources that are missing from CloudFormation

https://cfm-reslib.readthedocs.io/

License:MIT License


Languages

Language:Python 100.0%