mirror of
https://github.com/opentofu/opentofu.git
synced 2024-12-30 10:47:14 -06:00
Merge pull request #1384 from hashicorp/b-aws-fix-route53-hosted-refresh
provider/aws: Fix refresh issue in Route 53 hosted zone
This commit is contained in:
commit
23c0fb7695
@ -83,7 +83,7 @@ func resourceAwsRoute53ZoneRead(d *schema.ResourceData, meta interface{}) error
|
|||||||
_, err := r53.GetHostedZone(&route53.GetHostedZoneRequest{ID: aws.String(d.Id())})
|
_, err := r53.GetHostedZone(&route53.GetHostedZoneRequest{ID: aws.String(d.Id())})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
// Handle a deleted zone
|
// Handle a deleted zone
|
||||||
if strings.Contains(err.Error(), "404") {
|
if r53err, ok := err.(aws.APIError); ok && r53err.Code == "NoSuchHostedZone" {
|
||||||
d.SetId("")
|
d.SetId("")
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user