learn-terraform-provision-eks-cluster icon indicating copy to clipboard operation
learn-terraform-provision-eks-cluster copied to clipboard

Why do you use `aws_eks_addon` instead of the eks module parameter?

Open brsolomon-deloitte opened this issue 1 year ago • 1 comments

This example uses

https://github.com/hashicorp/learn-terraform-provision-eks-cluster/blob/27e7dda1c011a933b2652a0067160ccd3e6194a7/main.tf#L102

rather than the cluster_addons parameter that is already a part of the terraform-aws-modules/eks/aws module.

Can you please document the reasoning behind using the resource directly rather than the module parameter?

Otherwise, it is unclear why users would prefer one over the other.

brsolomon-deloitte avatar Mar 22 '23 17:03 brsolomon-deloitte

Hi @brsolomon-deloitte! Sorry for letting this sit so long. The reasoning, as best I can tell, is that when the tutorial was initially written the EKS module didn't support the cluster_addons input. I do think you raise a good point though, the code should be updated to reflect the leverage this feature of the module. I'm refreshing this example code now and will update this as part of #113. Thanks!

BrianMMcClain avatar Feb 16 '24 18:02 BrianMMcClain

│ Error: creating EKS Add-On (education-eks-*:aws-ebs-csi-driver): AccessDeniedException: User is not authorized to perform this action │ │ with aws_eks_addon.ebs-csi, │ on main.tf line 109, in resource "aws_eks_addon" "ebs-csi": │ 109: resource "aws_eks_addon" "ebs-csi" { │ ╵ Operation failed: failed running terraform apply (exit 1)

By the way, It seems the version(4.7.0) of irsa-ebs-csi module is somehow not working. After I upgraded the version to 5.39.0, it works.

lazyduo avatar Apr 11 '24 03:04 lazyduo

Thanks @lazyduo! I'm (finally 😅) returning to cleaning this example up today so I'll make sure we re-bump everything up to the latest version 😄

BrianMMcClain avatar May 03 '24 14:05 BrianMMcClain