fixed record deletion by changing the matching condition

This commit is contained in:
Lourenço Vales
2025-10-05 10:55:50 +02:00
parent 5cf369d2a8
commit 9e45a08704

View File

@@ -118,7 +118,7 @@ func (obj *CloudflareDNSRes) Validate() error {
}
if obj.MetaParams().Poll == 0 || obj.MetaParams().Poll < 1 {
return fmt.Errorf("cloudflare:dns requiers polling, set Meta:poll param (e.g., 60 seconds), min. 1s")
return fmt.Errorf("cloudflare:dns requires polling, set Meta:poll param (e.g., 60 seconds), min. 1s")
}
return nil
@@ -194,7 +194,7 @@ func (obj *CloudflareDNSRes) CheckApply(ctx context.Context, apply bool) (bool,
listParams := dns.RecordListParams{
ZoneID: cloudflare.F(obj.zoneID),
Name: cloudflare.F(dns.RecordListParamsName{
Exact: cloudflare.F(obj.RecordName), // this matches the exact name
Contains: cloudflare.F(obj.RecordName),
}),
Type: cloudflare.F(dns.RecordListParamsType(obj.Type)),
}