Terraform-aws-eks: Kubernetes provider setup broken for version 1.11

Created on 11 Feb 2020  路  4Comments  路  Source: terraform-aws-modules/terraform-aws-eks

I have issues

I'm submitting a...

  • [x] bug report
  • [ ] feature request
  • [x] support request - read the FAQ first!
  • [ ] kudos, thank you, warm fuzzy

What is the current behavior?

Kubernetes provider setup breaks when the provider version is upgraded to v1.11

If this is a bug, how to reproduce? Please include a code sample if relevant.

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
image

terraform plan
image

What's the expected behavior?

Plan should work

Are you able to fix this problem and submit a PR? Link here if you have already.

Environment details

Terraform v0.12.19

  • provider.aws v2.48.0
  • provider.kubernetes v1.11.0
  • provider.local v1.4.0
  • provider.null v2.1.2
  • provider.random v2.2.1
  • provider.template v2.1.2
  • OS: Darwin

Any other relevant info

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:

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"
}

All 4 comments

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.

Was this page helpful?
0 / 5 - 0 ratings