Kubernetes provider setup breaks when the provider version is upgraded to v1.11
Provider configuration
provider "kubernetes" {
host = data.aws_eks_cluster.cluster.endpoint
cluster_ca_certificate = base64decode(data.aws_eks_cluster.cluster.certificate_authority.0.data)
token = data.aws_eks_cluster_auth.cluster.token
load_config_file = false
version = "~>1.9"
}
terraform init

terraform plan

Plan should work
Terraform v0.12.19
The Terraform provider for Kubernetes mistakenly had a breaking change in their most recent minor version, v1.11.0 See https://github.com/terraform-providers/terraform-provider-kubernetes/issues/759 for more details.
For now the best solution in the case of this module is just to pin to 1.10.0:
provider "kubernetes" {
host = data.aws_eks_cluster.cluster.endpoint
cluster_ca_certificate = base64decode(data.aws_eks_cluster.cluster.certificate_authority.0.data)
token = data.aws_eks_cluster_auth.cluster.token
load_config_file = false
version = "1.10.0"
}
I originally also used the above syntax as well, mistakenly assuming it would include 1.10 patch releases only, but that gave me provider version 1.11.0. So use:
version = "1.10.0"
I got the same issue. To fix it I rolled back to version 1.10.0. Hope it gets fixed soon.
provider "kubernetes" {
host = data.aws_eks_cluster.cluster.endpoint
cluster_ca_certificate = base64decode(data.aws_eks_cluster.cluster.certificate_authority.0.data)
token = data.aws_eks_cluster_auth.cluster.token
load_config_file = false
version = "1.10.0"
}
Kubernetes provider v1.11.1 fixes this issue.
Most helpful comment
The Terraform provider for Kubernetes mistakenly had a breaking change in their most recent minor version, v1.11.0 See https://github.com/terraform-providers/terraform-provider-kubernetes/issues/759 for more details.
For now the best solution in the case of this module is just to pin to 1.10.0: