Skip to content

Commit

Permalink
docs: add README
Browse files Browse the repository at this point in the history
  • Loading branch information
aereal committed Sep 7, 2021
1 parent 6493d36 commit 2f8d3f6
Show file tree
Hide file tree
Showing 2 changed files with 79 additions and 0 deletions.
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2021 aereal

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
58 changes: 58 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
[![status][ci-status-badge]][ci-status]
[![PkgGoDev][pkg-go-dev-badge]][pkg-go-dev]

# prpl

prpl = parameters pull tool

prpl is a tool running command with parameters that stored in [AWS SSM Parameter Store][aws-ssm-param-store].

The parameters are exported as environment variables.

## Synopsis

If you have parameters such as:

- `/my-app/staging/creds/id`
- `/my-app/staging/creds/password`

then run command below and get a result:

```sh
prpl -path /my-app/staging env
# CREDS_ID=<ID>
# CREDS_PASSWORD=<PASSWORD>
```

Environment variable named in below rules:

- Remove `-path` value from full parameter path
- prpl considers `-path` as a prefix and parameters can be unique without common prefix
- environment variables names should not have environment name (such as `staging`) for convinience
- parameters typically have environment in prefix
- the app may refers environment variables such as `CREDS_ID` not `MY_APP_STAGING_CREDS_ID`
- Replace all characters except for alphabets or numbers with underscore (`_`)
- Convert characters to upper cases

## Installation

```sh
go install github.com/aereal/prpl/cmd/prpl
```

## Motivation

prpl is largely inspired by [ssmwrap][ssmwrap].

prpl have less options to take ease of use.

## License

See LICENSE file.

[pkg-go-dev]: https://pkg.go.dev/github.com/aereal/prpl
[pkg-go-dev-badge]: https://pkg.go.dev/badge/aereal/prpl
[ci-status-badge]: https://github.com/aereal/prpl/workflows/CI/badge.svg?branch=main
[ci-status]: https://github.com/aereal/prpl/actions/workflows/CI
[aws-ssm-param-store]: https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-parameter-store.html
[ssmwrap]: https://github.com/handlename/ssmwrap

0 comments on commit 2f8d3f6

Please sign in to comment.