Read-only mirror of https://github.com/swisscom/aws-generate-secrets — Swisscom. Issues & pull requests at the source.
  • Go 97.3%
  • Makefile 2.7%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Denys Vitali 4ab8111542
feat: add lowercase support
This commit also changes the way we run tests, by excluding E2E tests by default.
2023-03-02 16:13:48 +01:00
.github/workflows ci: add GitHub workflows 2023-02-24 15:15:03 +01:00
docs initial commit 2023-02-24 15:11:28 +01:00
pkg feat: add lowercase support 2023-03-02 16:13:48 +01:00
resources/examples feat: add lowercase support 2023-03-02 16:13:48 +01:00
.gitignore initial commit 2023-02-24 15:11:28 +01:00
go.mod initial commit 2023-02-24 15:11:28 +01:00
go.sum initial commit 2023-02-24 15:11:28 +01:00
LICENSE initial commit 2023-02-24 15:11:28 +01:00
main.go feat: get rid of cmd folder 2023-02-24 15:19:39 +01:00
Makefile feat: get rid of cmd folder 2023-02-24 15:19:39 +01:00
README.md feat: get rid of cmd folder 2023-02-24 15:19:39 +01:00

aws-generate-secrets

A small CLI to automatically generate secrets in your AWS environment.

Disclaimer

This tool is not developed, nor supported by Amazon Web Services, Inc (AWS).

Description

This tool allows you to provision generated secrets to AWS Secrets Manager using a configuration YAML like the following:

secrets:
  - name: my-app/aurora-postgres-secret
    generator:
      username:
        length: 8
        charset: standard
      password:
        length: 18
        charset: special

profile: my-profile

This will result in a secure secret in AWS Secrets Manager as follows:

Building

Only follow these steps if you intend to make changes to the code after you've cloned this repo, otherwise skip to the "Install" section below.

Requirements

  • Go 1.19+

Compile

make build

Run

Install

You can directly install the CLI by running:

go install github.com/swisscom/aws-generate-secrets@latest

Running

export AWS_PROFILE=my-test-environment
aws-generate-secrets ./resources/examples/postgres.yaml

Results in:

INFO[0000] Secret created: my-app/aurora-postgres-secret (arn:aws:secretsmanager:eu-central-1:000000000000:secret:my-app/aurora-postgres-secret-kGS7iI) 

Or, in AWS:

AWS Secrets Manager view