chore(provider/aws): reduce if-nesting, dryRun (#5688)

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
This commit is contained in:
Ivan Ka 2025-07-29 11:10:02 +01:00 committed by GitHub
parent fe7940ce0a
commit b741f3103c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -734,7 +734,11 @@ func (p *AWSProvider) submitChanges(ctx context.Context, changes Route53Changes,
log.Infof("Desired change: %s %s %s", c.Action, *c.ResourceRecordSet.Name, c.ResourceRecordSet.Type)
}
if !p.dryRun {
if p.dryRun {
log.Debug("Dry run mode, skipping change submission")
continue
}
params := &route53.ChangeResourceRecordSetsInput{
HostedZoneId: aws.String(z),
ChangeBatch: &route53types.ChangeBatch{
@ -785,7 +789,6 @@ func (p *AWSProvider) submitChanges(ctx context.Context, changes Route53Changes,
time.Sleep(p.batchChangeInterval)
}
}
}
if failedUpdate {
failedZones = append(failedZones, z)