Skip to content

Commit a18dd2c

Browse files
authored
Upgrade to Terraform SDK v2 (#275)
The provider is now based on Terraform plugin SDK version 2 and Golang 1.19.
1 parent 16fa19c commit a18dd2c

50 files changed

Lines changed: 418 additions & 782 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/test-pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
- name: Set up Go
1515
uses: actions/setup-go@v3
1616
with:
17-
go-version: 1.17
17+
go-version: 1.19
1818
- name: Unit Test
1919
run: make test
2020
- name: Vet

CHANGELOG.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,32 @@
1+
## 2.0.0-pre1 (release pending)
2+
ENHANCEMENTS
3+
4+
* Upgraded to Terraform SDK 2.24.1. Users of Pulsar will need to make minor changes in their resource files, see below.
5+
6+
INCOMPATIBILITIES WITH PREVIOUS VERSIONS
7+
8+
* The `ns1_application` resource attributes `config`, `default_config` and `blended_metric_weights` are now blocks, with only one item permitted. This is due to an SDK 2.x restriction on nested structures. Existing resource files will need to be edited to remove the equals sign in the declarations of the affected stanzas, for example:
9+
10+
```
11+
resource "ns1_application" "it" {
12+
name = "my_application"
13+
browser_wait_millis = 123
14+
jobs_per_transaction = 100
15+
default_config {
16+
http = true
17+
https = false
18+
request_timeout_millis = 100
19+
job_timeout_millis = 100
20+
static_values = true
21+
}
22+
}
23+
```
24+
25+
instead of:
26+
```
27+
default_config = {
28+
```
29+
130
## 1.13.4 (January 10, 2023)
231
ENHANCEMENTS
332

go.mod

Lines changed: 36 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -3,93 +3,60 @@ module github.com/terraform-providers/terraform-provider-ns1
33
go 1.19
44

55
require (
6-
github.com/fatih/structs v1.0.0
7-
github.com/hashicorp/go-retryablehttp v0.7.1
8-
github.com/hashicorp/terraform-plugin-sdk v1.17.2
9-
github.com/stretchr/testify v1.7.0
6+
github.com/fatih/structs v1.1.0
7+
github.com/hashicorp/go-retryablehttp v0.7.2
8+
github.com/hashicorp/terraform-plugin-sdk/v2 v2.24.1
9+
github.com/stretchr/testify v1.8.1
1010
gopkg.in/ns1/ns1-go.v2 v2.7.3
1111
)
1212

1313
require (
14-
cloud.google.com/go v0.65.0 // indirect
15-
cloud.google.com/go/storage v1.10.0 // indirect
16-
github.com/Masterminds/goutils v1.1.1 // indirect
17-
github.com/Masterminds/semver/v3 v3.1.1 // indirect
18-
github.com/Masterminds/sprig/v3 v3.2.2 // indirect
19-
github.com/agext/levenshtein v1.2.2 // indirect
14+
github.com/agext/levenshtein v1.2.3 // indirect
2015
github.com/apparentlymart/go-cidr v1.1.0 // indirect
21-
github.com/apparentlymart/go-textseg/v12 v12.0.0 // indirect
2216
github.com/apparentlymart/go-textseg/v13 v13.0.0 // indirect
23-
github.com/armon/go-radix v1.0.0 // indirect
24-
github.com/aws/aws-sdk-go v1.37.0 // indirect
25-
github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect
26-
github.com/bgentry/speakeasy v0.1.0 // indirect
2717
github.com/davecgh/go-spew v1.1.1 // indirect
2818
github.com/fatih/color v1.13.0 // indirect
29-
github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect
30-
github.com/golang/protobuf v1.4.2 // indirect
31-
github.com/google/go-cmp v0.5.8 // indirect
32-
github.com/google/uuid v1.3.0 // indirect
33-
github.com/googleapis/gax-go/v2 v2.0.5 // indirect
19+
github.com/golang/protobuf v1.5.2 // indirect
20+
github.com/google/go-cmp v0.5.9 // indirect
3421
github.com/hashicorp/errwrap v1.1.0 // indirect
3522
github.com/hashicorp/go-checkpoint v0.5.0 // indirect
3623
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
37-
github.com/hashicorp/go-getter v1.5.3 // indirect
38-
github.com/hashicorp/go-hclog v0.9.2 // indirect
24+
github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 // indirect
25+
github.com/hashicorp/go-hclog v1.4.0 // indirect
3926
github.com/hashicorp/go-multierror v1.1.1 // indirect
40-
github.com/hashicorp/go-plugin v1.3.0 // indirect
41-
github.com/hashicorp/go-safetemp v1.0.0 // indirect
27+
github.com/hashicorp/go-plugin v1.4.8 // indirect
4228
github.com/hashicorp/go-uuid v1.0.3 // indirect
4329
github.com/hashicorp/go-version v1.6.0 // indirect
44-
github.com/hashicorp/hcl v0.0.0-20170504190234-a4b07c25de5f // indirect
45-
github.com/hashicorp/hcl/v2 v2.8.2 // indirect
30+
github.com/hashicorp/hc-install v0.4.0 // indirect
31+
github.com/hashicorp/hcl/v2 v2.15.0 // indirect
4632
github.com/hashicorp/logutils v1.0.0 // indirect
47-
github.com/hashicorp/terraform-config-inspect v0.0.0-20191212124732-c6ae6269b9d7 // indirect
48-
github.com/hashicorp/terraform-exec v0.13.3 // indirect
49-
github.com/hashicorp/terraform-json v0.10.0 // indirect
50-
github.com/hashicorp/terraform-plugin-test/v2 v2.2.1 // indirect
33+
github.com/hashicorp/terraform-exec v0.17.3 // indirect
34+
github.com/hashicorp/terraform-json v0.14.0 // indirect
35+
github.com/hashicorp/terraform-plugin-go v0.14.3 // indirect
36+
github.com/hashicorp/terraform-plugin-log v0.7.0 // indirect
37+
github.com/hashicorp/terraform-registry-address v0.1.0 // indirect
5138
github.com/hashicorp/terraform-svchost v0.0.0-20200729002733-f050f53b9734 // indirect
52-
github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d // indirect
53-
github.com/huandu/xstrings v1.3.2 // indirect
54-
github.com/imdario/mergo v0.3.13 // indirect
55-
github.com/jmespath/go-jmespath v0.4.0 // indirect
56-
github.com/jstemmer/go-junit-report v0.9.1 // indirect
57-
github.com/klauspost/compress v1.11.2 // indirect
58-
github.com/mattn/go-colorable v0.1.12 // indirect
59-
github.com/mattn/go-isatty v0.0.14 // indirect
60-
github.com/mitchellh/cli v1.1.4 // indirect
61-
github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db // indirect
39+
github.com/hashicorp/yamux v0.1.1 // indirect
40+
github.com/mattn/go-colorable v0.1.13 // indirect
41+
github.com/mattn/go-isatty v0.0.17 // indirect
6242
github.com/mitchellh/copystructure v1.2.0 // indirect
63-
github.com/mitchellh/go-homedir v1.1.0 // indirect
64-
github.com/mitchellh/go-testing-interface v1.0.4 // indirect
65-
github.com/mitchellh/go-wordwrap v1.0.0 // indirect
66-
github.com/mitchellh/mapstructure v1.1.2 // indirect
43+
github.com/mitchellh/go-testing-interface v1.14.1 // indirect
44+
github.com/mitchellh/go-wordwrap v1.0.1 // indirect
45+
github.com/mitchellh/mapstructure v1.5.0 // indirect
6746
github.com/mitchellh/reflectwalk v1.0.2 // indirect
68-
github.com/oklog/run v1.0.0 // indirect
47+
github.com/oklog/run v1.1.0 // indirect
6948
github.com/pmezard/go-difflib v1.0.0 // indirect
70-
github.com/posener/complete v1.2.3 // indirect
71-
github.com/shopspring/decimal v1.3.1 // indirect
72-
github.com/spf13/afero v1.2.2 // indirect
73-
github.com/spf13/cast v1.5.0 // indirect
74-
github.com/ulikunitz/xz v0.5.8 // indirect
49+
github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect
7550
github.com/vmihailenco/msgpack/v4 v4.3.12 // indirect
76-
github.com/vmihailenco/tagparser v0.1.1 // indirect
77-
github.com/zclconf/go-cty v1.10.0 // indirect
78-
github.com/zclconf/go-cty-yaml v1.0.2 // indirect
79-
go.opencensus.io v0.22.4 // indirect
80-
golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d // indirect
81-
golang.org/x/lint v0.0.0-20200302205851-738671d3881b // indirect
82-
golang.org/x/mod v0.3.0 // indirect
83-
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2 // indirect
84-
golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43 // indirect
85-
golang.org/x/sys v0.0.0-20220627191245-f75cf1eec38b // indirect
86-
golang.org/x/text v0.3.7 // indirect
87-
golang.org/x/tools v0.0.0-20201028111035-eafbe7b904eb // indirect
88-
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
89-
google.golang.org/api v0.34.0 // indirect
90-
google.golang.org/appengine v1.6.6 // indirect
91-
google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d // indirect
92-
google.golang.org/grpc v1.32.0 // indirect
93-
google.golang.org/protobuf v1.25.0 // indirect
94-
gopkg.in/yaml.v3 v3.0.0 // indirect
51+
github.com/vmihailenco/tagparser v0.1.2 // indirect
52+
github.com/zclconf/go-cty v1.12.1 // indirect
53+
golang.org/x/crypto v0.5.0 // indirect
54+
golang.org/x/net v0.5.0 // indirect
55+
golang.org/x/sys v0.4.0 // indirect
56+
golang.org/x/text v0.6.0 // indirect
57+
google.golang.org/appengine v1.6.7 // indirect
58+
google.golang.org/genproto v0.0.0-20230109162033-3c3c17ce83e6 // indirect
59+
google.golang.org/grpc v1.51.0 // indirect
60+
google.golang.org/protobuf v1.28.1 // indirect
61+
gopkg.in/yaml.v3 v3.0.1 // indirect
9562
)

0 commit comments

Comments
 (0)