consul-template
by
hashicorp

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

View on GitHub ↗

Summary Information

Updated 1 hour ago
Added to GitGenius on April 8th, 2021
Created on October 7th, 2014
Open Issues & Pull Requests: 223 (+0)
Number of forks: 793
Total Stargazers: 4,831 (+0)
Total Subscribers: 309 (+0)

Issue Activity (beta)

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

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.

Repository Insights (GitGenius)

Median issue/PR response: 19.0 hours
Mean response time: 48.7 days
90th percentile: 201.3 days
Tracked items: 67

Most active contributors

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.

According to GitGenius activity tracking, the repository shows median issue and pull request response latency of 19 hours across 67 tracked items, with mean latency of 1169.1 hours reflecting occasional longer-running discussions. Enhancement requests represent the most active issue category with 14 tracked items, followed by general questions with 6 items. Primary contributors tracked by GitGenius include eikenb with 28 events, Kisan-hpe with 23 events, and blake with 21 events. The repository shares overlapping contributors with hashicorp/nomad, hashicorp/terraform, and influxdata/influxdb, indicating integration points across the HashiCorp ecosystem and broader infrastructure tooling.

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.

consul-template
by
hashicorphashicorp/consul-template

Repository Details

Fetching additional details & charts...