Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Open more actions menu

Repository files navigation

envars

Command-line Python application to manage environment variables and AWS KMS encrypted secrets in a single file.

Requirements

A KMS key should be created in your AWS account.

further reading at https://docs.aws.amazon.com/kms/latest/developerguide/create-keys.html

Install

$ pip install git+https://github.com/timeoutdigital/envars@1.1

I may publish to pypi at a later date but sadly the envars name is already taken.

Local Development

Clone

$ git clone git@github.com:timeoutdigital/envars.git
$ cd envars

Initialise

Install Timeout Tools

the run

timeout-tools python-setup

Test

$ invoke test

Run

$ python -m envars.envars

To list invoke options

invoke --list

Usage

To create an envars.yml file

$ envars init --app myapp --environments prod,staging --kms-key-arn <your-arn>

Add a variable default value

$ envars add MYVAR=myvalue

Add a environment specific variable

$ envars add --env prod MYVAR=myprodvalue

Add a secret

$ envars add --secret MYSECRET=ssssshh

To print the variables for a specific environment

$ envars print --decrypt --env prod

Loading a var from parameter store at runtime

MY_SPECIAL_VAR:
  default: parameter_store:/path/VAR

At runtime the value of MY_SPECIAL_VAR will be replaced with the value from parameter store

About

Manage application environment variables and AWS KMS secrets in a single file.

Resources

Stars

Watchers

Forks

Releases

Used by

Contributors

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.