prpl

package module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 7, 2021 License: MIT Imports: 8 Imported by: 0

README

status PkgGoDev

prpl

prpl = parameters pull tool

prpl is a tool running command with parameters that stored in AWS SSM Parameter 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:

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

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

Motivation

prpl is largely inspired by ssmwrap.

prpl have less options to take ease of use.

License

See LICENSE file.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Exporter

type Exporter struct {
	// contains filtered or unexported fields
}

func NewFromConfig

func NewFromConfig(cfg aws.Config) *Exporter

func (*Exporter) ExportParameters

func (e *Exporter) ExportParameters(ctx context.Context, paramPath string, environ *[]string) error

Directories

Path Synopsis
cmd
internal
cli
mocks
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL