-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Closed
Description
I have issues
I'm submitting a...
- bug report
- feature request
- support request - read the FAQ first!
- kudos, thank you, warm fuzzy
What is the current behavior?
On Creating with the following options
cluster gets created nicely but on destroy it throws
**Error: Creating CloudWatch Log Group failed: ResourceAlreadyExistsException: The specified log group already exists: The CloudWatch Log Group '/aws/eks/test-eks/cluster' already exists.
on .terraform/modules/eks-cluster/terraform-aws-eks-12.1.0/cluster.tf line 1, in resource "aws_cloudwatch_log_group" "this":
1: resource "aws_cloudwatch_log_group" "this" {**
module "eks-cluster" {
source = "terraform-aws-modules/eks/aws"
create_eks = lookup(var.eks_params, "createeks")
cluster_name = lookup(var.eks_params, "cluster_name")
cluster_version = lookup(var.eks_params, "cluster_version")
subnets = module.vpc.public_subnets
vpc_id = module.vpc.vpc_id
cluster_enabled_log_types = ["api", "audit", "authenticator", "controllerManager", "scheduler"]
enable_irsa = lookup(var.eks_params, "enable_irsa")
worker_groups = [
{
name = "worker-group-1"
instance_type = "t2.medium"
asg_desired_capacity = 1
asg_max_size = 5
tags = [
{
"key" = "k8s.io/cluster-autoscaler/enabled"
"propagate_at_launch" = "true"
"value" = "true"
},
{
"key" = "k8s.io/cluster-autoscaler/${lookup(var.eks_params, "cluster_name")}"
"propagate_at_launch" = "true"
"value" = "true"
}
]
},
{
name = "worker-group-2"
instance_type = "t2.medium"
asg_desired_capacity = 2
asg_max_size = 5
tags = [
{
"key" = "k8s.io/cluster-autoscaler/enabled"
"propagate_at_launch" = "true"
"value" = "true"
},
{
"key" = "k8s.io/cluster-autoscaler/${lookup(var.eks_params, "cluster_name")}"
"propagate_at_launch" = "true"
"value" = "true"
}
]
}
]
}
If this is a bug, how to reproduce? Please include a code sample if relevant.
Create with the above options and destroy
What's the expected behavior?
The Destroy should take care of the Cloudwatch Log Group created with the options.
Are you able to fix this problem and submit a PR? Link here if you have already.
NA
Environment details
- Affected module version: v12.1.0
- OS:
- Terraform version:
Terraform v0.12.24
provider.aws v2.66.0
provider.kubernetes v1.11.3
provider.local v1.4.0
provider.null v2.1.2
provider.random v2.2.1
provider.template v2.1.2
Any other relevant info
maiconbaumx, ZeroDeth, stevehipwell, nxf5025, xoanmi and 18 more
Metadata
Metadata
Assignees
Labels
No labels