From 6e819d733e623d8350d7a849fa869a91b1b6e654 Mon Sep 17 00:00:00 2001 From: C MARSTON Date: Mon, 10 Jun 2024 16:49:29 +0100 Subject: [PATCH 1/2] feat(terraform) test commit --- .../terraform/modules/service/eventbridge.tf | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 infra/terraform/modules/service/eventbridge.tf diff --git a/infra/terraform/modules/service/eventbridge.tf b/infra/terraform/modules/service/eventbridge.tf new file mode 100644 index 0000000000..ed0d842eef --- /dev/null +++ b/infra/terraform/modules/service/eventbridge.tf @@ -0,0 +1,27 @@ +module "eventbridge" { + source = "terraform-aws-modules/eventbridge/aws" + + bus_name = "api-bus" + + schedules = { + cli-batch-job = { + + flexible_time_window = { + mode = "OFF" + } + + schedule_expression = "rate(1 hours)" + + target = { + arn = "arn:aws:scheduler:::aws-sdk:batch:submitJob" + role_arn = "arn:aws:iam::054614622558:role/batch-execution-role" + + input = jsonencode({ + JobDefinition = "arn:aws:batch:eu-west-1:054614622558:job-definition/mat-test-job:5" + JobName = "TestJob" + JobQueue = "arn:aws:batch:eu-west-1:054614622558:job-queue/MatTestHighPriorityFargate" + }) + } + } + } +} \ No newline at end of file From 57ee9e62a7744a51643817e158c9b18f2885aabf Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 10 Jun 2024 15:50:42 +0000 Subject: [PATCH 2/2] docs: update Terraform docs --- infra/terraform/modules/service/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/infra/terraform/modules/service/README.md b/infra/terraform/modules/service/README.md index 11048e3028..d619305ef4 100644 --- a/infra/terraform/modules/service/README.md +++ b/infra/terraform/modules/service/README.md @@ -20,6 +20,7 @@ | [cloudfront](#module\_cloudfront) | terraform-aws-modules/cloudfront/aws | ~> 3.4 | | [ecs\_cluster](#module\_ecs\_cluster) | terraform-aws-modules/ecs/aws//modules/cluster | ~> 5.10 | | [ecs\_service](#module\_ecs\_service) | terraform-aws-modules/ecs/aws//modules/service | ~> 5.10 | +| [eventbridge](#module\_eventbridge) | terraform-aws-modules/eventbridge/aws | n/a | | [log\_bucket](#module\_log\_bucket) | terraform-aws-modules/s3-bucket/aws | ~> 4.0 | | [records](#module\_records) | terraform-aws-modules/route53/aws//modules/records | ~> 2.0 | | [route53\_records](#module\_route53\_records) | terraform-aws-modules/acm/aws | ~> 5.0 |