Skip to content

Commit eb2267b

Browse files
author
Carlos Suarez
committed
🩹 deprecated compute_environments parameter
1 parent 0ec188f commit eb2267b

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

main.tf

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,13 @@ resource "aws_batch_job_queue" "this" {
228228
state = each.value.state
229229
priority = each.value.priority
230230
scheduling_policy_arn = try(each.value.create_scheduling_policy, true) ? aws_batch_scheduling_policy.this[each.key].arn : try(each.value.scheduling_policy_arn, null)
231-
compute_environments = slice([for env in try(each.value.compute_environments, keys(var.compute_environments)) : aws_batch_compute_environment.this[env].arn], 0, min(length(try(each.value.compute_environments, keys(var.compute_environments))), 3))
231+
dynamic "compute_environment_order" {
232+
for_each = { for index, elem in slice([for env in try(each.value.compute_environments, keys(var.compute_environments)) : aws_batch_compute_environment.this[env].arn], 0, min(length(try(each.value.compute_environments, keys(var.compute_environments))), 3)) : elem => { order = index + 1, compute_environment = elem } }
233+
content {
234+
order = compute_environment_order.value.order
235+
compute_environment = compute_environment_order.value.compute_environment
236+
}
237+
}
232238

233239
tags = merge(var.tags, lookup(each.value, "tags", {}))
234240
}

0 commit comments

Comments
 (0)