From 31f688d7b58fc9c0e5874180eb83789fb252635d Mon Sep 17 00:00:00 2001 From: Chris Nesbitt Callaghan Date: Mon, 11 Apr 2022 13:36:01 -0400 Subject: [PATCH] add skipLookup argument for ANAME resources --- CHANGELOG.md | 3 +++ constellix/datasource_constellix_aname_record.go | 7 +++++++ constellix/resource_constellix_aname_record.go | 16 ++++++++++++++++ .../constellix-go-client/models/model_Aname.go | 1 + 4 files changed, 27 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f16ac02..38d4e1c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## 0.4.4 (add skipLookup argument for ANAME resources, cncallaghan) +- added skipLookup argument for ANAME resources + ## 0.3.1 (Unreleased) IMPROVEMENTS: diff --git a/constellix/datasource_constellix_aname_record.go b/constellix/datasource_constellix_aname_record.go index 3cf9222..8a3298c 100644 --- a/constellix/datasource_constellix_aname_record.go +++ b/constellix/datasource_constellix_aname_record.go @@ -79,6 +79,12 @@ func datasourceConstellixAnamerecord() *schema.Resource { Computed: true, }, + "skip_lookup": &schema.Schema{ + Type: schema.TypeBool, + Optional: true, + Computed: true, + }, + "note": &schema.Schema{ Type: schema.TypeString, Optional: true, @@ -247,6 +253,7 @@ func datasourceConstellixAnamerecordRead(d *schema.ResourceData, m interface{}) d.Set("ttl", tp["ttl"]) d.Set("record_option", tp["recordOption"]) d.Set("noanswer", tp["noAnswer"]) + d.Set("skip_lookup", tp["skipLookup"]) d.Set("note", tp["note"]) d.Set("gtd_region", tp["gtdRegion"]) d.Set("type", tp["type"]) diff --git a/constellix/resource_constellix_aname_record.go b/constellix/resource_constellix_aname_record.go index 43f5471..f50ac8b 100644 --- a/constellix/resource_constellix_aname_record.go +++ b/constellix/resource_constellix_aname_record.go @@ -89,6 +89,12 @@ func resourceConstellixANAMERecord() *schema.Resource { Computed: true, }, + "skip_lookup": &schema.Schema{ + Type: schema.TypeBool, + Optional: true, + Computed: true, + }, + "note": &schema.Schema{ Type: schema.TypeString, Optional: true, @@ -264,6 +270,7 @@ func resourceConstellixANAMERecordImport(d *schema.ResourceData, m interface{}) d.Set("source_type", params[0]) d.Set("record_option", data["recordOption"]) d.Set("noanswer", data["noAnswer"]) + d.Set("skip_lookup", data["skipLookup"]) d.Set("note", data["note"]) d.Set("pools", data["pools"]) d.Set("gtd_region", data["gtdRegion"]) @@ -298,6 +305,10 @@ func resourceConstellixANAMERecordCreate(d *schema.ResourceData, m interface{}) anameAttr.NoAnswer = noanswer.(bool) } + if skip_lookup, ok := d.GetOk("skip_lookup"); ok { + anameAttr.SkipLookup = skip_lookup.(bool) + } + if note, ok := d.GetOk("note"); ok { anameAttr.Note = note.(string) } @@ -478,6 +489,7 @@ func resourceConstellixANAMERecordRead(d *schema.ResourceData, m interface{}) er d.Set("ttl", data["ttl"]) d.Set("record_option", data["recordOption"]) d.Set("noanswer", data["noAnswer"]) + d.Set("skip_lookup", data["skipLookup"]) d.Set("note", data["note"]) d.Set("pools", data["pools"]) d.Set("gtd_region", data["gtdRegion"]) @@ -513,6 +525,10 @@ func resourceConstellixANAMERecordUpdate(d *schema.ResourceData, m interface{}) anameAttr.NoAnswer = d.Get("noanswer").(bool) } + if _, ok := d.GetOk("skip_lookup"); ok { + anameAttr.SkipLookup = d.Get("skip_lookup").(bool) + } + if _, ok := d.GetOk("note"); ok { anameAttr.Note = d.Get("note").(string) } diff --git a/vendor/github.com/Constellix/constellix-go-client/models/model_Aname.go b/vendor/github.com/Constellix/constellix-go-client/models/model_Aname.go index 6070318..992349c 100644 --- a/vendor/github.com/Constellix/constellix-go-client/models/model_Aname.go +++ b/vendor/github.com/Constellix/constellix-go-client/models/model_Aname.go @@ -5,6 +5,7 @@ type AnameAttributes struct { TTL int `json:"ttl"` RecordOption string `json:"recordOption,omitempty"` NoAnswer bool `json:"noAnswer,"` + SkipLookup bool `json:"skipLookup,"` Note string `json:"note,omitempty"` GtdRegion int `json:"gtdRegion,omitempty"` Type string `json:"type,omitempty"`