Skip to content

Commit

Permalink
fix(terraform): vol5223 give batch jobs a priority and share identifi…
Browse files Browse the repository at this point in the history
…er (#225)

* fix(terraform): give batch jobs a priority and share identifier

* fix(terraform): give batch jobs a priority and share identifier

* fix(terraform): use scheduling priority override

* fix(terraform): syntax
  • Loading branch information
matbeales authored Aug 8, 2024
1 parent c6b04cb commit 720d999
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions infra/terraform/modules/service/batch.tf
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,13 @@ locals {
description = "Schedule for ${module.batch.job_definitions[job.name].name}"
schedule_expression = job.schedule
arn = "arn:aws:scheduler:::aws-sdk:batch:submitJob"
input = jsonencode({ "JobName" : module.batch.job_definitions[job.name].name, "JobQueue" : module.batch.job_queues.default.arn, "JobDefinition" : module.batch.job_definitions[job.name].arn })
input = jsonencode({
"JobName" : module.batch.job_definitions[job.name].name,
"JobQueue" : module.batch.job_queues.default.arn,
"JobDefinition" : module.batch.job_definitions[job.name].arn,
"ShareIdentifier" : "volapp",
"SchedulingPriorityOverride" : 1
})
}
if job.schedule != ""
}
Expand Down Expand Up @@ -111,10 +117,9 @@ module "batch" {

job_queues = {
default = {
name = "vol-app-${var.environment}-default"
state = "ENABLED"
priority = 1
create_scheduling_policy = false
name = "vol-app-${var.environment}-default"
state = "ENABLED"
priority = 1

# This doesn't offer much value as a tag, but it's here to avoid: https://github.com/hashicorp/terraform-provider-aws/pull/38636.
# If the PR is merged, we can remove this.
Expand Down

0 comments on commit 720d999

Please sign in to comment.