Retrieve entire map of secrets with vault function
- Dominant language
- Go
- Stars
- 15.8k
- Forks
- 3.3k
- PR merge metrics
- PR metrics pending
Description
#### Community Note
* Please vote on this issue by adding a 👍 [reaction](https://blog.github.com/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/) to the original issue to help the community and maintainers prioritize this request
* Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
* If you are interested in working on this issue or have submitted a pull request, please leave a comment
#### Description
Currently, [`vault` function](https://www.packer.io/docs/templates/hcl_templates/functions/contextual/vault) allows to retrieve a single key from a key-value map at a given secret path. It would be great if it would allow to retrieve the entire map of key/value pairs (e.g. simply by omitting the second argument).
#### Potential configuration
Instead of pulling out a single value with
```
locals {
foo = vault("/secret/data/hello", "foo")
}
```
we could pull out the entire map with e.g.
```
locals {
hello_vars = vault("/secret/data/hello")
}
```
so `hello_vars` would be a map with all the key-value pairs.
Contributor guide
Assessment
This issue has not been assessed yet.