Skip to content
This repository was archived by the owner on Mar 1, 2023. It is now read-only.

Commit c2e7596

Browse files
committed
fix dns rrset meta setter
1 parent e950b9d commit c2e7596

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

gcore/provider.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import (
66
"log"
77
"net/http"
88
"net/url"
9+
"os"
910

1011
dnssdk "github.com/G-Core/g-dns-sdk-go"
1112
storageSDK "github.com/G-Core/gcorelabs-storage-sdk-go"
@@ -218,6 +219,7 @@ func providerConfigure(_ context.Context, d *schema.ResourceData) (interface{},
218219
}
219220
config.DNSClient = dnssdk.NewClient(authorizer, func(client *dnssdk.Client) {
220221
client.BaseURL = baseUrl
222+
client.Debug = os.Getenv("TF_LOG") == "DEBUG"
221223
})
222224
}
223225

gcore/resource_gcore_dns_zone_record.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,7 @@ func resourceDNSZoneRecord() *schema.Resource {
221221
DNSZoneRecordSchemaMetaDefault: {
222222
Type: schema.TypeBool,
223223
Optional: true,
224+
Default: false,
224225
Description: "Fallback meta equals true marks records which are used as a default answer (when nothing was selected by specified meta fields).",
225226
},
226227
},
@@ -467,7 +468,7 @@ func fillRRSet(d *schema.ResourceData, rType string, rrSet *dnssdk.RRSet) error
467468
for i, v := range val {
468469
asn[i] = uint64(v.(int))
469470
}
470-
if len(notes) > 0 {
471+
if len(asn) > 0 {
471472
rr.AddMeta(dnssdk.NewResourceMetaAsn(asn...))
472473
}
473474

0 commit comments

Comments
 (0)