Giter Club home page Giter Club logo

secretly's Introduction

Build Status Codacy Badge Go Report Card Codacy Badge

secretly

Add secrets from AWS Parameter Store to your environment. That's it.

asciicast

Inspired by chamber but losing the bells and whistles -- secretly only performs reads from the parameter store -- and a little less opinionated about namespacing and parameter store usage.

usage

secretly runs the command passed to it with the variables defined in the SECRETLY_NAMESPACE of AWS' Parameter Store.

If SECRETLY_NAMESPACE is undefined it behaves normally.

secretly [COMMAND...]
SECRETLY_NAMESPACE=MY_NAMESPACE secretly [COMMAND...]

For example, say you've stored the value mysecretpassword with the name /foor/bar/BAZ in the parameter store.

$ secretly env | grep BAZ
# nothing
$ export SECRETLY_NAMESPACE=foo/bar
$ secretly env | grep BAZ
BAZ=mysecretpassword

This is meant to have a very specific and lightweight purpose -- to be called from a Dockerfile. Add it to your Dockerfile, chmod +x it, and prefix your CMD or ENTRYPOINT with it -- CMD ["secretly", "run_myawesomeapp.sh"]. Check out the trivial example in example.Dockerfile.

Now:

$ docker build -f example.Dockerfile -t secretly-test .
$ docker run secretly-test | grep BAZ
# nada
$ docker run -e SECRETLY_NAMESPACE=foo/bar secretly-test | grep BAZ
# shit, auth error!
$ docker run -e SECRETLY_NAMESPACE=foo/bar -e AWS_REGION -e AWS_ACCESS_KEY_ID -e AWS_SECRET_ACCESS_KEY secretly-test | grep BAZ
BAZ=mysecretpassword

In ECS, provided you're using AWS IAM roles, the auth params won't be necessary.

building it

$ make test
$ make dist  # plops stuff in dist/
$ make clean  # cleans out dist

Any tagged commits will be built by travis and published with artifacts.

secretly's People

Contributors

jwilner avatar justinathena avatar

Watchers

James Cloos 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.