Skip to content

Commit

Permalink
Obsoleted creation of cloudwatch log-group for the cluster
Browse files Browse the repository at this point in the history
  • Loading branch information
dang0317 committed Dec 14, 2023
1 parent c61f3ba commit 423c84f
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 22 deletions.
23 changes: 12 additions & 11 deletions examples/full-cluster-tf-upgrade/1.25/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -50,17 +50,18 @@ locals {

# The log group name format is /aws/eks/<cluster-name>/cluster
# Reference: https://docs.aws.amazon.com/eks/latest/userguide/control-plane-logs.html
resource "aws_cloudwatch_log_group" "eks_cluster" {
name = format("/aws/eks/%v/cluster", var.cluster_name)
retention_in_days = 180

tags = merge(
local.base_tags,
local.common_tags,
var.tags,
var.application_tags,
)
}
# Obsolete: EKS cluster automatically creates the Cloudwatch log group
#resource "aws_cloudwatch_log_group" "eks_cluster" {
# name = format("/aws/eks/%v/cluster", var.cluster_name)
# retention_in_days = 180
#
# tags = merge(
# local.base_tags,
# local.common_tags,
# var.tags,
# var.application_tags,
# )
#}

# we changed endpoint_public_access to false by default. This is so we can reach the EKS API through private IPs
# from on-prem and from the cloud. Otherwise, another account outside of where this is created will be unable to
Expand Down
23 changes: 12 additions & 11 deletions examples/full-cluster-tf-upgrade/1.28/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -50,17 +50,18 @@ locals {

# The log group name format is /aws/eks/<cluster-name>/cluster
# Reference: https://docs.aws.amazon.com/eks/latest/userguide/control-plane-logs.html
resource "aws_cloudwatch_log_group" "eks_cluster" {
name = format("/aws/eks/%v/cluster", var.cluster_name)
retention_in_days = 180

tags = merge(
local.base_tags,
local.common_tags,
var.tags,
var.application_tags,
)
}
# Obsolete: EKS cluster automatically creates the Cloudwatch log group
#resource "aws_cloudwatch_log_group" "eks_cluster" {
# name = format("/aws/eks/%v/cluster", var.cluster_name)
# retention_in_days = 180
#
# tags = merge(
# local.base_tags,
# local.common_tags,
# var.tags,
# var.application_tags,
# )
#}

# we changed endpoint_public_access to false by default. This is so we can reach the EKS API through private IPs
# from on-prem and from the cloud. Otherwise, another account outside of where this is created will be unable to
Expand Down

0 comments on commit 423c84f

Please sign in to comment.