providers/aws: not an error if route53 record is already destroy

[GH-342]
This commit is contained in:
Mitchell Hashimoto 2014-10-07 21:55:40 -07:00
parent ca99811357
commit 014bde64c4
2 changed files with 9 additions and 3 deletions

View File

@ -51,6 +51,7 @@ BUG FIXES:
* providers/aws: not an error when RDS instance is deleted manually. [GH-307]
* providers/aws: Retry deleting subnet for some time while AWS eventually
destroys dependencies. [GH-357]
* providers/aws: More robust destroy for route53 records. [GH-342]
## 0.2.2 (September 9, 2014)

View File

@ -165,13 +165,18 @@ func resource_aws_r53_record_destroy(
if strings.Contains(err.Error(), "PriorRequestNotComplete") {
// There is some pending operation, so just retry
// in a bit.
return nil, "rejected", nil
return 42, "rejected", nil
}
return nil, "failure", err
if strings.Contains(err.Error(), "InvalidChangeBatch") {
// This means that the record is already gone.
return 42, "accepted", nil
}
return 42, "failure", err
}
return nil, "accepted", nil
return 42, "accepted", nil
},
}
if _, err := wait.WaitForState(); err != nil {