Reputation: 8162
My eks.tf file
data "aws_availability_zones" "azs" {}
module "myapp-vpc" {
source = "terraform-aws-modules/vpc/aws"
version = "3.7.0"
name = "myapp-vpc"
cidr = var.vpc_cidr_block
private_subnets = var.private_subnets_cidr_blocks
public_subnets = var.public_subnets_cidr_blocks
azs = data.aws_availability_zones.azs.names
enable_nat_gateway = true
single_nat_gateway = true
enable_dns_hostnames = true
tags = {
"kubernetes.io/cluster/myapp-cluster" = "shared"
}
private_subnet_tags = {
"kubernetes.io/cluster/myapp-cluster" = "shared"
"kubernetes.io/role/internal-elb" = 1
}
public_subnet_tags = {
"kubernetes.io/cluster/myapp-cluster" = "shared"
"kubernetes.io/role/elb" = 1
}
I got this error
│ Error: error creating EKS Cluster (myapp-cluster): InvalidParameterException: unsupported Kubernetes version
│ {
│ RespMetadata: {
│ StatusCode: 400,
│ RequestID: "073bff37-1d18-4d11-82c9-226b92791a70"
│ },
│ ClusterName: "myapp-cluster",
│ Message_: "unsupported Kubernetes version"
│ }
│
│ with module.eks.aws_eks_cluster.this[0],
│ on .terraform/modules/eks/main.tf line 11, in resource "aws_eks_cluster" "this":
│ 11: resource "aws_eks_cluster" "this" {
I went for terraform init and plan. What should I check in my terraform.tfstate file?
Upvotes: 0
Views: 2306
Reputation: 84
Have you tried to change the versions of kubernetes/cluster? I had the same issue and I changed the version of the cluster and it worked.
Upvotes: 2