»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 for service discovery, but use a different system for the storage backend.

When Consul is configured as the storage 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, but still have service registration available, the service_registration stanza can be used:

service_registration "consul" {
  address = "127.0.0.1:8500"
}
storage "raft" {
  path = "/path/to/raft/data"
  node_id = "raft_node_1"
}
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, choose one from the navigation on the left.

»Configuration

Service registration configuration is done through the Vault configuration file using the service_registration stanza:

service_registration [NAME] {
  [PARAMETERS...]
}
service_registration [NAME] {  [PARAMETERS...]}

For example:

service_registration "consul" {
  address = "127.0.0.1:8500"
}
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.