Skip to content

Commit 3343210

Browse files
authored
Terraform rancher2 agent customization (#1137)
1 parent ad8e96e commit 3343210

24 files changed

Lines changed: 1123 additions & 142 deletions

go.mod

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ require (
66
github.com/ghodss/yaml v1.0.0
77
github.com/hashicorp/go-version v1.6.0
88
github.com/hashicorp/terraform-plugin-sdk v1.17.2
9-
github.com/rancher/norman v0.0.0-20230328153514-ae12f166495a
9+
github.com/rancher/norman v0.0.0-20230426211126-d3552b018687
1010
github.com/rancher/rancher v0.0.0-20230512212658-eaa7b90049a4
1111
github.com/rancher/rancher/pkg/apis v0.0.0
1212
github.com/rancher/rancher/pkg/client v0.0.0
1313
golang.org/x/crypto v0.6.0
14-
golang.org/x/sync v0.1.0
14+
golang.org/x/sync v0.2.0
1515
gopkg.in/yaml.v2 v2.4.0
1616
k8s.io/api v0.25.4
1717
k8s.io/apimachinery v0.25.4
@@ -33,7 +33,7 @@ require (
3333
github.com/apparentlymart/go-textseg/v12 v12.0.0 // indirect
3434
github.com/apparentlymart/go-textseg/v13 v13.0.0 // indirect
3535
github.com/armon/go-radix v1.0.0 // indirect
36-
github.com/aws/aws-sdk-go v1.44.253 // indirect
36+
github.com/aws/aws-sdk-go v1.44.266 // indirect
3737
github.com/beorn7/perks v1.0.1 // indirect
3838
github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect
3939
github.com/bgentry/speakeasy v0.1.0 // indirect
@@ -44,7 +44,7 @@ require (
4444
github.com/evanphx/json-patch v4.12.0+incompatible // indirect
4545
github.com/fatih/color v1.13.0 // indirect
4646
github.com/fsnotify/fsnotify v1.5.4 // indirect
47-
github.com/go-logr/logr v1.2.3 // indirect
47+
github.com/go-logr/logr v1.2.4 // indirect
4848
github.com/go-openapi/jsonpointer v0.19.6 // indirect
4949
github.com/go-openapi/jsonreference v0.20.1 // indirect
5050
github.com/go-openapi/swag v0.22.3 // indirect
@@ -105,13 +105,13 @@ require (
105105
github.com/prometheus/common v0.37.0 // indirect
106106
github.com/prometheus/procfs v0.8.0 // indirect
107107
github.com/rancher/aks-operator v1.1.1-rc2 // indirect
108-
github.com/rancher/eks-operator v1.2.1-rc3 // indirect
108+
github.com/rancher/eks-operator v1.2.1 // indirect
109109
github.com/rancher/fleet/pkg/apis v0.0.0-20230420151154-ab055fa31e05 // indirect
110110
github.com/rancher/gke-operator v1.1.5 // indirect
111111
github.com/rancher/lasso v0.0.0-20230428185353-36908edf817b // indirect
112112
github.com/rancher/rke v1.4.6-rc3 // indirect
113113
github.com/rancher/wrangler v1.1.1 // indirect
114-
github.com/sirupsen/logrus v1.9.0 // indirect
114+
github.com/sirupsen/logrus v1.9.2 // indirect
115115
github.com/spf13/afero v1.8.2 // indirect
116116
github.com/spf13/pflag v1.0.5 // indirect
117117
github.com/ulikunitz/xz v0.5.10 // indirect
@@ -120,10 +120,10 @@ require (
120120
github.com/zclconf/go-cty v1.8.2 // indirect
121121
github.com/zclconf/go-cty-yaml v1.0.2 // indirect
122122
go.opencensus.io v0.24.0 // indirect
123-
golang.org/x/net v0.9.0 // indirect
123+
golang.org/x/net v0.10.0 // indirect
124124
golang.org/x/oauth2 v0.1.0 // indirect
125-
golang.org/x/sys v0.7.0 // indirect
126-
golang.org/x/term v0.7.0 // indirect
125+
golang.org/x/sys v0.8.0 // indirect
126+
golang.org/x/term v0.8.0 // indirect
127127
golang.org/x/text v0.9.0 // indirect
128128
golang.org/x/time v0.3.0 // indirect
129129
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect

go.sum

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -256,8 +256,8 @@ github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:l
256256
github.com/aws/aws-sdk-go v1.15.78/go.mod h1:E3/ieXAlvM0XWO57iftYVDLLvQ824smPP3ATZkfNZeM=
257257
github.com/aws/aws-sdk-go v1.37.0/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro=
258258
github.com/aws/aws-sdk-go v1.44.122/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo=
259-
github.com/aws/aws-sdk-go v1.44.253 h1:iqDd0okcH4ShfFexz2zzf4VmeDFf6NOMm07pHnEb8iY=
260-
github.com/aws/aws-sdk-go v1.44.253/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI=
259+
github.com/aws/aws-sdk-go v1.44.266 h1:MWd775dcYf7NrwgcHLtlsIbWoWkX8p4vomfNHr88zH0=
260+
github.com/aws/aws-sdk-go v1.44.266/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI=
261261
github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM=
262262
github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
263263
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
@@ -390,8 +390,9 @@ github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTg
390390
github.com/go-logr/logr v0.4.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU=
391391
github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
392392
github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
393-
github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0=
394393
github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
394+
github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ=
395+
github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
395396
github.com/go-logr/zapr v0.1.0/go.mod h1:tabnROwaDl0UNxkVeFRbY8bwB37GwRv0P8lg6aAiEnk=
396397
github.com/go-logr/zapr v0.4.0/go.mod h1:tabnROwaDl0UNxkVeFRbY8bwB37GwRv0P8lg6aAiEnk=
397398
github.com/go-logr/zapr v1.2.3 h1:a9vnzlIBPQBBkeaR9IuMUfmVOrQlkoC4YfPoFkX3T7A=
@@ -819,7 +820,7 @@ github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE=
819820
github.com/onsi/ginkgo/v2 v2.1.3/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c=
820821
github.com/onsi/ginkgo/v2 v2.1.4/go.mod h1:um6tUpWM/cxCK3/FK8BXqEiUMUwRgSM4JXG47RKZmLU=
821822
github.com/onsi/ginkgo/v2 v2.1.6/go.mod h1:MEH45j8TBi6u9BMogfbp0stKC5cdGjumZj5Y7AG4VIk=
822-
github.com/onsi/ginkgo/v2 v2.9.2 h1:BA2GMJOtfGAfagzYtrAlufIP0lq6QERkFmHLMLPwFSU=
823+
github.com/onsi/ginkgo/v2 v2.9.5 h1:+6Hr4uxzP4XIUyAkg61dWBw8lb/gc4/X5luuxN/EC+Q=
823824
github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA=
824825
github.com/onsi/gomega v1.3.0/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA=
825826
github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
@@ -831,7 +832,7 @@ github.com/onsi/gomega v1.16.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAl
831832
github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY=
832833
github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro=
833834
github.com/onsi/gomega v1.20.1/go.mod h1:DtrZpjmvpn2mPm4YWQa0/ALMDj9v4YxLgojwPeREyVo=
834-
github.com/onsi/gomega v1.27.6 h1:ENqfyGeS5AX/rlXDd/ETokDz93u0YufY1Pgxuy/PvWE=
835+
github.com/onsi/gomega v1.27.7 h1:fVih9JD6ogIiHUN6ePK7HJidyEDpWGVB5mzM7cWNXoU=
835836
github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM=
836837
github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o=
837838
github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
@@ -892,8 +893,8 @@ github.com/rancher/aks-operator v1.1.1-rc2 h1:c7Ca+dW1+Kp+EVYcyrqa6gWmb0FMQzKnlK
892893
github.com/rancher/aks-operator v1.1.1-rc2/go.mod h1:vH7uVTYNZjAC7wJ6oYnefwwoQJxCPwAznvmH1d+Nll8=
893894
github.com/rancher/client-go v1.25.4-rancher1 h1:9MlBC8QbgngUkhNzMR8rZmmCIj6WNRHFOnYiwC2Kty4=
894895
github.com/rancher/client-go v1.25.4-rancher1/go.mod h1:8trHCAC83XKY0wsBIpbirZU4NTUpbuhc2JnI7OruGZw=
895-
github.com/rancher/eks-operator v1.2.1-rc3 h1:Bm+D2PLsZ+TKfyRYxVA/XQH275rVntUyP/ahprZTPec=
896-
github.com/rancher/eks-operator v1.2.1-rc3/go.mod h1:w7zHAQTBrDJlcRs1+oyfuzLgPooSLSrPXLJey3p7MsA=
896+
github.com/rancher/eks-operator v1.2.1 h1:AwkDVnK7X2lnlo/VzC+ve7xTotY9thQhTbzICuEvFqQ=
897+
github.com/rancher/eks-operator v1.2.1/go.mod h1:e8Tqz6q5B1LWDudAYsMoziiZmUQfCIIfToWKQTJrIyE=
897898
github.com/rancher/fleet/pkg/apis v0.0.0-20230420151154-ab055fa31e05 h1:dBR/K04EcW2xZ1HPbUqNUHdNyfIO1LEpT1Eo1evKcD8=
898899
github.com/rancher/fleet/pkg/apis v0.0.0-20230420151154-ab055fa31e05/go.mod h1:TbpjMODeuFUJlHG8IfehZ4FBzgzpxwPwa+GwtFq2Tq0=
899900
github.com/rancher/gke-operator v1.1.5 h1:XHNrM67enwDkqYG5C4s1HVgfJGmfwtVYGfl9TgXT6zA=
@@ -902,8 +903,8 @@ github.com/rancher/lasso v0.0.0-20200427171700-e0509f89f319/go.mod h1:6Dw19z1lDI
902903
github.com/rancher/lasso v0.0.0-20210616224652-fc3ebd901c08/go.mod h1:9qZd/S8DqWzfKtjKGgSoHqGEByYmUE3qRaBaaAHwfEM=
903904
github.com/rancher/lasso v0.0.0-20230428185353-36908edf817b h1:mcCmrZZlkjh9bMWk6CXCf85WajjarmEyuSJzCTL67fU=
904905
github.com/rancher/lasso v0.0.0-20230428185353-36908edf817b/go.mod h1:dEfC9eFQigj95lv/JQ8K5e7+qQCacWs1aIA6nLxKzT8=
905-
github.com/rancher/norman v0.0.0-20230328153514-ae12f166495a h1:yp5L7onQLFaGLtJgEsKy5VAKSD8wdzwl9Qti9aavRv8=
906-
github.com/rancher/norman v0.0.0-20230328153514-ae12f166495a/go.mod h1:7MyWxfCmPl6N/UFLu4neLH6nwTFgQQF5rxtUGyZvPFE=
906+
github.com/rancher/norman v0.0.0-20230426211126-d3552b018687 h1:9Bf4fZBIdkidKTqHFsJXMlnzflxx3h4ZAEH/n6HMuyI=
907+
github.com/rancher/norman v0.0.0-20230426211126-d3552b018687/go.mod h1:7MyWxfCmPl6N/UFLu4neLH6nwTFgQQF5rxtUGyZvPFE=
907908
github.com/rancher/rancher v0.0.0-20230512212658-eaa7b90049a4 h1:bH3VdarXZF2m7BpR8B606RyKZ50nCRh/rDXx8+kI3ik=
908909
github.com/rancher/rancher v0.0.0-20230512212658-eaa7b90049a4/go.mod h1:JNtROLf9mzc3QZyKt1esP3QWKpenZ2LyggFXy8Qm3Rs=
909910
github.com/rancher/rancher/pkg/apis v0.0.0-20230512212658-eaa7b90049a4 h1:f2EsjKPe3AV/lFkyfva2dov7E+2ehI4vCB0Fb7s5izo=
@@ -937,8 +938,8 @@ github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6Mwd
937938
github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88=
938939
github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
939940
github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
940-
github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0=
941-
github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
941+
github.com/sirupsen/logrus v1.9.2 h1:oxx1eChJGI6Uks2ZC4W1zpLlVgqB8ner4EuQwV4Ik1Y=
942+
github.com/sirupsen/logrus v1.9.2/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
942943
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
943944
github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA=
944945
github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM=
@@ -979,7 +980,7 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/
979980
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
980981
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
981982
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
982-
github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8=
983+
github.com/stretchr/testify v1.8.3 h1:RP3t2pwF7cMEbC1dqtB6poj3niw/9gnV4Cjg5oW5gtY=
983984
github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw=
984985
github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk=
985986
github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
@@ -1196,8 +1197,8 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug
11961197
golang.org/x/net v0.0.0-20220909164309-bea034e7d591/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk=
11971198
golang.org/x/net v0.0.0-20221014081412-f15817d10f9b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk=
11981199
golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco=
1199-
golang.org/x/net v0.9.0 h1:aWJ/m6xSmxWBx+V0XRHTlrYrPG56jKsLdTFmsSsCzOM=
1200-
golang.org/x/net v0.9.0/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns=
1200+
golang.org/x/net v0.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M=
1201+
golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
12011202
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
12021203
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
12031204
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
@@ -1239,8 +1240,8 @@ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJ
12391240
golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
12401241
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
12411242
golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
1242-
golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o=
1243-
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
1243+
golang.org/x/sync v0.2.0 h1:PUR+T4wwASmuSTYdKjYHI5TD22Wy5ogLU5qZCOLxBrI=
1244+
golang.org/x/sync v0.2.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
12441245
golang.org/x/sys v0.0.0-20180117170059-2c42eef0765b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
12451246
golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
12461247
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
@@ -1340,13 +1341,13 @@ golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBc
13401341
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
13411342
golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
13421343
golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
1343-
golang.org/x/sys v0.7.0 h1:3jlCCIQZPdOYu1h8BkNvLz8Kgwtae2cagcG/VamtZRU=
1344-
golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
1344+
golang.org/x/sys v0.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU=
1345+
golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
13451346
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
13461347
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
13471348
golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
1348-
golang.org/x/term v0.7.0 h1:BEvjmm5fURWqcfbSKTdpkDXYBrUS1c0m8agp14W48vQ=
1349-
golang.org/x/term v0.7.0/go.mod h1:P32HKFT3hSsZrRxla30E9HqToFYAQPCMs/zFMBUFqPY=
1349+
golang.org/x/term v0.8.0 h1:n5xxQn2i3PC0yLAbjTpNT85q/Kgzcr2gIoX9OrJUols=
1350+
golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo=
13501351
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
13511352
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
13521353
golang.org/x/text v0.3.1-0.20171227012246-e19ae1496984/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
@@ -1436,7 +1437,7 @@ golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
14361437
golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
14371438
golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E=
14381439
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
1439-
golang.org/x/tools v0.7.0 h1:W4OVu8VVOaIO0yzWMNdepAulS7YfoS3Zabrm8DOXXU4=
1440+
golang.org/x/tools v0.9.1 h1:8WMNJAz3zrtPmnYC7ISf5dEn3MT0gY7jBJfw27yrrLo=
14401441
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
14411442
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
14421443
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=

rancher2/data_source_rancher2_cluster.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ func dataSourceRancher2Cluster() *schema.Resource {
150150
MaxItems: 1,
151151
Computed: true,
152152
Elem: &schema.Resource{
153-
Schema: clusterRegistationTokenFields(),
153+
Schema: clusterRegistrationTokenFields(),
154154
},
155155
},
156156
"cluster_template_answers": {

rancher2/data_source_rancher2_cluster_v2.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ func dataSourceRancher2ClusterV2() *schema.Resource {
6767
Computed: true,
6868
Sensitive: true,
6969
Elem: &schema.Resource{
70-
Schema: clusterRegistationTokenFields(),
70+
Schema: clusterRegistrationTokenFields(),
7171
},
7272
},
7373
"kube_config": {

rancher2/resource_rancher2_cluster.go

Lines changed: 29 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -289,22 +289,34 @@ func resourceRancher2ClusterUpdate(d *schema.ResourceData, meta interface{}) err
289289
}
290290

291291
enableNetworkPolicy := d.Get("enable_network_policy").(bool)
292+
293+
clusterAgentDeploymentCustomization, err := expandAgentDeploymentCustomization(d.Get("cluster_agent_deployment_customization").([]interface{}))
294+
if err != nil {
295+
return fmt.Errorf("[ERROR] Updating Cluster ID %s: %s", d.Id(), err)
296+
}
297+
fleetAgentDeploymentCustomization, err := expandAgentDeploymentCustomization(d.Get("fleet_agent_deployment_customization").([]interface{}))
298+
if err != nil {
299+
return fmt.Errorf("[ERROR] Updating Cluster ID %s: %s", d.Id(), err)
300+
}
301+
292302
update := map[string]interface{}{
293-
"name": d.Get("name").(string),
294-
"agentEnvVars": expandEnvVars(d.Get("agent_env_vars").([]interface{})),
295-
"description": d.Get("description").(string),
296-
"defaultPodSecurityPolicyTemplateId": d.Get("default_pod_security_policy_template_id").(string),
297-
"desiredAgentImage": d.Get("desired_agent_image").(string),
298-
"desiredAuthImage": d.Get("desired_auth_image").(string),
299-
"dockerRootDir": d.Get("docker_root_dir").(string),
300-
"fleetWorkspaceName": d.Get("fleet_workspace_name").(string),
301-
"enableClusterAlerting": d.Get("enable_cluster_alerting").(bool),
302-
"enableClusterMonitoring": d.Get("enable_cluster_monitoring").(bool),
303-
"enableNetworkPolicy": &enableNetworkPolicy,
304-
"istioEnabled": d.Get("enable_cluster_istio").(bool),
305-
"localClusterAuthEndpoint": expandClusterAuthEndpoint(d.Get("cluster_auth_endpoint").([]interface{})),
306-
"annotations": toMapString(d.Get("annotations").(map[string]interface{})),
307-
"labels": toMapString(d.Get("labels").(map[string]interface{})),
303+
"name": d.Get("name").(string),
304+
"agentEnvVars": expandEnvVars(d.Get("agent_env_vars").([]interface{})),
305+
"clusterAgentDeploymentCustomization": clusterAgentDeploymentCustomization,
306+
"fleetAgentDeploymentCustomization": fleetAgentDeploymentCustomization,
307+
"description": d.Get("description").(string),
308+
"defaultPodSecurityPolicyTemplateId": d.Get("default_pod_security_policy_template_id").(string),
309+
"desiredAgentImage": d.Get("desired_agent_image").(string),
310+
"desiredAuthImage": d.Get("desired_auth_image").(string),
311+
"dockerRootDir": d.Get("docker_root_dir").(string),
312+
"fleetWorkspaceName": d.Get("fleet_workspace_name").(string),
313+
"enableClusterAlerting": d.Get("enable_cluster_alerting").(bool),
314+
"enableClusterMonitoring": d.Get("enable_cluster_monitoring").(bool),
315+
"enableNetworkPolicy": &enableNetworkPolicy,
316+
"istioEnabled": d.Get("enable_cluster_istio").(bool),
317+
"localClusterAuthEndpoint": expandClusterAuthEndpoint(d.Get("cluster_auth_endpoint").([]interface{})),
318+
"annotations": toMapString(d.Get("annotations").(map[string]interface{})),
319+
"labels": toMapString(d.Get("labels").(map[string]interface{})),
308320
}
309321

310322
// cluster_monitoring is not updated here. Setting old `enable_cluster_monitoring` value if it was updated
@@ -548,7 +560,7 @@ func findFlattenClusterRegistrationToken(client *managementClient.Client, cluste
548560
return []interface{}{}, err
549561
}
550562

551-
return flattenClusterRegistationToken(clusterReg)
563+
return flattenClusterRegistrationToken(clusterReg)
552564
}
553565

554566
func findClusterRegistrationToken(client *managementClient.Client, clusterID string) (*managementClient.ClusterRegistrationToken, error) {
@@ -579,7 +591,7 @@ func findClusterRegistrationToken(client *managementClient.Client, clusterID str
579591
func createClusterRegistrationToken(client *managementClient.Client, clusterID string) (*managementClient.ClusterRegistrationToken, error) {
580592
log.Printf("[DEBUG] Creating cluster registration token for %s", clusterID)
581593

582-
regToken, err := expandClusterRegistationToken([]interface{}{}, clusterID)
594+
regToken, err := expandClusterRegistrationToken([]interface{}{}, clusterID)
583595
if err != nil {
584596
return nil, err
585597
}

0 commit comments

Comments
 (0)