provider/aws: route53 zone detects deletion
This commit is contained in:
parent
e47498dc94
commit
18333f149e
|
@ -2,6 +2,7 @@ package aws
|
|||
|
||||
import (
|
||||
"log"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/hashicorp/terraform/helper/config"
|
||||
|
@ -95,6 +96,11 @@ func resource_aws_r53_zone_refresh(
|
|||
|
||||
_, err := r53.GetHostedZone(s.Attributes["zone_id"])
|
||||
if err != nil {
|
||||
// Handle a deleted zone
|
||||
if strings.Contains(err.Error(), "404") {
|
||||
s.ID = ""
|
||||
return s, nil
|
||||
}
|
||||
return s, err
|
||||
}
|
||||
return s, nil
|
||||
|
|
Loading…
Reference in New Issue