vault icon indicating copy to clipboard operation
vault copied to clipboard

Add option to set GID/UID of agent template files

Open Freddo3000 opened this issue 2 months ago • 0 comments

Is your feature request related to a problem? Please describe. It is currently not possible to set file ownership directly in the vault agent template block. This makes it more difficult for applications using these templates to access them, and often requires hacky workarounds.

Describe the solution you'd like Add an uid/user and gid/group attribute to the template block. When vault renders the template, set the rendered template file's ownership to those respectively.

Describe alternatives you've considered It is possible to achieve similar results by using the writeToFile function, however that in effect stuffs a template into a template, and looses out on some change detection. It is also possible to use the command and exec attributes for this.

Explain any additional use-cases N/A

Additional context https://developer.hashicorp.com/vault/docs/agent-and-proxy/agent/template#template-configurations

Freddo3000 avatar Oct 23 '25 21:10 Freddo3000