terraform-provider-aws
terraform-provider-aws copied to clipboard
InvalidParameterException : aws_eks_addon
Community Note
- Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
- Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
- If you are interested in working on this issue or have submitted a pull request, please leave a comment
Terraform CLI and Terraform AWS Provider Version
AWS provider Version : * v3.75.2 Terraform Version : 1.1.9
Affected Resource(s)
EKS EBS-CSI-DRIVER
Terraform Configuration Files
Please include all Terraform configurations required to reproduce the bug. Bug reports without a functional reproduction may be closed without investigation.
resource "aws_eks_addon" "ebs-csi" {
depends_on = [aws_iam_openid_connect_provider.energyip-eks-cluster]
cluster_name = aws_eks_cluster.eks-cluster.name
addon_name = "aws-ebs-csi-driver"
}
Debug Output
Error: error creating EKS Add-On (eks-cluster:aws-ebs-csi-driver): InvalidParameterException: Addon version specified is not supported for the cluster platform version { RespMetadata: { StatusCode: 400, RequestID: "bee03bf4-7239-42a1-acec-29c4ae659cf8" }, AddonName: "aws-ebs-csi-driver", ClusterName: "eks-cluster", Message_: "Addon version specified is not supported for the cluster platform version" }
Panic Output
Expected Behavior
The above code should deploy the ebs-csi driver as per the cluster version. In my case the EKS cluster version is : 1.22
Actual Behavior
Error: error creating EKS Add-On (eks-cluster:aws-ebs-csi-driver): InvalidParameterException: Addon version specified is not supported for the cluster platform version
Steps to Reproduce
-
terraform apply
Important Factoids
References
- #0000
As per the doc "[addon_version]" is optional and I guess it should pick the latest available version in the cluster.
Hi @khirodpatra - I'm unable to reproduce this using the latest version of the Terraform provider (4.36.1). When I use the following TF code, I see the addon successfully created at version v1.11.4-eksbuild.1
:
resource "aws_eks_addon" "ebs-csi" {
cluster_name = aws_eks_cluster.example.name
addon_name = "aws-ebs-csi-driver"
}