Skip to content
This repository has been archived by the owner on Aug 11, 2021. It is now read-only.

Over-constrained schema of exec block in provider configuration #223

Open
alexsomesan opened this issue Jun 4, 2021 · 0 comments
Open
Labels
bug Something isn't working

Comments

@alexsomesan
Copy link
Member

Terraform, Provider, Kubernetes versions

Terraform version: v0.15.5
Provider version: 0.4.1
Kubernetes version: any

Affected Resource(s)

Provider configuration

Terraform Configuration Files

provider "kubernetes-alpha" {
  host                   = data.aws_eks_cluster.cluster.endpoint
  cluster_ca_certificate = base64decode(data.aws_eks_cluster.cluster.certificate_authority.0.data)
  
   exec = {
     api_version = "client.authentication.k8s.io/v1alpha1"
     command     = "aws"
     args = [
       "eks",
       "get-token",
       "--cluster-name",
       data.aws_eks_cluster.cluster.name
     ]
   }
}

Debug Output

Error: Incorrect attribute value type
  on modules/terraform-eks-runner-module/providers.tf line 19, in provider "kubernetes-alpha":
  19:   exec = {
  20:     api_version = "client.authentication.k8s.io/v1alpha1"
  21:     command     = "aws"
  22:     args = [
  23:       "eks",
  24:       "get-token",
  25:       "--cluster-name",
  26:       data.aws_eks_cluster.cluster.name
  27:     ]
  28:   }
Inappropriate value for attribute "exec": attribute "env" is required.
Error: Terraform exited with code 1.
Error: Process completed with exit code 1

Panic Output

Steps to Reproduce

Expected Behavior

env attribute should not be mandatory in the exec block.

Actual Behavior

Provider requires users to specify empty env = {} attribute even when no environment values are needed.

Important Factoids

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
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant