mirror of
https://github.com/ysoftdevs/terraform-aws-eks.git
synced 2026-01-11 22:41:43 +01:00
feat: Allow to pass prefix for rule names (#2437)
This commit is contained in:
committed by
GitHub
parent
a8e0de0b3f
commit
68fe60f1c4
@@ -172,6 +172,7 @@ No modules.
|
||||
| <a name="input_queue_kms_master_key_id"></a> [queue\_kms\_master\_key\_id](#input\_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 |
|
||||
| <a name="input_queue_managed_sse_enabled"></a> [queue\_managed\_sse\_enabled](#input\_queue\_managed\_sse\_enabled) | Boolean to enable server-side encryption (SSE) of message content with SQS-owned encryption keys | `bool` | `true` | no |
|
||||
| <a name="input_queue_name"></a> [queue\_name](#input\_queue\_name) | Name of the SQS queue | `string` | `null` | no |
|
||||
| <a name="input_rule_name_prefix"></a> [rule\_name\_prefix](#input\_rule\_name\_prefix) | Prefix used for all event bridge rules | `string` | `"Karpenter"` | no |
|
||||
| <a name="input_tags"></a> [tags](#input\_tags) | A map of tags to add to all resources | `map(string)` | `{}` | no |
|
||||
|
||||
## Outputs
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -224,3 +224,13 @@ variable "create_instance_profile" {
|
||||
type = bool
|
||||
default = true
|
||||
}
|
||||
|
||||
################################################################################
|
||||
# Event Bridge Rules
|
||||
################################################################################
|
||||
|
||||
variable "rule_name_prefix" {
|
||||
description = "Prefix used for all event bridge rules"
|
||||
type = string
|
||||
default = "Karpenter"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user