File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff 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 = try (each. value . create_scheduling_policy , true ) ? aws_batch_scheduling_policy. this [each . key ]. arn : try (each . value . scheduling_policy_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" , {}))
@@ -234,7 +234,7 @@ resource "aws_batch_job_queue" "this" {
234234# ###############################################################################
235235
236236resource "aws_batch_scheduling_policy" "this" {
237- for_each = { for k , v in var . job_queues : k => v if var . create && var . create_job_queues }
237+ for_each = { for k , v in var . job_queues : k => v if var . create && var . create_job_queues && try (v . create_scheduling_policy , true ) }
238238
239239 name = each. value . name
240240
You can’t perform that action at this time.
0 commit comments