mirror of
https://gitlab.sarex.io/infra/terraform-contour-mirror.git
synced 2026-08-05 18:31:00 +03:00
++ fix inconsistent conditional result types in v2_source_ref_string
This commit is contained in:
parent
ee8a64eb2e
commit
47852a2170
@ -128,8 +128,12 @@ locals {
|
|||||||
|
|
||||||
# secret_ref's ref is a plain "vault://path#field" string (unlike the other
|
# secret_ref's ref is a plain "vault://path#field" string (unlike the other
|
||||||
# source kinds, whose ref is an object) - only meaningful for source_kind=secret_ref.
|
# source kinds, whose ref is an object) - only meaningful for source_kind=secret_ref.
|
||||||
|
# source.ref is a string for secret_ref but an object for every other
|
||||||
|
# source.kind (postgresql_user/kafka_user/rabbitmq_user/s3_bucket/valkey_user)
|
||||||
|
# - HCL's conditional requires both branches to share a static type, so the
|
||||||
|
# object branch is forced through tostring()/try() to collapse to "".
|
||||||
v2_source_ref_string = { for secret in local.secrets_v2 : secret.id =>
|
v2_source_ref_string = { for secret in local.secrets_v2 : secret.id =>
|
||||||
local.v2_source_kind[secret.id] == "secret_ref" ? try(secret.source.ref, "") : ""
|
local.v2_source_kind[secret.id] == "secret_ref" ? try(tostring(secret.source.ref), "") : ""
|
||||||
}
|
}
|
||||||
|
|
||||||
v2_extra_fields = { for secret in local.secrets_v2 : secret.id => {
|
v2_extra_fields = { for secret in local.secrets_v2 : secret.id => {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user