From 626c940265e0663fcf44fff84180907c5ebc693c Mon Sep 17 00:00:00 2001 From: Martin PAUCOT Date: Mon, 25 Nov 2019 14:19:15 +0100 Subject: [PATCH 1/2] handle record id bigger than 32bits --- ovh/resource_ovh_domain_zone_record.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ovh/resource_ovh_domain_zone_record.go b/ovh/resource_ovh_domain_zone_record.go index 89591e087..53ddd48a3 100644 --- a/ovh/resource_ovh_domain_zone_record.go +++ b/ovh/resource_ovh_domain_zone_record.go @@ -14,7 +14,7 @@ import ( ) type OvhDomainZoneRecord struct { - Id int `json:"id,omitempty"` + Id int64 `json:"id,omitempty"` Zone string `json:"zone,omitempty"` Target string `json:"target"` Ttl int `json:"ttl,omitempty"` @@ -144,7 +144,7 @@ func resourceOvhDomainZoneRecordCreate(d *schema.ResourceData, meta interface{}) } - d.SetId(strconv.Itoa(resultRecord.Id)) + d.SetId(strconv.FormatInt(resultRecord.Id, 10)) if err := ovhDomainZoneRefresh(d, meta); err != nil { log.Printf("[WARN] OVH Domain zone refresh after record creation failed: %s", err) From cf97512075ec0fb42d2f2acca20dc34a30358692 Mon Sep 17 00:00:00 2001 From: Martin PAUCOT Date: Mon, 25 Nov 2019 15:56:42 +0100 Subject: [PATCH 2/2] change Itoa to FormatInt in tests --- ovh/resource_ovh_domain_zone_record_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ovh/resource_ovh_domain_zone_record_test.go b/ovh/resource_ovh_domain_zone_record_test.go index 2777906ce..7391a1571 100644 --- a/ovh/resource_ovh_domain_zone_record_test.go +++ b/ovh/resource_ovh_domain_zone_record_test.go @@ -285,7 +285,7 @@ func testAccCheckOvhDomainZoneRecordExists(n string, record *OvhDomainZoneRecord return err } - if strconv.Itoa(record.Id) != rs.Primary.ID { + if strconv.FormatInt(record.Id, 10) != rs.Primary.ID { return fmt.Errorf("Record not found") }