1.0.1 • Published 4 years ago

cfbuddy v1.0.1

Weekly downloads
-
License
ISC
Repository
github
Last release
4 years ago

cfbuddy - describe and deploy cloudformatnion with more flexibility

  • Better control for conditional resources
  • Dependency management
  • Template transformations
  • No more !If inside a template

Install

npm install -g cfbuddy

cfbuddy needs cfbuddy.config.js - a descriptor to find and transform the template

Basic Example

You have a template my-template.yaml that needs parameter "Env" Create a cfbuddy.config.js

module.exports = (params) => ({
  template: 'my-template.yaml'
  stackName: `my-stack-${params.Env}`
})

$> cfbuddy deploy Env=dev

Apply template transformations

const { resourceTransform } = require('cfbuddy/plugins')
module.exports = ({ Env, Bucket, Version }) => ({
  template: 'my-template.yaml'
  stackName: `my-stack-${Env}`,
  plugins: [
    resourceTransform({
      LambdaFunction({ Properties }) {
        Properties.Code = {
          S3Bucket: `${Bucket}-${Env}`,
          S3Key: Version
        }
      }
    })
  ]
})

$> cfbuddy deploy Env=dev Bucket=my-bucket Version=1.0

Dependency - deploy another stack before yours

plugins: [
  dependency('../path/to/another/cfbuddy.config.js', {
    ParamForDependency: 'value'
  })
]
1.0.1

4 years ago

1.0.0

4 years ago