[ASK] Vault Agent Templating Error 'exec' expected a map, got 'slice'

Hi,

we have vault agent template stanza like :

template {
  source               = "/opt/vault/secrets/templates/consul-systemd.service.ctmpl"
  destination          = "/etc/systemd/system/consul.service"
  create_dest_dirs     = false
  error_on_missing_key = true
  perms                = 0644
  backup               = true
  exec = {
    command = ["/opt/vault/scripts/systemd-reloader", "consul"]
    timeout = "30s"
  }
}

error log :

root@ip-10-9-216-18:/opt/vault# /opt/vault/bin/vault agent -config /opt/vault/config/default.hcl -log-level=info
Error loading configuration from /opt/vault/config/default.hcl: error parsing 'template': 1 error(s) decoding:

* 'exec' expected a map, got 'slice'

trying another template :

...
template {
  source               = "/opt/vault/secrets/templates/consul-systemd.service.ctmpl"
  destination          = "/etc/systemd/system/consul.service"
  create_dest_dirs     = false
  error_on_missing_key = true
  perms                = 0644
  backup               = true
  exec {
    command = "/opt/vault/scripts/systemd-reloader consul"
    timeout = "30s"
  }
}

...

still have same error too,
anyone can help us to configure correct exec config ?

based on the docs https://www.vaultproject.io/docs/agent/template#exec seem the former is the correct one, but no luck

exec {
  command = ["/usr/bin/app"]
}

whats that mean @aram , could you elaborate more?

per my understanding, it will not work if we use flag ? in the exec.command section?

but in the docs consul-template/modes.md at v0.28.1 · hashicorp/consul-template · GitHub and consul-template/configuration.md at v0.28.1 · hashicorp/consul-template · GitHub , it can use flag