You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
resource"helm_release""vault" {
name ="vault"
chart =local.vault_chart_path
namespace ="vault"
values = [
file("./vault-values.yaml"),
yamlencode({ chart_hash :local.chart_hash, })
]
set {
name ="server.ha.config"
type ="string"
value =templatefile("../helm-charts/vault-ha-config/vault-ha-config.hcl", {
pgusername ="someuser"
pgpassword ="somepassword"
pgserverfqdn ="some server"
pgdatabase ="vault"
})
}
depends_on = [kubernetes_manifest.vault_psql_init_job]
}
Values file portion which I try to overwrite:
server:
ha:
enabled: truereplicas: 1# config is a raw string of default configuration when using a Stateful# deployment. Default is to use a Consul for its HA storage backend.# This should be HCL.config: | ui = true storage "postgresql" { connection_url = "postgres://{pgusername}:{pgpassword}@{pgfqdn}/{pgdatabase}" table = "vault_kv_store" ha_enabled = "true" ha_table = "vault_ha_locks" }
Question
As you can see under server.ha.config we have a HCL file. I try to replace that config with a file that I templated (in order to add the secrets) but it fails with error:
This issue might be changed to a BUG it seems the provider has a hard time setting that value as it's a HCL. We should be able to use set to set different string values such as my use case or as another example setting the content of a config map data which a a script or HCL.
Terraform version, Kubernetes provider version and Kubernetes version
Terraform configuration
Values file portion which I try to overwrite:
Question
As you can see under
server.ha.config
we have a HCL file. I try to replace that config with a file that I templated (in order to add the secrets) but it fails with error:How can we use
set { }
in order to set a multiline string in the values file?The text was updated successfully, but these errors were encountered: