terraform plan fails with this error: Error: module.eks.aws_eks_cluster.this: : invalid or unknown key: enabled_cluster_log_types
Update version from 2.3.1 to 3.0.0, run terraform plan
module "eks" {
source = "terraform-aws-modules/eks/aws"
version = "3.0.0"
cluster_name = "${local.cluster_name}"
kubeconfig_name = "${local.cluster_name}"
subnets = "${local.subnets}"
tags = "${local.tags}"
vpc_id = "${local.vpc_id}"
cluster_endpoint_private_access = "${var.cluster_endpoint_private_access}"
cluster_enabled_log_types = []
worker_groups = "${local.worker_groups}"
worker_group_count = "${length(local.worker_groups)}"
map_users = "${local.map_users}"
map_roles = "${local.map_roles}"
map_users_count = "${length(local.map_users)}"
map_roles_count = "${length(local.map_roles)}"
write_aws_auth_config = "${var.write_aws_auth_config}"
write_kubeconfig = "${var.write_kubeconfig}"
# Set up the aws profile for aws-iam-authenticator:
kubeconfig_aws_authenticator_env_variables = {
AWS_PROFILE = "${var.aws_profile}"
}
}
terraform plan should succeed.
Yes
Looks like running a terraform init -upgrade=true updated the AWS provider form 2.4.0 to 2.6.0 and that fixed the issue.
Most helpful comment
Looks like running a
terraform init -upgrade=trueupdated the AWS provider form 2.4.0 to 2.6.0 and that fixed the issue.