diff --git a/docs/add-ons/karpenter.md b/docs/add-ons/karpenter.md
index 1bdbf3b74a..4ec6777e1d 100644
--- a/docs/add-ons/karpenter.md
+++ b/docs/add-ons/karpenter.md
@@ -18,6 +18,8 @@ You can optionally customize the Helm chart that deploys `Karpenter` via the fol
enable_karpenter = true
# Queue optional for native handling of instance termination events
karpenter_sqs_queue_arn = "arn:aws:sqs:us-west-2:444455556666:queue1"
+ # Optional to add name prefix for Karpenter's event bridge rules
+ karpenter_event_rule_name_prefix = "Karpenter"
# Optional karpenter_helm_config
karpenter_helm_config = {
name = "karpenter"
diff --git a/modules/kubernetes-addons/README.md b/modules/kubernetes-addons/README.md
index 2d682a152c..77db0ca5af 100644
--- a/modules/kubernetes-addons/README.md
+++ b/modules/kubernetes-addons/README.md
@@ -274,6 +274,7 @@
| [irsa\_iam\_permissions\_boundary](#input\_irsa\_iam\_permissions\_boundary) | IAM permissions boundary for IRSA roles | `string` | `""` | no |
| [irsa\_iam\_role\_path](#input\_irsa\_iam\_role\_path) | IAM role path for IRSA roles | `string` | `"/"` | no |
| [karpenter\_enable\_spot\_termination\_handling](#input\_karpenter\_enable\_spot\_termination\_handling) | Determines whether to enable native spot termination handling | `bool` | `false` | no |
+| [karpenter\_event\_rule\_name\_prefix](#input\_karpenter\_event\_rule\_name\_prefix) | Prefix used for karpenter event bridge rules | `string` | `"Karpenter"` | no |
| [karpenter\_helm\_config](#input\_karpenter\_helm\_config) | Karpenter autoscaler add-on config | `any` | `{}` | no |
| [karpenter\_irsa\_policies](#input\_karpenter\_irsa\_policies) | Additional IAM policies for a IAM role for service accounts | `list(string)` | `[]` | no |
| [karpenter\_node\_iam\_instance\_profile](#input\_karpenter\_node\_iam\_instance\_profile) | Karpenter Node IAM Instance profile id | `string` | `""` | no |
diff --git a/modules/kubernetes-addons/karpenter/README.md b/modules/kubernetes-addons/karpenter/README.md
index 5342000c07..cfb717a003 100644
--- a/modules/kubernetes-addons/karpenter/README.md
+++ b/modules/kubernetes-addons/karpenter/README.md
@@ -48,6 +48,7 @@ For more details checkout [Karpenter](https://karpenter.sh/docs/getting-started/
| [manage\_via\_gitops](#input\_manage\_via\_gitops) | Determines if the add-on should be managed via GitOps. | `bool` | `false` | no |
| [node\_iam\_instance\_profile](#input\_node\_iam\_instance\_profile) | Karpenter Node IAM Instance profile id | `string` | `""` | no |
| [path](#input\_path) | Path in which to create the Karpenter policy | `string` | `"/"` | no |
+| [rule\_name\_prefix](#input\_rule\_name\_prefix) | Prefix used for all event bridge rules | `string` | `"Karpenter"` | no |
| [sqs\_queue\_kms\_data\_key\_reuse\_period\_seconds](#input\_sqs\_queue\_kms\_data\_key\_reuse\_period\_seconds) | The length of time, in seconds, for which Amazon SQS can reuse a data key to encrypt or decrypt messages before calling AWS KMS again | `number` | `null` | no |
| [sqs\_queue\_kms\_master\_key\_id](#input\_sqs\_queue\_kms\_master\_key\_id) | The ID of an AWS-managed customer master key (CMK) for Amazon SQS or a custom CMK | `string` | `null` | no |
| [sqs\_queue\_managed\_sse\_enabled](#input\_sqs\_queue\_managed\_sse\_enabled) | Enable server-side encryption (SSE) for a SQS queue | `bool` | `true` | no |
diff --git a/modules/kubernetes-addons/karpenter/main.tf b/modules/kubernetes-addons/karpenter/main.tf
index 70382bf450..99465519ae 100644
--- a/modules/kubernetes-addons/karpenter/main.tf
+++ b/modules/kubernetes-addons/karpenter/main.tf
@@ -37,7 +37,7 @@ resource "aws_sqs_queue_policy" "this" {
resource "aws_cloudwatch_event_rule" "this" {
for_each = { for k, v in local.event_rules : k => v if var.enable_spot_termination }
- name = each.value.name
+ name_prefix = "${var.rule_name_prefix}-${each.value.name}-"
description = each.value.description
event_pattern = jsonencode(each.value.event_pattern)
tags = merge(
diff --git a/modules/kubernetes-addons/karpenter/variables.tf b/modules/kubernetes-addons/karpenter/variables.tf
index 21daffef11..e133d6301e 100644
--- a/modules/kubernetes-addons/karpenter/variables.tf
+++ b/modules/kubernetes-addons/karpenter/variables.tf
@@ -68,3 +68,9 @@ variable "sqs_queue_kms_data_key_reuse_period_seconds" {
type = number
default = null
}
+
+variable "rule_name_prefix" {
+ description = "Prefix used for all event bridge rules"
+ type = string
+ default = "Karpenter"
+}
diff --git a/modules/kubernetes-addons/main.tf b/modules/kubernetes-addons/main.tf
index 15e842b308..8f301570db 100644
--- a/modules/kubernetes-addons/main.tf
+++ b/modules/kubernetes-addons/main.tf
@@ -321,6 +321,7 @@ module "karpenter" {
irsa_policies = var.karpenter_irsa_policies
node_iam_instance_profile = var.karpenter_node_iam_instance_profile
enable_spot_termination = var.karpenter_enable_spot_termination_handling
+ rule_name_prefix = var.karpenter_event_rule_name_prefix
manage_via_gitops = var.argocd_manage_add_ons
addon_context = local.addon_context
sqs_queue_managed_sse_enabled = var.sqs_queue_managed_sse_enabled
diff --git a/modules/kubernetes-addons/variables.tf b/modules/kubernetes-addons/variables.tf
index 7ca52ca2e0..9012b54b9c 100644
--- a/modules/kubernetes-addons/variables.tf
+++ b/modules/kubernetes-addons/variables.tf
@@ -911,6 +911,12 @@ variable "karpenter_enable_spot_termination_handling" {
default = false
}
+variable "karpenter_event_rule_name_prefix" {
+ description = "Prefix used for karpenter event bridge rules"
+ type = string
+ default = "Karpenter"
+}
+
variable "sqs_queue_managed_sse_enabled" {
description = "Enable server-side encryption (SSE) for a SQS queue"
type = bool