Skip to content

Latest commit

 

History

History
61 lines (40 loc) · 1.88 KB

README.template.md

File metadata and controls

61 lines (40 loc) · 1.88 KB

${APP}

Docker Cloud Build Status

Injects AWS Secrets Manager secrets as environment variables - or just prints them, if no command is given. (If you need secrets as files instead, you can use aws-secretsmanager-files)

Get it

Using go get:

go get -u github.com/keilerkonzept/${APP}

Or download the binary from the releases page.

# Linux
curl -L https://github.com/keilerkonzept/${APP}/releases/download/${VERSION}/${APP}_${VERSION}_linux_x86_64.tar.gz | tar xz

# OS X
curl -L https://github.com/keilerkonzept/${APP}/releases/download/${VERSION}/${APP}_${VERSION}_osx_x86_64.tar.gz | tar xz

# Windows
curl -LO https://github.com/keilerkonzept/${APP}/releases/download/${VERSION}/${APP}_${VERSION}_windows_x86_64.zip
unzip ${APP}_${VERSION}_windows_x86_64.zip

Use it


${APP} [OPTIONS] [COMMAND [ARGS...]]

${USAGE}

Examples

$ aws-secretsmanager-env -secret-string MY_SECRET=arn:aws:secretsmanager:eu-west-1:28381901202:secret:example-secret-1
MY_SECRET={"hello":"world"}

$ aws-secretsmanager-env -secret-json-key MY_SECRET=arn:aws:secretsmanager:eu-west-1:28381901202:secret:example-secret-1#hello
MY_SECRET="world"

$ aws-secretsmanager-env -secret-json-key-string MY_SECRET=arn:aws:secretsmanager:eu-west-1:28381901202:secret:example-secret-1#hello
MY_SECRET=world

$ aws-secretsmanager-env -secret-json-key-string MY_SECRET=arn:aws:secretsmanager:eu-west-1:28381901202:secret:example-secret-1#hello sh -c 'echo the secret is "$MY_SECRET"'
the secret is "world"