parampiper

command module
v0.0.16-alpha Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2023 License: AGPL-3.0 Imports: 4 Imported by: 0

README

parampiper

parampiper is a tool for manage parameters across between systems/environments.

build Go Report Card codecov Github All Releases GitHub release (latest SemVer)

What parampiper brings

  • single source of truth (SSOT). All you parameters in one place.
  • works on a simple json file.
  • support several backends (local file, azure blob)

Installation

MacOS
brew install cdalar/tap/parampiper
Linux
curl -sLS https://parampiper.dalar.net/get.sh | sh 
sudo install parampiper /usr/local/bin/
Windows
  • download windows binary from releases page
  • unzip and copy parampiper.exe to a location in PATH

Usage

$ prm
a tool to manage parameters cross different environments

Usage:
  prm [command]

Available Commands:
  completion  Generate the autocompletion script for the specified shell
  get         Get Parameter Value by Name
  help        Help about any command
  import      Import Parameters
  init        create a .pp directory with the default configuration files
  ls          List Parameters
  out         Output Parameters
  rm          Delete Parameter
  set         Add/Update Parameter
  version     Print the version number of onctl

Flags:
  -c, --config string   Configuration file (default ".pp/parampiper.yaml")
  -h, --help            help for parampiper

Use "parampiper [command] --help" for more information about a command.
Initial Configuration

Create the default configuration under .pp/parampiper.yaml

$ parampiper init
parampiper environment initialized

Default configuration file is follows:

local_file:
  FilePath: parampiper.json
azure_blob:
  StorageAccountName: stparampiper
  ContainerName: abc
  BlobName: parampiper.json
Set which backend provider you like to use
  • local_file
  • azure_blob

Set Environment Variables PP_DATA to one of the above.

export PP_DATA=local_file

Adding/Updating Parameters

parampiper set -n key1 -v value1

will add key1 key with value value1.

Delete Parameters

parampiper rm -n key1

will delete the parameter named key1

List Parameters

parampiper ls 
NAME   TYPE    VALUE    ATTRIBUTES   INFO
key1   basic   value1   0

Output

Different ways to output parameters

Environment Variables
parampiper out -oexport > export.sh
cat export.sh
export KEY1="value1"
Exporting as Terraform tfvars file
parampiper out -otfvars > parameters.auto.tfvars

by exporting it as *auto.tfvars (tfvars files) you can directly use it inside your terraform code.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal
pkg

Jump to

Keyboard shortcuts

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