Skip to content

Commit 40e2a53

Browse files
fix: fix broken logic to create multiple runner_matcher_config
1 parent 2259aaf commit 40e2a53

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

modules/webhook/webhook.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ locals {
2424
}
2525

2626
resource "aws_ssm_parameter" "runner_matcher_config" {
27-
for_each = { for idx, val in local.matcher_chunks : idx => val }
27+
count = length(local.matcher_chunks)
2828

29-
name = "${var.ssm_paths.root}/${var.ssm_paths.webhook}/runner-matcher-config${length(local.matcher_chunks) > 1 ? "-${each.key}" : ""}"
29+
name = "${var.ssm_paths.root}/${var.ssm_paths.webhook}/runner-matcher-config${length(local.matcher_chunks) > 1 ? "-${count.index}" : ""}"
3030
type = "String"
31-
value = each.value
31+
value = local.matcher_chunks[count.index]
3232
tier = var.matcher_config_parameter_store_tier
3333
}
3434

0 commit comments

Comments
 (0)