diff --git a/provider/aws/aws.go b/provider/aws/aws.go index a25b2a4c4a..10fbadc022 100644 --- a/provider/aws/aws.go +++ b/provider/aws/aws.go @@ -865,8 +865,6 @@ func (p *AWSProvider) adjustEndpointAndNewAaaaIfNeeded(ep *endpoint.Endpoint) *e aaaa.RecordType = endpoint.RecordTypeAAAA } return aaaa - default: - p.adjustOtherRecord(ep) } adjustGeoProximityLocationEndpoint(ep) return aaaa @@ -923,18 +921,6 @@ func (p *AWSProvider) adjustCNAMERecord(ep *endpoint.Endpoint) { } } -func (p *AWSProvider) adjustOtherRecord(ep *endpoint.Endpoint) { - // TODO: fix For records other than A, AAAA, and CNAME, if an alias record is set, the alias record processing is not performed. - // This will be fixed in another PR. - if isAlias, _ := ep.GetBoolProviderSpecificProperty(endpoint.ProviderSpecificAlias); isAlias { - p.adjustAliasRecord(ep) - ep.DeleteProviderSpecificProperty(endpoint.ProviderSpecificAlias) - } else { - ep.DeleteProviderSpecificProperty(endpoint.ProviderSpecificAlias) - ep.DeleteProviderSpecificProperty(providerSpecificEvaluateTargetHealth) - } -} - // if the endpoint is using geoproximity, set the bias to 0 if not set // this is needed to avoid unnecessary Upserts if the desired endpoint doesn't specify a bias func adjustGeoProximityLocationEndpoint(ep *endpoint.Endpoint) { diff --git a/provider/aws/aws_test.go b/provider/aws/aws_test.go index 3bb8cf28f8..3632ecab76 100644 --- a/provider/aws/aws_test.go +++ b/provider/aws/aws_test.go @@ -3324,35 +3324,8 @@ func TestAWSProvider_adjustEndpointAndNewAaaaIfNeeded(t *testing.T) { }, expectedAaaa: nil, }, - // TODO: fix For records other than A, AAAA, and CNAME, if an alias record is set, the alias record processing is not performed. This will be fixed in another PR. - { - name: "MX record with alias=true should remove alias and set default ttl, add evaluateTargetHealth and not create AAAA", - ep: &endpoint.Endpoint{ - DNSName: "test.foo.bar.", - RecordType: endpoint.RecordTypeMX, - Targets: endpoint.Targets{"10 mail.example.com."}, - RecordTTL: 600, - ProviderSpecific: endpoint.ProviderSpecific{ - { - Name: endpoint.ProviderSpecificAlias, - Value: "true", - }, - }, - }, - expected: &endpoint.Endpoint{ - DNSName: "test.foo.bar.", - RecordType: endpoint.RecordTypeMX, - Targets: endpoint.Targets{"10 mail.example.com."}, - RecordTTL: defaultTTL, - ProviderSpecific: endpoint.ProviderSpecific{ - { - Name: providerSpecificEvaluateTargetHealth, - Value: "false", - }, - }, - }, - expectedAaaa: nil, - }, + // Other record types that has alias properties should be rejected by endpoint validation, + // so we don't need to test them here as adjustEndpointAndNewAaaaIfNeeded should not be called for them. } for _, tt := range tests {