mirror of
https://github.com/hashicorp/vault.git
synced 2025-08-22 23:21:08 +02:00
* Update README Let contributors know that docs will now be located in UDR * Add comments to each mdx doc Comment has been added to all mdx docs that are not partials * chore: added changelog changelog check failure * wip: removed changelog * Fix content errors * Doc spacing * Update website/content/docs/deploy/kubernetes/vso/helm.mdx Co-authored-by: Tu Nguyen <im2nguyen@users.noreply.github.com> --------- Co-authored-by: jonathanfrappier <92055993+jonathanfrappier@users.noreply.github.com> Co-authored-by: Tu Nguyen <im2nguyen@users.noreply.github.com>
71 lines
2.6 KiB
Plaintext
71 lines
2.6 KiB
Plaintext
---
|
|
layout: docs
|
|
page_title: service_registration - Configuration
|
|
description: >-
|
|
Configure the `service_registration` stanza to customize the service
|
|
registration mechanism for Vault.
|
|
---
|
|
|
|
> [!IMPORTANT]
|
|
> **Documentation Update:** Product documentation, which were located in this repository under `/website`, are now located in [`hashicorp/web-unified-docs`](https://github.com/hashicorp/web-unified-docs), colocated with all other product documentation. Contributions to this content should be done in the `web-unified-docs` repo, and not this one. Changes made to `/website` content in this repo will not be reflected on the developer.hashicorp.com website.
|
|
|
|
# `service_registration` stanza
|
|
|
|
The optional `service_registration` stanza configures Vault's mechanism for
|
|
service registration. The `service_registration` stanza is designed for use cases
|
|
where you would like to use a system like [Consul][consul] for [service
|
|
discovery][consul-discovery], but use a different system for the [storage
|
|
backend][storage-backend].
|
|
|
|
When Consul is configured as the [storage backend][consul-backend], Vault
|
|
implicitly uses Consul for service registration, so the `service_registration` stanza
|
|
is not needed.
|
|
|
|
For times when you would like to use a different storage backend, like
|
|
[Raft][raft-backend], but still have service registration available, the
|
|
`service_registration` stanza can be used:
|
|
|
|
```hcl
|
|
service_registration "consul" {
|
|
address = "127.0.0.1:8500"
|
|
}
|
|
storage "raft" {
|
|
path = "/path/to/raft/data"
|
|
node_id = "raft_node_1"
|
|
}
|
|
```
|
|
|
|
For information about a specific service registration provider, visit the [Consul Service Registration][consul-service-registration] or [Kubernetes Service Registration
|
|
][kubernetes-service-registration] pages.
|
|
|
|
## Configuration
|
|
|
|
Service registration configuration is done through the Vault configuration file
|
|
using the `service_registration` stanza:
|
|
|
|
```hcl
|
|
service_registration [NAME] {
|
|
[PARAMETERS...]
|
|
}
|
|
```
|
|
|
|
For example:
|
|
|
|
```hcl
|
|
service_registration "consul" {
|
|
address = "127.0.0.1:8500"
|
|
}
|
|
```
|
|
|
|
For configuration options which also read an environment variable, the
|
|
environment variable will take precedence over values in the configuration
|
|
file.
|
|
|
|
[consul]: https://www.consul.io/
|
|
[consul-discovery]: https://www.consul.io/
|
|
[storage-backend]: /vault/docs/configuration/storage
|
|
[consul-backend]: /vault/docs/configuration/storage/consul
|
|
[raft-backend]: /vault/docs/configuration/storage/raft
|
|
[consul-service-registration]: /vault/docs/configuration/service-registration/consul
|
|
[kubernetes-service-registration]: /vault/docs/configuration/service-registration/kubernetes
|