GithubHelp home page GithubHelp logo

carlnordenfelt / aws-cloudformation-simple-cli Goto Github PK

View Code? Open in Web Editor NEW
6.0 6.0 3.0 573 KB

Command line tool for installing, updating and deleting AWS projects created via Amazon CloudFormation

License: MIT License

JavaScript 100.00%

aws-cloudformation-simple-cli's People

Contributors

carlnordenfelt avatar mike-rsi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

aws-cloudformation-simple-cli's Issues

Option to load placeholder values from a file

I would love to have the ability to load placeholders from a file as opposed to having to pass them on the command line.

I find I like to use the same .config file for multiple environments (e.g. dev, prod) and just make minor tweaks to some values (e.g. prepending stack names and tag names with the environment name, or changing the first two octets of VPC and subnet CIDRs which are passed as parameters, etc.). When you have multiple environments with multiple placeholders, this gets cumbersome.

An alternative is writing an all new .config for each environment, but in complicated .config files this makes things much less DRY. I often have very flexible CFN templates which use a lot of parameters. Those parameters don't change much between environments of the same project, (but may change a lot between projects) so it'd be nice to use the same .config for each environment in a project, with an additional file (.placeholders?) to hold small differences between environments.

A couple examples of how this could be implemented: adding a placeholder-file option, or extending the existing placeholder option to be similar to how the AWS CLI --parameters flag works, where it can take a shorthand syntax or file://... as a value.

Deploying two different environments for the same project may look like:

dev.placeholders:

{
  "{Namespace}": "Dev",
  "{CidrPrefix}": "10.0"
}

prod.placeholders:

{
  "{Namespace}": "Prod",
  "{CidrPrefix}": "10.1"
}

Shell commands to create stacks DevVpc and ProdVpc:

$ aws-cfn create --config-file project.config --environment vpc --placeholder-file dev.placeholders
$ aws-cfn create --config-file project.config --environment vpc --placeholder-file prod.placeholders

If you think this is an idea that you'd like to incorporate into the main project, I could take a first crack at implementing it and make a PR.

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.