Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Karpenter eventbridge naming #1483

Closed
wants to merge 6 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion modules/kubernetes-addons/karpenter/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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 = join("-", [each.value.name, var.addon_context.eks_cluster_id])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer using the name_prefix over a fixed name here. Similar to https://github.com/terraform-aws-modules/terraform-aws-eks/blob/c7565e265e23cbc622041fc153193f490cfe948f/modules/karpenter/main.tf#L270.

Suggested change
name = join("-", [each.value.name, var.addon_context.eks_cluster_id])
name_prefix = each.value.name

description = each.value.description
event_pattern = jsonencode(each.value.event_pattern)
tags = merge(
Expand Down