hashicorp / hashicorp/consul-template
Add API function to fetch session metadata
- Dominant language
- Go
- Stars
- 4.8k
- Forks
- 801
- Avg merge
- 4h 5m
- Merged PRs (30d)
- 6
Description
Consul-template allows fetching the contents of a KV through the `key` function, but as far as I can tell there is no way to get the metadata from an associated [session](https://developer.hashicorp.com/consul/docs/dynamic-app-config/sessions).
It would be nice to have a function that gets the metadata of a session coupled to a KV entry (e.g. `{{ session "my/kv/path" }}`) in a way like the `service` function exposes things.
Useful information in session metadata includes the NodeID of the node holding the session, and service health check ID's. These can be re-used with the `node` and `service` functions respectively.
Relevant api docs:
https://developer.hashicorp.com/consul/api-docs/kv
https://developer.hashicorp.com/consul/api-docs/session
Contributor guide
Assessment
This issue has not been assessed yet.