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

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
This commit is contained in:
ivan katliarchuk 2025-07-26 06:44:39 +01:00
parent 8703fd4824
commit a03ba1fa2c
No known key found for this signature in database
GPG Key ID: 601CDBBBB76E47BE

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)