-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Data Source to query return back a list of EKS Cluster OIDC urls #13719
Comments
Happy to pick this one up. Thinking about implementation, in the sdk there are two API calls for reading clusters: ListClusters and DescribeCluster. The former retrieves a list of cluster names in the region whereas the latter provides the detail of each cluster. Unfortunately there's no
This makes a lot of API calls, I'll raise some tickets for the addition of a DescribeClusters endpoint - will post them here once done. |
Update: I started working on a PR for this for the workaround specified above (while we are waiting for the API to be implemented - I raised a feature request with AWS for this). Hope to have the PR created soon so that it can be reviewed. |
Hello @jdheyburn, I was starting to write the needed datasource and then I found this issue. Just a little remark: EC2 example:
Would give us something like:
|
@Vince-Chenal I can push a PR for review, some of the tests still need to be verified though. As for the suggestion, it seems what you're proposing would have to make an additional API call unnecessarily.
We can skip the additional call altogether by returning everything that had already been described at the end of step 4. It seems to me |
I've added a draft PR @Vince-Chenal, just need to publish the output of acceptance testing. Once they've passed I'll open it ready for review. |
Hello @jdheyburn, I still think that it would be cleaner to take advantage of what's already implemented within the Are you still on it ? |
Hey @Vince-Chenal, sorry for the delay on this - I switched jobs inbetween and so lost track of this one. The draft PR I raised had the bulk of the work done, I just couldn't get the acceptance tests to pass. I'll see if I can get some time over the next couple of days to rebase and see if I can get them to pass. Re using code |
Hello here, I created this PR to implement the datasource the way I explained here. I did not implement any kind of filtering because the ListClusters does not allow it for now (https://docs.aws.amazon.com/sdk-for-go/api/service/eks/#ListClustersInput) and I wanted to keep it as simple as possible |
This functionality has been released in v3.59.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you! |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Community Note
Description
Our company has been looking into ways of implementing IAM roles for service accounts (IRSA) and were hoping we could simplify the discovery process of any newly create/destroyed EKS clusters through the use of tags.
By allowing us to return a list of AWS EKS clusters, we would be able to create the required IAM trust relationship.
For this to operate, it would involve:
New or Affected Resource(s)
Potential idea for the new data source:
Add New data source
eks_clusters
.Potential Terraform Configuration
References
The text was updated successfully, but these errors were encountered: