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.1
- 3.3.0
- 3.2.0
- 3.1.0
- 3.0.0
- 2.3.0
- 2.2.0
- 2.1.3
- 2.1.2
- 2.1.1
- 2.1.0
- 2.0.0
- 1.5.0
- 1.4.3
- 1.4.2
- 1.4.1
- 1.4.0
- 1.3.1
- 1.3.0
- 1.2.0
- 1.1.1
- 1.1.0
- 1.0.0
- 0.11.1
- 0.11.0
- 0.10.1
- 0.10.0
- 0.9.1
- 0.9.0
- 0.8.3
- 0.8.2
- 0.8.1
- 0.8.0
- 0.7.1
- 0.7.0
- 0.6.0
- 0.5.1
- 0.4.3
- 0.4.2
- 0.4.1
- 0.3.0
- 0.2.3
- 0.2.0
- 0.1.0
Provides consul_installation, consul_config, consul_service, and related resources for managing HashiCorp Consul.
cookbook 'consul', '~> 6.0.0', :supermarket
knife supermarket install consul
knife supermarket download consul
Consul Cookbook
Resource cookbook which installs and configures HashiCorp Consul.
Maintainers
This cookbook is maintained by the Sous Chefs. The Sous Chefs are a community of Chef cookbook maintainers working together to maintain important cookbooks. If you'd like to know more please visit sous-chefs.org or come chat with us on the Chef Community Slack in #sous-chefs.
Requirements
- Chef Infra Client >= 15.3
- Linux only (systemd-based distributions)
Supported Platforms
- AlmaLinux 8, 9, 10
- Amazon Linux 2023
- CentOS Stream 9, 10
- Debian 12, 13
- Fedora (latest)
- openSUSE Leap 15, 16
- Oracle Linux 8, 9, 10
- Red Hat Enterprise Linux 8, 9
- Rocky Linux 8, 9, 10
- Ubuntu 22.04, 24.04
Resources
This cookbook provides custom resources only — no recipes or node attributes. Use these resources directly in your wrapper cookbook recipes.
- [consul_installation](documentation/consul_installation.md)
- [consul_config](documentation/consul_config.md)
- [consul_service](documentation/consul_service.md)
- [consul_definition](documentation/consul_definition.md)
- [consul_watch](documentation/consul_watch.md)
- [consul_execute](documentation/consul_execute.md)
- [consul_acl](documentation/consul_acl.md)
- [consul_policy](documentation/consul_policy.md)
- [consul_role](documentation/consul_role.md)
- [consul_token](documentation/consul_token.md)
Quick Start
Server
consul_installation 'latest' do install_method 'repository' end group 'consul' do system true end user 'consul' do system true group 'consul' shell '/bin/false' end config = consul_config '/etc/consul/consul.json' do owner 'root' group 'consul' server true bootstrap true datacenter 'dc1' ui true notifies :reload, 'consul_service[consul]', :delayed end consul_service 'consul' do config_file config.path user 'consul' group 'consul' end
Client
consul_installation 'latest' do install_method 'repository' end group 'consul' do system true end user 'consul' do system true group 'consul' shell '/bin/false' end config = consul_config '/etc/consul/consul.json' do retry_join %w(10.0.0.1 10.0.0.2 10.0.0.3) notifies :reload, 'consul_service[consul]', :delayed end consul_service 'consul' do config_file config.path user 'consul' group 'consul' end
Installation Methods
The consul_installation resource supports two methods:
-
repository(default) — Installs via official HashiCorp APT/YUM repositories. Recommended for most platforms. -
binary— Downloads a zip archive from releases.hashicorp.com. Required for openSUSE (no official repo).
consul_installation '1.22.5' do install_method 'binary' checksum 'abc123...' end
Watches and Definitions
consul_definition 'redis' do type 'service' parameters(tags: %w(master), address: '127.0.0.1', port: 6379) notifies :reload, 'consul_service[consul]', :delayed end consul_watch 'app-deploy' do type 'event' parameters(handler: '/usr/local/bin/clear-disk-cache.sh') notifies :reload, 'consul_service[consul]', :delayed end
ACLs
The consul_acl, consul_policy, consul_role, and consul_token resources require the Diplomat Ruby gem.
consul_acl '49f06aa9-782f-465a-becf-44f0aaefd335' do acl_name 'AwesomeApp Token' type 'client' rules 'key "" { policy = "read" }' auth_token 'master-token' end
Upgrading from 5.x
Version 6.0 is a breaking change:
- Recipes and attributes removed — use custom resources directly in your wrapper cookbook
- Windows support removed — Linux only (systemd)
-
Consul < 1.0 support removed —
config_v0resource deleted - NSSM dependency removed
- Installation via repository is now the default (previously binary download)
- Platform support updated — EOL platforms removed (CentOS 7/8, Ubuntu 16.04/18.04, Debian 9/10)
Contributors
This project exists thanks to all the people who contribute.
Backers
Thank you to all our backers!
Sponsors
Support this project by becoming a sponsor. Your logo will show up here with a link to your website.
Dependent cookbooks
This cookbook has no specified dependencies.
Contingent cookbooks
Changelog
6.0.0 (2026-03-19)
⚠ BREAKING CHANGES
- modernize cookbook to resource-only pattern (v6.0)
Features
- modernize cookbook to resource-only pattern (v6.0) (10ce6dd)
5.7.0 (2026-01-06)
Features
Bug Fixes
5.6.9 (2025-10-15)
Bug Fixes
5.6.8 - 2025-09-04
- Standardise files with files in sous-chefs/repo-management
5.4.0 - 2022-09-12
- Add missing
ui_configattribute toconsul_config, asuiis deprecated in Consul 1.9.0 - Standardise files with files in sous-chefs/repo-management
5.3.2 - 2022-02-17
- Standardise files with files in sous-chefs/repo-management
- Remove delivery folder
5.3.1 - 2022-01-04
- Fix idempotency checks for
consul_tokenandconsul_policy
5.3.0 - 2022-01-04
- Fix wrong number of arguments when calling action
:enableservice on Windows platform
5.2.0 - 2021-12-01
- Added setting
license_pathinconsul_configresource for enterprise installations
5.1.0 - 2021-12-01
- Support
:stopaction forconsul_serviceresource
5.0.1 - 2021-11-24
- Fix setting
programinconsul_serviceresource
5.0.0 - 2021-11-22
- Remove Poise dependencies
- Rewrite resources as Chef custom resources
- Drop compatibility with Chef < 15.3
Collaborator Number Metric
6.0.0 passed this metric
Contributing File Metric
6.0.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file
Cookstyle Metric
6.0.0 passed this metric
No Binaries Metric
6.0.0 passed this metric
Testing File Metric
6.0.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
6.0.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
6.0.0 passed this metric
6.0.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file
Cookstyle Metric
6.0.0 passed this metric
No Binaries Metric
6.0.0 passed this metric
Testing File Metric
6.0.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
6.0.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
6.0.0 passed this metric
6.0.0 passed this metric
Testing File Metric
6.0.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
6.0.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
6.0.0 failed this metric
6.0.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number