@@ -66,9 +66,6 @@ func ResourceRecord() *schema.Resource {
6666 ForceNew : true ,
6767 Optional : true ,
6868 StateFunc : func (val any ) string {
69- // This function normalizes the name before storing it in state
70- // It converts FQDN (e.g., "_dmarc.example.com.") to relative format (e.g., "_dmarc")
71- value := val .(string )
7269 if value == "@" || value == "" {
7370 return ""
7471 }
@@ -259,7 +256,6 @@ func resourceRecordCreate(ctx context.Context, d *schema.ResourceData, m any) di
259256 geoIP , okGeoIP := d .GetOk ("geo_ip" )
260257 recordType := domain .RecordType (d .Get ("type" ).(string ))
261258 recordData := d .Get ("data" ).(string )
262- // Normalize the record name to relative format (handles FQDN with trailing dot)
263259 recordName := normalizeRecordName (d .Get ("name" ).(string ), dnsZone )
264260 record := & domain.Record {
265261 Data : recordData ,
@@ -373,7 +369,6 @@ func resourceDomainRecordRead(ctx context.Context, d *schema.ResourceData, m any
373369 }
374370
375371 idRecord := locality .ExpandID (d .Id ())
376- // Normalize the record name to relative format (handles FQDN with trailing dot)
377372 recordName := normalizeRecordName (d .Get ("name" ).(string ), dnsZone )
378373
379374 res , err := domainAPI .ListDNSZoneRecords (& domain.ListDNSZoneRecordsRequest {
@@ -454,7 +449,6 @@ func resourceDomainRecordUpdate(ctx context.Context, d *schema.ResourceData, m a
454449 }
455450
456451 geoIP , okGeoIP := d .GetOk ("geo_ip" )
457- // Normalize the record name to relative format (handles FQDN with trailing dot)
458452 recordName := normalizeRecordName (d .Get ("name" ).(string ), dnsZone )
459453 record := & domain.Record {
460454 Name : recordName ,
0 commit comments