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)
aws_api_gateway_rest_api data source
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
Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.
Volunteering to Work on This Issue
If you are interested in working on this issue, please leave a comment.
If this would be your first contribution, please review the contribution guide.
Description
The
aws_apigatewayv2_apis
data source supports tags for querying, Conversely, theaws_api_gateway_rest_api
data source supportsname
only [1], and does not havetags
. It would be nice to add support fortags
to query for an API Gateway, and thus makingname
optional. [2] is similar but about addingname
to theaws_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)
aws_api_gateway_rest_api
data sourcePotential Terraform Configuration