Skip to content

Commit 06a47f5

Browse files
authored
Add attach_scheduling_policy option to job_queue
With this, someone can use attach_scheduling_policy in their job_queue definition to skip over scheduling policy attachment.
1 parent b0b3857 commit 06a47f5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ resource "aws_batch_job_queue" "this" {
223223
name = each.value.name
224224
state = each.value.state
225225
priority = each.value.priority
226-
scheduling_policy_arn = try(each.value.scheduling_policy_arn, aws_batch_scheduling_policy.this[each.key].arn)
226+
scheduling_policy_arn = lookup(each.value, "attach_scheduling_policy", true) ? try(each.value.scheduling_policy_arn, aws_batch_scheduling_policy.this[each.key].arn) : null
227227
compute_environments = [for env in aws_batch_compute_environment.this : env.arn]
228228

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

0 commit comments

Comments
 (0)