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.61k stars 9k forks source link

[Enhancement]: aws_api_gateway_rest_api data source supports tags for querying #37579

Open ketzacoatl opened 1 month ago

ketzacoatl commented 1 month ago

Description

The aws_apigatewayv2_apis data source supports tags for querying, Conversely, the aws_api_gateway_rest_api data source supports name only [1], and does not have tags. It would be nice to add support for tags to query for an API Gateway, and thus making name optional. [2] is similar but about adding name to the aws_apigatewayv2_api data source (not plural).

It would also be nice if the data source supported multiple API Gateways in the results (rather than error), but IDK if that should be a separate issue, or if this request to support tags should be implemented in a new data source that supports multiple results.

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

Potential Terraform Configuration

data "aws_api_gateway_rest_api" "my_rest_api" {
  tags = { Name = "my-rest-api", Environment = "my-env" }
}


### References

[1]: https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/api_gateway_rest_api
[2]: https://github.com/hashicorp/terraform-provider-aws/issues/31298

### 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