fix(issue-4448): no longer crash

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
This commit is contained in:
ivan katliarchuk 2024-06-29 16:00:20 +01:00
parent 99290e402c
commit d112219336
No known key found for this signature in database
GPG Key ID: 601CDBBBB76E47BE

View File

@ -435,11 +435,13 @@ func (p *AWSProvider) records(ctx context.Context, zones map[string]*profiledZon
} }
ep := endpoint.NewEndpointWithTTL(wildcardUnescape(aws.StringValue(r.Name)), aws.StringValue(r.Type), ttl, targets...) ep := endpoint.NewEndpointWithTTL(wildcardUnescape(aws.StringValue(r.Name)), aws.StringValue(r.Type), ttl, targets...)
if ep != nil {
if aws.StringValue(r.Type) == endpoint.RecordTypeCNAME { if aws.StringValue(r.Type) == endpoint.RecordTypeCNAME {
ep = ep.WithProviderSpecific(providerSpecificAlias, "false") ep = ep.WithProviderSpecific(providerSpecificAlias, "false")
} }
newEndpoints = append(newEndpoints, ep) newEndpoints = append(newEndpoints, ep)
} }
}
if r.AliasTarget != nil { if r.AliasTarget != nil {
// Alias records don't have TTLs so provide the default to match the TXT generation // Alias records don't have TTLs so provide the default to match the TXT generation