Closed Nida1998 closed 3 months ago
Voting for Prioritization
Volunteering to Work on This Issue
Hi @Nida1998,
thanks for bringing this to our attention. Could you please provide more details on the issue? We would like to understand what version of Terraform and the Terraform AWS provider are in use.
I took your code snippet and did a quick test using provider version 5.62.0 and Terraform v1.9.3:
data "aws_ebs_snapshot" "web01_snapshot_xvda" {
most_recent = true
owners = ["self"]
filter {
name = "tag:DeviceName"
values = ["dev/xvdb"]
}
filter {
name = "tag:Name"
values = ["server"]
}
}
On the EBS snapshots I ensured that the tags are existing (verified this via management console).
Then I executed a terraform plan
❯ terraform plan
data.aws_ebs_snapshot.web01_snapshot_xvda: Reading...
data.aws_ebs_snapshot.web01_snapshot_xvda: Read complete after 0s [id=snap-09c0028a8a37091f1]
No changes. Your infrastructure matches the configuration
This means, that two filters seems to be supported by the provider. I will review the relevant code later.
Could you please check if the tags are attached to the snapshots and provide the missing information on the versions? Thanks!
Hi @stefanfreitag
I upgraded the terraform version to v1.9.4 and I am able to pick snapshot id based on 2 filters(tags). Much appreciated!
Kind Regards, Nida
[!WARNING] This issue has been closed, meaning that any additional comments are hard for our team to see. Please assume that the maintainers will not see them.
Ongoing conversations amongst community members are welcome, however, the issue will be locked after 30 days. Moving conversations to another venue, such as the AWS Provider forum, is recommended. If you have additional concerns, please open a new issue, referencing this one where needed.
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.
Description
I am trying to pick snapshot id via data resource terraform, but unable to do so because of 2 tags provided.
Error: Your query returned no results. Please change your search criteria and try again. │ │ with module.CIM.data.aws_ebs_snapshot.web01_snapshot_sdba, │ on modules\CIM\main.tf line 17, in data "aws_ebs_snapshot" "web01_snapshot_sdba": │ 17: data "aws_ebs_snapshot" "web01_snapshot_sdba" {
Terraform script below:
data "aws_ebs_snapshot" "web01_snapshot_xvda" { most_recent = true owners = ["self"]
filter { name = "tag:DeviceName" values = ["dev/xvda"] }
filter { name = "tag:Name" values = ["prod-qa-cim-web-01"] } }
any work around will be highly appreciated. Manually putting snahpshot id is not possible. Need to pick latest, NMane + DeviceName
References
No response
Would you like to implement a fix?
None