Hello!
We’re running into an oddity trying to use vault_kv_secret to store secrets in a KV.V1 secret mount. Here is an snippet from our Terraform configuration:
resource "vault_mount" "hello" {
path = "hello"
type = "kv"
options = { version = "1" }
description = "hello"
}
resource "vault_kv_secret" "hi" {
path = "${vault_mount.hello.path}/redis"
data_json = jsonencode(
{
endpoint = "127.0.0.1"
ttl = "60m"
}
)
}
In this example, we would expect to have the following at /hello/redis
, as JSON:
{
"endpoint": "127.0.0.1",
"ttl": "60m"
}
Instead, we end up with everything nested under a single key, named data
:
{
"data": {
"endpoint": "127.0.0.1",
"ttl": "60m"
}
}
Can someone explain what we’re doing wrong and/or why this is designed this way?
We’re using version 3.7.0
of the Vault provider against an enterprise Vault cluster running version 1.10.3+ent
.
Regards,
Kris