#cloudposse (2024-01)

<http://cloudposse.com/quizcloudposse.com/quiz>

Want to hire Cloud Posse? Take our quiz. <http://cloudposse.com/quizcloudposse.com/quiz>

2024-01-12

Sean Faria avatar
Sean Faria

Hey everyone, I am running into an error when trying running module "eks_cluster" { source = "cloudposse/eks-cluster/aws" Does anyone have any idea about this?

╷
│ Error: Value Conversion Error
│ 
│   with module.eks_cluster.provider["registry.terraform.io/hashicorp/kubernetes"],
│   on .terraform/modules/eks_cluster/auth.tf line 96, in provider "kubernetes":
│   96: provider "kubernetes" {
│ 
│ An unexpected error was encountered trying to build a value. This is always an error in the provider. Please report the following to the provider developer:
│ 
│ Received unknown value, however the target type cannot handle unknown values. Use the corresponding `types` package type or a custom type that handles unknown values.
│ 
│ Path: exec
│ Target Type: []struct { APIVersion basetypes.StringValue "tfsdk:\"api_version\""; Command basetypes.StringValue "tfsdk:\"command\""; Env map[string]basetypes.StringValue "tfsdk:\"env\""; Args []basetypes.StringValue "tfsdk:\"args\"" }
│ Suggested Type: basetypes.ListValue
Andriy Knysh (Cloud Posse) avatar
Andriy Knysh (Cloud Posse)

pin the kubernetes provider to 2.24.0

Andriy Knysh (Cloud Posse) avatar
Andriy Knysh (Cloud Posse)

in 2.25.0 they changed a lot of things, switched to the newer TF plugins framework, and the module was broken (but only when creating new EKS cluster, it works on existing ones)

Sean Faria avatar
Sean Faria

hmm i assumed it was because of the auth.tf since why would it try to authenticate before the cluster is created. Let me try you suggestion

Andriy Knysh (Cloud Posse) avatar
Andriy Knysh (Cloud Posse)

yes, it’s related to auth.tf only when creating new clusters using kubenetes provider 2.25.1 (all after 2.24.0)

Sean Faria avatar
Sean Faria

it didn’t solve it, but i ran the following first and it resolved it: terragrunt apply -target=module.eks_cluster.aws_eks_cluster.default[0] So i think it may be a combination. I think i will create a bug report Thanks again

Andriy Knysh (Cloud Posse) avatar
Andriy Knysh (Cloud Posse)

you probably didn’t clear the tf cache and the lock file, so the cached provider was used

Sean Faria avatar
Sean Faria

okay, I will let you know since i will be doing this about 5 times today

    keyboard_arrow_up