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.87k stars 9.21k forks source link

[Enhancement]: Add optional filter to aws_ecs_cluster & make cluster_name optional #36583

Open WillGibson opened 8 months ago

WillGibson commented 8 months ago

Description

Currently cluster_name is a required argument for aws_ecs_cluster, it does not support filtering, and cluster_name is not included in the exports.

It would be useful to support use cases like "get the name of the cluster with the following tags".

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

Potential Terraform Configuration

data "aws_ecs_cluster" "ecs_cluster" {
  filter {
    name   = "some_tag"
    values = [var.some_value]
  }
}

References

No response

Would you like to implement a fix?

Yes

github-actions[bot] commented 8 months ago

Community Note

Voting for Prioritization

Volunteering to Work on This Issue