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.84k stars 9.19k forks source link

[Enhancement]: Get aws_eks_cluster and aws_eks_cluster_auth data sources via cluster tags #27840

Open dreinhardt89 opened 2 years ago

dreinhardt89 commented 2 years ago

Description

We currently use random_pet generation for out cluster names so we don't always know what our cluster names are going to be. It would be helpful if we could get the datasources for aws_eks_cluster and aws_eks_cluster_auth via tags.

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

Potential Terraform Configuration

data "aws_eks_cluster_auth" "selected" {
  tags = {
    Environment = "Development"
  }
}

data "aws_eks_cluster" "selected" {
  tags = {
    Environment = "Development"
  }
}

References

No response

Would you like to implement a fix?

No response

github-actions[bot] commented 2 years ago

Community Note

Voting for Prioritization

Volunteering to Work on This Issue

erz4 commented 1 year ago

That searching capability can be done via aws console today?

mattburgess commented 1 year ago

No, it doesn't look like it. describe-cluster requires a --name parameter and list-clusters has no filtering at all beyond the --include parameter which enables external clusters to be included alongside Amazon EKS clusters.

@dreinhardt-terminus you might want to consider requesting this feature at https://github.com/aws/containers-roadmap (and linking it to this issue). If you have a support contract with AWS feel free to reach out to your Technical Account Manager as well to see if they can help get eyes on it or at least see if the team already has a similar feature on their roadmap (I couldn't see one after a few searches of that GH repo).