Crates.io | secret_inject |
lib.rs | secret_inject |
version | 0.1.1 |
source | src |
created_at | 2023-04-24 23:04:08.064299 |
updated_at | 2023-04-24 23:10:21.787335 |
description | Inject secrets into your environment |
homepage | https://github.com/napisani/secret_inject |
repository | https://github.com/napisani/secret_inject |
max_upload_size | |
id | 847997 |
size | 24,642 |
The start of an app that can be used to get secrets from an external secret manager and use them as exported environment variables.
As of right now, this only supports pulling secrets from doppler, using the doppler
CLI.
This solution is pretty insecure in its current state. Plus, the project itself is more of a playground for Rust development than anything else...
cargo build --release
sudo cp target/release/secret_inject /usr/local/bin/
ENV_VARS_SEC_CONFIG_SLUG=workstation_1
OUTPUT=$(secret_inject --project workspace_env_vars --env $ENV_VARS_SEC_CONFIG_SLUG)
RESULT=$?
if [ $RESULT -eq 0 ]; then
source "$OUTPUT"
else
echo "$OUTPUT" >> /dev/stderr
fi
# cut a release
cargo release 0.1.0