All Projects → runwayml → awssecret2env

runwayml / awssecret2env

Licence: MIT License
Convert secrets stored in AWS Secrets Manager to environment variables

Programming Languages

go
31211 projects - #10 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to awssecret2env

kube-secrets-init
Kubernetes mutating webhook for `secrets-init` injection
Stars: ✭ 106 (+140.91%)
Mutual labels:  secrets-management, aws-secrets-manager
Kubernetes External Secrets
Integrate external secret management systems with Kubernetes
Stars: ✭ 2,412 (+5381.82%)
Mutual labels:  secrets-management, aws-secrets-manager
summon-aws-secrets
Summon provider for AWS Secrets Manager
Stars: ✭ 47 (+6.82%)
Mutual labels:  secrets-management, aws-secrets-manager
envy
Use envy to manage environment variables with your OS keychain
Stars: ✭ 23 (-47.73%)
Mutual labels:  environment-variables, secrets-management
sicher
Sicher is a go module that allows secure storage of encrypted credentials in a version control system.
Stars: ✭ 27 (-38.64%)
Mutual labels:  environment-variables, secrets-management
goodconf
Transparently load variables from environment or JSON/YAML file.
Stars: ✭ 80 (+81.82%)
Mutual labels:  environment-variables
ts-dotenv
Strongly-typed environment variables for Node.js
Stars: ✭ 18 (-59.09%)
Mutual labels:  environment-variables
arkenv
Type-safe Kotlin configuration by delegates
Stars: ✭ 15 (-65.91%)
Mutual labels:  environment-variables
privnote-cli
🔑 the power of privnote.com in your terminal
Stars: ✭ 43 (-2.27%)
Mutual labels:  secrets-management
secure-env
Env encryption tool that will help you prevent attacks from npm-malicious-packages.
Stars: ✭ 53 (+20.45%)
Mutual labels:  environment-variables
aws-export-profile
Export AWS profiles to your shell environment
Stars: ✭ 45 (+2.27%)
Mutual labels:  environment-variables
hyper-kube-config
H Y P E R K U B E - A Serverless API and kubectl plugin providing a storage and retrieval Kubernetes cluster credentials. Hyperkube leverages AWS Secrets Manager for storing credential information.
Stars: ✭ 27 (-38.64%)
Mutual labels:  aws-secrets-manager
envy
envy: Deserialize environment variables into type-safe structs
Stars: ✭ 64 (+45.45%)
Mutual labels:  environment-variables
flagga
An extensible Go library for handling program configuration using flags.
Stars: ✭ 28 (-36.36%)
Mutual labels:  environment-variables
argocd-vault-plugin
An Argo CD plugin to retrieve secrets from Secret Management tools and inject them into Kubernetes secrets
Stars: ✭ 404 (+818.18%)
Mutual labels:  aws-secrets-manager
node
💪 Simple & Secure Config Management for Node.js 💪
Stars: ✭ 32 (-27.27%)
Mutual labels:  secrets-management
aks-keyvault
Access Azure Key Vault secrets, keys and certs from AKS Pods using Secret Store CSI provider and Pod Identity.
Stars: ✭ 21 (-52.27%)
Mutual labels:  secrets-management
cypress-dotenv
Cypress plugin that enables compatability with dotenv
Stars: ✭ 47 (+6.82%)
Mutual labels:  environment-variables
gconfigs
gConfigs - Config and Secret parser
Stars: ✭ 42 (-4.55%)
Mutual labels:  environment-variables
cli
The official CLI for interacting with your Doppler secrets and configuration.
Stars: ✭ 96 (+118.18%)
Mutual labels:  secrets-management

awssecret2env

CirclCI Build Status

Convert secrets stored in AWS Secrets Manager to environment variables.

Example

Given a file like secrets.txt that maps environment variable names to secret names in AWS Secret Manager, awssecret2env replaces the secret names with their values stored in AWS, and prints the resulting env to stdout.

# secrets.txt
DB_HOST=db/dev/DB_HOST
DB_USER=db/dev/DB_USER
DB_PASSWORD=db/dev/DB_PASSWORD
# Usage: awssecret2env [OPTIONS] <input-file>
awssecret2env secrets.txt
# DB_HOST=<REDACTED>
# DB_USER=<REDACTED>
# DB_PASSWORD=<REDACTED>

With no options, awssecret2env prints the resulting environment variables to stdout. You can specify an output file with the --output flag, and optionally add an export statement to each line with --export.

awssecret2env --output .env --export secrets.txt

cat .env
# export DB_HOST=<REDACTED>
# export DB_USER=<REDACTED>
# export DB_PASSWORD=<REDACTED>

source .env
# The env vars should now be injected in your shell

Input File

Input files are in the following format:

# lines beginning with "#" are ignored as a comment
ENV_VAR_NAME=secret-name/secret-key
ENV_VAR_NAME_2=secret-name/secret-key-2
ENV_VAR_NAME_3=other-secret-name/other-key

The secret's key is always interpreted as the string following the last / character in the line.

NOTE: Secret names may contain / characters, but secret keys SHOULD NOT.

Download

Downloaded files must be made executable before they can be run.

You can also download and execute awssecret2env programmatically.

PLATFORM=macos # supported platforms: "macos", "macos-arm64", "windows", "linux64", "linuxarm6", or "linuxarm7"
VERSION=latest # supported versions: "latest", "master", "v0.1.0", etc.

wget https://awssecret2env.s3.amazonaws.com/${VERSION}/awssecret2env-${PLATFORM}
chmod +x awssecret2env-${PLATFORM}
mv awssecret2env-${PLATFORM} /usr/local/bin/awssecret2env

Usage

Usage: ./build/bin/awssecret2env [OPTIONS] <input-file> ...
Note: <input-file> is a required positional argument.
  -r, --aws-region string   The name of the AWS region where secrets are stored (default "us-east-1")
  -e, --export              Prepends "export" statements in front of the output env variables
  -h, --help                Show this screen
  -o, --output string       Redirects output to a file instead of stdout
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].