From 436062d9220975aef9176bd2893a3d16929d463c Mon Sep 17 00:00:00 2001 From: William Shelley Date: Tue, 8 Oct 2024 14:48:04 +0100 Subject: [PATCH] fix: batch rule names --- infra/terraform/modules/service/README.md | 4 ++-- infra/terraform/modules/service/batch.tf | 7 +------ 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/infra/terraform/modules/service/README.md b/infra/terraform/modules/service/README.md index 55aee575be..e55899ea79 100644 --- a/infra/terraform/modules/service/README.md +++ b/infra/terraform/modules/service/README.md @@ -47,12 +47,12 @@ | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| | [assets\_version](#input\_assets\_version) | The version of the assets | `string` | n/a | yes | -| [batch](#input\_batch) | Configuration for the batch process |
object({
version = string
repository = string
subnet_ids = list(string)
task_iam_role_statements = list(object({
effect = string
actions = list(string)
resources = list(string)
}))
jobs = list(object({
name = string
commands = list(string)
cpu = optional(number, 1)
memory = optional(number, 2048)
timeout = optional(number, 300)
schedule = optional(string, "")
}))
})
| n/a | yes | +| [batch](#input\_batch) | Configuration for the batch process |
object({
version = string
repository = string
subnet_ids = list(string)
task_iam_role_statements = list(object({
effect = string
actions = list(string)
resources = list(string)
}))
jobs = list(object({
name = string
commands = list(string)
cpu = optional(number, 1)
memory = optional(number, 2048)
timeout = optional(number, 300)
schedule = optional(string, "")
}))
})
| n/a | yes | | [domain\_name](#input\_domain\_name) | The domain name for the environment | `string` | n/a | yes | | [elasticache\_url](#input\_elasticache\_url) | The URL of the Elasticache cluster | `string` | n/a | yes | | [environment](#input\_environment) | The environment to deploy to | `string` | n/a | yes | | [legacy\_environment](#input\_legacy\_environment) | The legacy environment to deploy use | `string` | n/a | yes | -| [services](#input\_services) | The services to deploy |
map(object({
version = string
repository = string
cpu = number
memory = number
task_iam_role_statements = list(object({
effect = string
actions = list(string)
resources = list(string)
}))
add_cdn_url_to_env = optional(bool, false)
lb_listener_arn = string
// The reason for this was to enable the parallel running of ECS and EC2 services.
// This boolean will control the flow of traffic. If `true`, traffic will go to ECS. If `false`, traffic will go to EC2.
// Can be removed when EC2 services are removed.
listener_rule_enable = optional(bool, true)
listener_rule_priority = optional(number, 10)
listener_rule_host_header = optional(string, "*")
security_group_ids = list(string)
subnet_ids = list(string)
vpc_id = optional(string, null)
}))
| `{}` | no | +| [services](#input\_services) | The services to deploy |
map(object({
version = string
repository = string
cpu = number
memory = number
task_iam_role_statements = list(object({
effect = string
actions = list(string)
resources = list(string)
}))
add_cdn_url_to_env = optional(bool, false)
lb_listener_arn = string
// The reason for this was to enable the parallel running of ECS and EC2 services.
// This boolean will control the flow of traffic. If `true`, traffic will go to ECS. If `false`, traffic will go to EC2.
// Can be removed when EC2 services are removed.
listener_rule_enable = optional(bool, true)
listener_rule_priority = optional(number, 10)
listener_rule_host_header = optional(string, "*")
security_group_ids = list(string)
subnet_ids = list(string)
vpc_id = optional(string, null)
}))
| `{}` | no | | [vpc\_id](#input\_vpc\_id) | The VPC ID | `string` | n/a | yes | ## Outputs diff --git a/infra/terraform/modules/service/batch.tf b/infra/terraform/modules/service/batch.tf index c48ee12243..0c85e8d5f7 100644 --- a/infra/terraform/modules/service/batch.tf +++ b/infra/terraform/modules/service/batch.tf @@ -166,11 +166,8 @@ module "eventbridge_sns" { create_bus = false - role_name = "vol-app-${var.environment}-batch-fail-role" - rules = { - batch-fail-sns = { - name = "${var.environment}-batch-fail-event" + "${var.environment}-batch-fail-event" = { description = "Capture failed Batch Events sent to SNS" event_pattern = jsonencode({ "source" : ["aws.batch"], @@ -205,8 +202,6 @@ module "sns_batch_fail" { name = "vol-app-${var.environment}-batch-fail-topic" use_name_prefix = true - display_name = "batch-event-failed" - create_topic_policy = true enable_default_topic_policy = true