terraform-aws-modules / terraform-aws-batch

Terraform module to create AWS Batch resources 🇺🇦
https://registry.terraform.io/modules/terraform-aws-modules/batch/aws
Apache License 2.0
35 stars 40 forks source link

feat: Add create_scheduling_policy option to job_queue #3

Closed mattaltberg closed 2 years ago

mattaltberg commented 2 years ago

With this, someone can use attach_scheduling_policy in their job_queue definition to skip over scheduling policy attachment.

Description

Right now, a scheduling policy is auto-attached to all job queues. Adding "attach_scheduling_policy" when defining people's job queues will override the default behaviour.

Motivation and Context

I don't want to always have a scheduling policy for my queues.

Breaking Changes

No, it uses lookup, and defaults to the original behaviour

How Has This Been Tested?

mattaltberg commented 2 years ago

Hey @bryantbiggs @antonbabenko can I get this added as well? I want to add job queues that don't have scheduling policies.

mattaltberg commented 2 years ago

Hey @bryantbiggs, did you see my comment?

bryantbiggs commented 2 years ago

yes, I started to take a look and haven't come up with a solution that seems reasonable yet

mattaltberg commented 2 years ago

It's tricky, we need a way to say we don't want the scheduling policy, and it has to be at the queue level. Curious to see what you come up with

mattaltberg commented 2 years ago

@bryantbiggs I actually found a workaround, you can supply scheduling_policy_arn = null when you define your job queue, and it works. Not sure this change is needed anymore (although scheduling policies will still be created)

mattaltberg commented 2 years ago

@bryantbiggs done and ready

antonbabenko commented 2 years ago

This PR is included in version 1.2.0 :tada:

github-actions[bot] commented 1 year ago

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.