From cf4cea5a68b1f5d5797c467737a4bd0c3a23f817 Mon Sep 17 00:00:00 2001 From: Cristian Pontes Date: Wed, 14 Feb 2024 10:35:30 +0000 Subject: [PATCH 1/6] PENG-3689 - Introducing support for datasets functionality --- GNUmakefile | 2 +- examples/datasets.tf | 13 ++ ns1/provider.go | 1 + ns1/resource_dataset.go | 349 ++++++++++++++++++++++++++++++++++ ns1/resource_dataset_test.go | 150 +++++++++++++++ ns1/resource_redirect_test.go | 1 + tf/main.tf | 14 ++ 7 files changed, 529 insertions(+), 1 deletion(-) create mode 100644 examples/datasets.tf create mode 100644 ns1/resource_dataset.go create mode 100644 ns1/resource_dataset_test.go create mode 100644 ns1/resource_redirect_test.go create mode 100644 tf/main.tf diff --git a/GNUmakefile b/GNUmakefile index b6d219da..f4c56992 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -21,7 +21,7 @@ test: fmtcheck xargs -t -n4 go test $(TESTARGS) -timeout=30s -parallel=4 testacc: fmtcheck - TF_ACC=1 go test $(TEST) -v $(TESTARGS) -timeout 120m + TF_ACC=1 go test github.com/terraform-providers/terraform-provider-ns1/ns1 -run TestAccDataset_basic resource_dataset_test.go -v $(TESTARGS) -timeout 120m vet: @echo "go vet ." diff --git a/examples/datasets.tf b/examples/datasets.tf new file mode 100644 index 00000000..9328e35c --- /dev/null +++ b/examples/datasets.tf @@ -0,0 +1,13 @@ +resource "ns1_dataset" "my_dataset" { + name = "%s" + datatype { + type = "num_queries" + scope = "account" + data = {} + } + timeframe { + aggregation = "monthly" + cycles = 1 + } + export_type = "csv" +} \ No newline at end of file diff --git a/ns1/provider.go b/ns1/provider.go index 1edf1879..2710bc33 100644 --- a/ns1/provider.go +++ b/ns1/provider.go @@ -77,6 +77,7 @@ func Provider() *schema.Provider { "ns1_subnet": resourceSubnet(), "ns1_dnsview": dnsView(), "ns1_account_whitelist": accountWhitelistResource(), + "ns1_dataset": datasetResource(), }, ConfigureFunc: ns1Configure, } diff --git a/ns1/resource_dataset.go b/ns1/resource_dataset.go new file mode 100644 index 00000000..0167a3ef --- /dev/null +++ b/ns1/resource_dataset.go @@ -0,0 +1,349 @@ +package ns1 + +import ( + "errors" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "log" + "time" + + ns1 "gopkg.in/ns1/ns1-go.v2/rest" + "gopkg.in/ns1/ns1-go.v2/rest/model/dataset" +) + +var DatatypeTypeStringEnum = NewStringEnum([]string{ + "num_queries", + "num_ebot_response", + "num_nxd_response", + "zero_queries", +}) + +var DatatypeScopeStringEnum = NewStringEnum([]string{ + "account", + "network_single", + "record_single", + "zone_single", + "network_each", + "record_each", + "zone_each", + "top_n_zones", + "top_n_records", +}) + +var RepeatsEveryStringEnum = NewStringEnum([]string{ + "week", + "month", + "year", +}) + +var TimeframeAggregationStringEnum = NewStringEnum([]string{ + "daily", + "monthly", + "billing_period", +}) + +var ExportTypeStringEnum = NewStringEnum([]string{ + "csv", + "json", + "xlsx", +}) + +func datasetResource() *schema.Resource { + return &schema.Resource{ + Schema: map[string]*schema.Schema{ + // Required + "name": { + Type: schema.TypeString, + Required: true, + DiffSuppressFunc: caseSensitivityDiffSuppress, + }, + "datatype": { + Type: schema.TypeList, + Required: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "type": { + Type: schema.TypeString, + Required: true, + ValidateFunc: DatatypeTypeStringEnum.ValidateFunc, + }, + "scope": { + Type: schema.TypeString, + Required: true, + ValidateFunc: DatatypeScopeStringEnum.ValidateFunc, + }, + "data": { + Type: schema.TypeMap, + Required: true, + Elem: schema.TypeString, + }, + }, + }, + }, + "repeat": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "start": { + Type: schema.TypeInt, + Required: true, + }, + "repeats_every": { + Type: schema.TypeString, + Required: true, + ValidateFunc: RepeatsEveryStringEnum.ValidateFunc, + }, + "end_after_n": { + Type: schema.TypeInt, + Required: true, + }, + }, + }, + }, + "timeframe": { + Type: schema.TypeList, + Required: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "aggregation": { + Type: schema.TypeString, + Required: true, + ValidateFunc: TimeframeAggregationStringEnum.ValidateFunc, + }, + "cycles": { + Type: schema.TypeInt, + Optional: true, + }, + "from": { + Type: schema.TypeInt, + Optional: true, + }, + "to": { + Type: schema.TypeInt, + Optional: true, + }, + }, + }, + }, + "export_type": { + Type: schema.TypeString, + Required: true, + ValidateFunc: ExportTypeStringEnum.ValidateFunc, + }, + "recipient_emails": { + Type: schema.TypeSet, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + // Read-only + "id": { + Type: schema.TypeString, + Computed: true, + }, + "reports": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "id": { + Type: schema.TypeString, + Computed: true, + }, + "status": { + Type: schema.TypeString, + Computed: true, + }, + "start": { + Type: schema.TypeInt, + Computed: true, + }, + "end": { + Type: schema.TypeInt, + Computed: true, + }, + "created_at": { + Type: schema.TypeInt, + Computed: true, + }, + }, + }, + }, + }, + Create: DatasetCreate, + Read: DatasetRead, + Update: DatasetUpdate, + Delete: DatasetDelete, + } +} + +// DatasetCreate creates a dataset +func DatasetCreate(d *schema.ResourceData, meta interface{}) error { + client := meta.(*ns1.Client) + + resourceDatatype := d.Get("datatype").([]interface{})[0].(map[string]interface{}) + resourceDatatypeData := resourceDatatype["data"].(map[string]interface{}) + datatypeDate := make(map[string]string) + for k, v := range resourceDatatypeData { + datatypeDate[k] = v.(string) + } + datatype := &dataset.Datatype{ + Type: dataset.DatatypeType(resourceDatatype["type"].(string)), + Scope: dataset.DatatypeScope(resourceDatatype["scope"].(string)), + Data: datatypeDate, + } + + resourceTimeframe := d.Get("timeframe").([]interface{})[0].(map[string]interface{}) + resourceTimeframeCycles := int32(resourceTimeframe["cycles"].(int)) + resourceTimeframeFrom := newUnixTimestamp(int64(resourceTimeframe["from"].(int))) + resourceTimeframeTo := newUnixTimestamp(int64(resourceTimeframe["to"].(int))) + timeframe := &dataset.Timeframe{ + Aggregation: dataset.TimeframeAggregation(resourceTimeframe["aggregation"].(string)), + Cycles: &resourceTimeframeCycles, + From: resourceTimeframeFrom, + To: resourceTimeframeTo, + } + + resourceListRepeat := d.Get("repeat").([]interface{}) + var repeat *dataset.Repeat + if len(resourceListRepeat) > 0 { + resourceRepeat := resourceListRepeat[0].(map[string]interface{}) + repeat = &dataset.Repeat{ + Start: dataset.UnixTimestamp(time.Unix(int64(resourceRepeat["start"].(int)), 0)), + RepeatsEvery: dataset.RepeatsEvery(resourceRepeat["repeats_every"].(string)), + EndAfterN: int32(resourceRepeat["end_after_n"].(int)), + } + } + + resourceRecipientEmails := d.Get("recipient_emails").(*schema.Set).List() + recipientEmails := make([]string, 0) + for _, email := range resourceRecipientEmails { + recipientEmails = append(recipientEmails, email.(string)) + } + + r := dataset.NewDataset( + "", + d.Get("name").(string), + datatype, + repeat, + timeframe, + dataset.ExportType(d.Get("export_type").(string)), + nil, + recipientEmails, + dataset.UnixTimestamp{}, + dataset.UnixTimestamp{}, + ) + + dt, resp, err := client.Datasets.Create(r) + if err != nil { + return ConvertToNs1Error(resp, err) + } + + return datasetToResourceData(d, dt) +} + +// DatasetRead reads the dataset from ns1 +func DatasetRead(d *schema.ResourceData, meta interface{}) error { + client := meta.(*ns1.Client) + + cfg, resp, err := client.Datasets.Get(d.Get("id").(string)) + if err != nil { + if errors.Is(err, ns1.ErrDatasetNotFound) { + log.Printf("[DEBUG] NS1 redirect config (%s) not found", d.Id()) + d.SetId("") + return nil + } + + return ConvertToNs1Error(resp, err) + } + + return datasetToResourceData(d, cfg) +} + +// DatasetDelete deletes the dataset from ns1 +func DatasetDelete(d *schema.ResourceData, meta interface{}) error { + client := meta.(*ns1.Client) + resp, err := client.Datasets.Delete(d.Get("id").(string)) + d.SetId("") + return ConvertToNs1Error(resp, err) +} + +// DatasetUpdate updates the dataset from ns1 +func DatasetUpdate(d *schema.ResourceData, meta interface{}) error { + return errors.New("datasets cannot be updated") +} + +func newUnixTimestamp(sec int64) *dataset.UnixTimestamp { + if sec == 0 { + return nil + } + u := dataset.UnixTimestamp(time.Unix(sec, 0)) + return &u +} + +func datasetToResourceData(rd *schema.ResourceData, dt *dataset.Dataset) error { + if len(rd.Id()) == 0 { + rd.SetId(dt.ID) + } + + rd.Set("name", dt.Name) + rd.Set("export_type", dt.ExportType) + rd.Set("recipient_emails", dt.RecipientEmails) + + rd.Set("datatype", []map[string]interface{}{ + { + "type": dt.Datatype.Type, + "scope": dt.Datatype.Scope, + "data": dt.Datatype.Data, + }, + }) + + var timeframeFrom, timeframeTo, timeframeCycles = 0, 0, 0 + if dt.Timeframe.From != nil { + timeframeFrom = int(time.Time(*dt.Timeframe.From).Unix()) + } + if dt.Timeframe.To != nil { + timeframeFrom = int(time.Time(*dt.Timeframe.To).Unix()) + } + if dt.Timeframe.Cycles != nil { + timeframeCycles = int(*dt.Timeframe.Cycles) + } + + rd.Set("timeframe", []map[string]interface{}{ + { + "aggregation": dt.Timeframe.Aggregation, + "cycles": timeframeCycles, + "from": timeframeFrom, + "to": timeframeTo, + }, + }) + + if dt.Repeat != nil { + rd.Set("repeat", []map[string]interface{}{ + { + "start": time.Time(dt.Repeat.Start).Unix(), + "repeats_every": dt.Repeat.RepeatsEvery, + "end_after_n": dt.Repeat.EndAfterN, + }, + }) + } + + rd.Set("reports", nil) + if len(dt.Reports) > 0 { + reports := make([]map[string]interface{}, 0) + for _, report := range dt.Reports { + reports = append(reports, map[string]interface{}{ + "id": report.ID, + "status": report.Status, + "start": time.Time(report.Start).Unix(), + "end": time.Time(report.End).Unix(), + "created_at": time.Time(report.CreatedAt).Unix(), + }) + } + rd.Set("reports", reports) + } + + return nil +} diff --git a/ns1/resource_dataset_test.go b/ns1/resource_dataset_test.go new file mode 100644 index 00000000..279b2534 --- /dev/null +++ b/ns1/resource_dataset_test.go @@ -0,0 +1,150 @@ +package ns1 + +import ( + "fmt" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" + "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/stretchr/testify/assert" + ns1 "gopkg.in/ns1/ns1-go.v2/rest" + "gopkg.in/ns1/ns1-go.v2/rest/model/dataset" + "testing" + "time" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" +) + +func TestAccDataset_basic(t *testing.T) { + var resultDt dataset.Dataset + expectedDt, tfPlan := testAccDatasetBasic() + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckDatasetDestroy, + Steps: []resource.TestStep{ + { + Config: tfPlan, + Check: resource.ComposeTestCheckFunc( + testAccCheckDatasetExists(&resultDt, t), + testAccCheckDatasetMatchExpected(expectedDt, &resultDt, t), + ), + }, + }, + }) +} +func testAccCheckDatasetExists(dt *dataset.Dataset, t *testing.T) resource.TestCheckFunc { + return func(s *terraform.State) error { + rs := s.RootModule().Resources["ns1_dataset.my_dataset"] + + if rs == nil || rs.Primary.ID == "" { + return fmt.Errorf("no id is set for the dataset") + } + + client := testAccProvider.Meta().(*ns1.Client) + + foundDt, _, err := client.Datasets.Get(rs.Primary.Attributes["id"]) + if err != nil { + t.Log(err) + return err + } + + if foundDt.ID != rs.Primary.Attributes["id"] { + return fmt.Errorf("dataset mismatch: resource vs api") + } + + *dt = *foundDt + + return nil + } +} + +func testAccCheckDatasetDestroy(s *terraform.State) error { + client := testAccProvider.Meta().(*ns1.Client) + + rs := s.RootModule().Resources["ns1_dataset.my_dataset"] + if rs == nil || rs.Primary.ID == "" { + return fmt.Errorf("no id is set for the dataset") + } + + dt, _, _ := client.Datasets.Get(rs.Primary.Attributes["id"]) + if dt != nil { + return fmt.Errorf("dataset still exists: %#v", dt) + } + + return nil +} + +func testAccCheckDatasetMatchExpected(expected, result *dataset.Dataset, t *testing.T) resource.TestCheckFunc { + return func(s *terraform.State) error { + assert.Equal(t, expected.Name, result.Name) + assert.Equal(t, expected.Datatype, result.Datatype) + assert.Equal(t, expected.Repeat, result.Repeat) + assert.Equal(t, expected.Timeframe, result.Timeframe) + assert.Equal(t, expected.ExportType, result.ExportType) + assert.Equal(t, expected.RecipientEmails, result.RecipientEmails) + return nil + } +} + +func testAccDatasetBasic() (*dataset.Dataset, string) { + var timeframeCycles = int32(1) + var repeatStart = time.Now().Add(time.Minute).Unix() + + dt := dataset.NewDataset( + "", + fmt.Sprintf("tf-test-dataset-%s", acctest.RandStringFromCharSet(15, acctest.CharSetAlphaNum)), + &dataset.Datatype{ + Type: dataset.DatatypeTypeNumQueries, + Scope: dataset.DatatypeScopeAccount, + Data: nil, + }, + &dataset.Repeat{ + Start: dataset.UnixTimestamp(time.Unix(repeatStart, 0)), + RepeatsEvery: dataset.RepeatsEveryMonth, + EndAfterN: 1, + }, + &dataset.Timeframe{ + Aggregation: dataset.TimeframeAggregationMontly, + Cycles: &timeframeCycles, + }, + dataset.ExportTypeCSV, + nil, + nil, + dataset.UnixTimestamp{}, + dataset.UnixTimestamp{}, + ) + + plan := fmt.Sprintf( + ` + resource "ns1_dataset" "my_dataset" { + name = "%s" + datatype { + type = "%s" + scope = "%s" + data = {} + } + repeat { + start = %d + repeats_every = "%s" + end_after_n = %d + } + timeframe { + aggregation = "%s" + cycles = %d + } + export_type = "%s" + } + `, + dt.Name, + dt.Datatype.Type, + dt.Datatype.Scope, + time.Time(dt.Repeat.Start).Unix(), + dt.Repeat.RepeatsEvery, + dt.Repeat.EndAfterN, + dt.Timeframe.Aggregation, + *dt.Timeframe.Cycles, + dt.ExportType, + ) + + return dt, plan +} diff --git a/ns1/resource_redirect_test.go b/ns1/resource_redirect_test.go new file mode 100644 index 00000000..65d8a6c7 --- /dev/null +++ b/ns1/resource_redirect_test.go @@ -0,0 +1 @@ +package ns1 diff --git a/tf/main.tf b/tf/main.tf new file mode 100644 index 00000000..0dc638f2 --- /dev/null +++ b/tf/main.tf @@ -0,0 +1,14 @@ +resource "ns1_dataset" "my_dataset" { + name = "my date" + datatype = { + type = "num_queries" + scope = "account" + data = [] + } + timeframe = { + aggregation = "monthly" + cycles = 1 + } + repeat = null + export_type = "csv" +} \ No newline at end of file From 006f3a4d92f003611b5c3cc5c81dcaa44dd10ae3 Mon Sep 17 00:00:00 2001 From: Cristian Pontes Date: Wed, 14 Feb 2024 11:58:48 +0000 Subject: [PATCH 2/6] PENG-3689 - Releasing 2.0.11 version --- CHANGELOG.md | 6 +++++- ns1/config.go | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1be6a2f2..c1f703b8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,8 @@ -## 2.0.10 (October 12, 2023) +## 2.0.11 (February 14, 2024) +ENHANCEMENTS +* `Adds support for Datasets + +* ## 2.0.10 (October 12, 2023) BUGFIX * `ns1-go` client version bump to fix omitting tags diff --git a/ns1/config.go b/ns1/config.go index 797206c4..aae948d4 100644 --- a/ns1/config.go +++ b/ns1/config.go @@ -19,7 +19,7 @@ import ( ) var ( - clientVersion = "2.0.10" + clientVersion = "2.0.11" providerUserAgent = "tf-ns1" + "/" + clientVersion defaultRetryMax = 3 ) From d1a819ccc5517354bad32ca9ef2ebf9d86b4f030 Mon Sep 17 00:00:00 2001 From: Cristian Pontes Date: Wed, 14 Feb 2024 18:41:27 +0000 Subject: [PATCH 3/6] PENG-3689 - updating ns1-go to v2.8.0 --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 9fe5ed0f..282a954f 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ require ( github.com/hashicorp/go-retryablehttp v0.7.2 github.com/hashicorp/terraform-plugin-sdk/v2 v2.24.1 github.com/stretchr/testify v1.8.1 - gopkg.in/ns1/ns1-go.v2 v2.7.13 + gopkg.in/ns1/ns1-go.v2 v2.8.0 ) require ( diff --git a/go.sum b/go.sum index e833f7a6..9f50c587 100644 --- a/go.sum +++ b/go.sum @@ -250,8 +250,8 @@ gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8 gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -gopkg.in/ns1/ns1-go.v2 v2.7.13 h1:r07CLALg18f/L1KIK1ZJdbirBV349UtYT1rDWGjnaTk= -gopkg.in/ns1/ns1-go.v2 v2.7.13/go.mod h1:pfaU0vECVP7DIOr453z03HXS6dFJpXdNRwOyRzwmPSc= +gopkg.in/ns1/ns1-go.v2 v2.8.0 h1:oX8QEHCCvnbTSqnSZRRHiGJsgke8eluTtQhNlPpFZBc= +gopkg.in/ns1/ns1-go.v2 v2.8.0/go.mod h1:pfaU0vECVP7DIOr453z03HXS6dFJpXdNRwOyRzwmPSc= gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME= gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= From 2dee87b8b950fcdf332bbea7bbf6ea2a5d7a1161 Mon Sep 17 00:00:00 2001 From: Cristian Pontes Date: Wed, 14 Feb 2024 18:45:42 +0000 Subject: [PATCH 4/6] Fixing wrong changelog and local changes --- CHANGELOG.md | 2 +- GNUmakefile | 2 +- examples/datasets.tf | 2 +- ns1/resource_redirect_test.go | 1 - 4 files changed, 3 insertions(+), 4 deletions(-) delete mode 100644 ns1/resource_redirect_test.go diff --git a/CHANGELOG.md b/CHANGELOG.md index c1f703b8..fa6fb201 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ ENHANCEMENTS * `Adds support for Datasets -* ## 2.0.10 (October 12, 2023) +## 2.0.10 (October 12, 2023) BUGFIX * `ns1-go` client version bump to fix omitting tags diff --git a/GNUmakefile b/GNUmakefile index f4c56992..b6d219da 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -21,7 +21,7 @@ test: fmtcheck xargs -t -n4 go test $(TESTARGS) -timeout=30s -parallel=4 testacc: fmtcheck - TF_ACC=1 go test github.com/terraform-providers/terraform-provider-ns1/ns1 -run TestAccDataset_basic resource_dataset_test.go -v $(TESTARGS) -timeout 120m + TF_ACC=1 go test $(TEST) -v $(TESTARGS) -timeout 120m vet: @echo "go vet ." diff --git a/examples/datasets.tf b/examples/datasets.tf index 9328e35c..3692d113 100644 --- a/examples/datasets.tf +++ b/examples/datasets.tf @@ -1,5 +1,5 @@ resource "ns1_dataset" "my_dataset" { - name = "%s" + name = "my dataset" datatype { type = "num_queries" scope = "account" diff --git a/ns1/resource_redirect_test.go b/ns1/resource_redirect_test.go deleted file mode 100644 index 65d8a6c7..00000000 --- a/ns1/resource_redirect_test.go +++ /dev/null @@ -1 +0,0 @@ -package ns1 From 90d947cfcfd8a7f999319b1ae4665d6b1c8fa5ee Mon Sep 17 00:00:00 2001 From: Cristian Pontes Date: Wed, 14 Feb 2024 18:46:55 +0000 Subject: [PATCH 5/6] removing local test files --- tf/main.tf | 14 -------------- 1 file changed, 14 deletions(-) delete mode 100644 tf/main.tf diff --git a/tf/main.tf b/tf/main.tf deleted file mode 100644 index 0dc638f2..00000000 --- a/tf/main.tf +++ /dev/null @@ -1,14 +0,0 @@ -resource "ns1_dataset" "my_dataset" { - name = "my date" - datatype = { - type = "num_queries" - scope = "account" - data = [] - } - timeframe = { - aggregation = "monthly" - cycles = 1 - } - repeat = null - export_type = "csv" -} \ No newline at end of file From cec680f26331aca014ced8627a31352612717afc Mon Sep 17 00:00:00 2001 From: Cristian Pontes Date: Thu, 15 Feb 2024 10:17:14 +0000 Subject: [PATCH 6/6] changing release version from 2.0.11 to 2.1.0 --- CHANGELOG.md | 2 +- ns1/config.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fa6fb201..499b22c6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -## 2.0.11 (February 14, 2024) +## 2.1.0 (February 14, 2024) ENHANCEMENTS * `Adds support for Datasets diff --git a/ns1/config.go b/ns1/config.go index aae948d4..a444b0d1 100644 --- a/ns1/config.go +++ b/ns1/config.go @@ -19,7 +19,7 @@ import ( ) var ( - clientVersion = "2.0.11" + clientVersion = "2.1.0" providerUserAgent = "tf-ns1" + "/" + clientVersion defaultRetryMax = 3 )