What problem does it solve?
gomplate enables automated, data-driven rendering of templates by aggregating data from multiple sources (JSON, YAML, Vault, Consul, HTTP, environment variables) without requiring bespoke parsers or glue code.
Core Features & Use Cases
- Data-driven templating: Combine multiple datasources and templates to generate configuration files, deployment manifests, and scripts.
- Context and lazy loading: Use -c for immediate context or -d for lazy-loaded datasources, enabling efficient data access and conditional rendering.
- Templates and plugins: Reuse templates with nested templates and extend functionality via external plugins and custom functions.
- Use Case: Generate a single application config by merging local JSON/YAML data with Vault credentials and environment variables.
Quick Start
Create a simple template and render it with a local data file, for example: gomplate -d cfg=./config.json -f template.tmpl -o output.txt
Then render a second template referencing data from a Vault secret and environment variable to demonstrate dynamic data integration.