Merge pull request #8646 from hashicorp/b-aws-r53-delete
provider/aws: Wait for `aws_route_53_record` to be in-sync after a delete
This commit is contained in:
commit
4a8158c1c0
|
@ -528,7 +528,18 @@ func resourceAwsRoute53RecordDelete(d *schema.ResourceData, meta interface{}) er
|
|||
ChangeBatch: changeBatch,
|
||||
}
|
||||
|
||||
_, err = deleteRoute53RecordSet(conn, req)
|
||||
respRaw, err := deleteRoute53RecordSet(conn, req)
|
||||
if err != nil {
|
||||
return errwrap.Wrapf("[ERR]: Error building changeset: {{err}}", err)
|
||||
}
|
||||
|
||||
changeInfo := respRaw.(*route53.ChangeResourceRecordSetsOutput).ChangeInfo
|
||||
|
||||
err = waitForRoute53RecordSetToSync(conn, cleanChangeID(*changeInfo.Id))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
|
|
|
@ -454,6 +454,35 @@ resource "aws_route53_record" "default" {
|
|||
records = ["127.0.0.1", "127.0.0.27"]
|
||||
}
|
||||
`
|
||||
|
||||
const testAccRoute53RecordConfigCNAMERecord = `
|
||||
resource "aws_route53_zone" "main" {
|
||||
name = "notexample.com"
|
||||
}
|
||||
|
||||
resource "aws_route53_record" "default" {
|
||||
zone_id = "${aws_route53_zone.main.zone_id}"
|
||||
name = "host123.domain"
|
||||
type = "CNAME"
|
||||
ttl = "30"
|
||||
records = ["1.2.3.4"]
|
||||
}
|
||||
`
|
||||
|
||||
const testAccRoute53RecordConfigCNAMERecordUpdateToCNAME = `
|
||||
resource "aws_route53_zone" "main" {
|
||||
name = "notexample.com"
|
||||
}
|
||||
|
||||
resource "aws_route53_record" "default" {
|
||||
zone_id = "${aws_route53_zone.main.zone_id}"
|
||||
name = "host123.domain"
|
||||
type = "A"
|
||||
ttl = "30"
|
||||
records = ["1.2.3.4"]
|
||||
}
|
||||
`
|
||||
|
||||
const testAccRoute53RecordConfig_fqdn = `
|
||||
resource "aws_route53_zone" "main" {
|
||||
name = "notexample.com"
|
||||
|
|
Loading…
Reference in New Issue