func (p *AWSProvider) ApplyChanges(changes *plan.Changes) error {
	zones, err := p.Zones()
	if err != nil {
		return err
	}

	records, err := p.records(zones)
	if err != nil {
		log.Errorf("getting records failed: %v", err)
	}

	combinedChanges := make([]*route53.Change, 0, len(changes.Create)+len(changes.UpdateNew)+len(changes.Delete))

	combinedChanges = append(combinedChanges, p.newChanges(route53.ChangeActionCreate, changes.Create, records, zones)...)
	combinedChanges = append(combinedChanges, p.newChanges(route53.ChangeActionUpsert, changes.UpdateNew, records, zones)...)
	combinedChanges = append(combinedChanges, p.newChanges(route53.ChangeActionDelete, changes.Delete, records, zones)...)

	return p.submitChanges(combinedChanges, zones)
}
func (p *AWSProvider) ApplyChanges(changes *plan.Changes) error {
	zones, err := p.Zones()
	if err != nil {
		return err
	}

	records, err := p.records(zones)
	if err != nil {
		log.Errorf("getting records failed: %v", err)
	}

	combinedChanges := make([]*route53.Change, 0, len(changes.Create)+len(changes.UpdateNew)+len(changes.Delete))

	combinedChanges = append(combinedChanges, p.newChanges(route53.ChangeActionCreate, changes.Create, records, zones)...)
	combinedChanges = append(combinedChanges, p.newChanges(route53.ChangeActionUpsert, changes.UpdateNew, records, zones)...)
	combinedChanges = append(combinedChanges, p.newChanges(route53.ChangeActionDelete, changes.Delete, records, zones)...)

	return p.submitChanges(combinedChanges, zones)
}
func ( p * AWSProvider ) ApplyChanges ( changes * plan . Changes ) error { zones , err := p . Zones ( ) if err != nil { return err } records , err := p . records ( zones ) if err != nil { log . Errorf ( " " , err ) } combinedChanges := make ( [ ] * route53 . Change , 0 , len ( changes . Create ) + len ( changes . UpdateNew ) + len ( changes . Delete ) ) combinedChanges = append ( combinedChanges , p . newChanges ( route53 . ChangeActionCreate , changes . Create , records , zones ) ... ) combinedChanges = append ( combinedChanges , p . newChanges ( route53 . ChangeActionUpsert , changes . UpdateNew , records , zones ) ... ) combinedChanges = append ( combinedChanges , p . newChanges ( route53 . ChangeActionDelete , changes . Delete , records , zones ) ... ) return p . submitChanges ( combinedChanges , zones ) }
// ApplyChanges applies a given set of changes in a given zone.
ApplyChanges applies a given set of changes in a given zone .