Skip to content

Commit 8a5b93a

Browse files
tcnghiamgreau
authored andcommitted
Export fc7ab21d5e39a0c33c56e4692d24496d8973d083
Export: fc7ab21d5e39a0c33c56e4692d24496d8973d083
1 parent 810f83e commit 8a5b93a

8 files changed

Lines changed: 24 additions & 38 deletions

File tree

modules/github-metapathreconciler/variables.tf

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,9 @@ variable "broker" {
3737
}
3838

3939
variable "error_event_broker" {
40-
description = "Optional CloudEvents broker for emitting reconciler error events. When set, the dispatcher publishes a CloudEvent for each reconciliation error (requeue, dead-letter, or drop). Set to null to disable."
41-
type = object({
42-
name = string
43-
})
44-
default = null
40+
description = "Optional CloudEvents broker ingress for emitting reconciler error events. Set to {} to disable."
41+
type = map(string)
42+
default = {}
4543
}
4644

4745
variable "containers" {

modules/github-metareconciler/variables.tf

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,9 @@ variable "broker" {
3737
}
3838

3939
variable "error_event_broker" {
40-
description = "Optional CloudEvents broker for emitting reconciler error events. When set, the dispatcher publishes a CloudEvent for each reconciliation error (requeue, dead-letter, or drop). Set to null to disable."
41-
type = object({
42-
name = string
43-
})
44-
default = null
40+
description = "Optional CloudEvents broker ingress for emitting reconciler error events. Set to {} to disable."
41+
type = map(string)
42+
default = {}
4543
}
4644

4745
variable "filters" {

modules/github-path-reconciler/variables.tf

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -345,9 +345,7 @@ variable "broker" {
345345
}
346346

347347
variable "error_event_broker" {
348-
description = "Optional CloudEvents broker for emitting reconciler error events. When set, the dispatcher publishes a CloudEvent for each reconciliation error (requeue, dead-letter, or drop). Set to null to disable."
349-
type = object({
350-
name = string
351-
})
352-
default = null
348+
description = "Optional CloudEvents broker ingress for emitting reconciler error events. Set to {} to disable."
349+
type = map(string)
350+
default = {}
353351
}

modules/linear-metareconciler/variables.tf

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,9 @@ variable "broker" {
3737
}
3838

3939
variable "error_event_broker" {
40-
description = "Optional CloudEvents broker for emitting reconciler error events. When set, the dispatcher publishes a CloudEvent for each reconciliation error (requeue, dead-letter, or drop). Set to null to disable."
41-
type = object({
42-
name = string
43-
})
44-
default = null
40+
description = "Optional CloudEvents broker ingress for emitting reconciler error events. Set to {} to disable."
41+
type = map(string)
42+
default = {}
4543
}
4644

4745
variable "issue_filters" {

modules/regional-go-reconciler/variables.tf

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -283,11 +283,9 @@ variable "workqueue_cpu_idle" {
283283
}
284284

285285
variable "error_event_broker" {
286-
description = "Optional CloudEvents broker for emitting reconciler error events. When set, the dispatcher publishes a CloudEvent for each reconciliation error (requeue, dead-letter, or drop). Set to null to disable."
287-
type = object({
288-
name = string
289-
})
290-
default = null
286+
description = "Optional CloudEvents broker ingress for emitting reconciler error events. Set to {} to disable."
287+
type = map(string)
288+
default = {}
291289
}
292290

293291
variable "slo" {

modules/workqueue/dispatcher.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,13 @@ module "dispatcher-calls-target" {
3434

3535
// Authorize the dispatcher service account to call the error event broker.
3636
module "dispatcher-calls-error-broker" {
37-
for_each = var.error_event_broker != null ? var.regions : {}
37+
for_each = var.error_event_broker
3838

3939
source = "../../../../public/terraform-infra-common/modules/authorize-private-service"
4040

4141
project_id = var.project_id
4242
region = each.key
43-
name = var.error_event_broker.name
43+
name = each.value
4444

4545
service-account = google_service_account.dispatcher.email
4646
}
@@ -104,7 +104,7 @@ module "dispatcher-service" {
104104
name = "WORKQUEUE_TARGET"
105105
value = { for k, v in module.dispatcher-calls-target : k => v.uri }
106106
},
107-
], var.error_event_broker != null ? [
107+
], length(var.error_event_broker) > 0 ? [
108108
{
109109
name = "ERROR_EVENT_BROKER_URL"
110110
value = { for k, v in module.dispatcher-calls-error-broker : k => v.uri }

modules/workqueue/hyperqueue/variables.tf

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,7 @@ variable "multi_regional_location" {
100100
}
101101

102102
variable "error_event_broker" {
103-
description = "Optional CloudEvents broker for emitting reconciler error events."
104-
type = object({
105-
name = string
106-
})
107-
default = null
103+
description = "Optional CloudEvents broker ingress for emitting reconciler error events. Set to {} to disable."
104+
type = map(string)
105+
default = {}
108106
}

modules/workqueue/variables.tf

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,7 @@ variable "receiver_ingress" {
116116
}
117117

118118
variable "error_event_broker" {
119-
description = "Optional CloudEvents broker for emitting reconciler error events. When set, the dispatcher publishes a CloudEvent for each reconciliation error (requeue, dead-letter, or drop). Set to null to disable."
120-
type = object({
121-
name = string
122-
})
123-
default = null
119+
description = "Optional CloudEvents broker ingress for emitting reconciler error events. Set to {} to disable."
120+
type = map(string)
121+
default = {}
124122
}

0 commit comments

Comments
 (0)