diff --git a/federation/pkg/dnsprovider/providers/aws/route53/rrset.go b/federation/pkg/dnsprovider/providers/aws/route53/rrset.go index 028a1d2cca3..f358a8bc109 100644 --- a/federation/pkg/dnsprovider/providers/aws/route53/rrset.go +++ b/federation/pkg/dnsprovider/providers/aws/route53/rrset.go @@ -51,3 +51,12 @@ func (rrset ResourceRecordSet) Ttl() int64 { func (rrset ResourceRecordSet) Type() rrstype.RrsType { return rrstype.RrsType(*rrset.impl.Type) } + +// Route53ResourceRecordSet returns the route53 ResourceRecordSet object for the ResourceRecordSet +// This is a "back door" that allows for limited access to the ResourceRecordSet, +// without having to requery it, so that we can expose AWS specific functionality. +// Using this method should be avoided where possible; instead prefer to add functionality +// to the cross-provider ResourceRecordSet interface. +func (rrset ResourceRecordSet) Route53ResourceRecordSet() *route53.ResourceRecordSet { + return rrset.impl +} diff --git a/federation/pkg/dnsprovider/providers/aws/route53/zone.go b/federation/pkg/dnsprovider/providers/aws/route53/zone.go index e1ce5121d14..7d82783ba09 100644 --- a/federation/pkg/dnsprovider/providers/aws/route53/zone.go +++ b/federation/pkg/dnsprovider/providers/aws/route53/zone.go @@ -45,3 +45,12 @@ func (zone *Zone) ID() string { func (zone *Zone) ResourceRecordSets() (dnsprovider.ResourceRecordSets, bool) { return &ResourceRecordSets{zone}, true } + +// Route53HostedZone returns the route53 HostedZone object for the zone. +// This is a "back door" that allows for limited access to the HostedZone, +// without having to requery it, so that we can expose AWS specific functionality. +// Using this method should be avoided where possible; instead prefer to add functionality +// to the cross-provider Zone interface. +func (zone *Zone) Route53HostedZone() *route53.HostedZone { + return zone.impl +}