Coder Social home page Coder Social logo

btisdall / cfn-create-or-update Goto Github PK

View Code? Open in Web Editor NEW

This project forked from widdix/cfn-create-or-update

0.0 1.0 0.0 15 KB

Create or update CloudFormation stack also if no updates are to be performed.

License: MIT License

Makefile 2.19% JavaScript 97.81%

cfn-create-or-update's Introduction

Build Status NPM version NPM dependencies

cfn-create-or-update

When integrating CloudFormation into your CI/CD pipeline you are faced with the challenge of creating a CloudFormation stack on the first run of the pipeline, while you need to update the stack for all following pipeline runs. If you use the AWS CLI this is painful. You may also have your code and template in the same repository. Therefore code changes without the template. But the AWS CLI threats an update without changes to a stack as an error which is not the behavior that you need in your pipeline.

cfn-create-or-update can create or update a CloudFormation stack. If no updates are to be performed, no error is thrown. cfn-create-or-update behaves exactly as the AWS CLI regarding input values, output will be different.

Installation

To install the CLI tool cfn-create-or-update, run:

npm install -g cfn-create-or-update

TO create or update a stack, run:

cfn-create-or-update --stack-name test --template-body file://template.yml

The first time you run this command, a stack will be created. The second time an update will be performed but only if the template has changes.

CLI parameters

cfn-create-or-update behaves exactly as the AWS CLI regarding input values. Supported parameters (as documented in the AWS CLI create-stack or update-stack):

cfn-create-or-update
--stack-name
--template-body
--template-url
--parameters
--capabilities 
--resource-types
--role-arn
--stack-policy-body
--stack-policy-url
--notification-arns
--tags

Global parameters (as documented in the AWS CLI

--profile
--region

Only used during create, otherwise ignored (as documented in the AWS CLI create-stack):

--disable-rollback | --no-disable-rollback
--timeout-in-minutes
--on-failure

Only used during update, otherwise ignored (as documented in the AWS CLI update-stack):

--use-previous-template | --no-use-previous-template]
--stack-policy-during-update-body
--stack-policy-during-update-url

Additional parameters

--wait

Contribution

If you want to create a Pull-Request please make sure that make test runs without failures.

Code Style

make jshint

Unit Tests

make mocha

Circular depdendencies

make circular

Test coverage

make coverage
open coverage/lcov-report/index.html

cfn-create-or-update's People

Contributors

michaelwittig avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.