Open uriinf opened 1 year ago
Voting for Prioritization
Volunteering to Work on This Issue
Hello, was there a resolution to this? I am experiencing a similar issue trying to create automated backup replications @justinretzolk
Hey @al-nwokedike-imprivata 👋 Thank you for checking in on this! Unfortunately I can't provide an ETA on when this will be looked into due to the potential of shifting priorities. We prioritize by count of :+1: reactions and a few other things (more information on our prioritization guide if you're interested).
@uriinf I think your issue is related to default timeout which is 20 minutes. Please check as maybe you need just increate timeout config on resoource https://registry.terraform.io/providers/figma/aws-4-49-0/latest/docs/resources/db_snapshot_copy#timeouts
Also running into this issue and don't believe it's a timeout issue. We're seeing the copy complete (via AWS Console) in ~5 minutes but getting this error.
Agree this is not a time out issue. below are our code with timeout for 12 hrs
### encrypt snapshot using a new dr1 KMS key and push to dr1 region
resource "aws_db_snapshot_copy" "db_snapshot_copy" {
for_each = toset(data.aws_db_instances.db_instances.instance_identifiers)
depends_on = [
aws_db_snapshot.db_snapshot,
aws_kms_replica_key.kms_replica_key,
]
timeouts {
create = "720m"
}
provider = aws.dr1-replica
destination_region = var.dr1_region
kms_key_id = aws_kms_replica_key.kms_replica_key.arn
source_db_snapshot_identifier = aws_db_snapshot.db_snapshot[each.value].db_snapshot_arn
target_db_snapshot_identifier = "${each.value}-${formatdate("DD-MMM-YYYY", timestamp())}-dr1"
# lifecycle {
# ignore_changes = [
# source_db_snapshot_identifier,
# target_db_snapshot_identifier,
# ]
# }
}
result
│ Error: waiting for RDS DB Snapshot Copy (xxxxxxx-06-oct-2023-dr1) create: unexpected state 'pending', wanted target 'available'. last error: %!s(<nil>)
Terraform Core Version
1.2.4
AWS Provider Version
4.54.0
Affected Resource(s)
Expected Behavior
DB snapshot copied from one region to another
Actual Behavior
Occasionally
aws_db_snapshot_copy
fails with the errorunexpected state 'pending', wanted target 'available'
. Usually it solved with next run.Relevant Error/Panic Output Snippet
Terraform Configuration Files
Steps to Reproduce
terraform apply
Debug Output
No response
Panic Output
No response
Important Factoids
No response
References
No response
Would you like to implement a fix?
None