Our current Terraform asks for the URL of an OIDC provider that is already associated with the cluster. Our most common use-case is to associate the OIDC provider AWS creates along with the cluster and then use that for IRSA. We should be able to do that association in the iamserviceaccounts module by declaring an aws_eks_cluster data source, then creating an aws_iam_openid_connect_provider resource that refers to the identity attribute from the cluster data source.
Our current Terraform asks for the URL of an OIDC provider that is already associated with the cluster. Our most common use-case is to associate the OIDC provider AWS creates along with the cluster and then use that for IRSA. We should be able to do that association in the
iamserviceaccounts
module by declaring anaws_eks_cluster
data source, then creating anaws_iam_openid_connect_provider
resource that refers to theidentity
attribute from the cluster data source.