Skip to content

17.24.0 - Error: configmaps "aws-auth" already exists #1702

@qxmips

Description

@qxmips

Description

eks module v17.24.0 fails to module.eks.kubernetes_config_map.aws_auth[0]

Error: configmaps "aws-auth" already exists
with module.eks.kubernetes_config_map.aws_auth[0]
on .terraform/modules/eks/aws_auth.tf line 63, in resource "kubernetes_config_map" "aws_auth":
resource "kubernetes_config_map" "aws_auth" {

Versions

  • Terraform: 1.0.11
  • Provider(s):
    Terraform v1.0.11
    on linux_amd64
  • provider registry.terraform.io/hashicorp/aws v3.66.0
  • provider registry.terraform.io/hashicorp/cloudinit v2.2.0
  • provider registry.terraform.io/hashicorp/kubernetes v2.6.1
  • provider registry.terraform.io/hashicorp/local v2.1.0
  • provider registry.terraform.io/hashicorp/random v3.1.0
  • provider registry.terraform.io/hashicorp/template v2.2.0
  • provider registry.terraform.io/hashicorp/tls v3.1.0
  • provider registry.terraform.io/terraform-aws-modules/http v2.4.1
  • Module:

Reproduction

Steps to reproduce the behavior:
using was cloud workspace
terrafrom plan
terraform apply

Code Snippet to Reproduce


module "eks" {
  source                          = "terraform-aws-modules/eks/aws"
  version                         = "17.24.0"
  cluster_name                    = local.cluster_name
  cluster_version                 = var.cluster_version
  vpc_id                          = local.vpc_id
  subnets                         = setunion(local.private_subnets_ids, local.public_subnets_ids)
  write_kubeconfig                = var.write_kubeconfig
  enable_irsa                     = true
  manage_worker_iam_resources     = true
  cluster_endpoint_private_access = var.enable_cluster_endpoint_private_access
  cluster_endpoint_public_access  = var.enable_cluster_endpoint_public_access
  cluster_enabled_log_types       = var.cluster_enabled_log_types
  cluster_log_retention_in_days   = var.cluster_log_retention_in_days
  cluster_delete_timeout          = "60m"
  map_users                       = var.map_users
  map_roles                       = concat(var.map_roles, [local.cluster_admins])

  node_groups_defaults = {
    desired_capacity = 2
    max_capacity     = 3
    min_capacity     = 1
    instance_types   = var.instance_types
    key_name         = local.worker_key
    capacity_type    = "SPOT"

    update_config = {
      max_unavailable_percentage = 50
    }
  }

  node_groups = {

    "a" = {
      subnets     = data.aws_subnet_ids.private_subnets
      name_prefix = "spot-"
    }
}
}

Terminal Output Screenshot(s)

Error: configmaps "aws-auth" already exists
with module.eks.kubernetes_config_map.aws_auth[0]
on .terraform/modules/eks/aws_auth.tf line 63, in resource "kubernetes_config_map" "aws_auth":
resource "kubernetes_config_map" "aws_auth" {

Additional context

the same code works with previous module versions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions