@@ -66,8 +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")
7169 value := val .(string )
7270 if value == "@" || value == "" {
7371 return ""
@@ -259,7 +257,6 @@ func resourceRecordCreate(ctx context.Context, d *schema.ResourceData, m any) di
259257 geoIP , okGeoIP := d .GetOk ("geo_ip" )
260258 recordType := domain .RecordType (d .Get ("type" ).(string ))
261259 recordData := d .Get ("data" ).(string )
262- // Normalize the record name to relative format (handles FQDN with trailing dot)
263260 recordName := normalizeRecordName (d .Get ("name" ).(string ), dnsZone )
264261 record := & domain.Record {
265262 Data : recordData ,
@@ -373,7 +370,6 @@ func resourceDomainRecordRead(ctx context.Context, d *schema.ResourceData, m any
373370 }
374371
375372 idRecord := locality .ExpandID (d .Id ())
376- // Normalize the record name to relative format (handles FQDN with trailing dot)
377373 recordName := normalizeRecordName (d .Get ("name" ).(string ), dnsZone )
378374
379375 res , err := domainAPI .ListDNSZoneRecords (& domain.ListDNSZoneRecordsRequest {
@@ -454,7 +450,6 @@ func resourceDomainRecordUpdate(ctx context.Context, d *schema.ResourceData, m a
454450 }
455451
456452 geoIP , okGeoIP := d .GetOk ("geo_ip" )
457- // Normalize the record name to relative format (handles FQDN with trailing dot)
458453 recordName := normalizeRecordName (d .Get ("name" ).(string ), dnsZone )
459454 record := & domain.Record {
460455 Name : recordName ,
0 commit comments