Skip to content

Commit b718969

Browse files
authored
chore(deps): Update HashiCorp terraform libraries (#452)
1 parent 018adf0 commit b718969

File tree

8 files changed

+164
-127
lines changed

8 files changed

+164
-127
lines changed

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
- name: Run linters
2828
uses: golangci/golangci-lint-action@971e284b6050e8a5849b72094c50ab08da042db8 # v6.1.1
2929
with:
30-
version: v1.51.2
30+
version: v1.59.1
3131

3232
- name: Generate
3333
run: make generate

argocd/schema_application_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -556,6 +556,7 @@ func TestUpgradeSchemaApplication_V3V4(t *testing.T) {
556556
if err != nil {
557557
t.Fatalf("error migrating state: %s", err)
558558
}
559+
559560
if !reflect.DeepEqual(actualState, tc.expectedState) {
560561
t.Fatalf("\n\nexpected:\n\n%#v\n\ngot:\n\n%#v\n\n", tc.expectedState, actualState)
561562
}

argocd/schema_project_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ func TestResourceArgoCDProjectStateUpgradeV0(t *testing.T) {
137137
if err != nil {
138138
t.Fatalf("error migrating state: %s", err)
139139
}
140+
140141
if !reflect.DeepEqual(actualState, tc.expectedState) {
141142
t.Fatalf("\n\nexpected:\n\n%#v\n\ngot:\n\n%#v\n\n", tc.expectedState, actualState)
142143
}

argocd/structure_application.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ func expandApplicationSpec(s map[string]interface{}) (spec application.Applicati
3131
if v, ok := s["info"]; ok {
3232
spec.Info, err = expandApplicationInfo(v.(*schema.Set))
3333
if err != nil {
34-
return
34+
return spec, err
3535
}
3636
}
3737

@@ -42,7 +42,7 @@ func expandApplicationSpec(s map[string]interface{}) (spec application.Applicati
4242
if v, ok := s["sync_policy"].([]interface{}); ok && len(v) > 0 {
4343
spec.SyncPolicy, err = expandApplicationSyncPolicy(v[0])
4444
if err != nil {
45-
return
45+
return spec, err
4646
}
4747
}
4848

argocd/structure_application_set.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ func expandApplicationSetSpec(d *schema.ResourceData, featureMultipleApplication
2525
if v, ok := s["generator"].([]interface{}); ok && len(v) > 0 {
2626
spec.Generators, err = expandApplicationSetGenerators(v, featureMultipleApplicationSourcesSupported)
2727
if err != nil {
28-
return
28+
return spec, err
2929
}
3030
}
3131

@@ -41,7 +41,7 @@ func expandApplicationSetSpec(d *schema.ResourceData, featureMultipleApplication
4141
if v, ok := s["strategy"].([]interface{}); ok && len(v) > 0 {
4242
spec.Strategy, err = expandApplicationSetStrategy(v[0].(map[string]interface{}))
4343
if err != nil {
44-
return
44+
return spec, err
4545
}
4646
}
4747

@@ -56,7 +56,7 @@ func expandApplicationSetSpec(d *schema.ResourceData, featureMultipleApplication
5656
if v, ok := s["template"].([]interface{}); ok && len(v) > 0 {
5757
spec.Template, err = expandApplicationSetTemplate(v[0], featureMultipleApplicationSourcesSupported)
5858
if err != nil {
59-
return
59+
return spec, err
6060
}
6161
}
6262

@@ -822,7 +822,7 @@ func expandApplicationSetTemplate(temp interface{}, featureMultipleApplicationSo
822822
if v, ok := t["metadata"]; ok {
823823
template.ApplicationSetTemplateMeta, err = expandApplicationSetTemplateMeta(v.([]interface{})[0])
824824
if err != nil {
825-
return
825+
return template, err
826826
}
827827
}
828828

@@ -831,7 +831,7 @@ func expandApplicationSetTemplate(temp interface{}, featureMultipleApplicationSo
831831

832832
template.Spec, err = expandApplicationSpec(s)
833833
if err != nil {
834-
return
834+
return template, err
835835
}
836836

837837
l := len(template.Spec.Sources)
@@ -851,7 +851,7 @@ func expandApplicationSetTemplate(temp interface{}, featureMultipleApplicationSo
851851

852852
func expandApplicationSetTemplateMeta(meta interface{}) (metadata application.ApplicationSetTemplateMeta, err error) {
853853
if meta == nil {
854-
return
854+
return metadata, err
855855
}
856856

857857
m, ok := meta.(map[string]interface{})
@@ -884,7 +884,7 @@ func expandApplicationSetTemplateMeta(meta interface{}) (metadata application.Ap
884884

885885
func expandApplicationSetIgnoreDifferences(ids []interface{}, featureApplicationSetIgnoreApplicationDifferences bool) (result []application.ApplicationSetResourceIgnoreDifferences) {
886886
if !featureApplicationSetIgnoreApplicationDifferences {
887-
return
887+
return result
888888
}
889889

890890
for _, _id := range ids {
@@ -913,7 +913,7 @@ func expandApplicationSetIgnoreDifferences(ids []interface{}, featureApplication
913913
result = append(result, elem)
914914
}
915915

916-
return //nolint:nakedret // overriding as function follows pattern in rest of file
916+
return result
917917
}
918918
func flattenApplicationSet(as *application.ApplicationSet, d *schema.ResourceData) error {
919919
fMetadata := flattenMetadata(as.ObjectMeta, d)

argocd/structure_metadata_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ func TestMetadataIsInternalKey(t *testing.T) {
3131
if tc.Expected && isInternal != tc.Expected {
3232
t.Fatalf("Expected %q to be internal", tc.Key)
3333
}
34+
3435
if !tc.Expected && isInternal != tc.Expected {
3536
t.Fatalf("Expected %q not to be internal", tc.Key)
3637
}

go.mod

Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/oboukili/terraform-provider-argocd
22

3-
go 1.20
3+
go 1.21
44

55
require (
66
github.com/Masterminds/semver/v3 v3.2.1
@@ -12,23 +12,23 @@ require (
1212
github.com/elliotchance/pie/v2 v2.8.0
1313
github.com/golang/protobuf v1.5.4
1414
github.com/hashicorp/terraform-plugin-docs v0.16.0
15-
github.com/hashicorp/terraform-plugin-framework v1.4.2
16-
github.com/hashicorp/terraform-plugin-framework-validators v0.12.0
17-
github.com/hashicorp/terraform-plugin-go v0.19.1
15+
github.com/hashicorp/terraform-plugin-framework v1.10.0
16+
github.com/hashicorp/terraform-plugin-framework-validators v0.13.0
17+
github.com/hashicorp/terraform-plugin-go v0.23.0
1818
github.com/hashicorp/terraform-plugin-log v0.9.0
19-
github.com/hashicorp/terraform-plugin-mux v0.12.0
20-
github.com/hashicorp/terraform-plugin-sdk/v2 v2.30.0
21-
github.com/hashicorp/terraform-plugin-testing v1.6.0
19+
github.com/hashicorp/terraform-plugin-mux v0.16.0
20+
github.com/hashicorp/terraform-plugin-sdk/v2 v2.34.0
21+
github.com/hashicorp/terraform-plugin-testing v1.10.0
2222
github.com/robfig/cron/v3 v3.0.1
23-
github.com/stretchr/testify v1.8.4
24-
golang.org/x/crypto v0.21.0
23+
github.com/stretchr/testify v1.9.0
24+
golang.org/x/crypto v0.26.0
2525
k8s.io/apiextensions-apiserver v0.24.17
2626
k8s.io/apimachinery v0.24.17
2727
k8s.io/client-go v0.24.17
2828
)
2929

3030
require (
31-
cloud.google.com/go/compute v1.23.0 // indirect
31+
cloud.google.com/go/compute v1.24.0 // indirect
3232
cloud.google.com/go/compute/metadata v0.2.3 // indirect
3333
dario.cat/mergo v1.0.0 // indirect
3434
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect
@@ -44,7 +44,7 @@ require (
4444
github.com/Masterminds/sprig/v3 v3.2.3 // indirect
4545
github.com/Microsoft/go-winio v0.6.1 // indirect
4646
github.com/PagerDuty/go-pagerduty v1.7.0 // indirect
47-
github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371 // indirect
47+
github.com/ProtonMail/go-crypto v1.1.0-alpha.2 // indirect
4848
github.com/ProtonMail/go-mime v0.0.0-20230322103455-7d82a3887f2f // indirect
4949
github.com/RocketChat/Rocket.Chat.Go.SDK v0.0.0-20210112200207-10ab4d695d60 // indirect
5050
github.com/agext/levenshtein v1.2.2 // indirect
@@ -88,14 +88,14 @@ require (
8888
github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d // indirect
8989
github.com/fatih/camelcase v1.0.0 // indirect
9090
github.com/fatih/color v1.16.0 // indirect
91-
github.com/felixge/httpsnoop v1.0.3 // indirect
91+
github.com/felixge/httpsnoop v1.0.4 // indirect
9292
github.com/fvbommel/sortorder v1.0.1 // indirect
9393
github.com/go-errors/errors v1.4.2 // indirect
9494
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect
9595
github.com/go-git/go-billy/v5 v5.5.0 // indirect
96-
github.com/go-git/go-git/v5 v5.11.0 // indirect
96+
github.com/go-git/go-git/v5 v5.12.0 // indirect
9797
github.com/go-jose/go-jose/v3 v3.0.3 // indirect
98-
github.com/go-logr/logr v1.3.0 // indirect
98+
github.com/go-logr/logr v1.4.1 // indirect
9999
github.com/go-logr/stdr v1.2.2 // indirect
100100
github.com/go-openapi/analysis v0.21.4 // indirect
101101
github.com/go-openapi/errors v0.20.3 // indirect
@@ -124,7 +124,7 @@ require (
124124
github.com/google/go-querystring v1.1.0 // indirect
125125
github.com/google/gofuzz v1.2.0 // indirect
126126
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
127-
github.com/google/uuid v1.3.1 // indirect
127+
github.com/google/uuid v1.6.0 // indirect
128128
github.com/gorilla/handlers v1.5.1 // indirect
129129
github.com/gorilla/websocket v1.5.0 // indirect
130130
github.com/gregdel/pushover v1.2.1 // indirect
@@ -138,18 +138,18 @@ require (
138138
github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 // indirect
139139
github.com/hashicorp/go-hclog v1.6.3 // indirect
140140
github.com/hashicorp/go-multierror v1.1.1 // indirect
141-
github.com/hashicorp/go-plugin v1.5.2 // indirect
141+
github.com/hashicorp/go-plugin v1.6.0 // indirect
142142
github.com/hashicorp/go-retryablehttp v0.7.7 // indirect
143143
github.com/hashicorp/go-uuid v1.0.3 // indirect
144-
github.com/hashicorp/go-version v1.6.0 // indirect
145-
github.com/hashicorp/hc-install v0.6.1 // indirect
146-
github.com/hashicorp/hcl/v2 v2.19.1 // indirect
144+
github.com/hashicorp/go-version v1.7.0 // indirect
145+
github.com/hashicorp/hc-install v0.8.0 // indirect
146+
github.com/hashicorp/hcl/v2 v2.21.0 // indirect
147147
github.com/hashicorp/logutils v1.0.0 // indirect
148-
github.com/hashicorp/terraform-exec v0.19.0 // indirect
149-
github.com/hashicorp/terraform-json v0.18.0 // indirect
148+
github.com/hashicorp/terraform-exec v0.21.0 // indirect
149+
github.com/hashicorp/terraform-json v0.22.1 // indirect
150150
github.com/hashicorp/terraform-registry-address v0.2.3 // indirect
151151
github.com/hashicorp/terraform-svchost v0.1.1 // indirect
152-
github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d // indirect
152+
github.com/hashicorp/yamux v0.1.1 // indirect
153153
github.com/huandu/xstrings v1.3.3 // indirect
154154
github.com/imdario/mergo v0.3.16 // indirect
155155
github.com/improbable-eng/grpc-web v0.15.0 // indirect
@@ -199,7 +199,7 @@ require (
199199
github.com/redis/go-redis/v9 v9.0.5 // indirect
200200
github.com/rs/cors v1.8.0 // indirect
201201
github.com/russross/blackfriday v1.6.0 // indirect
202-
github.com/sergi/go-diff v1.2.0 // indirect
202+
github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 // indirect
203203
github.com/shopspring/decimal v1.3.1 // indirect
204204
github.com/sirupsen/logrus v1.9.3 // indirect
205205
github.com/skeema/knownhosts v1.2.2 // indirect
@@ -221,31 +221,31 @@ require (
221221
github.com/xanzy/ssh-agent v0.3.3 // indirect
222222
github.com/xlab/treeprint v1.1.0 // indirect
223223
github.com/yuin/gopher-lua v1.1.0 // indirect
224-
github.com/zclconf/go-cty v1.14.1 // indirect
224+
github.com/zclconf/go-cty v1.15.0 // indirect
225225
go.mongodb.org/mongo-driver v1.11.3 // indirect
226226
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.0 // indirect
227-
go.opentelemetry.io/otel v1.20.0 // indirect
228-
go.opentelemetry.io/otel/metric v1.20.0 // indirect
229-
go.opentelemetry.io/otel/trace v1.20.0 // indirect
227+
go.opentelemetry.io/otel v1.22.0 // indirect
228+
go.opentelemetry.io/otel/metric v1.22.0 // indirect
229+
go.opentelemetry.io/otel/trace v1.22.0 // indirect
230230
go.starlark.net v0.0.0-20220328144851-d1966c6b9fcd // indirect
231231
golang.org/x/exp v0.0.0-20230809150735-7b3493d9a819 // indirect
232-
golang.org/x/mod v0.13.0 // indirect
233-
golang.org/x/net v0.23.0 // indirect
234-
golang.org/x/oauth2 v0.11.0 // indirect
235-
golang.org/x/sync v0.3.0 // indirect
236-
golang.org/x/sys v0.20.0 // indirect
237-
golang.org/x/term v0.18.0 // indirect
238-
golang.org/x/text v0.14.0 // indirect
232+
golang.org/x/mod v0.19.0 // indirect
233+
golang.org/x/net v0.25.0 // indirect
234+
golang.org/x/oauth2 v0.17.0 // indirect
235+
golang.org/x/sync v0.8.0 // indirect
236+
golang.org/x/sys v0.23.0 // indirect
237+
golang.org/x/term v0.23.0 // indirect
238+
golang.org/x/text v0.17.0 // indirect
239239
golang.org/x/time v0.3.0 // indirect
240-
golang.org/x/tools v0.13.0 // indirect
240+
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect
241241
gomodules.xyz/envconfig v1.3.1-0.20190308184047-426f31af0d45 // indirect
242242
gomodules.xyz/notify v0.1.1 // indirect
243-
google.golang.org/appengine v1.6.7 // indirect
244-
google.golang.org/genproto v0.0.0-20230822172742-b8732ec3820d // indirect
245-
google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d // indirect
246-
google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect
247-
google.golang.org/grpc v1.59.0 // indirect
248-
google.golang.org/protobuf v1.33.0 // indirect
243+
google.golang.org/appengine v1.6.8 // indirect
244+
google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de // indirect
245+
google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de // indirect
246+
google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de // indirect
247+
google.golang.org/grpc v1.63.2 // indirect
248+
google.golang.org/protobuf v1.34.0 // indirect
249249
gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc // indirect
250250
gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df // indirect
251251
gopkg.in/inf.v0 v0.9.1 // indirect

0 commit comments

Comments
 (0)