Hello ,
I am trying to run vault agent in Supervisor mode with Exec command within template and having issues when trying to run the service after config file rendering
Here is an example of my config file
auto_auth {
method "approle" {
mount_path = "auth/approle"
config = {
role_id_file_path="VAULT_ROLEID"
secret_id_file_path="VAULT_SECRETID"
remove_secret_id_file_after_reading = false
}
}
cache {
use_auto_auth_token = true
}
sink "file" {
config = {
path ="VAULT_TOKEN"
}
}
}
template {
source = "./config.ctmpl"
destination = "./config.json"
command = [ "go run service" , "-config config.json" ]
}
command to run Vault agent
vault agent -config=vault-config.hcl
vault version : Vault v1.13.3 ('3bedf816cbf851656ae9e6bd65dd4a67a9ddff5e+CHANGES')
is there a way to kick off exec outside of template and even that fails as well
here is vault agent response output
2023-11-15T14:31:59.331-0600 [INFO] agent.template.server: starting template server
2023-11-15T14:31:59.331-0600 [INFO] agent.auth.handler: starting auth handler
2023-11-15T14:31:59.331-0600 [INFO] agent.auth.handler: authenticating
2023-11-15T14:31:59.332-0600 [INFO] (runner) creating new runner (dry: false, once: false)
2023-11-15T14:31:59.332-0600 [INFO] agent.sink.server: starting sink server
2023-11-15T14:31:59.333-0600 [INFO] (runner) creating watcher
2023-11-15T14:31:59.495-0600 [INFO] agent.auth.handler: authentication successful, sending token to sinks
2023-11-15T14:31:59.496-0600 [INFO] agent.auth.handler: starting renewal process
2023-11-15T14:31:59.496-0600 [INFO] agent.template.server: template server received new token
2023-11-15T14:31:59.496-0600 [INFO] (runner) stopping
2023-11-15T14:31:59.496-0600 [INFO] (runner) creating new runner (dry: false, once: false)
2023-11-15T14:31:59.496-0600 [INFO] (runner) creating watcher
2023-11-15T14:31:59.497-0600 [INFO] (runner) starting