Git Product home page Git Product logo

serverless-parameters's Introduction

Serverless Parameters

This plugin adds the possibility to add CloudFormation parameters to your Serverless applications. This is convenient if you want to just generate a CloudFormation template, and use it as a subtemplate for some other stack, or when you are deploying somethign manually or via a cloudformation deploy button.

Installation

Install the plugin through npm: npm install serverless-parameters. Add it your Serverless plugin list:

plugins:
  - serverless-parameters

Usage

After installation, you can now add parameters to the custom key:

custom:
  parameters:
    EnableFeatureX:
      Type: String
      AllowedValues: yes,no
      Default: yes
      Description: Enable feature X
    VPCId:
      Type: AWS::EC2::VPC::Id
      Description: Select the VPC you want to use
    SomeEnvVarPrefilled:
      Type: String
      Default: ${env:MY_ENV_VAR}
      Description: A default parameter, filled with a value from your env when deployed with `sls deploy`

All the properties are added to the template as-is, so you can use any of the CloudFormation parameter properties.

You can then add Ref's on the places where you want to use them, eg in your environment settings:

provider:
  name: aws
  environment:
    FEATURE_X:
      Ref: EnableFeatureX
    some_env_var:
      Ref: SomeEnvVarPrefilled

Todo

Add option for adding AWS::CloudFormation::Interface descriptions and such. PR's are welcome!

serverless-parameters's People

Contributors

svdgraaf avatar dependabot-preview[bot] avatar tmclaugh avatar hassankhan avatar

Stargazers

Kevin Old avatar Adrien Becchis avatar John Binkley avatar Mike Mosher avatar Valeriy Burlaka avatar Dave avatar  avatar Pieter Raubenheimer avatar Konrad Kiss avatar Nick Chisiu avatar Nick Chow avatar Koji Nakayama avatar  avatar Philipp Muens avatar

Watchers

 avatar James Cloos avatar

serverless-parameters's Issues

Minor improvements

Hi @svdgraaf, I had some improvements I'd like to see to the plugin, do these sound within the scope of the project?

  • Add Travis badge to README
  • Add Serverless badge to README
  • Add lint rules
  • Rewrite plugin in TypeScript(?)

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.