Skip to content

Commit 19a88cd

Browse files
committed
feat: add distinct to avoid duplicates in ingreses hosts lists
1 parent c736a49 commit 19a88cd

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

locals.tf

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -174,17 +174,17 @@ locals {
174174
enabled = true
175175
annotations = local.ingress_annotations
176176
servicePort = "9095"
177-
hosts = [
177+
hosts = distinct([
178178
"${local.alertmanager.domain}",
179179
"alertmanager.${local.domain}"
180-
]
180+
])
181181
tls = [
182182
{
183183
secretName = "alertmanager-tls"
184-
hosts = [
184+
hosts = distinct([
185185
"${local.alertmanager.domain}",
186186
"alertmanager.${local.domain}",
187-
]
187+
])
188188
},
189189
]
190190
}
@@ -259,17 +259,17 @@ locals {
259259
ingress = {
260260
enabled = true
261261
annotations = local.ingress_annotations
262-
hosts = [
262+
hosts = distinct([
263263
"${local.grafana.domain}",
264264
"grafana.${local.domain}",
265-
]
265+
])
266266
tls = [
267267
{
268268
secretName = "grafana-tls"
269-
hosts = [
269+
hosts = distinct([
270270
"${local.grafana.domain}",
271271
"grafana.${local.domain}",
272-
]
272+
])
273273
},
274274
]
275275
}
@@ -314,17 +314,17 @@ locals {
314314
enabled = true
315315
annotations = local.ingress_annotations
316316
servicePort = "9091"
317-
hosts = [
317+
hosts = distinct([
318318
"${local.prometheus.domain}",
319319
"prometheus.${local.domain}",
320-
]
320+
])
321321
tls = [
322322
{
323323
secretName = "prometheus-tls"
324-
hosts = [
324+
hosts = distinct([
325325
"${local.prometheus.domain}",
326326
"prometheus.${local.domain}",
327-
]
327+
])
328328
},
329329
]
330330
}

0 commit comments

Comments
 (0)