Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,7 @@ We are grateful to the community for contributing bugfixes and improvements! Ple
| <a name="input_cluster_additional_security_group_ids"></a> [cluster\_additional\_security\_group\_ids](#input\_cluster\_additional\_security\_group\_ids) | List of additional, externally created security group IDs to attach to the cluster control plane | `list(string)` | `[]` | no |
| <a name="input_cluster_addons"></a> [cluster\_addons](#input\_cluster\_addons) | Map of cluster addon configurations to enable for the cluster. Addon name can be the map keys or set with `name` | `any` | `{}` | no |
| <a name="input_cluster_addons_timeouts"></a> [cluster\_addons\_timeouts](#input\_cluster\_addons\_timeouts) | Create, update, and delete timeout configurations for the cluster addons | `map(string)` | `{}` | no |
| <a name="input_cluster_cloudwatch_log_group_use_name_prefix"></a> [cluster\_cloudwatch\_log\_group\_use\_name\_prefix](#input\_cluster\_cloudwatch\_log\_group\_use\_name\_prefix) | Determines whether cluster cloudwatch log group name (`/aws/eks/${var.cluster_name}/cluster`) is used as a prefix | `bool` | `true` | no |
| <a name="input_cluster_compute_config"></a> [cluster\_compute\_config](#input\_cluster\_compute\_config) | Configuration block for the cluster compute configuration | `any` | `{}` | no |
| <a name="input_cluster_enabled_log_types"></a> [cluster\_enabled\_log\_types](#input\_cluster\_enabled\_log\_types) | A list of the desired control plane logs to enable. For more information, see Amazon EKS Control Plane Logging documentation (https://docs.aws.amazon.com/eks/latest/userguide/control-plane-logs.html) | `list(string)` | <pre>[<br/> "audit",<br/> "api",<br/> "authenticator"<br/>]</pre> | no |
| <a name="input_cluster_encryption_config"></a> [cluster\_encryption\_config](#input\_cluster\_encryption\_config) | Configuration block with encryption configuration for the cluster. To disable secret encryption, set this value to `{}` | `any` | <pre>{<br/> "resources": [<br/> "secrets"<br/> ]<br/>}</pre> | no |
Expand Down
4 changes: 3 additions & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,9 @@ resource "aws_ec2_tag" "cluster_primary_security_group" {
resource "aws_cloudwatch_log_group" "this" {
count = local.create && var.create_cloudwatch_log_group ? 1 : 0

name = "/aws/eks/${var.cluster_name}/cluster"
name = var.cluster_cloudwatch_log_group_use_name_prefix ? null : "/aws/eks/${var.cluster_name}/cluster"
name_prefix = var.cluster_cloudwatch_log_group_use_name_prefix ? "/aws/eks/${var.cluster_name}/cluster${var.prefix_separator}" : null

retention_in_days = var.cloudwatch_log_group_retention_in_days
kms_key_id = var.cloudwatch_log_group_kms_key_id
log_group_class = var.cloudwatch_log_group_class
Expand Down
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,12 @@ variable "cloudwatch_log_group_tags" {
default = {}
}

variable "cluster_cloudwatch_log_group_use_name_prefix" {
description = "Determines whether cluster cloudwatch log group name (`/aws/eks/$${var.cluster_name}/cluster`) is used as a prefix"
type = bool
default = true
}

################################################################################
# Cluster Security Group
################################################################################
Expand Down