0.0
No commit activity in last 3 years
No release in over 3 years
Integrated CfnDsl CloudFormation template generation pipeline that integrates cfn_nag, AWS template validation, and AWS template costing (where possible), and generated `aws cloudformation deploy` compatible parameters files
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 2.0
>= 0
>= 0
>= 0
>= 0.49.0

Runtime

 Project Readme

cfndsl-pipeline

This ruby gem provides an integrated CfnDsl CloudFormation template generation pipeline that integrates resaource tagging standards, cfn_nag linting, AWS template syntax validation, and AWS template costing (where possible), and generates aws cloudformation deploy compatible parameter files.

Installation

This gem is published on rubygems.org: gem install cfndsl-pipeline

Bash Usage:

$ cfndsl_pipeline
Usage: cfndsl_pipeline -t input file -o output dir [ -b bucket | -p | -c ] [include1 include2 etc]
    -t, --template file              Input file
    -o, --output dir                 Output directory
    -b, --bucket                     Existing S3 bucket for cost estimation and large template syntax validation
        --disable-syntax             Enable syntax check
    -p, --params                     Create cloudformation deploy compatible params file
        --disable-nag                Enable cfn_nag 
        --syntax-report              Save template syntax report
        --audit-report               Save cfn_nag audit report
    -c, --estimate                   Generate URL for AWS simple cost calculator
    -h, --help                       show this message
    -v, --version                    show the version

Ruby Usage

require 'cfndsl-pipeline'

opts = CfnDslPipeline::Options.new
opts.validation_bucket=   'my-s3-bucket'
opts.validate_cfn_nag=    true
opts.validate_syntax=     true
opts.dump_deploy_params=  false
opts.estimate_cost=       false
opts.save_syntax_report=  false
opts.save_audit_report=   false

output_dir='cloudformation'
input_file='my-cfndsl-template.rb'
cfndsl_extras = [[:yaml, 'standard_tags.yaml']]

pipeline=CfnDslPipeline::Pipeline.new(output_dir, opts)
pipeline.build(input_file, cfndsl_extras)

Tag standards

These are implemented as a simple YAML file. CFNDSL has been extended to generate the appropriate template inputs for each tag key for you, as well as automatically tagging each and every resource that supports tags. All DSL properties of the parameters are supported, in addition to a logical name to use for the parameter key.

---
TagStandard:
  MyCostCode:
    Default: 'MC68EC020'
    Type: String
    AllowedPattern: 'MC[0-9]{2}[A-Z]{2}[0-9]{3}'
    LogicalName: CostCentre