Skip to main content

CLI for rendering configuration templates with SSM Parameter Store as a data source

Project description

SSM Parameter Store Template

Command line application to render templates with data from SSM Parameter Store

Installation

The ssm-ps-template application is available via the Python Package Index and can be installed with pip:

pip install ssm-ps-template

Templating

The application uses Jinja2 for the templating engine.

Configuration

The configuration file provides the ability to specify multiple templates, override AWS configuration, and change logging levels:

Top-Level Configuration Directives

Directive Description
templates An array of template directives as detailed in the next table.
profile Specify the AWS profile to use. If unspecified will default to the AWS_DEFAULT_PROFILE environment variable or is unspecified
region Specify the AWS region to use. If unspecified it will default to the AWS_DEFAULT_REGION environment variable or is unspecified
verbose Turn debug logging on. Possible values are true and false

Template Configuration Directives

The templates directive in the configuration is an array of objects, defined by a source and destination.

Directive Description
source The source file of the template
destination The destination path to write the rendered template to

Configuration File Format

The application supports JSON, TOML, or YAML for configuration. The following example is in YAML:

Example Configuration File

templates:
  - source: /etc/ssm-templates/nginx-example
    destination: /etc/nginx/sites-available/example
  - source: /etc/ssm-templates/postgres-example
    destination: /etc/postgresql/14/main/postgresql.conf
profile: default
region: us-east-1
verbose: false

Command Line Usage

usage: ssm-ps-template [-h] [--aws-profile AWS_PROFILE] [--aws-region AWS_REGION] [--verbose] config

Templating for SSM Parameter Store

positional arguments:
  config

optional arguments:
  -h, --help            show this help message and exit
  --aws-profile AWS_PROFILE
                        AWS Profile
  --aws-region AWS_REGION
                        AWS Region
  --verbose

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ssm-ps-template-1.0.0a0.tar.gz (8.7 kB view details)

Uploaded Source

Built Distribution

ssm_ps_template-1.0.0a0-py3-none-any.whl (8.1 kB view details)

Uploaded Python 3

File details

Details for the file ssm-ps-template-1.0.0a0.tar.gz.

File metadata

  • Download URL: ssm-ps-template-1.0.0a0.tar.gz
  • Upload date:
  • Size: 8.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for ssm-ps-template-1.0.0a0.tar.gz
Algorithm Hash digest
SHA256 99bf57936d16be9206310c62d889f6a3a9cba753c84ddb8e45c6e73ea71bb145
MD5 1437c6fe0255c4d6f1c72cc9a83f52aa
BLAKE2b-256 5b1794c3d41be50eeab03e553caa4a4717092e26d69c97054ae1405843f028d7

See more details on using hashes here.

File details

Details for the file ssm_ps_template-1.0.0a0-py3-none-any.whl.

File metadata

File hashes

Hashes for ssm_ps_template-1.0.0a0-py3-none-any.whl
Algorithm Hash digest
SHA256 e7e27e715b65a29cdfc497a5067e8811cc2a39c9a31e75e8a2f90677b83b171b
MD5 551992db2dbd3fac26b64f30f8cc3df3
BLAKE2b-256 b77209eea6e80aa07f5662405568a2b78cff7e453ee6fb9d2610fe382648a2da

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page