Help us shape the future of Go! Take the 2026 Go Developer Survey

polymerase

command module
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2017 License: MIT Imports: 9 Imported by: 0

README

polymerase

Polymerase is a tool for easy templating using environment variables and Vault values.

Polymerase takes a file containing Go-style template directives as an argument, populates the template directives with values based on environment variables and Vault, and outputs the result to stdout. Supported Vault auth backends include token and App ID.

Installation

go install github.com/dollarshaveclub/polymerase

Usage

Usage:
  polymerase [flags]

Examples:
polymerase <filename>

Flags:
  -a, --app-id string         Vault App-ID. Can use APP_ID environment variable instead.
  -u, --user-id-path string   Path to user id. Can use USER_ID_PATH environment variable instead.
  -v, --vault-addr string     Vault server address (including protocol and port). Can use VAULT_ADDR environment variable instead.
  -t, --vault-token string    Vault token. Can use VAULT_TOKEN environment variable instead.

Example

Given file.tmpl:

Hello, {{ .LOCATION }}! My name is {{ vault "secret_agents/007/first_name" }}.

Running:

VAULT_ADDR=https://vault.internal VAULT_TOKEN=1234kasd LOCATION=World polymerase file.tmpl

Produces:

Hello, World! My name is James.

Alternatively, input can be provided via stdin:

echo "{{ .TEST }}" | VAULT_ADDR=https://vault.internal VAULT_TOKEN=1234kasd LOCATION=World polymerase

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
pkg

Jump to

Keyboard shortcuts

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