Comments (1)
@jfelten Any update on this, if you can please help.
facing same issue.
can anyone please help me ?
using to create the EKS cluster
main.tf
locals {
namespace = "test"
stage = "dev"
kubernetes_version = "1.20"
tags = merge(module.label.tags, tomap({ "kubernetes.io/cluster/${module.label.id}" = "shared" }))
eks_worker_ami_name_filter = "amazon-eks-node-${local.kubernetes_version}*"
public_subnets_additional_tags = {
"kubernetes.io/role/elb" : 1
}
private_subnets_additional_tags = {
"kubernetes.io/role/internal-elb" : 1
}
}
module "label" {
source = "cloudposse/label/null"
version = "0.24.1"
attributes = ["${local.namespace}-${local.stage}-cluster"]
}
module "eks_cluster" {
source = "cloudposse/eks-cluster/aws"
version = "0.39.0"
namespace = local.namespace
stage = local.stage
tags = local.tags
region = "REGION"
vpc_id = data.terraform_remote_state.vpc.outputs.vpc.vpc_id
subnet_ids = concat(module.subnets.private_subnet_ids, module.subnets.public_subnet_ids)
kubernetes_version = local.kubernetes_version
local_exec_interpreter = ["/bin/sh", "-c"]
oidc_provider_enabled = true
enabled_cluster_log_types = ["api"]
cluster_log_retention_period = 7
cluster_encryption_config_enabled = true
cluster_encryption_config_kms_key_id = ""
cluster_encryption_config_kms_key_enable_key_rotation = true
cluster_encryption_config_kms_key_deletion_window_in_days = 30
cluster_encryption_config_kms_key_policy = null
cluster_encryption_config_resources = ["secrets"]
kubernetes_config_map_ignore_role_changes = var.kubernetes_config_map_ignore_role_changes
workers_role_arns = var.existing_worker_role_arns
}
module "eks_node_group" {
source = "cloudposse/eks-node-group/aws"
version = "0.20.0"
namespace = local.namespace
stage = local.stage
tags = local.tags
subnet_ids = module.subnets.private_subnet_ids
cluster_name = (var.existing_cluster_name == "" ?
module.eks_cluster.eks_cluster_id
: var.existing_cluster_name)
instance_types = var.instance_types
desired_size = var.desired_size
min_size = var.min_size
max_size = var.max_size
disk_size = var.vm_pd_ssd_size
}
mydata.tf
data "null_data_source" "wait_for_cluster_and_kubernetes_configmap" {
inputs = {
cluster_name = module.eks_cluster.eks_cluster_id
kubernetes_config_map_id = module.eks_cluster.kubernetes_config_map_id
}
}
data "aws_eks_cluster" "cluster" {
name = (var.existing_cluster_name == "" ?
module.eks_cluster.eks_cluster_id
: var.existing_cluster_name)
}
data "aws_eks_cluster_auth" "eks" {
name = (var.existing_cluster_name == "" ? data.null_data_source.wait_for_cluster_and_kubernetes_configmap.outputs["cluster_name"]
: var.existing_cluster_name)
}
data "terraform_remote_state" "xyz" {
backend = "s3"
config = {
bucket = "BUCKET-name"
key = "state-key"
region = "REGION"
}
}
varible.tf
variable "kubernetes_config_map_ignore_role_changes" {
type = bool
default = true
}
variable "existing_cluster_name" {
type = string
default = ""
}
i am able to create the cluster but getting the error when re-applying some changes.
Error: configmaps "aws-auth" already exists
│
│ with module.eks_cluster.kubernetes_config_map.aws_auth_ignore_changes[0],
│ on .terraform/modules/eks_cluster/auth.tf line 83, in resource "kubernetes_config_map" "aws_auth_ignore_changes":
│ 83: resource "kubernetes_config_map" "aws_auth_ignore_changes" {
Note : while re-applying updating the value in varibles.tf
for existing cluster with name of cluster.
Anyone faced this error before ?
Thanks in advance.
from terraform-aws-eks-cluster.
Related Issues (20)
- Fails to save tfstate after cluster creation due to eks misconfiguration
- Inconsistent apply involving `encryption_config` `key_arn`
- Use new terraform resource kubernetes_config_map_v1_data for managing aws_auth data HOT 1
- add IAM policy to IAM role HOT 1
- Add log group encryption
- Unable to add additional iam roles to cluster HOT 8
- Issue with kubernetes provider configuration when doing destroy
- Favour eks_cluster_managed_security_group_id output in documentation, instead of security_group_id
- Broken links in readme page
- "aws-auth" is forbidden: User "system:anonymous" cannot get resource HOT 8
- Rare edge case: Protect kubernetes_config_map from being destroyed HOT 7
- Save the cluster creator role HOT 2
- Addons race condition with a nodegroup
- Don't force naming to end with -cluster (attributes)
- cloudwatch log group: retention is going to never expire state even after giving particular number
- enable the ability to change the kubernetes API version from vars HOT 2
- Conflicting arguments with Kubernetes provider 2.21.0 HOT 3
- "aws-auth" is forbidden in the namespace "kube-system" HOT 4
- hashicorp/kubernetes provider v2.25.0 breaks "cloudposse/eks-cluster/aws" module HOT 2
- Support new `authentication_mode` config for eks_cluster HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from terraform-aws-eks-cluster.