user1119283
user1119283

Reputation: 431

EventBridge LimitExceededException: The requested resource exceeds the maximum number allowed for AWS

While trying to create a new EventBridge rule, we are getting:

LimitExceededException: The requested resource exceeds the maximum number allowed for AWS

exception, even though we have only 73 existing event bridge rules in one region and as per Amazon EventBridge quotas documentation the maximum number of rules that can be defined in a given region is 300.

Please provide some pointers if we are missing something here.

Snippet of code for creating EventBridge rule:

resource "aws_cloudwatch_event_rule" "testing" {
  count       = var.some_condition ? 1 : 0
  name        = var.resource_name
  event_pattern = jsonencode({
    "detail" = {
      "requestParameters" = {
        "key"        = [for val in var.my_list : { wildcard = "${val["v1"]}/*/" }]
      }
    }
  })
}

Where my_list is :

my_list = [
  {
    "v1" = "myV1"
  }
]

Complete error:

│ Error: creating EventBridge Rule (test-eb): LimitExceededException: The requested resource exceeds the maximum number allowed.
│ 
│   with module.sample.aws_cloudwatch_event_rule.testing[0],
│   on modules/test/main.tf line 30, in resource "aws_cloudwatch_event_rule" "testing":
│   30: resource "aws_cloudwatch_event_rule" "testing" {

Upvotes: 1

Views: 1479

Answers (0)

Related Questions