Using Vault with Consul Template
Today we announce first-class support for Vault in Consul Template. Consul Template is a key tool for generating configurations and managing infrastructure, and we believe that Vault is going to change the way organizations think about and manage their secret data. As such, we are building first-class support for Vault in Consul Template. This allows users to seamlessly integrate secret data into the configurations.
Last October we announced Consul Template, a standalone application that renders data from Consul onto the file system. Since then, Consul Template has grown to new scales and is one of our most popular Consul tools. Today we are excited to bring an amazing new feature to Consul Template - first class support for Vault.
Announced yesterday, Vault is HashiCorp's newest open source tool that provides a unified solution for secure key and secret management complete with in-transit encryption, key rolling, key revocation, and detailed audit logs.
» Demo
Consul Template's powerful abstraction and templating language are perfect for creating dynamic configurations. Using Consul Template with Vault will feel friendly and familiar:
---
production:{{with $secret := vault "secret/my-app/production" }}
adapter: postgresql
host: {{key "my-app/production/host"}}
username: {{$secret.Data.username}}
password: {{$secret.Data.password}}
{{end}}
This example combines existing functionality of watching a key in Consul and the new vault
function which queries a Vault instance for a secret. Consul Template transparently handles the authentication, retrieval, and renewal of secrets. You can read more about the new Vault integration in Consul Template's GitHub repository.
» Conclusion
Consul Template has changed the way organizations manage service discovery and configuration. Vault has changed the way organizations manage keys and secrets in distributed systems. Together Consul Template and Vault can be the foundation for service discovery and service configuration in the modern datacenter. Since both Vault and Consul Template are open source, you can view the source code and discover just how the integration works. Please join me in welcoming the newest integration to Consul Template!
Sign up for the latest HashiCorp news
More blog posts like this one
HashiCorp at AWS re:Invent: Your blueprint to cloud success
If you’re attending AWS re:Invent in Las Vegas, Dec. 2 - Dec. 6th, visit us for breakout sessions, expert talks, and product demos to learn how to take a unified approach to Infrastructure and Security Lifecycle Management.
HCP Vault Secrets adds enterprise capabilities for auto-rotation, dynamic secrets, and more
HCP Vault Secrets focuses on making a fast and easy path for secure development with key new features including auto-rotation (GA), dynamic secrets (beta), a new secret sync destination, and more.
New SLM offerings for Vault, Boundary, and Consul at HashiConf 2024 make security easier
The latest Security Lifecycle Management (SLM) features from HashiCorp Vault, Boundary, and Consul help organizations offer a smoother path to better security practices for developers.