-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
vault template stanza exec object appears to not parse correctly #16230
Comments
@johnalotoski Can you try this format for exec? "Templates": [
{
"Destination": "/path/on/disk/where/template/will/render.txt",
"Exec": {
"Command": [
"test"
],
},
"Source": "/path/on/disk/to/template.ctmpl"
}
] |
Hi @jasonodonnell, thanks for the fast response! Testing with that verbatim (and removing the extra comma after the command list in the exec object), I receive:
However, "Source" is definitely included, as shown above. It seems, though, that I should be using singular "Template" which if I only change Templates to Template from the above (with the removal of the extra comma) then I receive the same error as reported:
If I modify both the Templates to singular, and revert to the deprecated
|
@johnalotoski This turned out to be a bug, so I opened a PR to fix it. Thanks and hope this helps! |
Thank you so much! |
The vault documentation for a template stanza describes the exec declaration as:
For vault
v1.11.0
with consul-template0.29.0
, the consul template config docs show the exec hcl block example as:The JSON equivalent (what we are using for config submission to vault-agent) for the exec block should be:
However, this JSON produces the error:
I cannot seem to change the JSON in any manner to get the exec declaration to parse correctly.
Another user independently reported the same issue in the hashicorp discussion channel here.
For now, falling back to use of the deprecated
command
(string) is a workaround.Environment:
Vault v1.11.0 (ea296cc), built 2022-06-17T15:48:44Z
NixOS, x86_64-linux
The text was updated successfully, but these errors were encountered: