Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/locona/kmsenv
https://github.com/locona/kmsenv
Last synced: 10 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/locona/kmsenv
- Owner: locona
- Created: 2020-07-02T05:42:59.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-09-11T17:14:27.000Z (about 2 months ago)
- Last Synced: 2024-09-12T03:02:33.603Z (about 2 months ago)
- Language: Go
- Size: 179 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# KmsEnv
kmsenv is a command that reads the .env file and encrypts the environment with `Cloud Key Management Service`.
## Installation
```
go get github.com/locona/kmsenv/cli/kmsenv
```## Usage
Add your application configuration to your `.env` file in the root of your project:
```
S3_BUCKET=YOURS3BUCKET
SECRET_KEY=YOURSECRETKEYGOESHERE
```and `.kmsenvrc` file in the root of your project:
```
{
"project_id": "xxxxx",
"location": "global",
"keyring": "xxxxxxx",
"key": "xxx"
}
```And then run:
```
kmsenv
```As a result created the `kms-encrypt.json` file
```
{
"S3_BUCKET": "CiQA66hgkjw9CbdF1ZKGen3SQNwtFoLOR2paVg+jLFj3B+iDq98SNQDkjMn2WIrF0C8UNgVHAy/knG9DORLvZjaX6DO8ha039AYMGsrFDoizfEzX1em9LPp2CAQT",
"SECRET_KEY": "CiQA66hgkhwMu1/8cknFFt12XsXuTls+TWuo2/CojJS7YwEoAVESPgDkjMn29Y0UHIUkHQCypRD3Io1BC5ObnC3INKOX/hrUZ9O2ulPjNaRIZRs1w57LiIXPJku4qvUIegkfz33G"
}
```