hashicorp / terraform-provider-aws

The AWS Provider enables Terraform to manage AWS resources.
https://registry.terraform.io/providers/hashicorp/aws
Mozilla Public License 2.0
9.7k stars 9.07k forks source link

[Enhancement]: Add support for EKS Addon Pod Identity Associations #38357

Open JoeNorth opened 1 month ago

JoeNorth commented 1 month ago

Description

The EKS CreateAddon and UpdateAddon APIs have been updated to support adding a Pod Identity association to an addon using the podIdentityAssociations parameter.

Each API accepts this parameter in the form of:

{
   "podIdentityAssociations": [ 
      { 
         "roleArn": "string",
         "serviceAccount": "string"
      }
   ]
}

Affected Resource(s) and/or Data Source(s)

Potential Terraform Configuration

resource "aws_eks_addon" "example" {
  cluster_name           = aws_eks_cluster.example.name
  addon_name             = "vpc-cni"
  pod_identity_associations = [
    {
      roleArn = aws_iam_role.vpc_cni.arn
      serviceAccount = "aws-node"
    }
  ]
}

References

CreateAddon - https://docs.aws.amazon.com/eks/latest/APIReference/API_CreateAddon.html#AmazonEKS-CreateAddon-request-podIdentityAssociations

UpdateAddon - https://docs.aws.amazon.com/eks/latest/APIReference/API_UpdateAddon.html#AmazonEKS-UpdateAddon-request-podIdentityAssociations

Would you like to implement a fix?

No

github-actions[bot] commented 1 month ago

Community Note

Voting for Prioritization

Volunteering to Work on This Issue

bryantbiggs commented 1 month ago

on it

aristosvo commented 1 month ago

@bryantbiggs I've taken a quick look as well, didn't know the best way to make up for the difference in input variables and the returned ID string in the response. Curious what the way to go is in the AWS provider for such situations!