Skip to content

Commit

Permalink
ROUTE53: Bug: fix corner case when deleting alias (#394)
Browse files Browse the repository at this point in the history
  • Loading branch information
captncraig authored and Tom Limoncelli committed Aug 23, 2018
1 parent 18f47d3 commit e680fb9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion providers/route53/route53Provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -216,11 +216,14 @@ func (r *route53Provider) GetDomainCorrections(dc *models.DomainConfig) ([]*mode
delDesc += strings.Join(namesToUpdate[k], "\n") + "\n"
// on delete just submit the original resource set we got from r53.
for _, r := range records {
if unescape(r.Name) == k.Name && (*r.Type == k.Type || k.Type == "R53_ALIAS") {
if unescape(r.Name) == k.Name && (*r.Type == k.Type || k.Type == "R53_ALIAS_"+*r.Type) {
rrset = r
break
}
}
if rrset == nil {
return nil, fmt.Errorf("No record set found to delete. Name: '%s'. Type: '%s'", k.Name, k.Type)
}
} else {
changes = append(changes, chg)
changeDesc += strings.Join(namesToUpdate[k], "\n") + "\n"
Expand Down

0 comments on commit e680fb9

Please # to comment.