hashicorp/consul-template

Template rendering, notifier, and supervisor for @HashiCorp Consul and Vault data.

View on GitHub ↗Jump to charts ↓

Summary Information

Updated 14 minutes ago
Added to GitGenius on April 8th, 2021
Created on October 7th, 2014
Open Issues & Pull Requests: 230 (+0)
Number of forks: 798
Total Stargazers: 4,824 (+0)
Total Subscribers: 309 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 30.8 days
Mean response time: 368.2 days
90th percentile: 1636.4 days
Tracked items: 57

How this project is maintained

Around half of the issues opened in the past year never receive a reply. 96% of open issues come from outside the core team, so the backlog reflects real-world use rather than internal planning. Only 2% of issues opened in the past year have been closed.

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 57
New in 7 days: 0
Closed in 7 days: 0
Avg open age: 840 days
Stale 30+ days: 55
Stale 90+ days: 52

Recent activity

Opened in 7 days: 0
Closed in 7 days: 0
Comments in 7 days: 0
Events in 7 days: 0

Top labels

  • enhancement (14)
  • question (6)
  • bug (3)
  • waiting-reply (3)
  • docs (1)
  • good first issue (1)
  • hashicat-might-fix (1)
  • needs-discussion (1)

Most active issues this week

No issue events were indexed in the last 7 days.

Detailed Description

Consul Template is a HashiCorp project written in Go that provides a daemon for rendering templates populated with data from Consul, Vault, or Nomad clusters. The core functionality allows the consul-template daemon to query these distributed systems and automatically update specified templates on the file system whenever underlying data changes, enabling dynamic configuration management in infrastructure environments.

The project serves as a bridge between HashiCorp's service discovery and secrets management tools and the file system, allowing operators to maintain configuration files that stay synchronized with live cluster data. When template data changes in Consul, Vault, or Nomad, consul-template detects these changes and re-renders affected templates without requiring manual intervention. This capability is particularly valuable in dynamic infrastructure where service addresses, secrets, or configuration values change frequently.

Consul Template supports multiple operational modes including once mode for single executions, de-duplication mode for handling rapid updates efficiently, and exec mode for running commands after template updates. The templating language includes API functions for querying Consul's key-value store and service catalog, Vault secrets, and Nomad job information. Helper functions and math functions extend the templating capabilities for complex configuration scenarios. The daemon listens for SIGHUP signals to reload configuration and templates from disk, aligning with infrastructure-as-code practices that require explicit reload triggers rather than automatic file watching.

A notable feature is the ability to execute arbitrary commands upon template completion, with automatic environment variable injection including Consul and Nomad connection parameters. This enables seamless integration with other HashiCorp tools and custom deployment scripts. The project includes comprehensive documentation covering configuration file syntax, command-line flags, templating language features, logging options, and observability capabilities.

The project provides pre-compiled releases for multiple platforms and supports compilation from source. Docker images are available with specific user permissions configured for security, using UID 100 and GID 1000 for the consul-template user. The repository includes an examples folder demonstrating practical use cases and links to HashiCorp Learn guides covering Consul KV operations, service discovery, Vault integration, and Nomad native service discovery scenarios. Community support is available through HashiCorp's discussion forums with dedicated Consul Template tags.