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" {
223
223
name = each. value . name
224
224
state = each. value . state
225
225
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 )
227
227
compute_environments = [for env in aws_batch_compute_environment . this : env . arn ]
228
228
229
229
tags = merge (var. tags , lookup (each. value , " tags" , {}))
@@ -234,7 +234,7 @@ resource "aws_batch_job_queue" "this" {
234
234
# ###############################################################################
235
235
236
236
resource "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 ) }
238
238
239
239
name = each. value . name
240
240
You can’t perform that action at this time.
0 commit comments