-
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
Generic Fetching Resources via Tags #17705
Comments
I personally think this is a good solution to offer since the API support already exists. My only suggestion would be to name it |
This has been released in version 3.38.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 for triage. Thanks! |
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
In many cases it is easier to group resources using tags rather than keeping hard coded lists of resources by their id (which may differ in connection from service to service)
There are multiple feature requests to fetch resource by filter them through tags. A non exhaustive list of those are:
Some of the service do not implement that kind of filtering on the API level which would require building some custom logic to filter that which may differ from resource to resource based on the API response. that may introduce a maintenance burden, and my break in a future release of the AWS SDK/API Change.
Having the ability to fetch a group of resources (from the same type or even for multiple types at once to make code more DRY) may be beneficial for a multitude of case. for example adding cloudwatch log group to a group of resource based on their id instead of iterating a few separate data sources.
AWS has a single generic API to fetch multiple resource types (or single by filter) and filter them by tags. This will make Terraform config more DRY and will reduce amount of API calls (which in turn reduce various throttling and wait issues).
The way to do it is use the Resource Groups Tagging API
New or Affected Resource(s)
Potential Terraform Configuration
References
The text was updated successfully, but these errors were encountered: