From 5ed8e26a7112e9bc3f4a7d7bd05be5063fc31622 Mon Sep 17 00:00:00 2001 From: Zhenguo Niu Date: Thu, 21 Feb 2019 19:40:50 +0800 Subject: [PATCH] Fix dns records update error --- huaweicloud/resource_huaweicloud_dns_recordset_v2.go | 2 +- .../golangsdk/openstack/dns/v2/recordsets/requests.go | 2 -- vendor/vendor.json | 6 +++--- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/huaweicloud/resource_huaweicloud_dns_recordset_v2.go b/huaweicloud/resource_huaweicloud_dns_recordset_v2.go index 36120d9b7a..ddc5a857da 100644 --- a/huaweicloud/resource_huaweicloud_dns_recordset_v2.go +++ b/huaweicloud/resource_huaweicloud_dns_recordset_v2.go @@ -185,7 +185,7 @@ func resourceDNSRecordSetV2Update(d *schema.ResourceData, meta interface{}) erro } if d.HasChange("records") { - recordsraw := d.Get("records").(*schema.Set).List() + recordsraw := d.Get("records").([]interface{}) records := make([]string, len(recordsraw)) for i, recordraw := range recordsraw { records[i] = recordraw.(string) diff --git a/vendor/github.com/huaweicloud/golangsdk/openstack/dns/v2/recordsets/requests.go b/vendor/github.com/huaweicloud/golangsdk/openstack/dns/v2/recordsets/requests.go index 749167c332..64df989eb8 100644 --- a/vendor/github.com/huaweicloud/golangsdk/openstack/dns/v2/recordsets/requests.go +++ b/vendor/github.com/huaweicloud/golangsdk/openstack/dns/v2/recordsets/requests.go @@ -137,8 +137,6 @@ func (opts UpdateOpts) ToRecordSetUpdateMap() (map[string]interface{}, error) { if opts.TTL > 0 { b["ttl"] = opts.TTL - } else { - b["ttl"] = nil } return b, nil diff --git a/vendor/vendor.json b/vendor/vendor.json index 6038d4e594..1760d29246 100644 --- a/vendor/vendor.json +++ b/vendor/vendor.json @@ -1497,10 +1497,10 @@ "revisionTime": "2018-09-26T10:00:47Z" }, { - "checksumSHA1": "plsG8kyRJhFGnhGfO0scQk5kRLw=", + "checksumSHA1": "u3Ek8Ml0RX/6PZlDlACezAWzmGw=", "path": "github.com/huaweicloud/golangsdk/openstack/dns/v2/recordsets", - "revision": "888f77744ab7c65bb4d448d5b5313edba29e76c7", - "revisionTime": "2018-02-24T07:23:49Z" + "revision": "00d5197f85d18457ff628d2ed3d37de8034518c2", + "revisionTime": "2019-02-20T07:01:17Z" }, { "checksumSHA1": "xZtYDt64TwCA7g1yE5NbO2QQZxc=",