Skip to content
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

Support tags for aws_db_snapshot data source #10010

Closed
dkniffin opened this issue Sep 5, 2019 · 7 comments · Fixed by #31600
Closed

Support tags for aws_db_snapshot data source #10010

dkniffin opened this issue Sep 5, 2019 · 7 comments · Fixed by #31600
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/rds Issues and PRs that pertain to the rds service.
Milestone

Comments

@dkniffin
Copy link

dkniffin commented Sep 5, 2019

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

Currently, the aws_db_snapshot data source only supports finding snapshots by their id or their associated database id.

These options will not work for the use-case I have. Multiple DB snapshots are created outside of my terraform config, all with a standard naming convention and set of tags. I would like to reference the latest of those.

To do that, I would like to filter based on tags (similar to the usage in aws_ami). Alternatively, my problem could also be solved by allowing for wildcards in the snapshot identifier.

New or Affected Resource(s)

  • aws_db_snapshot

Potential Terraform Configuration

Here's an example of what this could look like in practice:

data "aws_db_snapshot" "latest_snapshot" {
  most_recent = true

  filter {
    name   = "name"
    values = ["postgres-backup-*"]
  }
}

References

@dkniffin dkniffin added the enhancement Requests to existing resources that expand the functionality or scope. label Sep 5, 2019
@ghost ghost added the service/rds Issues and PRs that pertain to the rds service. label Sep 5, 2019
@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label Sep 5, 2019
@bflad bflad removed the needs-triage Waiting for first response or review from a maintainer. label Mar 25, 2020
@okgolove
Copy link

okgolove commented Dec 3, 2020

Is anyone here? :)

@hemzet
Copy link

hemzet commented Aug 18, 2021

Especially when hex values are automatically added to db snapshot identifiers, as done in the TF RDS modules, the actual name of a snapshot is unknown so any data resource request fails. The tag filter extension is highly needed.

@blevkovych
Copy link

bump

@kairu97
Copy link

kairu97 commented Jan 30, 2023

Is there an update on this? I would love to have tags for the db snapshot identifier.

@rromic
Copy link
Contributor

rromic commented May 26, 2023

Hey guys, I have open two PRs for filtering DB snapshots by tags #31600 (db snapshots) and #31602 (cluster db snapshots - aurora). If you have any suggestion or possible improvements, please write them down :).

@github-actions github-actions bot added this to the v5.11.0 milestone Jul 31, 2023
@github-actions
Copy link

github-actions bot commented Aug 3, 2023

This functionality has been released in v5.11.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. Thank you!

@github-actions
Copy link

github-actions bot commented Sep 3, 2023

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.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/rds Issues and PRs that pertain to the rds service.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants