Skip to content

Commit

Permalink
try with idx
Browse files Browse the repository at this point in the history
  • Loading branch information
morga471 committed Jun 25, 2025
1 parent 4d278b2 commit f8f6afe
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -164,24 +164,24 @@ resource "helm_release" "ingress" {
{
name = "resources.limits.memory"
value = "1Gi"
}
},
],
flatten([
for port in local.ports : [
for idx, port in local.ports : [
{
name = format("service.ports[%v].name", port.port)
name = format("service.ports[%v].name", idx)
value = port.name
},
{
name = format("service.ports[%v].port", port.port)
name = format("service.ports[%v].port", idx)
value = port.port
},
{
name = format("service.ports[%v].protocol", port.port)
name = format("service.ports[%v].protocol", idx)
value = "TCP"
},
{
name = format("service.ports[%v].targetPort", port.port)
name = format("service.ports[%v].targetPort", idx)
value = port.port
},
]
Expand Down

0 comments on commit f8f6afe

Please sign in to comment.