Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Value Conversion Error #2441

Open
gberenice opened this issue Mar 11, 2024 · 1 comment
Open

Error: Value Conversion Error #2441

gberenice opened this issue Mar 11, 2024 · 1 comment
Labels

Comments

@gberenice
Copy link

Terraform Version, Provider Version and Kubernetes Version

Terraform version: 1.7
Kubernetes provider version: v2.27.0
Kubernetes version: 1.25

Affected Resource(s)

  • provider configuration

Terraform Configuration Files

module "eks_cluster" {
  source                       = "cloudposse/eks-cluster/aws"
  version                      = "2.9.0"
  region                       = var.region
  vpc_id                       = module.vpc.vpc_id
  subnet_ids                   = module.subnets.public_subnet_ids
  kubernetes_version           = var.kubernetes_version
  local_exec_interpreter       = var.local_exec_interpreter
  oidc_provider_enabled        = var.oidc_provider_enabled
  enabled_cluster_log_types    = var.enabled_cluster_log_types
  cluster_log_retention_period = var.cluster_log_retention_period

  # data auth has problems destroying the auth-map
  kube_data_auth_enabled = false
  kube_exec_auth_enabled = true

  context = module.this.context
}

Steps to Reproduce

  1. terraform apply when creating new clusters

Expected Behavior

Apply succeeded.

Actual Behavior

│ 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
╵}

Important Factoids

A workaround is to pin the Kubernetes provider to 2.24.0.

References

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment
@gberenice gberenice added the bug label Mar 11, 2024
@nitrocode
Copy link

I got the same error in the latest release v2.29.0

Thank you for documenting that 2.24.0 works as that unblocked us.

There were a lot of changes between v2.24.0...v2.25.0

cc'ing the contributors from 2.25.0: @arybolovlev @SarahFrench @jrhouston @andremarianiello @BBBmau @wonko (sorry for the ping but this seems like a bad regression if you folks are unaware)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants