Skip to content

Commit 3a6fc81

Browse files
authored
Merge pull request #109 from kerwanp/master
handle record id bigger than 32bits
2 parents fa1bcf1 + cf97512 commit 3a6fc81

2 files changed

+3
-3
lines changed

ovh/resource_ovh_domain_zone_record.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import (
1414
)
1515

1616
type OvhDomainZoneRecord struct {
17-
Id int `json:"id,omitempty"`
17+
Id int64 `json:"id,omitempty"`
1818
Zone string `json:"zone,omitempty"`
1919
Target string `json:"target"`
2020
Ttl int `json:"ttl,omitempty"`
@@ -144,7 +144,7 @@ func resourceOvhDomainZoneRecordCreate(d *schema.ResourceData, meta interface{})
144144

145145
}
146146

147-
d.SetId(strconv.Itoa(resultRecord.Id))
147+
d.SetId(strconv.FormatInt(resultRecord.Id, 10))
148148

149149
if err := ovhDomainZoneRefresh(d, meta); err != nil {
150150
log.Printf("[WARN] OVH Domain zone refresh after record creation failed: %s", err)

ovh/resource_ovh_domain_zone_record_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ func testAccCheckOvhDomainZoneRecordExists(n string, record *OvhDomainZoneRecord
285285
return err
286286
}
287287

288-
if strconv.Itoa(record.Id) != rs.Primary.ID {
288+
if strconv.FormatInt(record.Id, 10) != rs.Primary.ID {
289289
return fmt.Errorf("Record not found")
290290
}
291291

0 commit comments

Comments
 (0)