@@ -112,7 +112,7 @@ type cloudFlareDNS interface {
112112 GetZone (ctx context.Context , zoneID string ) (* zones.Zone , error )
113113 ListDNSRecords (ctx context.Context , params dns.RecordListParams ) autoPager [dns.RecordResponse ]
114114 CreateDNSRecord (ctx context.Context , params dns.RecordNewParams ) (* dns.RecordResponse , error )
115- DeleteDNSRecord (ctx context.Context , rc * cloudflarev0. ResourceContainer , recordID string ) error
115+ DeleteDNSRecord (ctx context.Context , recordID string , params dns. RecordDeleteParams ) error
116116 UpdateDNSRecord (ctx context.Context , rc * cloudflarev0.ResourceContainer , rp cloudflarev0.UpdateDNSRecordParams ) error
117117 ListDataLocalizationRegionalHostnames (ctx context.Context , params addressing.RegionalHostnameListParams ) autoPager [addressing.RegionalHostnameListResponse ]
118118 CreateDataLocalizationRegionalHostname (ctx context.Context , params addressing.RegionalHostnameNewParams ) error
@@ -161,8 +161,9 @@ func (z zoneService) UpdateDNSRecord(ctx context.Context, rc *cloudflarev0.Resou
161161 return err
162162}
163163
164- func (z zoneService ) DeleteDNSRecord (ctx context.Context , rc * cloudflarev0.ResourceContainer , recordID string ) error {
165- return z .serviceV0 .DeleteDNSRecord (ctx , rc , recordID )
164+ func (z zoneService ) DeleteDNSRecord (ctx context.Context , recordID string , params dns.RecordDeleteParams ) error {
165+ _ , err := z .service .DNS .Records .Delete (ctx , recordID , params )
166+ return err
166167}
167168
168169func (z zoneService ) ListZones (ctx context.Context , params zones.ZoneListParams ) autoPager [zones.Zone ] {
@@ -668,7 +669,7 @@ func (p *CloudFlareProvider) submitChanges(ctx context.Context, changes []*cloud
668669 log .WithFields (logFields ).Errorf ("failed to find previous record: %v" , change .ResourceRecord )
669670 continue
670671 }
671- err := p .Client .DeleteDNSRecord (ctx , resourceContainer , recordID )
672+ err := p .Client .DeleteDNSRecord (ctx , recordID , dns. RecordDeleteParams { ZoneID : cloudflare . F ( zoneID )} )
672673 if err != nil {
673674 failedChange = true
674675 log .WithFields (logFields ).Errorf ("failed to delete record: %v" , err )
0 commit comments