feat: Allow to pass prefix for rule names (#2437)

This commit is contained in:
Omer Levi Hevroni
2023-02-07 14:04:45 +02:00
committed by GitHub
parent a8e0de0b3f
commit 68fe60f1c4
3 changed files with 12 additions and 1 deletions

View File

@@ -261,7 +261,7 @@ locals {
resource "aws_cloudwatch_event_rule" "this" {
for_each = { for k, v in local.events : k => v if local.enable_spot_termination }
name_prefix = "Karpenter${each.value.name}-"
name_prefix = "${var.rule_name_prefix}${each.value.name}-"
description = each.value.description
event_pattern = jsonencode(each.value.event_pattern)