A CLI that can get/set more than 10 SSM Parameters by path in a single command.
I wrote this project to solve the challenge of managing high number of SSM parameter values. I'll soon publish a blog post about the subject, meanwhile, you can check my unfor19/terraform-aws-ssm-parameters Terraform module. The Terraform module is used for creating/delete (schema) SSM Parameters, and this project, parzival, is used for managing the values of SSM Parameters.
- Download the binary file from the releases page, for example 0.0.3
- macOS - Intel chips
PARZIVAL_OS="darwin" && \ PARZIVAL_ARCH="amd64" && \ PARZIVAL_VERSION="0.0.3" && \ curl -sL -o parzival "https://github.com/unfor19/parzival/releases/download/${PARZIVAL_VERSION}/parzival_${PARZIVAL_VERSION}_${PARZIVAL_OS}_${PARZIVAL_ARCH}"
- macOS - M1 chips
PARZIVAL_OS="darwin" && \ PARZIVAL_ARCH="arm64" && \ PARZIVAL_VERSION="0.0.3" && \ curl -sL -o parzival "https://github.com/unfor19/parzival/releases/download/${PARZIVAL_VERSION}/parzival_${PARZIVAL_VERSION}_${PARZIVAL_OS}_${PARZIVAL_ARCH}"
- Linux - amd64
PARZIVAL_OS="linux" && \ PARZIVAL_ARCH="amd64" && \ PARZIVAL_VERSION="0.0.3" && \ curl -sL -o parzival "https://github.com/unfor19/parzival/releases/download/${PARZIVAL_VERSION}/parzival_${PARZIVAL_VERSION}_${PARZIVAL_OS}_${PARZIVAL_ARCH}"
- Windows WSL2 - 386
PARZIVAL_OS="linux" && \ PARZIVAL_ARCH="386" && \ PARZIVAL_VERSION="0.0.3" && \ curl -sL -o parzival "https://github.com/unfor19/parzival/releases/download/${PARZIVAL_VERSION}/parzival_${PARZIVAL_VERSION}_${PARZIVAL_OS}_${PARZIVAL_ARCH}"
- Set permissions to allow execution of
parzival
binary and move to/usr/local/bin
dirchmod +x parzival && \ sudo mv parzival "/usr/local/bin/parzival"
- Get SSM Parameters by path
parzival get --region "us-east-1" \ --output-file-path ".dev_parameters.json" \ --parameters-path "/myapp/dev/"
- Set SSM Parameters according to the output of
Get
parzival set --region "us-east-1" \ --input-file-path ".dev_parameters.json" \ --prefix-to-replace "/myapp/dev/" \ --parameters-path "/myapp/stg/"
Expand/Collapse
For local development, we'll use the following services
- localstack - A fully functional local cloud (AWS) stack
- Golang 1.16+
- Docker
- Docker Compose
- AWS CLI - As part of the test suite, AWS CLI invokes
ssm put-parameter ...
-
Place the source code at
$HOME/go/src/github.com/unfor19/parzival
-
Add the following to
${HOME}/.bash_profile
or${HOME}/.bashrc
export GOPATH=$HOME/go export GOROOT=/usr/local/opt/go/libexec export PATH=$PATH:$GOPATH/bin:$GOROOT/bin
make up-localstack && \
go run . get --localstack
make build
make test
Skip SSM Parameter creation by setting before running tests
export SKIP_PARAM_CREATION="true" && \
make test
Created and maintained by Meir Gabay
This project is licensed under the Apache License - see the LICENSE file for details