diff --git a/go.mod b/go.mod
index 99e916eab8..ce64ff38d8 100644
--- a/go.mod
+++ b/go.mod
@@ -5,15 +5,15 @@ go 1.24.0
require (
github.com/client9/misspell v0.3.4
github.com/go-jose/go-jose/v3 v3.0.4
- github.com/golangci/golangci-lint/v2 v2.6.0
+ github.com/golangci/golangci-lint/v2 v2.6.2
github.com/google/go-github/v67 v67.0.0
github.com/google/uuid v1.6.0
- github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320
- github.com/hashicorp/terraform-plugin-sdk/v2 v2.34.0
+ github.com/hashicorp/go-cty v1.5.0
+ github.com/hashicorp/terraform-plugin-sdk/v2 v2.38.1
github.com/shurcooL/githubv4 v0.0.0-20221126192849-0b5c4c7994eb
github.com/stretchr/testify v1.11.1
- golang.org/x/crypto v0.43.0
- golang.org/x/oauth2 v0.30.0
+ golang.org/x/crypto v0.45.0
+ golang.org/x/oauth2 v0.33.0
)
require (
@@ -34,7 +34,7 @@ require (
github.com/Masterminds/semver/v3 v3.4.0 // indirect
github.com/MirrexOne/unqueryvet v1.2.1 // indirect
github.com/OpenPeeDeeP/depguard/v2 v2.2.1 // indirect
- github.com/ProtonMail/go-crypto v1.1.0-alpha.2 // indirect
+ github.com/ProtonMail/go-crypto v1.1.6 // indirect
github.com/agext/levenshtein v1.2.2 // indirect
github.com/alecthomas/chroma/v2 v2.20.0 // indirect
github.com/alecthomas/go-check-sumtype v0.3.1 // indirect
@@ -66,11 +66,11 @@ require (
github.com/charmbracelet/x/cellbuf v0.0.13-0.20250311204145-2c3ea96c31dd // indirect
github.com/charmbracelet/x/term v0.2.1 // indirect
github.com/ckaznocha/intrange v0.3.1 // indirect
- github.com/cloudflare/circl v1.3.7 // indirect
+ github.com/cloudflare/circl v1.6.1 // indirect
github.com/curioswitch/go-reassign v0.3.0 // indirect
github.com/daixiang0/gci v0.13.7 // indirect
github.com/dave/dst v0.27.3 // indirect
- github.com/davecgh/go-spew v1.1.1 // indirect
+ github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/denis-tingaikin/go-header v0.5.0 // indirect
github.com/dlclark/regexp2 v1.11.5 // indirect
github.com/ettle/strcase v0.2.0 // indirect
@@ -80,7 +80,7 @@ require (
github.com/fsnotify/fsnotify v1.5.4 // indirect
github.com/fzipp/gocyclo v0.6.0 // indirect
github.com/ghostiam/protogetter v0.3.17 // indirect
- github.com/go-critic/go-critic v0.14.0 // indirect
+ github.com/go-critic/go-critic v0.14.2 // indirect
github.com/go-toolsmith/astcast v1.1.0 // indirect
github.com/go-toolsmith/astcopy v1.1.0 // indirect
github.com/go-toolsmith/astequal v1.2.0 // indirect
@@ -114,31 +114,32 @@ require (
github.com/hashicorp/errwrap v1.0.0 // indirect
github.com/hashicorp/go-checkpoint v0.5.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
- github.com/hashicorp/go-hclog v1.5.0 // indirect
+ github.com/hashicorp/go-hclog v1.6.3 // indirect
github.com/hashicorp/go-immutable-radix/v2 v2.1.0 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
- github.com/hashicorp/go-plugin v1.6.0 // indirect
+ github.com/hashicorp/go-plugin v1.7.0 // indirect
+ github.com/hashicorp/go-retryablehttp v0.7.7 // indirect
github.com/hashicorp/go-uuid v1.0.3 // indirect
github.com/hashicorp/go-version v1.7.0 // indirect
github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect
- github.com/hashicorp/hc-install v0.6.4 // indirect
+ github.com/hashicorp/hc-install v0.9.2 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
- github.com/hashicorp/hcl/v2 v2.20.1 // indirect
+ github.com/hashicorp/hcl/v2 v2.24.0 // indirect
github.com/hashicorp/logutils v1.0.0 // indirect
- github.com/hashicorp/terraform-exec v0.21.0 // indirect
- github.com/hashicorp/terraform-json v0.22.1 // indirect
- github.com/hashicorp/terraform-plugin-go v0.23.0 // indirect
+ github.com/hashicorp/terraform-exec v0.23.1 // indirect
+ github.com/hashicorp/terraform-json v0.27.1 // indirect
+ github.com/hashicorp/terraform-plugin-go v0.29.0 // indirect
github.com/hashicorp/terraform-plugin-log v0.9.0 // indirect
- github.com/hashicorp/terraform-registry-address v0.2.3 // indirect
+ github.com/hashicorp/terraform-registry-address v0.4.0 // indirect
github.com/hashicorp/terraform-svchost v0.1.1 // indirect
- github.com/hashicorp/yamux v0.1.1 // indirect
+ github.com/hashicorp/yamux v0.1.2 // indirect
github.com/hexops/gotextdiff v1.0.3 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/jgautheron/goconst v1.8.2 // indirect
github.com/jingyugao/rowserrcheck v1.1.1 // indirect
github.com/jjti/go-spancheck v0.6.5 // indirect
github.com/julz/importas v0.2.0 // indirect
- github.com/karamaru-alpha/copyloopvar v1.2.1 // indirect
+ github.com/karamaru-alpha/copyloopvar v1.2.2 // indirect
github.com/kisielk/errcheck v1.9.0 // indirect
github.com/kkHAIKE/contextcheck v1.1.6 // indirect
github.com/kulti/thelper v0.7.1 // indirect
@@ -155,8 +156,8 @@ require (
github.com/magiconair/properties v1.8.6 // indirect
github.com/manuelarte/embeddedstructfieldcheck v0.4.0 // indirect
github.com/manuelarte/funcorder v0.5.0 // indirect
- github.com/maratori/testableexamples v1.0.0 // indirect
- github.com/maratori/testpackage v1.1.1 // indirect
+ github.com/maratori/testableexamples v1.0.1 // indirect
+ github.com/maratori/testpackage v1.1.2 // indirect
github.com/matoous/godox v1.1.0 // indirect
github.com/mattn/go-colorable v0.1.14 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
@@ -166,7 +167,7 @@ require (
github.com/mitchellh/copystructure v1.2.0 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/mitchellh/go-testing-interface v1.14.1 // indirect
- github.com/mitchellh/go-wordwrap v1.0.0 // indirect
+ github.com/mitchellh/go-wordwrap v1.0.1 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/mitchellh/reflectwalk v1.0.2 // indirect
github.com/moricho/tparallel v0.3.2 // indirect
@@ -175,16 +176,16 @@ require (
github.com/nishanths/exhaustive v0.12.0 // indirect
github.com/nishanths/predeclared v0.2.2 // indirect
github.com/nunnatsa/ginkgolinter v0.21.2 // indirect
- github.com/oklog/run v1.0.0 // indirect
+ github.com/oklog/run v1.1.0 // indirect
github.com/pelletier/go-toml v1.9.5 // indirect
github.com/pelletier/go-toml/v2 v2.2.4 // indirect
- github.com/pmezard/go-difflib v1.0.0 // indirect
+ github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/polyfloyd/go-errorlint v1.8.0 // indirect
github.com/prometheus/client_golang v1.12.1 // indirect
github.com/prometheus/client_model v0.3.0 // indirect
github.com/prometheus/common v0.32.1 // indirect
github.com/prometheus/procfs v0.7.3 // indirect
- github.com/quasilyte/go-ruleguard v0.4.4 // indirect
+ github.com/quasilyte/go-ruleguard v0.4.5 // indirect
github.com/quasilyte/go-ruleguard/dsl v0.3.23 // indirect
github.com/quasilyte/gogrep v0.5.0 // indirect
github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727 // indirect
@@ -231,7 +232,7 @@ require (
github.com/yagipy/maintidx v1.0.0 // indirect
github.com/yeya24/promlinter v0.3.0 // indirect
github.com/ykadowak/zerologlint v0.1.5 // indirect
- github.com/zclconf/go-cty v1.14.4 // indirect
+ github.com/zclconf/go-cty v1.17.0 // indirect
gitlab.com/bosi/decorder v0.4.2 // indirect
go-simpler.org/musttag v0.14.0 // indirect
go-simpler.org/sloglint v0.11.1 // indirect
@@ -240,17 +241,17 @@ require (
go.uber.org/automaxprocs v1.6.0 // indirect
go.uber.org/multierr v1.10.0 // indirect
go.uber.org/zap v1.27.0 // indirect
- golang.org/x/exp/typeparams v0.0.0-20251002181428-27f1f14c8bb9 // indirect
+ golang.org/x/exp/typeparams v0.0.0-20251023183803-a4bb9ffd2546 // indirect
golang.org/x/mod v0.29.0 // indirect
- golang.org/x/net v0.46.0 // indirect
- golang.org/x/sync v0.17.0 // indirect
- golang.org/x/sys v0.37.0 // indirect
- golang.org/x/text v0.30.0 // indirect
+ golang.org/x/net v0.47.0 // indirect
+ golang.org/x/sync v0.18.0 // indirect
+ golang.org/x/sys v0.38.0 // indirect
+ golang.org/x/text v0.31.0 // indirect
golang.org/x/tools v0.38.0 // indirect
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20250818200422-3122310a409c // indirect
- google.golang.org/grpc v1.75.0 // indirect
- google.golang.org/protobuf v1.36.8 // indirect
+ google.golang.org/grpc v1.75.1 // indirect
+ google.golang.org/protobuf v1.36.9 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
diff --git a/go.sum b/go.sum
index 6425b7921e..3e0e41bd61 100644
--- a/go.sum
+++ b/go.sum
@@ -65,14 +65,14 @@ github.com/Djarvur/go-err113 v0.1.1 h1:eHfopDqXRwAi+YmCUas75ZE0+hoBHJ2GQNLYRSxao
github.com/Djarvur/go-err113 v0.1.1/go.mod h1:IaWJdYFLg76t2ihfflPZnM1LIQszWOsFDh2hhhAVF6k=
github.com/Masterminds/semver/v3 v3.4.0 h1:Zog+i5UMtVoCU8oKka5P7i9q9HgrJeGzI9SA1Xbatp0=
github.com/Masterminds/semver/v3 v3.4.0/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM=
-github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow=
-github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM=
+github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY=
+github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU=
github.com/MirrexOne/unqueryvet v1.2.1 h1:M+zdXMq84g+E1YOLa7g7ExN3dWfZQrdDSTCM7gC+m/A=
github.com/MirrexOne/unqueryvet v1.2.1/go.mod h1:IWwCwMQlSWjAIteW0t+28Q5vouyktfujzYznSIWiuOg=
github.com/OpenPeeDeeP/depguard/v2 v2.2.1 h1:vckeWVESWp6Qog7UZSARNqfu/cZqvki8zsuj3piCMx4=
github.com/OpenPeeDeeP/depguard/v2 v2.2.1/go.mod h1:q4DKzC4UcVaAvcfd41CZh0PWpGgzrVxUYBlgKNGquUo=
-github.com/ProtonMail/go-crypto v1.1.0-alpha.2 h1:bkyFVUP+ROOARdgCiJzNQo2V2kiB97LyUpzH9P6Hrlg=
-github.com/ProtonMail/go-crypto v1.1.0-alpha.2/go.mod h1:rA3QumHc/FZ8pAHreoekgiAbzpNsfQAosU5td4SnOrE=
+github.com/ProtonMail/go-crypto v1.1.6 h1:ZcV+Ropw6Qn0AX9brlQLAUXfqLBc7Bl+f/DmNxpLfdw=
+github.com/ProtonMail/go-crypto v1.1.6/go.mod h1:rA3QumHc/FZ8pAHreoekgiAbzpNsfQAosU5td4SnOrE=
github.com/agext/levenshtein v1.2.2 h1:0S/Yg6LYmFJ5stwQeRp6EeOcCbj7xiqQSdNelsXvaqE=
github.com/agext/levenshtein v1.2.2/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558=
github.com/alecthomas/assert/v2 v2.11.0 h1:2Q9r3ki8+JYXvGsDyBXwH3LcJ+WK5D0gc5E8vS6K3D0=
@@ -123,8 +123,8 @@ github.com/breml/bidichk v0.3.3 h1:WSM67ztRusf1sMoqH6/c4OBCUlRVTKq+CbSeo0R17sE=
github.com/breml/bidichk v0.3.3/go.mod h1:ISbsut8OnjB367j5NseXEGGgO/th206dVa427kR8YTE=
github.com/breml/errchkjson v0.4.1 h1:keFSS8D7A2T0haP9kzZTi7o26r7kE3vymjZNeNDRDwg=
github.com/breml/errchkjson v0.4.1/go.mod h1:a23OvR6Qvcl7DG/Z4o0el6BRAjKnaReoPQFciAl9U3s=
-github.com/bufbuild/protocompile v0.4.0 h1:LbFKd2XowZvQ/kajzguUp2DC9UEIQhIq77fZZlaQsNA=
-github.com/bufbuild/protocompile v0.4.0/go.mod h1:3v93+mbWn/v3xzN+31nwkJfrEpAUwp+BagBSZWx+TP8=
+github.com/bufbuild/protocompile v0.14.1 h1:iA73zAf/fyljNjQKwYzUHD6AD4R8KMasmwa/FBatYVw=
+github.com/bufbuild/protocompile v0.14.1/go.mod h1:ppVdAIhbr2H8asPk6k4pY7t9zB1OU5DoEw9xY/FUi1c=
github.com/butuzov/ireturn v0.4.0 h1:+s76bF/PfeKEdbG8b54aCocxXmi0wvYdOVsWxVO7n8E=
github.com/butuzov/ireturn v0.4.0/go.mod h1:ghI0FrCmap8pDWZwfPisFD1vEc56VKH4NpQUxDHta70=
github.com/butuzov/mirror v1.3.0 h1:HdWCXzmwlQHdVhwvsfBb2Au0r3HyINry3bDWLYXiKoc=
@@ -157,14 +157,14 @@ github.com/ckaznocha/intrange v0.3.1 h1:j1onQyXvHUsPWujDH6WIjhyH26gkRt/txNlV7Lsp
github.com/ckaznocha/intrange v0.3.1/go.mod h1:QVepyz1AkUoFQkpEqksSYpNpUo3c5W7nWh/s6SHIJJk=
github.com/client9/misspell v0.3.4 h1:ta993UF76GwbvJcIo3Y68y/M3WxlpEHPWIGDkJYwzJI=
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
-github.com/cloudflare/circl v1.3.7 h1:qlCDlTPz2n9fu58M0Nh1J/JzcFpfgkFHHX3O35r5vcU=
-github.com/cloudflare/circl v1.3.7/go.mod h1:sRTcRWXGLrKw6yIGJ+l7amYJFfAXbZG0kBSc8r4zxgA=
+github.com/cloudflare/circl v1.6.1 h1:zqIqSPIndyBh1bjLVVDHMPpVKqp8Su/V+6MeDzzQBQ0=
+github.com/cloudflare/circl v1.6.1/go.mod h1:uddAzsPgqdMAYatqJ0lsjX1oECcQLIlRpzZh3pJrofs=
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g=
github.com/curioswitch/go-reassign v0.3.0 h1:dh3kpQHuADL3cobV/sSGETA8DOv457dwl+fbBAhrQPs=
github.com/curioswitch/go-reassign v0.3.0/go.mod h1:nApPCCTtqLJN/s8HfItCcKV0jIPwluBOvZP+dsJGA88=
-github.com/cyphar/filepath-securejoin v0.2.4 h1:Ugdm7cg7i6ZK6x3xDF1oEu1nfkyfH53EtKeQYTC3kyg=
-github.com/cyphar/filepath-securejoin v0.2.4/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4=
+github.com/cyphar/filepath-securejoin v0.4.1 h1:JyxxyPEaktOD+GAnqIqTf9A8tHyAG22rowi7HkoSU1s=
+github.com/cyphar/filepath-securejoin v0.4.1/go.mod h1:Sdj7gXlvMcPZsbhwhQ33GguGLDGQL7h7bg04C/+u9jI=
github.com/daixiang0/gci v0.13.7 h1:+0bG5eK9vlI08J+J/NWGbWPTNiXPG4WhNLJOkSxWITQ=
github.com/daixiang0/gci v0.13.7/go.mod h1:812WVN6JLFY9S6Tv76twqmNqevN0pa3SX3nih0brVzQ=
github.com/dave/dst v0.27.3 h1:P1HPoMza3cMEquVf9kKy8yXsFirry4zEnWOdYPOoIzY=
@@ -172,8 +172,9 @@ github.com/dave/dst v0.27.3/go.mod h1:jHh6EOibnHgcUW3WjKHisiooEkYwqpHLBSX1iOBhEy
github.com/dave/jennifer v1.7.1 h1:B4jJJDHelWcDhlRQxWeo0Npa/pYKBLrirAQoTN45txo=
github.com/dave/jennifer v1.7.1/go.mod h1:nXbxhEmQfOZhWml3D1cDK5M1FLnMSozpbFN/m3RmGZc=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM=
+github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/denis-tingaikin/go-header v0.5.0 h1:SRdnP5ZKvcO9KKRP1KJrhFR3RrlGuD+42t4429eC9k8=
github.com/denis-tingaikin/go-header v0.5.0/go.mod h1:mMenU5bWrok6Wl2UsZjy+1okegmwQ3UgWl4V1D8gjlY=
github.com/dlclark/regexp2 v1.11.5 h1:Q/sSnsKerHeCkc/jSTNq1oCm7KiVgUMZRDUoRu0JQZQ=
@@ -201,14 +202,14 @@ github.com/fzipp/gocyclo v0.6.0 h1:lsblElZG7d3ALtGMx9fmxeTKZaLLpU8mET09yN4BBLo=
github.com/fzipp/gocyclo v0.6.0/go.mod h1:rXPyn8fnlpa0R2csP/31uerbiVBugk5whMdlyaLkLoA=
github.com/ghostiam/protogetter v0.3.17 h1:sjGPErP9o7i2Ym+z3LsQzBdLCNaqbYy2iJQPxGXg04Q=
github.com/ghostiam/protogetter v0.3.17/go.mod h1:AivIX1eKA/TcUmzZdzbl+Tb8tjIe8FcyG6JFyemQAH4=
-github.com/go-critic/go-critic v0.14.0 h1:fzA7pGprRPwgA2LwoiaHuWzZzmUEM7dZjihfFpiZQpQ=
-github.com/go-critic/go-critic v0.14.0/go.mod h1:/2QgW4QJIJ9aYCYTQ9RWKc+1KnMFouAJ/FmPylhzOoU=
+github.com/go-critic/go-critic v0.14.2 h1:PMvP5f+LdR8p6B29npvChUXbD1vrNlKDf60NJtgMBOo=
+github.com/go-critic/go-critic v0.14.2/go.mod h1:xwntfW6SYAd7h1OqDzmN6hBX/JxsEKl5up/Y2bsxgVQ=
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 h1:+zs/tPmkDkHx3U66DAb0lQFJrpS6731Oaa12ikc+DiI=
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376/go.mod h1:an3vInlBmSxCcxctByoQdvwPiA7DTK7jaaFDBTtu0ic=
-github.com/go-git/go-billy/v5 v5.5.0 h1:yEY4yhzCDuMGSv83oGxiBotRzhwhNr8VZyphhiu+mTU=
-github.com/go-git/go-billy/v5 v5.5.0/go.mod h1:hmexnoNsr2SJU1Ju67OaNz5ASJY3+sHgFRpCtpDCKow=
-github.com/go-git/go-git/v5 v5.12.0 h1:7Md+ndsjrzZxbddRDZjF14qK+NN56sy6wkqaVrjZtys=
-github.com/go-git/go-git/v5 v5.12.0/go.mod h1:FTM9VKtnI2m65hNI/TenDDDnUf2Q9FHnXYjuz9i5OEY=
+github.com/go-git/go-billy/v5 v5.6.2 h1:6Q86EsPXMa7c3YZ3aLAQsMA0VlWmy43r6FHqa/UNbRM=
+github.com/go-git/go-billy/v5 v5.6.2/go.mod h1:rcFC2rAsp/erv7CMz9GczHcuD0D32fWzH+MJAU+jaUU=
+github.com/go-git/go-git/v5 v5.14.0 h1:/MD3lCrGjCen5WfEAzKg00MJJffKhC8gzS80ycmCi60=
+github.com/go-git/go-git/v5 v5.14.0/go.mod h1:Z5Xhoia5PcWA3NF8vRLURn9E5FRhSl7dGj9ItW3Wk5k=
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
@@ -265,8 +266,8 @@ github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfU
github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
-github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE=
-github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
+github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8 h1:f+oWsMOmNPc8JmEHVZIycC7hBoQxHH9pNKQORJNozsQ=
+github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8/go.mod h1:wcDNUvekVysuuOpQKo3191zZyTpiI6se1N1ULghS0sw=
github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y=
@@ -301,8 +302,8 @@ github.com/golangci/go-printf-func-name v0.1.1 h1:hIYTFJqAGp1iwoIfsNTpoq1xZAarog
github.com/golangci/go-printf-func-name v0.1.1/go.mod h1:Es64MpWEZbh0UBtTAICOZiB+miW53w/K9Or/4QogJss=
github.com/golangci/gofmt v0.0.0-20250106114630-d62b90e6713d h1:viFft9sS/dxoYY0aiOTsLKO2aZQAPT4nlQCsimGcSGE=
github.com/golangci/gofmt v0.0.0-20250106114630-d62b90e6713d/go.mod h1:ivJ9QDg0XucIkmwhzCDsqcnxxlDStoTl89jDMIoNxKY=
-github.com/golangci/golangci-lint/v2 v2.6.0 h1:hgjuaMTwbWrBf1kvMrmWmyCRKq9wU7Cvi84O0METZHc=
-github.com/golangci/golangci-lint/v2 v2.6.0/go.mod h1:qKA7VpZt6X2uo+ylnFYaNpdmJnm4tBSzdZiD0xDOIJE=
+github.com/golangci/golangci-lint/v2 v2.6.2 h1:jkMSVv36JmyTENcEertckvimvjPcD5qxNM7W7qhECvI=
+github.com/golangci/golangci-lint/v2 v2.6.2/go.mod h1:fSIMDiBt9kzdpnvvV7GO6iWzyv5uaeZ+iPor+2uRczE=
github.com/golangci/golines v0.0.0-20250217134842-442fd0091d95 h1:AkK+w9FZBXlU/xUmBtSJN1+tAI4FIvy5WtnUnY8e4p8=
github.com/golangci/golines v0.0.0-20250217134842-442fd0091d95/go.mod h1:k9mmcyWKSTMcPPvQUCfRWWQ9VHJ1U9Dc0R7kaXAgtnQ=
github.com/golangci/misspell v0.7.0 h1:4GOHr/T1lTW0hhR4tgaaV1WS/lJ+ncvYCoFKmqJsj0c=
@@ -373,16 +374,18 @@ github.com/hashicorp/go-checkpoint v0.5.0/go.mod h1:7nfLNL10NsxqO4iWuW6tWW0HjZuD
github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80=
github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ=
github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48=
-github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 h1:1/D3zfFHttUKaCaGKZ/dR2roBXv0vKbSCnssIldfQdI=
-github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320/go.mod h1:EiZBMaudVLy8fmjf9Npq1dq9RalhveqZG5w/yz3mHWs=
-github.com/hashicorp/go-hclog v1.5.0 h1:bI2ocEMgcVlz55Oj1xZNBsVi900c7II+fWDyV9o+13c=
-github.com/hashicorp/go-hclog v1.5.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M=
+github.com/hashicorp/go-cty v1.5.0 h1:EkQ/v+dDNUqnuVpmS5fPqyY71NXVgT5gf32+57xY8g0=
+github.com/hashicorp/go-cty v1.5.0/go.mod h1:lFUCG5kd8exDobgSfyj4ONE/dc822kiYMguVKdHGMLM=
+github.com/hashicorp/go-hclog v1.6.3 h1:Qr2kF+eVWjTiYmU7Y31tYlP1h0q/X3Nl3tPGdaB11/k=
+github.com/hashicorp/go-hclog v1.6.3/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M=
github.com/hashicorp/go-immutable-radix/v2 v2.1.0 h1:CUW5RYIcysz+D3B+l1mDeXrQ7fUvGGCwJfdASSzbrfo=
github.com/hashicorp/go-immutable-radix/v2 v2.1.0/go.mod h1:hgdqLXA4f6NIjRVisM1TJ9aOJVNRqKZj+xDGF6m7PBw=
github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo=
github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM=
-github.com/hashicorp/go-plugin v1.6.0 h1:wgd4KxHJTVGGqWBq4QPB1i5BZNEx9BR8+OFmHDmTk8A=
-github.com/hashicorp/go-plugin v1.6.0/go.mod h1:lBS5MtSSBZk0SHc66KACcjjlU6WzEVP/8pwz68aMkCI=
+github.com/hashicorp/go-plugin v1.7.0 h1:YghfQH/0QmPNc/AZMTFE3ac8fipZyZECHdDPshfk+mA=
+github.com/hashicorp/go-plugin v1.7.0/go.mod h1:BExt6KEaIYx804z8k4gRzRLEvxKVb+kn0NMcihqOqb8=
+github.com/hashicorp/go-retryablehttp v0.7.7 h1:C8hUCYzor8PIfXHa4UrZkU4VvK8o9ISHxT2Q8+VepXU=
+github.com/hashicorp/go-retryablehttp v0.7.7/go.mod h1:pkQpWZeYWskR+D1tR2O5OcBFOxfA7DoAO6xtkuQnHTk=
github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/Co8=
github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
@@ -393,30 +396,30 @@ github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ
github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k=
github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM=
-github.com/hashicorp/hc-install v0.6.4 h1:QLqlM56/+SIIGvGcfFiwMY3z5WGXT066suo/v9Km8e0=
-github.com/hashicorp/hc-install v0.6.4/go.mod h1:05LWLy8TD842OtgcfBbOT0WMoInBMUSHjmDx10zuBIA=
+github.com/hashicorp/hc-install v0.9.2 h1:v80EtNX4fCVHqzL9Lg/2xkp62bbvQMnvPQ0G+OmtO24=
+github.com/hashicorp/hc-install v0.9.2/go.mod h1:XUqBQNnuT4RsxoxiM9ZaUk0NX8hi2h+Lb6/c0OZnC/I=
github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=
github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
-github.com/hashicorp/hcl/v2 v2.20.1 h1:M6hgdyz7HYt1UN9e61j+qKJBqR3orTWbI1HKBJEdxtc=
-github.com/hashicorp/hcl/v2 v2.20.1/go.mod h1:TZDqQ4kNKCbh1iJp99FdPiUaVDDUPivbqxZulxDYqL4=
+github.com/hashicorp/hcl/v2 v2.24.0 h1:2QJdZ454DSsYGoaE6QheQZjtKZSUs9Nh2izTWiwQxvE=
+github.com/hashicorp/hcl/v2 v2.24.0/go.mod h1:oGoO1FIQYfn/AgyOhlg9qLC6/nOJPX3qGbkZpYAcqfM=
github.com/hashicorp/logutils v1.0.0 h1:dLEQVugN8vlakKOUE3ihGLTZJRB4j+M2cdTm/ORI65Y=
github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64=
-github.com/hashicorp/terraform-exec v0.21.0 h1:uNkLAe95ey5Uux6KJdua6+cv8asgILFVWkd/RG0D2XQ=
-github.com/hashicorp/terraform-exec v0.21.0/go.mod h1:1PPeMYou+KDUSSeRE9szMZ/oHf4fYUmB923Wzbq1ICg=
-github.com/hashicorp/terraform-json v0.22.1 h1:xft84GZR0QzjPVWs4lRUwvTcPnegqlyS7orfb5Ltvec=
-github.com/hashicorp/terraform-json v0.22.1/go.mod h1:JbWSQCLFSXFFhg42T7l9iJwdGXBYV8fmmD6o/ML4p3A=
-github.com/hashicorp/terraform-plugin-go v0.23.0 h1:AALVuU1gD1kPb48aPQUjug9Ir/125t+AAurhqphJ2Co=
-github.com/hashicorp/terraform-plugin-go v0.23.0/go.mod h1:1E3Cr9h2vMlahWMbsSEcNrOCxovCZhOOIXjFHbjc/lQ=
+github.com/hashicorp/terraform-exec v0.23.1 h1:diK5NSSDXDKqHEOIQefBMu9ny+FhzwlwV0xgUTB7VTo=
+github.com/hashicorp/terraform-exec v0.23.1/go.mod h1:e4ZEg9BJDRaSalGm2z8vvrPONt0XWG0/tXpmzYTf+dM=
+github.com/hashicorp/terraform-json v0.27.1 h1:zWhEracxJW6lcjt/JvximOYyc12pS/gaKSy/wzzE7nY=
+github.com/hashicorp/terraform-json v0.27.1/go.mod h1:GzPLJ1PLdUG5xL6xn1OXWIjteQRT2CNT9o/6A9mi9hE=
+github.com/hashicorp/terraform-plugin-go v0.29.0 h1:1nXKl/nSpaYIUBU1IG/EsDOX0vv+9JxAltQyDMpq5mU=
+github.com/hashicorp/terraform-plugin-go v0.29.0/go.mod h1:vYZbIyvxyy0FWSmDHChCqKvI40cFTDGSb3D8D70i9GM=
github.com/hashicorp/terraform-plugin-log v0.9.0 h1:i7hOA+vdAItN1/7UrfBqBwvYPQ9TFvymaRGZED3FCV0=
github.com/hashicorp/terraform-plugin-log v0.9.0/go.mod h1:rKL8egZQ/eXSyDqzLUuwUYLVdlYeamldAHSxjUFADow=
-github.com/hashicorp/terraform-plugin-sdk/v2 v2.34.0 h1:kJiWGx2kiQVo97Y5IOGR4EMcZ8DtMswHhUuFibsCQQE=
-github.com/hashicorp/terraform-plugin-sdk/v2 v2.34.0/go.mod h1:sl/UoabMc37HA6ICVMmGO+/0wofkVIRxf+BMb/dnoIg=
-github.com/hashicorp/terraform-registry-address v0.2.3 h1:2TAiKJ1A3MAkZlH1YI/aTVcLZRu7JseiXNRHbOAyoTI=
-github.com/hashicorp/terraform-registry-address v0.2.3/go.mod h1:lFHA76T8jfQteVfT7caREqguFrW3c4MFSPhZB7HHgUM=
+github.com/hashicorp/terraform-plugin-sdk/v2 v2.38.1 h1:mlAq/OrMlg04IuJT7NpefI1wwtdpWudnEmjuQs04t/4=
+github.com/hashicorp/terraform-plugin-sdk/v2 v2.38.1/go.mod h1:GQhpKVvvuwzD79e8/NZ+xzj+ZpWovdPAe8nfV/skwNU=
+github.com/hashicorp/terraform-registry-address v0.4.0 h1:S1yCGomj30Sao4l5BMPjTGZmCNzuv7/GDTDX99E9gTk=
+github.com/hashicorp/terraform-registry-address v0.4.0/go.mod h1:LRS1Ay0+mAiRkUyltGT+UHWkIqTFvigGn/LbMshfflE=
github.com/hashicorp/terraform-svchost v0.1.1 h1:EZZimZ1GxdqFRinZ1tpJwVxxt49xc/S52uzrw4x0jKQ=
github.com/hashicorp/terraform-svchost v0.1.1/go.mod h1:mNsjQfZyf/Jhz35v6/0LWcv26+X7JPS+buii2c9/ctc=
-github.com/hashicorp/yamux v0.1.1 h1:yrQxtgseBDrq9Y652vSRDvsKCJKOUD+GzTS4Y0Y8pvE=
-github.com/hashicorp/yamux v0.1.1/go.mod h1:CtWFDAQgb7dxtzFs4tWbplKIe2jSi3+5vKbgIO0SLnQ=
+github.com/hashicorp/yamux v0.1.2 h1:XtB8kyFOyHXYVFnwT5C3+Bdo8gArse7j2AQ0DA0Uey8=
+github.com/hashicorp/yamux v0.1.2/go.mod h1:C+zze2n6e/7wshOZep2A70/aQU6QBRWJO/G6FT1wIns=
github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM=
github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg=
github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
@@ -426,8 +429,8 @@ github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOl
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo=
github.com/jgautheron/goconst v1.8.2 h1:y0XF7X8CikZ93fSNT6WBTb/NElBu9IjaY7CCYQrCMX4=
github.com/jgautheron/goconst v1.8.2/go.mod h1:A0oxgBCHy55NQn6sYpO7UdnA9p+h7cPtoOZUmvNIako=
-github.com/jhump/protoreflect v1.15.1 h1:HUMERORf3I3ZdX05WaQ6MIpd/NJ434hTp5YiKgfCL6c=
-github.com/jhump/protoreflect v1.15.1/go.mod h1:jD/2GMKKE6OqX8qTjhADU1e6DShO+gavG9e0Q693nKo=
+github.com/jhump/protoreflect v1.17.0 h1:qOEr613fac2lOuTgWN4tPAtLL7fUSbuJL5X5XumQh94=
+github.com/jhump/protoreflect v1.17.0/go.mod h1:h9+vUUL38jiBzck8ck+6G/aeMX8Z4QUY/NiJPwPNi+8=
github.com/jingyugao/rowserrcheck v1.1.1 h1:zibz55j/MJtLsjP1OF4bSdgXxwL1b+Vn7Tjzq7gFzUs=
github.com/jingyugao/rowserrcheck v1.1.1/go.mod h1:4yvlZSDb3IyDTUZJUmpZfm2Hwok+Dtp+nu2qOq+er9c=
github.com/jjti/go-spancheck v0.6.5 h1:lmi7pKxa37oKYIMScialXUK6hP3iY5F1gu+mLBPgYB8=
@@ -443,8 +446,8 @@ github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7V
github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM=
github.com/julz/importas v0.2.0 h1:y+MJN/UdL63QbFJHws9BVC5RpA2iq0kpjrFajTGivjQ=
github.com/julz/importas v0.2.0/go.mod h1:pThlt589EnCYtMnmhmRYY/qn9lCf/frPOK+WMx3xiJY=
-github.com/karamaru-alpha/copyloopvar v1.2.1 h1:wmZaZYIjnJ0b5UoKDjUHrikcV0zuPyyxI4SVplLd2CI=
-github.com/karamaru-alpha/copyloopvar v1.2.1/go.mod h1:nFmMlFNlClC2BPvNaHMdkirmTJxVCY0lhxBtlfOypMM=
+github.com/karamaru-alpha/copyloopvar v1.2.2 h1:yfNQvP9YaGQR7VaWLYcfZUlRP2eo2vhExWKxD/fP6q0=
+github.com/karamaru-alpha/copyloopvar v1.2.2/go.mod h1:oY4rGZqZ879JkJMtX3RRkcXRkmUvH0x35ykgaKgsgJY=
github.com/kevinburke/ssh_config v1.2.0 h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4gf13a4=
github.com/kevinburke/ssh_config v1.2.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM=
github.com/kisielk/errcheck v1.9.0 h1:9xt1zI9EBfcYBvdU1nVrzMzzUPUtPKs9bVSIM3TAb3M=
@@ -490,10 +493,10 @@ github.com/manuelarte/embeddedstructfieldcheck v0.4.0 h1:3mAIyaGRtjK6EO9E73JlXLt
github.com/manuelarte/embeddedstructfieldcheck v0.4.0/go.mod h1:z8dFSyXqp+fC6NLDSljRJeNQJJDWnY7RoWFzV3PC6UM=
github.com/manuelarte/funcorder v0.5.0 h1:llMuHXXbg7tD0i/LNw8vGnkDTHFpTnWqKPI85Rknc+8=
github.com/manuelarte/funcorder v0.5.0/go.mod h1:Yt3CiUQthSBMBxjShjdXMexmzpP8YGvGLjrxJNkO2hA=
-github.com/maratori/testableexamples v1.0.0 h1:dU5alXRrD8WKSjOUnmJZuzdxWOEQ57+7s93SLMxb2vI=
-github.com/maratori/testableexamples v1.0.0/go.mod h1:4rhjL1n20TUTT4vdh3RDqSizKLyXp7K2u6HgraZCGzE=
-github.com/maratori/testpackage v1.1.1 h1:S58XVV5AD7HADMmD0fNnziNHqKvSdDuEKdPD1rNTU04=
-github.com/maratori/testpackage v1.1.1/go.mod h1:s4gRK/ym6AMrqpOa/kEbQTV4Q4jb7WeLZzVhVVVOQMc=
+github.com/maratori/testableexamples v1.0.1 h1:HfOQXs+XgfeRBJ+Wz0XfH+FHnoY9TVqL6Fcevpzy4q8=
+github.com/maratori/testableexamples v1.0.1/go.mod h1:XE2F/nQs7B9N08JgyRmdGjYVGqxWwClLPCGSQhXQSrQ=
+github.com/maratori/testpackage v1.1.2 h1:ffDSh+AgqluCLMXhM19f/cpvQAKygKAJXFl9aUjmbqs=
+github.com/maratori/testpackage v1.1.2/go.mod h1:8F24GdVDFW5Ew43Et02jamrVMNXLUNaOynhDssITGfc=
github.com/matoous/godox v1.1.0 h1:W5mqwbyWrwZv6OQ5Z1a/DHGMOvXYCBP3+Ht7KMoJhq4=
github.com/matoous/godox v1.1.0/go.mod h1:jgE/3fUXiTurkdHOLT5WEkThTSuE7yxHv5iWPa80afs=
github.com/matryer/is v1.4.0 h1:sosSmIWwkYITGrxZ25ULNDeKiMNzFSr4V/eqBQP0PeE=
@@ -518,8 +521,8 @@ github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG
github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
github.com/mitchellh/go-testing-interface v1.14.1 h1:jrgshOhYAUVNMAJiKbEu7EqAwgJJ2JqpQmpLJOu07cU=
github.com/mitchellh/go-testing-interface v1.14.1/go.mod h1:gfgS7OtZj6MA4U1UrDRp04twqAjfvlZyCfX3sDjEym8=
-github.com/mitchellh/go-wordwrap v1.0.0 h1:6GlHJ/LTGMrIJbwgdqdl2eEH8o+Exx/0m8ir9Gns0u4=
-github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo=
+github.com/mitchellh/go-wordwrap v1.0.1 h1:TLuKupo69TCn6TQSyGxwI1EblZZEsQ0vMlAFQflz0v0=
+github.com/mitchellh/go-wordwrap v1.0.1/go.mod h1:R62XHJLzvMFRBbcrT7m7WgmE1eOyTSsCt+hzestvNj0=
github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY=
github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ=
@@ -543,8 +546,8 @@ github.com/nishanths/predeclared v0.2.2 h1:V2EPdZPliZymNAn79T8RkNApBjMmVKh5XRpLm
github.com/nishanths/predeclared v0.2.2/go.mod h1:RROzoN6TnGQupbC+lqggsOlcgysk3LMK/HI84Mp280c=
github.com/nunnatsa/ginkgolinter v0.21.2 h1:khzWfm2/Br8ZemX8QM1pl72LwM+rMeW6VUbQ4rzh0Po=
github.com/nunnatsa/ginkgolinter v0.21.2/go.mod h1:GItSI5fw7mCGLPmkvGYrr1kEetZe7B593jcyOpyabsY=
-github.com/oklog/run v1.0.0 h1:Ru7dDtJNOyC66gQ5dQmaCa0qIsAUFY3sFpK1Xk8igrw=
-github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA=
+github.com/oklog/run v1.1.0 h1:GEenZ1cK0+q0+wsJew9qUg/DyD8k3JzYsZAi5gYi2mA=
+github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DVU=
github.com/onsi/ginkgo/v2 v2.26.0 h1:1J4Wut1IlYZNEAWIV3ALrT9NfiaGW2cDCJQSFQMs/gE=
github.com/onsi/ginkgo/v2 v2.26.0/go.mod h1:qhEywmzWTBUY88kfO0BRvX4py7scov9yR+Az2oavUzw=
github.com/onsi/gomega v1.38.2 h1:eZCjf2xjZAqe+LeWvKb5weQ+NcPwX84kqJ0cZNxok2A=
@@ -560,13 +563,14 @@ github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3v
github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c=
github.com/pelletier/go-toml/v2 v2.2.4 h1:mye9XuhQ6gvn5h28+VilKrrPoQVanw5PMw/TB0t5Ec4=
github.com/pelletier/go-toml/v2 v2.2.4/go.mod h1:2gIqNv+qfxSVS7cM2xJQKtLSTLUE9V8t9Stt+h56mCY=
-github.com/pjbgf/sha1cd v0.3.0 h1:4D5XXmUUBUl/xQ6IjCkEAbqXskkq/4O7LmGn0AqMDs4=
-github.com/pjbgf/sha1cd v0.3.0/go.mod h1:nZ1rrWOcGJ5uZgEEVL1VUM9iRQiZvWdbZjkKyFzPPsI=
+github.com/pjbgf/sha1cd v0.3.2 h1:a9wb0bp1oC2TGwStyn0Umc/IGKQnEgF0vVaZ8QF8eo4=
+github.com/pjbgf/sha1cd v0.3.2/go.mod h1:zQWigSxVmsHEZow5qaLtPYxpcKMMQpa09ixqBxuCS6A=
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
-github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
+github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U=
+github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/polyfloyd/go-errorlint v1.8.0 h1:DL4RestQqRLr8U4LygLw8g2DX6RN1eBJOpa2mzsrl1Q=
github.com/polyfloyd/go-errorlint v1.8.0/go.mod h1:G2W0Q5roxbLCt0ZQbdoxQxXktTjwNyDbEaj3n7jvl4s=
github.com/prashantv/gostub v1.1.0 h1:BTyx3RfQjRHnUWaGF9oQos79AlQ5k8WNktv7VGvVH4g=
@@ -594,8 +598,8 @@ github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4O
github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA=
github.com/prometheus/procfs v0.7.3 h1:4jVXhlkAyzOScmCkXBTOLRLTz8EeU+eyjrwB/EPq0VU=
github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA=
-github.com/quasilyte/go-ruleguard v0.4.4 h1:53DncefIeLX3qEpjzlS1lyUmQoUEeOWPFWqaTJq9eAQ=
-github.com/quasilyte/go-ruleguard v0.4.4/go.mod h1:Vl05zJ538vcEEwu16V/Hdu7IYZWyKSwIy4c88Ro1kRE=
+github.com/quasilyte/go-ruleguard v0.4.5 h1:AGY0tiOT5hJX9BTdx/xBdoCubQUAE2grkqY2lSwvZcA=
+github.com/quasilyte/go-ruleguard v0.4.5/go.mod h1:Vl05zJ538vcEEwu16V/Hdu7IYZWyKSwIy4c88Ro1kRE=
github.com/quasilyte/go-ruleguard/dsl v0.3.23 h1:lxjt5B6ZCiBeeNO8/oQsegE6fLeCzuMRoVWSkXC4uvY=
github.com/quasilyte/go-ruleguard/dsl v0.3.23/go.mod h1:KeCP03KrjuSO0H1kTuZQCWlQPulDV6YMIXmpQss17rU=
github.com/quasilyte/gogrep v0.5.0 h1:eTKODPXbI8ffJMN+W2aE0+oL0z/nh8/5eNdiO34SOAo=
@@ -642,8 +646,8 @@ github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ
github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
github.com/sivchari/containedctx v1.0.3 h1:x+etemjbsh2fB5ewm5FeLNi5bUjK0V8n0RB+Wwfd0XE=
github.com/sivchari/containedctx v1.0.3/go.mod h1:c1RDvCbnJLtH4lLcYD/GqwiBSSf4F5Qk0xld2rBqzJ4=
-github.com/skeema/knownhosts v1.2.2 h1:Iug2P4fLmDw9f41PB6thxUkNUkJzB5i+1/exaj40L3A=
-github.com/skeema/knownhosts v1.2.2/go.mod h1:xYbVRSPxqBZFrdmDyMmsOs+uX1UZC3nTN3ThzgDxUwo=
+github.com/skeema/knownhosts v1.3.1 h1:X2osQ+RAjK76shCbvhHHHVl3ZlgDm8apHEHFqRjnBY8=
+github.com/skeema/knownhosts v1.3.1/go.mod h1:r7KTdC8l4uxWRyK2TpQZ/1o5HaSzh06ePQNxPwTcfiY=
github.com/sonatard/noctx v0.4.0 h1:7MC/5Gg4SQ4lhLYR6mvOP6mQVSxCrdyiExo7atBs27o=
github.com/sonatard/noctx v0.4.0/go.mod h1:64XdbzFb18XL4LporKXp8poqZtPKbCrqQ402CV+kJas=
github.com/sourcegraph/go-diff v0.7.0 h1:9uLlrd5T46OXs5qpp8L/MTltk0zikUGi0sNNyCpA8G0=
@@ -727,10 +731,10 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec
github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
-github.com/zclconf/go-cty v1.14.4 h1:uXXczd9QDGsgu0i/QFR/hzI5NYCHLf6NQw/atrbnhq8=
-github.com/zclconf/go-cty v1.14.4/go.mod h1:VvMs5i0vgZdhYawQNq5kePSpLAoz8u1xvZgrPIxfnZE=
-github.com/zclconf/go-cty-debug v0.0.0-20191215020915-b22d67c1ba0b h1:FosyBZYxY34Wul7O/MSKey3txpPYyCqVO5ZyceuQJEI=
-github.com/zclconf/go-cty-debug v0.0.0-20191215020915-b22d67c1ba0b/go.mod h1:ZRKQfBXbGkpdV6QMzT3rU1kSTAnfu1dO8dPKjYprgj8=
+github.com/zclconf/go-cty v1.17.0 h1:seZvECve6XX4tmnvRzWtJNHdscMtYEx5R7bnnVyd/d0=
+github.com/zclconf/go-cty v1.17.0/go.mod h1:wqFzcImaLTI6A5HfsRwB0nj5n0MRZFwmey8YoFPPs3U=
+github.com/zclconf/go-cty-debug v0.0.0-20240509010212-0d6042c53940 h1:4r45xpDWB6ZMSMNJFMOjqrGHynW3DIBuR2H9j0ug+Mo=
+github.com/zclconf/go-cty-debug v0.0.0-20240509010212-0d6042c53940/go.mod h1:CmBdvvj3nqzfzJ6nTCIwDTPZ56aVGvDrmztiO5g3qrM=
gitlab.com/bosi/decorder v0.4.2 h1:qbQaV3zgwnBZ4zPMhGLW4KZe7A7NwxEhJx39R3shffo=
gitlab.com/bosi/decorder v0.4.2/go.mod h1:muuhHoaJkA9QLcYHq4Mj8FJUwDZ+EirSHRiaTcTf6T8=
go-simpler.org/assert v0.9.0 h1:PfpmcSvL7yAnWyChSjOz6Sp6m9j5lyK8Ok9pEL31YkQ=
@@ -780,8 +784,8 @@ golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5y
golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc=
golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4=
golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU=
-golang.org/x/crypto v0.43.0 h1:dduJYIi3A3KOfdGOHX8AVZ/jGiyPa3IbBozJ5kNuE04=
-golang.org/x/crypto v0.43.0/go.mod h1:BFbav4mRNlXJL4wNeejLpWxB7wMbc79PdRGhWKncxR0=
+golang.org/x/crypto v0.45.0 h1:jMBrvKuj23MTlT0bQEOBcAE0mjg8mK9RXFhRH6nyF3Q=
+golang.org/x/crypto v0.45.0/go.mod h1:XTGrrkGJve7CYK7J8PEww4aY7gM3qMCElcJQ8n8JdX4=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
@@ -796,8 +800,8 @@ golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 h1:e66Fs6Z+fZTbFBAxKfP3PALWB
golang.org/x/exp v0.0.0-20240909161429-701f63a606c0/go.mod h1:2TbTHSBQa924w8M6Xs1QcRcFwyucIwBGpK1p2f1YFFY=
golang.org/x/exp/typeparams v0.0.0-20220428152302-39d4317da171/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk=
golang.org/x/exp/typeparams v0.0.0-20230203172020-98cc5a0785f9/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk=
-golang.org/x/exp/typeparams v0.0.0-20251002181428-27f1f14c8bb9 h1:EvjuVHWMoRaAxH402KMgrQpGUjoBy/OWvZjLOqQnwNk=
-golang.org/x/exp/typeparams v0.0.0-20251002181428-27f1f14c8bb9/go.mod h1:4Mzdyp/6jzw9auFDJ3OMF5qksa7UvPnzKqTVGcb04ms=
+golang.org/x/exp/typeparams v0.0.0-20251023183803-a4bb9ffd2546 h1:HDjDiATsGqvuqvkDvgJjD1IgPrVekcSXVVE21JwvzGE=
+golang.org/x/exp/typeparams v0.0.0-20251023183803-a4bb9ffd2546/go.mod h1:4Mzdyp/6jzw9auFDJ3OMF5qksa7UvPnzKqTVGcb04ms=
golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=
golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
@@ -865,16 +869,16 @@ golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk=
golang.org/x/net v0.16.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE=
-golang.org/x/net v0.46.0 h1:giFlY12I07fugqwPuWJi68oOnpfqFnJIJzaIIm2JVV4=
-golang.org/x/net v0.46.0/go.mod h1:Q9BGdFy1y4nkUwiLvT5qtyhAnEHgnQ/zd8PfU6nc210=
+golang.org/x/net v0.47.0 h1:Mx+4dIFzqraBXUugkia1OOvlD6LemFo1ALMHjrXDOhY=
+golang.org/x/net v0.47.0/go.mod h1:/jNxtkgq5yWUGYkaZGqo27cfGZ1c5Nen03aYrrKpVRU=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
-golang.org/x/oauth2 v0.30.0 h1:dnDm7JmhM45NNpd8FDDeLhK6FwqbOf4MLCM9zb1BOHI=
-golang.org/x/oauth2 v0.30.0/go.mod h1:B++QgG3ZKulg6sRPGD/mqlHQs5rB3Ml9erfeDY7xKlU=
+golang.org/x/oauth2 v0.33.0 h1:4Q+qn+E5z8gPRJfmRy7C2gGG3T4jIprK6aSYgTXGRpo=
+golang.org/x/oauth2 v0.33.0/go.mod h1:lzm5WQJQwKZ3nwavOZ3IS5Aulzxi68dUSgRHujetwEA=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
@@ -890,8 +894,8 @@ golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJ
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y=
golang.org/x/sync v0.4.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y=
-golang.org/x/sync v0.17.0 h1:l60nONMj9l5drqw6jlhIELNv9I0A4OFgRsG9k2oT9Ug=
-golang.org/x/sync v0.17.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI=
+golang.org/x/sync v0.18.0 h1:kr88TuHDroi+UVf+0hZnirlk8o8T+4MrK6mr60WkH/I=
+golang.org/x/sync v0.18.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
@@ -948,8 +952,8 @@ golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
-golang.org/x/sys v0.37.0 h1:fdNQudmxPjkdUTPnLn5mdQv7Zwvbvpaxqs831goi9kQ=
-golang.org/x/sys v0.37.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
+golang.org/x/sys v0.38.0 h1:3yZWxaJjBmCWXqhN1qh02AkOnCQ1poK6oF+a7xWL6Gc=
+golang.org/x/sys v0.38.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
@@ -957,8 +961,8 @@ golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo=
golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU=
golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U=
golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk=
-golang.org/x/term v0.36.0 h1:zMPR+aF8gfksFprF/Nc/rd1wRS1EI6nDBGyWAvDzx2Q=
-golang.org/x/term v0.36.0/go.mod h1:Qu394IJq6V6dCBRgwqshf3mPF85AqzYEzofzRdZkWss=
+golang.org/x/term v0.37.0 h1:8EGAD0qCmHYZg6J17DvsMy9/wJ7/D/4pV/wfnld5lTU=
+golang.org/x/term v0.37.0/go.mod h1:5pB4lxRNYYVZuTLmy8oR2BH8dflOR+IbTYFD8fi3254=
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
@@ -971,8 +975,8 @@ golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
-golang.org/x/text v0.30.0 h1:yznKA/E9zq54KzlzBEAWn1NXSQ8DIp/NYMy88xJjl4k=
-golang.org/x/text v0.30.0/go.mod h1:yDdHFIX9t+tORqspjENWgzaCVXgk0yYnYuSZ8UzzBVM=
+golang.org/x/text v0.31.0 h1:aC8ghyu4JhP8VojJ2lEHBnochRno1sgL6nEi9WGFGMM=
+golang.org/x/text v0.31.0/go.mod h1:tKRAlv61yKIjGGHX/4tP1LTbc13YSec1pxVEWXzfoeM=
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
@@ -1105,8 +1109,8 @@ google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKa
google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk=
google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
-google.golang.org/grpc v1.75.0 h1:+TW+dqTd2Biwe6KKfhE5JpiYIBWq865PhKGSXiivqt4=
-google.golang.org/grpc v1.75.0/go.mod h1:JtPAzKiq4v1xcAB2hydNlWI2RnF85XXcV0mhKXr2ecQ=
+google.golang.org/grpc v1.75.1 h1:/ODCNEuf9VghjgO3rqLcfg8fiOP0nSluljWFlDxELLI=
+google.golang.org/grpc v1.75.1/go.mod h1:JtPAzKiq4v1xcAB2hydNlWI2RnF85XXcV0mhKXr2ecQ=
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
@@ -1119,8 +1123,8 @@ google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGj
google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
-google.golang.org/protobuf v1.36.8 h1:xHScyCOEuuwZEc6UtSOvPbAT4zRh0xcNRYekJwfqyMc=
-google.golang.org/protobuf v1.36.8/go.mod h1:fuxRtAxBytpl4zzqUh6/eyUujkJdNiuEkXntxiD/uRU=
+google.golang.org/protobuf v1.36.9 h1:w2gp2mA27hUeUzj9Ex9FBjsBm40zfaDtEWow293U7Iw=
+google.golang.org/protobuf v1.36.9/go.mod h1:fuxRtAxBytpl4zzqUh6/eyUujkJdNiuEkXntxiD/uRU=
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
diff --git a/vendor/github.com/ProtonMail/go-crypto/internal/byteutil/byteutil.go b/vendor/github.com/ProtonMail/go-crypto/internal/byteutil/byteutil.go
index affb74a764..d558b9bd82 100644
--- a/vendor/github.com/ProtonMail/go-crypto/internal/byteutil/byteutil.go
+++ b/vendor/github.com/ProtonMail/go-crypto/internal/byteutil/byteutil.go
@@ -49,16 +49,16 @@ func ShiftNBytesLeft(dst, x []byte, n int) {
dst = append(dst, make([]byte, n/8)...)
}
-// XorBytesMut assumes equal input length, replaces X with X XOR Y
+// XorBytesMut replaces X with X XOR Y. len(X) must be >= len(Y).
func XorBytesMut(X, Y []byte) {
- for i := 0; i < len(X); i++ {
+ for i := 0; i < len(Y); i++ {
X[i] ^= Y[i]
}
}
-// XorBytes assumes equal input length, puts X XOR Y into Z
+// XorBytes puts X XOR Y into Z. len(Z) and len(X) must be >= len(Y).
func XorBytes(Z, X, Y []byte) {
- for i := 0; i < len(X); i++ {
+ for i := 0; i < len(Y); i++ {
Z[i] = X[i] ^ Y[i]
}
}
diff --git a/vendor/github.com/ProtonMail/go-crypto/ocb/ocb.go b/vendor/github.com/ProtonMail/go-crypto/ocb/ocb.go
index 5022285b44..24f893017b 100644
--- a/vendor/github.com/ProtonMail/go-crypto/ocb/ocb.go
+++ b/vendor/github.com/ProtonMail/go-crypto/ocb/ocb.go
@@ -109,8 +109,10 @@ func (o *ocb) Seal(dst, nonce, plaintext, adata []byte) []byte {
if len(nonce) > o.nonceSize {
panic("crypto/ocb: Incorrect nonce length given to OCB")
}
- ret, out := byteutil.SliceForAppend(dst, len(plaintext)+o.tagSize)
- o.crypt(enc, out, nonce, adata, plaintext)
+ sep := len(plaintext)
+ ret, out := byteutil.SliceForAppend(dst, sep+o.tagSize)
+ tag := o.crypt(enc, out[:sep], nonce, adata, plaintext)
+ copy(out[sep:], tag)
return ret
}
@@ -122,12 +124,10 @@ func (o *ocb) Open(dst, nonce, ciphertext, adata []byte) ([]byte, error) {
return nil, ocbError("Ciphertext shorter than tag length")
}
sep := len(ciphertext) - o.tagSize
- ret, out := byteutil.SliceForAppend(dst, len(ciphertext))
+ ret, out := byteutil.SliceForAppend(dst, sep)
ciphertextData := ciphertext[:sep]
- tag := ciphertext[sep:]
- o.crypt(dec, out, nonce, adata, ciphertextData)
- if subtle.ConstantTimeCompare(ret[sep:], tag) == 1 {
- ret = ret[:sep]
+ tag := o.crypt(dec, out, nonce, adata, ciphertextData)
+ if subtle.ConstantTimeCompare(tag, ciphertext[sep:]) == 1 {
return ret, nil
}
for i := range out {
@@ -137,7 +137,8 @@ func (o *ocb) Open(dst, nonce, ciphertext, adata []byte) ([]byte, error) {
}
// On instruction enc (resp. dec), crypt is the encrypt (resp. decrypt)
-// function. It returns the resulting plain/ciphertext with the tag appended.
+// function. It writes the resulting plain/ciphertext into Y and returns
+// the tag.
func (o *ocb) crypt(instruction int, Y, nonce, adata, X []byte) []byte {
//
// Consider X as a sequence of 128-bit blocks
@@ -194,13 +195,14 @@ func (o *ocb) crypt(instruction int, Y, nonce, adata, X []byte) []byte {
byteutil.XorBytesMut(offset, o.mask.L[bits.TrailingZeros(uint(i+1))])
blockX := X[i*blockSize : (i+1)*blockSize]
blockY := Y[i*blockSize : (i+1)*blockSize]
- byteutil.XorBytes(blockY, blockX, offset)
switch instruction {
case enc:
+ byteutil.XorBytesMut(checksum, blockX)
+ byteutil.XorBytes(blockY, blockX, offset)
o.block.Encrypt(blockY, blockY)
byteutil.XorBytesMut(blockY, offset)
- byteutil.XorBytesMut(checksum, blockX)
case dec:
+ byteutil.XorBytes(blockY, blockX, offset)
o.block.Decrypt(blockY, blockY)
byteutil.XorBytesMut(blockY, offset)
byteutil.XorBytesMut(checksum, blockY)
@@ -216,31 +218,24 @@ func (o *ocb) crypt(instruction int, Y, nonce, adata, X []byte) []byte {
o.block.Encrypt(pad, offset)
chunkX := X[blockSize*m:]
chunkY := Y[blockSize*m : len(X)]
- byteutil.XorBytes(chunkY, chunkX, pad[:len(chunkX)])
- // P_* || bit(1) || zeroes(127) - len(P_*)
switch instruction {
case enc:
- paddedY := append(chunkX, byte(128))
- paddedY = append(paddedY, make([]byte, blockSize-len(chunkX)-1)...)
- byteutil.XorBytesMut(checksum, paddedY)
+ byteutil.XorBytesMut(checksum, chunkX)
+ checksum[len(chunkX)] ^= 128
+ byteutil.XorBytes(chunkY, chunkX, pad[:len(chunkX)])
+ // P_* || bit(1) || zeroes(127) - len(P_*)
case dec:
- paddedX := append(chunkY, byte(128))
- paddedX = append(paddedX, make([]byte, blockSize-len(chunkY)-1)...)
- byteutil.XorBytesMut(checksum, paddedX)
+ byteutil.XorBytes(chunkY, chunkX, pad[:len(chunkX)])
+ // P_* || bit(1) || zeroes(127) - len(P_*)
+ byteutil.XorBytesMut(checksum, chunkY)
+ checksum[len(chunkY)] ^= 128
}
- byteutil.XorBytes(tag, checksum, offset)
- byteutil.XorBytesMut(tag, o.mask.lDol)
- o.block.Encrypt(tag, tag)
- byteutil.XorBytesMut(tag, o.hash(adata))
- copy(Y[blockSize*m+len(chunkY):], tag[:o.tagSize])
- } else {
- byteutil.XorBytes(tag, checksum, offset)
- byteutil.XorBytesMut(tag, o.mask.lDol)
- o.block.Encrypt(tag, tag)
- byteutil.XorBytesMut(tag, o.hash(adata))
- copy(Y[blockSize*m:], tag[:o.tagSize])
}
- return Y
+ byteutil.XorBytes(tag, checksum, offset)
+ byteutil.XorBytesMut(tag, o.mask.lDol)
+ o.block.Encrypt(tag, tag)
+ byteutil.XorBytesMut(tag, o.hash(adata))
+ return tag[:o.tagSize]
}
// This hash function is used to compute the tag. Per design, on empty input it
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/armor/encode.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/armor/encode.go
index 112f98b835..550efddf05 100644
--- a/vendor/github.com/ProtonMail/go-crypto/openpgp/armor/encode.go
+++ b/vendor/github.com/ProtonMail/go-crypto/openpgp/armor/encode.go
@@ -7,6 +7,7 @@ package armor
import (
"encoding/base64"
"io"
+ "sort"
)
var armorHeaderSep = []byte(": ")
@@ -159,8 +160,15 @@ func encode(out io.Writer, blockType string, headers map[string]string, checksum
return
}
- for k, v := range headers {
- err = writeSlices(out, []byte(k), armorHeaderSep, []byte(v), newline)
+ keys := make([]string, len(headers))
+ i := 0
+ for k := range headers {
+ keys[i] = k
+ i++
+ }
+ sort.Strings(keys)
+ for _, k := range keys {
+ err = writeSlices(out, []byte(k), armorHeaderSep, []byte(headers[k]), newline)
if err != nil {
return
}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/ecdh/ecdh.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/ecdh/ecdh.go
index c895bad6bb..db8fb163b6 100644
--- a/vendor/github.com/ProtonMail/go-crypto/openpgp/ecdh/ecdh.go
+++ b/vendor/github.com/ProtonMail/go-crypto/openpgp/ecdh/ecdh.go
@@ -163,13 +163,9 @@ func buildKey(pub *PublicKey, zb []byte, curveOID, fingerprint []byte, stripLead
if _, err := param.Write([]byte("Anonymous Sender ")); err != nil {
return nil, err
}
- // For v5 keys, the 20 leftmost octets of the fingerprint are used.
- if _, err := param.Write(fingerprint[:20]); err != nil {
+ if _, err := param.Write(fingerprint[:]); err != nil {
return nil, err
}
- if param.Len()-len(curveOID) != 45 {
- return nil, errors.New("ecdh: malformed KDF Param")
- }
// MB = Hash ( 00 || 00 || 00 || 01 || ZB || Param );
h := pub.KDF.Hash.New()
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/errors/errors.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/errors/errors.go
index 8d6969c0bf..e44b45734d 100644
--- a/vendor/github.com/ProtonMail/go-crypto/openpgp/errors/errors.go
+++ b/vendor/github.com/ProtonMail/go-crypto/openpgp/errors/errors.go
@@ -3,12 +3,25 @@
// license that can be found in the LICENSE file.
// Package errors contains common error types for the OpenPGP packages.
-package errors // import "github.com/ProtonMail/go-crypto/v2/openpgp/errors"
+package errors // import "github.com/ProtonMail/go-crypto/openpgp/errors"
import (
+ "fmt"
"strconv"
)
+var (
+ // ErrDecryptSessionKeyParsing is a generic error message for parsing errors in decrypted data
+ // to reduce the risk of oracle attacks.
+ ErrDecryptSessionKeyParsing = DecryptWithSessionKeyError("parsing error")
+ // ErrAEADTagVerification is returned if one of the tag verifications in SEIPDv2 fails
+ ErrAEADTagVerification error = DecryptWithSessionKeyError("AEAD tag verification failed")
+ // ErrMDCHashMismatch
+ ErrMDCHashMismatch error = SignatureError("MDC hash mismatch")
+ // ErrMDCMissing
+ ErrMDCMissing error = SignatureError("MDC packet not found")
+)
+
// A StructuralError is returned when OpenPGP data is found to be syntactically
// invalid.
type StructuralError string
@@ -17,6 +30,34 @@ func (s StructuralError) Error() string {
return "openpgp: invalid data: " + string(s)
}
+// A DecryptWithSessionKeyError is returned when a failure occurs when reading from symmetrically decrypted data or
+// an authentication tag verification fails.
+// Such an error indicates that the supplied session key is likely wrong or the data got corrupted.
+type DecryptWithSessionKeyError string
+
+func (s DecryptWithSessionKeyError) Error() string {
+ return "openpgp: decryption with session key failed: " + string(s)
+}
+
+// HandleSensitiveParsingError handles parsing errors when reading data from potentially decrypted data.
+// The function makes parsing errors generic to reduce the risk of oracle attacks in SEIPDv1.
+func HandleSensitiveParsingError(err error, decrypted bool) error {
+ if !decrypted {
+ // Data was not encrypted so we return the inner error.
+ return err
+ }
+ // The data is read from a stream that decrypts using a session key;
+ // therefore, we need to handle parsing errors appropriately.
+ // This is essential to mitigate the risk of oracle attacks.
+ if decError, ok := err.(*DecryptWithSessionKeyError); ok {
+ return decError
+ }
+ if decError, ok := err.(DecryptWithSessionKeyError); ok {
+ return decError
+ }
+ return ErrDecryptSessionKeyParsing
+}
+
// UnsupportedError indicates that, although the OpenPGP data is valid, it
// makes use of currently unimplemented features.
type UnsupportedError string
@@ -41,9 +82,6 @@ func (b SignatureError) Error() string {
return "openpgp: invalid signature: " + string(b)
}
-var ErrMDCHashMismatch error = SignatureError("MDC hash mismatch")
-var ErrMDCMissing error = SignatureError("MDC packet not found")
-
type signatureExpiredError int
func (se signatureExpiredError) Error() string {
@@ -141,3 +179,22 @@ type ErrMalformedMessage string
func (dke ErrMalformedMessage) Error() string {
return "openpgp: malformed message " + string(dke)
}
+
+// ErrEncryptionKeySelection is returned if encryption key selection fails (v2 API).
+type ErrEncryptionKeySelection struct {
+ PrimaryKeyId string
+ PrimaryKeyErr error
+ EncSelectionKeyId *string
+ EncSelectionErr error
+}
+
+func (eks ErrEncryptionKeySelection) Error() string {
+ prefix := fmt.Sprintf("openpgp: key selection for primary key %s:", eks.PrimaryKeyId)
+ if eks.PrimaryKeyErr != nil {
+ return fmt.Sprintf("%s invalid primary key: %s", prefix, eks.PrimaryKeyErr)
+ }
+ if eks.EncSelectionKeyId != nil {
+ return fmt.Sprintf("%s invalid encryption key %s: %s", prefix, *eks.EncSelectionKeyId, eks.EncSelectionErr)
+ }
+ return fmt.Sprintf("%s no encryption key: %s", prefix, eks.EncSelectionErr)
+}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/internal/ecc/curve_info.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/internal/ecc/curve_info.go
index 97f891ffc0..0da2d0d852 100644
--- a/vendor/github.com/ProtonMail/go-crypto/openpgp/internal/ecc/curve_info.go
+++ b/vendor/github.com/ProtonMail/go-crypto/openpgp/internal/ecc/curve_info.go
@@ -10,6 +10,8 @@ import (
"github.com/ProtonMail/go-crypto/openpgp/internal/encoding"
)
+const Curve25519GenName = "Curve25519"
+
type CurveInfo struct {
GenName string
Oid *encoding.OID
@@ -43,7 +45,7 @@ var Curves = []CurveInfo{
},
{
// Curve25519
- GenName: "Curve25519",
+ GenName: Curve25519GenName,
Oid: encoding.NewOID([]byte{0x2B, 0x06, 0x01, 0x04, 0x01, 0x97, 0x55, 0x01, 0x05, 0x01}),
Curve: NewCurve25519(),
},
@@ -55,7 +57,7 @@ var Curves = []CurveInfo{
},
{
// Ed25519
- GenName: "Curve25519",
+ GenName: Curve25519GenName,
Oid: encoding.NewOID([]byte{0x2B, 0x06, 0x01, 0x04, 0x01, 0xDA, 0x47, 0x0F, 0x01}),
Curve: NewEd25519(),
},
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/internal/ecc/ed25519.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/internal/ecc/ed25519.go
index 54a08a8a38..5a4c3a8596 100644
--- a/vendor/github.com/ProtonMail/go-crypto/openpgp/internal/ecc/ed25519.go
+++ b/vendor/github.com/ProtonMail/go-crypto/openpgp/internal/ecc/ed25519.go
@@ -2,6 +2,7 @@
package ecc
import (
+ "bytes"
"crypto/subtle"
"io"
@@ -90,7 +91,14 @@ func (c *ed25519) GenerateEdDSA(rand io.Reader) (pub, priv []byte, err error) {
}
func getEd25519Sk(publicKey, privateKey []byte) ed25519lib.PrivateKey {
- return append(privateKey, publicKey...)
+ privateKeyCap, privateKeyLen, publicKeyLen := cap(privateKey), len(privateKey), len(publicKey)
+
+ if privateKeyCap >= privateKeyLen+publicKeyLen &&
+ bytes.Equal(privateKey[privateKeyLen:privateKeyLen+publicKeyLen], publicKey) {
+ return privateKey[:privateKeyLen+publicKeyLen]
+ }
+
+ return append(privateKey[:privateKeyLen:privateKeyLen], publicKey...)
}
func (c *ed25519) Sign(publicKey, privateKey, message []byte) (sig []byte, err error) {
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/internal/ecc/ed448.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/internal/ecc/ed448.go
index 18cd80434b..b6edda7480 100644
--- a/vendor/github.com/ProtonMail/go-crypto/openpgp/internal/ecc/ed448.go
+++ b/vendor/github.com/ProtonMail/go-crypto/openpgp/internal/ecc/ed448.go
@@ -2,6 +2,7 @@
package ecc
import (
+ "bytes"
"crypto/subtle"
"io"
@@ -84,7 +85,14 @@ func (c *ed448) GenerateEdDSA(rand io.Reader) (pub, priv []byte, err error) {
}
func getEd448Sk(publicKey, privateKey []byte) ed448lib.PrivateKey {
- return append(privateKey, publicKey...)
+ privateKeyCap, privateKeyLen, publicKeyLen := cap(privateKey), len(privateKey), len(publicKey)
+
+ if privateKeyCap >= privateKeyLen+publicKeyLen &&
+ bytes.Equal(privateKey[privateKeyLen:privateKeyLen+publicKeyLen], publicKey) {
+ return privateKey[:privateKeyLen+publicKeyLen]
+ }
+
+ return append(privateKey[:privateKeyLen:privateKeyLen], publicKey...)
}
func (c *ed448) Sign(publicKey, privateKey, message []byte) (sig []byte, err error) {
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/key_generation.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/key_generation.go
index a40e45beee..77213f66be 100644
--- a/vendor/github.com/ProtonMail/go-crypto/openpgp/key_generation.go
+++ b/vendor/github.com/ProtonMail/go-crypto/openpgp/key_generation.go
@@ -41,7 +41,9 @@ func NewEntity(name, comment, email string, config *packet.Config) (*Entity, err
}
primary := packet.NewSignerPrivateKey(creationTime, primaryPrivRaw)
if config.V6() {
- primary.UpgradeToV6()
+ if err := primary.UpgradeToV6(); err != nil {
+ return nil, err
+ }
}
e := &Entity{
@@ -89,13 +91,15 @@ func (t *Entity) AddUserId(name, comment, email string, config *packet.Config) e
}
func writeKeyProperties(selfSignature *packet.Signature, creationTime time.Time, keyLifetimeSecs uint32, config *packet.Config) error {
+ advertiseAead := config.AEAD() != nil
+
selfSignature.CreationTime = creationTime
selfSignature.KeyLifetimeSecs = &keyLifetimeSecs
selfSignature.FlagsValid = true
selfSignature.FlagSign = true
selfSignature.FlagCertify = true
selfSignature.SEIPDv1 = true // true by default, see 5.8 vs. 5.14
- selfSignature.SEIPDv2 = config.AEAD() != nil
+ selfSignature.SEIPDv2 = advertiseAead
// Set the PreferredHash for the SelfSignature from the packet.Config.
// If it is not the must-implement algorithm from rfc4880bis, append that.
@@ -124,16 +128,19 @@ func writeKeyProperties(selfSignature *packet.Signature, creationTime time.Time,
selfSignature.PreferredCompression = append(selfSignature.PreferredCompression, uint8(config.Compression()))
}
- // And for DefaultMode.
- modes := []uint8{uint8(config.AEAD().Mode())}
- if config.AEAD().Mode() != packet.AEADModeOCB {
- modes = append(modes, uint8(packet.AEADModeOCB))
- }
+ if advertiseAead {
+ // Get the preferred AEAD mode from the packet.Config.
+ // If it is not the must-implement algorithm from rfc9580, append that.
+ modes := []uint8{uint8(config.AEAD().Mode())}
+ if config.AEAD().Mode() != packet.AEADModeOCB {
+ modes = append(modes, uint8(packet.AEADModeOCB))
+ }
- // For preferred (AES256, GCM), we'll generate (AES256, GCM), (AES256, OCB), (AES128, GCM), (AES128, OCB)
- for _, cipher := range selfSignature.PreferredSymmetric {
- for _, mode := range modes {
- selfSignature.PreferredCipherSuites = append(selfSignature.PreferredCipherSuites, [2]uint8{cipher, mode})
+ // For preferred (AES256, GCM), we'll generate (AES256, GCM), (AES256, OCB), (AES128, GCM), (AES128, OCB)
+ for _, cipher := range selfSignature.PreferredSymmetric {
+ for _, mode := range modes {
+ selfSignature.PreferredCipherSuites = append(selfSignature.PreferredCipherSuites, [2]uint8{cipher, mode})
+ }
}
}
return nil
@@ -187,7 +194,9 @@ func (e *Entity) AddSigningSubkey(config *packet.Config) error {
sub := packet.NewSignerPrivateKey(creationTime, subPrivRaw)
sub.IsSubkey = true
if config.V6() {
- sub.UpgradeToV6()
+ if err := sub.UpgradeToV6(); err != nil {
+ return err
+ }
}
subkey := Subkey{
@@ -232,7 +241,9 @@ func (e *Entity) addEncryptionSubkey(config *packet.Config, creationTime time.Ti
sub := packet.NewDecrypterPrivateKey(creationTime, subPrivRaw)
sub.IsSubkey = true
if config.V6() {
- sub.UpgradeToV6()
+ if err := sub.UpgradeToV6(); err != nil {
+ return err
+ }
}
subkey := Subkey{
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/aead_crypter.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/aead_crypter.go
index 2d1aeed65c..5e46046563 100644
--- a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/aead_crypter.go
+++ b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/aead_crypter.go
@@ -3,7 +3,6 @@
package packet
import (
- "bytes"
"crypto/cipher"
"encoding/binary"
"io"
@@ -15,12 +14,11 @@ import (
type aeadCrypter struct {
aead cipher.AEAD
chunkSize int
- initialNonce []byte
+ nonce []byte
associatedData []byte // Chunk-independent associated data
chunkIndex []byte // Chunk counter
packetTag packetType // SEIP packet (v2) or AEAD Encrypted Data packet
bytesProcessed int // Amount of plaintext bytes encrypted/decrypted
- buffer bytes.Buffer // Buffered bytes across chunks
}
// computeNonce takes the incremental index and computes an eXclusive OR with
@@ -28,12 +26,12 @@ type aeadCrypter struct {
// 5.16.1 and 5.16.2). It returns the resulting nonce.
func (wo *aeadCrypter) computeNextNonce() (nonce []byte) {
if wo.packetTag == packetTypeSymmetricallyEncryptedIntegrityProtected {
- return append(wo.initialNonce, wo.chunkIndex...)
+ return wo.nonce
}
- nonce = make([]byte, len(wo.initialNonce))
- copy(nonce, wo.initialNonce)
- offset := len(wo.initialNonce) - 8
+ nonce = make([]byte, len(wo.nonce))
+ copy(nonce, wo.nonce)
+ offset := len(wo.nonce) - 8
for i := 0; i < 8; i++ {
nonce[i+offset] ^= wo.chunkIndex[i]
}
@@ -62,8 +60,9 @@ func (wo *aeadCrypter) incrementIndex() error {
type aeadDecrypter struct {
aeadCrypter // Embedded ciphertext opener
reader io.Reader // 'reader' is a partialLengthReader
+ chunkBytes []byte
peekedBytes []byte // Used to detect last chunk
- eof bool
+ buffer []byte // Buffered decrypted bytes
}
// Read decrypts bytes and reads them into dst. It decrypts when necessary and
@@ -71,59 +70,44 @@ type aeadDecrypter struct {
// and an error.
func (ar *aeadDecrypter) Read(dst []byte) (n int, err error) {
// Return buffered plaintext bytes from previous calls
- if ar.buffer.Len() > 0 {
- return ar.buffer.Read(dst)
- }
-
- // Return EOF if we've previously validated the final tag
- if ar.eof {
- return 0, io.EOF
+ if len(ar.buffer) > 0 {
+ n = copy(dst, ar.buffer)
+ ar.buffer = ar.buffer[n:]
+ return
}
// Read a chunk
tagLen := ar.aead.Overhead()
- cipherChunkBuf := new(bytes.Buffer)
- _, errRead := io.CopyN(cipherChunkBuf, ar.reader, int64(ar.chunkSize+tagLen))
- cipherChunk := cipherChunkBuf.Bytes()
- if errRead != nil && errRead != io.EOF {
+ copy(ar.chunkBytes, ar.peekedBytes) // Copy bytes peeked in previous chunk or in initialization
+ bytesRead, errRead := io.ReadFull(ar.reader, ar.chunkBytes[tagLen:])
+ if errRead != nil && errRead != io.EOF && errRead != io.ErrUnexpectedEOF {
return 0, errRead
}
- if len(cipherChunk) > 0 {
- decrypted, errChunk := ar.openChunk(cipherChunk)
+ if bytesRead > 0 {
+ ar.peekedBytes = ar.chunkBytes[bytesRead:bytesRead+tagLen]
+
+ decrypted, errChunk := ar.openChunk(ar.chunkBytes[:bytesRead])
if errChunk != nil {
return 0, errChunk
}
// Return decrypted bytes, buffering if necessary
- if len(dst) < len(decrypted) {
- n = copy(dst, decrypted[:len(dst)])
- ar.buffer.Write(decrypted[len(dst):])
- } else {
- n = copy(dst, decrypted)
- }
+ n = copy(dst, decrypted)
+ ar.buffer = decrypted[n:]
+ return
}
- // Check final authentication tag
- if errRead == io.EOF {
- errChunk := ar.validateFinalTag(ar.peekedBytes)
- if errChunk != nil {
- return n, errChunk
- }
- ar.eof = true // Mark EOF for when we've returned all buffered data
- }
- return
+ return 0, io.EOF
}
-// Close is noOp. The final authentication tag of the stream was already
-// checked in the last Read call. In the future, this function could be used to
-// wipe the reader and peeked, decrypted bytes, if necessary.
+// Close checks the final authentication tag of the stream.
+// In the future, this function could also be used to wipe the reader
+// and peeked & decrypted bytes, if necessary.
func (ar *aeadDecrypter) Close() (err error) {
- if !ar.eof {
- errChunk := ar.validateFinalTag(ar.peekedBytes)
- if errChunk != nil {
- return errChunk
- }
+ errChunk := ar.validateFinalTag(ar.peekedBytes)
+ if errChunk != nil {
+ return errChunk
}
return nil
}
@@ -132,22 +116,15 @@ func (ar *aeadDecrypter) Close() (err error) {
// the underlying plaintext and an error. It accesses peeked bytes from next
// chunk, to identify the last chunk and decrypt/validate accordingly.
func (ar *aeadDecrypter) openChunk(data []byte) ([]byte, error) {
- tagLen := ar.aead.Overhead()
- // Restore carried bytes from last call
- chunkExtra := append(ar.peekedBytes, data...)
- // 'chunk' contains encrypted bytes, followed by an authentication tag.
- chunk := chunkExtra[:len(chunkExtra)-tagLen]
- ar.peekedBytes = chunkExtra[len(chunkExtra)-tagLen:]
-
adata := ar.associatedData
if ar.aeadCrypter.packetTag == packetTypeAEADEncrypted {
adata = append(ar.associatedData, ar.chunkIndex...)
}
nonce := ar.computeNextNonce()
- plainChunk, err := ar.aead.Open(nil, nonce, chunk, adata)
+ plainChunk, err := ar.aead.Open(data[:0:len(data)], nonce, data, adata)
if err != nil {
- return nil, err
+ return nil, errors.ErrAEADTagVerification
}
ar.bytesProcessed += len(plainChunk)
if err = ar.aeadCrypter.incrementIndex(); err != nil {
@@ -172,9 +149,8 @@ func (ar *aeadDecrypter) validateFinalTag(tag []byte) error {
// ... and total number of encrypted octets
adata = append(adata, amountBytes...)
nonce := ar.computeNextNonce()
- _, err := ar.aead.Open(nil, nonce, tag, adata)
- if err != nil {
- return err
+ if _, err := ar.aead.Open(nil, nonce, tag, adata); err != nil {
+ return errors.ErrAEADTagVerification
}
return nil
}
@@ -184,27 +160,29 @@ func (ar *aeadDecrypter) validateFinalTag(tag []byte) error {
type aeadEncrypter struct {
aeadCrypter // Embedded plaintext sealer
writer io.WriteCloser // 'writer' is a partialLengthWriter
+ chunkBytes []byte
+ offset int
}
// Write encrypts and writes bytes. It encrypts when necessary and buffers extra
// plaintext bytes for next call. When the stream is finished, Close() MUST be
// called to append the final tag.
func (aw *aeadEncrypter) Write(plaintextBytes []byte) (n int, err error) {
- // Append plaintextBytes to existing buffered bytes
- n, err = aw.buffer.Write(plaintextBytes)
- if err != nil {
- return n, err
- }
- // Encrypt and write chunks
- for aw.buffer.Len() >= aw.chunkSize {
- plainChunk := aw.buffer.Next(aw.chunkSize)
- encryptedChunk, err := aw.sealChunk(plainChunk)
- if err != nil {
- return n, err
- }
- _, err = aw.writer.Write(encryptedChunk)
- if err != nil {
- return n, err
+ for n != len(plaintextBytes) {
+ copied := copy(aw.chunkBytes[aw.offset:aw.chunkSize], plaintextBytes[n:])
+ n += copied
+ aw.offset += copied
+
+ if aw.offset == aw.chunkSize {
+ encryptedChunk, err := aw.sealChunk(aw.chunkBytes[:aw.offset])
+ if err != nil {
+ return n, err
+ }
+ _, err = aw.writer.Write(encryptedChunk)
+ if err != nil {
+ return n, err
+ }
+ aw.offset = 0
}
}
return
@@ -216,9 +194,8 @@ func (aw *aeadEncrypter) Write(plaintextBytes []byte) (n int, err error) {
func (aw *aeadEncrypter) Close() (err error) {
// Encrypt and write a chunk if there's buffered data left, or if we haven't
// written any chunks yet.
- if aw.buffer.Len() > 0 || aw.bytesProcessed == 0 {
- plainChunk := aw.buffer.Bytes()
- lastEncryptedChunk, err := aw.sealChunk(plainChunk)
+ if aw.offset > 0 || aw.bytesProcessed == 0 {
+ lastEncryptedChunk, err := aw.sealChunk(aw.chunkBytes[:aw.offset])
if err != nil {
return err
}
@@ -264,7 +241,7 @@ func (aw *aeadEncrypter) sealChunk(data []byte) ([]byte, error) {
}
nonce := aw.computeNextNonce()
- encrypted := aw.aead.Seal(nil, nonce, data, adata)
+ encrypted := aw.aead.Seal(data[:0], nonce, data, adata)
aw.bytesProcessed += len(data)
if err := aw.aeadCrypter.incrementIndex(); err != nil {
return nil, err
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/aead_encrypted.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/aead_encrypted.go
index 98bd876bf2..583765d87c 100644
--- a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/aead_encrypted.go
+++ b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/aead_encrypted.go
@@ -65,24 +65,28 @@ func (ae *AEADEncrypted) decrypt(key []byte) (io.ReadCloser, error) {
blockCipher := ae.cipher.new(key)
aead := ae.mode.new(blockCipher)
// Carry the first tagLen bytes
+ chunkSize := decodeAEADChunkSize(ae.chunkSizeByte)
tagLen := ae.mode.TagLength()
- peekedBytes := make([]byte, tagLen)
+ chunkBytes := make([]byte, chunkSize+tagLen*2)
+ peekedBytes := chunkBytes[chunkSize+tagLen:]
n, err := io.ReadFull(ae.Contents, peekedBytes)
if n < tagLen || (err != nil && err != io.EOF) {
return nil, errors.AEADError("Not enough data to decrypt:" + err.Error())
}
- chunkSize := decodeAEADChunkSize(ae.chunkSizeByte)
+
return &aeadDecrypter{
aeadCrypter: aeadCrypter{
aead: aead,
chunkSize: chunkSize,
- initialNonce: ae.initialNonce,
+ nonce: ae.initialNonce,
associatedData: ae.associatedData(),
chunkIndex: make([]byte, 8),
packetTag: packetTypeAEADEncrypted,
},
reader: ae.Contents,
- peekedBytes: peekedBytes}, nil
+ chunkBytes: chunkBytes,
+ peekedBytes: peekedBytes,
+ }, nil
}
// associatedData for chunks: tag, version, cipher, mode, chunk size byte
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/compressed.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/compressed.go
index 334de286b3..0bcb38caca 100644
--- a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/compressed.go
+++ b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/compressed.go
@@ -9,7 +9,6 @@ import (
"compress/flate"
"compress/zlib"
"io"
- "io/ioutil"
"strconv"
"github.com/ProtonMail/go-crypto/openpgp/errors"
@@ -91,7 +90,7 @@ func (c *Compressed) parse(r io.Reader) error {
}
c.Body = newDecompressionReader(r, decompressor)
case 3:
- c.Body = newDecompressionReader(r, ioutil.NopCloser(bzip2.NewReader(r)))
+ c.Body = newDecompressionReader(r, io.NopCloser(bzip2.NewReader(r)))
default:
err = errors.UnsupportedError("unknown compression algorithm: " + strconv.Itoa(int(buf[0])))
}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/config.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/config.go
index 181d5d344e..257398d9dd 100644
--- a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/config.go
+++ b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/config.go
@@ -19,6 +19,10 @@ var (
PubKeyAlgoElGamal: true,
PubKeyAlgoDSA: true,
}
+ defaultRejectHashAlgorithms = map[crypto.Hash]bool{
+ crypto.MD5: true,
+ crypto.RIPEMD160: true,
+ }
defaultRejectMessageHashAlgorithms = map[crypto.Hash]bool{
crypto.SHA1: true,
crypto.MD5: true,
@@ -29,6 +33,15 @@ var (
}
)
+// A global feature flag to indicate v5 support.
+// Can be set via a build tag, e.g.: `go build -tags v5 ./...`
+// If the build tag is missing config_v5.go will set it to true.
+//
+// Disables parsing of v5 keys and v5 signatures.
+// These are non-standard entities, which in the crypto-refresh have been superseded
+// by v6 keys, v6 signatures and SEIPDv2 encrypted data, respectively.
+var V5Disabled = false
+
// Config collects a number of parameters along with sensible defaults.
// A nil *Config is valid and results in all default values.
type Config struct {
@@ -95,6 +108,7 @@ type Config struct {
MinRSABits uint16
// Reject insecure algorithms, only works with v2 api
RejectPublicKeyAlgorithms map[PublicKeyAlgorithm]bool
+ RejectHashAlgorithms map[crypto.Hash]bool
RejectMessageHashAlgorithms map[crypto.Hash]bool
RejectCurves map[Curve]bool
// "The validity period of the key. This is the number of seconds after
@@ -125,6 +139,11 @@ type Config struct {
// might be no other way than to tolerate the missing MDC. Setting this flag, allows this
// mode of operation. It should be considered a measure of last resort.
InsecureAllowUnauthenticatedMessages bool
+ // InsecureAllowDecryptionWithSigningKeys allows decryption with keys marked as signing keys in the v2 API.
+ // This setting is potentially insecure, but it is needed as some libraries
+ // ignored key flags when selecting a key for encryption.
+ // Not relevant for the v1 API, as all keys were allowed in decryption.
+ InsecureAllowDecryptionWithSigningKeys bool
// KnownNotations is a map of Notation Data names to bools, which controls
// the notation names that are allowed to be present in critical Notation Data
// signature subpackets.
@@ -146,6 +165,19 @@ type Config struct {
// that the packet sequence conforms with the grammar mandated by rfc4880.
// The default behavior, when the config or flag is nil, is to check the packet sequence.
CheckPacketSequence *bool
+ // NonDeterministicSignaturesViaNotation is a flag to enable randomization of signatures.
+ // If true, a salt notation is used to randomize signatures generated by v4 and v5 keys
+ // (v6 signatures are always non-deterministic, by design).
+ // This protects EdDSA signatures from potentially leaking the secret key in case of faults (i.e. bitflips) which, in principle, could occur
+ // during the signing computation. It is added to signatures of any algo for simplicity, and as it may also serve as protection in case of
+ // weaknesses in the hash algo, potentially hindering e.g. some chosen-prefix attacks.
+ // The default behavior, when the config or flag is nil, is to enable the feature.
+ NonDeterministicSignaturesViaNotation *bool
+
+ // InsecureAllowAllKeyFlagsWhenMissing determines how a key without valid key flags is handled.
+ // When set to true, a key without flags is treated as if all flags are enabled.
+ // This behavior is consistent with GPG.
+ InsecureAllowAllKeyFlagsWhenMissing bool
}
func (c *Config) Random() io.Reader {
@@ -233,7 +265,7 @@ func (c *Config) S2K() *s2k.Config {
return nil
}
// for backwards compatibility
- if c != nil && c.S2KCount > 0 && c.S2KConfig == nil {
+ if c.S2KCount > 0 && c.S2KConfig == nil {
return &s2k.Config{
S2KCount: c.S2KCount,
}
@@ -269,6 +301,13 @@ func (c *Config) AllowUnauthenticatedMessages() bool {
return c.InsecureAllowUnauthenticatedMessages
}
+func (c *Config) AllowDecryptionWithSigningKeys() bool {
+ if c == nil {
+ return false
+ }
+ return c.InsecureAllowDecryptionWithSigningKeys
+}
+
func (c *Config) KnownNotation(notationName string) bool {
if c == nil {
return false
@@ -322,6 +361,17 @@ func (c *Config) RejectPublicKeyAlgorithm(alg PublicKeyAlgorithm) bool {
return rejectedAlgorithms[alg]
}
+func (c *Config) RejectHashAlgorithm(hash crypto.Hash) bool {
+ var rejectedAlgorithms map[crypto.Hash]bool
+ if c == nil || c.RejectHashAlgorithms == nil {
+ // Default
+ rejectedAlgorithms = defaultRejectHashAlgorithms
+ } else {
+ rejectedAlgorithms = c.RejectHashAlgorithms
+ }
+ return rejectedAlgorithms[hash]
+}
+
func (c *Config) RejectMessageHashAlgorithm(hash crypto.Hash) bool {
var rejectedAlgorithms map[crypto.Hash]bool
if c == nil || c.RejectMessageHashAlgorithms == nil {
@@ -350,3 +400,23 @@ func (c *Config) StrictPacketSequence() bool {
}
return *c.CheckPacketSequence
}
+
+func (c *Config) RandomizeSignaturesViaNotation() bool {
+ if c == nil || c.NonDeterministicSignaturesViaNotation == nil {
+ return true
+ }
+ return *c.NonDeterministicSignaturesViaNotation
+}
+
+func (c *Config) AllowAllKeyFlagsWhenMissing() bool {
+ if c == nil {
+ return false
+ }
+ return c.InsecureAllowAllKeyFlagsWhenMissing
+}
+
+// BoolPointer is a helper function to set a boolean pointer in the Config.
+// e.g., config.CheckPacketSequence = BoolPointer(true)
+func BoolPointer(value bool) *bool {
+ return &value
+}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/config_v5.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/config_v5.go
new file mode 100644
index 0000000000..f2415906b9
--- /dev/null
+++ b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/config_v5.go
@@ -0,0 +1,7 @@
+//go:build !v5
+
+package packet
+
+func init() {
+ V5Disabled = true
+}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/encrypted_key.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/encrypted_key.go
index e70f9d9411..b90bb28911 100644
--- a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/encrypted_key.go
+++ b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/encrypted_key.go
@@ -181,7 +181,12 @@ func (e *EncryptedKey) Decrypt(priv *PrivateKey, config *Config) error {
vsG := e.encryptedMPI1.Bytes()
m := e.encryptedMPI2.Bytes()
oid := priv.PublicKey.oid.EncodedBytes()
- b, err = ecdh.Decrypt(priv.PrivateKey.(*ecdh.PrivateKey), vsG, m, oid, priv.PublicKey.Fingerprint[:])
+ fp := priv.PublicKey.Fingerprint[:]
+ if priv.PublicKey.Version == 5 {
+ // For v5 the, the fingerprint must be restricted to 20 bytes
+ fp = fp[:20]
+ }
+ b, err = ecdh.Decrypt(priv.PrivateKey.(*ecdh.PrivateKey), vsG, m, oid, fp)
case PubKeyAlgoX25519:
b, err = x25519.Decrypt(priv.PrivateKey.(*x25519.PrivateKey), e.ephemeralPublicX25519, e.encryptedSession)
case PubKeyAlgoX448:
@@ -316,7 +321,8 @@ func (e *EncryptedKey) Serialize(w io.Writer) error {
// SerializeEncryptedKeyAEAD serializes an encrypted key packet to w that contains
// key, encrypted to pub.
-// If aeadSupported is set, PKESK v6 is used else v4.
+// If aeadSupported is set, PKESK v6 is used, otherwise v3.
+// Note: aeadSupported MUST match the value passed to SerializeSymmetricallyEncrypted.
// If config is nil, sensible defaults will be used.
func SerializeEncryptedKeyAEAD(w io.Writer, pub *PublicKey, cipherFunc CipherFunction, aeadSupported bool, key []byte, config *Config) error {
return SerializeEncryptedKeyAEADwithHiddenOption(w, pub, cipherFunc, aeadSupported, key, false, config)
@@ -325,7 +331,8 @@ func SerializeEncryptedKeyAEAD(w io.Writer, pub *PublicKey, cipherFunc CipherFun
// SerializeEncryptedKeyAEADwithHiddenOption serializes an encrypted key packet to w that contains
// key, encrypted to pub.
// Offers the hidden flag option to indicated if the PKESK packet should include a wildcard KeyID.
-// If aeadSupported is set, PKESK v6 is used else v4.
+// If aeadSupported is set, PKESK v6 is used, otherwise v3.
+// Note: aeadSupported MUST match the value passed to SerializeSymmetricallyEncrypted.
// If config is nil, sensible defaults will be used.
func SerializeEncryptedKeyAEADwithHiddenOption(w io.Writer, pub *PublicKey, cipherFunc CipherFunction, aeadSupported bool, key []byte, hidden bool, config *Config) error {
var buf [36]byte // max possible header size is v6
@@ -421,6 +428,7 @@ func SerializeEncryptedKeyAEADwithHiddenOption(w io.Writer, pub *PublicKey, ciph
// key, encrypted to pub.
// PKESKv6 is used if config.AEAD() is not nil.
// If config is nil, sensible defaults will be used.
+// Deprecated: Use SerializeEncryptedKeyAEAD instead.
func SerializeEncryptedKey(w io.Writer, pub *PublicKey, cipherFunc CipherFunction, key []byte, config *Config) error {
return SerializeEncryptedKeyAEAD(w, pub, cipherFunc, config.AEAD() != nil, key, config)
}
@@ -429,6 +437,7 @@ func SerializeEncryptedKey(w io.Writer, pub *PublicKey, cipherFunc CipherFunctio
// key, encrypted to pub. PKESKv6 is used if config.AEAD() is not nil.
// The hidden option controls if the packet should be anonymous, i.e., omit key metadata.
// If config is nil, sensible defaults will be used.
+// Deprecated: Use SerializeEncryptedKeyAEADwithHiddenOption instead.
func SerializeEncryptedKeyWithHiddenOption(w io.Writer, pub *PublicKey, cipherFunc CipherFunction, key []byte, hidden bool, config *Config) error {
return SerializeEncryptedKeyAEADwithHiddenOption(w, pub, cipherFunc, config.AEAD() != nil, key, hidden, config)
}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/packet.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/packet.go
index da12fbce06..1e92e22c97 100644
--- a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/packet.go
+++ b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/packet.go
@@ -4,7 +4,7 @@
// Package packet implements parsing and serialization of OpenPGP packets, as
// specified in RFC 4880.
-package packet // import "github.com/ProtonMail/go-crypto/v2/openpgp/packet"
+package packet // import "github.com/ProtonMail/go-crypto/openpgp/packet"
import (
"bytes"
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/padding.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/padding.go
index 06fa83740d..3b6a7045d1 100644
--- a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/padding.go
+++ b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/padding.go
@@ -2,7 +2,6 @@ package packet
import (
"io"
- "io/ioutil"
)
// Padding type represents a Padding Packet (Tag 21).
@@ -12,7 +11,7 @@ type Padding int
// parse just ignores the padding content.
func (pad Padding) parse(reader io.Reader) error {
- _, err := io.CopyN(ioutil.Discard, reader, int64(pad))
+ _, err := io.CopyN(io.Discard, reader, int64(pad))
return err
}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/private_key.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/private_key.go
index 099b4d9ba0..f04e6c6b87 100644
--- a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/private_key.go
+++ b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/private_key.go
@@ -202,6 +202,10 @@ func (pk *PrivateKey) parse(r io.Reader) (err error) {
v5 := pk.PublicKey.Version == 5
v6 := pk.PublicKey.Version == 6
+ if V5Disabled && v5 {
+ return errors.UnsupportedError("support for parsing v5 entities is disabled; build with `-tags v5` if needed")
+ }
+
var buf [1]byte
_, err = readFull(r, buf[:])
if err != nil {
@@ -261,6 +265,12 @@ func (pk *PrivateKey) parse(r io.Reader) (err error) {
if pk.s2kParams.Dummy() {
return
}
+ if pk.s2kParams.Mode() == s2k.Argon2S2K && pk.s2kType != S2KAEAD {
+ return errors.StructuralError("using Argon2 S2K without AEAD is not allowed")
+ }
+ if pk.s2kParams.Mode() == s2k.SimpleS2K && pk.Version == 6 {
+ return errors.StructuralError("using Simple S2K with version 6 keys is not allowed")
+ }
pk.s2k, err = pk.s2kParams.Function()
if err != nil {
return
@@ -655,6 +665,14 @@ func (pk *PrivateKey) encrypt(key []byte, params *s2k.Params, s2kType S2KType, c
return errors.InvalidArgumentError("supplied encryption key has the wrong size")
}
+ if params.Mode() == s2k.Argon2S2K && s2kType != S2KAEAD {
+ return errors.InvalidArgumentError("using Argon2 S2K without AEAD is not allowed")
+ }
+ if params.Mode() != s2k.Argon2S2K && params.Mode() != s2k.IteratedSaltedS2K &&
+ params.Mode() != s2k.SaltedS2K { // only allowed for high-entropy passphrases
+ return errors.InvalidArgumentError("insecure S2K mode")
+ }
+
priv := bytes.NewBuffer(nil)
err := pk.serializePrivateKey(priv)
if err != nil {
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/public_key.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/public_key.go
index dd93c98702..e2813396e3 100644
--- a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/public_key.go
+++ b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/public_key.go
@@ -63,9 +63,10 @@ func (pk *PublicKey) UpgradeToV5() {
// UpgradeToV6 updates the version of the key to v6, and updates all necessary
// fields.
-func (pk *PublicKey) UpgradeToV6() {
+func (pk *PublicKey) UpgradeToV6() error {
pk.Version = 6
pk.setFingerprintAndKeyId()
+ return pk.checkV6Compatibility()
}
// signingKey provides a convenient abstraction over signature verification
@@ -236,11 +237,16 @@ func (pk *PublicKey) parse(r io.Reader) (err error) {
if err != nil {
return
}
- if buf[0] != 4 && buf[0] != 5 && buf[0] != 6 {
+
+ pk.Version = int(buf[0])
+ if pk.Version != 4 && pk.Version != 5 && pk.Version != 6 {
return errors.UnsupportedError("public key version " + strconv.Itoa(int(buf[0])))
}
- pk.Version = int(buf[0])
+ if V5Disabled && pk.Version == 5 {
+ return errors.UnsupportedError("support for parsing v5 entities is disabled; build with `-tags v5` if needed")
+ }
+
if pk.Version >= 5 {
// Read the four-octet scalar octet count
// The count is not used in this implementation
@@ -308,6 +314,23 @@ func (pk *PublicKey) setFingerprintAndKeyId() {
}
}
+func (pk *PublicKey) checkV6Compatibility() error {
+ // Implementations MUST NOT accept or generate version 6 key material using the deprecated OIDs.
+ switch pk.PubKeyAlgo {
+ case PubKeyAlgoECDH:
+ curveInfo := ecc.FindByOid(pk.oid)
+ if curveInfo == nil {
+ return errors.UnsupportedError(fmt.Sprintf("unknown oid: %x", pk.oid))
+ }
+ if curveInfo.GenName == ecc.Curve25519GenName {
+ return errors.StructuralError("cannot generate v6 key with deprecated OID: Curve25519Legacy")
+ }
+ case PubKeyAlgoEdDSA:
+ return errors.StructuralError("cannot generate v6 key with deprecated algorithm: EdDSALegacy")
+ }
+ return nil
+}
+
// parseRSA parses RSA public key material from the given Reader. See RFC 4880,
// section 5.5.2.
func (pk *PublicKey) parseRSA(r io.Reader) (err error) {
@@ -432,6 +455,11 @@ func (pk *PublicKey) parseECDH(r io.Reader) (err error) {
return errors.UnsupportedError(fmt.Sprintf("unknown oid: %x", pk.oid))
}
+ if pk.Version == 6 && curveInfo.GenName == ecc.Curve25519GenName {
+ // Implementations MUST NOT accept or generate version 6 key material using the deprecated OIDs.
+ return errors.StructuralError("cannot read v6 key with deprecated OID: Curve25519Legacy")
+ }
+
pk.p = new(encoding.MPI)
if _, err = pk.p.ReadFrom(r); err != nil {
return
@@ -469,6 +497,11 @@ func (pk *PublicKey) parseECDH(r io.Reader) (err error) {
}
func (pk *PublicKey) parseEdDSA(r io.Reader) (err error) {
+ if pk.Version == 6 {
+ // Implementations MUST NOT accept or generate version 6 key material using the deprecated OIDs.
+ return errors.StructuralError("cannot generate v6 key with deprecated algorithm: EdDSALegacy")
+ }
+
pk.oid = new(encoding.OID)
if _, err = pk.oid.ReadFrom(r); err != nil {
return
@@ -590,10 +623,7 @@ func (pk *PublicKey) SerializeSignaturePrefix(w io.Writer) error {
byte(pLength >> 8),
byte(pLength),
})
- if err != nil {
- return err
- }
- return nil
+ return err
}
if _, err := w.Write([]byte{0x99, byte(pLength >> 8), byte(pLength)}); err != nil {
return err
@@ -752,6 +782,20 @@ func (pk *PublicKey) CanSign() bool {
return pk.PubKeyAlgo != PubKeyAlgoRSAEncryptOnly && pk.PubKeyAlgo != PubKeyAlgoElGamal && pk.PubKeyAlgo != PubKeyAlgoECDH
}
+// VerifyHashTag returns nil iff sig appears to be a plausible signature of the data
+// hashed into signed, based solely on its HashTag. signed is mutated by this call.
+func VerifyHashTag(signed hash.Hash, sig *Signature) (err error) {
+ if sig.Version == 5 && (sig.SigType == 0x00 || sig.SigType == 0x01) {
+ sig.AddMetadataToHashSuffix()
+ }
+ signed.Write(sig.HashSuffix)
+ hashBytes := signed.Sum(nil)
+ if hashBytes[0] != sig.HashTag[0] || hashBytes[1] != sig.HashTag[1] {
+ return errors.SignatureError("hash tag doesn't match")
+ }
+ return nil
+}
+
// VerifySignature returns nil iff sig is a valid signature, made by this
// public key, of the data hashed into signed. signed is mutated by this call.
func (pk *PublicKey) VerifySignature(signed hash.Hash, sig *Signature) (err error) {
@@ -835,6 +879,20 @@ func keySignatureHash(pk, signed signingKey, hashFunc hash.Hash) (h hash.Hash, e
return
}
+// VerifyKeyHashTag returns nil iff sig appears to be a plausible signature over this
+// primary key and subkey, based solely on its HashTag.
+func (pk *PublicKey) VerifyKeyHashTag(signed *PublicKey, sig *Signature) error {
+ preparedHash, err := sig.PrepareVerify()
+ if err != nil {
+ return err
+ }
+ h, err := keySignatureHash(pk, signed, preparedHash)
+ if err != nil {
+ return err
+ }
+ return VerifyHashTag(h, sig)
+}
+
// VerifyKeySignature returns nil iff sig is a valid signature, made by this
// public key, of signed.
func (pk *PublicKey) VerifyKeySignature(signed *PublicKey, sig *Signature) error {
@@ -878,6 +936,19 @@ func keyRevocationHash(pk signingKey, hashFunc hash.Hash) (err error) {
return pk.SerializeForHash(hashFunc)
}
+// VerifyRevocationHashTag returns nil iff sig appears to be a plausible signature
+// over this public key, based solely on its HashTag.
+func (pk *PublicKey) VerifyRevocationHashTag(sig *Signature) (err error) {
+ preparedHash, err := sig.PrepareVerify()
+ if err != nil {
+ return err
+ }
+ if err = keyRevocationHash(pk, preparedHash); err != nil {
+ return err
+ }
+ return VerifyHashTag(preparedHash, sig)
+}
+
// VerifyRevocationSignature returns nil iff sig is a valid signature, made by this
// public key.
func (pk *PublicKey) VerifyRevocationSignature(sig *Signature) (err error) {
@@ -885,7 +956,7 @@ func (pk *PublicKey) VerifyRevocationSignature(sig *Signature) (err error) {
if err != nil {
return err
}
- if keyRevocationHash(pk, preparedHash); err != nil {
+ if err = keyRevocationHash(pk, preparedHash); err != nil {
return err
}
return pk.VerifySignature(preparedHash, sig)
@@ -934,6 +1005,20 @@ func directKeySignatureHash(pk *PublicKey, h hash.Hash) (err error) {
return pk.SerializeForHash(h)
}
+// VerifyUserIdHashTag returns nil iff sig appears to be a plausible signature over this
+// public key and UserId, based solely on its HashTag
+func (pk *PublicKey) VerifyUserIdHashTag(id string, sig *Signature) (err error) {
+ preparedHash, err := sig.PrepareVerify()
+ if err != nil {
+ return err
+ }
+ err = userIdSignatureHash(id, pk, preparedHash)
+ if err != nil {
+ return err
+ }
+ return VerifyHashTag(preparedHash, sig)
+}
+
// VerifyUserIdSignature returns nil iff sig is a valid signature, made by this
// public key, that id is the identity of pub.
func (pk *PublicKey) VerifyUserIdSignature(id string, pub *PublicKey, sig *Signature) (err error) {
@@ -963,12 +1048,17 @@ func (pk *PublicKey) VerifyDirectKeySignature(sig *Signature) (err error) {
// KeyIdString returns the public key's fingerprint in capital hex
// (e.g. "6C7EE1B8621CC013").
func (pk *PublicKey) KeyIdString() string {
- return fmt.Sprintf("%X", pk.Fingerprint[12:20])
+ return fmt.Sprintf("%016X", pk.KeyId)
}
// KeyIdShortString returns the short form of public key's fingerprint
// in capital hex, as shown by gpg --list-keys (e.g. "621CC013").
+// This function will return the full key id for v5 and v6 keys
+// since the short key id is undefined for them.
func (pk *PublicKey) KeyIdShortString() string {
+ if pk.Version >= 5 {
+ return pk.KeyIdString()
+ }
return fmt.Sprintf("%X", pk.Fingerprint[16:20])
}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/signature.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/signature.go
index 420625386b..84dd3b86f8 100644
--- a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/signature.go
+++ b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/signature.go
@@ -8,9 +8,11 @@ import (
"bytes"
"crypto"
"crypto/dsa"
+ "encoding/asn1"
"encoding/binary"
"hash"
"io"
+ "math/big"
"strconv"
"time"
@@ -24,7 +26,8 @@ import (
)
const (
- // See RFC 4880, section 5.2.3.21 for details.
+ // First octet of key flags.
+ // See RFC 9580, section 5.2.3.29 for details.
KeyFlagCertify = 1 << iota
KeyFlagSign
KeyFlagEncryptCommunications
@@ -35,14 +38,29 @@ const (
KeyFlagGroupKey
)
-// Signature represents a signature. See RFC 4880, section 5.2.
+const (
+ // First octet of keyserver preference flags.
+ // See RFC 9580, section 5.2.3.25 for details.
+ _ = 1 << iota
+ _
+ _
+ _
+ _
+ _
+ _
+ KeyserverPrefNoModify
+)
+
+const SaltNotationName = "salt@notations.openpgpjs.org"
+
+// Signature represents a signature. See RFC 9580, section 5.2.
type Signature struct {
Version int
SigType SignatureType
PubKeyAlgo PublicKeyAlgorithm
Hash crypto.Hash
// salt contains a random salt value for v6 signatures
- // See RFC the crypto refresh Section 5.2.3.
+ // See RFC 9580 Section 5.2.4.
salt []byte
// HashSuffix is extra data that is hashed in after the signed data.
@@ -83,27 +101,37 @@ type Signature struct {
// TrustLevel and TrustAmount can be set by the signer to assert that
// the key is not only valid but also trustworthy at the specified
// level.
- // See RFC 4880, section 5.2.3.13 for details.
+ // See RFC 9580, section 5.2.3.21 for details.
TrustLevel TrustLevel
TrustAmount TrustAmount
// TrustRegularExpression can be used in conjunction with trust Signature
// packets to limit the scope of the trust that is extended.
- // See RFC 4880, section 5.2.3.14 for details.
+ // See RFC 9580, section 5.2.3.22 for details.
TrustRegularExpression *string
+ // KeyserverPrefsValid is set if any keyserver preferences were given. See RFC 9580, section
+ // 5.2.3.25 for details.
+ KeyserverPrefsValid bool
+ KeyserverPrefNoModify bool
+
+ // PreferredKeyserver can be set to a URI where the latest version of the
+ // key that this signature is made over can be found. See RFC 9580, section
+ // 5.2.3.26 for details.
+ PreferredKeyserver string
+
// PolicyURI can be set to the URI of a document that describes the
- // policy under which the signature was issued. See RFC 4880, section
- // 5.2.3.20 for details.
+ // policy under which the signature was issued. See RFC 9580, section
+ // 5.2.3.28 for details.
PolicyURI string
- // FlagsValid is set if any flags were given. See RFC 4880, section
- // 5.2.3.21 for details.
+ // FlagsValid is set if any flags were given. See RFC 9580, section
+ // 5.2.3.29 for details.
FlagsValid bool
FlagCertify, FlagSign, FlagEncryptCommunications, FlagEncryptStorage, FlagSplitKey, FlagAuthenticate, FlagGroupKey bool
// RevocationReason is set if this signature has been revoked.
- // See RFC 4880, section 5.2.3.23 for details.
+ // See RFC 9580, section 5.2.3.31 for details.
RevocationReason *ReasonForRevocation
RevocationReasonText string
@@ -143,17 +171,22 @@ func (sig *Signature) Salt() []byte {
}
func (sig *Signature) parse(r io.Reader) (err error) {
- // RFC 4880, section 5.2.3
+ // RFC 9580, section 5.2.3
var buf [7]byte
_, err = readFull(r, buf[:1])
if err != nil {
return
}
- if buf[0] != 4 && buf[0] != 5 && buf[0] != 6 {
+ sig.Version = int(buf[0])
+ if sig.Version != 4 && sig.Version != 5 && sig.Version != 6 {
err = errors.UnsupportedError("signature packet version " + strconv.Itoa(int(buf[0])))
return
}
- sig.Version = int(buf[0])
+
+ if V5Disabled && sig.Version == 5 {
+ return errors.UnsupportedError("support for parsing v5 entities is disabled; build with `-tags v5` if needed")
+ }
+
if sig.Version == 6 {
_, err = readFull(r, buf[:7])
} else {
@@ -310,7 +343,7 @@ func (sig *Signature) parse(r io.Reader) (err error) {
}
// parseSignatureSubpackets parses subpackets of the main signature packet. See
-// RFC 4880, section 5.2.3.1.
+// RFC 9580, section 5.2.3.1.
func parseSignatureSubpackets(sig *Signature, subpackets []byte, isHashed bool) (err error) {
for len(subpackets) > 0 {
subpackets, err = parseSignatureSubpacket(sig, subpackets, isHashed)
@@ -331,6 +364,7 @@ type signatureSubpacketType uint8
const (
creationTimeSubpacket signatureSubpacketType = 2
signatureExpirationSubpacket signatureSubpacketType = 3
+ exportableCertSubpacket signatureSubpacketType = 4
trustSubpacket signatureSubpacketType = 5
regularExpressionSubpacket signatureSubpacketType = 6
keyExpirationSubpacket signatureSubpacketType = 9
@@ -339,6 +373,8 @@ const (
notationDataSubpacket signatureSubpacketType = 20
prefHashAlgosSubpacket signatureSubpacketType = 21
prefCompressionSubpacket signatureSubpacketType = 22
+ keyserverPrefsSubpacket signatureSubpacketType = 23
+ prefKeyserverSubpacket signatureSubpacketType = 24
primaryUserIdSubpacket signatureSubpacketType = 25
policyUriSubpacket signatureSubpacketType = 26
keyFlagsSubpacket signatureSubpacketType = 27
@@ -353,7 +389,7 @@ const (
// parseSignatureSubpacket parses a single subpacket. len(subpacket) is >= 1.
func parseSignatureSubpacket(sig *Signature, subpacket []byte, isHashed bool) (rest []byte, err error) {
- // RFC 4880, section 5.2.3.1
+ // RFC 9580, section 5.2.3.7
var (
length uint32
packetType signatureSubpacketType
@@ -411,19 +447,24 @@ func parseSignatureSubpacket(sig *Signature, subpacket []byte, isHashed bool) (r
t := binary.BigEndian.Uint32(subpacket)
sig.CreationTime = time.Unix(int64(t), 0)
case signatureExpirationSubpacket:
- // Signature expiration time, section 5.2.3.10
+ // Signature expiration time, section 5.2.3.18
if len(subpacket) != 4 {
err = errors.StructuralError("expiration subpacket with bad length")
return
}
sig.SigLifetimeSecs = new(uint32)
*sig.SigLifetimeSecs = binary.BigEndian.Uint32(subpacket)
+ case exportableCertSubpacket:
+ if subpacket[0] == 0 {
+ err = errors.UnsupportedError("signature with non-exportable certification")
+ return
+ }
case trustSubpacket:
if len(subpacket) != 2 {
err = errors.StructuralError("trust subpacket with bad length")
return
}
- // Trust level and amount, section 5.2.3.13
+ // Trust level and amount, section 5.2.3.21
sig.TrustLevel = TrustLevel(subpacket[0])
sig.TrustAmount = TrustAmount(subpacket[1])
case regularExpressionSubpacket:
@@ -431,7 +472,7 @@ func parseSignatureSubpacket(sig *Signature, subpacket []byte, isHashed bool) (r
err = errors.StructuralError("regexp subpacket with bad length")
return
}
- // Trust regular expression, section 5.2.3.14
+ // Trust regular expression, section 5.2.3.22
// RFC specifies the string should be null-terminated; remove a null byte from the end
if subpacket[len(subpacket)-1] != 0x00 {
err = errors.StructuralError("expected regular expression to be null-terminated")
@@ -440,7 +481,7 @@ func parseSignatureSubpacket(sig *Signature, subpacket []byte, isHashed bool) (r
trustRegularExpression := string(subpacket[:len(subpacket)-1])
sig.TrustRegularExpression = &trustRegularExpression
case keyExpirationSubpacket:
- // Key expiration time, section 5.2.3.6
+ // Key expiration time, section 5.2.3.13
if len(subpacket) != 4 {
err = errors.StructuralError("key expiration subpacket with bad length")
return
@@ -448,11 +489,11 @@ func parseSignatureSubpacket(sig *Signature, subpacket []byte, isHashed bool) (r
sig.KeyLifetimeSecs = new(uint32)
*sig.KeyLifetimeSecs = binary.BigEndian.Uint32(subpacket)
case prefSymmetricAlgosSubpacket:
- // Preferred symmetric algorithms, section 5.2.3.7
+ // Preferred symmetric algorithms, section 5.2.3.14
sig.PreferredSymmetric = make([]byte, len(subpacket))
copy(sig.PreferredSymmetric, subpacket)
case issuerSubpacket:
- // Issuer, section 5.2.3.5
+ // Issuer, section 5.2.3.12
if sig.Version > 4 && isHashed {
err = errors.StructuralError("issuer subpacket found in v6 key")
return
@@ -466,7 +507,7 @@ func parseSignatureSubpacket(sig *Signature, subpacket []byte, isHashed bool) (r
*sig.IssuerKeyId = binary.BigEndian.Uint64(subpacket)
}
case notationDataSubpacket:
- // Notation data, section 5.2.3.16
+ // Notation data, section 5.2.3.24
if len(subpacket) < 8 {
err = errors.StructuralError("notation data subpacket with bad length")
return
@@ -488,15 +529,27 @@ func parseSignatureSubpacket(sig *Signature, subpacket []byte, isHashed bool) (r
sig.Notations = append(sig.Notations, ¬ation)
case prefHashAlgosSubpacket:
- // Preferred hash algorithms, section 5.2.3.8
+ // Preferred hash algorithms, section 5.2.3.16
sig.PreferredHash = make([]byte, len(subpacket))
copy(sig.PreferredHash, subpacket)
case prefCompressionSubpacket:
- // Preferred compression algorithms, section 5.2.3.9
+ // Preferred compression algorithms, section 5.2.3.17
sig.PreferredCompression = make([]byte, len(subpacket))
copy(sig.PreferredCompression, subpacket)
+ case keyserverPrefsSubpacket:
+ // Keyserver preferences, section 5.2.3.25
+ sig.KeyserverPrefsValid = true
+ if len(subpacket) == 0 {
+ return
+ }
+ if subpacket[0]&KeyserverPrefNoModify != 0 {
+ sig.KeyserverPrefNoModify = true
+ }
+ case prefKeyserverSubpacket:
+ // Preferred keyserver, section 5.2.3.26
+ sig.PreferredKeyserver = string(subpacket)
case primaryUserIdSubpacket:
- // Primary User ID, section 5.2.3.19
+ // Primary User ID, section 5.2.3.27
if len(subpacket) != 1 {
err = errors.StructuralError("primary user id subpacket with bad length")
return
@@ -506,12 +559,11 @@ func parseSignatureSubpacket(sig *Signature, subpacket []byte, isHashed bool) (r
*sig.IsPrimaryId = true
}
case keyFlagsSubpacket:
- // Key flags, section 5.2.3.21
+ // Key flags, section 5.2.3.29
+ sig.FlagsValid = true
if len(subpacket) == 0 {
- err = errors.StructuralError("empty key flags subpacket")
return
}
- sig.FlagsValid = true
if subpacket[0]&KeyFlagCertify != 0 {
sig.FlagCertify = true
}
@@ -537,7 +589,7 @@ func parseSignatureSubpacket(sig *Signature, subpacket []byte, isHashed bool) (r
userId := string(subpacket)
sig.SignerUserId = &userId
case reasonForRevocationSubpacket:
- // Reason For Revocation, section 5.2.3.23
+ // Reason For Revocation, section 5.2.3.31
if len(subpacket) == 0 {
err = errors.StructuralError("empty revocation reason subpacket")
return
@@ -546,7 +598,7 @@ func parseSignatureSubpacket(sig *Signature, subpacket []byte, isHashed bool) (r
*sig.RevocationReason = NewReasonForRevocation(subpacket[0])
sig.RevocationReasonText = string(subpacket[1:])
case featuresSubpacket:
- // Features subpacket, section 5.2.3.24 specifies a very general
+ // Features subpacket, section 5.2.3.32 specifies a very general
// mechanism for OpenPGP implementations to signal support for new
// features.
if len(subpacket) > 0 {
@@ -560,16 +612,13 @@ func parseSignatureSubpacket(sig *Signature, subpacket []byte, isHashed bool) (r
}
case embeddedSignatureSubpacket:
// Only usage is in signatures that cross-certify
- // signing subkeys. section 5.2.3.26 describes the
+ // signing subkeys. section 5.2.3.34 describes the
// format, with its usage described in section 11.1
if sig.EmbeddedSignature != nil {
err = errors.StructuralError("Cannot have multiple embedded signatures")
return
}
sig.EmbeddedSignature = new(Signature)
- // Embedded signatures are required to be v4 signatures see
- // section 12.1. However, we only parse v4 signatures in this
- // file anyway.
if err := sig.EmbeddedSignature.parse(bytes.NewBuffer(subpacket)); err != nil {
return nil, err
}
@@ -577,7 +626,7 @@ func parseSignatureSubpacket(sig *Signature, subpacket []byte, isHashed bool) (r
return nil, errors.StructuralError("cross-signature has unexpected type " + strconv.Itoa(int(sigType)))
}
case policyUriSubpacket:
- // Policy URI, section 5.2.3.20
+ // Policy URI, section 5.2.3.28
sig.PolicyURI = string(subpacket)
case issuerFingerprintSubpacket:
if len(subpacket) == 0 {
@@ -597,8 +646,7 @@ func parseSignatureSubpacket(sig *Signature, subpacket []byte, isHashed bool) (r
*sig.IssuerKeyId = binary.BigEndian.Uint64(subpacket[13:21])
}
case intendedRecipientSubpacket:
- // Intended Recipient Fingerprint
- // https://datatracker.ietf.org/doc/html/draft-ietf-openpgp-crypto-refresh#name-intended-recipient-fingerpr
+ // Intended Recipient Fingerprint, section 5.2.3.36
if len(subpacket) < 1 {
return nil, errors.StructuralError("invalid intended recipient fingerpring length")
}
@@ -610,8 +658,7 @@ func parseSignatureSubpacket(sig *Signature, subpacket []byte, isHashed bool) (r
copy(fingerprint, subpacket[1:])
sig.IntendedRecipients = append(sig.IntendedRecipients, &Recipient{int(version), fingerprint})
case prefCipherSuitesSubpacket:
- // Preferred AEAD cipher suites
- // See https://www.ietf.org/archive/id/draft-ietf-openpgp-crypto-refresh-07.html#name-preferred-aead-ciphersuites
+ // Preferred AEAD cipher suites, section 5.2.3.15
if len(subpacket)%2 != 0 {
err = errors.StructuralError("invalid aead cipher suite length")
return
@@ -662,7 +709,7 @@ func (sig *Signature) CheckKeyIdOrFingerprintExplicit(fingerprint []byte, keyId
// serializeSubpacketLength marshals the given length into to.
func serializeSubpacketLength(to []byte, length int) int {
- // RFC 4880, Section 4.2.2.
+ // RFC 9580, Section 4.2.1.
if length < 192 {
to[0] = byte(length)
return 1
@@ -805,7 +852,7 @@ func (sig *Signature) signPrepareHash(h hash.Hash) (digest []byte, err error) {
// The created hash object initially hashes a randomly generated salt
// as required by v6 signatures. The generated salt is stored in sig. If the signature is not v6,
// the method returns an empty hash object.
-// See RFC the crypto refresh Section 3.2.4.
+// See RFC 9580 Section 5.2.4.
func (sig *Signature) PrepareSign(config *Config) (hash.Hash, error) {
if !sig.Hash.Available() {
return nil, errors.UnsupportedError("hash function")
@@ -829,7 +876,7 @@ func (sig *Signature) PrepareSign(config *Config) (hash.Hash, error) {
// If the signature is not v6, the method ignores the salt.
// Use PrepareSign whenever possible instead of generating and
// hashing the salt externally.
-// See RFC the crypto refresh Section 3.2.4.
+// See RFC 9580 Section 5.2.4.
func (sig *Signature) SetSalt(salt []byte) error {
if sig.Version == 6 {
expectedSaltLength, err := SaltLengthForHash(sig.Hash)
@@ -847,7 +894,7 @@ func (sig *Signature) SetSalt(salt []byte) error {
// PrepareVerify must be called to create a hash object before verifying v6 signatures.
// The created hash object initially hashes the internally stored salt.
// If the signature is not v6, the method returns an empty hash object.
-// See crypto refresh Section 3.2.4.
+// See RFC 9580 Section 5.2.4.
func (sig *Signature) PrepareVerify() (hash.Hash, error) {
if !sig.Hash.Available() {
return nil, errors.UnsupportedError("hash function")
@@ -872,6 +919,20 @@ func (sig *Signature) Sign(h hash.Hash, priv *PrivateKey, config *Config) (err e
}
sig.Version = priv.PublicKey.Version
sig.IssuerFingerprint = priv.PublicKey.Fingerprint
+ if sig.Version < 6 && config.RandomizeSignaturesViaNotation() {
+ sig.removeNotationsWithName(SaltNotationName)
+ salt, err := SignatureSaltForHash(sig.Hash, config.Random())
+ if err != nil {
+ return err
+ }
+ notation := Notation{
+ Name: SaltNotationName,
+ Value: salt,
+ IsCritical: false,
+ IsHumanReadable: false,
+ }
+ sig.Notations = append(sig.Notations, ¬ation)
+ }
sig.outSubpackets, err = sig.buildSubpackets(priv.PublicKey)
if err != nil {
return err
@@ -901,8 +962,16 @@ func (sig *Signature) Sign(h hash.Hash, priv *PrivateKey, config *Config) (err e
sig.DSASigS = new(encoding.MPI).SetBig(s)
}
case PubKeyAlgoECDSA:
- sk := priv.PrivateKey.(*ecdsa.PrivateKey)
- r, s, err := ecdsa.Sign(config.Random(), sk, digest)
+ var r, s *big.Int
+ if sk, ok := priv.PrivateKey.(*ecdsa.PrivateKey); ok {
+ r, s, err = ecdsa.Sign(config.Random(), sk, digest)
+ } else {
+ var b []byte
+ b, err = priv.PrivateKey.(crypto.Signer).Sign(config.Random(), digest, sig.Hash)
+ if err == nil {
+ r, s, err = unwrapECDSASig(b)
+ }
+ }
if err == nil {
sig.ECDSASigR = new(encoding.MPI).SetBig(r)
@@ -934,6 +1003,18 @@ func (sig *Signature) Sign(h hash.Hash, priv *PrivateKey, config *Config) (err e
return
}
+// unwrapECDSASig parses the two integer components of an ASN.1-encoded ECDSA signature.
+func unwrapECDSASig(b []byte) (r, s *big.Int, err error) {
+ var ecsdaSig struct {
+ R, S *big.Int
+ }
+ _, err = asn1.Unmarshal(b, &ecsdaSig)
+ if err != nil {
+ return
+ }
+ return ecsdaSig.R, ecsdaSig.S, nil
+}
+
// SignUserId computes a signature from priv, asserting that pub is a valid
// key for the identity id. On success, the signature is stored in sig. Call
// Serialize to write it out.
@@ -1176,28 +1257,83 @@ type outputSubpacket struct {
func (sig *Signature) buildSubpackets(issuer PublicKey) (subpackets []outputSubpacket, err error) {
creationTime := make([]byte, 4)
binary.BigEndian.PutUint32(creationTime, uint32(sig.CreationTime.Unix()))
- subpackets = append(subpackets, outputSubpacket{true, creationTimeSubpacket, false, creationTime})
-
+ // Signature Creation Time
+ subpackets = append(subpackets, outputSubpacket{true, creationTimeSubpacket, true, creationTime})
+ // Signature Expiration Time
+ if sig.SigLifetimeSecs != nil && *sig.SigLifetimeSecs != 0 {
+ sigLifetime := make([]byte, 4)
+ binary.BigEndian.PutUint32(sigLifetime, *sig.SigLifetimeSecs)
+ subpackets = append(subpackets, outputSubpacket{true, signatureExpirationSubpacket, true, sigLifetime})
+ }
+ // Trust Signature
+ if sig.TrustLevel != 0 {
+ subpackets = append(subpackets, outputSubpacket{true, trustSubpacket, true, []byte{byte(sig.TrustLevel), byte(sig.TrustAmount)}})
+ }
+ // Regular Expression
+ if sig.TrustRegularExpression != nil {
+ // RFC specifies the string should be null-terminated; add a null byte to the end
+ subpackets = append(subpackets, outputSubpacket{true, regularExpressionSubpacket, true, []byte(*sig.TrustRegularExpression + "\000")})
+ }
+ // Key Expiration Time
+ if sig.KeyLifetimeSecs != nil && *sig.KeyLifetimeSecs != 0 {
+ keyLifetime := make([]byte, 4)
+ binary.BigEndian.PutUint32(keyLifetime, *sig.KeyLifetimeSecs)
+ subpackets = append(subpackets, outputSubpacket{true, keyExpirationSubpacket, true, keyLifetime})
+ }
+ // Preferred Symmetric Ciphers for v1 SEIPD
+ if len(sig.PreferredSymmetric) > 0 {
+ subpackets = append(subpackets, outputSubpacket{true, prefSymmetricAlgosSubpacket, false, sig.PreferredSymmetric})
+ }
+ // Issuer Key ID
if sig.IssuerKeyId != nil && sig.Version == 4 {
keyId := make([]byte, 8)
binary.BigEndian.PutUint64(keyId, *sig.IssuerKeyId)
+ // Note: making this critical breaks RPM <=4.16.
+ // See: https://github.com/ProtonMail/go-crypto/issues/263
subpackets = append(subpackets, outputSubpacket{true, issuerSubpacket, false, keyId})
}
- if sig.IssuerFingerprint != nil {
- contents := append([]uint8{uint8(issuer.Version)}, sig.IssuerFingerprint...)
- subpackets = append(subpackets, outputSubpacket{true, issuerFingerprintSubpacket, sig.Version >= 5, contents})
+ // Notation Data
+ for _, notation := range sig.Notations {
+ subpackets = append(
+ subpackets,
+ outputSubpacket{
+ true,
+ notationDataSubpacket,
+ notation.IsCritical,
+ notation.getData(),
+ })
}
- if sig.SignerUserId != nil {
- subpackets = append(subpackets, outputSubpacket{true, signerUserIdSubpacket, false, []byte(*sig.SignerUserId)})
+ // Preferred Hash Algorithms
+ if len(sig.PreferredHash) > 0 {
+ subpackets = append(subpackets, outputSubpacket{true, prefHashAlgosSubpacket, false, sig.PreferredHash})
}
- if sig.SigLifetimeSecs != nil && *sig.SigLifetimeSecs != 0 {
- sigLifetime := make([]byte, 4)
- binary.BigEndian.PutUint32(sigLifetime, *sig.SigLifetimeSecs)
- subpackets = append(subpackets, outputSubpacket{true, signatureExpirationSubpacket, true, sigLifetime})
+ // Preferred Compression Algorithms
+ if len(sig.PreferredCompression) > 0 {
+ subpackets = append(subpackets, outputSubpacket{true, prefCompressionSubpacket, false, sig.PreferredCompression})
}
-
+ // Keyserver Preferences
+ // Keyserver preferences may only appear in self-signatures or certification signatures.
+ if sig.KeyserverPrefsValid {
+ var prefs byte
+ if sig.KeyserverPrefNoModify {
+ prefs |= KeyserverPrefNoModify
+ }
+ subpackets = append(subpackets, outputSubpacket{true, keyserverPrefsSubpacket, false, []byte{prefs}})
+ }
+ // Preferred Keyserver
+ if len(sig.PreferredKeyserver) > 0 {
+ subpackets = append(subpackets, outputSubpacket{true, prefKeyserverSubpacket, false, []uint8(sig.PreferredKeyserver)})
+ }
+ // Primary User ID
+ if sig.IsPrimaryId != nil && *sig.IsPrimaryId {
+ subpackets = append(subpackets, outputSubpacket{true, primaryUserIdSubpacket, false, []byte{1}})
+ }
+ // Policy URI
+ if len(sig.PolicyURI) > 0 {
+ subpackets = append(subpackets, outputSubpacket{true, policyUriSubpacket, false, []uint8(sig.PolicyURI)})
+ }
+ // Key Flags
// Key flags may only appear in self-signatures or certification signatures.
-
if sig.FlagsValid {
var flags byte
if sig.FlagCertify {
@@ -1221,33 +1357,19 @@ func (sig *Signature) buildSubpackets(issuer PublicKey) (subpackets []outputSubp
if sig.FlagGroupKey {
flags |= KeyFlagGroupKey
}
- subpackets = append(subpackets, outputSubpacket{true, keyFlagsSubpacket, false, []byte{flags}})
+ subpackets = append(subpackets, outputSubpacket{true, keyFlagsSubpacket, true, []byte{flags}})
}
-
- for _, notation := range sig.Notations {
- subpackets = append(
- subpackets,
- outputSubpacket{
- true,
- notationDataSubpacket,
- notation.IsCritical,
- notation.getData(),
- })
+ // Signer's User ID
+ if sig.SignerUserId != nil {
+ subpackets = append(subpackets, outputSubpacket{true, signerUserIdSubpacket, false, []byte(*sig.SignerUserId)})
}
-
- for _, recipient := range sig.IntendedRecipients {
- subpackets = append(
- subpackets,
- outputSubpacket{
- true,
- intendedRecipientSubpacket,
- false,
- recipient.Serialize(),
- })
+ // Reason for Revocation
+ // Revocation reason appears only in revocation signatures and is serialized as per section 5.2.3.31.
+ if sig.RevocationReason != nil {
+ subpackets = append(subpackets, outputSubpacket{true, reasonForRevocationSubpacket, true,
+ append([]uint8{uint8(*sig.RevocationReason)}, []uint8(sig.RevocationReasonText)...)})
}
-
- // The following subpackets may only appear in self-signatures.
-
+ // Features
var features = byte(0x00)
if sig.SEIPDv1 {
features |= 0x01
@@ -1255,46 +1377,36 @@ func (sig *Signature) buildSubpackets(issuer PublicKey) (subpackets []outputSubp
if sig.SEIPDv2 {
features |= 0x08
}
-
if features != 0x00 {
subpackets = append(subpackets, outputSubpacket{true, featuresSubpacket, false, []byte{features}})
}
-
- if sig.TrustLevel != 0 {
- subpackets = append(subpackets, outputSubpacket{true, trustSubpacket, true, []byte{byte(sig.TrustLevel), byte(sig.TrustAmount)}})
- }
-
- if sig.TrustRegularExpression != nil {
- // RFC specifies the string should be null-terminated; add a null byte to the end
- subpackets = append(subpackets, outputSubpacket{true, regularExpressionSubpacket, true, []byte(*sig.TrustRegularExpression + "\000")})
- }
-
- if sig.KeyLifetimeSecs != nil && *sig.KeyLifetimeSecs != 0 {
- keyLifetime := make([]byte, 4)
- binary.BigEndian.PutUint32(keyLifetime, *sig.KeyLifetimeSecs)
- subpackets = append(subpackets, outputSubpacket{true, keyExpirationSubpacket, true, keyLifetime})
- }
-
- if sig.IsPrimaryId != nil && *sig.IsPrimaryId {
- subpackets = append(subpackets, outputSubpacket{true, primaryUserIdSubpacket, false, []byte{1}})
- }
-
- if len(sig.PreferredSymmetric) > 0 {
- subpackets = append(subpackets, outputSubpacket{true, prefSymmetricAlgosSubpacket, false, sig.PreferredSymmetric})
- }
-
- if len(sig.PreferredHash) > 0 {
- subpackets = append(subpackets, outputSubpacket{true, prefHashAlgosSubpacket, false, sig.PreferredHash})
+ // Embedded Signature
+ // EmbeddedSignature appears only in subkeys capable of signing and is serialized as per section 5.2.3.34.
+ if sig.EmbeddedSignature != nil {
+ var buf bytes.Buffer
+ err = sig.EmbeddedSignature.serializeBody(&buf)
+ if err != nil {
+ return
+ }
+ subpackets = append(subpackets, outputSubpacket{true, embeddedSignatureSubpacket, true, buf.Bytes()})
}
-
- if len(sig.PreferredCompression) > 0 {
- subpackets = append(subpackets, outputSubpacket{true, prefCompressionSubpacket, false, sig.PreferredCompression})
+ // Issuer Fingerprint
+ if sig.IssuerFingerprint != nil {
+ contents := append([]uint8{uint8(issuer.Version)}, sig.IssuerFingerprint...)
+ subpackets = append(subpackets, outputSubpacket{true, issuerFingerprintSubpacket, sig.Version >= 5, contents})
}
-
- if len(sig.PolicyURI) > 0 {
- subpackets = append(subpackets, outputSubpacket{true, policyUriSubpacket, false, []uint8(sig.PolicyURI)})
+ // Intended Recipient Fingerprint
+ for _, recipient := range sig.IntendedRecipients {
+ subpackets = append(
+ subpackets,
+ outputSubpacket{
+ true,
+ intendedRecipientSubpacket,
+ false,
+ recipient.Serialize(),
+ })
}
-
+ // Preferred AEAD Ciphersuites
if len(sig.PreferredCipherSuites) > 0 {
serialized := make([]byte, len(sig.PreferredCipherSuites)*2)
for i, cipherSuite := range sig.PreferredCipherSuites {
@@ -1303,23 +1415,6 @@ func (sig *Signature) buildSubpackets(issuer PublicKey) (subpackets []outputSubp
}
subpackets = append(subpackets, outputSubpacket{true, prefCipherSuitesSubpacket, false, serialized})
}
-
- // Revocation reason appears only in revocation signatures and is serialized as per section 5.2.3.23.
- if sig.RevocationReason != nil {
- subpackets = append(subpackets, outputSubpacket{true, reasonForRevocationSubpacket, true,
- append([]uint8{uint8(*sig.RevocationReason)}, []uint8(sig.RevocationReasonText)...)})
- }
-
- // EmbeddedSignature appears only in subkeys capable of signing and is serialized as per section 5.2.3.26.
- if sig.EmbeddedSignature != nil {
- var buf bytes.Buffer
- err = sig.EmbeddedSignature.serializeBody(&buf)
- if err != nil {
- return
- }
- subpackets = append(subpackets, outputSubpacket{true, embeddedSignatureSubpacket, true, buf.Bytes()})
- }
-
return
}
@@ -1371,7 +1466,7 @@ func (sig *Signature) AddMetadataToHashSuffix() {
// SaltLengthForHash selects the required salt length for the given hash algorithm,
// as per Table 23 (Hash algorithm registry) of the crypto refresh.
-// See https://datatracker.ietf.org/doc/html/draft-ietf-openpgp-crypto-refresh#section-9.5|Crypto Refresh Section 9.5.
+// See RFC 9580 Section 9.5.
func SaltLengthForHash(hash crypto.Hash) (int, error) {
switch hash {
case crypto.SHA256, crypto.SHA224, crypto.SHA3_256:
@@ -1387,7 +1482,7 @@ func SaltLengthForHash(hash crypto.Hash) (int, error) {
// SignatureSaltForHash generates a random signature salt
// with the length for the given hash algorithm.
-// See https://datatracker.ietf.org/doc/html/draft-ietf-openpgp-crypto-refresh#section-9.5|Crypto Refresh Section 9.5.
+// See RFC 9580 Section 9.5.
func SignatureSaltForHash(hash crypto.Hash, randReader io.Reader) ([]byte, error) {
saltLength, err := SaltLengthForHash(hash)
if err != nil {
@@ -1400,3 +1495,17 @@ func SignatureSaltForHash(hash crypto.Hash, randReader io.Reader) ([]byte, error
}
return salt, nil
}
+
+// removeNotationsWithName removes all notations in this signature with the given name.
+func (sig *Signature) removeNotationsWithName(name string) {
+ if sig == nil || sig.Notations == nil {
+ return
+ }
+ updatedNotations := make([]*Notation, 0, len(sig.Notations))
+ for _, notation := range sig.Notations {
+ if notation.Name != name {
+ updatedNotations = append(updatedNotations, notation)
+ }
+ }
+ sig.Notations = updatedNotations
+}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/symmetric_key_encrypted.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/symmetric_key_encrypted.go
index c97b98b930..2812a1db88 100644
--- a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/symmetric_key_encrypted.go
+++ b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/symmetric_key_encrypted.go
@@ -45,6 +45,10 @@ func (ske *SymmetricKeyEncrypted) parse(r io.Reader) error {
return errors.UnsupportedError("unknown SymmetricKeyEncrypted version")
}
+ if V5Disabled && ske.Version == 5 {
+ return errors.UnsupportedError("support for parsing v5 entities is disabled; build with `-tags v5` if needed")
+ }
+
if ske.Version > 5 {
// Scalar octet count
if _, err := readFull(r, buf[:]); err != nil {
@@ -191,9 +195,21 @@ func SerializeSymmetricKeyEncrypted(w io.Writer, passphrase []byte, config *Conf
// the given passphrase. The returned session key must be passed to
// SerializeSymmetricallyEncrypted.
// If config is nil, sensible defaults will be used.
+// Deprecated: Use SerializeSymmetricKeyEncryptedAEADReuseKey instead.
func SerializeSymmetricKeyEncryptedReuseKey(w io.Writer, sessionKey []byte, passphrase []byte, config *Config) (err error) {
+ return SerializeSymmetricKeyEncryptedAEADReuseKey(w, sessionKey, passphrase, config.AEAD() != nil, config)
+}
+
+// SerializeSymmetricKeyEncryptedAEADReuseKey serializes a symmetric key packet to w.
+// The packet contains the given session key, encrypted by a key derived from
+// the given passphrase. The returned session key must be passed to
+// SerializeSymmetricallyEncrypted.
+// If aeadSupported is set, SKESK v6 is used, otherwise v4.
+// Note: aeadSupported MUST match the value passed to SerializeSymmetricallyEncrypted.
+// If config is nil, sensible defaults will be used.
+func SerializeSymmetricKeyEncryptedAEADReuseKey(w io.Writer, sessionKey []byte, passphrase []byte, aeadSupported bool, config *Config) (err error) {
var version int
- if config.AEAD() != nil {
+ if aeadSupported {
version = 6
} else {
version = 4
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/symmetrically_encrypted.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/symmetrically_encrypted.go
index e9bbf0327e..0e898742cf 100644
--- a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/symmetrically_encrypted.go
+++ b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/symmetrically_encrypted.go
@@ -74,6 +74,10 @@ func (se *SymmetricallyEncrypted) Decrypt(c CipherFunction, key []byte) (io.Read
// SerializeSymmetricallyEncrypted serializes a symmetrically encrypted packet
// to w and returns a WriteCloser to which the to-be-encrypted packets can be
// written.
+// If aeadSupported is set to true, SEIPDv2 is used with the indicated CipherSuite.
+// Otherwise, SEIPDv1 is used with the indicated CipherFunction.
+// Note: aeadSupported MUST match the value passed to SerializeEncryptedKeyAEAD
+// and/or SerializeSymmetricKeyEncryptedAEADReuseKey.
// If config is nil, sensible defaults will be used.
func SerializeSymmetricallyEncrypted(w io.Writer, c CipherFunction, aeadSupported bool, cipherSuite CipherSuite, key []byte, config *Config) (Contents io.WriteCloser, err error) {
writeCloser := noOpCloser{w}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/symmetrically_encrypted_aead.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/symmetrically_encrypted_aead.go
index a8ef0bbbec..3ddc4fe4a9 100644
--- a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/symmetrically_encrypted_aead.go
+++ b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/symmetrically_encrypted_aead.go
@@ -7,7 +7,9 @@ package packet
import (
"crypto/cipher"
"crypto/sha256"
+ "fmt"
"io"
+ "strconv"
"github.com/ProtonMail/go-crypto/openpgp/errors"
"golang.org/x/crypto/hkdf"
@@ -25,19 +27,19 @@ func (se *SymmetricallyEncrypted) parseAead(r io.Reader) error {
se.Cipher = CipherFunction(headerData[0])
// cipherFunc must have block size 16 to use AEAD
if se.Cipher.blockSize() != 16 {
- return errors.UnsupportedError("invalid aead cipher: " + string(se.Cipher))
+ return errors.UnsupportedError("invalid aead cipher: " + strconv.Itoa(int(se.Cipher)))
}
// Mode
se.Mode = AEADMode(headerData[1])
if se.Mode.TagLength() == 0 {
- return errors.UnsupportedError("unknown aead mode: " + string(se.Mode))
+ return errors.UnsupportedError("unknown aead mode: " + strconv.Itoa(int(se.Mode)))
}
// Chunk size
se.ChunkSizeByte = headerData[2]
if se.ChunkSizeByte > 16 {
- return errors.UnsupportedError("invalid aead chunk size byte: " + string(se.ChunkSizeByte))
+ return errors.UnsupportedError("invalid aead chunk size byte: " + strconv.Itoa(int(se.ChunkSizeByte)))
}
// Salt
@@ -62,11 +64,16 @@ func (se *SymmetricallyEncrypted) associatedData() []byte {
// decryptAead decrypts a V2 SEIPD packet (AEAD) as specified in
// https://www.ietf.org/archive/id/draft-ietf-openpgp-crypto-refresh-07.html#section-5.13.2
func (se *SymmetricallyEncrypted) decryptAead(inputKey []byte) (io.ReadCloser, error) {
- aead, nonce := getSymmetricallyEncryptedAeadInstance(se.Cipher, se.Mode, inputKey, se.Salt[:], se.associatedData())
+ if se.Cipher.KeySize() != len(inputKey) {
+ return nil, errors.StructuralError(fmt.Sprintf("invalid session key length for cipher: got %d bytes, but expected %d bytes", len(inputKey), se.Cipher.KeySize()))
+ }
+ aead, nonce := getSymmetricallyEncryptedAeadInstance(se.Cipher, se.Mode, inputKey, se.Salt[:], se.associatedData())
// Carry the first tagLen bytes
+ chunkSize := decodeAEADChunkSize(se.ChunkSizeByte)
tagLen := se.Mode.TagLength()
- peekedBytes := make([]byte, tagLen)
+ chunkBytes := make([]byte, chunkSize+tagLen*2)
+ peekedBytes := chunkBytes[chunkSize+tagLen:]
n, err := io.ReadFull(se.Contents, peekedBytes)
if n < tagLen || (err != nil && err != io.EOF) {
return nil, errors.StructuralError("not enough data to decrypt:" + err.Error())
@@ -76,12 +83,13 @@ func (se *SymmetricallyEncrypted) decryptAead(inputKey []byte) (io.ReadCloser, e
aeadCrypter: aeadCrypter{
aead: aead,
chunkSize: decodeAEADChunkSize(se.ChunkSizeByte),
- initialNonce: nonce,
+ nonce: nonce,
associatedData: se.associatedData(),
- chunkIndex: make([]byte, 8),
+ chunkIndex: nonce[len(nonce)-8:],
packetTag: packetTypeSymmetricallyEncryptedIntegrityProtected,
},
reader: se.Contents,
+ chunkBytes: chunkBytes,
peekedBytes: peekedBytes,
}, nil
}
@@ -125,16 +133,20 @@ func serializeSymmetricallyEncryptedAead(ciphertext io.WriteCloser, cipherSuite
aead, nonce := getSymmetricallyEncryptedAeadInstance(cipherSuite.Cipher, cipherSuite.Mode, inputKey, salt, prefix)
+ chunkSize := decodeAEADChunkSize(chunkSizeByte)
+ tagLen := aead.Overhead()
+ chunkBytes := make([]byte, chunkSize+tagLen)
return &aeadEncrypter{
aeadCrypter: aeadCrypter{
aead: aead,
- chunkSize: decodeAEADChunkSize(chunkSizeByte),
+ chunkSize: chunkSize,
associatedData: prefix,
- chunkIndex: make([]byte, 8),
- initialNonce: nonce,
+ nonce: nonce,
+ chunkIndex: nonce[len(nonce)-8:],
packetTag: packetTypeSymmetricallyEncryptedIntegrityProtected,
},
- writer: ciphertext,
+ writer: ciphertext,
+ chunkBytes: chunkBytes,
}, nil
}
@@ -144,10 +156,10 @@ func getSymmetricallyEncryptedAeadInstance(c CipherFunction, mode AEADMode, inpu
encryptionKey := make([]byte, c.KeySize())
_, _ = readFull(hkdfReader, encryptionKey)
- // Last 64 bits of nonce are the counter
- nonce = make([]byte, mode.IvLength()-8)
+ nonce = make([]byte, mode.IvLength())
- _, _ = readFull(hkdfReader, nonce)
+ // Last 64 bits of nonce are the counter
+ _, _ = readFull(hkdfReader, nonce[:len(nonce)-8])
blockCipher := c.new(encryptionKey)
aead = mode.new(blockCipher)
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/symmetrically_encrypted_mdc.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/symmetrically_encrypted_mdc.go
index 645963fa78..8b18623684 100644
--- a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/symmetrically_encrypted_mdc.go
+++ b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/symmetrically_encrypted_mdc.go
@@ -148,7 +148,7 @@ const mdcPacketTagByte = byte(0x80) | 0x40 | 19
func (ser *seMDCReader) Close() error {
if ser.error {
- return errors.ErrMDCMissing
+ return errors.ErrMDCHashMismatch
}
for !ser.eof {
@@ -159,7 +159,7 @@ func (ser *seMDCReader) Close() error {
break
}
if err != nil {
- return errors.ErrMDCMissing
+ return errors.ErrMDCHashMismatch
}
}
@@ -172,7 +172,7 @@ func (ser *seMDCReader) Close() error {
// The hash already includes the MDC header, but we still check its value
// to confirm encryption correctness
if ser.trailer[0] != mdcPacketTagByte || ser.trailer[1] != sha1.Size {
- return errors.ErrMDCMissing
+ return errors.ErrMDCHashMismatch
}
return nil
}
@@ -241,9 +241,6 @@ func serializeSymmetricallyEncryptedMdc(ciphertext io.WriteCloser, c CipherFunct
if err != nil {
return nil, err
}
- if err != nil {
- return
- }
s, prefix := NewOCFBEncrypter(block, iv, OCFBNoResync)
_, err = ciphertext.Write(prefix)
if err != nil {
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/read.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/read.go
index 408506592f..e6dd9b5fd3 100644
--- a/vendor/github.com/ProtonMail/go-crypto/openpgp/read.go
+++ b/vendor/github.com/ProtonMail/go-crypto/openpgp/read.go
@@ -233,7 +233,7 @@ FindKey:
}
mdFinal, sensitiveParsingErr := readSignedMessage(packets, md, keyring, config)
if sensitiveParsingErr != nil {
- return nil, errors.StructuralError("parsing error")
+ return nil, errors.HandleSensitiveParsingError(sensitiveParsingErr, md.decrypted != nil)
}
return mdFinal, nil
}
@@ -368,7 +368,7 @@ func (cr *checkReader) Read(buf []byte) (int, error) {
}
if sensitiveParsingError != nil {
- return n, errors.StructuralError("parsing error")
+ return n, errors.HandleSensitiveParsingError(sensitiveParsingError, true)
}
return n, nil
@@ -392,6 +392,7 @@ func (scr *signatureCheckReader) Read(buf []byte) (int, error) {
scr.wrappedHash.Write(buf[:n])
}
+ readsDecryptedData := scr.md.decrypted != nil
if sensitiveParsingError == io.EOF {
var p packet.Packet
var readError error
@@ -410,7 +411,7 @@ func (scr *signatureCheckReader) Read(buf []byte) (int, error) {
key := scr.md.SignedBy
signatureError := key.PublicKey.VerifySignature(scr.h, sig)
if signatureError == nil {
- signatureError = checkSignatureDetails(key, sig, scr.config)
+ signatureError = checkMessageSignatureDetails(key, sig, scr.config)
}
scr.md.Signature = sig
scr.md.SignatureError = signatureError
@@ -434,16 +435,15 @@ func (scr *signatureCheckReader) Read(buf []byte) (int, error) {
// unsigned hash of its own. In order to check this we need to
// close that Reader.
if scr.md.decrypted != nil {
- mdcErr := scr.md.decrypted.Close()
- if mdcErr != nil {
- return n, mdcErr
+ if sensitiveParsingError := scr.md.decrypted.Close(); sensitiveParsingError != nil {
+ return n, errors.HandleSensitiveParsingError(sensitiveParsingError, true)
}
}
return n, io.EOF
}
if sensitiveParsingError != nil {
- return n, errors.StructuralError("parsing error")
+ return n, errors.HandleSensitiveParsingError(sensitiveParsingError, readsDecryptedData)
}
return n, nil
@@ -546,7 +546,7 @@ func verifyDetachedSignature(keyring KeyRing, signed, signature io.Reader, expec
for _, key := range keys {
err = key.PublicKey.VerifySignature(h, sig)
if err == nil {
- return sig, key.Entity, checkSignatureDetails(&key, sig, config)
+ return sig, key.Entity, checkMessageSignatureDetails(&key, sig, config)
}
}
@@ -564,7 +564,7 @@ func CheckArmoredDetachedSignature(keyring KeyRing, signed, signature io.Reader,
return CheckDetachedSignature(keyring, signed, body, config)
}
-// checkSignatureDetails returns an error if:
+// checkMessageSignatureDetails returns an error if:
// - The signature (or one of the binding signatures mentioned below)
// has a unknown critical notation data subpacket
// - The primary key of the signing entity is revoked
@@ -582,7 +582,7 @@ func CheckArmoredDetachedSignature(keyring KeyRing, signed, signature io.Reader,
// NOTE: The order of these checks is important, as the caller may choose to
// ignore ErrSignatureExpired or ErrKeyExpired errors, but should never
// ignore any other errors.
-func checkSignatureDetails(key *Key, signature *packet.Signature, config *packet.Config) error {
+func checkMessageSignatureDetails(key *Key, signature *packet.Signature, config *packet.Config) error {
now := config.Now()
primarySelfSignature, primaryIdentity := key.Entity.PrimarySelfSignature()
signedBySubKey := key.PublicKey != key.Entity.PrimaryKey
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/s2k/s2k.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/s2k/s2k.go
index f4f5c7832d..6871b84fc9 100644
--- a/vendor/github.com/ProtonMail/go-crypto/openpgp/s2k/s2k.go
+++ b/vendor/github.com/ProtonMail/go-crypto/openpgp/s2k/s2k.go
@@ -199,8 +199,8 @@ func Generate(rand io.Reader, c *Config) (*Params, error) {
}
params = &Params{
- mode: SaltedS2K,
- hashId: hashId,
+ mode: SaltedS2K,
+ hashId: hashId,
}
} else { // Enforce IteratedSaltedS2K method otherwise
hashId, ok := algorithm.HashToHashId(c.hash())
@@ -283,6 +283,9 @@ func ParseIntoParams(r io.Reader) (params *Params, err error) {
params.passes = buf[Argon2SaltSize]
params.parallelism = buf[Argon2SaltSize+1]
params.memoryExp = buf[Argon2SaltSize+2]
+ if err := validateArgon2Params(params); err != nil {
+ return nil, err
+ }
return params, nil
case GnuS2K:
// This is a GNU extension. See
@@ -300,6 +303,10 @@ func ParseIntoParams(r io.Reader) (params *Params, err error) {
return nil, errors.UnsupportedError("S2K function")
}
+func (params *Params) Mode() Mode {
+ return params.mode
+}
+
func (params *Params) Dummy() bool {
return params != nil && params.mode == GnuS2K
}
@@ -408,3 +415,22 @@ func Serialize(w io.Writer, key []byte, rand io.Reader, passphrase []byte, c *Co
f(key, passphrase)
return nil
}
+
+// validateArgon2Params checks that the argon2 parameters are valid according to RFC9580.
+func validateArgon2Params(params *Params) error {
+ // The number of passes t and the degree of parallelism p MUST be non-zero.
+ if params.parallelism == 0 {
+ return errors.StructuralError("invalid argon2 params: parallelism is 0")
+ }
+ if params.passes == 0 {
+ return errors.StructuralError("invalid argon2 params: iterations is 0")
+ }
+
+ // The encoded memory size MUST be a value from 3+ceil(log2(p)) to 31,
+ // such that the decoded memory size m is a value from 8*p to 2^31.
+ if params.memoryExp > 31 || decodeMemory(params.memoryExp) < 8*uint32(params.parallelism) {
+ return errors.StructuralError("invalid argon2 params: memory is out of bounds")
+ }
+
+ return nil
+}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/write.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/write.go
index 0db5526ce0..b0f6ef7b09 100644
--- a/vendor/github.com/ProtonMail/go-crypto/openpgp/write.go
+++ b/vendor/github.com/ProtonMail/go-crypto/openpgp/write.go
@@ -444,7 +444,13 @@ func encrypt(keyWriter io.Writer, dataWriter io.Writer, to []*Entity, signed *En
}
}
- symKey := make([]byte, cipher.KeySize())
+ var symKey []byte
+ if aeadSupported {
+ symKey = make([]byte, aeadCipherSuite.Cipher.KeySize())
+ } else {
+ symKey = make([]byte, cipher.KeySize())
+ }
+
if _, err := io.ReadFull(config.Random(), symKey); err != nil {
return nil, err
}
diff --git a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/dax.xml b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/dax.xml
index 1a3ffbc89f..2bb3a1aa7f 100644
--- a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/dax.xml
+++ b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/dax.xml
@@ -11,8 +11,8 @@
-
-
+
+
diff --git a/vendor/github.com/cloudflare/circl/dh/x25519/curve_amd64.s b/vendor/github.com/cloudflare/circl/dh/x25519/curve_amd64.s
index b7723185b6..ce9f062894 100644
--- a/vendor/github.com/cloudflare/circl/dh/x25519/curve_amd64.s
+++ b/vendor/github.com/cloudflare/circl/dh/x25519/curve_amd64.s
@@ -1,4 +1,5 @@
-// +build amd64
+//go:build amd64 && !purego
+// +build amd64,!purego
#include "textflag.h"
diff --git a/vendor/github.com/cloudflare/circl/dh/x448/curve_amd64.s b/vendor/github.com/cloudflare/circl/dh/x448/curve_amd64.s
index 810aa9e648..ed33ba3d03 100644
--- a/vendor/github.com/cloudflare/circl/dh/x448/curve_amd64.s
+++ b/vendor/github.com/cloudflare/circl/dh/x448/curve_amd64.s
@@ -1,4 +1,5 @@
-// +build amd64
+//go:build amd64 && !purego
+// +build amd64,!purego
#include "textflag.h"
diff --git a/vendor/github.com/cloudflare/circl/ecc/goldilocks/curve.go b/vendor/github.com/cloudflare/circl/ecc/goldilocks/curve.go
index 5a939100d2..1f165141a9 100644
--- a/vendor/github.com/cloudflare/circl/ecc/goldilocks/curve.go
+++ b/vendor/github.com/cloudflare/circl/ecc/goldilocks/curve.go
@@ -18,6 +18,9 @@ func (Curve) Identity() *Point {
func (Curve) IsOnCurve(P *Point) bool {
x2, y2, t, t2, z2 := &fp.Elt{}, &fp.Elt{}, &fp.Elt{}, &fp.Elt{}, &fp.Elt{}
rhs, lhs := &fp.Elt{}, &fp.Elt{}
+ // Check z != 0
+ eq0 := !fp.IsZero(&P.z)
+
fp.Mul(t, &P.ta, &P.tb) // t = ta*tb
fp.Sqr(x2, &P.x) // x^2
fp.Sqr(y2, &P.y) // y^2
@@ -27,13 +30,14 @@ func (Curve) IsOnCurve(P *Point) bool {
fp.Mul(rhs, t2, ¶mD) // dt^2
fp.Add(rhs, rhs, z2) // z^2 + dt^2
fp.Sub(lhs, lhs, rhs) // x^2 + y^2 - (z^2 + dt^2)
- eq0 := fp.IsZero(lhs)
+ eq1 := fp.IsZero(lhs)
fp.Mul(lhs, &P.x, &P.y) // xy
fp.Mul(rhs, t, &P.z) // tz
fp.Sub(lhs, lhs, rhs) // xy - tz
- eq1 := fp.IsZero(lhs)
- return eq0 && eq1
+ eq2 := fp.IsZero(lhs)
+
+ return eq0 && eq1 && eq2
}
// Generator returns the generator point.
diff --git a/vendor/github.com/cloudflare/circl/internal/conv/conv.go b/vendor/github.com/cloudflare/circl/internal/conv/conv.go
index 649a8e931d..3fd0df496f 100644
--- a/vendor/github.com/cloudflare/circl/internal/conv/conv.go
+++ b/vendor/github.com/cloudflare/circl/internal/conv/conv.go
@@ -5,6 +5,8 @@ import (
"fmt"
"math/big"
"strings"
+
+ "golang.org/x/crypto/cryptobyte"
)
// BytesLe2Hex returns an hexadecimal string of a number stored in a
@@ -138,3 +140,34 @@ func BigInt2Uint64Le(z []uint64, x *big.Int) {
z[i] = 0
}
}
+
+// MarshalBinary encodes a value into a byte array in a format readable by UnmarshalBinary.
+func MarshalBinary(v cryptobyte.MarshalingValue) ([]byte, error) {
+ const DefaultSize = 32
+ b := cryptobyte.NewBuilder(make([]byte, 0, DefaultSize))
+ b.AddValue(v)
+ return b.Bytes()
+}
+
+// MarshalBinaryLen encodes a value into an array of n bytes in a format readable by UnmarshalBinary.
+func MarshalBinaryLen(v cryptobyte.MarshalingValue, length uint) ([]byte, error) {
+ b := cryptobyte.NewFixedBuilder(make([]byte, 0, length))
+ b.AddValue(v)
+ return b.Bytes()
+}
+
+// A UnmarshalingValue decodes itself from a cryptobyte.String and advances the pointer.
+// It reports whether the read was successful.
+type UnmarshalingValue interface {
+ Unmarshal(*cryptobyte.String) bool
+}
+
+// UnmarshalBinary recovers a value from a byte array.
+// It returns an error if the read was unsuccessful.
+func UnmarshalBinary(v UnmarshalingValue, data []byte) (err error) {
+ s := cryptobyte.String(data)
+ if data == nil || !v.Unmarshal(&s) || !s.Empty() {
+ err = fmt.Errorf("cannot read %T from input string", v)
+ }
+ return
+}
diff --git a/vendor/github.com/cloudflare/circl/math/fp25519/fp_amd64.s b/vendor/github.com/cloudflare/circl/math/fp25519/fp_amd64.s
index 5c4aeddecb..1fcc2dee17 100644
--- a/vendor/github.com/cloudflare/circl/math/fp25519/fp_amd64.s
+++ b/vendor/github.com/cloudflare/circl/math/fp25519/fp_amd64.s
@@ -1,4 +1,5 @@
-// +build amd64
+//go:build amd64 && !purego
+// +build amd64,!purego
#include "textflag.h"
#include "fp_amd64.h"
diff --git a/vendor/github.com/cloudflare/circl/math/fp448/fp_amd64.s b/vendor/github.com/cloudflare/circl/math/fp448/fp_amd64.s
index 435addf5e6..3f1f07c986 100644
--- a/vendor/github.com/cloudflare/circl/math/fp448/fp_amd64.s
+++ b/vendor/github.com/cloudflare/circl/math/fp448/fp_amd64.s
@@ -1,4 +1,5 @@
-// +build amd64
+//go:build amd64 && !purego
+// +build amd64,!purego
#include "textflag.h"
#include "fp_amd64.h"
diff --git a/vendor/github.com/cloudflare/circl/math/integer.go b/vendor/github.com/cloudflare/circl/math/integer.go
new file mode 100644
index 0000000000..9c80c23b59
--- /dev/null
+++ b/vendor/github.com/cloudflare/circl/math/integer.go
@@ -0,0 +1,16 @@
+package math
+
+import "math/bits"
+
+// NextPow2 finds the next power of two (N=2^k, k>=0) greater than n.
+// If n is already a power of two, then this function returns n, and log2(n).
+func NextPow2(n uint) (N uint, k uint) {
+ if bits.OnesCount(n) == 1 {
+ k = uint(bits.TrailingZeros(n))
+ N = n
+ } else {
+ k = uint(bits.Len(n))
+ N = uint(1) << k
+ }
+ return
+}
diff --git a/vendor/github.com/cloudflare/circl/sign/ed25519/point.go b/vendor/github.com/cloudflare/circl/sign/ed25519/point.go
index 374a69503c..d1c3b146b7 100644
--- a/vendor/github.com/cloudflare/circl/sign/ed25519/point.go
+++ b/vendor/github.com/cloudflare/circl/sign/ed25519/point.go
@@ -164,7 +164,7 @@ func (P *pointR1) isEqual(Q *pointR1) bool {
fp.Mul(r, r, &P.z)
fp.Sub(l, l, r)
b = b && fp.IsZero(l)
- return b
+ return b && !fp.IsZero(&P.z) && !fp.IsZero(&Q.z)
}
func (P *pointR3) neg() {
diff --git a/vendor/github.com/cloudflare/circl/sign/ed448/ed448.go b/vendor/github.com/cloudflare/circl/sign/ed448/ed448.go
index 324bd8f334..c368b181b4 100644
--- a/vendor/github.com/cloudflare/circl/sign/ed448/ed448.go
+++ b/vendor/github.com/cloudflare/circl/sign/ed448/ed448.go
@@ -206,7 +206,7 @@ func newKeyFromSeed(privateKey, seed []byte) {
func signAll(signature []byte, privateKey PrivateKey, message, ctx []byte, preHash bool) {
if len(ctx) > ContextMaxSize {
- panic(fmt.Errorf("ed448: bad context length: " + strconv.Itoa(len(ctx))))
+ panic(fmt.Errorf("ed448: bad context length: %v", len(ctx)))
}
H := sha3.NewShake256()
diff --git a/vendor/github.com/cloudflare/circl/sign/sign.go b/vendor/github.com/cloudflare/circl/sign/sign.go
index 13b20fa4b0..557d6f0960 100644
--- a/vendor/github.com/cloudflare/circl/sign/sign.go
+++ b/vendor/github.com/cloudflare/circl/sign/sign.go
@@ -107,4 +107,7 @@ var (
// ErrContextNotSupported is the error used if a context is not
// supported.
ErrContextNotSupported = errors.New("context not supported")
+
+ // ErrContextTooLong is the error used if the context string is too long.
+ ErrContextTooLong = errors.New("context string too long")
)
diff --git a/vendor/github.com/go-critic/go-critic/checkers/dupOption_checker.go b/vendor/github.com/go-critic/go-critic/checkers/dupOption_checker.go
index 2f45d01ce6..5e7eeda169 100644
--- a/vendor/github.com/go-critic/go-critic/checkers/dupOption_checker.go
+++ b/vendor/github.com/go-critic/go-critic/checkers/dupOption_checker.go
@@ -75,6 +75,11 @@ func (c *dupOptionChecker) getVariadicArgs(call *ast.CallExpr) ([]ast.Expr, type
if !ok {
return nil, nil
}
+
+ if last > len(call.Args) {
+ return nil, nil
+ }
+
argType := sliceType.Elem()
return call.Args[last:], argType
}
diff --git a/vendor/github.com/golangci/golangci-lint/v2/internal/cache/cache.go b/vendor/github.com/golangci/golangci-lint/v2/internal/cache/cache.go
index 627993d2ec..138a36148a 100644
--- a/vendor/github.com/golangci/golangci-lint/v2/internal/cache/cache.go
+++ b/vendor/github.com/golangci/golangci-lint/v2/internal/cache/cache.go
@@ -166,7 +166,7 @@ func (c *Cache) computePkgHash(pkg *packages.Package) (hashResults, error) {
fmt.Fprintf(key, "pkgpath %s\n", pkg.PkgPath)
- for _, f := range pkg.CompiledGoFiles {
+ for _, f := range slices.Concat(pkg.CompiledGoFiles, pkg.IgnoredFiles) {
h, fErr := c.fileHash(f)
if fErr != nil {
return nil, fmt.Errorf("failed to calculate file %s hash: %w", f, fErr)
diff --git a/vendor/github.com/golangci/golangci-lint/v2/pkg/commands/flagsets.go b/vendor/github.com/golangci/golangci-lint/v2/pkg/commands/flagsets.go
index cc4b00436e..2b61217c65 100644
--- a/vendor/github.com/golangci/golangci-lint/v2/pkg/commands/flagsets.go
+++ b/vendor/github.com/golangci/golangci-lint/v2/pkg/commands/flagsets.go
@@ -138,5 +138,5 @@ func setupIssuesFlagSet(v *viper.Viper, fs *pflag.FlagSet) {
internal.AddFlagAndBind(v, fs, fs.Bool, "whole-files", "issues.whole-files", false,
color.GreenString("Show issues in any part of update files (requires new-from-rev or new-from-patch)"))
internal.AddFlagAndBind(v, fs, fs.Bool, "fix", "issues.fix", false,
- color.GreenString("Fix found issues (if it's supported by the linter)"))
+ color.GreenString("Apply the fixes detected by the linters and formatters (if it's supported by the linter)"))
}
diff --git a/vendor/github.com/golangci/golangci-lint/v2/pkg/commands/fmt.go b/vendor/github.com/golangci/golangci-lint/v2/pkg/commands/fmt.go
index 3292af3e9e..ab1aef45b6 100644
--- a/vendor/github.com/golangci/golangci-lint/v2/pkg/commands/fmt.go
+++ b/vendor/github.com/golangci/golangci-lint/v2/pkg/commands/fmt.go
@@ -113,14 +113,11 @@ func (c *fmtCommand) preRunE(_ *cobra.Command, _ []string) error {
}
func (c *fmtCommand) execute(_ *cobra.Command, args []string) error {
- paths, err := cleanArgs(args)
- if err != nil {
- return fmt.Errorf("failed to clean arguments: %w", err)
- }
+ paths := cleanArgs(args)
c.log.Infof("Formatting Go files...")
- err = c.runner.Run(paths)
+ err := c.runner.Run(paths)
if err != nil {
return fmt.Errorf("failed to process files: %w", err)
}
@@ -134,25 +131,15 @@ func (c *fmtCommand) persistentPostRun(_ *cobra.Command, _ []string) {
}
}
-func cleanArgs(args []string) ([]string, error) {
+func cleanArgs(args []string) []string {
if len(args) == 0 {
- abs, err := filepath.Abs(".")
- if err != nil {
- return nil, err
- }
-
- return []string{abs}, nil
+ return []string{"."}
}
var expanded []string
for _, arg := range args {
- abs, err := filepath.Abs(strings.ReplaceAll(arg, "...", ""))
- if err != nil {
- return nil, err
- }
-
- expanded = append(expanded, abs)
+ expanded = append(expanded, filepath.Clean(strings.ReplaceAll(arg, "...", "")))
}
- return expanded, nil
+ return expanded
}
diff --git a/vendor/github.com/golangci/golangci-lint/v2/pkg/goformat/runner.go b/vendor/github.com/golangci/golangci-lint/v2/pkg/goformat/runner.go
index f876261581..650fb8f5ea 100644
--- a/vendor/github.com/golangci/golangci-lint/v2/pkg/goformat/runner.go
+++ b/vendor/github.com/golangci/golangci-lint/v2/pkg/goformat/runner.go
@@ -223,8 +223,14 @@ func NewRunnerOptions(cfg *config.Config, diff, diffColored, stdin bool) (Runner
return RunnerOptions{}, fmt.Errorf("get base path: %w", err)
}
+ // Required to be consistent with `RunnerOptions.MatchAnyPattern`.
+ absBasePath, err := filepath.Abs(basePath)
+ if err != nil {
+ return RunnerOptions{}, err
+ }
+
opts := RunnerOptions{
- basePath: basePath,
+ basePath: absBasePath,
generated: cfg.Formatters.Exclusions.Generated,
diff: diff || diffColored,
colors: diffColored,
@@ -251,7 +257,12 @@ func (o RunnerOptions) MatchAnyPattern(path string) (bool, error) {
return false, nil
}
- rel, err := filepath.Rel(o.basePath, path)
+ abs, err := filepath.Abs(path)
+ if err != nil {
+ return false, err
+ }
+
+ rel, err := filepath.Rel(o.basePath, abs)
if err != nil {
return false, err
}
@@ -272,7 +283,7 @@ func skipDir(name string) bool {
return true
default:
- return strings.HasPrefix(name, ".")
+ return strings.HasPrefix(name, ".") && name != "."
}
}
diff --git a/vendor/github.com/hashicorp/go-cty/cty/convert/conversion_collection.go b/vendor/github.com/hashicorp/go-cty/cty/convert/conversion_collection.go
index 575973d3c3..469b4f718f 100644
--- a/vendor/github.com/hashicorp/go-cty/cty/convert/conversion_collection.go
+++ b/vendor/github.com/hashicorp/go-cty/cty/convert/conversion_collection.go
@@ -156,34 +156,45 @@ func conversionCollectionToMap(ety cty.Type, conv conversion) conversion {
// given tuple type and return a set of the given element type.
//
// Will panic if the given tupleType isn't actually a tuple type.
-func conversionTupleToSet(tupleType cty.Type, listEty cty.Type, unsafe bool) conversion {
+func conversionTupleToSet(tupleType cty.Type, setEty cty.Type, unsafe bool) conversion {
tupleEtys := tupleType.TupleElementTypes()
if len(tupleEtys) == 0 {
// Empty tuple short-circuit
return func(val cty.Value, path cty.Path) (cty.Value, error) {
- return cty.SetValEmpty(listEty), nil
+ return cty.SetValEmpty(setEty), nil
}
}
- if listEty == cty.DynamicPseudoType {
+ if setEty == cty.DynamicPseudoType {
// This is a special case where the caller wants us to find
// a suitable single type that all elements can convert to, if
// possible.
- listEty, _ = unify(tupleEtys, unsafe)
- if listEty == cty.NilType {
+ setEty, _ = unify(tupleEtys, unsafe)
+ if setEty == cty.NilType {
return nil
}
+
+ // If the set element type after unification is still the dynamic
+ // type, the only way this can result in a valid set is if all values
+ // are of dynamic type
+ if setEty == cty.DynamicPseudoType {
+ for _, tupleEty := range tupleEtys {
+ if !tupleEty.Equals(cty.DynamicPseudoType) {
+ return nil
+ }
+ }
+ }
}
elemConvs := make([]conversion, len(tupleEtys))
for i, tupleEty := range tupleEtys {
- if tupleEty.Equals(listEty) {
+ if tupleEty.Equals(setEty) {
// no conversion required
continue
}
- elemConvs[i] = getConversion(tupleEty, listEty, unsafe)
+ elemConvs[i] = getConversion(tupleEty, setEty, unsafe)
if elemConvs[i] == nil {
// If any of our element conversions are impossible, then the our
// whole conversion is impossible.
@@ -244,6 +255,17 @@ func conversionTupleToList(tupleType cty.Type, listEty cty.Type, unsafe bool) co
if listEty == cty.NilType {
return nil
}
+
+ // If the list element type after unification is still the dynamic
+ // type, the only way this can result in a valid list is if all values
+ // are of dynamic type
+ if listEty == cty.DynamicPseudoType {
+ for _, tupleEty := range tupleEtys {
+ if !tupleEty.Equals(cty.DynamicPseudoType) {
+ return nil
+ }
+ }
+ }
}
elemConvs := make([]conversion, len(tupleEtys))
@@ -265,6 +287,7 @@ func conversionTupleToList(tupleType cty.Type, listEty cty.Type, unsafe bool) co
// element conversions in elemConvs
return func(val cty.Value, path cty.Path) (cty.Value, error) {
elems := make([]cty.Value, 0, len(elemConvs))
+ elemTys := make([]cty.Type, 0, len(elems))
elemPath := append(path.Copy(), nil)
i := int64(0)
it := val.ElementIterator()
@@ -284,10 +307,15 @@ func conversionTupleToList(tupleType cty.Type, listEty cty.Type, unsafe bool) co
}
}
elems = append(elems, val)
+ elemTys = append(elemTys, val.Type())
i++
}
+ elems, err := conversionUnifyListElements(elems, elemPath, unsafe)
+ if err != nil {
+ return cty.NilVal, err
+ }
return cty.ListVal(elems), nil
}
}
@@ -441,6 +469,7 @@ func conversionUnifyCollectionElements(elems map[string]cty.Value, path cty.Path
}
unifiedType, _ := unify(elemTypes, unsafe)
if unifiedType == cty.NilType {
+ return nil, path.NewErrorf("collection elements cannot be unified")
}
unifiedElems := make(map[string]cty.Value)
@@ -486,3 +515,37 @@ func conversionCheckMapElementTypes(elems map[string]cty.Value, path cty.Path) e
return nil
}
+
+func conversionUnifyListElements(elems []cty.Value, path cty.Path, unsafe bool) ([]cty.Value, error) {
+ elemTypes := make([]cty.Type, len(elems))
+ for i, elem := range elems {
+ elemTypes[i] = elem.Type()
+ }
+ unifiedType, _ := unify(elemTypes, unsafe)
+ if unifiedType == cty.NilType {
+ return nil, path.NewErrorf("collection elements cannot be unified")
+ }
+
+ ret := make([]cty.Value, len(elems))
+ elemPath := append(path.Copy(), nil)
+
+ for i, elem := range elems {
+ if elem.Type().Equals(unifiedType) {
+ ret[i] = elem
+ continue
+ }
+ conv := getConversion(elem.Type(), unifiedType, unsafe)
+ if conv == nil {
+ }
+ elemPath[len(elemPath)-1] = cty.IndexStep{
+ Key: cty.NumberIntVal(int64(i)),
+ }
+ val, err := conv(elem, elemPath)
+ if err != nil {
+ return nil, err
+ }
+ ret[i] = val
+ }
+
+ return ret, nil
+}
diff --git a/vendor/github.com/hashicorp/go-cty/cty/path_set.go b/vendor/github.com/hashicorp/go-cty/cty/path_set.go
index 977523de57..599b1a4836 100644
--- a/vendor/github.com/hashicorp/go-cty/cty/path_set.go
+++ b/vendor/github.com/hashicorp/go-cty/cty/path_set.go
@@ -196,3 +196,9 @@ func (r pathSetRules) Equivalent(a, b interface{}) bool {
return true
}
+
+// SameRules is true if both Rules instances are pathSetRules structs.
+func (r pathSetRules) SameRules(other set.Rules) bool {
+ _, ok := other.(pathSetRules)
+ return ok
+}
diff --git a/vendor/github.com/hashicorp/go-cty/cty/set/rules.go b/vendor/github.com/hashicorp/go-cty/cty/set/rules.go
index 51f744b5e9..03ecd25b97 100644
--- a/vendor/github.com/hashicorp/go-cty/cty/set/rules.go
+++ b/vendor/github.com/hashicorp/go-cty/cty/set/rules.go
@@ -22,6 +22,10 @@ type Rules interface {
// though it is *not* required that two values with the same hash value
// be equivalent.
Equivalent(interface{}, interface{}) bool
+
+ // SameRules returns true if the instance is equivalent to another Rules
+ // instance.
+ SameRules(Rules) bool
}
// OrderedRules is an extension of Rules that can apply a partial order to
diff --git a/vendor/github.com/hashicorp/go-cty/cty/set/set.go b/vendor/github.com/hashicorp/go-cty/cty/set/set.go
index b4fb316f1c..15a76638f5 100644
--- a/vendor/github.com/hashicorp/go-cty/cty/set/set.go
+++ b/vendor/github.com/hashicorp/go-cty/cty/set/set.go
@@ -41,7 +41,7 @@ func NewSetFromSlice(rules Rules, vals []interface{}) Set {
}
func sameRules(s1 Set, s2 Set) bool {
- return s1.rules == s2.rules
+ return s1.rules.SameRules(s2.rules)
}
func mustHaveSameRules(s1 Set, s2 Set) {
@@ -53,7 +53,7 @@ func mustHaveSameRules(s1 Set, s2 Set) {
// HasRules returns true if and only if the receiving set has the given rules
// instance as its rules.
func (s Set) HasRules(rules Rules) bool {
- return s.rules == rules
+ return s.rules.SameRules(rules)
}
// Rules returns the receiving set's rules instance.
diff --git a/vendor/github.com/hashicorp/go-cty/cty/set_internals.go b/vendor/github.com/hashicorp/go-cty/cty/set_internals.go
index 4080198097..0b98a0b2d7 100644
--- a/vendor/github.com/hashicorp/go-cty/cty/set_internals.go
+++ b/vendor/github.com/hashicorp/go-cty/cty/set_internals.go
@@ -65,6 +65,17 @@ func (r setRules) Equivalent(v1 interface{}, v2 interface{}) bool {
return eqv.v == true
}
+// SameRules is only true if the other Rules instance is also a setRules struct,
+// and the types are considered equal.
+func (r setRules) SameRules(other set.Rules) bool {
+ rules, ok := other.(setRules)
+ if !ok {
+ return false
+ }
+
+ return r.Type.Equals(rules.Type)
+}
+
// Less is an implementation of set.OrderedRules so that we can iterate over
// set elements in a consistent order, where such an order is possible.
func (r setRules) Less(v1, v2 interface{}) bool {
diff --git a/vendor/github.com/hashicorp/go-cty/cty/type.go b/vendor/github.com/hashicorp/go-cty/cty/type.go
index 730cb9862e..5f7813e832 100644
--- a/vendor/github.com/hashicorp/go-cty/cty/type.go
+++ b/vendor/github.com/hashicorp/go-cty/cty/type.go
@@ -87,7 +87,7 @@ func (t Type) HasDynamicTypes() bool {
case t.IsPrimitiveType():
return false
case t.IsCollectionType():
- return false
+ return t.ElementType().HasDynamicTypes()
case t.IsObjectType():
attrTypes := t.AttributeTypes()
for _, at := range attrTypes {
diff --git a/vendor/github.com/hashicorp/go-cty/cty/value.go b/vendor/github.com/hashicorp/go-cty/cty/value.go
index 1025ba82eb..f6a25ddef9 100644
--- a/vendor/github.com/hashicorp/go-cty/cty/value.go
+++ b/vendor/github.com/hashicorp/go-cty/cty/value.go
@@ -106,3 +106,37 @@ func (val Value) IsWhollyKnown() bool {
return true
}
}
+
+// HasWhollyKnownType checks if the value is dynamic, or contains any nested
+// DynamicVal. This implies that both the value is not known, and the final
+// type may change.
+func (val Value) HasWhollyKnownType() bool {
+ // a null dynamic type is known
+ if val.IsNull() {
+ return true
+ }
+
+ // an unknown DynamicPseudoType is a DynamicVal, but we don't want to
+ // check that value for equality here, since this method is used within the
+ // equality check.
+ if !val.IsKnown() && val.ty == DynamicPseudoType {
+ return false
+ }
+
+ if val.CanIterateElements() {
+ // if the value is not known, then we can look directly at the internal
+ // types
+ if !val.IsKnown() {
+ return !val.ty.HasDynamicTypes()
+ }
+
+ for it := val.ElementIterator(); it.Next(); {
+ _, ev := it.Element()
+ if !ev.HasWhollyKnownType() {
+ return false
+ }
+ }
+ }
+
+ return true
+}
diff --git a/vendor/github.com/hashicorp/go-cty/cty/value_ops.go b/vendor/github.com/hashicorp/go-cty/cty/value_ops.go
index 69e5a8abbf..804db6cb69 100644
--- a/vendor/github.com/hashicorp/go-cty/cty/value_ops.go
+++ b/vendor/github.com/hashicorp/go-cty/cty/value_ops.go
@@ -133,9 +133,9 @@ func (val Value) Equals(other Value) Value {
case val.IsKnown() && !other.IsKnown():
switch {
case val.IsNull(), other.ty.HasDynamicTypes():
- // If known is Null, we need to wait for the unkown value since
+ // If known is Null, we need to wait for the unknown value since
// nulls of any type are equal.
- // An unkown with a dynamic type compares as unknown, which we need
+ // An unknown with a dynamic type compares as unknown, which we need
// to check before the type comparison below.
return UnknownVal(Bool)
case !val.ty.Equals(other.ty):
@@ -148,9 +148,9 @@ func (val Value) Equals(other Value) Value {
case other.IsKnown() && !val.IsKnown():
switch {
case other.IsNull(), val.ty.HasDynamicTypes():
- // If known is Null, we need to wait for the unkown value since
+ // If known is Null, we need to wait for the unknown value since
// nulls of any type are equal.
- // An unkown with a dynamic type compares as unknown, which we need
+ // An unknown with a dynamic type compares as unknown, which we need
// to check before the type comparison below.
return UnknownVal(Bool)
case !other.ty.Equals(val.ty):
@@ -171,7 +171,15 @@ func (val Value) Equals(other Value) Value {
return BoolVal(false)
}
- if val.ty.HasDynamicTypes() || other.ty.HasDynamicTypes() {
+ // Check if there are any nested dynamic values making this comparison
+ // unknown.
+ if !val.HasWhollyKnownType() || !other.HasWhollyKnownType() {
+ // Even if we have dynamic values, we can still determine inequality if
+ // there is no way the types could later conform.
+ if val.ty.TestConformance(other.ty) != nil && other.ty.TestConformance(val.ty) != nil {
+ return BoolVal(false)
+ }
+
return UnknownVal(Bool)
}
diff --git a/vendor/github.com/hashicorp/go-hclog/README.md b/vendor/github.com/hashicorp/go-hclog/README.md
index 21a17c5af3..983d44c7db 100644
--- a/vendor/github.com/hashicorp/go-hclog/README.md
+++ b/vendor/github.com/hashicorp/go-hclog/README.md
@@ -140,9 +140,10 @@ log.Printf("[DEBUG] %d", 42)
... [DEBUG] my-app: 42
```
-Notice that if `appLogger` is initialized with the `INFO` log level _and_ you
+Notice that if `appLogger` is initialized with the `INFO` log level, _and_ you
specify `InferLevels: true`, you will not see any output here. You must change
`appLogger` to `DEBUG` to see output. See the docs for more information.
If the log lines start with a timestamp you can use the
-`InferLevelsWithTimestamp` option to try and ignore them.
+`InferLevelsWithTimestamp` option to try and ignore them. Please note that in order
+for `InferLevelsWithTimestamp` to be relevant, `InferLevels` must be set to `true`.
diff --git a/vendor/github.com/hashicorp/go-hclog/intlogger.go b/vendor/github.com/hashicorp/go-hclog/intlogger.go
index b45064acf1..272a710c04 100644
--- a/vendor/github.com/hashicorp/go-hclog/intlogger.go
+++ b/vendor/github.com/hashicorp/go-hclog/intlogger.go
@@ -55,23 +55,38 @@ var (
faintBoldColor = color.New(color.Faint, color.Bold)
faintColor = color.New(color.Faint)
- faintMultiLinePrefix = faintColor.Sprint(" | ")
- faintFieldSeparator = faintColor.Sprint("=")
- faintFieldSeparatorWithNewLine = faintColor.Sprint("=\n")
+ faintMultiLinePrefix string
+ faintFieldSeparator string
+ faintFieldSeparatorWithNewLine string
)
+func init() {
+ // Force all the colors to enabled because we do our own detection of color usage.
+ for _, c := range _levelToColor {
+ c.EnableColor()
+ }
+
+ faintBoldColor.EnableColor()
+ faintColor.EnableColor()
+
+ faintMultiLinePrefix = faintColor.Sprint(" | ")
+ faintFieldSeparator = faintColor.Sprint("=")
+ faintFieldSeparatorWithNewLine = faintColor.Sprint("=\n")
+}
+
// Make sure that intLogger is a Logger
var _ Logger = &intLogger{}
// intLogger is an internal logger implementation. Internal in that it is
// defined entirely by this package.
type intLogger struct {
- json bool
- callerOffset int
- name string
- timeFormat string
- timeFn TimeFunction
- disableTime bool
+ json bool
+ jsonEscapeEnabled bool
+ callerOffset int
+ name string
+ timeFormat string
+ timeFn TimeFunction
+ disableTime bool
// This is an interface so that it's shared by any derived loggers, since
// those derived loggers share the bufio.Writer as well.
@@ -79,6 +94,19 @@ type intLogger struct {
writer *writer
level *int32
+ // The value of curEpoch when our level was set
+ setEpoch uint64
+
+ // The value of curEpoch the last time we performed the level sync process
+ ownEpoch uint64
+
+ // Shared amongst all the loggers created in this hierachy, used to determine
+ // if the level sync process should be run by comparing it with ownEpoch
+ curEpoch *uint64
+
+ // The logger this one was created from. Only set when syncParentLevel is set
+ parent *intLogger
+
headerColor ColorOption
fieldColor ColorOption
@@ -88,6 +116,7 @@ type intLogger struct {
// create subloggers with their own level setting
independentLevels bool
+ syncParentLevel bool
subloggerHook func(sub Logger) Logger
}
@@ -129,9 +158,9 @@ func newLogger(opts *LoggerOptions) *intLogger {
}
var (
- primaryColor ColorOption = ColorOff
- headerColor ColorOption = ColorOff
- fieldColor ColorOption = ColorOff
+ primaryColor = ColorOff
+ headerColor = ColorOff
+ fieldColor = ColorOff
)
switch {
case opts.ColorHeaderOnly:
@@ -145,6 +174,7 @@ func newLogger(opts *LoggerOptions) *intLogger {
l := &intLogger{
json: opts.JSONFormat,
+ jsonEscapeEnabled: !opts.JSONEscapeDisabled,
name: opts.Name,
timeFormat: TimeFormat,
timeFn: time.Now,
@@ -152,8 +182,10 @@ func newLogger(opts *LoggerOptions) *intLogger {
mutex: mutex,
writer: newWriter(output, primaryColor),
level: new(int32),
+ curEpoch: new(uint64),
exclude: opts.Exclude,
independentLevels: opts.IndependentLevels,
+ syncParentLevel: opts.SyncParentLevel,
headerColor: headerColor,
fieldColor: fieldColor,
subloggerHook: opts.SubloggerHook,
@@ -194,7 +226,7 @@ const offsetIntLogger = 3
// Log a message and a set of key/value pairs if the given level is at
// or more severe that the threshold configured in the Logger.
func (l *intLogger) log(name string, level Level, msg string, args ...interface{}) {
- if level < Level(atomic.LoadInt32(l.level)) {
+ if level < l.GetLevel() {
return
}
@@ -597,7 +629,7 @@ func (l *intLogger) logJSON(t time.Time, name string, level Level, msg string, a
vals := l.jsonMapEntry(t, name, level, msg)
args = append(l.implied, args...)
- if args != nil && len(args) > 0 {
+ if len(args) > 0 {
if len(args)%2 != 0 {
cs, ok := args[len(args)-1].(CapturedStacktrace)
if ok {
@@ -637,13 +669,17 @@ func (l *intLogger) logJSON(t time.Time, name string, level Level, msg string, a
}
}
- err := json.NewEncoder(l.writer).Encode(vals)
+ encoder := json.NewEncoder(l.writer)
+ encoder.SetEscapeHTML(l.jsonEscapeEnabled)
+ err := encoder.Encode(vals)
if err != nil {
if _, ok := err.(*json.UnsupportedTypeError); ok {
plainVal := l.jsonMapEntry(t, name, level, msg)
plainVal["@warn"] = errJsonUnsupportedTypeMsg
- json.NewEncoder(l.writer).Encode(plainVal)
+ errEncoder := json.NewEncoder(l.writer)
+ errEncoder.SetEscapeHTML(l.jsonEscapeEnabled)
+ errEncoder.Encode(plainVal)
}
}
}
@@ -718,27 +754,27 @@ func (l *intLogger) Error(msg string, args ...interface{}) {
// Indicate that the logger would emit TRACE level logs
func (l *intLogger) IsTrace() bool {
- return Level(atomic.LoadInt32(l.level)) == Trace
+ return l.GetLevel() == Trace
}
// Indicate that the logger would emit DEBUG level logs
func (l *intLogger) IsDebug() bool {
- return Level(atomic.LoadInt32(l.level)) <= Debug
+ return l.GetLevel() <= Debug
}
// Indicate that the logger would emit INFO level logs
func (l *intLogger) IsInfo() bool {
- return Level(atomic.LoadInt32(l.level)) <= Info
+ return l.GetLevel() <= Info
}
// Indicate that the logger would emit WARN level logs
func (l *intLogger) IsWarn() bool {
- return Level(atomic.LoadInt32(l.level)) <= Warn
+ return l.GetLevel() <= Warn
}
// Indicate that the logger would emit ERROR level logs
func (l *intLogger) IsError() bool {
- return Level(atomic.LoadInt32(l.level)) <= Error
+ return l.GetLevel() <= Error
}
const MissingKey = "EXTRA_VALUE_AT_END"
@@ -854,12 +890,63 @@ func (l *intLogger) resetOutput(opts *LoggerOptions) error {
// Update the logging level on-the-fly. This will affect all subloggers as
// well.
func (l *intLogger) SetLevel(level Level) {
- atomic.StoreInt32(l.level, int32(level))
+ if !l.syncParentLevel {
+ atomic.StoreInt32(l.level, int32(level))
+ return
+ }
+
+ nsl := new(int32)
+ *nsl = int32(level)
+
+ l.level = nsl
+
+ l.ownEpoch = atomic.AddUint64(l.curEpoch, 1)
+ l.setEpoch = l.ownEpoch
+}
+
+func (l *intLogger) searchLevelPtr() *int32 {
+ p := l.parent
+
+ ptr := l.level
+
+ max := l.setEpoch
+
+ for p != nil {
+ if p.setEpoch > max {
+ max = p.setEpoch
+ ptr = p.level
+ }
+
+ p = p.parent
+ }
+
+ return ptr
}
// Returns the current level
func (l *intLogger) GetLevel() Level {
- return Level(atomic.LoadInt32(l.level))
+ // We perform the loads immediately to keep the CPU pipeline busy, which
+ // effectively makes the second load cost nothing. Once loaded into registers
+ // the comparison returns the already loaded value. The comparison is almost
+ // always true, so the branch predictor should hit consistently with it.
+ var (
+ curEpoch = atomic.LoadUint64(l.curEpoch)
+ level = Level(atomic.LoadInt32(l.level))
+ own = l.ownEpoch
+ )
+
+ if curEpoch == own {
+ return level
+ }
+
+ // Perform the level sync process. We'll avoid doing this next time by seeing the
+ // epoch as current.
+
+ ptr := l.searchLevelPtr()
+ l.level = ptr
+ l.ownEpoch = curEpoch
+
+ return Level(atomic.LoadInt32(ptr))
}
// Create a *log.Logger that will send it's data through this Logger. This
@@ -912,6 +999,8 @@ func (l *intLogger) copy() *intLogger {
if l.independentLevels {
sl.level = new(int32)
*sl.level = *l.level
+ } else if l.syncParentLevel {
+ sl.parent = l
}
return &sl
diff --git a/vendor/github.com/hashicorp/go-hclog/logger.go b/vendor/github.com/hashicorp/go-hclog/logger.go
index 947ac0c9af..ad17544f55 100644
--- a/vendor/github.com/hashicorp/go-hclog/logger.go
+++ b/vendor/github.com/hashicorp/go-hclog/logger.go
@@ -233,6 +233,7 @@ type StandardLoggerOptions struct {
// [DEBUG] and strip it off before reapplying it.
// The timestamp detection may result in false positives and incomplete
// string outputs.
+ // InferLevelsWithTimestamp is only relevant if InferLevels is true.
InferLevelsWithTimestamp bool
// ForceLevel is used to force all output from the standard logger to be at
@@ -263,6 +264,9 @@ type LoggerOptions struct {
// Control if the output should be in JSON.
JSONFormat bool
+ // Control the escape switch of json.Encoder
+ JSONEscapeDisabled bool
+
// Include file and line information in each log line
IncludeLocation bool
@@ -303,6 +307,24 @@ type LoggerOptions struct {
// will not affect the parent or sibling loggers.
IndependentLevels bool
+ // When set, changing the level of a logger effects only it's direct sub-loggers
+ // rather than all sub-loggers. For example:
+ // a := logger.Named("a")
+ // a.SetLevel(Error)
+ // b := a.Named("b")
+ // c := a.Named("c")
+ // b.GetLevel() => Error
+ // c.GetLevel() => Error
+ // b.SetLevel(Info)
+ // a.GetLevel() => Error
+ // b.GetLevel() => Info
+ // c.GetLevel() => Error
+ // a.SetLevel(Warn)
+ // a.GetLevel() => Warn
+ // b.GetLevel() => Warn
+ // c.GetLevel() => Warn
+ SyncParentLevel bool
+
// SubloggerHook registers a function that is called when a sublogger via
// Named, With, or ResetNamed is created. If defined, the function is passed
// the newly created Logger and the returned Logger is returned from the
diff --git a/vendor/github.com/hashicorp/go-plugin/.go-version b/vendor/github.com/hashicorp/go-plugin/.go-version
new file mode 100644
index 0000000000..f9e8384bb6
--- /dev/null
+++ b/vendor/github.com/hashicorp/go-plugin/.go-version
@@ -0,0 +1 @@
+1.24.1
diff --git a/vendor/github.com/hashicorp/go-plugin/CHANGELOG.md b/vendor/github.com/hashicorp/go-plugin/CHANGELOG.md
index 3d0379c500..14703c6e7e 100644
--- a/vendor/github.com/hashicorp/go-plugin/CHANGELOG.md
+++ b/vendor/github.com/hashicorp/go-plugin/CHANGELOG.md
@@ -1,9 +1,39 @@
+## v1.7.0
+
+CHANGES:
+
+* When go-plugin encounters a stack trace on the server stderr stream, it now raises output to a log-level of Error instead of Debug. [[GH-292](https://github.com/hashicorp/go-plugin/pull/292)]
+
+ENHANCEMENTS:
+
+* Don't spend resources parsing log lines when logging is disabled [[GH-352](https://github.com/hashicorp/go-plugin/pull/352)]
+
+## v1.6.2
+
+ENHANCEMENTS:
+
+* Added support for gRPC dial options to the `Dial` API [[GH-257](https://github.com/hashicorp/go-plugin/pull/257)]
+
+BUGS:
+
+* Fixed a bug where reattaching to a plugin that exits could kill an unrelated process [[GH-320](https://github.com/hashicorp/go-plugin/pull/320)]
+
+## v1.6.1
+
+BUGS:
+
+* Suppress spurious `os.ErrClosed` on plugin shutdown [[GH-299](https://github.com/hashicorp/go-plugin/pull/299)]
+
+ENHANCEMENTS:
+
+* deps: bump google.golang.org/grpc to v1.58.3 [[GH-296](https://github.com/hashicorp/go-plugin/pull/296)]
+
## v1.6.0
CHANGES:
* plugin: Plugins written in other languages can optionally start to advertise whether they support gRPC broker multiplexing.
- If the environment variable `PLUGIN_MULTIPLEX_GRPC` is set, it is safe to include a seventh field containing a boolean
+ If the environment variable `PLUGIN_MULTIPLEX_GRPC` is set, it is safe to include a seventh field containing a boolean
value in the `|`-separated protocol negotiation line.
ENHANCEMENTS:
diff --git a/vendor/github.com/hashicorp/go-plugin/client.go b/vendor/github.com/hashicorp/go-plugin/client.go
index 73f6b35151..1f14db99fb 100644
--- a/vendor/github.com/hashicorp/go-plugin/client.go
+++ b/vendor/github.com/hashicorp/go-plugin/client.go
@@ -14,7 +14,6 @@ import (
"fmt"
"hash"
"io"
- "io/ioutil"
"net"
"os"
"os/exec"
@@ -82,7 +81,7 @@ const defaultPluginLogBufferSize = 64 * 1024
//
// Plugin hosts should use one Client for each plugin executable. To
// dispense a plugin type, use the `Client.Client` function, and then
-// cal `Dispense`. This awkward API is mostly historical but is used to split
+// call `Dispense`. This awkward API is mostly historical but is used to split
// the client that deals with subprocess management and the client that
// does RPC management.
//
@@ -104,9 +103,9 @@ type Client struct {
// goroutines.
clientWaitGroup sync.WaitGroup
- // stderrWaitGroup is used to prevent the command's Wait() function from
- // being called before we've finished reading from the stderr pipe.
- stderrWaitGroup sync.WaitGroup
+ // pipesWaitGroup is used to prevent the command's Wait() function from
+ // being called before we've finished reading from the stdout and stderr pipe.
+ pipesWaitGroup sync.WaitGroup
// processKilled is used for testing only, to flag when the process was
// forcefully killed.
@@ -202,7 +201,7 @@ type ClientConfig struct {
// SyncStdout, SyncStderr can be set to override the
// respective os.Std* values in the plugin. Care should be taken to
// avoid races here. If these are nil, then this will be set to
- // ioutil.Discard.
+ // io.Discard.
SyncStdout io.Writer
SyncStderr io.Writer
@@ -345,7 +344,7 @@ func (s *SecureConfig) Check(filePath string) (bool, error) {
if err != nil {
return false, err
}
- defer file.Close()
+ defer func() { _ = file.Close() }()
_, err = io.Copy(s.Hash, file)
if err != nil {
@@ -401,7 +400,7 @@ func NewClient(config *ClientConfig) (c *Client) {
}
if config.Stderr == nil {
- config.Stderr = ioutil.Discard
+ config.Stderr = io.Discard
}
if config.SyncStdout == nil {
@@ -514,7 +513,7 @@ func (c *Client) Kill() {
c.clientWaitGroup.Wait()
if hostSocketDir != "" {
- os.RemoveAll(hostSocketDir)
+ _ = os.RemoveAll(hostSocketDir)
}
// Make sure there is no reference to the old process after it has been
@@ -743,7 +742,7 @@ func (c *Client) Start() (addr net.Addr, err error) {
rErr := recover()
if err != nil || rErr != nil {
- runner.Kill(context.Background())
+ _ = runner.Kill(context.Background())
}
if rErr != nil {
@@ -756,8 +755,8 @@ func (c *Client) Start() (addr net.Addr, err error) {
// Start goroutine that logs the stderr
c.clientWaitGroup.Add(1)
- c.stderrWaitGroup.Add(1)
- // logStderr calls Done()
+ c.pipesWaitGroup.Add(1)
+ // logStderr calls c.pipesWaitGroup.Done()
go c.logStderr(runner.Name(), runner.Stderr())
c.clientWaitGroup.Add(1)
@@ -767,9 +766,9 @@ func (c *Client) Start() (addr net.Addr, err error) {
defer c.clientWaitGroup.Done()
- // wait to finish reading from stderr since the stderr pipe reader
+ // wait to finish reading from stdout/stderr since the stdout/stderr pipe readers
// will be closed by the subsequent call to cmd.Wait().
- c.stderrWaitGroup.Wait()
+ c.pipesWaitGroup.Wait()
// Wait for the command to end.
err := runner.Wait(context.Background())
@@ -780,7 +779,7 @@ func (c *Client) Start() (addr net.Addr, err error) {
c.logger.Info("plugin process exited", "plugin", runner.Name(), "id", runner.ID())
}
- os.Stderr.Sync()
+ _ = os.Stderr.Sync()
// Set that we exited, which takes a lock
c.l.Lock()
@@ -792,8 +791,10 @@ func (c *Client) Start() (addr net.Addr, err error) {
// out of stdout
linesCh := make(chan string)
c.clientWaitGroup.Add(1)
+ c.pipesWaitGroup.Add(1)
go func() {
defer c.clientWaitGroup.Done()
+ defer c.pipesWaitGroup.Done()
defer close(linesCh)
scanner := bufio.NewScanner(runner.Stdout())
@@ -851,15 +852,15 @@ func (c *Client) Start() (addr net.Addr, err error) {
var coreProtocol int
coreProtocol, err = strconv.Atoi(parts[0])
if err != nil {
- err = fmt.Errorf("Error parsing core protocol version: %s", err)
+ err = fmt.Errorf("error parsing core protocol version: %s", err)
return
}
if coreProtocol != CoreProtocolVersion {
- err = fmt.Errorf("Incompatible core API version with plugin. "+
+ err = fmt.Errorf("incompatible core API version with plugin. "+
"Plugin version: %s, Core version: %d\n\n"+
"To fix this, the plugin usually only needs to be recompiled.\n"+
- "Please report this to the plugin author.", parts[0], CoreProtocolVersion)
+ "Please report this to the plugin author", parts[0], CoreProtocolVersion)
return
}
}
@@ -885,10 +886,16 @@ func (c *Client) Start() (addr net.Addr, err error) {
switch network {
case "tcp":
addr, err = net.ResolveTCPAddr("tcp", address)
+ if err != nil {
+ return nil, err
+ }
case "unix":
addr, err = net.ResolveUnixAddr("unix", address)
+ if err != nil {
+ return nil, err
+ }
default:
- err = fmt.Errorf("Unknown address type: %s", address)
+ return nil, fmt.Errorf("unknown address type: %s", address)
}
// If we have a server type, then record that. We default to net/rpc
@@ -906,7 +913,7 @@ func (c *Client) Start() (addr net.Addr, err error) {
}
}
if !found {
- err = fmt.Errorf("Unsupported plugin protocol %q. Supported: %v",
+ err = fmt.Errorf("unsupported plugin protocol %q. Supported: %v",
c.protocol, c.config.AllowedProtocols)
return addr, err
}
@@ -984,7 +991,7 @@ func (c *Client) reattach() (net.Addr, error) {
defer c.ctxCancel()
// Wait for the process to die
- r.Wait(context.Background())
+ _ = r.Wait(context.Background())
// Log so we can see it
c.logger.Debug("reattached plugin process exited")
@@ -1039,7 +1046,7 @@ func (c *Client) checkProtoVersion(protoVersion string) (int, PluginSet, error)
return version, plugins, nil
}
- return 0, nil, fmt.Errorf("Incompatible API version with plugin. "+
+ return 0, nil, fmt.Errorf("incompatible API version with plugin. "+
"Plugin version: %d, Client versions: %d", serverVersion, clientVersions)
}
@@ -1095,8 +1102,8 @@ func (c *Client) Protocol() Protocol {
return c.protocol
}
-func netAddrDialer(addr net.Addr) func(string, time.Duration) (net.Conn, error) {
- return func(_ string, _ time.Duration) (net.Conn, error) {
+func netAddrDialer(addr net.Addr) func(context.Context, string) (net.Conn, error) {
+ return func(context.Context, string) (net.Conn, error) {
// Connect to the client
conn, err := net.Dial(addr.Network(), addr.String())
if err != nil {
@@ -1104,7 +1111,7 @@ func netAddrDialer(addr net.Addr) func(string, time.Duration) (net.Conn, error)
}
if tcpConn, ok := conn.(*net.TCPConn); ok {
// Make sure to set keep alive so that the connection doesn't die
- tcpConn.SetKeepAlive(true)
+ _ = tcpConn.SetKeepAlive(true)
}
return conn, nil
@@ -1113,7 +1120,7 @@ func netAddrDialer(addr net.Addr) func(string, time.Duration) (net.Conn, error)
// dialer is compatible with grpc.WithDialer and creates the connection
// to the plugin.
-func (c *Client) dialer(_ string, timeout time.Duration) (net.Conn, error) {
+func (c *Client) dialer(ctx context.Context, _ string) (net.Conn, error) {
muxer, err := c.getGRPCMuxer(c.address)
if err != nil {
return nil, err
@@ -1126,7 +1133,7 @@ func (c *Client) dialer(_ string, timeout time.Duration) (net.Conn, error) {
return nil, err
}
} else {
- conn, err = netAddrDialer(c.address)("", timeout)
+ conn, err = netAddrDialer(c.address)(ctx, "")
if err != nil {
return nil, err
}
@@ -1159,14 +1166,22 @@ func (c *Client) getGRPCMuxer(addr net.Addr) (*grpcmux.GRPCClientMuxer, error) {
func (c *Client) logStderr(name string, r io.Reader) {
defer c.clientWaitGroup.Done()
- defer c.stderrWaitGroup.Done()
+ defer c.pipesWaitGroup.Done()
+
l := c.logger.Named(filepath.Base(name))
+ loggerLevel := l.GetLevel()
+ loggerDisabled := loggerLevel == hclog.Off
reader := bufio.NewReaderSize(r, c.config.PluginLogBufferSize)
// continuation indicates the previous line was a prefix
continuation := false
+ // inPanic indicates we saw the start of a stack trace and should divert all
+ // remaining untagged lines to stderr
+ var inPanic bool
+
for {
+
line, isPrefix, err := reader.ReadLine()
switch {
case err == io.EOF:
@@ -1176,7 +1191,7 @@ func (c *Client) logStderr(name string, r io.Reader) {
return
}
- c.config.Stderr.Write(line)
+ _, _ = c.config.Stderr.Write(line)
// The line was longer than our max token size, so it's likely
// incomplete and won't unmarshal.
@@ -1185,14 +1200,26 @@ func (c *Client) logStderr(name string, r io.Reader) {
// if we're finishing a continued line, add the newline back in
if !isPrefix {
- c.config.Stderr.Write([]byte{'\n'})
+ _, _ = c.config.Stderr.Write([]byte{'\n'})
}
continuation = isPrefix
continue
}
- c.config.Stderr.Write([]byte{'\n'})
+ _, _ = c.config.Stderr.Write([]byte{'\n'})
+
+ //
+ // Any side-effects other than writing to the hclog logger must be
+ // above this point!
+ //
+
+ if loggerDisabled {
+ // If the logger we'd be writing to is completely disabled then
+ // we can skip all of the parsing work to decide what log level
+ // we'd use to write this line.
+ continue
+ }
entry, err := parseJSON(line)
// If output is not JSON format, print directly to Debug
@@ -1210,14 +1237,25 @@ func (c *Client) logStderr(name string, r io.Reader) {
l.Warn(line)
case strings.HasPrefix(line, "[ERROR]"):
l.Error(line)
+ case strings.HasPrefix(line, "panic: ") || strings.HasPrefix(line, "fatal error: "):
+ inPanic = true
+ fallthrough
+ case inPanic:
+ l.Error(line)
default:
l.Debug(line)
}
} else {
- out := flattenKVPairs(entry.KVPairs)
+ logLevel := hclog.LevelFromString(entry.Level)
+ if logLevel != hclog.NoLevel && logLevel < loggerLevel {
+ // The logger will ignore this log entry anyway, so we
+ // won't spend any more time preparing it.
+ continue
+ }
+ out := flattenKVPairs(entry.KVPairs)
out = append(out, "timestamp", entry.Timestamp.Format(hclog.TimeFormat))
- switch hclog.LevelFromString(entry.Level) {
+ switch logLevel {
case hclog.Trace:
l.Trace(entry.Message, out...)
case hclog.Debug:
diff --git a/vendor/github.com/hashicorp/go-plugin/grpc_broker.go b/vendor/github.com/hashicorp/go-plugin/grpc_broker.go
index 5b17e37fef..bb4cd3edbc 100644
--- a/vendor/github.com/hashicorp/go-plugin/grpc_broker.go
+++ b/vendor/github.com/hashicorp/go-plugin/grpc_broker.go
@@ -100,8 +100,6 @@ func (s *gRPCBrokerServer) StartStream(stream plugin.GRPCBroker_StartStreamServe
case s.recv <- i:
}
}
-
- return nil
}
// Send is used by the GRPCBroker to pass connection information into the stream
@@ -210,8 +208,6 @@ func (s *gRPCBrokerClientImpl) StartStream() error {
case s.recv <- i:
}
}
-
- return nil
}
// Send is used by the GRPCBroker to pass connection information into the stream
@@ -382,7 +378,7 @@ func (b *GRPCBroker) AcceptAndServe(id uint32, newGRPCServer func([]grpc.ServerO
log.Printf("[ERR] plugin: plugin acceptAndServe error: %s", err)
return
}
- defer ln.Close()
+ defer func() { _ = ln.Close() }()
var opts []grpc.ServerOption
if b.tls != nil {
@@ -418,7 +414,7 @@ func (b *GRPCBroker) AcceptAndServe(id uint32, newGRPCServer func([]grpc.ServerO
}
// Block until we are done
- g.Run()
+ _ = g.Run()
}
// Close closes the stream and all servers.
@@ -502,8 +498,8 @@ func (b *GRPCBroker) knock(id uint32) error {
return nil
}
-func (b *GRPCBroker) muxDial(id uint32) func(string, time.Duration) (net.Conn, error) {
- return func(string, time.Duration) (net.Conn, error) {
+func (b *GRPCBroker) muxDial(id uint32) func(context.Context, string) (net.Conn, error) {
+ return func(context.Context, string) (net.Conn, error) {
b.dialMutex.Lock()
defer b.dialMutex.Unlock()
@@ -523,9 +519,12 @@ func (b *GRPCBroker) muxDial(id uint32) func(string, time.Duration) (net.Conn, e
}
// Dial opens a connection by ID.
-func (b *GRPCBroker) Dial(id uint32) (conn *grpc.ClientConn, err error) {
+func (b *GRPCBroker) Dial(id uint32) (conn *grpc.ClientConn, err error) { return b.DialWithOptions(id) }
+
+// Dial opens a connection by ID with options.
+func (b *GRPCBroker) DialWithOptions(id uint32, opts ...grpc.DialOption) (conn *grpc.ClientConn, err error) {
if b.muxer.Enabled() {
- return dialGRPCConn(b.tls, b.muxDial(id))
+ return dialGRPCConn(b.tls, b.muxDial(id), opts...)
}
var c *plugin.ConnInfo
@@ -554,13 +553,13 @@ func (b *GRPCBroker) Dial(id uint32) (conn *grpc.ClientConn, err error) {
case "unix":
addr, err = net.ResolveUnixAddr("unix", address)
default:
- err = fmt.Errorf("Unknown address type: %s", c.Address)
+ err = fmt.Errorf("unknown address type: %s", c.Address)
}
if err != nil {
return nil, err
}
- return dialGRPCConn(b.tls, netAddrDialer(addr))
+ return dialGRPCConn(b.tls, netAddrDialer(addr), opts...)
}
// NextId returns a unique ID to use next.
diff --git a/vendor/github.com/hashicorp/go-plugin/grpc_client.go b/vendor/github.com/hashicorp/go-plugin/grpc_client.go
index 627649d839..579212a1a1 100644
--- a/vendor/github.com/hashicorp/go-plugin/grpc_client.go
+++ b/vendor/github.com/hashicorp/go-plugin/grpc_client.go
@@ -9,20 +9,20 @@ import (
"fmt"
"math"
"net"
- "time"
"github.com/hashicorp/go-plugin/internal/plugin"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials"
+ "google.golang.org/grpc/credentials/insecure"
"google.golang.org/grpc/health/grpc_health_v1"
)
-func dialGRPCConn(tls *tls.Config, dialer func(string, time.Duration) (net.Conn, error), dialOpts ...grpc.DialOption) (*grpc.ClientConn, error) {
+func dialGRPCConn(tls *tls.Config, dialer func(context.Context, string) (net.Conn, error), dialOpts ...grpc.DialOption) (*grpc.ClientConn, error) {
// Build dialing options.
opts := make([]grpc.DialOption, 0)
// We use a custom dialer so that we can connect over unix domain sockets.
- opts = append(opts, grpc.WithDialer(dialer))
+ opts = append(opts, grpc.WithContextDialer(dialer))
// Fail right away
opts = append(opts, grpc.FailOnNonTempDialError(true))
@@ -30,7 +30,7 @@ func dialGRPCConn(tls *tls.Config, dialer func(string, time.Duration) (net.Conn,
// If we have no TLS configuration set, we need to explicitly tell grpc
// that we're connecting with an insecure connection.
if tls == nil {
- opts = append(opts, grpc.WithInsecure())
+ opts = append(opts, grpc.WithTransportCredentials(insecure.NewCredentials()))
} else {
opts = append(opts, grpc.WithTransportCredentials(
credentials.NewTLS(tls)))
@@ -70,7 +70,7 @@ func newGRPCClient(doneCtx context.Context, c *Client) (*GRPCClient, error) {
brokerGRPCClient := newGRPCBrokerClient(conn)
broker := newGRPCBroker(brokerGRPCClient, c.config.TLSConfig, c.unixSocketCfg, c.runner, muxer)
go broker.Run()
- go brokerGRPCClient.StartStream()
+ go func() { _ = brokerGRPCClient.StartStream() }()
// Start the stdio client
stdioClient, err := newGRPCStdioClient(doneCtx, c.logger.Named("stdio"), conn)
@@ -103,8 +103,8 @@ type GRPCClient struct {
// ClientProtocol impl.
func (c *GRPCClient) Close() error {
- c.broker.Close()
- c.controller.Shutdown(c.doneCtx, &plugin.Empty{})
+ _ = c.broker.Close()
+ _, _ = c.controller.Shutdown(c.doneCtx, &plugin.Empty{})
return c.Conn.Close()
}
diff --git a/vendor/github.com/hashicorp/go-plugin/grpc_server.go b/vendor/github.com/hashicorp/go-plugin/grpc_server.go
index a5f40c7f06..48195953db 100644
--- a/vendor/github.com/hashicorp/go-plugin/grpc_server.go
+++ b/vendor/github.com/hashicorp/go-plugin/grpc_server.go
@@ -119,7 +119,7 @@ func (s *GRPCServer) Stop() {
s.server.Stop()
if s.broker != nil {
- s.broker.Close()
+ _ = s.broker.Close()
s.broker = nil
}
}
@@ -130,7 +130,7 @@ func (s *GRPCServer) GracefulStop() {
s.server.GracefulStop()
if s.broker != nil {
- s.broker.Close()
+ _ = s.broker.Close()
s.broker = nil
}
}
diff --git a/vendor/github.com/hashicorp/go-plugin/grpc_stdio.go b/vendor/github.com/hashicorp/go-plugin/grpc_stdio.go
index ae06c11631..ce8eb9e1e9 100644
--- a/vendor/github.com/hashicorp/go-plugin/grpc_stdio.go
+++ b/vendor/github.com/hashicorp/go-plugin/grpc_stdio.go
@@ -178,7 +178,7 @@ func copyChan(log hclog.Logger, dst chan<- []byte, src io.Reader) {
for {
// Make our data buffer. We allocate a new one per loop iteration
// so that we can send it over the channel.
- var data [1024]byte
+ var data [grpcStdioBuffer]byte
// Read the data, this will block until data is available
n, err := bufsrc.Read(data[:])
diff --git a/vendor/github.com/hashicorp/go-plugin/internal/cmdrunner/cmd_reattach.go b/vendor/github.com/hashicorp/go-plugin/internal/cmdrunner/cmd_reattach.go
index dce1a86a88..5fbeee29d1 100644
--- a/vendor/github.com/hashicorp/go-plugin/internal/cmdrunner/cmd_reattach.go
+++ b/vendor/github.com/hashicorp/go-plugin/internal/cmdrunner/cmd_reattach.go
@@ -28,10 +28,9 @@ func ReattachFunc(pid int, addr net.Addr) runner.ReattachFunc {
// doesn't actually return an error if it can't find the process.
conn, err := net.Dial(addr.Network(), addr.String())
if err != nil {
- p.Kill()
return nil, ErrProcessNotFound
}
- conn.Close()
+ _ = conn.Close()
return &CmdAttachedRunner{
pid: pid,
diff --git a/vendor/github.com/hashicorp/go-plugin/internal/cmdrunner/cmd_runner.go b/vendor/github.com/hashicorp/go-plugin/internal/cmdrunner/cmd_runner.go
index b26fea928e..bde63249e3 100644
--- a/vendor/github.com/hashicorp/go-plugin/internal/cmdrunner/cmd_runner.go
+++ b/vendor/github.com/hashicorp/go-plugin/internal/cmdrunner/cmd_runner.go
@@ -20,7 +20,7 @@ var (
// ErrProcessNotFound is returned when a client is instantiated to
// reattach to an existing process and it isn't found.
- ErrProcessNotFound = errors.New("Reattachment process not found")
+ ErrProcessNotFound = errors.New("reattachment process not found")
)
const unrecognizedRemotePluginMessage = `This usually means
diff --git a/vendor/github.com/hashicorp/go-plugin/internal/cmdrunner/notes_unix.go b/vendor/github.com/hashicorp/go-plugin/internal/cmdrunner/notes_unix.go
index ce04cfebc6..03d73625e3 100644
--- a/vendor/github.com/hashicorp/go-plugin/internal/cmdrunner/notes_unix.go
+++ b/vendor/github.com/hashicorp/go-plugin/internal/cmdrunner/notes_unix.go
@@ -53,13 +53,13 @@ func additionalNotesAboutCommand(path string) string {
}
if elfFile, err := elf.Open(path); err == nil {
- defer elfFile.Close()
+ defer func() { _ = elfFile.Close() }()
notes += fmt.Sprintf(" ELF architecture: %s (current architecture: %s)\n", elfFile.Machine, runtime.GOARCH)
} else if machoFile, err := macho.Open(path); err == nil {
- defer machoFile.Close()
+ defer func() { _ = machoFile.Close() }()
notes += fmt.Sprintf(" MachO architecture: %s (current architecture: %s)\n", machoFile.Cpu, runtime.GOARCH)
} else if peFile, err := pe.Open(path); err == nil {
- defer peFile.Close()
+ defer func() { _ = peFile.Close() }()
machine, ok := peTypes[peFile.Machine]
if !ok {
machine = "unknown"
diff --git a/vendor/github.com/hashicorp/go-plugin/log_entry.go b/vendor/github.com/hashicorp/go-plugin/log_entry.go
index ab963d56b5..dc86eb09fa 100644
--- a/vendor/github.com/hashicorp/go-plugin/log_entry.go
+++ b/vendor/github.com/hashicorp/go-plugin/log_entry.go
@@ -10,10 +10,10 @@ import (
// logEntry is the JSON payload that gets sent to Stderr from the plugin to the host
type logEntry struct {
- Message string `json:"@message"`
- Level string `json:"@level"`
- Timestamp time.Time `json:"timestamp"`
- KVPairs []*logEntryKV `json:"kv_pairs"`
+ Message string `json:"@message"`
+ Level string `json:"@level"`
+ Timestamp time.Time `json:"timestamp"`
+ KVPairs []logEntryKV `json:"kv_pairs"`
}
// logEntryKV is a key value pair within the Output payload
@@ -24,7 +24,7 @@ type logEntryKV struct {
// flattenKVPairs is used to flatten KVPair slice into []interface{}
// for hclog consumption.
-func flattenKVPairs(kvs []*logEntryKV) []interface{} {
+func flattenKVPairs(kvs []logEntryKV) []interface{} {
var result []interface{}
for _, kv := range kvs {
result = append(result, kv.Key)
@@ -66,7 +66,7 @@ func parseJSON(input []byte) (*logEntry, error) {
// Parse dynamic KV args from the hclog payload.
for k, v := range raw {
- entry.KVPairs = append(entry.KVPairs, &logEntryKV{
+ entry.KVPairs = append(entry.KVPairs, logEntryKV{
Key: k,
Value: v,
})
diff --git a/vendor/github.com/hashicorp/go-plugin/mux_broker.go b/vendor/github.com/hashicorp/go-plugin/mux_broker.go
index 4eb1208fbb..c331edaa4e 100644
--- a/vendor/github.com/hashicorp/go-plugin/mux_broker.go
+++ b/vendor/github.com/hashicorp/go-plugin/mux_broker.go
@@ -68,7 +68,7 @@ func (m *MuxBroker) Accept(id uint32) (net.Conn, error) {
// Ack our connection
if err := binary.Write(c, binary.LittleEndian, id); err != nil {
- c.Close()
+ _ = c.Close()
return nil, err
}
@@ -105,18 +105,18 @@ func (m *MuxBroker) Dial(id uint32) (net.Conn, error) {
// Write the stream ID onto the wire.
if err := binary.Write(stream, binary.LittleEndian, id); err != nil {
- stream.Close()
+ _ = stream.Close()
return nil, err
}
// Read the ack that we connected. Then we're off!
var ack uint32
if err := binary.Read(stream, binary.LittleEndian, &ack); err != nil {
- stream.Close()
+ _ = stream.Close()
return nil, err
}
if ack != id {
- stream.Close()
+ _ = stream.Close()
return nil, fmt.Errorf("bad ack: %d (expected %d)", ack, id)
}
@@ -148,7 +148,7 @@ func (m *MuxBroker) Run() {
// Read the stream ID from the stream
var id uint32
if err := binary.Read(stream, binary.LittleEndian, &id); err != nil {
- stream.Close()
+ _ = stream.Close()
continue
}
@@ -199,9 +199,7 @@ func (m *MuxBroker) timeoutWait(id uint32, p *muxBrokerPending) {
// If we timed out, then check if we have a channel in the buffer,
// and if so, close it.
if timeout {
- select {
- case s := <-p.ch:
- s.Close()
- }
+ s := <-p.ch
+ _ = s.Close()
}
}
diff --git a/vendor/github.com/hashicorp/go-plugin/rpc_client.go b/vendor/github.com/hashicorp/go-plugin/rpc_client.go
index 142454df80..d5bc5926d2 100644
--- a/vendor/github.com/hashicorp/go-plugin/rpc_client.go
+++ b/vendor/github.com/hashicorp/go-plugin/rpc_client.go
@@ -33,7 +33,7 @@ func newRPCClient(c *Client) (*RPCClient, error) {
}
if tcpConn, ok := conn.(*net.TCPConn); ok {
// Make sure to set keep alive so that the connection doesn't die
- tcpConn.SetKeepAlive(true)
+ _ = tcpConn.SetKeepAlive(true)
}
if c.config.TLSConfig != nil {
@@ -43,7 +43,7 @@ func newRPCClient(c *Client) (*RPCClient, error) {
// Create the actual RPC client
result, err := NewRPCClient(conn, c.config.Plugins)
if err != nil {
- conn.Close()
+ _ = conn.Close()
return nil, err
}
@@ -52,7 +52,7 @@ func newRPCClient(c *Client) (*RPCClient, error) {
c.config.SyncStdout,
c.config.SyncStderr)
if err != nil {
- result.Close()
+ _ = result.Close()
return nil, err
}
@@ -65,23 +65,23 @@ func NewRPCClient(conn io.ReadWriteCloser, plugins map[string]Plugin) (*RPCClien
// Create the yamux client so we can multiplex
mux, err := yamux.Client(conn, nil)
if err != nil {
- conn.Close()
+ _ = conn.Close()
return nil, err
}
// Connect to the control stream.
control, err := mux.Open()
if err != nil {
- mux.Close()
+ _ = mux.Close()
return nil, err
}
// Connect stdout, stderr streams
stdstream := make([]net.Conn, 2)
- for i, _ := range stdstream {
+ for i := range stdstream {
stdstream[i], err = mux.Open()
if err != nil {
- mux.Close()
+ _ = mux.Close()
return nil, err
}
}
diff --git a/vendor/github.com/hashicorp/go-plugin/rpc_server.go b/vendor/github.com/hashicorp/go-plugin/rpc_server.go
index cec0a3d93a..a871663b39 100644
--- a/vendor/github.com/hashicorp/go-plugin/rpc_server.go
+++ b/vendor/github.com/hashicorp/go-plugin/rpc_server.go
@@ -69,7 +69,7 @@ func (s *RPCServer) ServeConn(conn io.ReadWriteCloser) {
// First create the yamux server to wrap this connection
mux, err := yamux.Server(conn, nil)
if err != nil {
- conn.Close()
+ _ = conn.Close()
log.Printf("[ERR] plugin: error creating yamux server: %s", err)
return
}
@@ -77,7 +77,7 @@ func (s *RPCServer) ServeConn(conn io.ReadWriteCloser) {
// Accept the control connection
control, err := mux.Accept()
if err != nil {
- mux.Close()
+ _ = mux.Close()
if err != io.EOF {
log.Printf("[ERR] plugin: error accepting control connection: %s", err)
}
@@ -90,7 +90,7 @@ func (s *RPCServer) ServeConn(conn io.ReadWriteCloser) {
for i := range stdstream {
stdstream[i], err = mux.Accept()
if err != nil {
- mux.Close()
+ _ = mux.Close()
log.Printf("[ERR] plugin: accepting stream %d: %s", i, err)
return
}
@@ -107,10 +107,10 @@ func (s *RPCServer) ServeConn(conn io.ReadWriteCloser) {
// Use the control connection to build the dispenser and serve the
// connection.
server := rpc.NewServer()
- server.RegisterName("Control", &controlServer{
+ _ = server.RegisterName("Control", &controlServer{
server: s,
})
- server.RegisterName("Dispenser", &dispenseServer{
+ _ = server.RegisterName("Dispenser", &dispenseServer{
broker: broker,
plugins: s.Plugins,
})
diff --git a/vendor/github.com/hashicorp/go-plugin/server.go b/vendor/github.com/hashicorp/go-plugin/server.go
index e741bc7fa1..b05af92d19 100644
--- a/vendor/github.com/hashicorp/go-plugin/server.go
+++ b/vendor/github.com/hashicorp/go-plugin/server.go
@@ -290,7 +290,7 @@ func Serve(opts *ServeConfig) {
// Close the listener on return. We wrap this in a func() on purpose
// because the "listener" reference may change to TLS.
defer func() {
- listener.Close()
+ _ = listener.Close()
}()
var tlsConfig *tls.Config
@@ -443,7 +443,7 @@ func Serve(opts *ServeConfig) {
protocolLine += fmt.Sprintf("|%v", grpcBrokerMultiplexingSupported)
}
fmt.Printf("%s\n", protocolLine)
- os.Stdout.Sync()
+ _ = os.Stdout.Sync()
} else if ch := opts.Test.ReattachConfigCh; ch != nil {
// Send back the reattach config that can be used. This isn't
// quite ready if they connect immediately but the client should
@@ -505,7 +505,7 @@ func Serve(opts *ServeConfig) {
// Cancellation. We can stop the server by closing the listener.
// This isn't graceful at all but this is currently only used by
// tests and its our only way to stop.
- listener.Close()
+ _ = listener.Close()
// If this is a grpc server, then we also ask the server itself to
// end which will kill all connections. There isn't an easy way to do
@@ -546,7 +546,7 @@ func serverListener_tcp() (net.Listener, error) {
default:
minPort, err = strconv.ParseInt(envMinPort, 10, 32)
if err != nil {
- return nil, fmt.Errorf("Couldn't get value from PLUGIN_MIN_PORT: %v", err)
+ return nil, fmt.Errorf("couldn't get value from PLUGIN_MIN_PORT: %v", err)
}
}
@@ -556,7 +556,7 @@ func serverListener_tcp() (net.Listener, error) {
default:
maxPort, err = strconv.ParseInt(envMaxPort, 10, 32)
if err != nil {
- return nil, fmt.Errorf("Couldn't get value from PLUGIN_MAX_PORT: %v", err)
+ return nil, fmt.Errorf("couldn't get value from PLUGIN_MAX_PORT: %v", err)
}
}
@@ -572,7 +572,7 @@ func serverListener_tcp() (net.Listener, error) {
}
}
- return nil, errors.New("Couldn't bind plugin TCP listener")
+ return nil, errors.New("couldn't bind plugin TCP listener")
}
func serverListener_unix(unixSocketCfg UnixSocketConfig) (net.Listener, error) {
diff --git a/vendor/github.com/hashicorp/go-plugin/testing.go b/vendor/github.com/hashicorp/go-plugin/testing.go
index a8735dfc8c..477076da41 100644
--- a/vendor/github.com/hashicorp/go-plugin/testing.go
+++ b/vendor/github.com/hashicorp/go-plugin/testing.go
@@ -9,11 +9,12 @@ import (
"io"
"net"
"net/rpc"
+ "testing"
hclog "github.com/hashicorp/go-hclog"
"github.com/hashicorp/go-plugin/internal/grpcmux"
- "github.com/mitchellh/go-testing-interface"
"google.golang.org/grpc"
+ "google.golang.org/grpc/credentials/insecure"
)
// TestOptions allows specifying options that can affect the behavior of the
@@ -33,7 +34,7 @@ type TestOptions struct {
// TestConn is a helper function for returning a client and server
// net.Conn connected to each other.
-func TestConn(t testing.T) (net.Conn, net.Conn) {
+func TestConn(t testing.TB) (net.Conn, net.Conn) {
// Listen to any local port. This listener will be closed
// after a single connection is established.
l, err := net.Listen("tcp", "127.0.0.1:0")
@@ -46,7 +47,7 @@ func TestConn(t testing.T) (net.Conn, net.Conn) {
doneCh := make(chan struct{})
go func() {
defer close(doneCh)
- defer l.Close()
+ defer func() { _ = l.Close() }()
var err error
serverConn, err = l.Accept()
if err != nil {
@@ -67,7 +68,7 @@ func TestConn(t testing.T) (net.Conn, net.Conn) {
}
// TestRPCConn returns a rpc client and server connected to each other.
-func TestRPCConn(t testing.T) (*rpc.Client, *rpc.Server) {
+func TestRPCConn(t testing.TB) (*rpc.Client, *rpc.Server) {
clientConn, serverConn := TestConn(t)
server := rpc.NewServer()
@@ -79,7 +80,7 @@ func TestRPCConn(t testing.T) (*rpc.Client, *rpc.Server) {
// TestPluginRPCConn returns a plugin RPC client and server that are connected
// together and configured.
-func TestPluginRPCConn(t testing.T, ps map[string]Plugin, opts *TestOptions) (*RPCClient, *RPCServer) {
+func TestPluginRPCConn(t testing.TB, ps map[string]Plugin, opts *TestOptions) (*RPCClient, *RPCServer) {
// Create two net.Conns we can use to shuttle our control connection
clientConn, serverConn := TestConn(t)
@@ -107,7 +108,7 @@ func TestPluginRPCConn(t testing.T, ps map[string]Plugin, opts *TestOptions) (*R
// TestGRPCConn returns a gRPC client conn and grpc server that are connected
// together and configured. The register function is used to register services
// prior to the Serve call. This is used to test gRPC connections.
-func TestGRPCConn(t testing.T, register func(*grpc.Server)) (*grpc.ClientConn, *grpc.Server) {
+func TestGRPCConn(t testing.TB, register func(*grpc.Server)) (*grpc.ClientConn, *grpc.Server) {
// Create a listener
l, err := net.Listen("tcp", "127.0.0.1:0")
if err != nil {
@@ -116,26 +117,27 @@ func TestGRPCConn(t testing.T, register func(*grpc.Server)) (*grpc.ClientConn, *
server := grpc.NewServer()
register(server)
- go server.Serve(l)
+ go func() { _ = server.Serve(l) }()
// Connect to the server
conn, err := grpc.Dial(
l.Addr().String(),
grpc.WithBlock(),
- grpc.WithInsecure())
+ grpc.WithTransportCredentials(insecure.NewCredentials()),
+ )
if err != nil {
t.Fatalf("err: %s", err)
}
// Connection successful, close the listener
- l.Close()
+ _ = l.Close()
return conn, server
}
// TestPluginGRPCConn returns a plugin gRPC client and server that are connected
// together and configured. This is used to test gRPC connections.
-func TestPluginGRPCConn(t testing.T, multiplex bool, ps map[string]Plugin) (*GRPCClient, *GRPCServer) {
+func TestPluginGRPCConn(t testing.TB, multiplex bool, ps map[string]Plugin) (*GRPCClient, *GRPCServer) {
// Create a listener
ln, err := serverListener(UnixSocketConfig{})
if err != nil {
diff --git a/vendor/github.com/hashicorp/go-retryablehttp/.gitignore b/vendor/github.com/hashicorp/go-retryablehttp/.gitignore
new file mode 100644
index 0000000000..4e309e0b32
--- /dev/null
+++ b/vendor/github.com/hashicorp/go-retryablehttp/.gitignore
@@ -0,0 +1,4 @@
+.idea/
+*.iml
+*.test
+.vscode/
\ No newline at end of file
diff --git a/vendor/github.com/hashicorp/go-retryablehttp/.go-version b/vendor/github.com/hashicorp/go-retryablehttp/.go-version
new file mode 100644
index 0000000000..6fee2fedb0
--- /dev/null
+++ b/vendor/github.com/hashicorp/go-retryablehttp/.go-version
@@ -0,0 +1 @@
+1.22.2
diff --git a/vendor/github.com/hashicorp/go-retryablehttp/CHANGELOG.md b/vendor/github.com/hashicorp/go-retryablehttp/CHANGELOG.md
new file mode 100644
index 0000000000..68a627c6d9
--- /dev/null
+++ b/vendor/github.com/hashicorp/go-retryablehttp/CHANGELOG.md
@@ -0,0 +1,33 @@
+## 0.7.7 (May 30, 2024)
+
+BUG FIXES:
+
+- client: avoid potentially leaking URL-embedded basic authentication credentials in logs (#158)
+
+## 0.7.6 (May 9, 2024)
+
+ENHANCEMENTS:
+
+- client: support a `RetryPrepare` function for modifying the request before retrying (#216)
+- client: support HTTP-date values for `Retry-After` header value (#138)
+- client: avoid reading entire body when the body is a `*bytes.Reader` (#197)
+
+BUG FIXES:
+
+- client: fix a broken check for invalid server certificate in go 1.20+ (#210)
+
+## 0.7.5 (Nov 8, 2023)
+
+BUG FIXES:
+
+- client: fixes an issue where the request body is not preserved on temporary redirects or re-established HTTP/2 connections (#207)
+
+## 0.7.4 (Jun 6, 2023)
+
+BUG FIXES:
+
+- client: fixing an issue where the Content-Type header wouldn't be sent with an empty payload when using HTTP/2 (#194)
+
+## 0.7.3 (May 15, 2023)
+
+Initial release
diff --git a/vendor/github.com/hashicorp/go-retryablehttp/CODEOWNERS b/vendor/github.com/hashicorp/go-retryablehttp/CODEOWNERS
new file mode 100644
index 0000000000..d6dd78a2dd
--- /dev/null
+++ b/vendor/github.com/hashicorp/go-retryablehttp/CODEOWNERS
@@ -0,0 +1 @@
+* @hashicorp/go-retryablehttp-maintainers
diff --git a/vendor/github.com/hashicorp/go-retryablehttp/LICENSE b/vendor/github.com/hashicorp/go-retryablehttp/LICENSE
new file mode 100644
index 0000000000..f4f97ee585
--- /dev/null
+++ b/vendor/github.com/hashicorp/go-retryablehttp/LICENSE
@@ -0,0 +1,365 @@
+Copyright (c) 2015 HashiCorp, Inc.
+
+Mozilla Public License, version 2.0
+
+1. Definitions
+
+1.1. "Contributor"
+
+ means each individual or legal entity that creates, contributes to the
+ creation of, or owns Covered Software.
+
+1.2. "Contributor Version"
+
+ means the combination of the Contributions of others (if any) used by a
+ Contributor and that particular Contributor's Contribution.
+
+1.3. "Contribution"
+
+ means Covered Software of a particular Contributor.
+
+1.4. "Covered Software"
+
+ means Source Code Form to which the initial Contributor has attached the
+ notice in Exhibit A, the Executable Form of such Source Code Form, and
+ Modifications of such Source Code Form, in each case including portions
+ thereof.
+
+1.5. "Incompatible With Secondary Licenses"
+ means
+
+ a. that the initial Contributor has attached the notice described in
+ Exhibit B to the Covered Software; or
+
+ b. that the Covered Software was made available under the terms of
+ version 1.1 or earlier of the License, but not also under the terms of
+ a Secondary License.
+
+1.6. "Executable Form"
+
+ means any form of the work other than Source Code Form.
+
+1.7. "Larger Work"
+
+ means a work that combines Covered Software with other material, in a
+ separate file or files, that is not Covered Software.
+
+1.8. "License"
+
+ means this document.
+
+1.9. "Licensable"
+
+ means having the right to grant, to the maximum extent possible, whether
+ at the time of the initial grant or subsequently, any and all of the
+ rights conveyed by this License.
+
+1.10. "Modifications"
+
+ means any of the following:
+
+ a. any file in Source Code Form that results from an addition to,
+ deletion from, or modification of the contents of Covered Software; or
+
+ b. any new file in Source Code Form that contains any Covered Software.
+
+1.11. "Patent Claims" of a Contributor
+
+ means any patent claim(s), including without limitation, method,
+ process, and apparatus claims, in any patent Licensable by such
+ Contributor that would be infringed, but for the grant of the License,
+ by the making, using, selling, offering for sale, having made, import,
+ or transfer of either its Contributions or its Contributor Version.
+
+1.12. "Secondary License"
+
+ means either the GNU General Public License, Version 2.0, the GNU Lesser
+ General Public License, Version 2.1, the GNU Affero General Public
+ License, Version 3.0, or any later versions of those licenses.
+
+1.13. "Source Code Form"
+
+ means the form of the work preferred for making modifications.
+
+1.14. "You" (or "Your")
+
+ means an individual or a legal entity exercising rights under this
+ License. For legal entities, "You" includes any entity that controls, is
+ controlled by, or is under common control with You. For purposes of this
+ definition, "control" means (a) the power, direct or indirect, to cause
+ the direction or management of such entity, whether by contract or
+ otherwise, or (b) ownership of more than fifty percent (50%) of the
+ outstanding shares or beneficial ownership of such entity.
+
+
+2. License Grants and Conditions
+
+2.1. Grants
+
+ Each Contributor hereby grants You a world-wide, royalty-free,
+ non-exclusive license:
+
+ a. under intellectual property rights (other than patent or trademark)
+ Licensable by such Contributor to use, reproduce, make available,
+ modify, display, perform, distribute, and otherwise exploit its
+ Contributions, either on an unmodified basis, with Modifications, or
+ as part of a Larger Work; and
+
+ b. under Patent Claims of such Contributor to make, use, sell, offer for
+ sale, have made, import, and otherwise transfer either its
+ Contributions or its Contributor Version.
+
+2.2. Effective Date
+
+ The licenses granted in Section 2.1 with respect to any Contribution
+ become effective for each Contribution on the date the Contributor first
+ distributes such Contribution.
+
+2.3. Limitations on Grant Scope
+
+ The licenses granted in this Section 2 are the only rights granted under
+ this License. No additional rights or licenses will be implied from the
+ distribution or licensing of Covered Software under this License.
+ Notwithstanding Section 2.1(b) above, no patent license is granted by a
+ Contributor:
+
+ a. for any code that a Contributor has removed from Covered Software; or
+
+ b. for infringements caused by: (i) Your and any other third party's
+ modifications of Covered Software, or (ii) the combination of its
+ Contributions with other software (except as part of its Contributor
+ Version); or
+
+ c. under Patent Claims infringed by Covered Software in the absence of
+ its Contributions.
+
+ This License does not grant any rights in the trademarks, service marks,
+ or logos of any Contributor (except as may be necessary to comply with
+ the notice requirements in Section 3.4).
+
+2.4. Subsequent Licenses
+
+ No Contributor makes additional grants as a result of Your choice to
+ distribute the Covered Software under a subsequent version of this
+ License (see Section 10.2) or under the terms of a Secondary License (if
+ permitted under the terms of Section 3.3).
+
+2.5. Representation
+
+ Each Contributor represents that the Contributor believes its
+ Contributions are its original creation(s) or it has sufficient rights to
+ grant the rights to its Contributions conveyed by this License.
+
+2.6. Fair Use
+
+ This License is not intended to limit any rights You have under
+ applicable copyright doctrines of fair use, fair dealing, or other
+ equivalents.
+
+2.7. Conditions
+
+ Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in
+ Section 2.1.
+
+
+3. Responsibilities
+
+3.1. Distribution of Source Form
+
+ All distribution of Covered Software in Source Code Form, including any
+ Modifications that You create or to which You contribute, must be under
+ the terms of this License. You must inform recipients that the Source
+ Code Form of the Covered Software is governed by the terms of this
+ License, and how they can obtain a copy of this License. You may not
+ attempt to alter or restrict the recipients' rights in the Source Code
+ Form.
+
+3.2. Distribution of Executable Form
+
+ If You distribute Covered Software in Executable Form then:
+
+ a. such Covered Software must also be made available in Source Code Form,
+ as described in Section 3.1, and You must inform recipients of the
+ Executable Form how they can obtain a copy of such Source Code Form by
+ reasonable means in a timely manner, at a charge no more than the cost
+ of distribution to the recipient; and
+
+ b. You may distribute such Executable Form under the terms of this
+ License, or sublicense it under different terms, provided that the
+ license for the Executable Form does not attempt to limit or alter the
+ recipients' rights in the Source Code Form under this License.
+
+3.3. Distribution of a Larger Work
+
+ You may create and distribute a Larger Work under terms of Your choice,
+ provided that You also comply with the requirements of this License for
+ the Covered Software. If the Larger Work is a combination of Covered
+ Software with a work governed by one or more Secondary Licenses, and the
+ Covered Software is not Incompatible With Secondary Licenses, this
+ License permits You to additionally distribute such Covered Software
+ under the terms of such Secondary License(s), so that the recipient of
+ the Larger Work may, at their option, further distribute the Covered
+ Software under the terms of either this License or such Secondary
+ License(s).
+
+3.4. Notices
+
+ You may not remove or alter the substance of any license notices
+ (including copyright notices, patent notices, disclaimers of warranty, or
+ limitations of liability) contained within the Source Code Form of the
+ Covered Software, except that You may alter any license notices to the
+ extent required to remedy known factual inaccuracies.
+
+3.5. Application of Additional Terms
+
+ You may choose to offer, and to charge a fee for, warranty, support,
+ indemnity or liability obligations to one or more recipients of Covered
+ Software. However, You may do so only on Your own behalf, and not on
+ behalf of any Contributor. You must make it absolutely clear that any
+ such warranty, support, indemnity, or liability obligation is offered by
+ You alone, and You hereby agree to indemnify every Contributor for any
+ liability incurred by such Contributor as a result of warranty, support,
+ indemnity or liability terms You offer. You may include additional
+ disclaimers of warranty and limitations of liability specific to any
+ jurisdiction.
+
+4. Inability to Comply Due to Statute or Regulation
+
+ If it is impossible for You to comply with any of the terms of this License
+ with respect to some or all of the Covered Software due to statute,
+ judicial order, or regulation then You must: (a) comply with the terms of
+ this License to the maximum extent possible; and (b) describe the
+ limitations and the code they affect. Such description must be placed in a
+ text file included with all distributions of the Covered Software under
+ this License. Except to the extent prohibited by statute or regulation,
+ such description must be sufficiently detailed for a recipient of ordinary
+ skill to be able to understand it.
+
+5. Termination
+
+5.1. The rights granted under this License will terminate automatically if You
+ fail to comply with any of its terms. However, if You become compliant,
+ then the rights granted under this License from a particular Contributor
+ are reinstated (a) provisionally, unless and until such Contributor
+ explicitly and finally terminates Your grants, and (b) on an ongoing
+ basis, if such Contributor fails to notify You of the non-compliance by
+ some reasonable means prior to 60 days after You have come back into
+ compliance. Moreover, Your grants from a particular Contributor are
+ reinstated on an ongoing basis if such Contributor notifies You of the
+ non-compliance by some reasonable means, this is the first time You have
+ received notice of non-compliance with this License from such
+ Contributor, and You become compliant prior to 30 days after Your receipt
+ of the notice.
+
+5.2. If You initiate litigation against any entity by asserting a patent
+ infringement claim (excluding declaratory judgment actions,
+ counter-claims, and cross-claims) alleging that a Contributor Version
+ directly or indirectly infringes any patent, then the rights granted to
+ You by any and all Contributors for the Covered Software under Section
+ 2.1 of this License shall terminate.
+
+5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user
+ license agreements (excluding distributors and resellers) which have been
+ validly granted by You or Your distributors under this License prior to
+ termination shall survive termination.
+
+6. Disclaimer of Warranty
+
+ Covered Software is provided under this License on an "as is" basis,
+ without warranty of any kind, either expressed, implied, or statutory,
+ including, without limitation, warranties that the Covered Software is free
+ of defects, merchantable, fit for a particular purpose or non-infringing.
+ The entire risk as to the quality and performance of the Covered Software
+ is with You. Should any Covered Software prove defective in any respect,
+ You (not any Contributor) assume the cost of any necessary servicing,
+ repair, or correction. This disclaimer of warranty constitutes an essential
+ part of this License. No use of any Covered Software is authorized under
+ this License except under this disclaimer.
+
+7. Limitation of Liability
+
+ Under no circumstances and under no legal theory, whether tort (including
+ negligence), contract, or otherwise, shall any Contributor, or anyone who
+ distributes Covered Software as permitted above, be liable to You for any
+ direct, indirect, special, incidental, or consequential damages of any
+ character including, without limitation, damages for lost profits, loss of
+ goodwill, work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses, even if such party shall have been
+ informed of the possibility of such damages. This limitation of liability
+ shall not apply to liability for death or personal injury resulting from
+ such party's negligence to the extent applicable law prohibits such
+ limitation. Some jurisdictions do not allow the exclusion or limitation of
+ incidental or consequential damages, so this exclusion and limitation may
+ not apply to You.
+
+8. Litigation
+
+ Any litigation relating to this License may be brought only in the courts
+ of a jurisdiction where the defendant maintains its principal place of
+ business and such litigation shall be governed by laws of that
+ jurisdiction, without reference to its conflict-of-law provisions. Nothing
+ in this Section shall prevent a party's ability to bring cross-claims or
+ counter-claims.
+
+9. Miscellaneous
+
+ This License represents the complete agreement concerning the subject
+ matter hereof. If any provision of this License is held to be
+ unenforceable, such provision shall be reformed only to the extent
+ necessary to make it enforceable. Any law or regulation which provides that
+ the language of a contract shall be construed against the drafter shall not
+ be used to construe this License against a Contributor.
+
+
+10. Versions of the License
+
+10.1. New Versions
+
+ Mozilla Foundation is the license steward. Except as provided in Section
+ 10.3, no one other than the license steward has the right to modify or
+ publish new versions of this License. Each version will be given a
+ distinguishing version number.
+
+10.2. Effect of New Versions
+
+ You may distribute the Covered Software under the terms of the version
+ of the License under which You originally received the Covered Software,
+ or under the terms of any subsequent version published by the license
+ steward.
+
+10.3. Modified Versions
+
+ If you create software not governed by this License, and you want to
+ create a new license for such software, you may create and use a
+ modified version of this License if you rename the license and remove
+ any references to the name of the license steward (except to note that
+ such modified license differs from this License).
+
+10.4. Distributing Source Code Form that is Incompatible With Secondary
+ Licenses If You choose to distribute Source Code Form that is
+ Incompatible With Secondary Licenses under the terms of this version of
+ the License, the notice described in Exhibit B of this License must be
+ attached.
+
+Exhibit A - Source Code Form License Notice
+
+ This Source Code Form is subject to the
+ terms of the Mozilla Public License, v.
+ 2.0. If a copy of the MPL was not
+ distributed with this file, You can
+ obtain one at
+ http://mozilla.org/MPL/2.0/.
+
+If it is not possible or desirable to put the notice in a particular file,
+then You may include the notice in a location (such as a LICENSE file in a
+relevant directory) where a recipient would be likely to look for such a
+notice.
+
+You may add additional accurate notices of copyright ownership.
+
+Exhibit B - "Incompatible With Secondary Licenses" Notice
+
+ This Source Code Form is "Incompatible
+ With Secondary Licenses", as defined by
+ the Mozilla Public License, v. 2.0.
+
diff --git a/vendor/github.com/hashicorp/go-retryablehttp/Makefile b/vendor/github.com/hashicorp/go-retryablehttp/Makefile
new file mode 100644
index 0000000000..5255241961
--- /dev/null
+++ b/vendor/github.com/hashicorp/go-retryablehttp/Makefile
@@ -0,0 +1,11 @@
+default: test
+
+test:
+ go vet ./...
+ go test -v -race ./...
+
+updatedeps:
+ go get -f -t -u ./...
+ go get -f -u ./...
+
+.PHONY: default test updatedeps
diff --git a/vendor/github.com/hashicorp/go-retryablehttp/README.md b/vendor/github.com/hashicorp/go-retryablehttp/README.md
new file mode 100644
index 0000000000..145a62f218
--- /dev/null
+++ b/vendor/github.com/hashicorp/go-retryablehttp/README.md
@@ -0,0 +1,62 @@
+go-retryablehttp
+================
+
+[][travis]
+[][godocs]
+
+[travis]: http://travis-ci.org/hashicorp/go-retryablehttp
+[godocs]: http://godoc.org/github.com/hashicorp/go-retryablehttp
+
+The `retryablehttp` package provides a familiar HTTP client interface with
+automatic retries and exponential backoff. It is a thin wrapper over the
+standard `net/http` client library and exposes nearly the same public API. This
+makes `retryablehttp` very easy to drop into existing programs.
+
+`retryablehttp` performs automatic retries under certain conditions. Mainly, if
+an error is returned by the client (connection errors, etc.), or if a 500-range
+response code is received (except 501), then a retry is invoked after a wait
+period. Otherwise, the response is returned and left to the caller to
+interpret.
+
+The main difference from `net/http` is that requests which take a request body
+(POST/PUT et. al) can have the body provided in a number of ways (some more or
+less efficient) that allow "rewinding" the request body if the initial request
+fails so that the full request can be attempted again. See the
+[godoc](http://godoc.org/github.com/hashicorp/go-retryablehttp) for more
+details.
+
+Version 0.6.0 and before are compatible with Go prior to 1.12. From 0.6.1 onward, Go 1.12+ is required.
+From 0.6.7 onward, Go 1.13+ is required.
+
+Example Use
+===========
+
+Using this library should look almost identical to what you would do with
+`net/http`. The most simple example of a GET request is shown below:
+
+```go
+resp, err := retryablehttp.Get("/foo")
+if err != nil {
+ panic(err)
+}
+```
+
+The returned response object is an `*http.Response`, the same thing you would
+usually get from `net/http`. Had the request failed one or more times, the above
+call would block and retry with exponential backoff.
+
+## Getting a stdlib `*http.Client` with retries
+
+It's possible to convert a `*retryablehttp.Client` directly to a `*http.Client`.
+This makes use of retryablehttp broadly applicable with minimal effort. Simply
+configure a `*retryablehttp.Client` as you wish, and then call `StandardClient()`:
+
+```go
+retryClient := retryablehttp.NewClient()
+retryClient.RetryMax = 10
+
+standardClient := retryClient.StandardClient() // *http.Client
+```
+
+For more usage and examples see the
+[pkg.go.dev](https://pkg.go.dev/github.com/hashicorp/go-retryablehttp).
diff --git a/vendor/github.com/hashicorp/go-retryablehttp/cert_error_go119.go b/vendor/github.com/hashicorp/go-retryablehttp/cert_error_go119.go
new file mode 100644
index 0000000000..b2b27e8722
--- /dev/null
+++ b/vendor/github.com/hashicorp/go-retryablehttp/cert_error_go119.go
@@ -0,0 +1,14 @@
+// Copyright (c) HashiCorp, Inc.
+// SPDX-License-Identifier: MPL-2.0
+
+//go:build !go1.20
+// +build !go1.20
+
+package retryablehttp
+
+import "crypto/x509"
+
+func isCertError(err error) bool {
+ _, ok := err.(x509.UnknownAuthorityError)
+ return ok
+}
diff --git a/vendor/github.com/hashicorp/go-retryablehttp/cert_error_go120.go b/vendor/github.com/hashicorp/go-retryablehttp/cert_error_go120.go
new file mode 100644
index 0000000000..a3cd315a28
--- /dev/null
+++ b/vendor/github.com/hashicorp/go-retryablehttp/cert_error_go120.go
@@ -0,0 +1,14 @@
+// Copyright (c) HashiCorp, Inc.
+// SPDX-License-Identifier: MPL-2.0
+
+//go:build go1.20
+// +build go1.20
+
+package retryablehttp
+
+import "crypto/tls"
+
+func isCertError(err error) bool {
+ _, ok := err.(*tls.CertificateVerificationError)
+ return ok
+}
diff --git a/vendor/github.com/hashicorp/go-retryablehttp/client.go b/vendor/github.com/hashicorp/go-retryablehttp/client.go
new file mode 100644
index 0000000000..efee53c400
--- /dev/null
+++ b/vendor/github.com/hashicorp/go-retryablehttp/client.go
@@ -0,0 +1,919 @@
+// Copyright (c) HashiCorp, Inc.
+// SPDX-License-Identifier: MPL-2.0
+
+// Package retryablehttp provides a familiar HTTP client interface with
+// automatic retries and exponential backoff. It is a thin wrapper over the
+// standard net/http client library and exposes nearly the same public API.
+// This makes retryablehttp very easy to drop into existing programs.
+//
+// retryablehttp performs automatic retries under certain conditions. Mainly, if
+// an error is returned by the client (connection errors etc), or if a 500-range
+// response is received, then a retry is invoked. Otherwise, the response is
+// returned and left to the caller to interpret.
+//
+// Requests which take a request body should provide a non-nil function
+// parameter. The best choice is to provide either a function satisfying
+// ReaderFunc which provides multiple io.Readers in an efficient manner, a
+// *bytes.Buffer (the underlying raw byte slice will be used) or a raw byte
+// slice. As it is a reference type, and we will wrap it as needed by readers,
+// we can efficiently re-use the request body without needing to copy it. If an
+// io.Reader (such as a *bytes.Reader) is provided, the full body will be read
+// prior to the first request, and will be efficiently re-used for any retries.
+// ReadSeeker can be used, but some users have observed occasional data races
+// between the net/http library and the Seek functionality of some
+// implementations of ReadSeeker, so should be avoided if possible.
+package retryablehttp
+
+import (
+ "bytes"
+ "context"
+ "fmt"
+ "io"
+ "log"
+ "math"
+ "math/rand"
+ "net/http"
+ "net/url"
+ "os"
+ "regexp"
+ "strconv"
+ "strings"
+ "sync"
+ "time"
+
+ cleanhttp "github.com/hashicorp/go-cleanhttp"
+)
+
+var (
+ // Default retry configuration
+ defaultRetryWaitMin = 1 * time.Second
+ defaultRetryWaitMax = 30 * time.Second
+ defaultRetryMax = 4
+
+ // defaultLogger is the logger provided with defaultClient
+ defaultLogger = log.New(os.Stderr, "", log.LstdFlags)
+
+ // defaultClient is used for performing requests without explicitly making
+ // a new client. It is purposely private to avoid modifications.
+ defaultClient = NewClient()
+
+ // We need to consume response bodies to maintain http connections, but
+ // limit the size we consume to respReadLimit.
+ respReadLimit = int64(4096)
+
+ // timeNow sets the function that returns the current time.
+ // This defaults to time.Now. Changes to this should only be done in tests.
+ timeNow = time.Now
+
+ // A regular expression to match the error returned by net/http when the
+ // configured number of redirects is exhausted. This error isn't typed
+ // specifically so we resort to matching on the error string.
+ redirectsErrorRe = regexp.MustCompile(`stopped after \d+ redirects\z`)
+
+ // A regular expression to match the error returned by net/http when the
+ // scheme specified in the URL is invalid. This error isn't typed
+ // specifically so we resort to matching on the error string.
+ schemeErrorRe = regexp.MustCompile(`unsupported protocol scheme`)
+
+ // A regular expression to match the error returned by net/http when a
+ // request header or value is invalid. This error isn't typed
+ // specifically so we resort to matching on the error string.
+ invalidHeaderErrorRe = regexp.MustCompile(`invalid header`)
+
+ // A regular expression to match the error returned by net/http when the
+ // TLS certificate is not trusted. This error isn't typed
+ // specifically so we resort to matching on the error string.
+ notTrustedErrorRe = regexp.MustCompile(`certificate is not trusted`)
+)
+
+// ReaderFunc is the type of function that can be given natively to NewRequest
+type ReaderFunc func() (io.Reader, error)
+
+// ResponseHandlerFunc is a type of function that takes in a Response, and does something with it.
+// The ResponseHandlerFunc is called when the HTTP client successfully receives a response and the
+// CheckRetry function indicates that a retry of the base request is not necessary.
+// If an error is returned from this function, the CheckRetry policy will be used to determine
+// whether to retry the whole request (including this handler).
+//
+// Make sure to check status codes! Even if the request was completed it may have a non-2xx status code.
+//
+// The response body is not automatically closed. It must be closed either by the ResponseHandlerFunc or
+// by the caller out-of-band. Failure to do so will result in a memory leak.
+type ResponseHandlerFunc func(*http.Response) error
+
+// LenReader is an interface implemented by many in-memory io.Reader's. Used
+// for automatically sending the right Content-Length header when possible.
+type LenReader interface {
+ Len() int
+}
+
+// Request wraps the metadata needed to create HTTP requests.
+type Request struct {
+ // body is a seekable reader over the request body payload. This is
+ // used to rewind the request data in between retries.
+ body ReaderFunc
+
+ responseHandler ResponseHandlerFunc
+
+ // Embed an HTTP request directly. This makes a *Request act exactly
+ // like an *http.Request so that all meta methods are supported.
+ *http.Request
+}
+
+// WithContext returns wrapped Request with a shallow copy of underlying *http.Request
+// with its context changed to ctx. The provided ctx must be non-nil.
+func (r *Request) WithContext(ctx context.Context) *Request {
+ return &Request{
+ body: r.body,
+ responseHandler: r.responseHandler,
+ Request: r.Request.WithContext(ctx),
+ }
+}
+
+// SetResponseHandler allows setting the response handler.
+func (r *Request) SetResponseHandler(fn ResponseHandlerFunc) {
+ r.responseHandler = fn
+}
+
+// BodyBytes allows accessing the request body. It is an analogue to
+// http.Request's Body variable, but it returns a copy of the underlying data
+// rather than consuming it.
+//
+// This function is not thread-safe; do not call it at the same time as another
+// call, or at the same time this request is being used with Client.Do.
+func (r *Request) BodyBytes() ([]byte, error) {
+ if r.body == nil {
+ return nil, nil
+ }
+ body, err := r.body()
+ if err != nil {
+ return nil, err
+ }
+ buf := new(bytes.Buffer)
+ _, err = buf.ReadFrom(body)
+ if err != nil {
+ return nil, err
+ }
+ return buf.Bytes(), nil
+}
+
+// SetBody allows setting the request body.
+//
+// It is useful if a new body needs to be set without constructing a new Request.
+func (r *Request) SetBody(rawBody interface{}) error {
+ bodyReader, contentLength, err := getBodyReaderAndContentLength(rawBody)
+ if err != nil {
+ return err
+ }
+ r.body = bodyReader
+ r.ContentLength = contentLength
+ if bodyReader != nil {
+ r.GetBody = func() (io.ReadCloser, error) {
+ body, err := bodyReader()
+ if err != nil {
+ return nil, err
+ }
+ if rc, ok := body.(io.ReadCloser); ok {
+ return rc, nil
+ }
+ return io.NopCloser(body), nil
+ }
+ } else {
+ r.GetBody = func() (io.ReadCloser, error) { return http.NoBody, nil }
+ }
+ return nil
+}
+
+// WriteTo allows copying the request body into a writer.
+//
+// It writes data to w until there's no more data to write or
+// when an error occurs. The return int64 value is the number of bytes
+// written. Any error encountered during the write is also returned.
+// The signature matches io.WriterTo interface.
+func (r *Request) WriteTo(w io.Writer) (int64, error) {
+ body, err := r.body()
+ if err != nil {
+ return 0, err
+ }
+ if c, ok := body.(io.Closer); ok {
+ defer c.Close()
+ }
+ return io.Copy(w, body)
+}
+
+func getBodyReaderAndContentLength(rawBody interface{}) (ReaderFunc, int64, error) {
+ var bodyReader ReaderFunc
+ var contentLength int64
+
+ switch body := rawBody.(type) {
+ // If they gave us a function already, great! Use it.
+ case ReaderFunc:
+ bodyReader = body
+ tmp, err := body()
+ if err != nil {
+ return nil, 0, err
+ }
+ if lr, ok := tmp.(LenReader); ok {
+ contentLength = int64(lr.Len())
+ }
+ if c, ok := tmp.(io.Closer); ok {
+ c.Close()
+ }
+
+ case func() (io.Reader, error):
+ bodyReader = body
+ tmp, err := body()
+ if err != nil {
+ return nil, 0, err
+ }
+ if lr, ok := tmp.(LenReader); ok {
+ contentLength = int64(lr.Len())
+ }
+ if c, ok := tmp.(io.Closer); ok {
+ c.Close()
+ }
+
+ // If a regular byte slice, we can read it over and over via new
+ // readers
+ case []byte:
+ buf := body
+ bodyReader = func() (io.Reader, error) {
+ return bytes.NewReader(buf), nil
+ }
+ contentLength = int64(len(buf))
+
+ // If a bytes.Buffer we can read the underlying byte slice over and
+ // over
+ case *bytes.Buffer:
+ buf := body
+ bodyReader = func() (io.Reader, error) {
+ return bytes.NewReader(buf.Bytes()), nil
+ }
+ contentLength = int64(buf.Len())
+
+ // We prioritize *bytes.Reader here because we don't really want to
+ // deal with it seeking so want it to match here instead of the
+ // io.ReadSeeker case.
+ case *bytes.Reader:
+ snapshot := *body
+ bodyReader = func() (io.Reader, error) {
+ r := snapshot
+ return &r, nil
+ }
+ contentLength = int64(body.Len())
+
+ // Compat case
+ case io.ReadSeeker:
+ raw := body
+ bodyReader = func() (io.Reader, error) {
+ _, err := raw.Seek(0, 0)
+ return io.NopCloser(raw), err
+ }
+ if lr, ok := raw.(LenReader); ok {
+ contentLength = int64(lr.Len())
+ }
+
+ // Read all in so we can reset
+ case io.Reader:
+ buf, err := io.ReadAll(body)
+ if err != nil {
+ return nil, 0, err
+ }
+ if len(buf) == 0 {
+ bodyReader = func() (io.Reader, error) {
+ return http.NoBody, nil
+ }
+ contentLength = 0
+ } else {
+ bodyReader = func() (io.Reader, error) {
+ return bytes.NewReader(buf), nil
+ }
+ contentLength = int64(len(buf))
+ }
+
+ // No body provided, nothing to do
+ case nil:
+
+ // Unrecognized type
+ default:
+ return nil, 0, fmt.Errorf("cannot handle type %T", rawBody)
+ }
+ return bodyReader, contentLength, nil
+}
+
+// FromRequest wraps an http.Request in a retryablehttp.Request
+func FromRequest(r *http.Request) (*Request, error) {
+ bodyReader, _, err := getBodyReaderAndContentLength(r.Body)
+ if err != nil {
+ return nil, err
+ }
+ // Could assert contentLength == r.ContentLength
+ return &Request{body: bodyReader, Request: r}, nil
+}
+
+// NewRequest creates a new wrapped request.
+func NewRequest(method, url string, rawBody interface{}) (*Request, error) {
+ return NewRequestWithContext(context.Background(), method, url, rawBody)
+}
+
+// NewRequestWithContext creates a new wrapped request with the provided context.
+//
+// The context controls the entire lifetime of a request and its response:
+// obtaining a connection, sending the request, and reading the response headers and body.
+func NewRequestWithContext(ctx context.Context, method, url string, rawBody interface{}) (*Request, error) {
+ httpReq, err := http.NewRequestWithContext(ctx, method, url, nil)
+ if err != nil {
+ return nil, err
+ }
+
+ req := &Request{
+ Request: httpReq,
+ }
+ if err := req.SetBody(rawBody); err != nil {
+ return nil, err
+ }
+
+ return req, nil
+}
+
+// Logger interface allows to use other loggers than
+// standard log.Logger.
+type Logger interface {
+ Printf(string, ...interface{})
+}
+
+// LeveledLogger is an interface that can be implemented by any logger or a
+// logger wrapper to provide leveled logging. The methods accept a message
+// string and a variadic number of key-value pairs. For log.Printf style
+// formatting where message string contains a format specifier, use Logger
+// interface.
+type LeveledLogger interface {
+ Error(msg string, keysAndValues ...interface{})
+ Info(msg string, keysAndValues ...interface{})
+ Debug(msg string, keysAndValues ...interface{})
+ Warn(msg string, keysAndValues ...interface{})
+}
+
+// hookLogger adapts an LeveledLogger to Logger for use by the existing hook functions
+// without changing the API.
+type hookLogger struct {
+ LeveledLogger
+}
+
+func (h hookLogger) Printf(s string, args ...interface{}) {
+ h.Info(fmt.Sprintf(s, args...))
+}
+
+// RequestLogHook allows a function to run before each retry. The HTTP
+// request which will be made, and the retry number (0 for the initial
+// request) are available to users. The internal logger is exposed to
+// consumers.
+type RequestLogHook func(Logger, *http.Request, int)
+
+// ResponseLogHook is like RequestLogHook, but allows running a function
+// on each HTTP response. This function will be invoked at the end of
+// every HTTP request executed, regardless of whether a subsequent retry
+// needs to be performed or not. If the response body is read or closed
+// from this method, this will affect the response returned from Do().
+type ResponseLogHook func(Logger, *http.Response)
+
+// CheckRetry specifies a policy for handling retries. It is called
+// following each request with the response and error values returned by
+// the http.Client. If CheckRetry returns false, the Client stops retrying
+// and returns the response to the caller. If CheckRetry returns an error,
+// that error value is returned in lieu of the error from the request. The
+// Client will close any response body when retrying, but if the retry is
+// aborted it is up to the CheckRetry callback to properly close any
+// response body before returning.
+type CheckRetry func(ctx context.Context, resp *http.Response, err error) (bool, error)
+
+// Backoff specifies a policy for how long to wait between retries.
+// It is called after a failing request to determine the amount of time
+// that should pass before trying again.
+type Backoff func(min, max time.Duration, attemptNum int, resp *http.Response) time.Duration
+
+// ErrorHandler is called if retries are expired, containing the last status
+// from the http library. If not specified, default behavior for the library is
+// to close the body and return an error indicating how many tries were
+// attempted. If overriding this, be sure to close the body if needed.
+type ErrorHandler func(resp *http.Response, err error, numTries int) (*http.Response, error)
+
+// PrepareRetry is called before retry operation. It can be used for example to re-sign the request
+type PrepareRetry func(req *http.Request) error
+
+// Client is used to make HTTP requests. It adds additional functionality
+// like automatic retries to tolerate minor outages.
+type Client struct {
+ HTTPClient *http.Client // Internal HTTP client.
+ Logger interface{} // Customer logger instance. Can be either Logger or LeveledLogger
+
+ RetryWaitMin time.Duration // Minimum time to wait
+ RetryWaitMax time.Duration // Maximum time to wait
+ RetryMax int // Maximum number of retries
+
+ // RequestLogHook allows a user-supplied function to be called
+ // before each retry.
+ RequestLogHook RequestLogHook
+
+ // ResponseLogHook allows a user-supplied function to be called
+ // with the response from each HTTP request executed.
+ ResponseLogHook ResponseLogHook
+
+ // CheckRetry specifies the policy for handling retries, and is called
+ // after each request. The default policy is DefaultRetryPolicy.
+ CheckRetry CheckRetry
+
+ // Backoff specifies the policy for how long to wait between retries
+ Backoff Backoff
+
+ // ErrorHandler specifies the custom error handler to use, if any
+ ErrorHandler ErrorHandler
+
+ // PrepareRetry can prepare the request for retry operation, for example re-sign it
+ PrepareRetry PrepareRetry
+
+ loggerInit sync.Once
+ clientInit sync.Once
+}
+
+// NewClient creates a new Client with default settings.
+func NewClient() *Client {
+ return &Client{
+ HTTPClient: cleanhttp.DefaultPooledClient(),
+ Logger: defaultLogger,
+ RetryWaitMin: defaultRetryWaitMin,
+ RetryWaitMax: defaultRetryWaitMax,
+ RetryMax: defaultRetryMax,
+ CheckRetry: DefaultRetryPolicy,
+ Backoff: DefaultBackoff,
+ }
+}
+
+func (c *Client) logger() interface{} {
+ c.loggerInit.Do(func() {
+ if c.Logger == nil {
+ return
+ }
+
+ switch c.Logger.(type) {
+ case Logger, LeveledLogger:
+ // ok
+ default:
+ // This should happen in dev when they are setting Logger and work on code, not in prod.
+ panic(fmt.Sprintf("invalid logger type passed, must be Logger or LeveledLogger, was %T", c.Logger))
+ }
+ })
+
+ return c.Logger
+}
+
+// DefaultRetryPolicy provides a default callback for Client.CheckRetry, which
+// will retry on connection errors and server errors.
+func DefaultRetryPolicy(ctx context.Context, resp *http.Response, err error) (bool, error) {
+ // do not retry on context.Canceled or context.DeadlineExceeded
+ if ctx.Err() != nil {
+ return false, ctx.Err()
+ }
+
+ // don't propagate other errors
+ shouldRetry, _ := baseRetryPolicy(resp, err)
+ return shouldRetry, nil
+}
+
+// ErrorPropagatedRetryPolicy is the same as DefaultRetryPolicy, except it
+// propagates errors back instead of returning nil. This allows you to inspect
+// why it decided to retry or not.
+func ErrorPropagatedRetryPolicy(ctx context.Context, resp *http.Response, err error) (bool, error) {
+ // do not retry on context.Canceled or context.DeadlineExceeded
+ if ctx.Err() != nil {
+ return false, ctx.Err()
+ }
+
+ return baseRetryPolicy(resp, err)
+}
+
+func baseRetryPolicy(resp *http.Response, err error) (bool, error) {
+ if err != nil {
+ if v, ok := err.(*url.Error); ok {
+ // Don't retry if the error was due to too many redirects.
+ if redirectsErrorRe.MatchString(v.Error()) {
+ return false, v
+ }
+
+ // Don't retry if the error was due to an invalid protocol scheme.
+ if schemeErrorRe.MatchString(v.Error()) {
+ return false, v
+ }
+
+ // Don't retry if the error was due to an invalid header.
+ if invalidHeaderErrorRe.MatchString(v.Error()) {
+ return false, v
+ }
+
+ // Don't retry if the error was due to TLS cert verification failure.
+ if notTrustedErrorRe.MatchString(v.Error()) {
+ return false, v
+ }
+ if isCertError(v.Err) {
+ return false, v
+ }
+ }
+
+ // The error is likely recoverable so retry.
+ return true, nil
+ }
+
+ // 429 Too Many Requests is recoverable. Sometimes the server puts
+ // a Retry-After response header to indicate when the server is
+ // available to start processing request from client.
+ if resp.StatusCode == http.StatusTooManyRequests {
+ return true, nil
+ }
+
+ // Check the response code. We retry on 500-range responses to allow
+ // the server time to recover, as 500's are typically not permanent
+ // errors and may relate to outages on the server side. This will catch
+ // invalid response codes as well, like 0 and 999.
+ if resp.StatusCode == 0 || (resp.StatusCode >= 500 && resp.StatusCode != http.StatusNotImplemented) {
+ return true, fmt.Errorf("unexpected HTTP status %s", resp.Status)
+ }
+
+ return false, nil
+}
+
+// DefaultBackoff provides a default callback for Client.Backoff which
+// will perform exponential backoff based on the attempt number and limited
+// by the provided minimum and maximum durations.
+//
+// It also tries to parse Retry-After response header when a http.StatusTooManyRequests
+// (HTTP Code 429) is found in the resp parameter. Hence it will return the number of
+// seconds the server states it may be ready to process more requests from this client.
+func DefaultBackoff(min, max time.Duration, attemptNum int, resp *http.Response) time.Duration {
+ if resp != nil {
+ if resp.StatusCode == http.StatusTooManyRequests || resp.StatusCode == http.StatusServiceUnavailable {
+ if sleep, ok := parseRetryAfterHeader(resp.Header["Retry-After"]); ok {
+ return sleep
+ }
+ }
+ }
+
+ mult := math.Pow(2, float64(attemptNum)) * float64(min)
+ sleep := time.Duration(mult)
+ if float64(sleep) != mult || sleep > max {
+ sleep = max
+ }
+ return sleep
+}
+
+// parseRetryAfterHeader parses the Retry-After header and returns the
+// delay duration according to the spec: https://httpwg.org/specs/rfc7231.html#header.retry-after
+// The bool returned will be true if the header was successfully parsed.
+// Otherwise, the header was either not present, or was not parseable according to the spec.
+//
+// Retry-After headers come in two flavors: Seconds or HTTP-Date
+//
+// Examples:
+// * Retry-After: Fri, 31 Dec 1999 23:59:59 GMT
+// * Retry-After: 120
+func parseRetryAfterHeader(headers []string) (time.Duration, bool) {
+ if len(headers) == 0 || headers[0] == "" {
+ return 0, false
+ }
+ header := headers[0]
+ // Retry-After: 120
+ if sleep, err := strconv.ParseInt(header, 10, 64); err == nil {
+ if sleep < 0 { // a negative sleep doesn't make sense
+ return 0, false
+ }
+ return time.Second * time.Duration(sleep), true
+ }
+
+ // Retry-After: Fri, 31 Dec 1999 23:59:59 GMT
+ retryTime, err := time.Parse(time.RFC1123, header)
+ if err != nil {
+ return 0, false
+ }
+ if until := retryTime.Sub(timeNow()); until > 0 {
+ return until, true
+ }
+ // date is in the past
+ return 0, true
+}
+
+// LinearJitterBackoff provides a callback for Client.Backoff which will
+// perform linear backoff based on the attempt number and with jitter to
+// prevent a thundering herd.
+//
+// min and max here are *not* absolute values. The number to be multiplied by
+// the attempt number will be chosen at random from between them, thus they are
+// bounding the jitter.
+//
+// For instance:
+// * To get strictly linear backoff of one second increasing each retry, set
+// both to one second (1s, 2s, 3s, 4s, ...)
+// * To get a small amount of jitter centered around one second increasing each
+// retry, set to around one second, such as a min of 800ms and max of 1200ms
+// (892ms, 2102ms, 2945ms, 4312ms, ...)
+// * To get extreme jitter, set to a very wide spread, such as a min of 100ms
+// and a max of 20s (15382ms, 292ms, 51321ms, 35234ms, ...)
+func LinearJitterBackoff(min, max time.Duration, attemptNum int, resp *http.Response) time.Duration {
+ // attemptNum always starts at zero but we want to start at 1 for multiplication
+ attemptNum++
+
+ if max <= min {
+ // Unclear what to do here, or they are the same, so return min *
+ // attemptNum
+ return min * time.Duration(attemptNum)
+ }
+
+ // Seed rand; doing this every time is fine
+ source := rand.New(rand.NewSource(int64(time.Now().Nanosecond())))
+
+ // Pick a random number that lies somewhere between the min and max and
+ // multiply by the attemptNum. attemptNum starts at zero so we always
+ // increment here. We first get a random percentage, then apply that to the
+ // difference between min and max, and add to min.
+ jitter := source.Float64() * float64(max-min)
+ jitterMin := int64(jitter) + int64(min)
+ return time.Duration(jitterMin * int64(attemptNum))
+}
+
+// PassthroughErrorHandler is an ErrorHandler that directly passes through the
+// values from the net/http library for the final request. The body is not
+// closed.
+func PassthroughErrorHandler(resp *http.Response, err error, _ int) (*http.Response, error) {
+ return resp, err
+}
+
+// Do wraps calling an HTTP method with retries.
+func (c *Client) Do(req *Request) (*http.Response, error) {
+ c.clientInit.Do(func() {
+ if c.HTTPClient == nil {
+ c.HTTPClient = cleanhttp.DefaultPooledClient()
+ }
+ })
+
+ logger := c.logger()
+
+ if logger != nil {
+ switch v := logger.(type) {
+ case LeveledLogger:
+ v.Debug("performing request", "method", req.Method, "url", redactURL(req.URL))
+ case Logger:
+ v.Printf("[DEBUG] %s %s", req.Method, redactURL(req.URL))
+ }
+ }
+
+ var resp *http.Response
+ var attempt int
+ var shouldRetry bool
+ var doErr, respErr, checkErr, prepareErr error
+
+ for i := 0; ; i++ {
+ doErr, respErr, prepareErr = nil, nil, nil
+ attempt++
+
+ // Always rewind the request body when non-nil.
+ if req.body != nil {
+ body, err := req.body()
+ if err != nil {
+ c.HTTPClient.CloseIdleConnections()
+ return resp, err
+ }
+ if c, ok := body.(io.ReadCloser); ok {
+ req.Body = c
+ } else {
+ req.Body = io.NopCloser(body)
+ }
+ }
+
+ if c.RequestLogHook != nil {
+ switch v := logger.(type) {
+ case LeveledLogger:
+ c.RequestLogHook(hookLogger{v}, req.Request, i)
+ case Logger:
+ c.RequestLogHook(v, req.Request, i)
+ default:
+ c.RequestLogHook(nil, req.Request, i)
+ }
+ }
+
+ // Attempt the request
+ resp, doErr = c.HTTPClient.Do(req.Request)
+
+ // Check if we should continue with retries.
+ shouldRetry, checkErr = c.CheckRetry(req.Context(), resp, doErr)
+ if !shouldRetry && doErr == nil && req.responseHandler != nil {
+ respErr = req.responseHandler(resp)
+ shouldRetry, checkErr = c.CheckRetry(req.Context(), resp, respErr)
+ }
+
+ err := doErr
+ if respErr != nil {
+ err = respErr
+ }
+ if err != nil {
+ switch v := logger.(type) {
+ case LeveledLogger:
+ v.Error("request failed", "error", err, "method", req.Method, "url", redactURL(req.URL))
+ case Logger:
+ v.Printf("[ERR] %s %s request failed: %v", req.Method, redactURL(req.URL), err)
+ }
+ } else {
+ // Call this here to maintain the behavior of logging all requests,
+ // even if CheckRetry signals to stop.
+ if c.ResponseLogHook != nil {
+ // Call the response logger function if provided.
+ switch v := logger.(type) {
+ case LeveledLogger:
+ c.ResponseLogHook(hookLogger{v}, resp)
+ case Logger:
+ c.ResponseLogHook(v, resp)
+ default:
+ c.ResponseLogHook(nil, resp)
+ }
+ }
+ }
+
+ if !shouldRetry {
+ break
+ }
+
+ // We do this before drainBody because there's no need for the I/O if
+ // we're breaking out
+ remain := c.RetryMax - i
+ if remain <= 0 {
+ break
+ }
+
+ // We're going to retry, consume any response to reuse the connection.
+ if doErr == nil {
+ c.drainBody(resp.Body)
+ }
+
+ wait := c.Backoff(c.RetryWaitMin, c.RetryWaitMax, i, resp)
+ if logger != nil {
+ desc := fmt.Sprintf("%s %s", req.Method, redactURL(req.URL))
+ if resp != nil {
+ desc = fmt.Sprintf("%s (status: %d)", desc, resp.StatusCode)
+ }
+ switch v := logger.(type) {
+ case LeveledLogger:
+ v.Debug("retrying request", "request", desc, "timeout", wait, "remaining", remain)
+ case Logger:
+ v.Printf("[DEBUG] %s: retrying in %s (%d left)", desc, wait, remain)
+ }
+ }
+ timer := time.NewTimer(wait)
+ select {
+ case <-req.Context().Done():
+ timer.Stop()
+ c.HTTPClient.CloseIdleConnections()
+ return nil, req.Context().Err()
+ case <-timer.C:
+ }
+
+ // Make shallow copy of http Request so that we can modify its body
+ // without racing against the closeBody call in persistConn.writeLoop.
+ httpreq := *req.Request
+ req.Request = &httpreq
+
+ if c.PrepareRetry != nil {
+ if err := c.PrepareRetry(req.Request); err != nil {
+ prepareErr = err
+ break
+ }
+ }
+ }
+
+ // this is the closest we have to success criteria
+ if doErr == nil && respErr == nil && checkErr == nil && prepareErr == nil && !shouldRetry {
+ return resp, nil
+ }
+
+ defer c.HTTPClient.CloseIdleConnections()
+
+ var err error
+ if prepareErr != nil {
+ err = prepareErr
+ } else if checkErr != nil {
+ err = checkErr
+ } else if respErr != nil {
+ err = respErr
+ } else {
+ err = doErr
+ }
+
+ if c.ErrorHandler != nil {
+ return c.ErrorHandler(resp, err, attempt)
+ }
+
+ // By default, we close the response body and return an error without
+ // returning the response
+ if resp != nil {
+ c.drainBody(resp.Body)
+ }
+
+ // this means CheckRetry thought the request was a failure, but didn't
+ // communicate why
+ if err == nil {
+ return nil, fmt.Errorf("%s %s giving up after %d attempt(s)",
+ req.Method, redactURL(req.URL), attempt)
+ }
+
+ return nil, fmt.Errorf("%s %s giving up after %d attempt(s): %w",
+ req.Method, redactURL(req.URL), attempt, err)
+}
+
+// Try to read the response body so we can reuse this connection.
+func (c *Client) drainBody(body io.ReadCloser) {
+ defer body.Close()
+ _, err := io.Copy(io.Discard, io.LimitReader(body, respReadLimit))
+ if err != nil {
+ if c.logger() != nil {
+ switch v := c.logger().(type) {
+ case LeveledLogger:
+ v.Error("error reading response body", "error", err)
+ case Logger:
+ v.Printf("[ERR] error reading response body: %v", err)
+ }
+ }
+ }
+}
+
+// Get is a shortcut for doing a GET request without making a new client.
+func Get(url string) (*http.Response, error) {
+ return defaultClient.Get(url)
+}
+
+// Get is a convenience helper for doing simple GET requests.
+func (c *Client) Get(url string) (*http.Response, error) {
+ req, err := NewRequest("GET", url, nil)
+ if err != nil {
+ return nil, err
+ }
+ return c.Do(req)
+}
+
+// Head is a shortcut for doing a HEAD request without making a new client.
+func Head(url string) (*http.Response, error) {
+ return defaultClient.Head(url)
+}
+
+// Head is a convenience method for doing simple HEAD requests.
+func (c *Client) Head(url string) (*http.Response, error) {
+ req, err := NewRequest("HEAD", url, nil)
+ if err != nil {
+ return nil, err
+ }
+ return c.Do(req)
+}
+
+// Post is a shortcut for doing a POST request without making a new client.
+func Post(url, bodyType string, body interface{}) (*http.Response, error) {
+ return defaultClient.Post(url, bodyType, body)
+}
+
+// Post is a convenience method for doing simple POST requests.
+func (c *Client) Post(url, bodyType string, body interface{}) (*http.Response, error) {
+ req, err := NewRequest("POST", url, body)
+ if err != nil {
+ return nil, err
+ }
+ req.Header.Set("Content-Type", bodyType)
+ return c.Do(req)
+}
+
+// PostForm is a shortcut to perform a POST with form data without creating
+// a new client.
+func PostForm(url string, data url.Values) (*http.Response, error) {
+ return defaultClient.PostForm(url, data)
+}
+
+// PostForm is a convenience method for doing simple POST operations using
+// pre-filled url.Values form data.
+func (c *Client) PostForm(url string, data url.Values) (*http.Response, error) {
+ return c.Post(url, "application/x-www-form-urlencoded", strings.NewReader(data.Encode()))
+}
+
+// StandardClient returns a stdlib *http.Client with a custom Transport, which
+// shims in a *retryablehttp.Client for added retries.
+func (c *Client) StandardClient() *http.Client {
+ return &http.Client{
+ Transport: &RoundTripper{Client: c},
+ }
+}
+
+// Taken from url.URL#Redacted() which was introduced in go 1.15.
+// We can switch to using it directly if we'll bump the minimum required go version.
+func redactURL(u *url.URL) string {
+ if u == nil {
+ return ""
+ }
+
+ ru := *u
+ if _, has := ru.User.Password(); has {
+ ru.User = url.UserPassword(ru.User.Username(), "xxxxx")
+ }
+ return ru.String()
+}
diff --git a/vendor/github.com/hashicorp/go-retryablehttp/roundtripper.go b/vendor/github.com/hashicorp/go-retryablehttp/roundtripper.go
new file mode 100644
index 0000000000..8c407adb3b
--- /dev/null
+++ b/vendor/github.com/hashicorp/go-retryablehttp/roundtripper.go
@@ -0,0 +1,55 @@
+// Copyright (c) HashiCorp, Inc.
+// SPDX-License-Identifier: MPL-2.0
+
+package retryablehttp
+
+import (
+ "errors"
+ "net/http"
+ "net/url"
+ "sync"
+)
+
+// RoundTripper implements the http.RoundTripper interface, using a retrying
+// HTTP client to execute requests.
+//
+// It is important to note that retryablehttp doesn't always act exactly as a
+// RoundTripper should. This is highly dependent on the retryable client's
+// configuration.
+type RoundTripper struct {
+ // The client to use during requests. If nil, the default retryablehttp
+ // client and settings will be used.
+ Client *Client
+
+ // once ensures that the logic to initialize the default client runs at
+ // most once, in a single thread.
+ once sync.Once
+}
+
+// init initializes the underlying retryable client.
+func (rt *RoundTripper) init() {
+ if rt.Client == nil {
+ rt.Client = NewClient()
+ }
+}
+
+// RoundTrip satisfies the http.RoundTripper interface.
+func (rt *RoundTripper) RoundTrip(req *http.Request) (*http.Response, error) {
+ rt.once.Do(rt.init)
+
+ // Convert the request to be retryable.
+ retryableReq, err := FromRequest(req)
+ if err != nil {
+ return nil, err
+ }
+
+ // Execute the request.
+ resp, err := rt.Client.Do(retryableReq)
+ // If we got an error returned by standard library's `Do` method, unwrap it
+ // otherwise we will wind up erroneously re-nesting the error.
+ if _, ok := err.(*url.Error); ok {
+ return resp, errors.Unwrap(err)
+ }
+
+ return resp, err
+}
diff --git a/vendor/github.com/hashicorp/hc-install/.go-version b/vendor/github.com/hashicorp/hc-install/.go-version
index ce2dd53570..e4a973f913 100644
--- a/vendor/github.com/hashicorp/hc-install/.go-version
+++ b/vendor/github.com/hashicorp/hc-install/.go-version
@@ -1 +1 @@
-1.21.5
+1.24.2
diff --git a/vendor/github.com/hashicorp/hc-install/README.md b/vendor/github.com/hashicorp/hc-install/README.md
index 6e78b5a610..0d55191bf2 100644
--- a/vendor/github.com/hashicorp/hc-install/README.md
+++ b/vendor/github.com/hashicorp/hc-install/README.md
@@ -14,55 +14,55 @@ the library in ad-hoc or CI shell scripting outside of Go.
`hc-install` does **not**:
- - Determine suitable installation path based on target system. e.g. in `/usr/bin` or `/usr/local/bin` on Unix based system.
- - Deal with execution of installed binaries (via service files or otherwise).
- - Upgrade existing binaries on your system.
- - Add nor link downloaded binaries to your `$PATH`.
+- Determine suitable installation path based on target system. e.g. in `/usr/bin` or `/usr/local/bin` on Unix based system.
+- Deal with execution of installed binaries (via service files or otherwise).
+- Upgrade existing binaries on your system.
+- Add nor link downloaded binaries to your `$PATH`.
## API
The `Installer` offers a few high-level methods:
- - `Ensure(context.Context, []src.Source)` to find, install, or build a product version
- - `Install(context.Context, []src.Installable)` to install a product version
+- `Ensure(context.Context, []src.Source)` to find, install, or build a product version
+- `Install(context.Context, []src.Installable)` to install a product version
### Sources
The `Installer` methods accept number of different `Source` types.
Each comes with different trade-offs described below.
- - `fs.{AnyVersion,ExactVersion,Version}` - Finds a binary in `$PATH` (or additional paths)
- - **Pros:**
- - This is most convenient when you already have the product installed on your system
+- `fs.{AnyVersion,ExactVersion,Version}` - Finds a binary in `$PATH` (or additional paths)
+ - **Pros:**
+ - This is most convenient when you already have the product installed on your system
which you already manage.
- - **Cons:**
- - Only relies on a single version, expects _you_ to manage the installation
- - _Not recommended_ for any environment where product installation is not controlled or managed by you (e.g. default GitHub Actions image managed by GitHub)
- - `releases.{LatestVersion,ExactVersion}` - Downloads, verifies & installs any known product from `releases.hashicorp.com`
- - **Pros:**
- - Fast and reliable way of obtaining any pre-built version of any product
- - Allows installation of enterprise versions
- - **Cons:**
- - Installation may consume some bandwidth, disk space and a little time
- - Potentially less stable builds (see `checkpoint` below)
- - `checkpoint.LatestVersion` - Downloads, verifies & installs any known product available in HashiCorp Checkpoint
- - **Pros:**
- - Checkpoint typically contains only product versions considered stable
- - **Cons:**
- - Installation may consume some bandwidth, disk space and a little time
- - Currently doesn't allow installation of old versions or enterprise versions (see `releases` above)
- - `build.GitRevision` - Clones raw source code and builds the product from it
- - **Pros:**
- - Useful for catching bugs and incompatibilities as early as possible (prior to product release).
- - **Cons:**
- - Building from scratch can consume significant amount of time & resources (CPU, memory, bandwith, disk space)
- - There are no guarantees that build instructions will always be up-to-date
- - There's increased likelihood of build containing bugs prior to release
- - Any CI builds relying on this are likely to be fragile
+ - **Cons:**
+ - Only relies on a single version, expects _you_ to manage the installation
+ - _Not recommended_ for any environment where product installation is not controlled or managed by you (e.g. default GitHub Actions image managed by GitHub)
+- `releases.{LatestVersion,ExactVersion}` - Downloads, verifies & installs any known product from `releases.hashicorp.com`
+ - **Pros:**
+ - Fast and reliable way of obtaining any pre-built version of any product
+ - Allows installation of enterprise versions
+ - **Cons:**
+ - Installation may consume some bandwidth, disk space and a little time
+ - Potentially less stable builds (see `checkpoint` below)
+- `checkpoint.LatestVersion` - Downloads, verifies & installs any known product available in HashiCorp Checkpoint
+ - **Pros:**
+ - Checkpoint typically contains only product versions considered stable
+ - **Cons:**
+ - Installation may consume some bandwidth, disk space and a little time
+ - Currently doesn't allow installation of old versions or enterprise versions (see `releases` above)
+- `build.GitRevision` - Clones raw source code and builds the product from it
+ - **Pros:**
+ - Useful for catching bugs and incompatibilities as early as possible (prior to product release).
+ - **Cons:**
+ - Building from scratch can consume significant amount of time & resources (CPU, memory, bandwidth, disk space)
+ - There are no guarantees that build instructions will always be up-to-date
+ - There's increased likelihood of build containing bugs prior to release
+ - Any CI builds relying on this are likely to be fragile
## Example Usage
-See examples at https://pkg.go.dev/github.com/hashicorp/hc-install#example-Installer.
+See examples at .
## CLI
@@ -70,9 +70,9 @@ In addition to the Go library, which is the intended primary use case of `hc-ins
The CLI comes with some trade-offs:
- - more limited interface compared to the flexible Go API (installs specific versions of products via `releases.ExactVersion`)
- - minimal environment pre-requisites (no need to compile Go code)
- - see ["hc-install is not a package manager"](https://github.com/hashicorp/hc-install#hc-install-is-not-a-package-manager)
+- more limited interface compared to the flexible Go API (installs specific versions of products via `releases.ExactVersion`)
+- minimal environment pre-requisites (no need to compile Go code)
+- see ["hc-install is not a package manager"](https://github.com/hashicorp/hc-install#hc-install-is-not-a-package-manager)
### Installation
@@ -82,7 +82,7 @@ Given that one of the key roles of the CLI/library is integrity checking, you sh
[Homebrew](https://brew.sh)
-```
+```sh
brew install hashicorp/tap/hc-install
```
@@ -102,19 +102,23 @@ You can follow the instructions in the [Official Packaging Guide](https://www.ha
### Usage
-```
+```text
Usage: hc-install install [options] -version
This command installs a HashiCorp product.
Options:
-version [REQUIRED] Version of product to install.
- -path Path to directory where the product will be installed. Defaults
- to current working directory.
+ -path Path to directory where the product will be installed.
+ Defaults to current working directory.
+ -log-file Path to file where logs will be written. /dev/stdout
+ or /dev/stderr can be used to log to STDOUT/STDERR.
```
+
```sh
hc-install install -version 1.3.7 terraform
```
-```
+
+```sh
hc-install: will install terraform@1.3.7
installed terraform@1.3.7 to /current/working/dir/terraform
```
diff --git a/vendor/github.com/hashicorp/hc-install/catalog-info.yaml b/vendor/github.com/hashicorp/hc-install/catalog-info.yaml
new file mode 100644
index 0000000000..be5c06e9d1
--- /dev/null
+++ b/vendor/github.com/hashicorp/hc-install/catalog-info.yaml
@@ -0,0 +1,17 @@
+# Copyright (c) HashiCorp, Inc.
+# SPDX-License-Identifier: MPL-2.0
+#
+# Intended for internal HashiCorp use only
+apiVersion: backstage.io/v1alpha1
+kind: Component
+metadata:
+ name: hc-install
+ description: Go module for downloading or locating HashiCorp binaries
+ annotations:
+ github.com/project-slug: hashicorp/hc-install
+ jira/project-key: TF
+ jira/label: hc-install
+spec:
+ type: library
+ owner: terraform-core
+ lifecycle: production
diff --git a/vendor/github.com/hashicorp/hc-install/checkpoint/latest_version.go b/vendor/github.com/hashicorp/hc-install/checkpoint/latest_version.go
index 2cd5379fb8..a382cb1066 100644
--- a/vendor/github.com/hashicorp/hc-install/checkpoint/latest_version.go
+++ b/vendor/github.com/hashicorp/hc-install/checkpoint/latest_version.go
@@ -6,7 +6,7 @@ package checkpoint
import (
"context"
"fmt"
- "io/ioutil"
+ "io"
"log"
"os"
"path/filepath"
@@ -24,7 +24,7 @@ import (
var (
defaultTimeout = 30 * time.Second
- discardLogger = log.New(ioutil.Discard, "", 0)
+ discardLogger = log.New(io.Discard, "", 0)
)
// LatestVersion installs the latest version known to Checkpoint
@@ -35,6 +35,10 @@ type LatestVersion struct {
SkipChecksumVerification bool
InstallDir string
+ // LicenseDir represents directory path where to install license files.
+ // If empty, license files will placed in the same directory as the binary.
+ LicenseDir string
+
// ArmoredPublicKey is a public PGP key in ASCII/armor format to use
// instead of built-in pubkey to verify signature of downloaded checksums
ArmoredPublicKey string
@@ -101,7 +105,7 @@ func (lv *LatestVersion) Install(ctx context.Context) (string, error) {
if dstDir == "" {
var err error
dirName := fmt.Sprintf("%s_*", lv.Product.Name)
- dstDir, err = ioutil.TempDir("", dirName)
+ dstDir, err = os.MkdirTemp("", dirName)
if err != nil {
return "", err
}
@@ -126,9 +130,11 @@ func (lv *LatestVersion) Install(ctx context.Context) (string, error) {
if lv.ArmoredPublicKey != "" {
d.ArmoredPublicKey = lv.ArmoredPublicKey
}
- zipFilePath, err := d.DownloadAndUnpack(ctx, pv, dstDir, "")
- if zipFilePath != "" {
- lv.pathsToRemove = append(lv.pathsToRemove, zipFilePath)
+
+ licenseDir := lv.LicenseDir
+ up, err := d.DownloadAndUnpack(ctx, pv, dstDir, licenseDir)
+ if up != nil {
+ lv.pathsToRemove = append(lv.pathsToRemove, up.PathsToRemove...)
}
if err != nil {
return "", err
diff --git a/vendor/github.com/hashicorp/hc-install/fs/fs.go b/vendor/github.com/hashicorp/hc-install/fs/fs.go
index 216df2c2cd..ac6f5cf9cd 100644
--- a/vendor/github.com/hashicorp/hc-install/fs/fs.go
+++ b/vendor/github.com/hashicorp/hc-install/fs/fs.go
@@ -4,14 +4,14 @@
package fs
import (
- "io/ioutil"
+ "io"
"log"
"time"
)
var (
defaultTimeout = 10 * time.Second
- discardLogger = log.New(ioutil.Discard, "", 0)
+ discardLogger = log.New(io.Discard, "", 0)
)
type fileCheckFunc func(path string) error
diff --git a/vendor/github.com/hashicorp/hc-install/fs/fs_unix.go b/vendor/github.com/hashicorp/hc-install/fs/fs_unix.go
index eebd98b82c..5aed844484 100644
--- a/vendor/github.com/hashicorp/hc-install/fs/fs_unix.go
+++ b/vendor/github.com/hashicorp/hc-install/fs/fs_unix.go
@@ -16,9 +16,7 @@ import (
func lookupDirs(extraDirs []string) []string {
pathVar := os.Getenv("PATH")
dirs := filepath.SplitList(pathVar)
- for _, ep := range extraDirs {
- dirs = append(dirs, ep)
- }
+ dirs = append(dirs, extraDirs...)
return dirs
}
diff --git a/vendor/github.com/hashicorp/hc-install/installer.go b/vendor/github.com/hashicorp/hc-install/installer.go
index 6c704eede3..01c1fdeed9 100644
--- a/vendor/github.com/hashicorp/hc-install/installer.go
+++ b/vendor/github.com/hashicorp/hc-install/installer.go
@@ -6,7 +6,7 @@ package install
import (
"context"
"fmt"
- "io/ioutil"
+ "io"
"log"
"github.com/hashicorp/go-multierror"
@@ -23,7 +23,7 @@ type Installer struct {
type RemoveFunc func(ctx context.Context) error
func NewInstaller() *Installer {
- discardLogger := log.New(ioutil.Discard, "", 0)
+ discardLogger := log.New(io.Discard, "", 0)
return &Installer{
logger: discardLogger,
}
diff --git a/vendor/github.com/hashicorp/hc-install/internal/build/go_build.go b/vendor/github.com/hashicorp/hc-install/internal/build/go_build.go
index 504bf45a30..6eef755bdb 100644
--- a/vendor/github.com/hashicorp/hc-install/internal/build/go_build.go
+++ b/vendor/github.com/hashicorp/hc-install/internal/build/go_build.go
@@ -7,7 +7,7 @@ import (
"bytes"
"context"
"fmt"
- "io/ioutil"
+ "io"
"log"
"os"
"os/exec"
@@ -17,7 +17,7 @@ import (
"golang.org/x/mod/modfile"
)
-var discardLogger = log.New(ioutil.Discard, "", 0)
+var discardLogger = log.New(io.Discard, "", 0)
// GoBuild represents a Go builder (to run "go build")
type GoBuild struct {
@@ -161,7 +161,7 @@ type CleanupFunc func(context.Context)
func guessRequiredGoVersion(repoDir string) (*version.Version, bool) {
goEnvFile := filepath.Join(repoDir, ".go-version")
if fi, err := os.Stat(goEnvFile); err == nil && !fi.IsDir() {
- b, err := ioutil.ReadFile(goEnvFile)
+ b, err := os.ReadFile(goEnvFile)
if err != nil {
return nil, false
}
@@ -174,7 +174,7 @@ func guessRequiredGoVersion(repoDir string) (*version.Version, bool) {
goModFile := filepath.Join(repoDir, "go.mod")
if fi, err := os.Stat(goModFile); err == nil && !fi.IsDir() {
- b, err := ioutil.ReadFile(goModFile)
+ b, err := os.ReadFile(goModFile)
if err != nil {
return nil, false
}
diff --git a/vendor/github.com/hashicorp/hc-install/internal/httpclient/httpclient.go b/vendor/github.com/hashicorp/hc-install/internal/httpclient/httpclient.go
index a9503dfdb8..7cdcf5b15f 100644
--- a/vendor/github.com/hashicorp/hc-install/internal/httpclient/httpclient.go
+++ b/vendor/github.com/hashicorp/hc-install/internal/httpclient/httpclient.go
@@ -5,25 +5,23 @@ package httpclient
import (
"fmt"
+ "log"
"net/http"
- "github.com/hashicorp/go-cleanhttp"
+ "github.com/hashicorp/go-retryablehttp"
"github.com/hashicorp/hc-install/version"
)
// NewHTTPClient provides a pre-configured http.Client
// e.g. with relevant User-Agent header
-func NewHTTPClient() *http.Client {
- client := cleanhttp.DefaultClient()
-
- userAgent := fmt.Sprintf("hc-install/%s", version.Version())
-
- cli := cleanhttp.DefaultPooledClient()
- cli.Transport = &userAgentRoundTripper{
- userAgent: userAgent,
- inner: cli.Transport,
+func NewHTTPClient(logger *log.Logger) *http.Client {
+ rc := retryablehttp.NewClient()
+ rc.Logger = logger
+ client := rc.StandardClient()
+ client.Transport = &userAgentRoundTripper{
+ userAgent: fmt.Sprintf("hc-install/%s", version.Version()),
+ inner: client.Transport,
}
-
return client
}
diff --git a/vendor/github.com/hashicorp/hc-install/internal/releasesjson/checksum_downloader.go b/vendor/github.com/hashicorp/hc-install/internal/releasesjson/checksum_downloader.go
index 843de8cdfa..264801b809 100644
--- a/vendor/github.com/hashicorp/hc-install/internal/releasesjson/checksum_downloader.go
+++ b/vendor/github.com/hashicorp/hc-install/internal/releasesjson/checksum_downloader.go
@@ -52,10 +52,10 @@ func (cd *ChecksumDownloader) DownloadAndVerifyChecksums(ctx context.Context) (C
return nil, err
}
- client := httpclient.NewHTTPClient()
+ client := httpclient.NewHTTPClient(cd.Logger)
sigURL := fmt.Sprintf("%s/%s/%s/%s", cd.BaseURL,
url.PathEscape(cd.ProductVersion.Name),
- url.PathEscape(cd.ProductVersion.RawVersion),
+ url.PathEscape(cd.ProductVersion.Version.String()),
url.PathEscape(sigFilename))
cd.Logger.Printf("downloading signature from %s", sigURL)
@@ -76,7 +76,7 @@ func (cd *ChecksumDownloader) DownloadAndVerifyChecksums(ctx context.Context) (C
shasumsURL := fmt.Sprintf("%s/%s/%s/%s", cd.BaseURL,
url.PathEscape(cd.ProductVersion.Name),
- url.PathEscape(cd.ProductVersion.RawVersion),
+ url.PathEscape(cd.ProductVersion.Version.String()),
url.PathEscape(cd.ProductVersion.SHASUMS))
cd.Logger.Printf("downloading checksums from %s", shasumsURL)
diff --git a/vendor/github.com/hashicorp/hc-install/internal/releasesjson/downloader.go b/vendor/github.com/hashicorp/hc-install/internal/releasesjson/downloader.go
index 146c1cf029..4d82c07c87 100644
--- a/vendor/github.com/hashicorp/hc-install/internal/releasesjson/downloader.go
+++ b/vendor/github.com/hashicorp/hc-install/internal/releasesjson/downloader.go
@@ -10,7 +10,6 @@ import (
"crypto/sha256"
"fmt"
"io"
- "io/ioutil"
"log"
"net/http"
"net/url"
@@ -29,14 +28,18 @@ type Downloader struct {
BaseURL string
}
-func (d *Downloader) DownloadAndUnpack(ctx context.Context, pv *ProductVersion, binDir string, licenseDir string) (zipFilePath string, err error) {
+type UnpackedProduct struct {
+ PathsToRemove []string
+}
+
+func (d *Downloader) DownloadAndUnpack(ctx context.Context, pv *ProductVersion, binDir string, licenseDir string) (up *UnpackedProduct, err error) {
if len(pv.Builds) == 0 {
- return "", fmt.Errorf("no builds found for %s %s", pv.Name, pv.Version)
+ return nil, fmt.Errorf("no builds found for %s %s", pv.Name, pv.Version)
}
pb, ok := pv.Builds.FilterBuild(runtime.GOOS, runtime.GOARCH, "zip")
if !ok {
- return "", fmt.Errorf("no ZIP archive found for %s %s %s/%s",
+ return nil, fmt.Errorf("no ZIP archive found for %s %s %s/%s",
pv.Name, pv.Version, runtime.GOOS, runtime.GOARCH)
}
@@ -50,48 +53,35 @@ func (d *Downloader) DownloadAndUnpack(ctx context.Context, pv *ProductVersion,
}
verifiedChecksums, err := v.DownloadAndVerifyChecksums(ctx)
if err != nil {
- return "", err
+ return nil, err
}
var ok bool
verifiedChecksum, ok = verifiedChecksums[pb.Filename]
if !ok {
- return "", fmt.Errorf("no checksum found for %q", pb.Filename)
+ return nil, fmt.Errorf("no checksum found for %q", pb.Filename)
}
}
- client := httpclient.NewHTTPClient()
-
- archiveURL := pb.URL
- if d.BaseURL != "" {
- // ensure that absolute download links from mocked responses
- // are still pointing to the mock server if one is set
- baseURL, err := url.Parse(d.BaseURL)
- if err != nil {
- return "", err
- }
+ client := httpclient.NewHTTPClient(d.Logger)
- u, err := url.Parse(archiveURL)
- if err != nil {
- return "", err
- }
- u.Scheme = baseURL.Scheme
- u.Host = baseURL.Host
- archiveURL = u.String()
+ archiveURL, err := determineArchiveURL(pb.URL, d.BaseURL)
+ if err != nil {
+ return nil, err
}
d.Logger.Printf("downloading archive from %s", archiveURL)
req, err := http.NewRequestWithContext(ctx, http.MethodGet, archiveURL, nil)
if err != nil {
- return "", fmt.Errorf("failed to create request for %q: %w", archiveURL, err)
+ return nil, fmt.Errorf("failed to create request for %q: %w", archiveURL, err)
}
resp, err := client.Do(req)
if err != nil {
- return "", err
+ return nil, err
}
if resp.StatusCode != 200 {
- return "", fmt.Errorf("failed to download ZIP archive from %q: %s", archiveURL, resp.Status)
+ return nil, fmt.Errorf("failed to download ZIP archive from %q: %s", archiveURL, resp.Status)
}
defer resp.Body.Close()
@@ -100,18 +90,28 @@ func (d *Downloader) DownloadAndUnpack(ctx context.Context, pv *ProductVersion,
contentType := resp.Header.Get("content-type")
if !contentTypeIsZip(contentType) {
- return "", fmt.Errorf("unexpected content-type: %s (expected any of %q)",
+ return nil, fmt.Errorf("unexpected content-type: %s (expected any of %q)",
contentType, zipMimeTypes)
}
expectedSize := resp.ContentLength
- pkgFile, err := ioutil.TempFile("", pb.Filename)
+ pkgFile, err := os.CreateTemp("", pb.Filename)
if err != nil {
- return "", err
+ return nil, err
}
- defer pkgFile.Close()
- pkgFilePath, err := filepath.Abs(pkgFile.Name())
+ defer func() {
+ pkgFile.Close()
+ filePath := pkgFile.Name()
+ err = os.Remove(filePath)
+ if err != nil {
+ d.Logger.Printf("failed to delete unpacked archive at %s: %s", filePath, err)
+ return
+ }
+ d.Logger.Printf("deleted unpacked archive at %s", filePath)
+ }()
+
+ up = &UnpackedProduct{}
d.Logger.Printf("copying %q (%d bytes) to %s", pb.Filename, expectedSize, pkgFile.Name())
@@ -123,12 +123,12 @@ func (d *Downloader) DownloadAndUnpack(ctx context.Context, pv *ProductVersion,
bytesCopied, err = io.Copy(h, r)
if err != nil {
- return "", err
+ return nil, err
}
calculatedSum := h.Sum(nil)
if !bytes.Equal(calculatedSum, verifiedChecksum) {
- return pkgFilePath, fmt.Errorf(
+ return up, fmt.Errorf(
"checksum mismatch (expected: %x, got: %x)",
verifiedChecksum, calculatedSum,
)
@@ -136,14 +136,14 @@ func (d *Downloader) DownloadAndUnpack(ctx context.Context, pv *ProductVersion,
} else {
bytesCopied, err = io.Copy(pkgFile, pkgReader)
if err != nil {
- return pkgFilePath, err
+ return up, err
}
}
d.Logger.Printf("copied %d bytes to %s", bytesCopied, pkgFile.Name())
if expectedSize != 0 && bytesCopied != int64(expectedSize) {
- return pkgFilePath, fmt.Errorf(
+ return up, fmt.Errorf(
"unexpected size (downloaded: %d, expected: %d)",
bytesCopied, expectedSize,
)
@@ -151,7 +151,7 @@ func (d *Downloader) DownloadAndUnpack(ctx context.Context, pv *ProductVersion,
r, err := zip.OpenReader(pkgFile.Name())
if err != nil {
- return pkgFilePath, err
+ return up, err
}
defer r.Close()
@@ -163,31 +163,37 @@ func (d *Downloader) DownloadAndUnpack(ctx context.Context, pv *ProductVersion,
}
srcFile, err := f.Open()
if err != nil {
- return pkgFilePath, err
+ return up, err
}
// Determine the appropriate destination file path
dstDir := binDir
+ // for license files, use binDir if licenseDir is not set
if isLicenseFile(f.Name) && licenseDir != "" {
dstDir = licenseDir
}
d.Logger.Printf("unpacking %s to %s", f.Name, dstDir)
dstPath := filepath.Join(dstDir, f.Name)
+
+ if isLicenseFile(f.Name) {
+ up.PathsToRemove = append(up.PathsToRemove, dstPath)
+ }
+
dstFile, err := os.Create(dstPath)
if err != nil {
- return pkgFilePath, err
+ return up, err
}
_, err = io.Copy(dstFile, srcFile)
if err != nil {
- return pkgFilePath, err
+ return up, err
}
srcFile.Close()
dstFile.Close()
}
- return pkgFilePath, nil
+ return up, nil
}
// The production release site uses consistent single mime type
@@ -207,11 +213,13 @@ func contentTypeIsZip(contentType string) bool {
return false
}
-// Enterprise products have a few additional license files
-// that need to be extracted to a separate directory
+// Product archives may have a few license files
+// which may be extracted to a separate directory
+// and may need to be tracked for later cleanup.
var licenseFiles = []string{
"EULA.txt",
"TermsOfEvaluation.txt",
+ "LICENSE.txt",
}
func isLicenseFile(filename string) bool {
@@ -222,3 +230,28 @@ func isLicenseFile(filename string) bool {
}
return false
}
+
+// determineArchiveURL determines the archive URL based on the base URL provided.
+func determineArchiveURL(archiveURL, baseURL string) (string, error) {
+ // If custom URL is set, use that instead of the one from the JSON.
+ // Also ensures that absolute download links from mocked responses
+ // are still pointing to the mock server if one is set.
+ if baseURL == "" {
+ return archiveURL, nil
+ }
+
+ base, err := url.Parse(baseURL)
+ if err != nil {
+ return "", err
+ }
+
+ u, err := url.Parse(archiveURL)
+ if err != nil {
+ return "", err
+ }
+
+ // Use base URL path and append the path from the archive URL.
+ newArchiveURL := base.JoinPath(u.Path)
+
+ return newArchiveURL.String(), nil
+}
diff --git a/vendor/github.com/hashicorp/hc-install/internal/releasesjson/product_version.go b/vendor/github.com/hashicorp/hc-install/internal/releasesjson/product_version.go
index 99b811a645..94152b131a 100644
--- a/vendor/github.com/hashicorp/hc-install/internal/releasesjson/product_version.go
+++ b/vendor/github.com/hashicorp/hc-install/internal/releasesjson/product_version.go
@@ -9,8 +9,7 @@ import "github.com/hashicorp/go-version"
// "consul 0.5.1". A ProductVersion may have one or more builds.
type ProductVersion struct {
Name string `json:"name"`
- RawVersion string `json:"version"`
- Version *version.Version `json:"-"`
+ Version *version.Version `json:"version"`
SHASUMS string `json:"shasums,omitempty"`
SHASUMSSig string `json:"shasums_signature,omitempty"`
SHASUMSSigs []string `json:"shasums_signatures,omitempty"`
diff --git a/vendor/github.com/hashicorp/hc-install/internal/releasesjson/releases.go b/vendor/github.com/hashicorp/hc-install/internal/releasesjson/releases.go
index 755019f2f2..cae7f53024 100644
--- a/vendor/github.com/hashicorp/hc-install/internal/releasesjson/releases.go
+++ b/vendor/github.com/hashicorp/hc-install/internal/releasesjson/releases.go
@@ -7,7 +7,7 @@ import (
"context"
"encoding/json"
"fmt"
- "io/ioutil"
+ "io"
"log"
"net/http"
"net/url"
@@ -55,7 +55,7 @@ type Releases struct {
func NewReleases() *Releases {
return &Releases{
- logger: log.New(ioutil.Discard, "", 0),
+ logger: log.New(io.Discard, "", 0),
BaseURL: defaultBaseURL,
}
}
@@ -65,7 +65,7 @@ func (r *Releases) SetLogger(logger *log.Logger) {
}
func (r *Releases) ListProductVersions(ctx context.Context, productName string) (ProductVersionsMap, error) {
- client := httpclient.NewHTTPClient()
+ client := httpclient.NewHTTPClient(r.logger)
productIndexURL := fmt.Sprintf("%s/%s/index.json",
r.BaseURL,
@@ -95,7 +95,7 @@ func (r *Releases) ListProductVersions(ctx context.Context, productName string)
r.logger.Printf("received %s", resp.Status)
- body, err := ioutil.ReadAll(resp.Body)
+ body, err := io.ReadAll(resp.Body)
if err != nil {
return nil, err
}
@@ -122,7 +122,7 @@ func (r *Releases) ListProductVersions(ctx context.Context, productName string)
}
func (r *Releases) GetProductVersion(ctx context.Context, product string, version *version.Version) (*ProductVersion, error) {
- client := httpclient.NewHTTPClient()
+ client := httpclient.NewHTTPClient(r.logger)
indexURL := fmt.Sprintf("%s/%s/%s/index.json",
r.BaseURL,
@@ -153,7 +153,7 @@ func (r *Releases) GetProductVersion(ctx context.Context, product string, versio
r.logger.Printf("received %s", resp.Status)
- body, err := ioutil.ReadAll(resp.Body)
+ body, err := io.ReadAll(resp.Body)
if err != nil {
return nil, err
}
diff --git a/vendor/github.com/hashicorp/hc-install/product/consul.go b/vendor/github.com/hashicorp/hc-install/product/consul.go
index 9789d7c318..05db0cc660 100644
--- a/vendor/github.com/hashicorp/hc-install/product/consul.go
+++ b/vendor/github.com/hashicorp/hc-install/product/consul.go
@@ -5,6 +5,7 @@ package product
import (
"context"
+ "encoding/json"
"fmt"
"os/exec"
"regexp"
@@ -17,10 +18,6 @@ import (
var consulVersionOutputRe = regexp.MustCompile(`Consul ` + simpleVersionRe)
-var (
- v1_18 = version.Must(version.NewVersion("1.18"))
-)
-
var Consul = Product{
Name: "consul",
BinaryName: func() string {
@@ -30,25 +27,15 @@ var Consul = Product{
return "consul"
},
GetVersion: func(ctx context.Context, path string) (*version.Version, error) {
- cmd := exec.CommandContext(ctx, path, "version")
-
- out, err := cmd.Output()
- if err != nil {
- return nil, err
+ v, err := consulJsonVersion(ctx, path)
+ if err == nil {
+ return v, nil
}
- stdout := strings.TrimSpace(string(out))
-
- submatches := consulVersionOutputRe.FindStringSubmatch(stdout)
- if len(submatches) != 2 {
- return nil, fmt.Errorf("unexpected number of version matches %d for %s", len(submatches), stdout)
- }
- v, err := version.NewVersion(submatches[1])
- if err != nil {
- return nil, fmt.Errorf("unable to parse version %q: %w", submatches[1], err)
- }
-
- return v, err
+ // JSON output was added in 1.9.0
+ // See https://github.com/hashicorp/consul/pull/8268
+ // We assume that error implies older version.
+ return legacyConsulVersion(ctx, path)
},
BuildInstructions: &BuildInstructions{
GitRepoURL: "https://github.com/hashicorp/consul.git",
@@ -56,3 +43,44 @@ var Consul = Product{
Build: &build.GoBuild{},
},
}
+
+type consulJsonVersionOutput struct {
+ Version *version.Version `json:"Version"`
+}
+
+func consulJsonVersion(ctx context.Context, path string) (*version.Version, error) {
+ cmd := exec.CommandContext(ctx, path, "version", "-format=json")
+ out, err := cmd.CombinedOutput()
+ if err != nil {
+ return nil, err
+ }
+
+ var vOut consulJsonVersionOutput
+ err = json.Unmarshal(out, &vOut)
+ if err != nil {
+ return nil, err
+ }
+
+ return vOut.Version, nil
+}
+
+func legacyConsulVersion(ctx context.Context, path string) (*version.Version, error) {
+ cmd := exec.CommandContext(ctx, path, "version")
+ out, err := cmd.Output()
+ if err != nil {
+ return nil, err
+ }
+
+ stdout := strings.TrimSpace(string(out))
+
+ submatches := consulVersionOutputRe.FindStringSubmatch(stdout)
+ if len(submatches) != 2 {
+ return nil, fmt.Errorf("unexpected number of version matches %d for %s", len(submatches), stdout)
+ }
+ v, err := version.NewVersion(submatches[1])
+ if err != nil {
+ return nil, fmt.Errorf("unable to parse version %q: %w", submatches[1], err)
+ }
+
+ return v, err
+}
diff --git a/vendor/github.com/hashicorp/hc-install/product/packer.go b/vendor/github.com/hashicorp/hc-install/product/packer.go
new file mode 100644
index 0000000000..4ad35dccf7
--- /dev/null
+++ b/vendor/github.com/hashicorp/hc-install/product/packer.go
@@ -0,0 +1,54 @@
+// Copyright (c) HashiCorp, Inc.
+// SPDX-License-Identifier: MPL-2.0
+
+package product
+
+import (
+ "context"
+ "fmt"
+ "os/exec"
+ "regexp"
+ "runtime"
+ "strings"
+
+ "github.com/hashicorp/go-version"
+ "github.com/hashicorp/hc-install/internal/build"
+)
+
+var packerVersionOutputRe = regexp.MustCompile(`Packer ` + simpleVersionRe)
+
+var Packer = Product{
+ Name: "packer",
+ BinaryName: func() string {
+ if runtime.GOOS == "windows" {
+ return "packer.exe"
+ }
+ return "packer"
+ },
+ GetVersion: func(ctx context.Context, path string) (*version.Version, error) {
+ cmd := exec.CommandContext(ctx, path, "version")
+
+ out, err := cmd.Output()
+ if err != nil {
+ return nil, err
+ }
+
+ stdout := strings.TrimSpace(string(out))
+
+ submatches := packerVersionOutputRe.FindStringSubmatch(stdout)
+ if len(submatches) != 2 {
+ return nil, fmt.Errorf("unexpected number of version matches %d for %s", len(submatches), stdout)
+ }
+ v, err := version.NewVersion(submatches[1])
+ if err != nil {
+ return nil, fmt.Errorf("unable to parse version %q: %w", submatches[1], err)
+ }
+
+ return v, err
+ },
+ BuildInstructions: &BuildInstructions{
+ GitRepoURL: "https://github.com/hashicorp/packer.git",
+ PreCloneCheck: &build.GoIsInstalled{},
+ Build: &build.GoBuild{DetectVendoring: true},
+ },
+}
diff --git a/vendor/github.com/hashicorp/hc-install/product/product.go b/vendor/github.com/hashicorp/hc-install/product/product.go
index 85f2e11bf2..aea16eb75f 100644
--- a/vendor/github.com/hashicorp/hc-install/product/product.go
+++ b/vendor/github.com/hashicorp/hc-install/product/product.go
@@ -10,6 +10,8 @@ import (
"github.com/hashicorp/go-version"
)
+const simpleVersionRe = `v?(?P[0-9]+(?:\.[0-9]+)*(?:-[A-Za-z0-9\.]+)?)`
+
type Product struct {
// Name which identifies the product
// on releases.hashicorp.com and in Checkpoint
diff --git a/vendor/github.com/hashicorp/hc-install/product/terraform.go b/vendor/github.com/hashicorp/hc-install/product/terraform.go
index afb6b35fb3..a95fe0d6df 100644
--- a/vendor/github.com/hashicorp/hc-install/product/terraform.go
+++ b/vendor/github.com/hashicorp/hc-install/product/terraform.go
@@ -5,6 +5,7 @@ package product
import (
"context"
+ "encoding/json"
"fmt"
"os/exec"
"regexp"
@@ -15,11 +16,7 @@ import (
"github.com/hashicorp/hc-install/internal/build"
)
-var (
- simpleVersionRe = `v?(?P[0-9]+(?:\.[0-9]+)*(?:-[A-Za-z0-9\.]+)?)`
-
- terraformVersionOutputRe = regexp.MustCompile(`Terraform ` + simpleVersionRe)
-)
+var terraformVersionOutputRe = regexp.MustCompile(`Terraform ` + simpleVersionRe)
var Terraform = Product{
Name: "terraform",
@@ -30,25 +27,15 @@ var Terraform = Product{
return "terraform"
},
GetVersion: func(ctx context.Context, path string) (*version.Version, error) {
- cmd := exec.CommandContext(ctx, path, "version")
-
- out, err := cmd.Output()
- if err != nil {
- return nil, err
+ v, err := terraformJsonVersion(ctx, path)
+ if err == nil {
+ return v, nil
}
- stdout := strings.TrimSpace(string(out))
-
- submatches := terraformVersionOutputRe.FindStringSubmatch(stdout)
- if len(submatches) != 2 {
- return nil, fmt.Errorf("unexpected number of version matches %d for %s", len(submatches), stdout)
- }
- v, err := version.NewVersion(submatches[1])
- if err != nil {
- return nil, fmt.Errorf("unable to parse version %q: %w", submatches[1], err)
- }
-
- return v, err
+ // JSON output was added in 0.13.0
+ // See https://github.com/hashicorp/terraform/pull/25252
+ // We assume that error implies older version.
+ return legacyTerraformVersion(ctx, path)
},
BuildInstructions: &BuildInstructions{
GitRepoURL: "https://github.com/hashicorp/terraform.git",
@@ -56,3 +43,44 @@ var Terraform = Product{
Build: &build.GoBuild{DetectVendoring: true},
},
}
+
+type terraformJsonVersionOutput struct {
+ Version *version.Version `json:"terraform_version"`
+}
+
+func terraformJsonVersion(ctx context.Context, path string) (*version.Version, error) {
+ cmd := exec.CommandContext(ctx, path, "version", "-json")
+ out, err := cmd.CombinedOutput()
+ if err != nil {
+ return nil, err
+ }
+
+ var vOut terraformJsonVersionOutput
+ err = json.Unmarshal(out, &vOut)
+ if err != nil {
+ return nil, err
+ }
+
+ return vOut.Version, nil
+}
+
+func legacyTerraformVersion(ctx context.Context, path string) (*version.Version, error) {
+ cmd := exec.CommandContext(ctx, path, "version")
+ out, err := cmd.Output()
+ if err != nil {
+ return nil, err
+ }
+
+ stdout := strings.TrimSpace(string(out))
+
+ submatches := terraformVersionOutputRe.FindStringSubmatch(stdout)
+ if len(submatches) != 2 {
+ return nil, fmt.Errorf("unexpected number of version matches %d for %s", len(submatches), stdout)
+ }
+ v, err := version.NewVersion(submatches[1])
+ if err != nil {
+ return nil, fmt.Errorf("unable to parse version %q: %w", submatches[1], err)
+ }
+
+ return v, err
+}
diff --git a/vendor/github.com/hashicorp/hc-install/releases/enterprise.go b/vendor/github.com/hashicorp/hc-install/releases/enterprise.go
index 179d40d1cd..cfef088afb 100644
--- a/vendor/github.com/hashicorp/hc-install/releases/enterprise.go
+++ b/vendor/github.com/hashicorp/hc-install/releases/enterprise.go
@@ -6,9 +6,6 @@ package releases
import "fmt"
type EnterpriseOptions struct {
- // LicenseDir represents directory path where to install license files (required)
- LicenseDir string
-
// Meta represents optional version metadata (e.g. hsm, fips1402)
Meta string
}
@@ -25,12 +22,12 @@ func enterpriseVersionMetadata(eo *EnterpriseOptions) string {
return metadata
}
-func validateEnterpriseOptions(eo *EnterpriseOptions) error {
+func validateEnterpriseOptions(eo *EnterpriseOptions, licenseDir string) error {
if eo == nil {
return nil
}
- if eo.LicenseDir == "" {
+ if licenseDir == "" {
return fmt.Errorf("LicenseDir must be provided when requesting enterprise versions")
}
diff --git a/vendor/github.com/hashicorp/hc-install/releases/exact_version.go b/vendor/github.com/hashicorp/hc-install/releases/exact_version.go
index e42f4d239f..597e9ae362 100644
--- a/vendor/github.com/hashicorp/hc-install/releases/exact_version.go
+++ b/vendor/github.com/hashicorp/hc-install/releases/exact_version.go
@@ -6,7 +6,6 @@ package releases
import (
"context"
"fmt"
- "io/ioutil"
"log"
"os"
"path/filepath"
@@ -28,6 +27,10 @@ type ExactVersion struct {
InstallDir string
Timeout time.Duration
+ // LicenseDir represents directory path where to install license files
+ // (required for enterprise versions, optional for Community editions).
+ LicenseDir string
+
// Enterprise indicates installation of enterprise version (leave nil for Community editions)
Enterprise *EnterpriseOptions
@@ -37,7 +40,10 @@ type ExactVersion struct {
// instead of built-in pubkey to verify signature of downloaded checksums
ArmoredPublicKey string
- apiBaseURL string
+ // ApiBaseURL is an optional field that specifies a custom URL to download the product from.
+ // If ApiBaseURL is set, the product will be downloaded from this base URL instead of the default site.
+ // Note: The directory structure of the custom URL must match the HashiCorp releases site (including the index.json files).
+ ApiBaseURL string
logger *log.Logger
pathsToRemove []string
}
@@ -70,7 +76,7 @@ func (ev *ExactVersion) Validate() error {
return fmt.Errorf("unknown version")
}
- if err := validateEnterpriseOptions(ev.Enterprise); err != nil {
+ if err := validateEnterpriseOptions(ev.Enterprise, ev.LicenseDir); err != nil {
return err
}
@@ -93,7 +99,7 @@ func (ev *ExactVersion) Install(ctx context.Context) (string, error) {
if dstDir == "" {
var err error
dirName := fmt.Sprintf("%s_*", ev.Product.Name)
- dstDir, err = ioutil.TempDir("", dirName)
+ dstDir, err = os.MkdirTemp("", dirName)
if err != nil {
return "", err
}
@@ -103,8 +109,8 @@ func (ev *ExactVersion) Install(ctx context.Context) (string, error) {
ev.log().Printf("will install into dir at %s", dstDir)
rels := rjson.NewReleases()
- if ev.apiBaseURL != "" {
- rels.BaseURL = ev.apiBaseURL
+ if ev.ApiBaseURL != "" {
+ rels.BaseURL = ev.ApiBaseURL
}
rels.SetLogger(ev.log())
installVersion := ev.Version
@@ -125,17 +131,14 @@ func (ev *ExactVersion) Install(ctx context.Context) (string, error) {
if ev.ArmoredPublicKey != "" {
d.ArmoredPublicKey = ev.ArmoredPublicKey
}
- if ev.apiBaseURL != "" {
- d.BaseURL = ev.apiBaseURL
+ if ev.ApiBaseURL != "" {
+ d.BaseURL = ev.ApiBaseURL
}
- licenseDir := ""
- if ev.Enterprise != nil {
- licenseDir = ev.Enterprise.LicenseDir
- }
- zipFilePath, err := d.DownloadAndUnpack(ctx, pv, dstDir, licenseDir)
- if zipFilePath != "" {
- ev.pathsToRemove = append(ev.pathsToRemove, zipFilePath)
+ licenseDir := ev.LicenseDir
+ up, err := d.DownloadAndUnpack(ctx, pv, dstDir, licenseDir)
+ if up != nil {
+ ev.pathsToRemove = append(ev.pathsToRemove, up.PathsToRemove...)
}
if err != nil {
return "", err
diff --git a/vendor/github.com/hashicorp/hc-install/releases/latest_version.go b/vendor/github.com/hashicorp/hc-install/releases/latest_version.go
index 9893b223ad..ee70782b29 100644
--- a/vendor/github.com/hashicorp/hc-install/releases/latest_version.go
+++ b/vendor/github.com/hashicorp/hc-install/releases/latest_version.go
@@ -6,7 +6,6 @@ package releases
import (
"context"
"fmt"
- "io/ioutil"
"log"
"os"
"path/filepath"
@@ -28,6 +27,10 @@ type LatestVersion struct {
Timeout time.Duration
IncludePrereleases bool
+ // LicenseDir represents directory path where to install license files
+ // (required for enterprise versions, optional for Community editions).
+ LicenseDir string
+
// Enterprise indicates installation of enterprise version (leave nil for Community editions)
Enterprise *EnterpriseOptions
@@ -37,7 +40,10 @@ type LatestVersion struct {
// instead of built-in pubkey to verify signature of downloaded checksums
ArmoredPublicKey string
- apiBaseURL string
+ // ApiBaseURL is an optional field that specifies a custom URL to download the product from.
+ // If ApiBaseURL is set, the product will be downloaded from this base URL instead of the default site.
+ // Note: The directory structure of the custom URL must match the HashiCorp releases site (including the index.json files).
+ ApiBaseURL string
logger *log.Logger
pathsToRemove []string
}
@@ -66,7 +72,7 @@ func (lv *LatestVersion) Validate() error {
return fmt.Errorf("invalid binary name: %q", lv.Product.BinaryName())
}
- if err := validateEnterpriseOptions(lv.Enterprise); err != nil {
+ if err := validateEnterpriseOptions(lv.Enterprise, lv.LicenseDir); err != nil {
return err
}
@@ -89,7 +95,7 @@ func (lv *LatestVersion) Install(ctx context.Context) (string, error) {
if dstDir == "" {
var err error
dirName := fmt.Sprintf("%s_*", lv.Product.Name)
- dstDir, err = ioutil.TempDir("", dirName)
+ dstDir, err = os.MkdirTemp("", dirName)
if err != nil {
return "", err
}
@@ -99,8 +105,8 @@ func (lv *LatestVersion) Install(ctx context.Context) (string, error) {
lv.log().Printf("will install into dir at %s", dstDir)
rels := rjson.NewReleases()
- if lv.apiBaseURL != "" {
- rels.BaseURL = lv.apiBaseURL
+ if lv.ApiBaseURL != "" {
+ rels.BaseURL = lv.ApiBaseURL
}
rels.SetLogger(lv.log())
versions, err := rels.ListProductVersions(ctx, lv.Product.Name)
@@ -126,16 +132,13 @@ func (lv *LatestVersion) Install(ctx context.Context) (string, error) {
if lv.ArmoredPublicKey != "" {
d.ArmoredPublicKey = lv.ArmoredPublicKey
}
- if lv.apiBaseURL != "" {
- d.BaseURL = lv.apiBaseURL
- }
- licenseDir := ""
- if lv.Enterprise != nil {
- licenseDir = lv.Enterprise.LicenseDir
+ if lv.ApiBaseURL != "" {
+ d.BaseURL = lv.ApiBaseURL
}
- zipFilePath, err := d.DownloadAndUnpack(ctx, versionToInstall, dstDir, licenseDir)
- if zipFilePath != "" {
- lv.pathsToRemove = append(lv.pathsToRemove, zipFilePath)
+ licenseDir := lv.LicenseDir
+ up, err := d.DownloadAndUnpack(ctx, versionToInstall, dstDir, licenseDir)
+ if up != nil {
+ lv.pathsToRemove = append(lv.pathsToRemove, up.PathsToRemove...)
}
if err != nil {
return "", err
diff --git a/vendor/github.com/hashicorp/hc-install/releases/releases.go b/vendor/github.com/hashicorp/hc-install/releases/releases.go
index 7bef49ba30..a24db6c63e 100644
--- a/vendor/github.com/hashicorp/hc-install/releases/releases.go
+++ b/vendor/github.com/hashicorp/hc-install/releases/releases.go
@@ -4,7 +4,7 @@
package releases
import (
- "io/ioutil"
+ "io"
"log"
"time"
)
@@ -12,5 +12,5 @@ import (
var (
defaultInstallTimeout = 30 * time.Second
defaultListTimeout = 10 * time.Second
- discardLogger = log.New(ioutil.Discard, "", 0)
+ discardLogger = log.New(io.Discard, "", 0)
)
diff --git a/vendor/github.com/hashicorp/hc-install/releases/versions.go b/vendor/github.com/hashicorp/hc-install/releases/versions.go
index 49b1af78ca..a4316090ec 100644
--- a/vendor/github.com/hashicorp/hc-install/releases/versions.go
+++ b/vendor/github.com/hashicorp/hc-install/releases/versions.go
@@ -30,8 +30,9 @@ type Versions struct {
}
type InstallationOptions struct {
- Timeout time.Duration
- Dir string
+ Timeout time.Duration
+ Dir string
+ LicenseDir string
SkipChecksumVerification bool
@@ -46,7 +47,7 @@ func (v *Versions) List(ctx context.Context) ([]src.Source, error) {
return nil, fmt.Errorf("invalid product name: %q", v.Product.Name)
}
- if err := validateEnterpriseOptions(v.Enterprise); err != nil {
+ if err := validateEnterpriseOptions(v.Enterprise, v.Install.LicenseDir); err != nil {
return nil, err
}
@@ -85,6 +86,7 @@ func (v *Versions) List(ctx context.Context) ([]src.Source, error) {
Version: pv.Version,
InstallDir: v.Install.Dir,
Timeout: v.Install.Timeout,
+ LicenseDir: v.Install.LicenseDir,
ArmoredPublicKey: v.Install.ArmoredPublicKey,
SkipChecksumVerification: v.Install.SkipChecksumVerification,
@@ -92,8 +94,7 @@ func (v *Versions) List(ctx context.Context) ([]src.Source, error) {
if v.Enterprise != nil {
ev.Enterprise = &EnterpriseOptions{
- Meta: v.Enterprise.Meta,
- LicenseDir: v.Enterprise.LicenseDir,
+ Meta: v.Enterprise.Meta,
}
}
diff --git a/vendor/github.com/hashicorp/hc-install/version/VERSION b/vendor/github.com/hashicorp/hc-install/version/VERSION
index d2b13eb644..2003b639c4 100644
--- a/vendor/github.com/hashicorp/hc-install/version/VERSION
+++ b/vendor/github.com/hashicorp/hc-install/version/VERSION
@@ -1 +1 @@
-0.6.4
+0.9.2
diff --git a/vendor/github.com/hashicorp/hcl/v2/.go-version b/vendor/github.com/hashicorp/hcl/v2/.go-version
new file mode 100644
index 0000000000..a1b6e17d61
--- /dev/null
+++ b/vendor/github.com/hashicorp/hcl/v2/.go-version
@@ -0,0 +1 @@
+1.23
diff --git a/vendor/github.com/hashicorp/hcl/v2/.golangci.yaml b/vendor/github.com/hashicorp/hcl/v2/.golangci.yaml
new file mode 100644
index 0000000000..719498be64
--- /dev/null
+++ b/vendor/github.com/hashicorp/hcl/v2/.golangci.yaml
@@ -0,0 +1,18 @@
+# Copyright (c) HashiCorp, Inc.
+# SPDX-License-Identifier: MPL-2.0
+
+version: "2"
+issues:
+ max-issues-per-linter: 0 # show all issues found by each linter
+ max-same-issues: 0 # don't ignore same issues
+linters:
+ exclusions:
+ rules:
+ - path: hclsyntax/scan_string_lit.go # generated file, ignore errors
+ linters:
+ - unused
+ - staticcheck
+ - path: hclsyntax/scan_tokens.go # generated file, ignore errors
+ linters:
+ - unused
+ - staticcheck
diff --git a/vendor/github.com/hashicorp/hcl/v2/CHANGELOG.md b/vendor/github.com/hashicorp/hcl/v2/CHANGELOG.md
index 2eebedbc76..1845e7df53 100644
--- a/vendor/github.com/hashicorp/hcl/v2/CHANGELOG.md
+++ b/vendor/github.com/hashicorp/hcl/v2/CHANGELOG.md
@@ -1,5 +1,40 @@
# HCL Changelog
+## v2.24.0 (July 7, 2025)
+
+### Enhancements
+
+* Add support for decoding block and attribute source ranges when using `gohcl`. ([#703](https://github.com/hashicorp/hcl/pull/703))
+* hclsyntax: Detect and reject invalid nested splat result. ([#724](https://github.com/hashicorp/hcl/pull/724))
+
+### Bugs Fixed
+
+* Correct handling of unknown objects in Index function. ([#763](https://github.com/hashicorp/hcl/pull/763))
+
+## v2.23.0 (November 15, 2024)
+
+### Bugs Fixed
+
+* Preserve marks when traversing through unknown values. ([#699](https://github.com/hashicorp/hcl/pull/699))
+* Retain marks through conditional and for expressions. ([#710](https://github.com/hashicorp/hcl/pull/710))
+
+## v2.22.0 (August 26, 2024)
+
+### Enhancements
+
+* feat: return an ExprSyntaxError for invalid references that end in a dot ([#692](https://github.com/hashicorp/hcl/pull/692))
+
+## v2.21.0 (June 19, 2024)
+
+### Enhancements
+
+* Introduce `ParseTraversalPartial`, which allows traversals that include the splat (`[*]`) index operator. ([#673](https://github.com/hashicorp/hcl/pull/673))
+* ext/dynblock: Now accepts marked values in `for_each`, and will transfer those marks (as much as technically possible) to values in the generated blocks. ([#679](https://github.com/hashicorp/hcl/pull/679))
+
+### Bugs Fixed
+
+* Expression evaluation will no longer panic if the splat operator is applied to an unknown value that has cty marks. ([#678](https://github.com/hashicorp/hcl/pull/678))
+
## v2.20.1 (March 26, 2024)
### Bugs Fixed
diff --git a/vendor/github.com/hashicorp/hcl/v2/diagnostic.go b/vendor/github.com/hashicorp/hcl/v2/diagnostic.go
index 578f81a2c2..a61bb30669 100644
--- a/vendor/github.com/hashicorp/hcl/v2/diagnostic.go
+++ b/vendor/github.com/hashicorp/hcl/v2/diagnostic.go
@@ -106,10 +106,10 @@ func (d *Diagnostic) Error() string {
// APIs that normally deal in vanilla Go errors.
func (d Diagnostics) Error() string {
count := len(d)
- switch {
- case count == 0:
+ switch count {
+ case 0:
return "no diagnostics"
- case count == 1:
+ case 1:
return d[0].Error()
default:
return fmt.Sprintf("%s, and %d other diagnostic(s)", d[0].Error(), count-1)
@@ -121,7 +121,7 @@ func (d Diagnostics) Error() string {
// This is provided as a convenience for returning from a function that
// collects and then returns a set of diagnostics:
//
-// return nil, diags.Append(&hcl.Diagnostic{ ... })
+// return nil, diags.Append(&hcl.Diagnostic{ ... })
//
// Note that this modifies the array underlying the diagnostics slice, so
// must be used carefully within a single codepath. It is incorrect (and rude)
diff --git a/vendor/github.com/hashicorp/hcl/v2/diagnostic_text.go b/vendor/github.com/hashicorp/hcl/v2/diagnostic_text.go
index bdfad42bf9..294eb1848a 100644
--- a/vendor/github.com/hashicorp/hcl/v2/diagnostic_text.go
+++ b/vendor/github.com/hashicorp/hcl/v2/diagnostic_text.go
@@ -71,7 +71,10 @@ func (w *diagnosticTextWriter) WriteDiagnostic(diag *Diagnostic) error {
severityStr = "???????"
}
- fmt.Fprintf(w.wr, "%s%s%s: %s\n\n", colorCode, severityStr, resetCode, diag.Summary)
+ _, err := fmt.Fprintf(w.wr, "%s%s%s: %s\n\n", colorCode, severityStr, resetCode, diag.Summary)
+ if err != nil {
+ return fmt.Errorf("write failed: %w", err)
+ }
if diag.Subject != nil {
snipRange := *diag.Subject
@@ -97,7 +100,10 @@ func (w *diagnosticTextWriter) WriteDiagnostic(diag *Diagnostic) error {
file := w.files[diag.Subject.Filename]
if file == nil || file.Bytes == nil {
- fmt.Fprintf(w.wr, " on %s line %d:\n (source code not available)\n\n", diag.Subject.Filename, diag.Subject.Start.Line)
+ _, err = fmt.Fprintf(w.wr, " on %s line %d:\n (source code not available)\n\n", diag.Subject.Filename, diag.Subject.Start.Line)
+ if err != nil {
+ return fmt.Errorf("write failed: %w", err)
+ }
} else {
var contextLine string
@@ -108,7 +114,10 @@ func (w *diagnosticTextWriter) WriteDiagnostic(diag *Diagnostic) error {
}
}
- fmt.Fprintf(w.wr, " on %s line %d%s:\n", diag.Subject.Filename, diag.Subject.Start.Line, contextLine)
+ _, err = fmt.Fprintf(w.wr, " on %s line %d%s:\n", diag.Subject.Filename, diag.Subject.Start.Line, contextLine)
+ if err != nil {
+ return fmt.Errorf("write failed: %w", err)
+ }
src := file.Bytes
sc := NewRangeScanner(src, diag.Subject.Filename, bufio.ScanLines)
@@ -121,23 +130,32 @@ func (w *diagnosticTextWriter) WriteDiagnostic(diag *Diagnostic) error {
beforeRange, highlightedRange, afterRange := lineRange.PartitionAround(highlightRange)
if highlightedRange.Empty() {
- fmt.Fprintf(w.wr, "%4d: %s\n", lineRange.Start.Line, sc.Bytes())
+ _, err = fmt.Fprintf(w.wr, "%4d: %s\n", lineRange.Start.Line, sc.Bytes())
+ if err != nil {
+ return fmt.Errorf("write failed: %w", err)
+ }
} else {
before := beforeRange.SliceBytes(src)
highlighted := highlightedRange.SliceBytes(src)
after := afterRange.SliceBytes(src)
- fmt.Fprintf(
+ _, err = fmt.Fprintf(
w.wr, "%4d: %s%s%s%s%s\n",
lineRange.Start.Line,
before,
highlightCode, highlighted, resetCode,
after,
)
+ if err != nil {
+ return fmt.Errorf("write failed: %w", err)
+ }
}
}
- w.wr.Write([]byte{'\n'})
+ _, err = w.wr.Write([]byte{'\n'})
+ if err != nil {
+ return fmt.Errorf("write failed: %w", err)
+ }
}
if diag.Expression != nil && diag.EvalContext != nil {
@@ -182,16 +200,26 @@ func (w *diagnosticTextWriter) WriteDiagnostic(diag *Diagnostic) error {
for i, stmt := range stmts {
switch i {
case 0:
- w.wr.Write([]byte{'w', 'i', 't', 'h', ' '})
+ _, err = w.wr.Write([]byte{'w', 'i', 't', 'h', ' '})
default:
- w.wr.Write([]byte{' ', ' ', ' ', ' ', ' '})
+ _, err = w.wr.Write([]byte{' ', ' ', ' ', ' ', ' '})
+ }
+ if err != nil {
+ return fmt.Errorf("write failed: %w", err)
+ }
+
+ _, err = w.wr.Write([]byte(stmt))
+ if err != nil {
+ return fmt.Errorf("write failed: %w", err)
}
- w.wr.Write([]byte(stmt))
switch i {
case last:
- w.wr.Write([]byte{'.', '\n', '\n'})
+ _, err = w.wr.Write([]byte{'.', '\n', '\n'})
default:
- w.wr.Write([]byte{',', '\n'})
+ _, err = w.wr.Write([]byte{',', '\n'})
+ }
+ if err != nil {
+ return fmt.Errorf("write failed: %w", err)
}
}
}
@@ -202,7 +230,10 @@ func (w *diagnosticTextWriter) WriteDiagnostic(diag *Diagnostic) error {
if w.width != 0 {
detail = wordwrap.WrapString(detail, w.width)
}
- fmt.Fprintf(w.wr, "%s\n\n", detail)
+ _, err = fmt.Fprintf(w.wr, "%s\n\n", detail)
+ if err != nil {
+ return fmt.Errorf("write failed: %w", err)
+ }
}
return nil
diff --git a/vendor/github.com/hashicorp/hcl/v2/doc.go b/vendor/github.com/hashicorp/hcl/v2/doc.go
index a0e3119f2c..665ad6cadb 100644
--- a/vendor/github.com/hashicorp/hcl/v2/doc.go
+++ b/vendor/github.com/hashicorp/hcl/v2/doc.go
@@ -9,25 +9,25 @@
// configurations in either native HCL syntax or JSON syntax into a Go struct
// type:
//
-// package main
+// package main
//
-// import (
-// "log"
-// "github.com/hashicorp/hcl/v2/hclsimple"
-// )
+// import (
+// "log"
+// "github.com/hashicorp/hcl/v2/hclsimple"
+// )
//
-// type Config struct {
-// LogLevel string `hcl:"log_level"`
-// }
+// type Config struct {
+// LogLevel string `hcl:"log_level"`
+// }
//
-// func main() {
-// var config Config
-// err := hclsimple.DecodeFile("config.hcl", nil, &config)
-// if err != nil {
-// log.Fatalf("Failed to load configuration: %s", err)
-// }
-// log.Printf("Configuration is %#v", config)
-// }
+// func main() {
+// var config Config
+// err := hclsimple.DecodeFile("config.hcl", nil, &config)
+// if err != nil {
+// log.Fatalf("Failed to load configuration: %s", err)
+// }
+// log.Printf("Configuration is %#v", config)
+// }
//
// If your application needs more control over the evaluation of the
// configuration, you can use the functions in the subdirectories hclparse,
diff --git a/vendor/github.com/hashicorp/hcl/v2/hclsyntax/expression.go b/vendor/github.com/hashicorp/hcl/v2/hclsyntax/expression.go
index 815973996b..c5a448863c 100644
--- a/vendor/github.com/hashicorp/hcl/v2/hclsyntax/expression.go
+++ b/vendor/github.com/hashicorp/hcl/v2/hclsyntax/expression.go
@@ -788,21 +788,24 @@ func (e *ConditionalExpr) Value(ctx *hcl.EvalContext) (cty.Value, hcl.Diagnostic
})
return cty.UnknownVal(resultType), diags
}
- if !condResult.IsKnown() {
- // we use the unmarked values throughout the unknown branch
- _, condResultMarks := condResult.Unmark()
- trueResult, trueResultMarks := trueResult.Unmark()
- falseResult, falseResultMarks := falseResult.Unmark()
- // use a value to merge marks
- _, resMarks := cty.DynamicVal.WithMarks(condResultMarks, trueResultMarks, falseResultMarks).Unmark()
+ // Now that we have all three values, collect all the marks for the result.
+ // Since it's possible that a condition value could be unknown, and the
+ // consumer needs to deal with any marks from either branch anyway, we must
+ // always combine them for consistent results.
+ condResult, condResultMarks := condResult.Unmark()
+ trueResult, trueResultMarks := trueResult.Unmark()
+ falseResult, falseResultMarks := falseResult.Unmark()
+ var resMarks []cty.ValueMarks
+ resMarks = append(resMarks, condResultMarks, trueResultMarks, falseResultMarks)
+ if !condResult.IsKnown() {
trueRange := trueResult.Range()
falseRange := falseResult.Range()
// if both branches are known to be null, then the result must still be null
if trueResult.IsNull() && falseResult.IsNull() {
- return cty.NullVal(resultType).WithMarks(resMarks), diags
+ return cty.NullVal(resultType).WithMarks(resMarks...), diags
}
// We might be able to offer a refined range for the result based on
@@ -841,7 +844,7 @@ func (e *ConditionalExpr) Value(ctx *hcl.EvalContext) (cty.Value, hcl.Diagnostic
ref = ref.NumberRangeUpperBound(hi, hiInc)
}
- return ref.NewValue().WithMarks(resMarks), diags
+ return ref.NewValue().WithMarks(resMarks...), diags
}
if trueResult.Type().IsCollectionType() && falseResult.Type().IsCollectionType() {
@@ -867,7 +870,7 @@ func (e *ConditionalExpr) Value(ctx *hcl.EvalContext) (cty.Value, hcl.Diagnostic
}
ref = ref.CollectionLengthLowerBound(lo).CollectionLengthUpperBound(hi)
- return ref.NewValue().WithMarks(resMarks), diags
+ return ref.NewValue().WithMarks(resMarks...), diags
}
}
@@ -875,7 +878,7 @@ func (e *ConditionalExpr) Value(ctx *hcl.EvalContext) (cty.Value, hcl.Diagnostic
if trueRange.DefinitelyNotNull() && falseRange.DefinitelyNotNull() {
ret = ret.RefineNotNull()
}
- return ret.WithMarks(resMarks), diags
+ return ret.WithMarks(resMarks...), diags
}
condResult, err := convert.Convert(condResult, cty.Bool)
@@ -892,8 +895,6 @@ func (e *ConditionalExpr) Value(ctx *hcl.EvalContext) (cty.Value, hcl.Diagnostic
return cty.UnknownVal(resultType), diags
}
- // Unmark result before testing for truthiness
- condResult, _ = condResult.UnmarkDeep()
if condResult.True() {
diags = append(diags, trueDiags...)
if convs[0] != nil {
@@ -916,7 +917,7 @@ func (e *ConditionalExpr) Value(ctx *hcl.EvalContext) (cty.Value, hcl.Diagnostic
trueResult = cty.UnknownVal(resultType)
}
}
- return trueResult, diags
+ return trueResult.WithMarks(resMarks...), diags
} else {
diags = append(diags, falseDiags...)
if convs[1] != nil {
@@ -939,7 +940,7 @@ func (e *ConditionalExpr) Value(ctx *hcl.EvalContext) (cty.Value, hcl.Diagnostic
falseResult = cty.UnknownVal(resultType)
}
}
- return falseResult, diags
+ return falseResult.WithMarks(resMarks...), diags
}
}
@@ -1429,9 +1430,9 @@ func (e *ForExpr) Value(ctx *hcl.EvalContext) (cty.Value, hcl.Diagnostics) {
})
return cty.DynamicVal, diags
}
- if !collVal.IsKnown() {
- return cty.DynamicVal, diags
- }
+
+ // Grab the CondExpr marks when we're returning early with an unknown
+ var condMarks cty.ValueMarks
// Before we start we'll do an early check to see if any CondExpr we've
// been given is of the wrong type. This isn't 100% reliable (it may
@@ -1459,6 +1460,9 @@ func (e *ForExpr) Value(ctx *hcl.EvalContext) (cty.Value, hcl.Diagnostics) {
})
return cty.DynamicVal, diags
}
+
+ _, condMarks = result.Unmark()
+
_, err := convert.Convert(result, cty.Bool)
if err != nil {
diags = append(diags, &hcl.Diagnostic{
@@ -1477,6 +1481,10 @@ func (e *ForExpr) Value(ctx *hcl.EvalContext) (cty.Value, hcl.Diagnostics) {
}
}
+ if !collVal.IsKnown() {
+ return cty.DynamicVal.WithMarks(append(marks, condMarks)...), diags
+ }
+
if e.KeyExpr != nil {
// Producing an object
var vals map[string]cty.Value
@@ -1517,6 +1525,12 @@ func (e *ForExpr) Value(ctx *hcl.EvalContext) (cty.Value, hcl.Diagnostics) {
known = false
continue
}
+
+ // Extract and merge marks from the include expression into the
+ // main set of marks
+ _, includeMarks := includeRaw.Unmark()
+ marks = append(marks, includeMarks)
+
include, err := convert.Convert(includeRaw, cty.Bool)
if err != nil {
if known {
@@ -1540,7 +1554,7 @@ func (e *ForExpr) Value(ctx *hcl.EvalContext) (cty.Value, hcl.Diagnostics) {
// Extract and merge marks from the include expression into the
// main set of marks
- includeUnmarked, includeMarks := include.Unmark()
+ includeUnmarked, _ := include.Unmark()
marks = append(marks, includeMarks)
if includeUnmarked.False() {
// Skip this element
@@ -1565,6 +1579,10 @@ func (e *ForExpr) Value(ctx *hcl.EvalContext) (cty.Value, hcl.Diagnostics) {
known = false
continue
}
+
+ _, keyMarks := keyRaw.Unmark()
+ marks = append(marks, keyMarks)
+
if !keyRaw.IsKnown() {
known = false
continue
@@ -1587,8 +1605,7 @@ func (e *ForExpr) Value(ctx *hcl.EvalContext) (cty.Value, hcl.Diagnostics) {
continue
}
- key, keyMarks := key.Unmark()
- marks = append(marks, keyMarks)
+ key, _ = key.Unmark()
val, valDiags := e.ValExpr.Value(childCtx)
diags = append(diags, valDiags...)
@@ -1618,7 +1635,7 @@ func (e *ForExpr) Value(ctx *hcl.EvalContext) (cty.Value, hcl.Diagnostics) {
}
if !known {
- return cty.DynamicVal, diags
+ return cty.DynamicVal.WithMarks(marks...), diags
}
if e.Group {
@@ -1664,6 +1681,12 @@ func (e *ForExpr) Value(ctx *hcl.EvalContext) (cty.Value, hcl.Diagnostics) {
known = false
continue
}
+
+ // Extract and merge marks from the include expression into the
+ // main set of marks
+ _, includeMarks := includeRaw.Unmark()
+ marks = append(marks, includeMarks)
+
if !includeRaw.IsKnown() {
// We will eventually return DynamicVal, but we'll continue
// iterating in case there are other diagnostics to gather
@@ -1689,10 +1712,7 @@ func (e *ForExpr) Value(ctx *hcl.EvalContext) (cty.Value, hcl.Diagnostics) {
continue
}
- // Extract and merge marks from the include expression into the
- // main set of marks
- includeUnmarked, includeMarks := include.Unmark()
- marks = append(marks, includeMarks)
+ includeUnmarked, _ := include.Unmark()
if includeUnmarked.False() {
// Skip this element
continue
@@ -1705,7 +1725,7 @@ func (e *ForExpr) Value(ctx *hcl.EvalContext) (cty.Value, hcl.Diagnostics) {
}
if !known {
- return cty.DynamicVal, diags
+ return cty.DynamicVal.WithMarks(marks...), diags
}
return cty.TupleVal(vals).WithMarks(marks...), diags
@@ -1776,11 +1796,12 @@ func (e *SplatExpr) Value(ctx *hcl.EvalContext) (cty.Value, hcl.Diagnostics) {
// both to tuples/lists and to other values, and in the latter case
// the value will be treated as an implicit single-item tuple, or as
// an empty tuple if the value is null.
+ //nolint:staticcheck // QF1001: Demorgan's law wouldn't improve readability.
autoUpgrade := !(sourceTy.IsTupleType() || sourceTy.IsListType() || sourceTy.IsSetType())
if sourceVal.IsNull() {
if autoUpgrade {
- return cty.EmptyTupleVal, diags
+ return cty.EmptyTupleVal.WithSameMarks(sourceVal), diags
}
diags = append(diags, &hcl.Diagnostic{
Severity: hcl.DiagError,
@@ -1798,7 +1819,7 @@ func (e *SplatExpr) Value(ctx *hcl.EvalContext) (cty.Value, hcl.Diagnostics) {
// If we don't even know the _type_ of our source value yet then
// we'll need to defer all processing, since we can't decide our
// result type either.
- return cty.DynamicVal, diags
+ return cty.DynamicVal.WithSameMarks(sourceVal), diags
}
upgradedUnknown := false
@@ -1813,13 +1834,14 @@ func (e *SplatExpr) Value(ctx *hcl.EvalContext) (cty.Value, hcl.Diagnostics) {
// list of a single attribute, but we still need to check if that
// attribute actually exists.
if !sourceVal.IsKnown() {
- sourceRng := sourceVal.Range()
+ unmarkedVal, _ := sourceVal.Unmark()
+ sourceRng := unmarkedVal.Range()
if sourceRng.CouldBeNull() {
upgradedUnknown = true
}
}
- sourceVal = cty.TupleVal([]cty.Value{sourceVal})
+ sourceVal = cty.TupleVal([]cty.Value{sourceVal}).WithSameMarks(sourceVal)
sourceTy = sourceVal.Type()
}
@@ -1900,14 +1922,14 @@ func (e *SplatExpr) Value(ctx *hcl.EvalContext) (cty.Value, hcl.Diagnostics) {
e.Item.clearValue(ctx) // clean up our temporary value
if upgradedUnknown {
- return cty.DynamicVal, diags
+ return cty.DynamicVal.WithMarks(marks), diags
}
if !isKnown {
// We'll ingore the resultTy diagnostics in this case since they
// will just be the same errors we saw while iterating above.
ty, _ := resultTy()
- return cty.UnknownVal(ty), diags
+ return cty.UnknownVal(ty).WithMarks(marks), diags
}
switch {
@@ -1915,7 +1937,23 @@ func (e *SplatExpr) Value(ctx *hcl.EvalContext) (cty.Value, hcl.Diagnostics) {
if len(vals) == 0 {
ty, tyDiags := resultTy()
diags = append(diags, tyDiags...)
- return cty.ListValEmpty(ty.ElementType()), diags
+ return cty.ListValEmpty(ty.ElementType()).WithMarks(marks), diags
+ }
+ // Unfortunately it's possible for a nested splat on scalar values to
+ // generate non-homogenously-typed vals, and we discovered this bad
+ // interaction after the two conflicting behaviors were both
+ // well-established so it isn't clear how to change them without
+ // breaking existing code. Therefore we just make that an error for
+ // now, to avoid crashing trying to constuct an impossible list.
+ if !cty.CanListVal(vals) {
+ diags = append(diags, &hcl.Diagnostic{
+ Severity: hcl.DiagError,
+ Summary: "Invalid nested splat expressions",
+ Detail: "The second level of splat expression produced elements of different types, so it isn't possible to construct a valid list to represent the top-level result.\n\nConsider using a for expression instead, to produce a tuple-typed result which can therefore have non-homogenous element types.",
+ Subject: e.Each.Range().Ptr(),
+ Context: e.Range().Ptr(), // encourage a diagnostic renderer to also include the "source" part of the expression in its code snippet
+ })
+ return cty.DynamicVal, diags
}
return cty.ListVal(vals).WithMarks(marks), diags
default:
diff --git a/vendor/github.com/hashicorp/hcl/v2/hclsyntax/expression_ops.go b/vendor/github.com/hashicorp/hcl/v2/hclsyntax/expression_ops.go
index 6585612c10..da146ef830 100644
--- a/vendor/github.com/hashicorp/hcl/v2/hclsyntax/expression_ops.go
+++ b/vendor/github.com/hashicorp/hcl/v2/hclsyntax/expression_ops.go
@@ -16,16 +16,86 @@ import (
type Operation struct {
Impl function.Function
Type cty.Type
+
+ // ShortCircuit is an optional callback for binary operations which, if set,
+ // will be called with the result of evaluating the LHS and RHS expressions
+ // and their individual diagnostics. The LHS and RHS values are guaranteed
+ // to be unmarked and of the correct type.
+ //
+ // ShortCircuit may return cty.NilVal to allow evaluation to proceed as
+ // normal, or it may return a non-nil value with diagnostics to return
+ // before the main Impl is called. The returned diagnostics should match
+ // the side of the Operation which was taken.
+ ShortCircuit func(lhs, rhs cty.Value, lhsDiags, rhsDiags hcl.Diagnostics) (cty.Value, hcl.Diagnostics)
}
var (
OpLogicalOr = &Operation{
Impl: stdlib.OrFunc,
Type: cty.Bool,
+
+ ShortCircuit: func(lhs, rhs cty.Value, lhsDiags, rhsDiags hcl.Diagnostics) (cty.Value, hcl.Diagnostics) {
+ switch {
+ // if both are unknown, we don't short circuit anything
+ case !lhs.IsKnown() && !rhs.IsKnown():
+ // short-circuit left-to-right when encountering a good unknown
+ // value and both are unknown.
+ if !lhsDiags.HasErrors() {
+ return cty.UnknownVal(cty.Bool).RefineNotNull(), lhsDiags
+ }
+ // If the LHS has an error, the RHS might too. Don't
+ // short-circuit so both diags get collected.
+ return cty.NilVal, nil
+
+ // for ||, a single true is the controlling condition
+ case lhs.IsKnown() && lhs.True():
+ return cty.True, lhsDiags
+ case rhs.IsKnown() && rhs.True():
+ return cty.True, rhsDiags
+
+ // if the opposing side is false we can't short-circuit based on
+ // boolean logic, so an unknown becomes the controlling condition
+ case !lhs.IsKnown() && rhs.False():
+ return cty.UnknownVal(cty.Bool).RefineNotNull(), lhsDiags
+ case !rhs.IsKnown() && lhs.False():
+ return cty.UnknownVal(cty.Bool).RefineNotNull(), rhsDiags
+ }
+
+ return cty.NilVal, nil
+ },
}
OpLogicalAnd = &Operation{
Impl: stdlib.AndFunc,
Type: cty.Bool,
+
+ ShortCircuit: func(lhs, rhs cty.Value, lhsDiags, rhsDiags hcl.Diagnostics) (cty.Value, hcl.Diagnostics) {
+
+ switch {
+ case !lhs.IsKnown() && !rhs.IsKnown():
+ // short-circuit left-to-right when encountering a good unknown
+ // value and both are unknown.
+ if !lhsDiags.HasErrors() {
+ return cty.UnknownVal(cty.Bool).RefineNotNull(), lhsDiags
+ }
+ // If the LHS has an error, the RHS might too. Don't
+ // short-circuit so both diags get collected.
+ return cty.NilVal, nil
+
+ // For &&, a single false is the controlling condition
+ case lhs.IsKnown() && lhs.False():
+ return cty.False, lhsDiags
+ case rhs.IsKnown() && rhs.False():
+ return cty.False, rhsDiags
+
+ // if the opposing side is true we can't short-circuit based on
+ // boolean logic, so an unknown becomes the controlling condition
+ case !lhs.IsKnown() && rhs.True():
+ return cty.UnknownVal(cty.Bool).RefineNotNull(), lhsDiags
+ case !rhs.IsKnown() && lhs.True():
+ return cty.UnknownVal(cty.Bool).RefineNotNull(), rhsDiags
+ }
+ return cty.NilVal, nil
+ },
}
OpLogicalNot = &Operation{
Impl: stdlib.NotFunc,
@@ -145,10 +215,6 @@ func (e *BinaryOpExpr) Value(ctx *hcl.EvalContext) (cty.Value, hcl.Diagnostics)
var diags hcl.Diagnostics
givenLHSVal, lhsDiags := e.LHS.Value(ctx)
- givenRHSVal, rhsDiags := e.RHS.Value(ctx)
- diags = append(diags, lhsDiags...)
- diags = append(diags, rhsDiags...)
-
lhsVal, err := convert.Convert(givenLHSVal, lhsParam.Type)
if err != nil {
diags = append(diags, &hcl.Diagnostic{
@@ -161,6 +227,8 @@ func (e *BinaryOpExpr) Value(ctx *hcl.EvalContext) (cty.Value, hcl.Diagnostics)
EvalContext: ctx,
})
}
+
+ givenRHSVal, rhsDiags := e.RHS.Value(ctx)
rhsVal, err := convert.Convert(givenRHSVal, rhsParam.Type)
if err != nil {
diags = append(diags, &hcl.Diagnostic{
@@ -174,12 +242,38 @@ func (e *BinaryOpExpr) Value(ctx *hcl.EvalContext) (cty.Value, hcl.Diagnostics)
})
}
+ // diags so far only contains conversion errors, which should cover
+ // incorrect parameter types.
if diags.HasErrors() {
- // Don't actually try the call if we have errors already, since the
- // this will probably just produce a confusing duplicative diagnostic.
+ // Add the rest of the diagnostic in case that helps the user, but keep
+ // them separate as we continue for short-circuit handling.
+ diags = append(diags, lhsDiags...)
+ diags = append(diags, rhsDiags...)
return cty.UnknownVal(e.Op.Type), diags
}
+ lhsVal, lhsMarks := lhsVal.Unmark()
+ rhsVal, rhsMarks := rhsVal.Unmark()
+
+ if e.Op.ShortCircuit != nil {
+ forceResult, diags := e.Op.ShortCircuit(lhsVal, rhsVal, lhsDiags, rhsDiags)
+ if forceResult != cty.NilVal {
+ // It would be technically more correct to insert rhs diagnostics if
+ // forceResult is not known since we didn't really short-circuit. That
+ // would however not match the behavior of conditional expressions which
+ // do drop all diagnostics from the unevaluated expressions
+ return forceResult.WithMarks(lhsMarks, rhsMarks), diags
+ }
+ }
+
+ diags = append(diags, lhsDiags...)
+ diags = append(diags, rhsDiags...)
+ if diags.HasErrors() {
+ // Don't actually try the call if we have errors, since the this will
+ // probably just produce confusing duplicate diagnostics.
+ return cty.UnknownVal(e.Op.Type).WithMarks(lhsMarks, rhsMarks), diags
+ }
+
args := []cty.Value{lhsVal, rhsVal}
result, err := impl.Call(args)
if err != nil {
@@ -195,7 +289,7 @@ func (e *BinaryOpExpr) Value(ctx *hcl.EvalContext) (cty.Value, hcl.Diagnostics)
return cty.UnknownVal(e.Op.Type), diags
}
- return result, diags
+ return result.WithMarks(lhsMarks, rhsMarks), diags
}
func (e *BinaryOpExpr) Range() hcl.Range {
diff --git a/vendor/github.com/hashicorp/hcl/v2/hclsyntax/expression_template.go b/vendor/github.com/hashicorp/hcl/v2/hclsyntax/expression_template.go
index a0dc7c2291..5713c004df 100644
--- a/vendor/github.com/hashicorp/hcl/v2/hclsyntax/expression_template.go
+++ b/vendor/github.com/hashicorp/hcl/v2/hclsyntax/expression_template.go
@@ -184,11 +184,9 @@ func (e *TemplateJoinExpr) Value(ctx *hcl.EvalContext) (cty.Value, hcl.Diagnosti
if val.IsNull() {
diags = append(diags, &hcl.Diagnostic{
- Severity: hcl.DiagError,
- Summary: "Invalid template interpolation value",
- Detail: fmt.Sprintf(
- "An iteration result is null. Cannot include a null value in a string template.",
- ),
+ Severity: hcl.DiagError,
+ Summary: "Invalid template interpolation value",
+ Detail: "An iteration result is null. Cannot include a null value in a string template.",
Subject: e.Range().Ptr(),
Expression: e,
EvalContext: ctx,
diff --git a/vendor/github.com/hashicorp/hcl/v2/hclsyntax/parser.go b/vendor/github.com/hashicorp/hcl/v2/hclsyntax/parser.go
index ce96ae35b4..fec7861a29 100644
--- a/vendor/github.com/hashicorp/hcl/v2/hclsyntax/parser.go
+++ b/vendor/github.com/hashicorp/hcl/v2/hclsyntax/parser.go
@@ -811,9 +811,16 @@ Traversal:
// will probably be misparsed until we hit something that
// allows us to re-sync.
//
- // We will probably need to do something better here eventually
- // in order to support autocomplete triggered by typing a
- // period.
+ // Returning an ExprSyntaxError allows us to pass more information
+ // about the invalid expression to the caller, which can then
+ // use this for example for completions that happen after typing
+ // a dot in an editor.
+ ret = &ExprSyntaxError{
+ Placeholder: cty.DynamicVal,
+ ParseDiags: diags,
+ SrcRange: hcl.RangeBetween(from.Range(), dot.Range),
+ }
+
p.setRecovery()
}
@@ -1516,6 +1523,16 @@ func (p *parser) parseObjectCons() (Expression, hcl.Diagnostics) {
diags = append(diags, valueDiags...)
if p.recovery && valueDiags.HasErrors() {
+ // If the value is an ExprSyntaxError, we can add an item with it, even though we will recover afterwards
+ // This allows downstream consumers to still retrieve this first invalid item, even though following items
+ // won't be parsed. This is useful for supplying completions.
+ if exprSyntaxError, ok := value.(*ExprSyntaxError); ok {
+ items = append(items, ObjectConsItem{
+ KeyExpr: key,
+ ValueExpr: exprSyntaxError,
+ })
+ }
+
// If expression parsing failed then we are probably in a strange
// place in the token stream, so we'll bail out and try to reset
// to after our closing brace to allow parsing to continue.
diff --git a/vendor/github.com/hashicorp/hcl/v2/hclsyntax/parser_traversal.go b/vendor/github.com/hashicorp/hcl/v2/hclsyntax/parser_traversal.go
index 3afa6ab064..f7d4062f09 100644
--- a/vendor/github.com/hashicorp/hcl/v2/hclsyntax/parser_traversal.go
+++ b/vendor/github.com/hashicorp/hcl/v2/hclsyntax/parser_traversal.go
@@ -4,8 +4,9 @@
package hclsyntax
import (
- "github.com/hashicorp/hcl/v2"
"github.com/zclconf/go-cty/cty"
+
+ "github.com/hashicorp/hcl/v2"
)
// ParseTraversalAbs parses an absolute traversal that is assumed to consume
@@ -13,6 +14,26 @@ import (
// behavior is not supported here because traversals are not expected to
// be parsed as part of a larger program.
func (p *parser) ParseTraversalAbs() (hcl.Traversal, hcl.Diagnostics) {
+ return p.parseTraversal(false)
+}
+
+// ParseTraversalPartial parses an absolute traversal that is permitted
+// to contain splat ([*]) expressions. Only splat expressions within square
+// brackets are permitted ([*]); splat expressions within attribute names are
+// not permitted (.*).
+//
+// The meaning of partial here is that the traversal may be incomplete, in that
+// any splat expression indicates reference to a potentially unknown number of
+// elements.
+//
+// Traversals that include splats cannot be automatically traversed by HCL using
+// the TraversalAbs or TraversalRel methods. Instead, the caller must handle
+// the traversals manually.
+func (p *parser) ParseTraversalPartial() (hcl.Traversal, hcl.Diagnostics) {
+ return p.parseTraversal(true)
+}
+
+func (p *parser) parseTraversal(allowSplats bool) (hcl.Traversal, hcl.Diagnostics) {
var ret hcl.Traversal
var diags hcl.Diagnostics
@@ -127,6 +148,34 @@ func (p *parser) ParseTraversalAbs() (hcl.Traversal, hcl.Diagnostics) {
return ret, diags
}
+ case TokenStar:
+ if allowSplats {
+
+ p.Read() // Eat the star.
+ close := p.Read()
+ if close.Type != TokenCBrack {
+ diags = append(diags, &hcl.Diagnostic{
+ Severity: hcl.DiagError,
+ Summary: "Unclosed index brackets",
+ Detail: "Index key must be followed by a closing bracket.",
+ Subject: &close.Range,
+ Context: hcl.RangeBetween(open.Range, close.Range).Ptr(),
+ })
+ }
+
+ ret = append(ret, hcl.TraverseSplat{
+ SrcRange: hcl.RangeBetween(open.Range, close.Range),
+ })
+
+ if diags.HasErrors() {
+ return ret, diags
+ }
+
+ continue
+ }
+
+ // Otherwise, return the error below for the star.
+ fallthrough
default:
if next.Type == TokenStar {
diags = append(diags, &hcl.Diagnostic{
diff --git a/vendor/github.com/hashicorp/hcl/v2/hclsyntax/public.go b/vendor/github.com/hashicorp/hcl/v2/hclsyntax/public.go
index d56f8e50be..17dc1ed419 100644
--- a/vendor/github.com/hashicorp/hcl/v2/hclsyntax/public.go
+++ b/vendor/github.com/hashicorp/hcl/v2/hclsyntax/public.go
@@ -118,6 +118,37 @@ func ParseTraversalAbs(src []byte, filename string, start hcl.Pos) (hcl.Traversa
return expr, diags
}
+// ParseTraversalPartial matches the behavior of ParseTraversalAbs except
+// that it allows splat expressions ([*]) to appear in the traversal.
+//
+// The returned traversals are "partial" in that the splat expression indicates
+// an unknown value for the index.
+//
+// Traversals that include splats cannot be automatically traversed by HCL using
+// the TraversalAbs or TraversalRel methods. Instead, the caller must handle
+// the traversals manually.
+func ParseTraversalPartial(src []byte, filename string, start hcl.Pos) (hcl.Traversal, hcl.Diagnostics) {
+ tokens, diags := LexExpression(src, filename, start)
+ peeker := newPeeker(tokens, false)
+ parser := &parser{peeker: peeker}
+
+ // Bare traverals are always parsed in "ignore newlines" mode, as if
+ // they were wrapped in parentheses.
+ parser.PushIncludeNewlines(false)
+
+ expr, parseDiags := parser.ParseTraversalPartial()
+ diags = append(diags, parseDiags...)
+
+ parser.PopIncludeNewlines()
+
+ // Panic if the parser uses incorrect stack discipline with the peeker's
+ // newlines stack, since otherwise it will produce confusing downstream
+ // errors.
+ peeker.AssertEmptyIncludeNewlinesStack()
+
+ return expr, diags
+}
+
// LexConfig performs lexical analysis on the given buffer, treating it as a
// whole HCL config file, and returns the resulting tokens.
//
diff --git a/vendor/github.com/hashicorp/hcl/v2/hclsyntax/structure.go b/vendor/github.com/hashicorp/hcl/v2/hclsyntax/structure.go
index ff272631d4..545ef42f5d 100644
--- a/vendor/github.com/hashicorp/hcl/v2/hclsyntax/structure.go
+++ b/vendor/github.com/hashicorp/hcl/v2/hclsyntax/structure.go
@@ -42,7 +42,7 @@ type Body struct {
}
// Assert that *Body implements hcl.Body
-var assertBodyImplBody hcl.Body = &Body{}
+var _ hcl.Body = &Body{}
func (b *Body) walkChildNodes(w internalWalkFunc) {
w(b.Attributes)
diff --git a/vendor/github.com/hashicorp/hcl/v2/hclsyntax/variables.go b/vendor/github.com/hashicorp/hcl/v2/hclsyntax/variables.go
index b4be926986..af2c4601b0 100644
--- a/vendor/github.com/hashicorp/hcl/v2/hclsyntax/variables.go
+++ b/vendor/github.com/hashicorp/hcl/v2/hclsyntax/variables.go
@@ -20,6 +20,7 @@ func Variables(expr Expression) []hcl.Traversal {
},
}
+ //nolint:errcheck // FIXME: Propogate diagnostics/errors upward.
Walk(expr, walker)
return vars
diff --git a/vendor/github.com/hashicorp/hcl/v2/merged.go b/vendor/github.com/hashicorp/hcl/v2/merged.go
index 27fd1ed5eb..49474ee74b 100644
--- a/vendor/github.com/hashicorp/hcl/v2/merged.go
+++ b/vendor/github.com/hashicorp/hcl/v2/merged.go
@@ -107,23 +107,21 @@ func (mb mergedBodies) JustAttributes() (Attributes, Diagnostics) {
diags = append(diags, thisDiags...)
}
- if thisAttrs != nil {
- for name, attr := range thisAttrs {
- if existing := attrs[name]; existing != nil {
- diags = diags.Append(&Diagnostic{
- Severity: DiagError,
- Summary: "Duplicate argument",
- Detail: fmt.Sprintf(
- "Argument %q was already set at %s",
- name, existing.NameRange.String(),
- ),
- Subject: &attr.NameRange,
- })
- continue
- }
-
- attrs[name] = attr
+ for name, attr := range thisAttrs {
+ if existing := attrs[name]; existing != nil {
+ diags = diags.Append(&Diagnostic{
+ Severity: DiagError,
+ Summary: "Duplicate argument",
+ Detail: fmt.Sprintf(
+ "Argument %q was already set at %s",
+ name, existing.NameRange.String(),
+ ),
+ Subject: &attr.NameRange,
+ })
+ continue
}
+
+ attrs[name] = attr
}
}
diff --git a/vendor/github.com/hashicorp/hcl/v2/ops.go b/vendor/github.com/hashicorp/hcl/v2/ops.go
index bdf23614d6..9420abdb1c 100644
--- a/vendor/github.com/hashicorp/hcl/v2/ops.go
+++ b/vendor/github.com/hashicorp/hcl/v2/ops.go
@@ -49,7 +49,7 @@ func Index(collection, key cty.Value, srcRange *Range) (cty.Value, Diagnostics)
ty := collection.Type()
kty := key.Type()
if kty == cty.DynamicPseudoType || ty == cty.DynamicPseudoType {
- return cty.DynamicVal, nil
+ return cty.DynamicVal.WithSameMarks(collection), nil
}
switch {
@@ -87,9 +87,9 @@ func Index(collection, key cty.Value, srcRange *Range) (cty.Value, Diagnostics)
has, _ := collection.HasIndex(key).Unmark()
if !has.IsKnown() {
if ty.IsTupleType() {
- return cty.DynamicVal, nil
+ return cty.DynamicVal.WithSameMarks(collection), nil
} else {
- return cty.UnknownVal(ty.ElementType()), nil
+ return cty.UnknownVal(ty.ElementType()).WithSameMarks(collection), nil
}
}
if has.False() {
@@ -195,11 +195,8 @@ func Index(collection, key cty.Value, srcRange *Range) (cty.Value, Diagnostics)
},
}
}
- if !collection.IsKnown() {
- return cty.DynamicVal, nil
- }
if !key.IsKnown() {
- return cty.DynamicVal, nil
+ return cty.DynamicVal.WithSameMarks(collection), nil
}
key, _ = key.Unmark()
@@ -225,6 +222,10 @@ func Index(collection, key cty.Value, srcRange *Range) (cty.Value, Diagnostics)
}
}
+ if !collection.IsKnown() {
+ return cty.UnknownVal(ty.AttributeType(attrName)).WithSameMarks(collection), nil
+ }
+
return collection.GetAttr(attrName), nil
case ty.IsSetType():
@@ -291,13 +292,13 @@ func GetAttr(obj cty.Value, attrName string, srcRange *Range) (cty.Value, Diagno
}
if !obj.IsKnown() {
- return cty.UnknownVal(ty.AttributeType(attrName)), nil
+ return cty.UnknownVal(ty.AttributeType(attrName)).WithSameMarks(obj), nil
}
return obj.GetAttr(attrName), nil
case ty.IsMapType():
if !obj.IsKnown() {
- return cty.UnknownVal(ty.ElementType()), nil
+ return cty.UnknownVal(ty.ElementType()).WithSameMarks(obj), nil
}
idx := cty.StringVal(attrName)
@@ -319,7 +320,7 @@ func GetAttr(obj cty.Value, attrName string, srcRange *Range) (cty.Value, Diagno
return obj.Index(idx), nil
case ty == cty.DynamicPseudoType:
- return cty.DynamicVal, nil
+ return cty.DynamicVal.WithSameMarks(obj), nil
case ty.IsListType() && ty.ElementType().IsObjectType():
// It seems a common mistake to try to access attributes on a whole
// list of objects rather than on a specific individual element, so
diff --git a/vendor/github.com/hashicorp/hcl/v2/spec.md b/vendor/github.com/hashicorp/hcl/v2/spec.md
index 97ef613182..d52ed70bb5 100644
--- a/vendor/github.com/hashicorp/hcl/v2/spec.md
+++ b/vendor/github.com/hashicorp/hcl/v2/spec.md
@@ -96,7 +96,7 @@ of the implementation language.
### _Dynamic Attributes_ Processing
The _schema-driven_ processing model is useful when the expected structure
-of a body is known a priori by the calling application. Some blocks are
+of a body is known by the calling application. Some blocks are
instead more free-form, such as a user-provided set of arbitrary key/value
pairs.
diff --git a/vendor/github.com/hashicorp/hcl/v2/traversal_for_expr.go b/vendor/github.com/hashicorp/hcl/v2/traversal_for_expr.go
index 87eeb15997..d3cb4507ef 100644
--- a/vendor/github.com/hashicorp/hcl/v2/traversal_for_expr.go
+++ b/vendor/github.com/hashicorp/hcl/v2/traversal_for_expr.go
@@ -74,7 +74,7 @@ func RelTraversalForExpr(expr Expression) (Traversal, Diagnostics) {
// For example, the following attribute has an expression that would produce
// the keyword "foo":
//
-// example = foo
+// example = foo
//
// This function is a variant of AbsTraversalForExpr, which uses the same
// interface on the given expression. This helper constrains the result
@@ -84,16 +84,16 @@ func RelTraversalForExpr(expr Expression) (Traversal, Diagnostics) {
// situations where one of a fixed set of keywords is required and arbitrary
// expressions are not allowed:
//
-// switch hcl.ExprAsKeyword(expr) {
-// case "allow":
-// // (take suitable action for keyword "allow")
-// case "deny":
-// // (take suitable action for keyword "deny")
-// default:
-// diags = append(diags, &hcl.Diagnostic{
-// // ... "invalid keyword" diagnostic message ...
-// })
-// }
+// switch hcl.ExprAsKeyword(expr) {
+// case "allow":
+// // (take suitable action for keyword "allow")
+// case "deny":
+// // (take suitable action for keyword "deny")
+// default:
+// diags = append(diags, &hcl.Diagnostic{
+// // ... "invalid keyword" diagnostic message ...
+// })
+// }
//
// The above approach will generate the same message for both the use of an
// unrecognized keyword and for not using a keyword at all, which is usually
diff --git a/vendor/github.com/hashicorp/terraform-exec/internal/version/version.go b/vendor/github.com/hashicorp/terraform-exec/internal/version/version.go
index 235d561265..72f2e1f7be 100644
--- a/vendor/github.com/hashicorp/terraform-exec/internal/version/version.go
+++ b/vendor/github.com/hashicorp/terraform-exec/internal/version/version.go
@@ -3,7 +3,7 @@
package version
-const version = "0.21.0"
+const version = "0.23.1"
// ModuleVersion returns the current version of the github.com/hashicorp/terraform-exec Go module.
// This is a function to allow for future possible enhancement using debug.BuildInfo.
diff --git a/vendor/github.com/hashicorp/terraform-exec/tfexec/cmd.go b/vendor/github.com/hashicorp/terraform-exec/tfexec/cmd.go
index 5e160324c8..cd5a7e28bb 100644
--- a/vendor/github.com/hashicorp/terraform-exec/tfexec/cmd.go
+++ b/vendor/github.com/hashicorp/terraform-exec/tfexec/cmd.go
@@ -14,6 +14,7 @@ import (
"io/ioutil"
"os"
"os/exec"
+ "runtime"
"strings"
"github.com/hashicorp/terraform-exec/internal/version"
@@ -187,6 +188,14 @@ func (tf *Terraform) buildTerraformCmd(ctx context.Context, mergeEnv map[string]
cmd.Env = tf.buildEnv(mergeEnv)
cmd.Dir = tf.workingDir
+ if runtime.GOOS != "windows" {
+ // Windows does not support SIGINT so we cannot do graceful cancellation
+ // see https://pkg.go.dev/os#Signal (os.Interrupt)
+ cmd.Cancel = func() error {
+ return cmd.Process.Signal(os.Interrupt)
+ }
+ cmd.WaitDelay = tf.waitDelay
+ }
tf.logger.Printf("[INFO] running Terraform command: %s", cmd.String())
@@ -243,20 +252,30 @@ func mergeWriters(writers ...io.Writer) io.Writer {
return io.MultiWriter(compact...)
}
-func writeOutput(ctx context.Context, r io.ReadCloser, w io.Writer) error {
- // ReadBytes will block until bytes are read, which can cause a delay in
- // returning even if the command's context has been canceled. Use a separate
- // goroutine to prompt ReadBytes to return on cancel
- closeCtx, closeCancel := context.WithCancel(ctx)
- defer closeCancel()
- go func() {
- select {
- case <-ctx.Done():
- r.Close()
- case <-closeCtx.Done():
- return
- }
- }()
+func (tf *Terraform) writeOutput(ctx context.Context, r io.ReadCloser, w io.Writer) error {
+ // ReadBytes will block until all bytes are read, which can cause a delay in
+ // returning even if the command's context has been canceled. When the
+ // context is canceled, Terraform receives an interrupt signal and will exit
+ // after a short while. Once the process has exited, the stdio pipes will
+ // close, allowing this function to return.
+
+ if tf.enableLegacyPipeClosing {
+ // Rather than wait for the stdio pipes to close naturally, we can close
+ // them ourselves when the command's context is canceled, causing the
+ // process to exit immediately. This works around a bug in Terraform
+ // < v1.1 that would otherwise leave the process (and this function)
+ // hanging after the context is canceled.
+ closeCtx, closeCancel := context.WithCancel(ctx)
+ defer closeCancel()
+ go func() {
+ select {
+ case <-ctx.Done():
+ r.Close()
+ case <-closeCtx.Done():
+ return
+ }
+ }()
+ }
buf := bufio.NewReader(r)
for {
diff --git a/vendor/github.com/hashicorp/terraform-exec/tfexec/cmd_default.go b/vendor/github.com/hashicorp/terraform-exec/tfexec/cmd_default.go
index 3af11c8122..7a5aa81997 100644
--- a/vendor/github.com/hashicorp/terraform-exec/tfexec/cmd_default.go
+++ b/vendor/github.com/hashicorp/terraform-exec/tfexec/cmd_default.go
@@ -59,13 +59,13 @@ func (tf *Terraform) runTerraformCmd(ctx context.Context, cmd *exec.Cmd) error {
wg.Add(1)
go func() {
defer wg.Done()
- errStdout = writeOutput(ctx, stdoutPipe, stdoutWriter)
+ errStdout = tf.writeOutput(ctx, stdoutPipe, stdoutWriter)
}()
wg.Add(1)
go func() {
defer wg.Done()
- errStderr = writeOutput(ctx, stderrPipe, stderrWriter)
+ errStderr = tf.writeOutput(ctx, stderrPipe, stderrWriter)
}()
// Reads from pipes must be completed before calling cmd.Wait(). Otherwise
diff --git a/vendor/github.com/hashicorp/terraform-exec/tfexec/cmd_linux.go b/vendor/github.com/hashicorp/terraform-exec/tfexec/cmd_linux.go
index 0565372c12..43e44a5e4d 100644
--- a/vendor/github.com/hashicorp/terraform-exec/tfexec/cmd_linux.go
+++ b/vendor/github.com/hashicorp/terraform-exec/tfexec/cmd_linux.go
@@ -64,13 +64,13 @@ func (tf *Terraform) runTerraformCmd(ctx context.Context, cmd *exec.Cmd) error {
wg.Add(1)
go func() {
defer wg.Done()
- errStdout = writeOutput(ctx, stdoutPipe, stdoutWriter)
+ errStdout = tf.writeOutput(ctx, stdoutPipe, stdoutWriter)
}()
wg.Add(1)
go func() {
defer wg.Done()
- errStderr = writeOutput(ctx, stderrPipe, stderrWriter)
+ errStderr = tf.writeOutput(ctx, stderrPipe, stderrWriter)
}()
// Reads from pipes must be completed before calling cmd.Wait(). Otherwise
diff --git a/vendor/github.com/hashicorp/terraform-exec/tfexec/errors.go b/vendor/github.com/hashicorp/terraform-exec/tfexec/errors.go
index c6645e8bc7..14a4772765 100644
--- a/vendor/github.com/hashicorp/terraform-exec/tfexec/errors.go
+++ b/vendor/github.com/hashicorp/terraform-exec/tfexec/errors.go
@@ -62,6 +62,10 @@ func (e cmdErr) Is(target error) bool {
return false
}
+func (e cmdErr) Unwrap() error {
+ return e.err
+}
+
func (e cmdErr) Error() string {
return e.err.Error()
}
diff --git a/vendor/github.com/hashicorp/terraform-exec/tfexec/init.go b/vendor/github.com/hashicorp/terraform-exec/tfexec/init.go
index c292fdc0f1..ac5eea5508 100644
--- a/vendor/github.com/hashicorp/terraform-exec/tfexec/init.go
+++ b/vendor/github.com/hashicorp/terraform-exec/tfexec/init.go
@@ -6,6 +6,7 @@ package tfexec
import (
"context"
"fmt"
+ "io"
"os/exec"
)
@@ -99,6 +100,21 @@ func (opt *VerifyPluginsOption) configureInit(conf *initConfig) {
conf.verifyPlugins = opt.verifyPlugins
}
+func (tf *Terraform) configureInitOptions(ctx context.Context, c *initConfig, opts ...InitOption) error {
+ for _, o := range opts {
+ switch o.(type) {
+ case *LockOption, *LockTimeoutOption, *VerifyPluginsOption, *GetPluginsOption:
+ err := tf.compatible(ctx, nil, tf0_15_0)
+ if err != nil {
+ return fmt.Errorf("-lock, -lock-timeout, -verify-plugins, and -get-plugins options are no longer available as of Terraform 0.15: %w", err)
+ }
+ }
+
+ o.configureInit(c)
+ }
+ return nil
+}
+
// Init represents the terraform init subcommand.
func (tf *Terraform) Init(ctx context.Context, opts ...InitOption) error {
cmd, err := tf.initCmd(ctx, opts...)
@@ -108,21 +124,71 @@ func (tf *Terraform) Init(ctx context.Context, opts ...InitOption) error {
return tf.runTerraformCmd(ctx, cmd)
}
+// InitJSON represents the terraform init subcommand with the `-json` flag.
+// Using the `-json` flag will result in
+// [machine-readable](https://developer.hashicorp.com/terraform/internals/machine-readable-ui)
+// JSON being written to the supplied `io.Writer`.
+func (tf *Terraform) InitJSON(ctx context.Context, w io.Writer, opts ...InitOption) error {
+ err := tf.compatible(ctx, tf1_9_0, nil)
+ if err != nil {
+ return fmt.Errorf("terraform init -json was added in 1.9.0: %w", err)
+ }
+
+ tf.SetStdout(w)
+
+ cmd, err := tf.initJSONCmd(ctx, opts...)
+ if err != nil {
+ return err
+ }
+
+ return tf.runTerraformCmd(ctx, cmd)
+}
+
func (tf *Terraform) initCmd(ctx context.Context, opts ...InitOption) (*exec.Cmd, error) {
c := defaultInitOptions
- for _, o := range opts {
- switch o.(type) {
- case *LockOption, *LockTimeoutOption, *VerifyPluginsOption, *GetPluginsOption:
- err := tf.compatible(ctx, nil, tf0_15_0)
- if err != nil {
- return nil, fmt.Errorf("-lock, -lock-timeout, -verify-plugins, and -get-plugins options are no longer available as of Terraform 0.15: %w", err)
- }
- }
+ err := tf.configureInitOptions(ctx, &c, opts...)
+ if err != nil {
+ return nil, err
+ }
+
+ args, err := tf.buildInitArgs(ctx, c)
+ if err != nil {
+ return nil, err
+ }
+
+ // Optional positional argument; must be last as flags precede positional arguments.
+ if c.dir != "" {
+ args = append(args, c.dir)
+ }
+
+ return tf.buildInitCmd(ctx, c, args)
+}
+
+func (tf *Terraform) initJSONCmd(ctx context.Context, opts ...InitOption) (*exec.Cmd, error) {
+ c := defaultInitOptions
+
+ err := tf.configureInitOptions(ctx, &c, opts...)
+ if err != nil {
+ return nil, err
+ }
- o.configureInit(&c)
+ args, err := tf.buildInitArgs(ctx, c)
+ if err != nil {
+ return nil, err
+ }
+
+ args = append(args, "-json")
+
+ // Optional positional argument; must be last as flags precede positional arguments.
+ if c.dir != "" {
+ args = append(args, c.dir)
}
+ return tf.buildInitCmd(ctx, c, args)
+}
+
+func (tf *Terraform) buildInitArgs(ctx context.Context, c initConfig) ([]string, error) {
args := []string{"init", "-no-color", "-input=false"}
// string opts: only pass if set
@@ -172,11 +238,10 @@ func (tf *Terraform) initCmd(ctx context.Context, opts ...InitOption) (*exec.Cmd
}
}
- // optional positional argument
- if c.dir != "" {
- args = append(args, c.dir)
- }
+ return args, nil
+}
+func (tf *Terraform) buildInitCmd(ctx context.Context, c initConfig, args []string) (*exec.Cmd, error) {
mergeEnv := map[string]string{}
if c.reattachInfo != nil {
reattachStr, err := c.reattachInfo.marshalString()
diff --git a/vendor/github.com/hashicorp/terraform-exec/tfexec/terraform.go b/vendor/github.com/hashicorp/terraform-exec/tfexec/terraform.go
index 628b733dec..9ea21c59d3 100644
--- a/vendor/github.com/hashicorp/terraform-exec/tfexec/terraform.go
+++ b/vendor/github.com/hashicorp/terraform-exec/tfexec/terraform.go
@@ -5,12 +5,15 @@ package tfexec
import (
"context"
+ "errors"
"fmt"
"io"
"io/ioutil"
"log"
"os"
+ "runtime"
"sync"
+ "time"
"github.com/hashicorp/go-version"
)
@@ -67,6 +70,12 @@ type Terraform struct {
// TF_LOG_PROVIDER environment variable
logProvider string
+ // waitDelay represents the WaitDelay field of the [exec.Cmd] of Terraform
+ waitDelay time.Duration
+
+ // enableLegacyPipeClosing closes the stdout/stderr pipes before calling [exec.Cmd.Wait]
+ enableLegacyPipeClosing bool
+
versionLock sync.Mutex
execVersion *version.Version
provVersions map[string]*version.Version
@@ -95,6 +104,7 @@ func NewTerraform(workingDir string, execPath string) (*Terraform, error) {
workingDir: workingDir,
env: nil, // explicit nil means copy os.Environ
logger: log.New(ioutil.Discard, "", 0),
+ waitDelay: 60 * time.Second,
}
return &tf, nil
@@ -216,6 +226,25 @@ func (tf *Terraform) SetSkipProviderVerify(skip bool) error {
return nil
}
+// SetWaitDelay sets the WaitDelay of running Terraform process as [exec.Cmd]
+func (tf *Terraform) SetWaitDelay(delay time.Duration) error {
+ if runtime.GOOS == "windows" {
+ return errors.New("cannot set WaitDelay, graceful cancellation not supported on windows")
+ }
+ tf.waitDelay = delay
+ return nil
+}
+
+// SetEnableLegacyPipeClosing causes the library to "force-close" stdio pipes.
+// This works around a bug in Terraform < v1.1 that would otherwise leave
+// the process (and caller) hanging after graceful shutdown.
+//
+// This option can be safely ignored (set to false) with Terraform 1.1+.
+func (tf *Terraform) SetEnableLegacyPipeClosing(enabled bool) error {
+ tf.enableLegacyPipeClosing = enabled
+ return nil
+}
+
// WorkingDir returns the working directory for Terraform.
func (tf *Terraform) WorkingDir() string {
return tf.workingDir
diff --git a/vendor/github.com/hashicorp/terraform-json/.go-version b/vendor/github.com/hashicorp/terraform-json/.go-version
index 5fb5a6b4f5..5e2b950027 100644
--- a/vendor/github.com/hashicorp/terraform-json/.go-version
+++ b/vendor/github.com/hashicorp/terraform-json/.go-version
@@ -1 +1 @@
-1.20
+1.25
diff --git a/vendor/github.com/hashicorp/terraform-json/CODEOWNERS b/vendor/github.com/hashicorp/terraform-json/CODEOWNERS
index a99f162a51..c13d2cafe8 100644
--- a/vendor/github.com/hashicorp/terraform-json/CODEOWNERS
+++ b/vendor/github.com/hashicorp/terraform-json/CODEOWNERS
@@ -1,2 +1,2 @@
# This codebase has shared ownership and responsibility.
-* @hashicorp/terraform-core @hashicorp/terraform-devex @hashicorp/tf-editor-experience-engineers
+* @hashicorp/terraform-core @hashicorp/terraform-core-plugins @hashicorp/tf-editor-experience-engineers
diff --git a/vendor/github.com/hashicorp/terraform-json/CONTRIBUTING.md b/vendor/github.com/hashicorp/terraform-json/CONTRIBUTING.md
new file mode 100644
index 0000000000..07b5fd5c8f
--- /dev/null
+++ b/vendor/github.com/hashicorp/terraform-json/CONTRIBUTING.md
@@ -0,0 +1,22 @@
+# Contributing to terraform-json
+
+## Versioning
+
+The `github.com/hashicorp/terraform-json` Go module in its entirety is versioned according to [Go module versioning](https://golang.org/ref/mod#versions) with Git tags.
+
+There is currently no firm plan for releasing v1.
+
+## Releases
+
+Releases are made on a reasonably regular basis by the Terraform team, using our custom CI workflows. There is currently no set release schedule and no requirement for _contributors_ to write changelog entries.
+
+The following notes are only relevant to maintainers.
+
+[Create new release](https://github.com/hashicorp/terraform-json/releases/new) via GitHub UI to point to the new tag and use GitHub to generate the changelog (`Generate release notes` button).
+
+You can format the generated changelog before publishing - e.g. ensure entries are grouped into categories such as `ENHANCEMENTS`, `BUG FIXES` and `INTERNAL`.
+
+## Security vulnerabilities
+
+Please disclose security vulnerabilities by following the procedure
+described at https://www.hashicorp.com/security#vulnerability-reporting.
diff --git a/vendor/github.com/hashicorp/terraform-json/action.go b/vendor/github.com/hashicorp/terraform-json/action.go
index c74f7e68a3..9dcab8569e 100644
--- a/vendor/github.com/hashicorp/terraform-json/action.go
+++ b/vendor/github.com/hashicorp/terraform-json/action.go
@@ -26,6 +26,9 @@ const (
// ActionDelete denotes a delete operation.
ActionDelete Action = "delete"
+
+ // ActionForget denotes a forget operation.
+ ActionForget Action = "forget"
)
// Actions denotes a valid change type.
@@ -105,3 +108,12 @@ func (a Actions) CreateBeforeDestroy() bool {
func (a Actions) Replace() bool {
return a.DestroyBeforeCreate() || a.CreateBeforeDestroy()
}
+
+// Forget is true if this set of Actions denotes a forget operation.
+func (a Actions) Forget() bool {
+ if len(a) != 1 {
+ return false
+ }
+
+ return a[0] == ActionForget
+}
diff --git a/vendor/github.com/hashicorp/terraform-json/catalog-info.yaml b/vendor/github.com/hashicorp/terraform-json/catalog-info.yaml
new file mode 100644
index 0000000000..f64e83854c
--- /dev/null
+++ b/vendor/github.com/hashicorp/terraform-json/catalog-info.yaml
@@ -0,0 +1,17 @@
+# Copyright (c) HashiCorp, Inc.
+# SPDX-License-Identifier: MPL-2.0
+#
+# Intended for internal HashiCorp use only
+apiVersion: backstage.io/v1alpha1
+kind: Component
+metadata:
+ name: terraform-json
+ description: Helper types for the Terraform external data representation
+ annotations:
+ github.com/project-slug: hashicorp/terraform-json
+ jira/project-key: TF
+ jira/label: terraform-json
+spec:
+ type: library
+ owner: team-tf-core
+ lifecycle: production
diff --git a/vendor/github.com/hashicorp/terraform-json/logging.go b/vendor/github.com/hashicorp/terraform-json/logging.go
new file mode 100644
index 0000000000..adfcf60c32
--- /dev/null
+++ b/vendor/github.com/hashicorp/terraform-json/logging.go
@@ -0,0 +1,84 @@
+// Copyright (c) HashiCorp, Inc.
+// SPDX-License-Identifier: MPL-2.0
+package tfjson
+
+import (
+ "bytes"
+ "encoding/json"
+ "time"
+)
+
+// LogMessageLevel represents log level
+// See https://github.com/hashicorp/go-hclog/blob/v1.6.3/logger.go#L126-L145
+type LogMessageLevel string
+
+const (
+ // Trace is the most verbose level. Intended to be used for the tracing
+ // of actions in code, such as function enters/exits, etc.
+ Trace LogMessageLevel = "trace"
+
+ // Debug information for programmer low-level analysis.
+ Debug LogMessageLevel = "debug"
+
+ // Info information about steady state operations.
+ Info LogMessageLevel = "info"
+
+ // Warn information about rare but handled events.
+ Warn LogMessageLevel = "warn"
+
+ // Error information about unrecoverable events.
+ Error LogMessageLevel = "error"
+)
+
+// LogMessage represents a log message emitted from commands
+// which support structured log output.
+//
+// This is implemented via hashicorp/go-hclog which
+// defines the format.
+type LogMsg interface {
+ Level() LogMessageLevel
+ Message() string
+ Timestamp() time.Time
+}
+
+type baseLogMessage struct {
+ Lvl LogMessageLevel `json:"@level"`
+ Msg string `json:"@message"`
+ Time time.Time `json:"@timestamp"`
+}
+
+type msgType struct {
+ // Type represents a message type
+ // which is documented at https://developer.hashicorp.com/terraform/internals/machine-readable-ui#message-types
+ Type LogMessageType `json:"type"`
+}
+
+func (m baseLogMessage) Level() LogMessageLevel {
+ return m.Lvl
+}
+
+func (m baseLogMessage) Message() string {
+ return m.Msg
+}
+
+func (m baseLogMessage) Timestamp() time.Time {
+ return m.Time
+}
+
+// UnknownLogMessage represents a message of unknown type
+type UnknownLogMessage struct {
+ baseLogMessage
+}
+
+func UnmarshalLogMessage(b []byte) (LogMsg, error) {
+ d := json.NewDecoder(bytes.NewReader(b))
+
+ mt := msgType{}
+ err := d.Decode(&mt)
+ if err != nil {
+ return nil, err
+ }
+
+ v, err := unmarshalByType(mt.Type, b)
+ return v, err
+}
diff --git a/vendor/github.com/hashicorp/terraform-json/logging_generic.go b/vendor/github.com/hashicorp/terraform-json/logging_generic.go
new file mode 100644
index 0000000000..4414abc3b0
--- /dev/null
+++ b/vendor/github.com/hashicorp/terraform-json/logging_generic.go
@@ -0,0 +1,27 @@
+// Copyright (c) HashiCorp, Inc.
+// SPDX-License-Identifier: MPL-2.0
+package tfjson
+
+import "github.com/hashicorp/go-version"
+
+// VersionLogMessage represents information about the Terraform version
+// and the version of the schema used for the following messages.
+// This is a message of type "version".
+type VersionLogMessage struct {
+ baseLogMessage
+ Terraform *version.Version `json:"terraform"`
+ UI *version.Version `json:"ui"`
+}
+
+// LogMessage represents a generic human-readable log line
+// This is a message of type "log"
+type LogMessage struct {
+ baseLogMessage
+}
+
+// DiagnosticLogMessage represents diagnostic warning or error message.
+// This is a message of type "diagnostic"
+type DiagnosticLogMessage struct {
+ baseLogMessage
+ Diagnostic `json:"diagnostic"`
+}
diff --git a/vendor/github.com/hashicorp/terraform-json/logging_query.go b/vendor/github.com/hashicorp/terraform-json/logging_query.go
new file mode 100644
index 0000000000..db41b74b09
--- /dev/null
+++ b/vendor/github.com/hashicorp/terraform-json/logging_query.go
@@ -0,0 +1,50 @@
+// Copyright (c) HashiCorp, Inc.
+// SPDX-License-Identifier: MPL-2.0
+package tfjson
+
+const (
+ MessageListStart LogMessageType = "list_start"
+ MessageListResourceFound LogMessageType = "list_resource_found"
+ MessageListComplete LogMessageType = "list_complete"
+)
+
+// ListStartMessage represents "query" result message of type "list_start"
+type ListStartMessage struct {
+ baseLogMessage
+ ListStart ListStartData `json:"list_start"`
+}
+
+type ListStartData struct {
+ Address string `json:"address"`
+ ResourceType string `json:"resource_type"`
+ InputConfig map[string]any `json:"input_config,omitempty"`
+}
+
+// ListResourceFoundMessage represents "query" result message of type "list_resource_found"
+type ListResourceFoundMessage struct {
+ baseLogMessage
+ ListResourceFound ListResourceFoundData `json:"list_resource_found"`
+}
+
+type ListResourceFoundData struct {
+ Address string `json:"address"`
+ DisplayName string `json:"display_name"`
+ Identity map[string]any `json:"identity"`
+ IdentityVersion int64 `json:"identity_version"`
+ ResourceType string `json:"resource_type"`
+ ResourceObject map[string]any `json:"resource_object,omitempty"`
+ Config string `json:"config,omitempty"`
+ ImportConfig string `json:"import_config,omitempty"`
+}
+
+// ListCompleteMessage represents "query" result message of type "list_complete"
+type ListCompleteMessage struct {
+ baseLogMessage
+ ListComplete ListCompleteData `json:"list_complete"`
+}
+
+type ListCompleteData struct {
+ Address string `json:"address"`
+ ResourceType string `json:"resource_type"`
+ Total int `json:"total"`
+}
diff --git a/vendor/github.com/hashicorp/terraform-json/logging_types.go b/vendor/github.com/hashicorp/terraform-json/logging_types.go
new file mode 100644
index 0000000000..3e712a0fdd
--- /dev/null
+++ b/vendor/github.com/hashicorp/terraform-json/logging_types.go
@@ -0,0 +1,59 @@
+// Copyright (c) HashiCorp, Inc.
+// SPDX-License-Identifier: MPL-2.0
+package tfjson
+
+import (
+ "encoding/json"
+)
+
+type LogMessageType string
+
+const (
+ MessageTypeVersion LogMessageType = "version"
+ MessageTypeLog LogMessageType = "log"
+ MessageTypeDiagnostic LogMessageType = "diagnostic"
+)
+
+// allLogMessageTypes is a slice containing all recognised message types
+// to be passed into cmp.AllowUnexported
+var allLogMessageTypes = []any{
+ VersionLogMessage{},
+ LogMessage{},
+ DiagnosticLogMessage{},
+ UnknownLogMessage{},
+
+ // query
+ ListStartMessage{},
+ ListResourceFoundMessage{},
+ ListCompleteMessage{},
+}
+
+func unmarshalByType(t LogMessageType, b []byte) (LogMsg, error) {
+ switch t {
+
+ // generic
+ case MessageTypeVersion:
+ v := VersionLogMessage{}
+ return v, json.Unmarshal(b, &v)
+ case MessageTypeLog:
+ v := LogMessage{}
+ return v, json.Unmarshal(b, &v)
+ case MessageTypeDiagnostic:
+ v := DiagnosticLogMessage{}
+ return v, json.Unmarshal(b, &v)
+
+ // query
+ case MessageListStart:
+ v := ListStartMessage{}
+ return v, json.Unmarshal(b, &v)
+ case MessageListResourceFound:
+ v := ListResourceFoundMessage{}
+ return v, json.Unmarshal(b, &v)
+ case MessageListComplete:
+ v := ListCompleteMessage{}
+ return v, json.Unmarshal(b, &v)
+ }
+
+ v := UnknownLogMessage{}
+ return v, json.Unmarshal(b, &v)
+}
diff --git a/vendor/github.com/hashicorp/terraform-json/plan.go b/vendor/github.com/hashicorp/terraform-json/plan.go
index d861898567..579e8d715f 100644
--- a/vendor/github.com/hashicorp/terraform-json/plan.go
+++ b/vendor/github.com/hashicorp/terraform-json/plan.go
@@ -92,6 +92,8 @@ type Plan struct {
// Timestamp contains the static timestamp that Terraform considers to be
// the time this plan executed, in UTC.
Timestamp string `json:"timestamp,omitempty"`
+
+ ActionInvocations []*ActionInvocation `json:"action_invocations,omitempty"`
}
// ResourceAttribute describes a full path to a resource attribute
@@ -140,15 +142,6 @@ func (p *Plan) Validate() error {
return nil
}
-func isStringInSlice(slice []string, s string) bool {
- for _, el := range slice {
- if el == s {
- return true
- }
- }
- return false
-}
-
func (p *Plan) UnmarshalJSON(b []byte) error {
type rawPlan Plan
var plan rawPlan
@@ -266,6 +259,11 @@ type Change struct {
// is either an integer pointing to a child of a set/list, or a string
// pointing to the child of a map, object, or block.
ReplacePaths []interface{} `json:"replace_paths,omitempty"`
+
+ // BeforeIdentity and AfterIdentity are representations of the resource
+ // identity value both before and after the action.
+ BeforeIdentity interface{} `json:"before_identity,omitempty"`
+ AfterIdentity interface{} `json:"after_identity,omitempty"`
}
// Importing is a nested object for the resource import metadata.
@@ -273,6 +271,16 @@ type Importing struct {
// The original ID of this resource used to target it as part of planned
// import operation.
ID string `json:"id,omitempty"`
+
+ // Unknown indicates the ID or identity was unknown at the time of
+ // planning. This would have led to the overall change being deferred, as
+ // such this should only be true when processing changes from the deferred
+ // changes list.
+ Unknown bool `json:"unknown,omitempty"`
+
+ // The identity can be used instead of the ID to target the resource as part
+ // of the planned import operation.
+ Identity interface{} `json:"identity,omitempty"`
}
// PlanVariable is a top-level variable in the Terraform plan.
@@ -290,3 +298,35 @@ type DeferredResourceChange struct {
// Change contains any information we have about the deferred change.
ResourceChange *ResourceChange `json:"resource_change,omitempty"`
}
+
+type ActionInvocation struct {
+ // Address is the absolute action address
+ Address string `json:"address,omitempty"`
+ // Type is the type of the action
+ Type string `json:"type,omitempty"`
+ // Name is the name of the action
+ Name string `json:"name,omitempty"`
+
+ // ConfigValues is the JSON representation of the values in the config block of the action
+ ConfigValues interface{} `json:"config_values,omitempty"`
+ ConfigSensitive interface{} `json:"config_sensitive,omitempty"`
+ ConfigUnknown interface{} `json:"config_unknown,omitempty"`
+
+ // ProviderName allows the property "type" to be interpreted unambiguously
+ // in the unusual situation where a provider offers a type whose
+ // name does not start with its own name, such as the "googlebeta" provider
+ // offering "google_compute_instance".
+ ProviderName string `json:"provider_name,omitempty"`
+
+ LifecycleActionTrigger *LifecycleActionTrigger `json:"lifecycle_action_trigger,omitempty"`
+ InvokeActionTrigger *InvokeActionTrigger `json:"invoke_action_trigger,omitempty"`
+}
+
+type LifecycleActionTrigger struct {
+ TriggeringResourceAddress string `json:"triggering_resource_address,omitempty"`
+ ActionTriggerEvent string `json:"action_trigger_event,omitempty"`
+ ActionTriggerBlockIndex int `json:"action_trigger_block_index"`
+ ActionsListIndex int `json:"actions_list_index"`
+}
+
+type InvokeActionTrigger struct{}
diff --git a/vendor/github.com/hashicorp/terraform-json/schemas.go b/vendor/github.com/hashicorp/terraform-json/schemas.go
index a2918ef480..b65c13b896 100644
--- a/vendor/github.com/hashicorp/terraform-json/schemas.go
+++ b/vendor/github.com/hashicorp/terraform-json/schemas.go
@@ -87,8 +87,20 @@ type ProviderSchema struct {
// The schemas for any data sources in this provider.
DataSourceSchemas map[string]*Schema `json:"data_source_schemas,omitempty"`
+ // The schemas for any ephemeral resources in this provider.
+ EphemeralResourceSchemas map[string]*Schema `json:"ephemeral_resource_schemas,omitempty"`
+
+ // The schemas for any actions in this provider.
+ ActionSchemas map[string]*ActionSchema `json:"action_schemas,omitempty"`
+
// The definitions for any functions in this provider.
Functions map[string]*FunctionSignature `json:"functions,omitempty"`
+
+ // The schemas for resources identities in this provider.
+ ResourceIdentitySchemas map[string]*IdentitySchema `json:"resource_identity_schemas,omitempty"`
+
+ // The schemas for any list resources in this provider.
+ ListResourceSchemas map[string]*Schema `json:"list_resource_schemas,omitempty"`
}
// Schema is the JSON representation of a particular schema
@@ -227,6 +239,10 @@ type SchemaAttribute struct {
// in logs. Future versions of Terraform may encrypt or otherwise
// treat these values with greater care than non-sensitive fields.
Sensitive bool `json:"sensitive,omitempty"`
+
+ // If true, this attribute is write only and its value will not be
+ // persisted in artifacts such as plan files or state.
+ WriteOnly bool `json:"write_only,omitempty"`
}
// jsonSchemaAttribute describes an attribute within a schema block
@@ -246,6 +262,7 @@ type jsonSchemaAttribute struct {
Optional bool `json:"optional,omitempty"`
Computed bool `json:"computed,omitempty"`
Sensitive bool `json:"sensitive,omitempty"`
+ WriteOnly bool `json:"write_only,omitempty"`
}
func (as *SchemaAttribute) MarshalJSON() ([]byte, error) {
@@ -258,6 +275,7 @@ func (as *SchemaAttribute) MarshalJSON() ([]byte, error) {
Optional: as.Optional,
Computed: as.Computed,
Sensitive: as.Sensitive,
+ WriteOnly: as.WriteOnly,
}
if as.AttributeType != cty.NilType {
attrTy, _ := as.AttributeType.MarshalJSON()
@@ -285,3 +303,37 @@ type SchemaNestedAttributeType struct {
// of this attribute type (not applicable to single nesting mode).
MaxItems uint64 `json:"max_items,omitempty"`
}
+
+// IdentitySchema is the JSON representation of a particular
+// resource identity schema
+type IdentitySchema struct {
+ // The version of the particular resource identity schema.
+ Version uint64 `json:"version"`
+
+ // Map of identity attributes
+ Attributes map[string]*IdentityAttribute `json:"attributes,omitempty"`
+}
+
+// IdentityAttribute describes an identity attribute
+type IdentityAttribute struct {
+ // The identity attribute type
+ IdentityType cty.Type `json:"type,omitempty"`
+
+ // The description of the identity attribute
+ Description string `json:"description,omitempty"`
+
+ // RequiredForImport when enabled signifies that this attribute must be
+ // specified in the configuration during import
+ RequiredForImport bool `json:"required_for_import,omitempty"`
+
+ // OptionalForImport when enabled signifies that this attribute is not
+ // required to be specified during import, because it can be supplied by the
+ // provider
+ OptionalForImport bool `json:"optional_for_import,omitempty"`
+}
+
+// ActionSchema is the JSON representation of an action schema
+type ActionSchema struct {
+ // The root-level block of configuration values.
+ Block *SchemaBlock `json:"block,omitempty"`
+}
diff --git a/vendor/github.com/hashicorp/terraform-json/state.go b/vendor/github.com/hashicorp/terraform-json/state.go
index e5336329b8..ff17aefc64 100644
--- a/vendor/github.com/hashicorp/terraform-json/state.go
+++ b/vendor/github.com/hashicorp/terraform-json/state.go
@@ -173,6 +173,14 @@ type StateResource struct {
// DeposedKey is set if the resource instance has been marked Deposed and
// will be destroyed on the next apply.
DeposedKey string `json:"deposed_key,omitempty"`
+
+ // The version of the resource identity schema the "identity" property
+ // conforms to.
+ IdentitySchemaVersion *uint64 `json:"identity_schema_version,omitempty"`
+
+ // The JSON representation of the resource identity, whose structure
+ // depends on the resource identity schema.
+ IdentityValues map[string]interface{} `json:"identity,omitempty"`
}
// StateOutput represents an output value in a common state
diff --git a/vendor/github.com/hashicorp/terraform-plugin-go/internal/logging/context.go b/vendor/github.com/hashicorp/terraform-plugin-go/internal/logging/context.go
index d99e19796c..9ae6cc50d0 100644
--- a/vendor/github.com/hashicorp/terraform-plugin-go/internal/logging/context.go
+++ b/vendor/github.com/hashicorp/terraform-plugin-go/internal/logging/context.go
@@ -82,6 +82,33 @@ func ResourceContext(ctx context.Context, resource string) context.Context {
return ctx
}
+// EphemeralResourceContext injects the ephemeral resource type into logger contexts.
+func EphemeralResourceContext(ctx context.Context, ephemeralResource string) context.Context {
+ ctx = tfsdklog.SetField(ctx, KeyEphemeralResourceType, ephemeralResource)
+ ctx = tfsdklog.SubsystemSetField(ctx, SubsystemProto, KeyEphemeralResourceType, ephemeralResource)
+ ctx = tflog.SetField(ctx, KeyEphemeralResourceType, ephemeralResource)
+
+ return ctx
+}
+
+// ListResourceContext injects the list resource type into logger contexts.
+func ListResourceContext(ctx context.Context, listResource string) context.Context {
+ ctx = tfsdklog.SetField(ctx, KeyListResourceType, listResource)
+ ctx = tfsdklog.SubsystemSetField(ctx, SubsystemProto, KeyListResourceType, listResource)
+ ctx = tflog.SetField(ctx, KeyListResourceType, listResource)
+
+ return ctx
+}
+
+// ActionContext injects the action type into logger contexts.
+func ActionContext(ctx context.Context, action string) context.Context {
+ ctx = tfsdklog.SetField(ctx, KeyActionType, action)
+ ctx = tfsdklog.SubsystemSetField(ctx, SubsystemProto, KeyActionType, action)
+ ctx = tflog.SetField(ctx, KeyActionType, action)
+
+ return ctx
+}
+
// RpcContext injects the RPC name into logger contexts.
func RpcContext(ctx context.Context, rpc string) context.Context {
ctx = tfsdklog.SetField(ctx, KeyRPC, rpc)
diff --git a/vendor/github.com/hashicorp/terraform-plugin-go/internal/logging/keys.go b/vendor/github.com/hashicorp/terraform-plugin-go/internal/logging/keys.go
index fb82144294..7d3252de3f 100644
--- a/vendor/github.com/hashicorp/terraform-plugin-go/internal/logging/keys.go
+++ b/vendor/github.com/hashicorp/terraform-plugin-go/internal/logging/keys.go
@@ -57,6 +57,15 @@ const (
// The type of data source being operated on, such as "archive_file"
KeyDataSourceType = "tf_data_source_type"
+ // The type of ephemeral resource being operated on, such as "random_password"
+ KeyEphemeralResourceType = "tf_ephemeral_resource_type"
+
+ // The type of list resource being operated on
+ KeyListResourceType = "tf_list_resource_type"
+
+ // The action being operated on
+ KeyActionType = "tf_action_type"
+
// Path to protocol data file, such as "/tmp/example.json"
KeyProtocolDataFile = "tf_proto_data_file"
@@ -69,9 +78,15 @@ const (
// Whether the GetProviderSchemaOptional server capability is enabled
KeyServerCapabilityGetProviderSchemaOptional = "tf_server_capability_get_provider_schema_optional"
+ // Whether the MoveResourceState server capability is enabled
+ KeyServerCapabilityMoveResourceState = "tf_server_capability_move_resource_state"
+
// Whether the PlanDestroy server capability is enabled
KeyServerCapabilityPlanDestroy = "tf_server_capability_plan_destroy"
// Whether the DeferralAllowed client capability is enabled
KeyClientCapabilityDeferralAllowed = "tf_client_capability_deferral_allowed"
+
+ // Whether the WriteOnlyAttributesAllowed client capability is enabled
+ KeyClientCapabilityWriteOnlyAttributesAllowed = "tf_client_capability_write_only_attributes_allowed"
)
diff --git a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/action.go b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/action.go
new file mode 100644
index 0000000000..9a01083eb8
--- /dev/null
+++ b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/action.go
@@ -0,0 +1,159 @@
+// Copyright (c) HashiCorp, Inc.
+// SPDX-License-Identifier: MPL-2.0
+
+package tfprotov5
+
+import (
+ "context"
+ "iter"
+)
+
+// ActionMetadata describes metadata for an action in the GetMetadata RPC.
+type ActionMetadata struct {
+ // TypeName is the name of the action.
+ TypeName string
+}
+
+// ActionServer is an interface containing the methods an action implementation needs to fill.
+type ActionServer interface {
+ // ValidateActionConfig is called when Terraform is checking that an
+ // action configuration is valid. It is guaranteed to have types
+ // conforming to your schema, but it is not guaranteed that all values
+ // will be known. This is your opportunity to do custom or advanced
+ // validation prior to an action being planned/invoked.
+ ValidateActionConfig(context.Context, *ValidateActionConfigRequest) (*ValidateActionConfigResponse, error)
+
+ // PlanAction is called when Terraform is attempting to
+ // calculate a plan for an action.
+ PlanAction(context.Context, *PlanActionRequest) (*PlanActionResponse, error)
+
+ // InvokeAction is called when Terraform wants to execute the logic of an action.
+ // The provider runs the logic of the action, reporting progress
+ // events as desired, then sends a final complete event.
+ //
+ // If an error occurs, the provider sends a complete event with the relevant diagnostics.
+ InvokeAction(context.Context, *InvokeActionRequest) (*InvokeActionServerStream, error)
+}
+
+// ValidateActionConfigRequest is the request Terraform sends when it
+// wants to validate an action's configuration.
+type ValidateActionConfigRequest struct {
+ // ActionType is the type of action Terraform is validating.
+ ActionType string
+
+ // Config is the configuration the user supplied for that action. See
+ // the documentation on `DynamicValue` for more information about
+ // safely accessing the configuration.
+ //
+ // The configuration is represented as a tftypes.Object, with each
+ // attribute and nested block getting its own key and value.
+ //
+ // This configuration may contain unknown values if a user uses
+ // interpolation or other functionality that would prevent Terraform
+ // from knowing the value at request time. Any attributes not directly
+ // set in the configuration will be null.
+ Config *DynamicValue
+}
+
+// ValidateActionConfigResponse is the response from the provider about
+// the validity of an action's configuration.
+type ValidateActionConfigResponse struct {
+ // Diagnostics report errors or warnings related to the given
+ // configuration. Returning an empty slice indicates a successful
+ // validation with no warnings or errors generated.
+ Diagnostics []*Diagnostic
+}
+
+// PlanActionRequest is the request Terraform sends when it is attempting to
+// calculate a plan for an action.
+type PlanActionRequest struct {
+ // ActionType is the name of the action being called.
+ ActionType string
+
+ // Config is the configuration the user supplied for the action. See
+ // the documentation on `DynamicValue` for more information about
+ // safely accessing the configuration.
+ Config *DynamicValue
+
+ // ClientCapabilities defines optionally supported protocol features for the
+ // PlanAction RPC, such as forward-compatible Terraform behavior changes.
+ ClientCapabilities *PlanActionClientCapabilities
+}
+
+// PlanActionResponse is the response from the provider when planning an action.
+type PlanActionResponse struct {
+ // Diagnostics report errors or warnings related to planning the action. Returning an empty slice
+ // indicates a successful validation with no warnings or errors generated.
+ Diagnostics []*Diagnostic
+
+ // Deferred is used to indicate to Terraform that the PlanAction operation
+ // needs to be deferred for a reason.
+ Deferred *Deferred
+}
+
+// InvokeActionRequest is the request Terraform sends when it wants to execute
+// the logic of an action.
+type InvokeActionRequest struct {
+ // ActionType is the name of the action being called.
+ ActionType string
+
+ // Config is the configuration the user supplied for the action. See
+ // the documentation on `DynamicValue` for more information about
+ // safely accessing the configuration.
+ Config *DynamicValue
+
+ // ClientCapabilities defines optionally supported protocol features for the
+ // InvokeAction RPC, such as forward-compatible Terraform behavior changes.
+ ClientCapabilities *InvokeActionClientCapabilities
+}
+
+// InvokeActionServerStream represents a streaming response to an
+// InvokeActionRequest. An instance of this struct is supplied as an argument
+// to the provider's InvokeAction implementation. The provider should set an
+// Events iterator function that pushes zero or more events of type InvokeActionEvent.
+type InvokeActionServerStream struct {
+ // Events is the iterator that the provider can stream progress messages back to Terraform
+ // as the action is executing. Once the provider has completed the action invocation, the provider must
+ // respond with a completed event. If the action failed, the completed event must contain
+ // diagnostics explaining why the action failed.
+ Events iter.Seq[InvokeActionEvent]
+}
+
+// InvokeActionEvent is an event sent back to Terraform during the InvokeAction RPC.
+type InvokeActionEvent struct {
+ // Type is the type of event that is being sent back during InvokeAction, either a Progress event
+ // or a Completed event.
+ Type InvokeActionEventType
+}
+
+// InvokeActionEventType is an intentionally unimplementable interface that
+// functions as an enum, allowing us to use different strongly-typed event types
+// that contain additional, but different data, as a generic "event" type.
+type InvokeActionEventType interface {
+ isInvokeActionEventType() // this interface is only implementable in this package
+}
+
+var (
+ _ InvokeActionEventType = ProgressInvokeActionEventType{}
+ _ InvokeActionEventType = CompletedInvokeActionEventType{}
+)
+
+// ProgressInvokeActionEventType represents a progress update that should be displayed in the Terraform
+// CLI or external system running Terraform.
+type ProgressInvokeActionEventType struct {
+ // Message is the human-readable message to display about the progress of the action invocation.
+ Message string
+}
+
+func (a ProgressInvokeActionEventType) isInvokeActionEventType() {}
+
+// CompletedInvokeActionEventType represents the final completed event, along with
+// potential diagnostics about an action invocation failure.
+type CompletedInvokeActionEventType struct {
+ // Diagnostics report errors or warnings related to invoking an action.
+ // Returning an empty slice indicates a successful invocation with no warnings
+ // or errors generated.
+ Diagnostics []*Diagnostic
+}
+
+func (a CompletedInvokeActionEventType) isInvokeActionEventType() {}
diff --git a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/action_schema.go b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/action_schema.go
new file mode 100644
index 0000000000..681302217d
--- /dev/null
+++ b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/action_schema.go
@@ -0,0 +1,10 @@
+// Copyright (c) HashiCorp, Inc.
+// SPDX-License-Identifier: MPL-2.0
+
+package tfprotov5
+
+// ActionSchema is how Terraform defines the shape of action data.
+type ActionSchema struct {
+ // Schema is the definition for the action data itself, which will be specified in an action block in the user's configuration.
+ Schema *Schema
+}
diff --git a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/client_capabilities.go b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/client_capabilities.go
index ba01cd8b8f..c219a92340 100644
--- a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/client_capabilities.go
+++ b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/client_capabilities.go
@@ -3,6 +3,15 @@
package tfprotov5
+// ValidateResourceTypeConfigClientCapabilities allows Terraform to publish information
+// regarding optionally supported protocol features for the ValidateResourceTypeConfig RPC,
+// such as forward-compatible Terraform behavior changes.
+type ValidateResourceTypeConfigClientCapabilities struct {
+ // WriteOnlyAttributesAllowed signals that the client is able to
+ // handle write_only attributes for managed resources.
+ WriteOnlyAttributesAllowed bool
+}
+
// ConfigureProviderClientCapabilities allows Terraform to publish information
// regarding optionally supported protocol features for the ConfigureProvider RPC,
// such as forward-compatible Terraform behavior changes.
@@ -47,3 +56,30 @@ type ImportResourceStateClientCapabilities struct {
// handle deferred responses from the provider.
DeferralAllowed bool
}
+
+// OpenEphemeralResourceClientCapabilities allows Terraform to publish information
+// regarding optionally supported protocol features for the OpenEphemeralResource RPC,
+// such as forward-compatible Terraform behavior changes.
+type OpenEphemeralResourceClientCapabilities struct {
+ // DeferralAllowed signals that the request from Terraform is able to
+ // handle deferred responses from the provider.
+ DeferralAllowed bool
+}
+
+// PlanActionClientCapabilities allows Terraform to publish information
+// regarding optionally supported protocol features for the PlanAction RPC,
+// such as forward-compatible Terraform behavior changes.
+type PlanActionClientCapabilities struct {
+ // DeferralAllowed signals that the request from Terraform is able to
+ // handle deferred responses from the provider.
+ DeferralAllowed bool
+}
+
+// InvokeActionClientCapabilities allows Terraform to publish information
+// regarding optionally supported protocol features for the InvokeAction RPC,
+// such as forward-compatible Terraform behavior changes.
+//
+// Maintainer Note: This is in the protocol in Terraform Core,
+// but currently they are not sending any capabilities for this RPC.
+type InvokeActionClientCapabilities struct {
+}
diff --git a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/ephemeral_resource.go b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/ephemeral_resource.go
new file mode 100644
index 0000000000..1794f91b43
--- /dev/null
+++ b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/ephemeral_resource.go
@@ -0,0 +1,185 @@
+// Copyright (c) HashiCorp, Inc.
+// SPDX-License-Identifier: MPL-2.0
+
+package tfprotov5
+
+import (
+ "context"
+ "time"
+)
+
+// EphemeralResourceMetadata describes metadata for an ephemeral resource in the GetMetadata
+// RPC.
+type EphemeralResourceMetadata struct {
+ // TypeName is the name of the ephemeral resource.
+ TypeName string
+}
+
+// EphemeralResourceServer is an interface containing the methods an ephemeral resource
+// implementation needs to fill.
+type EphemeralResourceServer interface {
+ // ValidateEphemeralResourceConfig is called when Terraform is checking that an
+ // ephemeral resource configuration is valid. It is guaranteed to have types
+ // conforming to your schema, but it is not guaranteed that all values
+ // will be known. This is your opportunity to do custom or advanced
+ // validation prior to an ephemeral resource being opened.
+ ValidateEphemeralResourceConfig(context.Context, *ValidateEphemeralResourceConfigRequest) (*ValidateEphemeralResourceConfigResponse, error)
+
+ // OpenEphemeralResource is called when Terraform wants to open the ephemeral resource,
+ // usually during planning. If the config for the ephemeral resource contains unknown
+ // values, Terraform will defer the OpenEphemeralResource call until apply.
+ OpenEphemeralResource(context.Context, *OpenEphemeralResourceRequest) (*OpenEphemeralResourceResponse, error)
+
+ // RenewEphemeralResource is called when Terraform detects that the previously specified
+ // RenewAt timestamp has passed. The RenewAt timestamp is supplied either from the
+ // OpenEphemeralResource call or a previous RenewEphemeralResource call.
+ RenewEphemeralResource(context.Context, *RenewEphemeralResourceRequest) (*RenewEphemeralResourceResponse, error)
+
+ // CloseEphemeralResource is called when Terraform is closing the ephemeral resource.
+ CloseEphemeralResource(context.Context, *CloseEphemeralResourceRequest) (*CloseEphemeralResourceResponse, error)
+}
+
+// ValidateEphemeralResourceConfigRequest is the request Terraform sends when it
+// wants to validate an ephemeral resource's configuration.
+type ValidateEphemeralResourceConfigRequest struct {
+ // TypeName is the type of resource Terraform is validating.
+ TypeName string
+
+ // Config is the configuration the user supplied for that ephemeral resource. See
+ // the documentation on `DynamicValue` for more information about
+ // safely accessing the configuration.
+ //
+ // The configuration is represented as a tftypes.Object, with each
+ // attribute and nested block getting its own key and value.
+ //
+ // This configuration may contain unknown values if a user uses
+ // interpolation or other functionality that would prevent Terraform
+ // from knowing the value at request time. Any attributes not directly
+ // set in the configuration will be null.
+ Config *DynamicValue
+}
+
+// ValidateEphemeralResourceConfigResponse is the response from the provider about
+// the validity of an ephemeral resource's configuration.
+type ValidateEphemeralResourceConfigResponse struct {
+ // Diagnostics report errors or warnings related to the given
+ // configuration. Returning an empty slice indicates a successful
+ // validation with no warnings or errors generated.
+ Diagnostics []*Diagnostic
+}
+
+// OpenEphemeralResourceRequest is the request Terraform sends when it
+// wants to open an ephemeral resource.
+type OpenEphemeralResourceRequest struct {
+ // TypeName is the type of resource Terraform is opening.
+ TypeName string
+
+ // Config is the configuration the user supplied for that ephemeral resource. See
+ // the documentation on `DynamicValue` for more information about
+ // safely accessing the configuration.
+ //
+ // The configuration is represented as a tftypes.Object, with each
+ // attribute and nested block getting its own key and value.
+ //
+ // This configuration will always be fully known. If Config contains unknown values,
+ // Terraform will defer the OpenEphemeralResource RPC until apply.
+ Config *DynamicValue
+
+ // ClientCapabilities defines optionally supported protocol features for the
+ // OpenEphemeralResource RPC, such as forward-compatible Terraform behavior changes.
+ ClientCapabilities *OpenEphemeralResourceClientCapabilities
+}
+
+// OpenEphemeralResourceResponse is the response from the provider about the current
+// state of the opened ephemeral resource.
+type OpenEphemeralResourceResponse struct {
+ // Result is the provider's understanding of what the ephemeral resource's
+ // data is after it has been opened, represented as a `DynamicValue`.
+ // See the documentation for `DynamicValue` for information about
+ // safely creating the `DynamicValue`.
+ //
+ // Any attribute, whether computed or not, that has a known value in
+ // the Config in the OpenEphemeralResourceRequest must be preserved
+ // exactly as it was in Result.
+ //
+ // Any attribute in the Config in the OpenEphemeralResourceRequest
+ // that is unknown must take on a known value at this time. No unknown
+ // values are allowed in the Result.
+ //
+ // The result should be represented as a tftypes.Object, with each
+ // attribute and nested block getting its own key and value.
+ Result *DynamicValue
+
+ // Diagnostics report errors or warnings related to opening the
+ // requested ephemeral resource. Returning an empty slice
+ // indicates a successful creation with no warnings or errors
+ // generated.
+ Diagnostics []*Diagnostic
+
+ // Private should be set to any private data that the provider would like to be
+ // sent to the next Renew or Close call.
+ Private []byte
+
+ // RenewAt indicates to Terraform that the ephemeral resource
+ // needs to be renewed at the specified time. Terraform will
+ // call the RenewEphemeralResource RPC when the specified time has passed.
+ RenewAt time.Time
+
+ // Deferred is used to indicate to Terraform that the OpenEphemeralResource operation
+ // needs to be deferred for a reason.
+ Deferred *Deferred
+}
+
+// RenewEphemeralResourceRequest is the request Terraform sends when it
+// wants to renew an ephemeral resource.
+type RenewEphemeralResourceRequest struct {
+ // TypeName is the type of resource Terraform is renewing.
+ TypeName string
+
+ // Private is any provider-defined private data stored with the
+ // ephemeral resource from the most recent Open or Renew call.
+ //
+ // To ensure private data is preserved, copy any necessary data to
+ // the RenewEphemeralResourceResponse type Private field.
+ Private []byte
+}
+
+// RenewEphemeralResourceResponse is the response from the provider after an ephemeral resource
+// has been renewed.
+type RenewEphemeralResourceResponse struct {
+ // Diagnostics report errors or warnings related to renewing the
+ // requested ephemeral resource. Returning an empty slice
+ // indicates a successful creation with no warnings or errors
+ // generated.
+ Diagnostics []*Diagnostic
+
+ // Private should be set to any private data that the provider would like to be
+ // sent to the next Renew or Close call.
+ Private []byte
+
+ // RenewAt indicates to Terraform that the ephemeral resource
+ // needs to be renewed at the specified time. Terraform will
+ // call the RenewEphemeralResource RPC when the specified time has passed.
+ RenewAt time.Time
+}
+
+// CloseEphemeralResourceRequest is the request Terraform sends when it
+// wants to close an ephemeral resource.
+type CloseEphemeralResourceRequest struct {
+ // TypeName is the type of resource Terraform is closing.
+ TypeName string
+
+ // Private is any provider-defined private data stored with the
+ // ephemeral resource from the most recent Open or Renew call.
+ Private []byte
+}
+
+// CloseEphemeralResourceResponse is the response from the provider about
+// the closed ephemeral resource.
+type CloseEphemeralResourceResponse struct {
+ // Diagnostics report errors or warnings related to closing the
+ // requested ephemeral resource. Returning an empty slice
+ // indicates a successful creation with no warnings or errors
+ // generated.
+ Diagnostics []*Diagnostic
+}
diff --git a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/fromproto/action.go b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/fromproto/action.go
new file mode 100644
index 0000000000..1365358066
--- /dev/null
+++ b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/fromproto/action.go
@@ -0,0 +1,48 @@
+// Copyright (c) HashiCorp, Inc.
+// SPDX-License-Identifier: MPL-2.0
+
+package fromproto
+
+import (
+ "github.com/hashicorp/terraform-plugin-go/tfprotov5"
+ "github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5"
+)
+
+func ValidateActionConfigRequest(in *tfplugin5.ValidateActionConfig_Request) *tfprotov5.ValidateActionConfigRequest {
+ if in == nil {
+ return nil
+ }
+
+ return &tfprotov5.ValidateActionConfigRequest{
+ ActionType: in.ActionType,
+ Config: DynamicValue(in.Config),
+ }
+}
+
+func PlanActionRequest(in *tfplugin5.PlanAction_Request) *tfprotov5.PlanActionRequest {
+ if in == nil {
+ return nil
+ }
+
+ resp := &tfprotov5.PlanActionRequest{
+ ActionType: in.ActionType,
+ Config: DynamicValue(in.Config),
+ ClientCapabilities: PlanActionClientCapabilities(in.ClientCapabilities),
+ }
+
+ return resp
+}
+
+func InvokeActionRequest(in *tfplugin5.InvokeAction_Request) *tfprotov5.InvokeActionRequest {
+ if in == nil {
+ return nil
+ }
+
+ resp := &tfprotov5.InvokeActionRequest{
+ ActionType: in.ActionType,
+ Config: DynamicValue(in.Config),
+ ClientCapabilities: InvokeActionClientCapabilities(in.ClientCapabilities),
+ }
+
+ return resp
+}
diff --git a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/fromproto/client_capabilities.go b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/fromproto/client_capabilities.go
index 94ddc3d435..4a2294eecd 100644
--- a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/fromproto/client_capabilities.go
+++ b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/fromproto/client_capabilities.go
@@ -8,6 +8,18 @@ import (
"github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5"
)
+func ValidateResourceTypeConfigClientCapabilities(in *tfplugin5.ClientCapabilities) *tfprotov5.ValidateResourceTypeConfigClientCapabilities {
+ if in == nil {
+ return nil
+ }
+
+ resp := &tfprotov5.ValidateResourceTypeConfigClientCapabilities{
+ WriteOnlyAttributesAllowed: in.WriteOnlyAttributesAllowed,
+ }
+
+ return resp
+}
+
func ConfigureProviderClientCapabilities(in *tfplugin5.ClientCapabilities) *tfprotov5.ConfigureProviderClientCapabilities {
if in == nil {
return nil
@@ -67,3 +79,37 @@ func ImportResourceStateClientCapabilities(in *tfplugin5.ClientCapabilities) *tf
return resp
}
+
+func OpenEphemeralResourceClientCapabilities(in *tfplugin5.ClientCapabilities) *tfprotov5.OpenEphemeralResourceClientCapabilities {
+ if in == nil {
+ return nil
+ }
+
+ resp := &tfprotov5.OpenEphemeralResourceClientCapabilities{
+ DeferralAllowed: in.DeferralAllowed,
+ }
+
+ return resp
+}
+
+func PlanActionClientCapabilities(in *tfplugin5.ClientCapabilities) *tfprotov5.PlanActionClientCapabilities {
+ if in == nil {
+ return nil
+ }
+
+ resp := &tfprotov5.PlanActionClientCapabilities{
+ DeferralAllowed: in.DeferralAllowed,
+ }
+
+ return resp
+}
+
+func InvokeActionClientCapabilities(in *tfplugin5.ClientCapabilities) *tfprotov5.InvokeActionClientCapabilities {
+ if in == nil {
+ return nil
+ }
+
+ resp := &tfprotov5.InvokeActionClientCapabilities{}
+
+ return resp
+}
diff --git a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/fromproto/ephemeral_resource.go b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/fromproto/ephemeral_resource.go
new file mode 100644
index 0000000000..bb8c123005
--- /dev/null
+++ b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/fromproto/ephemeral_resource.go
@@ -0,0 +1,54 @@
+// Copyright (c) HashiCorp, Inc.
+// SPDX-License-Identifier: MPL-2.0
+
+package fromproto
+
+import (
+ "github.com/hashicorp/terraform-plugin-go/tfprotov5"
+ "github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5"
+)
+
+func ValidateEphemeralResourceConfigRequest(in *tfplugin5.ValidateEphemeralResourceConfig_Request) *tfprotov5.ValidateEphemeralResourceConfigRequest {
+ if in == nil {
+ return nil
+ }
+
+ return &tfprotov5.ValidateEphemeralResourceConfigRequest{
+ TypeName: in.TypeName,
+ Config: DynamicValue(in.Config),
+ }
+}
+
+func OpenEphemeralResourceRequest(in *tfplugin5.OpenEphemeralResource_Request) *tfprotov5.OpenEphemeralResourceRequest {
+ if in == nil {
+ return nil
+ }
+
+ return &tfprotov5.OpenEphemeralResourceRequest{
+ TypeName: in.TypeName,
+ Config: DynamicValue(in.Config),
+ ClientCapabilities: OpenEphemeralResourceClientCapabilities(in.ClientCapabilities),
+ }
+}
+
+func RenewEphemeralResourceRequest(in *tfplugin5.RenewEphemeralResource_Request) *tfprotov5.RenewEphemeralResourceRequest {
+ if in == nil {
+ return nil
+ }
+
+ return &tfprotov5.RenewEphemeralResourceRequest{
+ TypeName: in.TypeName,
+ Private: in.Private,
+ }
+}
+
+func CloseEphemeralResourceRequest(in *tfplugin5.CloseEphemeralResource_Request) *tfprotov5.CloseEphemeralResourceRequest {
+ if in == nil {
+ return nil
+ }
+
+ return &tfprotov5.CloseEphemeralResourceRequest{
+ TypeName: in.TypeName,
+ Private: in.Private,
+ }
+}
diff --git a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/fromproto/list_resource.go b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/fromproto/list_resource.go
new file mode 100644
index 0000000000..a9b5759a5d
--- /dev/null
+++ b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/fromproto/list_resource.go
@@ -0,0 +1,35 @@
+// Copyright (c) HashiCorp, Inc.
+// SPDX-License-Identifier: MPL-2.0
+
+package fromproto
+
+import (
+ "github.com/hashicorp/terraform-plugin-go/tfprotov5"
+ "github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5"
+)
+
+func ListResourceRequest(in *tfplugin5.ListResource_Request) *tfprotov5.ListResourceRequest {
+ if in == nil {
+ return nil
+ }
+
+ return &tfprotov5.ListResourceRequest{
+ TypeName: in.TypeName,
+ Config: DynamicValue(in.Config),
+ IncludeResource: in.IncludeResourceObject,
+ Limit: in.Limit,
+ }
+}
+
+func ValidateListResourceConfigRequest(in *tfplugin5.ValidateListResourceConfig_Request) *tfprotov5.ValidateListResourceConfigRequest {
+ if in == nil {
+ return nil
+ }
+
+ return &tfprotov5.ValidateListResourceConfigRequest{
+ TypeName: in.TypeName,
+ Config: DynamicValue(in.Config),
+ IncludeResourceObject: DynamicValue(in.IncludeResourceObject),
+ Limit: DynamicValue(in.Limit),
+ }
+}
diff --git a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/fromproto/provider.go b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/fromproto/provider.go
index ac487800e5..41ed76eaf9 100644
--- a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/fromproto/provider.go
+++ b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/fromproto/provider.go
@@ -28,6 +28,16 @@ func GetProviderSchemaRequest(in *tfplugin5.GetProviderSchema_Request) *tfprotov
return resp
}
+func GetResourceIdentitySchemasRequest(in *tfplugin5.GetResourceIdentitySchemas_Request) *tfprotov5.GetResourceIdentitySchemasRequest {
+ if in == nil {
+ return nil
+ }
+
+ resp := &tfprotov5.GetResourceIdentitySchemasRequest{}
+
+ return resp
+}
+
func PrepareProviderConfigRequest(in *tfplugin5.PrepareProviderConfig_Request) *tfprotov5.PrepareProviderConfigRequest {
if in == nil {
return nil
diff --git a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/fromproto/resource.go b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/fromproto/resource.go
index f531b48707..86dbca4eb6 100644
--- a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/fromproto/resource.go
+++ b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/fromproto/resource.go
@@ -14,8 +14,9 @@ func ValidateResourceTypeConfigRequest(in *tfplugin5.ValidateResourceTypeConfig_
}
resp := &tfprotov5.ValidateResourceTypeConfigRequest{
- Config: DynamicValue(in.Config),
- TypeName: in.TypeName,
+ ClientCapabilities: ValidateResourceTypeConfigClientCapabilities(in.ClientCapabilities),
+ Config: DynamicValue(in.Config),
+ TypeName: in.TypeName,
}
return resp
@@ -35,6 +36,20 @@ func UpgradeResourceStateRequest(in *tfplugin5.UpgradeResourceState_Request) *tf
return resp
}
+func UpgradeResourceIdentityRequest(in *tfplugin5.UpgradeResourceIdentity_Request) *tfprotov5.UpgradeResourceIdentityRequest {
+ if in == nil {
+ return nil
+ }
+
+ resp := &tfprotov5.UpgradeResourceIdentityRequest{
+ RawIdentity: RawState(in.RawIdentity),
+ TypeName: in.TypeName,
+ Version: in.Version,
+ }
+
+ return resp
+}
+
func ReadResourceRequest(in *tfplugin5.ReadResource_Request) *tfprotov5.ReadResourceRequest {
if in == nil {
return nil
@@ -46,6 +61,7 @@ func ReadResourceRequest(in *tfplugin5.ReadResource_Request) *tfprotov5.ReadReso
ProviderMeta: DynamicValue(in.ProviderMeta),
TypeName: in.TypeName,
ClientCapabilities: ReadResourceClientCapabilities(in.ClientCapabilities),
+ CurrentIdentity: ResourceIdentityData(in.CurrentIdentity),
}
return resp
@@ -64,6 +80,7 @@ func PlanResourceChangeRequest(in *tfplugin5.PlanResourceChange_Request) *tfprot
ProviderMeta: DynamicValue(in.ProviderMeta),
TypeName: in.TypeName,
ClientCapabilities: PlanResourceChangeClientCapabilities(in.ClientCapabilities),
+ PriorIdentity: ResourceIdentityData(in.PriorIdentity),
}
return resp
@@ -75,12 +92,13 @@ func ApplyResourceChangeRequest(in *tfplugin5.ApplyResourceChange_Request) *tfpr
}
resp := &tfprotov5.ApplyResourceChangeRequest{
- Config: DynamicValue(in.Config),
- PlannedPrivate: in.PlannedPrivate,
- PlannedState: DynamicValue(in.PlannedState),
- PriorState: DynamicValue(in.PriorState),
- ProviderMeta: DynamicValue(in.ProviderMeta),
- TypeName: in.TypeName,
+ Config: DynamicValue(in.Config),
+ PlannedPrivate: in.PlannedPrivate,
+ PlannedState: DynamicValue(in.PlannedState),
+ PriorState: DynamicValue(in.PriorState),
+ ProviderMeta: DynamicValue(in.ProviderMeta),
+ TypeName: in.TypeName,
+ PlannedIdentity: ResourceIdentityData(in.PlannedIdentity),
}
return resp
@@ -95,6 +113,7 @@ func ImportResourceStateRequest(in *tfplugin5.ImportResourceState_Request) *tfpr
TypeName: in.TypeName,
ID: in.Id,
ClientCapabilities: ImportResourceStateClientCapabilities(in.ClientCapabilities),
+ Identity: ResourceIdentityData(in.Identity),
}
return resp
@@ -112,6 +131,7 @@ func MoveResourceStateRequest(in *tfplugin5.MoveResourceState_Request) *tfprotov
SourceState: RawState(in.SourceState),
SourceTypeName: in.SourceTypeName,
TargetTypeName: in.TargetTypeName,
+ SourceIdentity: RawState(in.SourceIdentity),
}
return resp
diff --git a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/fromproto/resource_identity_data.go b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/fromproto/resource_identity_data.go
new file mode 100644
index 0000000000..ec6b1a5e7a
--- /dev/null
+++ b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/fromproto/resource_identity_data.go
@@ -0,0 +1,21 @@
+// Copyright (c) HashiCorp, Inc.
+// SPDX-License-Identifier: MPL-2.0
+
+package fromproto
+
+import (
+ "github.com/hashicorp/terraform-plugin-go/tfprotov5"
+ "github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5"
+)
+
+func ResourceIdentityData(in *tfplugin5.ResourceIdentityData) *tfprotov5.ResourceIdentityData {
+ if in == nil {
+ return nil
+ }
+
+ resp := &tfprotov5.ResourceIdentityData{
+ IdentityData: DynamicValue(in.IdentityData),
+ }
+
+ return resp
+}
diff --git a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tf5serverlogging/client_capabilities.go b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tf5serverlogging/client_capabilities.go
index d64557b83a..aad80d63a5 100644
--- a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tf5serverlogging/client_capabilities.go
+++ b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tf5serverlogging/client_capabilities.go
@@ -10,6 +10,20 @@ import (
"github.com/hashicorp/terraform-plugin-go/tfprotov5"
)
+// ValidateResourceTypeConfigClientCapabilities generates a TRACE "Announced client capabilities" log.
+func ValidateResourceTypeConfigClientCapabilities(ctx context.Context, capabilities *tfprotov5.ValidateResourceTypeConfigClientCapabilities) {
+ if capabilities == nil {
+ logging.ProtocolTrace(ctx, "No announced client capabilities", map[string]interface{}{})
+ return
+ }
+
+ responseFields := map[string]interface{}{
+ logging.KeyClientCapabilityWriteOnlyAttributesAllowed: capabilities.WriteOnlyAttributesAllowed,
+ }
+
+ logging.ProtocolTrace(ctx, "Announced client capabilities", responseFields)
+}
+
// ConfigureProviderClientCapabilities generates a TRACE "Announced client capabilities" log.
func ConfigureProviderClientCapabilities(ctx context.Context, capabilities *tfprotov5.ConfigureProviderClientCapabilities) {
if capabilities == nil {
@@ -79,3 +93,31 @@ func ImportResourceStateClientCapabilities(ctx context.Context, capabilities *tf
logging.ProtocolTrace(ctx, "Announced client capabilities", responseFields)
}
+
+// OpenEphemeralResourceClientCapabilities generates a TRACE "Announced client capabilities" log.
+func OpenEphemeralResourceClientCapabilities(ctx context.Context, capabilities *tfprotov5.OpenEphemeralResourceClientCapabilities) {
+ if capabilities == nil {
+ logging.ProtocolTrace(ctx, "No announced client capabilities", map[string]interface{}{})
+ return
+ }
+
+ responseFields := map[string]interface{}{
+ logging.KeyClientCapabilityDeferralAllowed: capabilities.DeferralAllowed,
+ }
+
+ logging.ProtocolTrace(ctx, "Announced client capabilities", responseFields)
+}
+
+// PlanActionClientCapabilities generates a TRACE "Announced client capabilities" log.
+func PlanActionClientCapabilities(ctx context.Context, capabilities *tfprotov5.PlanActionClientCapabilities) {
+ if capabilities == nil {
+ logging.ProtocolTrace(ctx, "No announced client capabilities", map[string]interface{}{})
+ return
+ }
+
+ responseFields := map[string]interface{}{
+ logging.KeyClientCapabilityDeferralAllowed: capabilities.DeferralAllowed,
+ }
+
+ logging.ProtocolTrace(ctx, "Announced client capabilities", responseFields)
+}
diff --git a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tf5serverlogging/downstream_request.go b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tf5serverlogging/downstream_request.go
index 8c442feffd..c80654d184 100644
--- a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tf5serverlogging/downstream_request.go
+++ b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tf5serverlogging/downstream_request.go
@@ -24,6 +24,25 @@ func DownstreamRequest(ctx context.Context) context.Context {
return ctx
}
+// DownstreamServerEvent generates the following logging:
+//
+// - TRACE "Received downstream server event" log with time elapsed since
+// request start and diagnostic severity counts
+// - Per-diagnostic logs
+func DownstreamServerEvent(ctx context.Context, diagnostics diag.Diagnostics) {
+ eventFields := map[string]interface{}{
+ logging.KeyDiagnosticErrorCount: diagnostics.ErrorCount(),
+ logging.KeyDiagnosticWarningCount: diagnostics.WarningCount(),
+ }
+
+ if requestStart, ok := ctx.Value(ContextKeyDownstreamRequestStartTime{}).(time.Time); ok {
+ eventFields[logging.KeyRequestDurationMs] = time.Since(requestStart).Milliseconds()
+ }
+
+ logging.ProtocolTrace(ctx, "Received downstream server event", eventFields)
+ diagnostics.Log(ctx)
+}
+
// DownstreamResponse generates the following logging:
//
// - TRACE "Received downstream response" log with request duration and
diff --git a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tf5serverlogging/server_capabilities.go b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tf5serverlogging/server_capabilities.go
index d0f86c8427..aff78da75a 100644
--- a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tf5serverlogging/server_capabilities.go
+++ b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tf5serverlogging/server_capabilities.go
@@ -14,11 +14,13 @@ import (
func ServerCapabilities(ctx context.Context, capabilities *tfprotov5.ServerCapabilities) {
responseFields := map[string]interface{}{
logging.KeyServerCapabilityGetProviderSchemaOptional: false,
+ logging.KeyServerCapabilityMoveResourceState: false,
logging.KeyServerCapabilityPlanDestroy: false,
}
if capabilities != nil {
responseFields[logging.KeyServerCapabilityGetProviderSchemaOptional] = capabilities.GetProviderSchemaOptional
+ responseFields[logging.KeyServerCapabilityMoveResourceState] = capabilities.MoveResourceState
responseFields[logging.KeyServerCapabilityPlanDestroy] = capabilities.PlanDestroy
}
diff --git a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5/tfplugin5.pb.go b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5/tfplugin5.pb.go
index 46ce948a15..efd842c28a 100644
--- a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5/tfplugin5.pb.go
+++ b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5/tfplugin5.pb.go
@@ -1,9 +1,9 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
-// Terraform Plugin RPC protocol version 5.6
+// Terraform Plugin RPC protocol version 5.10
//
-// This file defines version 5.6 of the RPC protocol. To implement a plugin
+// This file defines version 5.10 of the RPC protocol. To implement a plugin
// against this protocol, copy this definition into your own codebase and
// use protoc to generate stubs for your target language.
//
@@ -22,8 +22,8 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.34.0
-// protoc v5.26.1
+// protoc-gen-go v1.36.9
+// protoc v5.29.3
// source: tfplugin5.proto
package tfplugin5
@@ -31,8 +31,10 @@ package tfplugin5
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ timestamppb "google.golang.org/protobuf/types/known/timestamppb"
reflect "reflect"
sync "sync"
+ unsafe "unsafe"
)
const (
@@ -251,27 +253,24 @@ func (x Deferred_Reason) Number() protoreflect.EnumNumber {
// Deprecated: Use Deferred_Reason.Descriptor instead.
func (Deferred_Reason) EnumDescriptor() ([]byte, []int) {
- return file_tfplugin5_proto_rawDescGZIP(), []int{10, 0}
+ return file_tfplugin5_proto_rawDescGZIP(), []int{13, 0}
}
// DynamicValue is an opaque encoding of terraform data, with the field name
// indicating the encoding scheme used.
type DynamicValue struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Msgpack []byte `protobuf:"bytes,1,opt,name=msgpack,proto3" json:"msgpack,omitempty"`
+ Json []byte `protobuf:"bytes,2,opt,name=json,proto3" json:"json,omitempty"`
unknownFields protoimpl.UnknownFields
-
- Msgpack []byte `protobuf:"bytes,1,opt,name=msgpack,proto3" json:"msgpack,omitempty"`
- Json []byte `protobuf:"bytes,2,opt,name=json,proto3" json:"json,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *DynamicValue) Reset() {
*x = DynamicValue{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin5_proto_msgTypes[0]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_tfplugin5_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *DynamicValue) String() string {
@@ -282,7 +281,7 @@ func (*DynamicValue) ProtoMessage() {}
func (x *DynamicValue) ProtoReflect() protoreflect.Message {
mi := &file_tfplugin5_proto_msgTypes[0]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -312,23 +311,20 @@ func (x *DynamicValue) GetJson() []byte {
}
type Diagnostic struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Severity Diagnostic_Severity `protobuf:"varint,1,opt,name=severity,proto3,enum=tfplugin5.Diagnostic_Severity" json:"severity,omitempty"`
+ Summary string `protobuf:"bytes,2,opt,name=summary,proto3" json:"summary,omitempty"`
+ Detail string `protobuf:"bytes,3,opt,name=detail,proto3" json:"detail,omitempty"`
+ Attribute *AttributePath `protobuf:"bytes,4,opt,name=attribute,proto3" json:"attribute,omitempty"`
unknownFields protoimpl.UnknownFields
-
- Severity Diagnostic_Severity `protobuf:"varint,1,opt,name=severity,proto3,enum=tfplugin5.Diagnostic_Severity" json:"severity,omitempty"`
- Summary string `protobuf:"bytes,2,opt,name=summary,proto3" json:"summary,omitempty"`
- Detail string `protobuf:"bytes,3,opt,name=detail,proto3" json:"detail,omitempty"`
- Attribute *AttributePath `protobuf:"bytes,4,opt,name=attribute,proto3" json:"attribute,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *Diagnostic) Reset() {
*x = Diagnostic{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin5_proto_msgTypes[1]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_tfplugin5_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *Diagnostic) String() string {
@@ -339,7 +335,7 @@ func (*Diagnostic) ProtoMessage() {}
func (x *Diagnostic) ProtoReflect() protoreflect.Message {
mi := &file_tfplugin5_proto_msgTypes[1]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -383,23 +379,20 @@ func (x *Diagnostic) GetAttribute() *AttributePath {
}
type FunctionError struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- Text string `protobuf:"bytes,1,opt,name=text,proto3" json:"text,omitempty"`
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Text string `protobuf:"bytes,1,opt,name=text,proto3" json:"text,omitempty"`
// The optional function_argument records the index position of the
// argument which caused the error.
FunctionArgument *int64 `protobuf:"varint,2,opt,name=function_argument,json=functionArgument,proto3,oneof" json:"function_argument,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *FunctionError) Reset() {
*x = FunctionError{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin5_proto_msgTypes[2]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_tfplugin5_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *FunctionError) String() string {
@@ -410,7 +403,7 @@ func (*FunctionError) ProtoMessage() {}
func (x *FunctionError) ProtoReflect() protoreflect.Message {
mi := &file_tfplugin5_proto_msgTypes[2]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -440,20 +433,17 @@ func (x *FunctionError) GetFunctionArgument() int64 {
}
type AttributePath struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Steps []*AttributePath_Step `protobuf:"bytes,1,rep,name=steps,proto3" json:"steps,omitempty"`
unknownFields protoimpl.UnknownFields
-
- Steps []*AttributePath_Step `protobuf:"bytes,1,rep,name=steps,proto3" json:"steps,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *AttributePath) Reset() {
*x = AttributePath{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin5_proto_msgTypes[3]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_tfplugin5_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *AttributePath) String() string {
@@ -464,7 +454,7 @@ func (*AttributePath) ProtoMessage() {}
func (x *AttributePath) ProtoReflect() protoreflect.Message {
mi := &file_tfplugin5_proto_msgTypes[3]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -487,18 +477,16 @@ func (x *AttributePath) GetSteps() []*AttributePath_Step {
}
type Stop struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *Stop) Reset() {
*x = Stop{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin5_proto_msgTypes[4]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_tfplugin5_proto_msgTypes[4]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *Stop) String() string {
@@ -509,7 +497,7 @@ func (*Stop) ProtoMessage() {}
func (x *Stop) ProtoReflect() protoreflect.Message {
mi := &file_tfplugin5_proto_msgTypes[4]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -528,21 +516,18 @@ func (*Stop) Descriptor() ([]byte, []int) {
// provider. It can be in one of two formats, the current json encoded format
// in bytes, or the legacy flatmap format as a map of strings.
type RawState struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Json []byte `protobuf:"bytes,1,opt,name=json,proto3" json:"json,omitempty"`
+ Flatmap map[string]string `protobuf:"bytes,2,rep,name=flatmap,proto3" json:"flatmap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
unknownFields protoimpl.UnknownFields
-
- Json []byte `protobuf:"bytes,1,opt,name=json,proto3" json:"json,omitempty"`
- Flatmap map[string]string `protobuf:"bytes,2,rep,name=flatmap,proto3" json:"flatmap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+ sizeCache protoimpl.SizeCache
}
func (x *RawState) Reset() {
*x = RawState{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin5_proto_msgTypes[5]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_tfplugin5_proto_msgTypes[5]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *RawState) String() string {
@@ -553,7 +538,7 @@ func (*RawState) ProtoMessage() {}
func (x *RawState) ProtoReflect() protoreflect.Message {
mi := &file_tfplugin5_proto_msgTypes[5]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -584,25 +569,22 @@ func (x *RawState) GetFlatmap() map[string]string {
// Schema is the configuration schema for a Resource, Provider, or Provisioner.
type Schema struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
+ state protoimpl.MessageState `protogen:"open.v1"`
// The version of the schema.
// Schemas are versioned, so that providers can upgrade a saved resource
// state when the schema is changed.
Version int64 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"`
// Block is the top level configuration block for this schema.
- Block *Schema_Block `protobuf:"bytes,2,opt,name=block,proto3" json:"block,omitempty"`
+ Block *Schema_Block `protobuf:"bytes,2,opt,name=block,proto3" json:"block,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *Schema) Reset() {
*x = Schema{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin5_proto_msgTypes[6]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_tfplugin5_proto_msgTypes[6]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *Schema) String() string {
@@ -613,7 +595,7 @@ func (*Schema) ProtoMessage() {}
func (x *Schema) ProtoReflect() protoreflect.Message {
mi := &file_tfplugin5_proto_msgTypes[6]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -642,15 +624,134 @@ func (x *Schema) GetBlock() *Schema_Block {
return nil
}
+// ResourceIdentitySchema represents the structure and types of data used to identify
+// a managed resource type. Effectively, resource identity is a versioned object
+// that can be used to compare resources, whether already managed and/or being
+// discovered.
+type ResourceIdentitySchema struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // version is the identity version and separate from the Schema version.
+ // Any time the structure or format of identity_attributes changes, this version
+ // should be incremented. Versioning implicitly starts at 0 and by convention
+ // should be incremented by 1 each change.
+ //
+ // When comparing identity_attributes data, differing versions should always be treated
+ // as inequal.
+ Version int64 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"`
+ // identity_attributes are the individual value definitions which define identity data
+ // for a managed resource type. This information is used to decode DynamicValue of
+ // identity data.
+ //
+ // These attributes are intended for permanent identity data and must be wholly
+ // representative of all data necessary to compare two managed resource instances
+ // with no other data. This generally should include account, endpoint, location,
+ // and automatically generated identifiers. For some resources, this may include
+ // configuration-based data, such as a required name which must be unique.
+ IdentityAttributes []*ResourceIdentitySchema_IdentityAttribute `protobuf:"bytes,2,rep,name=identity_attributes,json=identityAttributes,proto3" json:"identity_attributes,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *ResourceIdentitySchema) Reset() {
+ *x = ResourceIdentitySchema{}
+ mi := &file_tfplugin5_proto_msgTypes[7]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ResourceIdentitySchema) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ResourceIdentitySchema) ProtoMessage() {}
+
+func (x *ResourceIdentitySchema) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin5_proto_msgTypes[7]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ResourceIdentitySchema.ProtoReflect.Descriptor instead.
+func (*ResourceIdentitySchema) Descriptor() ([]byte, []int) {
+ return file_tfplugin5_proto_rawDescGZIP(), []int{7}
+}
+
+func (x *ResourceIdentitySchema) GetVersion() int64 {
+ if x != nil {
+ return x.Version
+ }
+ return 0
+}
+
+func (x *ResourceIdentitySchema) GetIdentityAttributes() []*ResourceIdentitySchema_IdentityAttribute {
+ if x != nil {
+ return x.IdentityAttributes
+ }
+ return nil
+}
+
+// ResourceIdentityData is a separate message for better extensibility
+type ResourceIdentityData struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // identity_data is the resource identity data for the given definition. It should
+ // be decoded using the identity schema.
+ //
+ // This data is considered permanent for the identity version and suitable for
+ // longer-term storage.
+ IdentityData *DynamicValue `protobuf:"bytes,1,opt,name=identity_data,json=identityData,proto3" json:"identity_data,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *ResourceIdentityData) Reset() {
+ *x = ResourceIdentityData{}
+ mi := &file_tfplugin5_proto_msgTypes[8]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ResourceIdentityData) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ResourceIdentityData) ProtoMessage() {}
+
+func (x *ResourceIdentityData) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin5_proto_msgTypes[8]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ResourceIdentityData.ProtoReflect.Descriptor instead.
+func (*ResourceIdentityData) Descriptor() ([]byte, []int) {
+ return file_tfplugin5_proto_rawDescGZIP(), []int{8}
+}
+
+func (x *ResourceIdentityData) GetIdentityData() *DynamicValue {
+ if x != nil {
+ return x.IdentityData
+ }
+ return nil
+}
+
// ServerCapabilities allows providers to communicate extra information
// regarding supported protocol features. This is used to indicate
// availability of certain forward-compatible changes which may be optional
// in a major protocol version, but cannot be tested for directly.
type ServerCapabilities struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
+ state protoimpl.MessageState `protogen:"open.v1"`
// The plan_destroy capability signals that a provider expects a call
// to PlanResourceChange when a resource is going to be destroyed.
PlanDestroy bool `protobuf:"varint,1,opt,name=plan_destroy,json=planDestroy,proto3" json:"plan_destroy,omitempty"`
@@ -662,15 +763,15 @@ type ServerCapabilities struct {
// The move_resource_state capability signals that a provider supports the
// MoveResourceState RPC.
MoveResourceState bool `protobuf:"varint,3,opt,name=move_resource_state,json=moveResourceState,proto3" json:"move_resource_state,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *ServerCapabilities) Reset() {
*x = ServerCapabilities{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin5_proto_msgTypes[7]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_tfplugin5_proto_msgTypes[9]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *ServerCapabilities) String() string {
@@ -680,8 +781,8 @@ func (x *ServerCapabilities) String() string {
func (*ServerCapabilities) ProtoMessage() {}
func (x *ServerCapabilities) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin5_proto_msgTypes[7]
- if protoimpl.UnsafeEnabled && x != nil {
+ mi := &file_tfplugin5_proto_msgTypes[9]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -693,7 +794,7 @@ func (x *ServerCapabilities) ProtoReflect() protoreflect.Message {
// Deprecated: Use ServerCapabilities.ProtoReflect.Descriptor instead.
func (*ServerCapabilities) Descriptor() ([]byte, []int) {
- return file_tfplugin5_proto_rawDescGZIP(), []int{7}
+ return file_tfplugin5_proto_rawDescGZIP(), []int{9}
}
func (x *ServerCapabilities) GetPlanDestroy() bool {
@@ -722,22 +823,22 @@ func (x *ServerCapabilities) GetMoveResourceState() bool {
// certain forward-compatible changes which may be optional in a major
// protocol version, but cannot be tested for directly.
type ClientCapabilities struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
+ state protoimpl.MessageState `protogen:"open.v1"`
// The deferral_allowed capability signals that the client is able to
// handle deferred responses from the provider.
DeferralAllowed bool `protobuf:"varint,1,opt,name=deferral_allowed,json=deferralAllowed,proto3" json:"deferral_allowed,omitempty"`
+ // The write_only_attributes_allowed capability signals that the client
+ // is able to handle write_only attributes for managed resources.
+ WriteOnlyAttributesAllowed bool `protobuf:"varint,2,opt,name=write_only_attributes_allowed,json=writeOnlyAttributesAllowed,proto3" json:"write_only_attributes_allowed,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *ClientCapabilities) Reset() {
*x = ClientCapabilities{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin5_proto_msgTypes[8]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_tfplugin5_proto_msgTypes[10]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *ClientCapabilities) String() string {
@@ -747,8 +848,8 @@ func (x *ClientCapabilities) String() string {
func (*ClientCapabilities) ProtoMessage() {}
func (x *ClientCapabilities) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin5_proto_msgTypes[8]
- if protoimpl.UnsafeEnabled && x != nil {
+ mi := &file_tfplugin5_proto_msgTypes[10]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -760,7 +861,7 @@ func (x *ClientCapabilities) ProtoReflect() protoreflect.Message {
// Deprecated: Use ClientCapabilities.ProtoReflect.Descriptor instead.
func (*ClientCapabilities) Descriptor() ([]byte, []int) {
- return file_tfplugin5_proto_rawDescGZIP(), []int{8}
+ return file_tfplugin5_proto_rawDescGZIP(), []int{10}
}
func (x *ClientCapabilities) GetDeferralAllowed() bool {
@@ -770,11 +871,15 @@ func (x *ClientCapabilities) GetDeferralAllowed() bool {
return false
}
-type Function struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
+func (x *ClientCapabilities) GetWriteOnlyAttributesAllowed() bool {
+ if x != nil {
+ return x.WriteOnlyAttributesAllowed
+ }
+ return false
+}
+type Function struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
// parameters is the ordered list of positional function parameters.
Parameters []*Function_Parameter `protobuf:"bytes,1,rep,name=parameters,proto3" json:"parameters,omitempty"`
// variadic_parameter is an optional final parameter which accepts
@@ -792,15 +897,15 @@ type Function struct {
// deprecation_message is human-readable documentation if the
// function is deprecated.
DeprecationMessage string `protobuf:"bytes,7,opt,name=deprecation_message,json=deprecationMessage,proto3" json:"deprecation_message,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *Function) Reset() {
*x = Function{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin5_proto_msgTypes[9]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_tfplugin5_proto_msgTypes[11]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *Function) String() string {
@@ -810,8 +915,8 @@ func (x *Function) String() string {
func (*Function) ProtoMessage() {}
func (x *Function) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin5_proto_msgTypes[9]
- if protoimpl.UnsafeEnabled && x != nil {
+ mi := &file_tfplugin5_proto_msgTypes[11]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -823,7 +928,7 @@ func (x *Function) ProtoReflect() protoreflect.Message {
// Deprecated: Use Function.ProtoReflect.Descriptor instead.
func (*Function) Descriptor() ([]byte, []int) {
- return file_tfplugin5_proto_rawDescGZIP(), []int{9}
+ return file_tfplugin5_proto_rawDescGZIP(), []int{11}
}
func (x *Function) GetParameters() []*Function_Parameter {
@@ -875,23 +980,64 @@ func (x *Function) GetDeprecationMessage() string {
return ""
}
-// Deferred is a message that indicates that change is deferred for a reason.
-type Deferred struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+type ActionSchema struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Schema *Schema `protobuf:"bytes,1,opt,name=schema,proto3" json:"schema,omitempty"` // of the action itself
unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+func (x *ActionSchema) Reset() {
+ *x = ActionSchema{}
+ mi := &file_tfplugin5_proto_msgTypes[12]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ActionSchema) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ActionSchema) ProtoMessage() {}
+
+func (x *ActionSchema) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin5_proto_msgTypes[12]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ActionSchema.ProtoReflect.Descriptor instead.
+func (*ActionSchema) Descriptor() ([]byte, []int) {
+ return file_tfplugin5_proto_rawDescGZIP(), []int{12}
+}
+
+func (x *ActionSchema) GetSchema() *Schema {
+ if x != nil {
+ return x.Schema
+ }
+ return nil
+}
+
+// Deferred is a message that indicates that change is deferred for a reason.
+type Deferred struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
// reason is the reason for deferring the change.
- Reason Deferred_Reason `protobuf:"varint,1,opt,name=reason,proto3,enum=tfplugin5.Deferred_Reason" json:"reason,omitempty"`
+ Reason Deferred_Reason `protobuf:"varint,1,opt,name=reason,proto3,enum=tfplugin5.Deferred_Reason" json:"reason,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *Deferred) Reset() {
*x = Deferred{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin5_proto_msgTypes[10]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_tfplugin5_proto_msgTypes[13]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *Deferred) String() string {
@@ -901,8 +1047,8 @@ func (x *Deferred) String() string {
func (*Deferred) ProtoMessage() {}
func (x *Deferred) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin5_proto_msgTypes[10]
- if protoimpl.UnsafeEnabled && x != nil {
+ mi := &file_tfplugin5_proto_msgTypes[13]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -914,7 +1060,7 @@ func (x *Deferred) ProtoReflect() protoreflect.Message {
// Deprecated: Use Deferred.ProtoReflect.Descriptor instead.
func (*Deferred) Descriptor() ([]byte, []int) {
- return file_tfplugin5_proto_rawDescGZIP(), []int{10}
+ return file_tfplugin5_proto_rawDescGZIP(), []int{13}
}
func (x *Deferred) GetReason() Deferred_Reason {
@@ -925,18 +1071,16 @@ func (x *Deferred) GetReason() Deferred_Reason {
}
type GetMetadata struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *GetMetadata) Reset() {
*x = GetMetadata{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin5_proto_msgTypes[11]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_tfplugin5_proto_msgTypes[14]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *GetMetadata) String() string {
@@ -946,8 +1090,8 @@ func (x *GetMetadata) String() string {
func (*GetMetadata) ProtoMessage() {}
func (x *GetMetadata) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin5_proto_msgTypes[11]
- if protoimpl.UnsafeEnabled && x != nil {
+ mi := &file_tfplugin5_proto_msgTypes[14]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -959,22 +1103,20 @@ func (x *GetMetadata) ProtoReflect() protoreflect.Message {
// Deprecated: Use GetMetadata.ProtoReflect.Descriptor instead.
func (*GetMetadata) Descriptor() ([]byte, []int) {
- return file_tfplugin5_proto_rawDescGZIP(), []int{11}
+ return file_tfplugin5_proto_rawDescGZIP(), []int{14}
}
type GetProviderSchema struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *GetProviderSchema) Reset() {
*x = GetProviderSchema{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin5_proto_msgTypes[12]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_tfplugin5_proto_msgTypes[15]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *GetProviderSchema) String() string {
@@ -984,8 +1126,8 @@ func (x *GetProviderSchema) String() string {
func (*GetProviderSchema) ProtoMessage() {}
func (x *GetProviderSchema) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin5_proto_msgTypes[12]
- if protoimpl.UnsafeEnabled && x != nil {
+ mi := &file_tfplugin5_proto_msgTypes[15]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -997,22 +1139,20 @@ func (x *GetProviderSchema) ProtoReflect() protoreflect.Message {
// Deprecated: Use GetProviderSchema.ProtoReflect.Descriptor instead.
func (*GetProviderSchema) Descriptor() ([]byte, []int) {
- return file_tfplugin5_proto_rawDescGZIP(), []int{12}
+ return file_tfplugin5_proto_rawDescGZIP(), []int{15}
}
type PrepareProviderConfig struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *PrepareProviderConfig) Reset() {
*x = PrepareProviderConfig{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin5_proto_msgTypes[13]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_tfplugin5_proto_msgTypes[16]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *PrepareProviderConfig) String() string {
@@ -1022,8 +1162,8 @@ func (x *PrepareProviderConfig) String() string {
func (*PrepareProviderConfig) ProtoMessage() {}
func (x *PrepareProviderConfig) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin5_proto_msgTypes[13]
- if protoimpl.UnsafeEnabled && x != nil {
+ mi := &file_tfplugin5_proto_msgTypes[16]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1035,22 +1175,20 @@ func (x *PrepareProviderConfig) ProtoReflect() protoreflect.Message {
// Deprecated: Use PrepareProviderConfig.ProtoReflect.Descriptor instead.
func (*PrepareProviderConfig) Descriptor() ([]byte, []int) {
- return file_tfplugin5_proto_rawDescGZIP(), []int{13}
+ return file_tfplugin5_proto_rawDescGZIP(), []int{16}
}
type UpgradeResourceState struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *UpgradeResourceState) Reset() {
*x = UpgradeResourceState{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin5_proto_msgTypes[14]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_tfplugin5_proto_msgTypes[17]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *UpgradeResourceState) String() string {
@@ -1060,8 +1198,8 @@ func (x *UpgradeResourceState) String() string {
func (*UpgradeResourceState) ProtoMessage() {}
func (x *UpgradeResourceState) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin5_proto_msgTypes[14]
- if protoimpl.UnsafeEnabled && x != nil {
+ mi := &file_tfplugin5_proto_msgTypes[17]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1073,22 +1211,20 @@ func (x *UpgradeResourceState) ProtoReflect() protoreflect.Message {
// Deprecated: Use UpgradeResourceState.ProtoReflect.Descriptor instead.
func (*UpgradeResourceState) Descriptor() ([]byte, []int) {
- return file_tfplugin5_proto_rawDescGZIP(), []int{14}
+ return file_tfplugin5_proto_rawDescGZIP(), []int{17}
}
type ValidateResourceTypeConfig struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *ValidateResourceTypeConfig) Reset() {
*x = ValidateResourceTypeConfig{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin5_proto_msgTypes[15]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_tfplugin5_proto_msgTypes[18]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *ValidateResourceTypeConfig) String() string {
@@ -1098,8 +1234,8 @@ func (x *ValidateResourceTypeConfig) String() string {
func (*ValidateResourceTypeConfig) ProtoMessage() {}
func (x *ValidateResourceTypeConfig) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin5_proto_msgTypes[15]
- if protoimpl.UnsafeEnabled && x != nil {
+ mi := &file_tfplugin5_proto_msgTypes[18]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1111,22 +1247,20 @@ func (x *ValidateResourceTypeConfig) ProtoReflect() protoreflect.Message {
// Deprecated: Use ValidateResourceTypeConfig.ProtoReflect.Descriptor instead.
func (*ValidateResourceTypeConfig) Descriptor() ([]byte, []int) {
- return file_tfplugin5_proto_rawDescGZIP(), []int{15}
+ return file_tfplugin5_proto_rawDescGZIP(), []int{18}
}
type ValidateDataSourceConfig struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *ValidateDataSourceConfig) Reset() {
*x = ValidateDataSourceConfig{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin5_proto_msgTypes[16]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_tfplugin5_proto_msgTypes[19]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *ValidateDataSourceConfig) String() string {
@@ -1136,8 +1270,8 @@ func (x *ValidateDataSourceConfig) String() string {
func (*ValidateDataSourceConfig) ProtoMessage() {}
func (x *ValidateDataSourceConfig) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin5_proto_msgTypes[16]
- if protoimpl.UnsafeEnabled && x != nil {
+ mi := &file_tfplugin5_proto_msgTypes[19]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1149,22 +1283,20 @@ func (x *ValidateDataSourceConfig) ProtoReflect() protoreflect.Message {
// Deprecated: Use ValidateDataSourceConfig.ProtoReflect.Descriptor instead.
func (*ValidateDataSourceConfig) Descriptor() ([]byte, []int) {
- return file_tfplugin5_proto_rawDescGZIP(), []int{16}
+ return file_tfplugin5_proto_rawDescGZIP(), []int{19}
}
type Configure struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *Configure) Reset() {
*x = Configure{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin5_proto_msgTypes[17]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_tfplugin5_proto_msgTypes[20]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *Configure) String() string {
@@ -1174,8 +1306,8 @@ func (x *Configure) String() string {
func (*Configure) ProtoMessage() {}
func (x *Configure) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin5_proto_msgTypes[17]
- if protoimpl.UnsafeEnabled && x != nil {
+ mi := &file_tfplugin5_proto_msgTypes[20]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1187,22 +1319,20 @@ func (x *Configure) ProtoReflect() protoreflect.Message {
// Deprecated: Use Configure.ProtoReflect.Descriptor instead.
func (*Configure) Descriptor() ([]byte, []int) {
- return file_tfplugin5_proto_rawDescGZIP(), []int{17}
+ return file_tfplugin5_proto_rawDescGZIP(), []int{20}
}
type ReadResource struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *ReadResource) Reset() {
*x = ReadResource{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin5_proto_msgTypes[18]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_tfplugin5_proto_msgTypes[21]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *ReadResource) String() string {
@@ -1212,8 +1342,8 @@ func (x *ReadResource) String() string {
func (*ReadResource) ProtoMessage() {}
func (x *ReadResource) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin5_proto_msgTypes[18]
- if protoimpl.UnsafeEnabled && x != nil {
+ mi := &file_tfplugin5_proto_msgTypes[21]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1225,22 +1355,20 @@ func (x *ReadResource) ProtoReflect() protoreflect.Message {
// Deprecated: Use ReadResource.ProtoReflect.Descriptor instead.
func (*ReadResource) Descriptor() ([]byte, []int) {
- return file_tfplugin5_proto_rawDescGZIP(), []int{18}
+ return file_tfplugin5_proto_rawDescGZIP(), []int{21}
}
type PlanResourceChange struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *PlanResourceChange) Reset() {
*x = PlanResourceChange{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin5_proto_msgTypes[19]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_tfplugin5_proto_msgTypes[22]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *PlanResourceChange) String() string {
@@ -1250,8 +1378,8 @@ func (x *PlanResourceChange) String() string {
func (*PlanResourceChange) ProtoMessage() {}
func (x *PlanResourceChange) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin5_proto_msgTypes[19]
- if protoimpl.UnsafeEnabled && x != nil {
+ mi := &file_tfplugin5_proto_msgTypes[22]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1263,22 +1391,20 @@ func (x *PlanResourceChange) ProtoReflect() protoreflect.Message {
// Deprecated: Use PlanResourceChange.ProtoReflect.Descriptor instead.
func (*PlanResourceChange) Descriptor() ([]byte, []int) {
- return file_tfplugin5_proto_rawDescGZIP(), []int{19}
+ return file_tfplugin5_proto_rawDescGZIP(), []int{22}
}
type ApplyResourceChange struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *ApplyResourceChange) Reset() {
*x = ApplyResourceChange{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin5_proto_msgTypes[20]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_tfplugin5_proto_msgTypes[23]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *ApplyResourceChange) String() string {
@@ -1288,8 +1414,8 @@ func (x *ApplyResourceChange) String() string {
func (*ApplyResourceChange) ProtoMessage() {}
func (x *ApplyResourceChange) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin5_proto_msgTypes[20]
- if protoimpl.UnsafeEnabled && x != nil {
+ mi := &file_tfplugin5_proto_msgTypes[23]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1301,22 +1427,20 @@ func (x *ApplyResourceChange) ProtoReflect() protoreflect.Message {
// Deprecated: Use ApplyResourceChange.ProtoReflect.Descriptor instead.
func (*ApplyResourceChange) Descriptor() ([]byte, []int) {
- return file_tfplugin5_proto_rawDescGZIP(), []int{20}
+ return file_tfplugin5_proto_rawDescGZIP(), []int{23}
}
type ImportResourceState struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *ImportResourceState) Reset() {
*x = ImportResourceState{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin5_proto_msgTypes[21]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_tfplugin5_proto_msgTypes[24]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *ImportResourceState) String() string {
@@ -1326,8 +1450,8 @@ func (x *ImportResourceState) String() string {
func (*ImportResourceState) ProtoMessage() {}
func (x *ImportResourceState) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin5_proto_msgTypes[21]
- if protoimpl.UnsafeEnabled && x != nil {
+ mi := &file_tfplugin5_proto_msgTypes[24]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1339,22 +1463,20 @@ func (x *ImportResourceState) ProtoReflect() protoreflect.Message {
// Deprecated: Use ImportResourceState.ProtoReflect.Descriptor instead.
func (*ImportResourceState) Descriptor() ([]byte, []int) {
- return file_tfplugin5_proto_rawDescGZIP(), []int{21}
+ return file_tfplugin5_proto_rawDescGZIP(), []int{24}
}
type MoveResourceState struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *MoveResourceState) Reset() {
*x = MoveResourceState{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin5_proto_msgTypes[22]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_tfplugin5_proto_msgTypes[25]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *MoveResourceState) String() string {
@@ -1364,8 +1486,8 @@ func (x *MoveResourceState) String() string {
func (*MoveResourceState) ProtoMessage() {}
func (x *MoveResourceState) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin5_proto_msgTypes[22]
- if protoimpl.UnsafeEnabled && x != nil {
+ mi := &file_tfplugin5_proto_msgTypes[25]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1377,22 +1499,20 @@ func (x *MoveResourceState) ProtoReflect() protoreflect.Message {
// Deprecated: Use MoveResourceState.ProtoReflect.Descriptor instead.
func (*MoveResourceState) Descriptor() ([]byte, []int) {
- return file_tfplugin5_proto_rawDescGZIP(), []int{22}
+ return file_tfplugin5_proto_rawDescGZIP(), []int{25}
}
type ReadDataSource struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *ReadDataSource) Reset() {
*x = ReadDataSource{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin5_proto_msgTypes[23]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_tfplugin5_proto_msgTypes[26]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *ReadDataSource) String() string {
@@ -1402,8 +1522,8 @@ func (x *ReadDataSource) String() string {
func (*ReadDataSource) ProtoMessage() {}
func (x *ReadDataSource) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin5_proto_msgTypes[23]
- if protoimpl.UnsafeEnabled && x != nil {
+ mi := &file_tfplugin5_proto_msgTypes[26]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1415,22 +1535,20 @@ func (x *ReadDataSource) ProtoReflect() protoreflect.Message {
// Deprecated: Use ReadDataSource.ProtoReflect.Descriptor instead.
func (*ReadDataSource) Descriptor() ([]byte, []int) {
- return file_tfplugin5_proto_rawDescGZIP(), []int{23}
+ return file_tfplugin5_proto_rawDescGZIP(), []int{26}
}
type GetProvisionerSchema struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *GetProvisionerSchema) Reset() {
*x = GetProvisionerSchema{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin5_proto_msgTypes[24]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_tfplugin5_proto_msgTypes[27]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *GetProvisionerSchema) String() string {
@@ -1440,8 +1558,8 @@ func (x *GetProvisionerSchema) String() string {
func (*GetProvisionerSchema) ProtoMessage() {}
func (x *GetProvisionerSchema) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin5_proto_msgTypes[24]
- if protoimpl.UnsafeEnabled && x != nil {
+ mi := &file_tfplugin5_proto_msgTypes[27]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1453,22 +1571,20 @@ func (x *GetProvisionerSchema) ProtoReflect() protoreflect.Message {
// Deprecated: Use GetProvisionerSchema.ProtoReflect.Descriptor instead.
func (*GetProvisionerSchema) Descriptor() ([]byte, []int) {
- return file_tfplugin5_proto_rawDescGZIP(), []int{24}
+ return file_tfplugin5_proto_rawDescGZIP(), []int{27}
}
type ValidateProvisionerConfig struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *ValidateProvisionerConfig) Reset() {
*x = ValidateProvisionerConfig{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin5_proto_msgTypes[25]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_tfplugin5_proto_msgTypes[28]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *ValidateProvisionerConfig) String() string {
@@ -1478,8 +1594,8 @@ func (x *ValidateProvisionerConfig) String() string {
func (*ValidateProvisionerConfig) ProtoMessage() {}
func (x *ValidateProvisionerConfig) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin5_proto_msgTypes[25]
- if protoimpl.UnsafeEnabled && x != nil {
+ mi := &file_tfplugin5_proto_msgTypes[28]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1491,22 +1607,20 @@ func (x *ValidateProvisionerConfig) ProtoReflect() protoreflect.Message {
// Deprecated: Use ValidateProvisionerConfig.ProtoReflect.Descriptor instead.
func (*ValidateProvisionerConfig) Descriptor() ([]byte, []int) {
- return file_tfplugin5_proto_rawDescGZIP(), []int{25}
+ return file_tfplugin5_proto_rawDescGZIP(), []int{28}
}
type ProvisionResource struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *ProvisionResource) Reset() {
*x = ProvisionResource{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin5_proto_msgTypes[26]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_tfplugin5_proto_msgTypes[29]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *ProvisionResource) String() string {
@@ -1516,8 +1630,8 @@ func (x *ProvisionResource) String() string {
func (*ProvisionResource) ProtoMessage() {}
func (x *ProvisionResource) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin5_proto_msgTypes[26]
- if protoimpl.UnsafeEnabled && x != nil {
+ mi := &file_tfplugin5_proto_msgTypes[29]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1529,22 +1643,20 @@ func (x *ProvisionResource) ProtoReflect() protoreflect.Message {
// Deprecated: Use ProvisionResource.ProtoReflect.Descriptor instead.
func (*ProvisionResource) Descriptor() ([]byte, []int) {
- return file_tfplugin5_proto_rawDescGZIP(), []int{26}
+ return file_tfplugin5_proto_rawDescGZIP(), []int{29}
}
type GetFunctions struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *GetFunctions) Reset() {
*x = GetFunctions{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin5_proto_msgTypes[27]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_tfplugin5_proto_msgTypes[30]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *GetFunctions) String() string {
@@ -1554,8 +1666,8 @@ func (x *GetFunctions) String() string {
func (*GetFunctions) ProtoMessage() {}
func (x *GetFunctions) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin5_proto_msgTypes[27]
- if protoimpl.UnsafeEnabled && x != nil {
+ mi := &file_tfplugin5_proto_msgTypes[30]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1567,22 +1679,20 @@ func (x *GetFunctions) ProtoReflect() protoreflect.Message {
// Deprecated: Use GetFunctions.ProtoReflect.Descriptor instead.
func (*GetFunctions) Descriptor() ([]byte, []int) {
- return file_tfplugin5_proto_rawDescGZIP(), []int{27}
+ return file_tfplugin5_proto_rawDescGZIP(), []int{30}
}
type CallFunction struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *CallFunction) Reset() {
*x = CallFunction{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin5_proto_msgTypes[28]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_tfplugin5_proto_msgTypes[31]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *CallFunction) String() string {
@@ -1592,8 +1702,8 @@ func (x *CallFunction) String() string {
func (*CallFunction) ProtoMessage() {}
func (x *CallFunction) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin5_proto_msgTypes[28]
- if protoimpl.UnsafeEnabled && x != nil {
+ mi := &file_tfplugin5_proto_msgTypes[31]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1605,40 +1715,31 @@ func (x *CallFunction) ProtoReflect() protoreflect.Message {
// Deprecated: Use CallFunction.ProtoReflect.Descriptor instead.
func (*CallFunction) Descriptor() ([]byte, []int) {
- return file_tfplugin5_proto_rawDescGZIP(), []int{28}
+ return file_tfplugin5_proto_rawDescGZIP(), []int{31}
}
-type AttributePath_Step struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+type ValidateEphemeralResourceConfig struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
unknownFields protoimpl.UnknownFields
-
- // Types that are assignable to Selector:
- //
- // *AttributePath_Step_AttributeName
- // *AttributePath_Step_ElementKeyString
- // *AttributePath_Step_ElementKeyInt
- Selector isAttributePath_Step_Selector `protobuf_oneof:"selector"`
+ sizeCache protoimpl.SizeCache
}
-func (x *AttributePath_Step) Reset() {
- *x = AttributePath_Step{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin5_proto_msgTypes[29]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+func (x *ValidateEphemeralResourceConfig) Reset() {
+ *x = ValidateEphemeralResourceConfig{}
+ mi := &file_tfplugin5_proto_msgTypes[32]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
-func (x *AttributePath_Step) String() string {
+func (x *ValidateEphemeralResourceConfig) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*AttributePath_Step) ProtoMessage() {}
+func (*ValidateEphemeralResourceConfig) ProtoMessage() {}
-func (x *AttributePath_Step) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin5_proto_msgTypes[29]
- if protoimpl.UnsafeEnabled && x != nil {
+func (x *ValidateEphemeralResourceConfig) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin5_proto_msgTypes[32]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1648,89 +1749,105 @@ func (x *AttributePath_Step) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use AttributePath_Step.ProtoReflect.Descriptor instead.
-func (*AttributePath_Step) Descriptor() ([]byte, []int) {
- return file_tfplugin5_proto_rawDescGZIP(), []int{3, 0}
+// Deprecated: Use ValidateEphemeralResourceConfig.ProtoReflect.Descriptor instead.
+func (*ValidateEphemeralResourceConfig) Descriptor() ([]byte, []int) {
+ return file_tfplugin5_proto_rawDescGZIP(), []int{32}
}
-func (m *AttributePath_Step) GetSelector() isAttributePath_Step_Selector {
- if m != nil {
- return m.Selector
- }
- return nil
+type OpenEphemeralResource struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
-func (x *AttributePath_Step) GetAttributeName() string {
- if x, ok := x.GetSelector().(*AttributePath_Step_AttributeName); ok {
- return x.AttributeName
- }
- return ""
+func (x *OpenEphemeralResource) Reset() {
+ *x = OpenEphemeralResource{}
+ mi := &file_tfplugin5_proto_msgTypes[33]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
-func (x *AttributePath_Step) GetElementKeyString() string {
- if x, ok := x.GetSelector().(*AttributePath_Step_ElementKeyString); ok {
- return x.ElementKeyString
- }
- return ""
+func (x *OpenEphemeralResource) String() string {
+ return protoimpl.X.MessageStringOf(x)
}
-func (x *AttributePath_Step) GetElementKeyInt() int64 {
- if x, ok := x.GetSelector().(*AttributePath_Step_ElementKeyInt); ok {
- return x.ElementKeyInt
+func (*OpenEphemeralResource) ProtoMessage() {}
+
+func (x *OpenEphemeralResource) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin5_proto_msgTypes[33]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
}
- return 0
+ return mi.MessageOf(x)
}
-type isAttributePath_Step_Selector interface {
- isAttributePath_Step_Selector()
+// Deprecated: Use OpenEphemeralResource.ProtoReflect.Descriptor instead.
+func (*OpenEphemeralResource) Descriptor() ([]byte, []int) {
+ return file_tfplugin5_proto_rawDescGZIP(), []int{33}
}
-type AttributePath_Step_AttributeName struct {
- // Set "attribute_name" to represent looking up an attribute
- // in the current object value.
- AttributeName string `protobuf:"bytes,1,opt,name=attribute_name,json=attributeName,proto3,oneof"`
+type RenewEphemeralResource struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
-type AttributePath_Step_ElementKeyString struct {
- // Set "element_key_*" to represent looking up an element in
- // an indexable collection type.
- ElementKeyString string `protobuf:"bytes,2,opt,name=element_key_string,json=elementKeyString,proto3,oneof"`
+func (x *RenewEphemeralResource) Reset() {
+ *x = RenewEphemeralResource{}
+ mi := &file_tfplugin5_proto_msgTypes[34]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
-type AttributePath_Step_ElementKeyInt struct {
- ElementKeyInt int64 `protobuf:"varint,3,opt,name=element_key_int,json=elementKeyInt,proto3,oneof"`
+func (x *RenewEphemeralResource) String() string {
+ return protoimpl.X.MessageStringOf(x)
}
-func (*AttributePath_Step_AttributeName) isAttributePath_Step_Selector() {}
+func (*RenewEphemeralResource) ProtoMessage() {}
-func (*AttributePath_Step_ElementKeyString) isAttributePath_Step_Selector() {}
+func (x *RenewEphemeralResource) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin5_proto_msgTypes[34]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
-func (*AttributePath_Step_ElementKeyInt) isAttributePath_Step_Selector() {}
+// Deprecated: Use RenewEphemeralResource.ProtoReflect.Descriptor instead.
+func (*RenewEphemeralResource) Descriptor() ([]byte, []int) {
+ return file_tfplugin5_proto_rawDescGZIP(), []int{34}
+}
-type Stop_Request struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+type CloseEphemeralResource struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
-func (x *Stop_Request) Reset() {
- *x = Stop_Request{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin5_proto_msgTypes[30]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+func (x *CloseEphemeralResource) Reset() {
+ *x = CloseEphemeralResource{}
+ mi := &file_tfplugin5_proto_msgTypes[35]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
-func (x *Stop_Request) String() string {
+func (x *CloseEphemeralResource) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*Stop_Request) ProtoMessage() {}
+func (*CloseEphemeralResource) ProtoMessage() {}
-func (x *Stop_Request) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin5_proto_msgTypes[30]
- if protoimpl.UnsafeEnabled && x != nil {
+func (x *CloseEphemeralResource) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin5_proto_msgTypes[35]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1740,37 +1857,34 @@ func (x *Stop_Request) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use Stop_Request.ProtoReflect.Descriptor instead.
-func (*Stop_Request) Descriptor() ([]byte, []int) {
- return file_tfplugin5_proto_rawDescGZIP(), []int{4, 0}
+// Deprecated: Use CloseEphemeralResource.ProtoReflect.Descriptor instead.
+func (*CloseEphemeralResource) Descriptor() ([]byte, []int) {
+ return file_tfplugin5_proto_rawDescGZIP(), []int{35}
}
-type Stop_Response struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+// Returns resource identity schemas for all resources
+type GetResourceIdentitySchemas struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
unknownFields protoimpl.UnknownFields
-
- Error string `protobuf:"bytes,1,opt,name=Error,proto3" json:"Error,omitempty"`
+ sizeCache protoimpl.SizeCache
}
-func (x *Stop_Response) Reset() {
- *x = Stop_Response{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin5_proto_msgTypes[31]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+func (x *GetResourceIdentitySchemas) Reset() {
+ *x = GetResourceIdentitySchemas{}
+ mi := &file_tfplugin5_proto_msgTypes[36]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
-func (x *Stop_Response) String() string {
+func (x *GetResourceIdentitySchemas) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*Stop_Response) ProtoMessage() {}
+func (*GetResourceIdentitySchemas) ProtoMessage() {}
-func (x *Stop_Response) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin5_proto_msgTypes[31]
- if protoimpl.UnsafeEnabled && x != nil {
+func (x *GetResourceIdentitySchemas) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin5_proto_msgTypes[36]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1780,49 +1894,33 @@ func (x *Stop_Response) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use Stop_Response.ProtoReflect.Descriptor instead.
-func (*Stop_Response) Descriptor() ([]byte, []int) {
- return file_tfplugin5_proto_rawDescGZIP(), []int{4, 1}
-}
-
-func (x *Stop_Response) GetError() string {
- if x != nil {
- return x.Error
- }
- return ""
+// Deprecated: Use GetResourceIdentitySchemas.ProtoReflect.Descriptor instead.
+func (*GetResourceIdentitySchemas) Descriptor() ([]byte, []int) {
+ return file_tfplugin5_proto_rawDescGZIP(), []int{36}
}
-type Schema_Block struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+type UpgradeResourceIdentity struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
unknownFields protoimpl.UnknownFields
-
- Version int64 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"`
- Attributes []*Schema_Attribute `protobuf:"bytes,2,rep,name=attributes,proto3" json:"attributes,omitempty"`
- BlockTypes []*Schema_NestedBlock `protobuf:"bytes,3,rep,name=block_types,json=blockTypes,proto3" json:"block_types,omitempty"`
- Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"`
- DescriptionKind StringKind `protobuf:"varint,5,opt,name=description_kind,json=descriptionKind,proto3,enum=tfplugin5.StringKind" json:"description_kind,omitempty"`
- Deprecated bool `protobuf:"varint,6,opt,name=deprecated,proto3" json:"deprecated,omitempty"`
+ sizeCache protoimpl.SizeCache
}
-func (x *Schema_Block) Reset() {
- *x = Schema_Block{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin5_proto_msgTypes[33]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+func (x *UpgradeResourceIdentity) Reset() {
+ *x = UpgradeResourceIdentity{}
+ mi := &file_tfplugin5_proto_msgTypes[37]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
-func (x *Schema_Block) String() string {
+func (x *UpgradeResourceIdentity) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*Schema_Block) ProtoMessage() {}
+func (*UpgradeResourceIdentity) ProtoMessage() {}
-func (x *Schema_Block) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin5_proto_msgTypes[33]
- if protoimpl.UnsafeEnabled && x != nil {
+func (x *UpgradeResourceIdentity) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin5_proto_msgTypes[37]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1832,87 +1930,2003 @@ func (x *Schema_Block) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use Schema_Block.ProtoReflect.Descriptor instead.
-func (*Schema_Block) Descriptor() ([]byte, []int) {
- return file_tfplugin5_proto_rawDescGZIP(), []int{6, 0}
+// Deprecated: Use UpgradeResourceIdentity.ProtoReflect.Descriptor instead.
+func (*UpgradeResourceIdentity) Descriptor() ([]byte, []int) {
+ return file_tfplugin5_proto_rawDescGZIP(), []int{37}
}
-func (x *Schema_Block) GetVersion() int64 {
- if x != nil {
- return x.Version
- }
+type ListResource struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *ListResource) Reset() {
+ *x = ListResource{}
+ mi := &file_tfplugin5_proto_msgTypes[38]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ListResource) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListResource) ProtoMessage() {}
+
+func (x *ListResource) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin5_proto_msgTypes[38]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ListResource.ProtoReflect.Descriptor instead.
+func (*ListResource) Descriptor() ([]byte, []int) {
+ return file_tfplugin5_proto_rawDescGZIP(), []int{38}
+}
+
+type ValidateListResourceConfig struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *ValidateListResourceConfig) Reset() {
+ *x = ValidateListResourceConfig{}
+ mi := &file_tfplugin5_proto_msgTypes[39]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ValidateListResourceConfig) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ValidateListResourceConfig) ProtoMessage() {}
+
+func (x *ValidateListResourceConfig) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin5_proto_msgTypes[39]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ValidateListResourceConfig.ProtoReflect.Descriptor instead.
+func (*ValidateListResourceConfig) Descriptor() ([]byte, []int) {
+ return file_tfplugin5_proto_rawDescGZIP(), []int{39}
+}
+
+type ValidateActionConfig struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *ValidateActionConfig) Reset() {
+ *x = ValidateActionConfig{}
+ mi := &file_tfplugin5_proto_msgTypes[40]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ValidateActionConfig) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ValidateActionConfig) ProtoMessage() {}
+
+func (x *ValidateActionConfig) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin5_proto_msgTypes[40]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ValidateActionConfig.ProtoReflect.Descriptor instead.
+func (*ValidateActionConfig) Descriptor() ([]byte, []int) {
+ return file_tfplugin5_proto_rawDescGZIP(), []int{40}
+}
+
+type PlanAction struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *PlanAction) Reset() {
+ *x = PlanAction{}
+ mi := &file_tfplugin5_proto_msgTypes[41]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *PlanAction) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*PlanAction) ProtoMessage() {}
+
+func (x *PlanAction) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin5_proto_msgTypes[41]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use PlanAction.ProtoReflect.Descriptor instead.
+func (*PlanAction) Descriptor() ([]byte, []int) {
+ return file_tfplugin5_proto_rawDescGZIP(), []int{41}
+}
+
+type InvokeAction struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *InvokeAction) Reset() {
+ *x = InvokeAction{}
+ mi := &file_tfplugin5_proto_msgTypes[42]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *InvokeAction) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*InvokeAction) ProtoMessage() {}
+
+func (x *InvokeAction) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin5_proto_msgTypes[42]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use InvokeAction.ProtoReflect.Descriptor instead.
+func (*InvokeAction) Descriptor() ([]byte, []int) {
+ return file_tfplugin5_proto_rawDescGZIP(), []int{42}
+}
+
+type AttributePath_Step struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // Types that are valid to be assigned to Selector:
+ //
+ // *AttributePath_Step_AttributeName
+ // *AttributePath_Step_ElementKeyString
+ // *AttributePath_Step_ElementKeyInt
+ Selector isAttributePath_Step_Selector `protobuf_oneof:"selector"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *AttributePath_Step) Reset() {
+ *x = AttributePath_Step{}
+ mi := &file_tfplugin5_proto_msgTypes[43]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *AttributePath_Step) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*AttributePath_Step) ProtoMessage() {}
+
+func (x *AttributePath_Step) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin5_proto_msgTypes[43]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use AttributePath_Step.ProtoReflect.Descriptor instead.
+func (*AttributePath_Step) Descriptor() ([]byte, []int) {
+ return file_tfplugin5_proto_rawDescGZIP(), []int{3, 0}
+}
+
+func (x *AttributePath_Step) GetSelector() isAttributePath_Step_Selector {
+ if x != nil {
+ return x.Selector
+ }
+ return nil
+}
+
+func (x *AttributePath_Step) GetAttributeName() string {
+ if x != nil {
+ if x, ok := x.Selector.(*AttributePath_Step_AttributeName); ok {
+ return x.AttributeName
+ }
+ }
+ return ""
+}
+
+func (x *AttributePath_Step) GetElementKeyString() string {
+ if x != nil {
+ if x, ok := x.Selector.(*AttributePath_Step_ElementKeyString); ok {
+ return x.ElementKeyString
+ }
+ }
+ return ""
+}
+
+func (x *AttributePath_Step) GetElementKeyInt() int64 {
+ if x != nil {
+ if x, ok := x.Selector.(*AttributePath_Step_ElementKeyInt); ok {
+ return x.ElementKeyInt
+ }
+ }
+ return 0
+}
+
+type isAttributePath_Step_Selector interface {
+ isAttributePath_Step_Selector()
+}
+
+type AttributePath_Step_AttributeName struct {
+ // Set "attribute_name" to represent looking up an attribute
+ // in the current object value.
+ AttributeName string `protobuf:"bytes,1,opt,name=attribute_name,json=attributeName,proto3,oneof"`
+}
+
+type AttributePath_Step_ElementKeyString struct {
+ // Set "element_key_*" to represent looking up an element in
+ // an indexable collection type.
+ ElementKeyString string `protobuf:"bytes,2,opt,name=element_key_string,json=elementKeyString,proto3,oneof"`
+}
+
+type AttributePath_Step_ElementKeyInt struct {
+ ElementKeyInt int64 `protobuf:"varint,3,opt,name=element_key_int,json=elementKeyInt,proto3,oneof"`
+}
+
+func (*AttributePath_Step_AttributeName) isAttributePath_Step_Selector() {}
+
+func (*AttributePath_Step_ElementKeyString) isAttributePath_Step_Selector() {}
+
+func (*AttributePath_Step_ElementKeyInt) isAttributePath_Step_Selector() {}
+
+type Stop_Request struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *Stop_Request) Reset() {
+ *x = Stop_Request{}
+ mi := &file_tfplugin5_proto_msgTypes[44]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *Stop_Request) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Stop_Request) ProtoMessage() {}
+
+func (x *Stop_Request) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin5_proto_msgTypes[44]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Stop_Request.ProtoReflect.Descriptor instead.
+func (*Stop_Request) Descriptor() ([]byte, []int) {
+ return file_tfplugin5_proto_rawDescGZIP(), []int{4, 0}
+}
+
+type Stop_Response struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Error string `protobuf:"bytes,1,opt,name=Error,proto3" json:"Error,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *Stop_Response) Reset() {
+ *x = Stop_Response{}
+ mi := &file_tfplugin5_proto_msgTypes[45]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *Stop_Response) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Stop_Response) ProtoMessage() {}
+
+func (x *Stop_Response) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin5_proto_msgTypes[45]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Stop_Response.ProtoReflect.Descriptor instead.
+func (*Stop_Response) Descriptor() ([]byte, []int) {
+ return file_tfplugin5_proto_rawDescGZIP(), []int{4, 1}
+}
+
+func (x *Stop_Response) GetError() string {
+ if x != nil {
+ return x.Error
+ }
+ return ""
+}
+
+type Schema_Block struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Version int64 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"`
+ Attributes []*Schema_Attribute `protobuf:"bytes,2,rep,name=attributes,proto3" json:"attributes,omitempty"`
+ BlockTypes []*Schema_NestedBlock `protobuf:"bytes,3,rep,name=block_types,json=blockTypes,proto3" json:"block_types,omitempty"`
+ Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"`
+ DescriptionKind StringKind `protobuf:"varint,5,opt,name=description_kind,json=descriptionKind,proto3,enum=tfplugin5.StringKind" json:"description_kind,omitempty"`
+ Deprecated bool `protobuf:"varint,6,opt,name=deprecated,proto3" json:"deprecated,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *Schema_Block) Reset() {
+ *x = Schema_Block{}
+ mi := &file_tfplugin5_proto_msgTypes[47]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *Schema_Block) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Schema_Block) ProtoMessage() {}
+
+func (x *Schema_Block) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin5_proto_msgTypes[47]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Schema_Block.ProtoReflect.Descriptor instead.
+func (*Schema_Block) Descriptor() ([]byte, []int) {
+ return file_tfplugin5_proto_rawDescGZIP(), []int{6, 0}
+}
+
+func (x *Schema_Block) GetVersion() int64 {
+ if x != nil {
+ return x.Version
+ }
+ return 0
+}
+
+func (x *Schema_Block) GetAttributes() []*Schema_Attribute {
+ if x != nil {
+ return x.Attributes
+ }
+ return nil
+}
+
+func (x *Schema_Block) GetBlockTypes() []*Schema_NestedBlock {
+ if x != nil {
+ return x.BlockTypes
+ }
+ return nil
+}
+
+func (x *Schema_Block) GetDescription() string {
+ if x != nil {
+ return x.Description
+ }
+ return ""
+}
+
+func (x *Schema_Block) GetDescriptionKind() StringKind {
+ if x != nil {
+ return x.DescriptionKind
+ }
+ return StringKind_PLAIN
+}
+
+func (x *Schema_Block) GetDeprecated() bool {
+ if x != nil {
+ return x.Deprecated
+ }
+ return false
+}
+
+type Schema_Attribute struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ Type []byte `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
+ Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
+ Required bool `protobuf:"varint,4,opt,name=required,proto3" json:"required,omitempty"`
+ Optional bool `protobuf:"varint,5,opt,name=optional,proto3" json:"optional,omitempty"`
+ Computed bool `protobuf:"varint,6,opt,name=computed,proto3" json:"computed,omitempty"`
+ Sensitive bool `protobuf:"varint,7,opt,name=sensitive,proto3" json:"sensitive,omitempty"`
+ DescriptionKind StringKind `protobuf:"varint,8,opt,name=description_kind,json=descriptionKind,proto3,enum=tfplugin5.StringKind" json:"description_kind,omitempty"`
+ Deprecated bool `protobuf:"varint,9,opt,name=deprecated,proto3" json:"deprecated,omitempty"`
+ // write_only indicates that the attribute value will be provided via
+ // configuration and must be omitted from state. write_only must be
+ // combined with optional or required, and is only valid for managed
+ // resource schemas.
+ WriteOnly bool `protobuf:"varint,10,opt,name=write_only,json=writeOnly,proto3" json:"write_only,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *Schema_Attribute) Reset() {
+ *x = Schema_Attribute{}
+ mi := &file_tfplugin5_proto_msgTypes[48]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *Schema_Attribute) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Schema_Attribute) ProtoMessage() {}
+
+func (x *Schema_Attribute) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin5_proto_msgTypes[48]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Schema_Attribute.ProtoReflect.Descriptor instead.
+func (*Schema_Attribute) Descriptor() ([]byte, []int) {
+ return file_tfplugin5_proto_rawDescGZIP(), []int{6, 1}
+}
+
+func (x *Schema_Attribute) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *Schema_Attribute) GetType() []byte {
+ if x != nil {
+ return x.Type
+ }
+ return nil
+}
+
+func (x *Schema_Attribute) GetDescription() string {
+ if x != nil {
+ return x.Description
+ }
+ return ""
+}
+
+func (x *Schema_Attribute) GetRequired() bool {
+ if x != nil {
+ return x.Required
+ }
+ return false
+}
+
+func (x *Schema_Attribute) GetOptional() bool {
+ if x != nil {
+ return x.Optional
+ }
+ return false
+}
+
+func (x *Schema_Attribute) GetComputed() bool {
+ if x != nil {
+ return x.Computed
+ }
+ return false
+}
+
+func (x *Schema_Attribute) GetSensitive() bool {
+ if x != nil {
+ return x.Sensitive
+ }
+ return false
+}
+
+func (x *Schema_Attribute) GetDescriptionKind() StringKind {
+ if x != nil {
+ return x.DescriptionKind
+ }
+ return StringKind_PLAIN
+}
+
+func (x *Schema_Attribute) GetDeprecated() bool {
+ if x != nil {
+ return x.Deprecated
+ }
+ return false
+}
+
+func (x *Schema_Attribute) GetWriteOnly() bool {
+ if x != nil {
+ return x.WriteOnly
+ }
+ return false
+}
+
+type Schema_NestedBlock struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ TypeName string `protobuf:"bytes,1,opt,name=type_name,json=typeName,proto3" json:"type_name,omitempty"`
+ Block *Schema_Block `protobuf:"bytes,2,opt,name=block,proto3" json:"block,omitempty"`
+ Nesting Schema_NestedBlock_NestingMode `protobuf:"varint,3,opt,name=nesting,proto3,enum=tfplugin5.Schema_NestedBlock_NestingMode" json:"nesting,omitempty"`
+ MinItems int64 `protobuf:"varint,4,opt,name=min_items,json=minItems,proto3" json:"min_items,omitempty"`
+ MaxItems int64 `protobuf:"varint,5,opt,name=max_items,json=maxItems,proto3" json:"max_items,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *Schema_NestedBlock) Reset() {
+ *x = Schema_NestedBlock{}
+ mi := &file_tfplugin5_proto_msgTypes[49]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *Schema_NestedBlock) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Schema_NestedBlock) ProtoMessage() {}
+
+func (x *Schema_NestedBlock) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin5_proto_msgTypes[49]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Schema_NestedBlock.ProtoReflect.Descriptor instead.
+func (*Schema_NestedBlock) Descriptor() ([]byte, []int) {
+ return file_tfplugin5_proto_rawDescGZIP(), []int{6, 2}
+}
+
+func (x *Schema_NestedBlock) GetTypeName() string {
+ if x != nil {
+ return x.TypeName
+ }
+ return ""
+}
+
+func (x *Schema_NestedBlock) GetBlock() *Schema_Block {
+ if x != nil {
+ return x.Block
+ }
+ return nil
+}
+
+func (x *Schema_NestedBlock) GetNesting() Schema_NestedBlock_NestingMode {
+ if x != nil {
+ return x.Nesting
+ }
+ return Schema_NestedBlock_INVALID
+}
+
+func (x *Schema_NestedBlock) GetMinItems() int64 {
+ if x != nil {
+ return x.MinItems
+ }
+ return 0
+}
+
+func (x *Schema_NestedBlock) GetMaxItems() int64 {
+ if x != nil {
+ return x.MaxItems
+ }
+ return 0
+}
+
+// IdentityAttribute represents one value of data within resource identity.
+// These are always used in resource identity comparisons.
+type ResourceIdentitySchema_IdentityAttribute struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // name is the identity attribute name
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ // type is the identity attribute type
+ Type []byte `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
+ // required_for_import when enabled signifies that this attribute must be
+ // defined for ImportResourceState to complete successfully
+ RequiredForImport bool `protobuf:"varint,3,opt,name=required_for_import,json=requiredForImport,proto3" json:"required_for_import,omitempty"`
+ // optional_for_import when enabled signifies that this attribute is not
+ // required for ImportResourceState, because it can be supplied by the
+ // provider. It is still possible to supply this attribute during import.
+ OptionalForImport bool `protobuf:"varint,4,opt,name=optional_for_import,json=optionalForImport,proto3" json:"optional_for_import,omitempty"`
+ // description is a human-readable description of the attribute in Markdown
+ Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *ResourceIdentitySchema_IdentityAttribute) Reset() {
+ *x = ResourceIdentitySchema_IdentityAttribute{}
+ mi := &file_tfplugin5_proto_msgTypes[50]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ResourceIdentitySchema_IdentityAttribute) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ResourceIdentitySchema_IdentityAttribute) ProtoMessage() {}
+
+func (x *ResourceIdentitySchema_IdentityAttribute) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin5_proto_msgTypes[50]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ResourceIdentitySchema_IdentityAttribute.ProtoReflect.Descriptor instead.
+func (*ResourceIdentitySchema_IdentityAttribute) Descriptor() ([]byte, []int) {
+ return file_tfplugin5_proto_rawDescGZIP(), []int{7, 0}
+}
+
+func (x *ResourceIdentitySchema_IdentityAttribute) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *ResourceIdentitySchema_IdentityAttribute) GetType() []byte {
+ if x != nil {
+ return x.Type
+ }
+ return nil
+}
+
+func (x *ResourceIdentitySchema_IdentityAttribute) GetRequiredForImport() bool {
+ if x != nil {
+ return x.RequiredForImport
+ }
+ return false
+}
+
+func (x *ResourceIdentitySchema_IdentityAttribute) GetOptionalForImport() bool {
+ if x != nil {
+ return x.OptionalForImport
+ }
+ return false
+}
+
+func (x *ResourceIdentitySchema_IdentityAttribute) GetDescription() string {
+ if x != nil {
+ return x.Description
+ }
+ return ""
+}
+
+type Function_Parameter struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // name is the human-readable display name for the parameter.
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ // type is the type constraint for the parameter.
+ Type []byte `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
+ // allow_null_value when enabled denotes that a null argument value can
+ // be passed to the provider. When disabled, Terraform returns an error
+ // if the argument value is null.
+ AllowNullValue bool `protobuf:"varint,3,opt,name=allow_null_value,json=allowNullValue,proto3" json:"allow_null_value,omitempty"`
+ // allow_unknown_values when enabled denotes that only wholly known
+ // argument values will be passed to the provider. When disabled,
+ // Terraform skips the function call entirely and assumes an unknown
+ // value result from the function.
+ AllowUnknownValues bool `protobuf:"varint,4,opt,name=allow_unknown_values,json=allowUnknownValues,proto3" json:"allow_unknown_values,omitempty"`
+ // description is human-readable documentation for the parameter.
+ Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"`
+ // description_kind is the formatting of the description.
+ DescriptionKind StringKind `protobuf:"varint,6,opt,name=description_kind,json=descriptionKind,proto3,enum=tfplugin5.StringKind" json:"description_kind,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *Function_Parameter) Reset() {
+ *x = Function_Parameter{}
+ mi := &file_tfplugin5_proto_msgTypes[51]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *Function_Parameter) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Function_Parameter) ProtoMessage() {}
+
+func (x *Function_Parameter) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin5_proto_msgTypes[51]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Function_Parameter.ProtoReflect.Descriptor instead.
+func (*Function_Parameter) Descriptor() ([]byte, []int) {
+ return file_tfplugin5_proto_rawDescGZIP(), []int{11, 0}
+}
+
+func (x *Function_Parameter) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *Function_Parameter) GetType() []byte {
+ if x != nil {
+ return x.Type
+ }
+ return nil
+}
+
+func (x *Function_Parameter) GetAllowNullValue() bool {
+ if x != nil {
+ return x.AllowNullValue
+ }
+ return false
+}
+
+func (x *Function_Parameter) GetAllowUnknownValues() bool {
+ if x != nil {
+ return x.AllowUnknownValues
+ }
+ return false
+}
+
+func (x *Function_Parameter) GetDescription() string {
+ if x != nil {
+ return x.Description
+ }
+ return ""
+}
+
+func (x *Function_Parameter) GetDescriptionKind() StringKind {
+ if x != nil {
+ return x.DescriptionKind
+ }
+ return StringKind_PLAIN
+}
+
+type Function_Return struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // type is the type constraint for the function result.
+ Type []byte `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *Function_Return) Reset() {
+ *x = Function_Return{}
+ mi := &file_tfplugin5_proto_msgTypes[52]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *Function_Return) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Function_Return) ProtoMessage() {}
+
+func (x *Function_Return) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin5_proto_msgTypes[52]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Function_Return.ProtoReflect.Descriptor instead.
+func (*Function_Return) Descriptor() ([]byte, []int) {
+ return file_tfplugin5_proto_rawDescGZIP(), []int{11, 1}
+}
+
+func (x *Function_Return) GetType() []byte {
+ if x != nil {
+ return x.Type
+ }
+ return nil
+}
+
+type GetMetadata_Request struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *GetMetadata_Request) Reset() {
+ *x = GetMetadata_Request{}
+ mi := &file_tfplugin5_proto_msgTypes[53]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *GetMetadata_Request) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetMetadata_Request) ProtoMessage() {}
+
+func (x *GetMetadata_Request) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin5_proto_msgTypes[53]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetMetadata_Request.ProtoReflect.Descriptor instead.
+func (*GetMetadata_Request) Descriptor() ([]byte, []int) {
+ return file_tfplugin5_proto_rawDescGZIP(), []int{14, 0}
+}
+
+type GetMetadata_Response struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ ServerCapabilities *ServerCapabilities `protobuf:"bytes,1,opt,name=server_capabilities,json=serverCapabilities,proto3" json:"server_capabilities,omitempty"`
+ Diagnostics []*Diagnostic `protobuf:"bytes,2,rep,name=diagnostics,proto3" json:"diagnostics,omitempty"`
+ DataSources []*GetMetadata_DataSourceMetadata `protobuf:"bytes,3,rep,name=data_sources,json=dataSources,proto3" json:"data_sources,omitempty"`
+ Resources []*GetMetadata_ResourceMetadata `protobuf:"bytes,4,rep,name=resources,proto3" json:"resources,omitempty"`
+ // functions returns metadata for any functions.
+ Functions []*GetMetadata_FunctionMetadata `protobuf:"bytes,5,rep,name=functions,proto3" json:"functions,omitempty"`
+ EphemeralResources []*GetMetadata_EphemeralResourceMetadata `protobuf:"bytes,6,rep,name=ephemeral_resources,json=ephemeralResources,proto3" json:"ephemeral_resources,omitempty"`
+ ListResources []*GetMetadata_ListResourceMetadata `protobuf:"bytes,7,rep,name=list_resources,json=listResources,proto3" json:"list_resources,omitempty"`
+ Actions []*GetMetadata_ActionMetadata `protobuf:"bytes,9,rep,name=actions,proto3" json:"actions,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *GetMetadata_Response) Reset() {
+ *x = GetMetadata_Response{}
+ mi := &file_tfplugin5_proto_msgTypes[54]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *GetMetadata_Response) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetMetadata_Response) ProtoMessage() {}
+
+func (x *GetMetadata_Response) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin5_proto_msgTypes[54]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetMetadata_Response.ProtoReflect.Descriptor instead.
+func (*GetMetadata_Response) Descriptor() ([]byte, []int) {
+ return file_tfplugin5_proto_rawDescGZIP(), []int{14, 1}
+}
+
+func (x *GetMetadata_Response) GetServerCapabilities() *ServerCapabilities {
+ if x != nil {
+ return x.ServerCapabilities
+ }
+ return nil
+}
+
+func (x *GetMetadata_Response) GetDiagnostics() []*Diagnostic {
+ if x != nil {
+ return x.Diagnostics
+ }
+ return nil
+}
+
+func (x *GetMetadata_Response) GetDataSources() []*GetMetadata_DataSourceMetadata {
+ if x != nil {
+ return x.DataSources
+ }
+ return nil
+}
+
+func (x *GetMetadata_Response) GetResources() []*GetMetadata_ResourceMetadata {
+ if x != nil {
+ return x.Resources
+ }
+ return nil
+}
+
+func (x *GetMetadata_Response) GetFunctions() []*GetMetadata_FunctionMetadata {
+ if x != nil {
+ return x.Functions
+ }
+ return nil
+}
+
+func (x *GetMetadata_Response) GetEphemeralResources() []*GetMetadata_EphemeralResourceMetadata {
+ if x != nil {
+ return x.EphemeralResources
+ }
+ return nil
+}
+
+func (x *GetMetadata_Response) GetListResources() []*GetMetadata_ListResourceMetadata {
+ if x != nil {
+ return x.ListResources
+ }
+ return nil
+}
+
+func (x *GetMetadata_Response) GetActions() []*GetMetadata_ActionMetadata {
+ if x != nil {
+ return x.Actions
+ }
+ return nil
+}
+
+type GetMetadata_FunctionMetadata struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // name is the function name.
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *GetMetadata_FunctionMetadata) Reset() {
+ *x = GetMetadata_FunctionMetadata{}
+ mi := &file_tfplugin5_proto_msgTypes[55]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *GetMetadata_FunctionMetadata) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetMetadata_FunctionMetadata) ProtoMessage() {}
+
+func (x *GetMetadata_FunctionMetadata) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin5_proto_msgTypes[55]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetMetadata_FunctionMetadata.ProtoReflect.Descriptor instead.
+func (*GetMetadata_FunctionMetadata) Descriptor() ([]byte, []int) {
+ return file_tfplugin5_proto_rawDescGZIP(), []int{14, 2}
+}
+
+func (x *GetMetadata_FunctionMetadata) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+type GetMetadata_DataSourceMetadata struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ TypeName string `protobuf:"bytes,1,opt,name=type_name,json=typeName,proto3" json:"type_name,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *GetMetadata_DataSourceMetadata) Reset() {
+ *x = GetMetadata_DataSourceMetadata{}
+ mi := &file_tfplugin5_proto_msgTypes[56]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *GetMetadata_DataSourceMetadata) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetMetadata_DataSourceMetadata) ProtoMessage() {}
+
+func (x *GetMetadata_DataSourceMetadata) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin5_proto_msgTypes[56]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetMetadata_DataSourceMetadata.ProtoReflect.Descriptor instead.
+func (*GetMetadata_DataSourceMetadata) Descriptor() ([]byte, []int) {
+ return file_tfplugin5_proto_rawDescGZIP(), []int{14, 3}
+}
+
+func (x *GetMetadata_DataSourceMetadata) GetTypeName() string {
+ if x != nil {
+ return x.TypeName
+ }
+ return ""
+}
+
+type GetMetadata_ResourceMetadata struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ TypeName string `protobuf:"bytes,1,opt,name=type_name,json=typeName,proto3" json:"type_name,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *GetMetadata_ResourceMetadata) Reset() {
+ *x = GetMetadata_ResourceMetadata{}
+ mi := &file_tfplugin5_proto_msgTypes[57]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *GetMetadata_ResourceMetadata) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetMetadata_ResourceMetadata) ProtoMessage() {}
+
+func (x *GetMetadata_ResourceMetadata) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin5_proto_msgTypes[57]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetMetadata_ResourceMetadata.ProtoReflect.Descriptor instead.
+func (*GetMetadata_ResourceMetadata) Descriptor() ([]byte, []int) {
+ return file_tfplugin5_proto_rawDescGZIP(), []int{14, 4}
+}
+
+func (x *GetMetadata_ResourceMetadata) GetTypeName() string {
+ if x != nil {
+ return x.TypeName
+ }
+ return ""
+}
+
+type GetMetadata_EphemeralResourceMetadata struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ TypeName string `protobuf:"bytes,1,opt,name=type_name,json=typeName,proto3" json:"type_name,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *GetMetadata_EphemeralResourceMetadata) Reset() {
+ *x = GetMetadata_EphemeralResourceMetadata{}
+ mi := &file_tfplugin5_proto_msgTypes[58]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *GetMetadata_EphemeralResourceMetadata) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetMetadata_EphemeralResourceMetadata) ProtoMessage() {}
+
+func (x *GetMetadata_EphemeralResourceMetadata) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin5_proto_msgTypes[58]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetMetadata_EphemeralResourceMetadata.ProtoReflect.Descriptor instead.
+func (*GetMetadata_EphemeralResourceMetadata) Descriptor() ([]byte, []int) {
+ return file_tfplugin5_proto_rawDescGZIP(), []int{14, 5}
+}
+
+func (x *GetMetadata_EphemeralResourceMetadata) GetTypeName() string {
+ if x != nil {
+ return x.TypeName
+ }
+ return ""
+}
+
+type GetMetadata_ListResourceMetadata struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ TypeName string `protobuf:"bytes,1,opt,name=type_name,json=typeName,proto3" json:"type_name,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *GetMetadata_ListResourceMetadata) Reset() {
+ *x = GetMetadata_ListResourceMetadata{}
+ mi := &file_tfplugin5_proto_msgTypes[59]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *GetMetadata_ListResourceMetadata) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetMetadata_ListResourceMetadata) ProtoMessage() {}
+
+func (x *GetMetadata_ListResourceMetadata) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin5_proto_msgTypes[59]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetMetadata_ListResourceMetadata.ProtoReflect.Descriptor instead.
+func (*GetMetadata_ListResourceMetadata) Descriptor() ([]byte, []int) {
+ return file_tfplugin5_proto_rawDescGZIP(), []int{14, 6}
+}
+
+func (x *GetMetadata_ListResourceMetadata) GetTypeName() string {
+ if x != nil {
+ return x.TypeName
+ }
+ return ""
+}
+
+type GetMetadata_ActionMetadata struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ TypeName string `protobuf:"bytes,1,opt,name=type_name,json=typeName,proto3" json:"type_name,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *GetMetadata_ActionMetadata) Reset() {
+ *x = GetMetadata_ActionMetadata{}
+ mi := &file_tfplugin5_proto_msgTypes[60]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *GetMetadata_ActionMetadata) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetMetadata_ActionMetadata) ProtoMessage() {}
+
+func (x *GetMetadata_ActionMetadata) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin5_proto_msgTypes[60]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetMetadata_ActionMetadata.ProtoReflect.Descriptor instead.
+func (*GetMetadata_ActionMetadata) Descriptor() ([]byte, []int) {
+ return file_tfplugin5_proto_rawDescGZIP(), []int{14, 7}
+}
+
+func (x *GetMetadata_ActionMetadata) GetTypeName() string {
+ if x != nil {
+ return x.TypeName
+ }
+ return ""
+}
+
+type GetProviderSchema_Request struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *GetProviderSchema_Request) Reset() {
+ *x = GetProviderSchema_Request{}
+ mi := &file_tfplugin5_proto_msgTypes[61]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *GetProviderSchema_Request) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetProviderSchema_Request) ProtoMessage() {}
+
+func (x *GetProviderSchema_Request) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin5_proto_msgTypes[61]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetProviderSchema_Request.ProtoReflect.Descriptor instead.
+func (*GetProviderSchema_Request) Descriptor() ([]byte, []int) {
+ return file_tfplugin5_proto_rawDescGZIP(), []int{15, 0}
+}
+
+type GetProviderSchema_Response struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Provider *Schema `protobuf:"bytes,1,opt,name=provider,proto3" json:"provider,omitempty"`
+ ResourceSchemas map[string]*Schema `protobuf:"bytes,2,rep,name=resource_schemas,json=resourceSchemas,proto3" json:"resource_schemas,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
+ DataSourceSchemas map[string]*Schema `protobuf:"bytes,3,rep,name=data_source_schemas,json=dataSourceSchemas,proto3" json:"data_source_schemas,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
+ Diagnostics []*Diagnostic `protobuf:"bytes,4,rep,name=diagnostics,proto3" json:"diagnostics,omitempty"`
+ ProviderMeta *Schema `protobuf:"bytes,5,opt,name=provider_meta,json=providerMeta,proto3" json:"provider_meta,omitempty"`
+ ServerCapabilities *ServerCapabilities `protobuf:"bytes,6,opt,name=server_capabilities,json=serverCapabilities,proto3" json:"server_capabilities,omitempty"`
+ // functions is a mapping of function names to definitions.
+ Functions map[string]*Function `protobuf:"bytes,7,rep,name=functions,proto3" json:"functions,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
+ EphemeralResourceSchemas map[string]*Schema `protobuf:"bytes,8,rep,name=ephemeral_resource_schemas,json=ephemeralResourceSchemas,proto3" json:"ephemeral_resource_schemas,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
+ ListResourceSchemas map[string]*Schema `protobuf:"bytes,9,rep,name=list_resource_schemas,json=listResourceSchemas,proto3" json:"list_resource_schemas,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
+ ActionSchemas map[string]*ActionSchema `protobuf:"bytes,11,rep,name=action_schemas,json=actionSchemas,proto3" json:"action_schemas,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *GetProviderSchema_Response) Reset() {
+ *x = GetProviderSchema_Response{}
+ mi := &file_tfplugin5_proto_msgTypes[62]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *GetProviderSchema_Response) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetProviderSchema_Response) ProtoMessage() {}
+
+func (x *GetProviderSchema_Response) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin5_proto_msgTypes[62]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetProviderSchema_Response.ProtoReflect.Descriptor instead.
+func (*GetProviderSchema_Response) Descriptor() ([]byte, []int) {
+ return file_tfplugin5_proto_rawDescGZIP(), []int{15, 1}
+}
+
+func (x *GetProviderSchema_Response) GetProvider() *Schema {
+ if x != nil {
+ return x.Provider
+ }
+ return nil
+}
+
+func (x *GetProviderSchema_Response) GetResourceSchemas() map[string]*Schema {
+ if x != nil {
+ return x.ResourceSchemas
+ }
+ return nil
+}
+
+func (x *GetProviderSchema_Response) GetDataSourceSchemas() map[string]*Schema {
+ if x != nil {
+ return x.DataSourceSchemas
+ }
+ return nil
+}
+
+func (x *GetProviderSchema_Response) GetDiagnostics() []*Diagnostic {
+ if x != nil {
+ return x.Diagnostics
+ }
+ return nil
+}
+
+func (x *GetProviderSchema_Response) GetProviderMeta() *Schema {
+ if x != nil {
+ return x.ProviderMeta
+ }
+ return nil
+}
+
+func (x *GetProviderSchema_Response) GetServerCapabilities() *ServerCapabilities {
+ if x != nil {
+ return x.ServerCapabilities
+ }
+ return nil
+}
+
+func (x *GetProviderSchema_Response) GetFunctions() map[string]*Function {
+ if x != nil {
+ return x.Functions
+ }
+ return nil
+}
+
+func (x *GetProviderSchema_Response) GetEphemeralResourceSchemas() map[string]*Schema {
+ if x != nil {
+ return x.EphemeralResourceSchemas
+ }
+ return nil
+}
+
+func (x *GetProviderSchema_Response) GetListResourceSchemas() map[string]*Schema {
+ if x != nil {
+ return x.ListResourceSchemas
+ }
+ return nil
+}
+
+func (x *GetProviderSchema_Response) GetActionSchemas() map[string]*ActionSchema {
+ if x != nil {
+ return x.ActionSchemas
+ }
+ return nil
+}
+
+type PrepareProviderConfig_Request struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Config *DynamicValue `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *PrepareProviderConfig_Request) Reset() {
+ *x = PrepareProviderConfig_Request{}
+ mi := &file_tfplugin5_proto_msgTypes[69]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *PrepareProviderConfig_Request) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*PrepareProviderConfig_Request) ProtoMessage() {}
+
+func (x *PrepareProviderConfig_Request) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin5_proto_msgTypes[69]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use PrepareProviderConfig_Request.ProtoReflect.Descriptor instead.
+func (*PrepareProviderConfig_Request) Descriptor() ([]byte, []int) {
+ return file_tfplugin5_proto_rawDescGZIP(), []int{16, 0}
+}
+
+func (x *PrepareProviderConfig_Request) GetConfig() *DynamicValue {
+ if x != nil {
+ return x.Config
+ }
+ return nil
+}
+
+type PrepareProviderConfig_Response struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ PreparedConfig *DynamicValue `protobuf:"bytes,1,opt,name=prepared_config,json=preparedConfig,proto3" json:"prepared_config,omitempty"`
+ Diagnostics []*Diagnostic `protobuf:"bytes,2,rep,name=diagnostics,proto3" json:"diagnostics,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *PrepareProviderConfig_Response) Reset() {
+ *x = PrepareProviderConfig_Response{}
+ mi := &file_tfplugin5_proto_msgTypes[70]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *PrepareProviderConfig_Response) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*PrepareProviderConfig_Response) ProtoMessage() {}
+
+func (x *PrepareProviderConfig_Response) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin5_proto_msgTypes[70]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use PrepareProviderConfig_Response.ProtoReflect.Descriptor instead.
+func (*PrepareProviderConfig_Response) Descriptor() ([]byte, []int) {
+ return file_tfplugin5_proto_rawDescGZIP(), []int{16, 1}
+}
+
+func (x *PrepareProviderConfig_Response) GetPreparedConfig() *DynamicValue {
+ if x != nil {
+ return x.PreparedConfig
+ }
+ return nil
+}
+
+func (x *PrepareProviderConfig_Response) GetDiagnostics() []*Diagnostic {
+ if x != nil {
+ return x.Diagnostics
+ }
+ return nil
+}
+
+// Request is the message that is sent to the provider during the
+// UpgradeResourceState RPC.
+//
+// This message intentionally does not include configuration data as any
+// configuration-based or configuration-conditional changes should occur
+// during the PlanResourceChange RPC. Additionally, the configuration is
+// not guaranteed to exist (in the case of resource destruction), be wholly
+// known, nor match the given prior state, which could lead to unexpected
+// provider behaviors for practitioners.
+type UpgradeResourceState_Request struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ TypeName string `protobuf:"bytes,1,opt,name=type_name,json=typeName,proto3" json:"type_name,omitempty"`
+ // version is the schema_version number recorded in the state file
+ Version int64 `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"`
+ // raw_state is the raw states as stored for the resource. Core does
+ // not have access to the schema of prior_version, so it's the
+ // provider's responsibility to interpret this value using the
+ // appropriate older schema. The raw_state will be the json encoded
+ // state, or a legacy flat-mapped format.
+ RawState *RawState `protobuf:"bytes,3,opt,name=raw_state,json=rawState,proto3" json:"raw_state,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *UpgradeResourceState_Request) Reset() {
+ *x = UpgradeResourceState_Request{}
+ mi := &file_tfplugin5_proto_msgTypes[71]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *UpgradeResourceState_Request) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UpgradeResourceState_Request) ProtoMessage() {}
+
+func (x *UpgradeResourceState_Request) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin5_proto_msgTypes[71]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use UpgradeResourceState_Request.ProtoReflect.Descriptor instead.
+func (*UpgradeResourceState_Request) Descriptor() ([]byte, []int) {
+ return file_tfplugin5_proto_rawDescGZIP(), []int{17, 0}
+}
+
+func (x *UpgradeResourceState_Request) GetTypeName() string {
+ if x != nil {
+ return x.TypeName
+ }
+ return ""
+}
+
+func (x *UpgradeResourceState_Request) GetVersion() int64 {
+ if x != nil {
+ return x.Version
+ }
return 0
}
-func (x *Schema_Block) GetAttributes() []*Schema_Attribute {
+func (x *UpgradeResourceState_Request) GetRawState() *RawState {
+ if x != nil {
+ return x.RawState
+ }
+ return nil
+}
+
+type UpgradeResourceState_Response struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // new_state is a msgpack-encoded data structure that, when interpreted with
+ // the _current_ schema for this resource type, is functionally equivalent to
+ // that which was given in prior_state_raw.
+ UpgradedState *DynamicValue `protobuf:"bytes,1,opt,name=upgraded_state,json=upgradedState,proto3" json:"upgraded_state,omitempty"`
+ // diagnostics describes any errors encountered during migration that could not
+ // be safely resolved, and warnings about any possibly-risky assumptions made
+ // in the upgrade process.
+ Diagnostics []*Diagnostic `protobuf:"bytes,2,rep,name=diagnostics,proto3" json:"diagnostics,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *UpgradeResourceState_Response) Reset() {
+ *x = UpgradeResourceState_Response{}
+ mi := &file_tfplugin5_proto_msgTypes[72]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *UpgradeResourceState_Response) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UpgradeResourceState_Response) ProtoMessage() {}
+
+func (x *UpgradeResourceState_Response) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin5_proto_msgTypes[72]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use UpgradeResourceState_Response.ProtoReflect.Descriptor instead.
+func (*UpgradeResourceState_Response) Descriptor() ([]byte, []int) {
+ return file_tfplugin5_proto_rawDescGZIP(), []int{17, 1}
+}
+
+func (x *UpgradeResourceState_Response) GetUpgradedState() *DynamicValue {
+ if x != nil {
+ return x.UpgradedState
+ }
+ return nil
+}
+
+func (x *UpgradeResourceState_Response) GetDiagnostics() []*Diagnostic {
+ if x != nil {
+ return x.Diagnostics
+ }
+ return nil
+}
+
+type ValidateResourceTypeConfig_Request struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ TypeName string `protobuf:"bytes,1,opt,name=type_name,json=typeName,proto3" json:"type_name,omitempty"`
+ Config *DynamicValue `protobuf:"bytes,2,opt,name=config,proto3" json:"config,omitempty"`
+ ClientCapabilities *ClientCapabilities `protobuf:"bytes,3,opt,name=client_capabilities,json=clientCapabilities,proto3" json:"client_capabilities,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *ValidateResourceTypeConfig_Request) Reset() {
+ *x = ValidateResourceTypeConfig_Request{}
+ mi := &file_tfplugin5_proto_msgTypes[73]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ValidateResourceTypeConfig_Request) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ValidateResourceTypeConfig_Request) ProtoMessage() {}
+
+func (x *ValidateResourceTypeConfig_Request) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin5_proto_msgTypes[73]
if x != nil {
- return x.Attributes
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ValidateResourceTypeConfig_Request.ProtoReflect.Descriptor instead.
+func (*ValidateResourceTypeConfig_Request) Descriptor() ([]byte, []int) {
+ return file_tfplugin5_proto_rawDescGZIP(), []int{18, 0}
+}
+
+func (x *ValidateResourceTypeConfig_Request) GetTypeName() string {
+ if x != nil {
+ return x.TypeName
+ }
+ return ""
+}
+
+func (x *ValidateResourceTypeConfig_Request) GetConfig() *DynamicValue {
+ if x != nil {
+ return x.Config
}
return nil
}
-func (x *Schema_Block) GetBlockTypes() []*Schema_NestedBlock {
+func (x *ValidateResourceTypeConfig_Request) GetClientCapabilities() *ClientCapabilities {
if x != nil {
- return x.BlockTypes
+ return x.ClientCapabilities
}
return nil
}
-func (x *Schema_Block) GetDescription() string {
+type ValidateResourceTypeConfig_Response struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Diagnostics []*Diagnostic `protobuf:"bytes,1,rep,name=diagnostics,proto3" json:"diagnostics,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *ValidateResourceTypeConfig_Response) Reset() {
+ *x = ValidateResourceTypeConfig_Response{}
+ mi := &file_tfplugin5_proto_msgTypes[74]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ValidateResourceTypeConfig_Response) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ValidateResourceTypeConfig_Response) ProtoMessage() {}
+
+func (x *ValidateResourceTypeConfig_Response) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin5_proto_msgTypes[74]
if x != nil {
- return x.Description
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ValidateResourceTypeConfig_Response.ProtoReflect.Descriptor instead.
+func (*ValidateResourceTypeConfig_Response) Descriptor() ([]byte, []int) {
+ return file_tfplugin5_proto_rawDescGZIP(), []int{18, 1}
+}
+
+func (x *ValidateResourceTypeConfig_Response) GetDiagnostics() []*Diagnostic {
+ if x != nil {
+ return x.Diagnostics
+ }
+ return nil
+}
+
+type ValidateDataSourceConfig_Request struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ TypeName string `protobuf:"bytes,1,opt,name=type_name,json=typeName,proto3" json:"type_name,omitempty"`
+ Config *DynamicValue `protobuf:"bytes,2,opt,name=config,proto3" json:"config,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *ValidateDataSourceConfig_Request) Reset() {
+ *x = ValidateDataSourceConfig_Request{}
+ mi := &file_tfplugin5_proto_msgTypes[75]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ValidateDataSourceConfig_Request) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ValidateDataSourceConfig_Request) ProtoMessage() {}
+
+func (x *ValidateDataSourceConfig_Request) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin5_proto_msgTypes[75]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ValidateDataSourceConfig_Request.ProtoReflect.Descriptor instead.
+func (*ValidateDataSourceConfig_Request) Descriptor() ([]byte, []int) {
+ return file_tfplugin5_proto_rawDescGZIP(), []int{19, 0}
+}
+
+func (x *ValidateDataSourceConfig_Request) GetTypeName() string {
+ if x != nil {
+ return x.TypeName
}
return ""
}
-func (x *Schema_Block) GetDescriptionKind() StringKind {
+func (x *ValidateDataSourceConfig_Request) GetConfig() *DynamicValue {
if x != nil {
- return x.DescriptionKind
+ return x.Config
}
- return StringKind_PLAIN
+ return nil
+}
+
+type ValidateDataSourceConfig_Response struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Diagnostics []*Diagnostic `protobuf:"bytes,1,rep,name=diagnostics,proto3" json:"diagnostics,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *ValidateDataSourceConfig_Response) Reset() {
+ *x = ValidateDataSourceConfig_Response{}
+ mi := &file_tfplugin5_proto_msgTypes[76]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ValidateDataSourceConfig_Response) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ValidateDataSourceConfig_Response) ProtoMessage() {}
+
+func (x *ValidateDataSourceConfig_Response) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin5_proto_msgTypes[76]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ValidateDataSourceConfig_Response.ProtoReflect.Descriptor instead.
+func (*ValidateDataSourceConfig_Response) Descriptor() ([]byte, []int) {
+ return file_tfplugin5_proto_rawDescGZIP(), []int{19, 1}
+}
+
+func (x *ValidateDataSourceConfig_Response) GetDiagnostics() []*Diagnostic {
+ if x != nil {
+ return x.Diagnostics
+ }
+ return nil
+}
+
+type Configure_Request struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ TerraformVersion string `protobuf:"bytes,1,opt,name=terraform_version,json=terraformVersion,proto3" json:"terraform_version,omitempty"`
+ Config *DynamicValue `protobuf:"bytes,2,opt,name=config,proto3" json:"config,omitempty"`
+ ClientCapabilities *ClientCapabilities `protobuf:"bytes,3,opt,name=client_capabilities,json=clientCapabilities,proto3" json:"client_capabilities,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *Configure_Request) Reset() {
+ *x = Configure_Request{}
+ mi := &file_tfplugin5_proto_msgTypes[77]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *Configure_Request) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Configure_Request) ProtoMessage() {}
+
+func (x *Configure_Request) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin5_proto_msgTypes[77]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Configure_Request.ProtoReflect.Descriptor instead.
+func (*Configure_Request) Descriptor() ([]byte, []int) {
+ return file_tfplugin5_proto_rawDescGZIP(), []int{20, 0}
+}
+
+func (x *Configure_Request) GetTerraformVersion() string {
+ if x != nil {
+ return x.TerraformVersion
+ }
+ return ""
+}
+
+func (x *Configure_Request) GetConfig() *DynamicValue {
+ if x != nil {
+ return x.Config
+ }
+ return nil
+}
+
+func (x *Configure_Request) GetClientCapabilities() *ClientCapabilities {
+ if x != nil {
+ return x.ClientCapabilities
+ }
+ return nil
+}
+
+type Configure_Response struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Diagnostics []*Diagnostic `protobuf:"bytes,1,rep,name=diagnostics,proto3" json:"diagnostics,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *Configure_Response) Reset() {
+ *x = Configure_Response{}
+ mi := &file_tfplugin5_proto_msgTypes[78]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *Configure_Response) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Configure_Response) ProtoMessage() {}
+
+func (x *Configure_Response) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin5_proto_msgTypes[78]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Configure_Response.ProtoReflect.Descriptor instead.
+func (*Configure_Response) Descriptor() ([]byte, []int) {
+ return file_tfplugin5_proto_rawDescGZIP(), []int{20, 1}
}
-func (x *Schema_Block) GetDeprecated() bool {
+func (x *Configure_Response) GetDiagnostics() []*Diagnostic {
if x != nil {
- return x.Deprecated
+ return x.Diagnostics
}
- return false
+ return nil
}
-type Schema_Attribute struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
- Type []byte `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
- Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
- Required bool `protobuf:"varint,4,opt,name=required,proto3" json:"required,omitempty"`
- Optional bool `protobuf:"varint,5,opt,name=optional,proto3" json:"optional,omitempty"`
- Computed bool `protobuf:"varint,6,opt,name=computed,proto3" json:"computed,omitempty"`
- Sensitive bool `protobuf:"varint,7,opt,name=sensitive,proto3" json:"sensitive,omitempty"`
- DescriptionKind StringKind `protobuf:"varint,8,opt,name=description_kind,json=descriptionKind,proto3,enum=tfplugin5.StringKind" json:"description_kind,omitempty"`
- Deprecated bool `protobuf:"varint,9,opt,name=deprecated,proto3" json:"deprecated,omitempty"`
+// Request is the message that is sent to the provider during the
+// ReadResource RPC.
+//
+// This message intentionally does not include configuration data as any
+// configuration-based or configuration-conditional changes should occur
+// during the PlanResourceChange RPC. Additionally, the configuration is
+// not guaranteed to be wholly known nor match the given prior state, which
+// could lead to unexpected provider behaviors for practitioners.
+type ReadResource_Request struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ TypeName string `protobuf:"bytes,1,opt,name=type_name,json=typeName,proto3" json:"type_name,omitempty"`
+ CurrentState *DynamicValue `protobuf:"bytes,2,opt,name=current_state,json=currentState,proto3" json:"current_state,omitempty"`
+ Private []byte `protobuf:"bytes,3,opt,name=private,proto3" json:"private,omitempty"`
+ ProviderMeta *DynamicValue `protobuf:"bytes,4,opt,name=provider_meta,json=providerMeta,proto3" json:"provider_meta,omitempty"`
+ ClientCapabilities *ClientCapabilities `protobuf:"bytes,5,opt,name=client_capabilities,json=clientCapabilities,proto3" json:"client_capabilities,omitempty"`
+ CurrentIdentity *ResourceIdentityData `protobuf:"bytes,6,opt,name=current_identity,json=currentIdentity,proto3" json:"current_identity,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
-func (x *Schema_Attribute) Reset() {
- *x = Schema_Attribute{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin5_proto_msgTypes[34]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+func (x *ReadResource_Request) Reset() {
+ *x = ReadResource_Request{}
+ mi := &file_tfplugin5_proto_msgTypes[79]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
-func (x *Schema_Attribute) String() string {
+func (x *ReadResource_Request) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*Schema_Attribute) ProtoMessage() {}
+func (*ReadResource_Request) ProtoMessage() {}
-func (x *Schema_Attribute) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin5_proto_msgTypes[34]
- if protoimpl.UnsafeEnabled && x != nil {
+func (x *ReadResource_Request) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin5_proto_msgTypes[79]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1922,104 +3936,161 @@ func (x *Schema_Attribute) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use Schema_Attribute.ProtoReflect.Descriptor instead.
-func (*Schema_Attribute) Descriptor() ([]byte, []int) {
- return file_tfplugin5_proto_rawDescGZIP(), []int{6, 1}
+// Deprecated: Use ReadResource_Request.ProtoReflect.Descriptor instead.
+func (*ReadResource_Request) Descriptor() ([]byte, []int) {
+ return file_tfplugin5_proto_rawDescGZIP(), []int{21, 0}
}
-func (x *Schema_Attribute) GetName() string {
+func (x *ReadResource_Request) GetTypeName() string {
if x != nil {
- return x.Name
+ return x.TypeName
}
return ""
}
-func (x *Schema_Attribute) GetType() []byte {
+func (x *ReadResource_Request) GetCurrentState() *DynamicValue {
if x != nil {
- return x.Type
+ return x.CurrentState
}
return nil
}
-func (x *Schema_Attribute) GetDescription() string {
+func (x *ReadResource_Request) GetPrivate() []byte {
if x != nil {
- return x.Description
+ return x.Private
}
- return ""
+ return nil
}
-func (x *Schema_Attribute) GetRequired() bool {
+func (x *ReadResource_Request) GetProviderMeta() *DynamicValue {
if x != nil {
- return x.Required
+ return x.ProviderMeta
}
- return false
+ return nil
}
-func (x *Schema_Attribute) GetOptional() bool {
+func (x *ReadResource_Request) GetClientCapabilities() *ClientCapabilities {
if x != nil {
- return x.Optional
+ return x.ClientCapabilities
}
- return false
+ return nil
}
-func (x *Schema_Attribute) GetComputed() bool {
+func (x *ReadResource_Request) GetCurrentIdentity() *ResourceIdentityData {
if x != nil {
- return x.Computed
+ return x.CurrentIdentity
}
- return false
+ return nil
}
-func (x *Schema_Attribute) GetSensitive() bool {
+type ReadResource_Response struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ NewState *DynamicValue `protobuf:"bytes,1,opt,name=new_state,json=newState,proto3" json:"new_state,omitempty"`
+ Diagnostics []*Diagnostic `protobuf:"bytes,2,rep,name=diagnostics,proto3" json:"diagnostics,omitempty"`
+ Private []byte `protobuf:"bytes,3,opt,name=private,proto3" json:"private,omitempty"`
+ // deferred is set if the provider is deferring the change. If set the caller
+ // needs to handle the deferral.
+ Deferred *Deferred `protobuf:"bytes,4,opt,name=deferred,proto3" json:"deferred,omitempty"`
+ NewIdentity *ResourceIdentityData `protobuf:"bytes,5,opt,name=new_identity,json=newIdentity,proto3" json:"new_identity,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *ReadResource_Response) Reset() {
+ *x = ReadResource_Response{}
+ mi := &file_tfplugin5_proto_msgTypes[80]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ReadResource_Response) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ReadResource_Response) ProtoMessage() {}
+
+func (x *ReadResource_Response) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin5_proto_msgTypes[80]
if x != nil {
- return x.Sensitive
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
}
- return false
+ return mi.MessageOf(x)
}
-func (x *Schema_Attribute) GetDescriptionKind() StringKind {
+// Deprecated: Use ReadResource_Response.ProtoReflect.Descriptor instead.
+func (*ReadResource_Response) Descriptor() ([]byte, []int) {
+ return file_tfplugin5_proto_rawDescGZIP(), []int{21, 1}
+}
+
+func (x *ReadResource_Response) GetNewState() *DynamicValue {
if x != nil {
- return x.DescriptionKind
+ return x.NewState
}
- return StringKind_PLAIN
+ return nil
}
-func (x *Schema_Attribute) GetDeprecated() bool {
+func (x *ReadResource_Response) GetDiagnostics() []*Diagnostic {
if x != nil {
- return x.Deprecated
+ return x.Diagnostics
}
- return false
+ return nil
}
-type Schema_NestedBlock struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
+func (x *ReadResource_Response) GetPrivate() []byte {
+ if x != nil {
+ return x.Private
+ }
+ return nil
+}
- TypeName string `protobuf:"bytes,1,opt,name=type_name,json=typeName,proto3" json:"type_name,omitempty"`
- Block *Schema_Block `protobuf:"bytes,2,opt,name=block,proto3" json:"block,omitempty"`
- Nesting Schema_NestedBlock_NestingMode `protobuf:"varint,3,opt,name=nesting,proto3,enum=tfplugin5.Schema_NestedBlock_NestingMode" json:"nesting,omitempty"`
- MinItems int64 `protobuf:"varint,4,opt,name=min_items,json=minItems,proto3" json:"min_items,omitempty"`
- MaxItems int64 `protobuf:"varint,5,opt,name=max_items,json=maxItems,proto3" json:"max_items,omitempty"`
+func (x *ReadResource_Response) GetDeferred() *Deferred {
+ if x != nil {
+ return x.Deferred
+ }
+ return nil
}
-func (x *Schema_NestedBlock) Reset() {
- *x = Schema_NestedBlock{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin5_proto_msgTypes[35]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
+func (x *ReadResource_Response) GetNewIdentity() *ResourceIdentityData {
+ if x != nil {
+ return x.NewIdentity
}
+ return nil
}
-func (x *Schema_NestedBlock) String() string {
+type PlanResourceChange_Request struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ TypeName string `protobuf:"bytes,1,opt,name=type_name,json=typeName,proto3" json:"type_name,omitempty"`
+ PriorState *DynamicValue `protobuf:"bytes,2,opt,name=prior_state,json=priorState,proto3" json:"prior_state,omitempty"`
+ ProposedNewState *DynamicValue `protobuf:"bytes,3,opt,name=proposed_new_state,json=proposedNewState,proto3" json:"proposed_new_state,omitempty"`
+ Config *DynamicValue `protobuf:"bytes,4,opt,name=config,proto3" json:"config,omitempty"`
+ PriorPrivate []byte `protobuf:"bytes,5,opt,name=prior_private,json=priorPrivate,proto3" json:"prior_private,omitempty"`
+ ProviderMeta *DynamicValue `protobuf:"bytes,6,opt,name=provider_meta,json=providerMeta,proto3" json:"provider_meta,omitempty"`
+ ClientCapabilities *ClientCapabilities `protobuf:"bytes,7,opt,name=client_capabilities,json=clientCapabilities,proto3" json:"client_capabilities,omitempty"`
+ PriorIdentity *ResourceIdentityData `protobuf:"bytes,8,opt,name=prior_identity,json=priorIdentity,proto3" json:"prior_identity,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *PlanResourceChange_Request) Reset() {
+ *x = PlanResourceChange_Request{}
+ mi := &file_tfplugin5_proto_msgTypes[81]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *PlanResourceChange_Request) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*Schema_NestedBlock) ProtoMessage() {}
+func (*PlanResourceChange_Request) ProtoMessage() {}
-func (x *Schema_NestedBlock) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin5_proto_msgTypes[35]
- if protoimpl.UnsafeEnabled && x != nil {
+func (x *PlanResourceChange_Request) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin5_proto_msgTypes[81]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -2029,88 +4100,109 @@ func (x *Schema_NestedBlock) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use Schema_NestedBlock.ProtoReflect.Descriptor instead.
-func (*Schema_NestedBlock) Descriptor() ([]byte, []int) {
- return file_tfplugin5_proto_rawDescGZIP(), []int{6, 2}
+// Deprecated: Use PlanResourceChange_Request.ProtoReflect.Descriptor instead.
+func (*PlanResourceChange_Request) Descriptor() ([]byte, []int) {
+ return file_tfplugin5_proto_rawDescGZIP(), []int{22, 0}
}
-func (x *Schema_NestedBlock) GetTypeName() string {
+func (x *PlanResourceChange_Request) GetTypeName() string {
if x != nil {
return x.TypeName
}
return ""
}
-func (x *Schema_NestedBlock) GetBlock() *Schema_Block {
+func (x *PlanResourceChange_Request) GetPriorState() *DynamicValue {
if x != nil {
- return x.Block
+ return x.PriorState
}
return nil
}
-func (x *Schema_NestedBlock) GetNesting() Schema_NestedBlock_NestingMode {
+func (x *PlanResourceChange_Request) GetProposedNewState() *DynamicValue {
if x != nil {
- return x.Nesting
+ return x.ProposedNewState
}
- return Schema_NestedBlock_INVALID
+ return nil
}
-func (x *Schema_NestedBlock) GetMinItems() int64 {
+func (x *PlanResourceChange_Request) GetConfig() *DynamicValue {
if x != nil {
- return x.MinItems
+ return x.Config
}
- return 0
+ return nil
}
-func (x *Schema_NestedBlock) GetMaxItems() int64 {
+func (x *PlanResourceChange_Request) GetPriorPrivate() []byte {
if x != nil {
- return x.MaxItems
+ return x.PriorPrivate
}
- return 0
+ return nil
}
-type Function_Parameter struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
+func (x *PlanResourceChange_Request) GetProviderMeta() *DynamicValue {
+ if x != nil {
+ return x.ProviderMeta
+ }
+ return nil
+}
- // name is the human-readable display name for the parameter.
- Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
- // type is the type constraint for the parameter.
- Type []byte `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
- // allow_null_value when enabled denotes that a null argument value can
- // be passed to the provider. When disabled, Terraform returns an error
- // if the argument value is null.
- AllowNullValue bool `protobuf:"varint,3,opt,name=allow_null_value,json=allowNullValue,proto3" json:"allow_null_value,omitempty"`
- // allow_unknown_values when enabled denotes that only wholly known
- // argument values will be passed to the provider. When disabled,
- // Terraform skips the function call entirely and assumes an unknown
- // value result from the function.
- AllowUnknownValues bool `protobuf:"varint,4,opt,name=allow_unknown_values,json=allowUnknownValues,proto3" json:"allow_unknown_values,omitempty"`
- // description is human-readable documentation for the parameter.
- Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"`
- // description_kind is the formatting of the description.
- DescriptionKind StringKind `protobuf:"varint,6,opt,name=description_kind,json=descriptionKind,proto3,enum=tfplugin5.StringKind" json:"description_kind,omitempty"`
+func (x *PlanResourceChange_Request) GetClientCapabilities() *ClientCapabilities {
+ if x != nil {
+ return x.ClientCapabilities
+ }
+ return nil
}
-func (x *Function_Parameter) Reset() {
- *x = Function_Parameter{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin5_proto_msgTypes[36]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
+func (x *PlanResourceChange_Request) GetPriorIdentity() *ResourceIdentityData {
+ if x != nil {
+ return x.PriorIdentity
}
+ return nil
}
-func (x *Function_Parameter) String() string {
+type PlanResourceChange_Response struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ PlannedState *DynamicValue `protobuf:"bytes,1,opt,name=planned_state,json=plannedState,proto3" json:"planned_state,omitempty"`
+ RequiresReplace []*AttributePath `protobuf:"bytes,2,rep,name=requires_replace,json=requiresReplace,proto3" json:"requires_replace,omitempty"`
+ PlannedPrivate []byte `protobuf:"bytes,3,opt,name=planned_private,json=plannedPrivate,proto3" json:"planned_private,omitempty"`
+ Diagnostics []*Diagnostic `protobuf:"bytes,4,rep,name=diagnostics,proto3" json:"diagnostics,omitempty"`
+ // This may be set only by the helper/schema "SDK" in the main Terraform
+ // repository, to request that Terraform Core >=0.12 permit additional
+ // inconsistencies that can result from the legacy SDK type system
+ // and its imprecise mapping to the >=0.12 type system.
+ // The change in behavior implied by this flag makes sense only for the
+ // specific details of the legacy SDK type system, and are not a general
+ // mechanism to avoid proper type handling in providers.
+ //
+ // ==== DO NOT USE THIS ====
+ // ==== THIS MUST BE LEFT UNSET IN ALL OTHER SDKS ====
+ // ==== DO NOT USE THIS ====
+ LegacyTypeSystem bool `protobuf:"varint,5,opt,name=legacy_type_system,json=legacyTypeSystem,proto3" json:"legacy_type_system,omitempty"`
+ // deferred is set if the provider is deferring the change. If set the caller
+ // needs to handle the deferral.
+ Deferred *Deferred `protobuf:"bytes,6,opt,name=deferred,proto3" json:"deferred,omitempty"`
+ PlannedIdentity *ResourceIdentityData `protobuf:"bytes,7,opt,name=planned_identity,json=plannedIdentity,proto3" json:"planned_identity,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *PlanResourceChange_Response) Reset() {
+ *x = PlanResourceChange_Response{}
+ mi := &file_tfplugin5_proto_msgTypes[82]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *PlanResourceChange_Response) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*Function_Parameter) ProtoMessage() {}
+func (*PlanResourceChange_Response) ProtoMessage() {}
-func (x *Function_Parameter) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin5_proto_msgTypes[36]
- if protoimpl.UnsafeEnabled && x != nil {
+func (x *PlanResourceChange_Response) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin5_proto_msgTypes[82]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -2120,80 +4212,89 @@ func (x *Function_Parameter) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use Function_Parameter.ProtoReflect.Descriptor instead.
-func (*Function_Parameter) Descriptor() ([]byte, []int) {
- return file_tfplugin5_proto_rawDescGZIP(), []int{9, 0}
+// Deprecated: Use PlanResourceChange_Response.ProtoReflect.Descriptor instead.
+func (*PlanResourceChange_Response) Descriptor() ([]byte, []int) {
+ return file_tfplugin5_proto_rawDescGZIP(), []int{22, 1}
+}
+
+func (x *PlanResourceChange_Response) GetPlannedState() *DynamicValue {
+ if x != nil {
+ return x.PlannedState
+ }
+ return nil
}
-func (x *Function_Parameter) GetName() string {
+func (x *PlanResourceChange_Response) GetRequiresReplace() []*AttributePath {
if x != nil {
- return x.Name
+ return x.RequiresReplace
}
- return ""
+ return nil
}
-func (x *Function_Parameter) GetType() []byte {
+func (x *PlanResourceChange_Response) GetPlannedPrivate() []byte {
if x != nil {
- return x.Type
+ return x.PlannedPrivate
}
return nil
}
-func (x *Function_Parameter) GetAllowNullValue() bool {
+func (x *PlanResourceChange_Response) GetDiagnostics() []*Diagnostic {
if x != nil {
- return x.AllowNullValue
+ return x.Diagnostics
}
- return false
+ return nil
}
-func (x *Function_Parameter) GetAllowUnknownValues() bool {
+func (x *PlanResourceChange_Response) GetLegacyTypeSystem() bool {
if x != nil {
- return x.AllowUnknownValues
+ return x.LegacyTypeSystem
}
return false
}
-func (x *Function_Parameter) GetDescription() string {
+func (x *PlanResourceChange_Response) GetDeferred() *Deferred {
if x != nil {
- return x.Description
+ return x.Deferred
}
- return ""
+ return nil
}
-func (x *Function_Parameter) GetDescriptionKind() StringKind {
+func (x *PlanResourceChange_Response) GetPlannedIdentity() *ResourceIdentityData {
if x != nil {
- return x.DescriptionKind
+ return x.PlannedIdentity
}
- return StringKind_PLAIN
+ return nil
}
-type Function_Return struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- // type is the type constraint for the function result.
- Type []byte `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
+type ApplyResourceChange_Request struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ TypeName string `protobuf:"bytes,1,opt,name=type_name,json=typeName,proto3" json:"type_name,omitempty"`
+ PriorState *DynamicValue `protobuf:"bytes,2,opt,name=prior_state,json=priorState,proto3" json:"prior_state,omitempty"`
+ PlannedState *DynamicValue `protobuf:"bytes,3,opt,name=planned_state,json=plannedState,proto3" json:"planned_state,omitempty"`
+ Config *DynamicValue `protobuf:"bytes,4,opt,name=config,proto3" json:"config,omitempty"`
+ PlannedPrivate []byte `protobuf:"bytes,5,opt,name=planned_private,json=plannedPrivate,proto3" json:"planned_private,omitempty"`
+ ProviderMeta *DynamicValue `protobuf:"bytes,6,opt,name=provider_meta,json=providerMeta,proto3" json:"provider_meta,omitempty"`
+ PlannedIdentity *ResourceIdentityData `protobuf:"bytes,7,opt,name=planned_identity,json=plannedIdentity,proto3" json:"planned_identity,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
-func (x *Function_Return) Reset() {
- *x = Function_Return{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin5_proto_msgTypes[37]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+func (x *ApplyResourceChange_Request) Reset() {
+ *x = ApplyResourceChange_Request{}
+ mi := &file_tfplugin5_proto_msgTypes[83]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
-func (x *Function_Return) String() string {
+func (x *ApplyResourceChange_Request) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*Function_Return) ProtoMessage() {}
+func (*ApplyResourceChange_Request) ProtoMessage() {}
-func (x *Function_Return) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin5_proto_msgTypes[37]
- if protoimpl.UnsafeEnabled && x != nil {
+func (x *ApplyResourceChange_Request) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin5_proto_msgTypes[83]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -2203,87 +4304,98 @@ func (x *Function_Return) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use Function_Return.ProtoReflect.Descriptor instead.
-func (*Function_Return) Descriptor() ([]byte, []int) {
- return file_tfplugin5_proto_rawDescGZIP(), []int{9, 1}
+// Deprecated: Use ApplyResourceChange_Request.ProtoReflect.Descriptor instead.
+func (*ApplyResourceChange_Request) Descriptor() ([]byte, []int) {
+ return file_tfplugin5_proto_rawDescGZIP(), []int{23, 0}
}
-func (x *Function_Return) GetType() []byte {
+func (x *ApplyResourceChange_Request) GetTypeName() string {
if x != nil {
- return x.Type
+ return x.TypeName
}
- return nil
+ return ""
}
-type GetMetadata_Request struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
+func (x *ApplyResourceChange_Request) GetPriorState() *DynamicValue {
+ if x != nil {
+ return x.PriorState
+ }
+ return nil
}
-func (x *GetMetadata_Request) Reset() {
- *x = GetMetadata_Request{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin5_proto_msgTypes[38]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
+func (x *ApplyResourceChange_Request) GetPlannedState() *DynamicValue {
+ if x != nil {
+ return x.PlannedState
}
+ return nil
}
-func (x *GetMetadata_Request) String() string {
- return protoimpl.X.MessageStringOf(x)
+func (x *ApplyResourceChange_Request) GetConfig() *DynamicValue {
+ if x != nil {
+ return x.Config
+ }
+ return nil
}
-func (*GetMetadata_Request) ProtoMessage() {}
-
-func (x *GetMetadata_Request) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin5_proto_msgTypes[38]
- if protoimpl.UnsafeEnabled && x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
+func (x *ApplyResourceChange_Request) GetPlannedPrivate() []byte {
+ if x != nil {
+ return x.PlannedPrivate
}
- return mi.MessageOf(x)
+ return nil
}
-// Deprecated: Use GetMetadata_Request.ProtoReflect.Descriptor instead.
-func (*GetMetadata_Request) Descriptor() ([]byte, []int) {
- return file_tfplugin5_proto_rawDescGZIP(), []int{11, 0}
+func (x *ApplyResourceChange_Request) GetProviderMeta() *DynamicValue {
+ if x != nil {
+ return x.ProviderMeta
+ }
+ return nil
}
-type GetMetadata_Response struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
+func (x *ApplyResourceChange_Request) GetPlannedIdentity() *ResourceIdentityData {
+ if x != nil {
+ return x.PlannedIdentity
+ }
+ return nil
+}
- ServerCapabilities *ServerCapabilities `protobuf:"bytes,1,opt,name=server_capabilities,json=serverCapabilities,proto3" json:"server_capabilities,omitempty"`
- Diagnostics []*Diagnostic `protobuf:"bytes,2,rep,name=diagnostics,proto3" json:"diagnostics,omitempty"`
- DataSources []*GetMetadata_DataSourceMetadata `protobuf:"bytes,3,rep,name=data_sources,json=dataSources,proto3" json:"data_sources,omitempty"`
- Resources []*GetMetadata_ResourceMetadata `protobuf:"bytes,4,rep,name=resources,proto3" json:"resources,omitempty"`
- // functions returns metadata for any functions.
- Functions []*GetMetadata_FunctionMetadata `protobuf:"bytes,5,rep,name=functions,proto3" json:"functions,omitempty"`
+type ApplyResourceChange_Response struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ NewState *DynamicValue `protobuf:"bytes,1,opt,name=new_state,json=newState,proto3" json:"new_state,omitempty"`
+ Private []byte `protobuf:"bytes,2,opt,name=private,proto3" json:"private,omitempty"`
+ Diagnostics []*Diagnostic `protobuf:"bytes,3,rep,name=diagnostics,proto3" json:"diagnostics,omitempty"`
+ // This may be set only by the helper/schema "SDK" in the main Terraform
+ // repository, to request that Terraform Core >=0.12 permit additional
+ // inconsistencies that can result from the legacy SDK type system
+ // and its imprecise mapping to the >=0.12 type system.
+ // The change in behavior implied by this flag makes sense only for the
+ // specific details of the legacy SDK type system, and are not a general
+ // mechanism to avoid proper type handling in providers.
+ //
+ // ==== DO NOT USE THIS ====
+ // ==== THIS MUST BE LEFT UNSET IN ALL OTHER SDKS ====
+ // ==== DO NOT USE THIS ====
+ LegacyTypeSystem bool `protobuf:"varint,4,opt,name=legacy_type_system,json=legacyTypeSystem,proto3" json:"legacy_type_system,omitempty"`
+ NewIdentity *ResourceIdentityData `protobuf:"bytes,5,opt,name=new_identity,json=newIdentity,proto3" json:"new_identity,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
-func (x *GetMetadata_Response) Reset() {
- *x = GetMetadata_Response{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin5_proto_msgTypes[39]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+func (x *ApplyResourceChange_Response) Reset() {
+ *x = ApplyResourceChange_Response{}
+ mi := &file_tfplugin5_proto_msgTypes[84]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
-func (x *GetMetadata_Response) String() string {
+func (x *ApplyResourceChange_Response) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*GetMetadata_Response) ProtoMessage() {}
+func (*ApplyResourceChange_Response) ProtoMessage() {}
-func (x *GetMetadata_Response) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin5_proto_msgTypes[39]
- if protoimpl.UnsafeEnabled && x != nil {
+func (x *ApplyResourceChange_Response) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin5_proto_msgTypes[84]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -2293,73 +4405,72 @@ func (x *GetMetadata_Response) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use GetMetadata_Response.ProtoReflect.Descriptor instead.
-func (*GetMetadata_Response) Descriptor() ([]byte, []int) {
- return file_tfplugin5_proto_rawDescGZIP(), []int{11, 1}
+// Deprecated: Use ApplyResourceChange_Response.ProtoReflect.Descriptor instead.
+func (*ApplyResourceChange_Response) Descriptor() ([]byte, []int) {
+ return file_tfplugin5_proto_rawDescGZIP(), []int{23, 1}
}
-func (x *GetMetadata_Response) GetServerCapabilities() *ServerCapabilities {
+func (x *ApplyResourceChange_Response) GetNewState() *DynamicValue {
if x != nil {
- return x.ServerCapabilities
+ return x.NewState
}
return nil
}
-func (x *GetMetadata_Response) GetDiagnostics() []*Diagnostic {
+func (x *ApplyResourceChange_Response) GetPrivate() []byte {
if x != nil {
- return x.Diagnostics
+ return x.Private
}
return nil
}
-func (x *GetMetadata_Response) GetDataSources() []*GetMetadata_DataSourceMetadata {
+func (x *ApplyResourceChange_Response) GetDiagnostics() []*Diagnostic {
if x != nil {
- return x.DataSources
+ return x.Diagnostics
}
return nil
}
-func (x *GetMetadata_Response) GetResources() []*GetMetadata_ResourceMetadata {
+func (x *ApplyResourceChange_Response) GetLegacyTypeSystem() bool {
if x != nil {
- return x.Resources
+ return x.LegacyTypeSystem
}
- return nil
+ return false
}
-func (x *GetMetadata_Response) GetFunctions() []*GetMetadata_FunctionMetadata {
+func (x *ApplyResourceChange_Response) GetNewIdentity() *ResourceIdentityData {
if x != nil {
- return x.Functions
+ return x.NewIdentity
}
return nil
}
-type GetMetadata_FunctionMetadata struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- // name is the function name.
- Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+type ImportResourceState_Request struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ TypeName string `protobuf:"bytes,1,opt,name=type_name,json=typeName,proto3" json:"type_name,omitempty"`
+ Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
+ ClientCapabilities *ClientCapabilities `protobuf:"bytes,3,opt,name=client_capabilities,json=clientCapabilities,proto3" json:"client_capabilities,omitempty"`
+ Identity *ResourceIdentityData `protobuf:"bytes,4,opt,name=identity,proto3" json:"identity,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
-func (x *GetMetadata_FunctionMetadata) Reset() {
- *x = GetMetadata_FunctionMetadata{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin5_proto_msgTypes[40]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+func (x *ImportResourceState_Request) Reset() {
+ *x = ImportResourceState_Request{}
+ mi := &file_tfplugin5_proto_msgTypes[85]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
-func (x *GetMetadata_FunctionMetadata) String() string {
+func (x *ImportResourceState_Request) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*GetMetadata_FunctionMetadata) ProtoMessage() {}
+func (*ImportResourceState_Request) ProtoMessage() {}
-func (x *GetMetadata_FunctionMetadata) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin5_proto_msgTypes[40]
- if protoimpl.UnsafeEnabled && x != nil {
+func (x *ImportResourceState_Request) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin5_proto_msgTypes[85]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -2369,91 +4480,65 @@ func (x *GetMetadata_FunctionMetadata) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use GetMetadata_FunctionMetadata.ProtoReflect.Descriptor instead.
-func (*GetMetadata_FunctionMetadata) Descriptor() ([]byte, []int) {
- return file_tfplugin5_proto_rawDescGZIP(), []int{11, 2}
+// Deprecated: Use ImportResourceState_Request.ProtoReflect.Descriptor instead.
+func (*ImportResourceState_Request) Descriptor() ([]byte, []int) {
+ return file_tfplugin5_proto_rawDescGZIP(), []int{24, 0}
}
-func (x *GetMetadata_FunctionMetadata) GetName() string {
+func (x *ImportResourceState_Request) GetTypeName() string {
if x != nil {
- return x.Name
+ return x.TypeName
}
return ""
}
-type GetMetadata_DataSourceMetadata struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- TypeName string `protobuf:"bytes,1,opt,name=type_name,json=typeName,proto3" json:"type_name,omitempty"`
-}
-
-func (x *GetMetadata_DataSourceMetadata) Reset() {
- *x = GetMetadata_DataSourceMetadata{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin5_proto_msgTypes[41]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
+func (x *ImportResourceState_Request) GetId() string {
+ if x != nil {
+ return x.Id
}
+ return ""
}
-func (x *GetMetadata_DataSourceMetadata) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*GetMetadata_DataSourceMetadata) ProtoMessage() {}
-
-func (x *GetMetadata_DataSourceMetadata) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin5_proto_msgTypes[41]
- if protoimpl.UnsafeEnabled && x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
+func (x *ImportResourceState_Request) GetClientCapabilities() *ClientCapabilities {
+ if x != nil {
+ return x.ClientCapabilities
}
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use GetMetadata_DataSourceMetadata.ProtoReflect.Descriptor instead.
-func (*GetMetadata_DataSourceMetadata) Descriptor() ([]byte, []int) {
- return file_tfplugin5_proto_rawDescGZIP(), []int{11, 3}
+ return nil
}
-func (x *GetMetadata_DataSourceMetadata) GetTypeName() string {
+func (x *ImportResourceState_Request) GetIdentity() *ResourceIdentityData {
if x != nil {
- return x.TypeName
+ return x.Identity
}
- return ""
+ return nil
}
-type GetMetadata_ResourceMetadata struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+type ImportResourceState_ImportedResource struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ TypeName string `protobuf:"bytes,1,opt,name=type_name,json=typeName,proto3" json:"type_name,omitempty"`
+ State *DynamicValue `protobuf:"bytes,2,opt,name=state,proto3" json:"state,omitempty"`
+ Private []byte `protobuf:"bytes,3,opt,name=private,proto3" json:"private,omitempty"`
+ Identity *ResourceIdentityData `protobuf:"bytes,4,opt,name=identity,proto3" json:"identity,omitempty"`
unknownFields protoimpl.UnknownFields
-
- TypeName string `protobuf:"bytes,1,opt,name=type_name,json=typeName,proto3" json:"type_name,omitempty"`
+ sizeCache protoimpl.SizeCache
}
-func (x *GetMetadata_ResourceMetadata) Reset() {
- *x = GetMetadata_ResourceMetadata{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin5_proto_msgTypes[42]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+func (x *ImportResourceState_ImportedResource) Reset() {
+ *x = ImportResourceState_ImportedResource{}
+ mi := &file_tfplugin5_proto_msgTypes[86]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
-func (x *GetMetadata_ResourceMetadata) String() string {
+func (x *ImportResourceState_ImportedResource) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*GetMetadata_ResourceMetadata) ProtoMessage() {}
+func (*ImportResourceState_ImportedResource) ProtoMessage() {}
-func (x *GetMetadata_ResourceMetadata) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin5_proto_msgTypes[42]
- if protoimpl.UnsafeEnabled && x != nil {
+func (x *ImportResourceState_ImportedResource) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin5_proto_msgTypes[86]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -2463,42 +4548,66 @@ func (x *GetMetadata_ResourceMetadata) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use GetMetadata_ResourceMetadata.ProtoReflect.Descriptor instead.
-func (*GetMetadata_ResourceMetadata) Descriptor() ([]byte, []int) {
- return file_tfplugin5_proto_rawDescGZIP(), []int{11, 4}
+// Deprecated: Use ImportResourceState_ImportedResource.ProtoReflect.Descriptor instead.
+func (*ImportResourceState_ImportedResource) Descriptor() ([]byte, []int) {
+ return file_tfplugin5_proto_rawDescGZIP(), []int{24, 1}
}
-func (x *GetMetadata_ResourceMetadata) GetTypeName() string {
+func (x *ImportResourceState_ImportedResource) GetTypeName() string {
if x != nil {
return x.TypeName
}
return ""
}
-type GetProviderSchema_Request struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
+func (x *ImportResourceState_ImportedResource) GetState() *DynamicValue {
+ if x != nil {
+ return x.State
+ }
+ return nil
}
-func (x *GetProviderSchema_Request) Reset() {
- *x = GetProviderSchema_Request{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin5_proto_msgTypes[43]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
+func (x *ImportResourceState_ImportedResource) GetPrivate() []byte {
+ if x != nil {
+ return x.Private
}
+ return nil
}
-func (x *GetProviderSchema_Request) String() string {
+func (x *ImportResourceState_ImportedResource) GetIdentity() *ResourceIdentityData {
+ if x != nil {
+ return x.Identity
+ }
+ return nil
+}
+
+type ImportResourceState_Response struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ ImportedResources []*ImportResourceState_ImportedResource `protobuf:"bytes,1,rep,name=imported_resources,json=importedResources,proto3" json:"imported_resources,omitempty"`
+ Diagnostics []*Diagnostic `protobuf:"bytes,2,rep,name=diagnostics,proto3" json:"diagnostics,omitempty"`
+ // deferred is set if the provider is deferring the change. If set the caller
+ // needs to handle the deferral.
+ Deferred *Deferred `protobuf:"bytes,3,opt,name=deferred,proto3" json:"deferred,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *ImportResourceState_Response) Reset() {
+ *x = ImportResourceState_Response{}
+ mi := &file_tfplugin5_proto_msgTypes[87]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ImportResourceState_Response) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*GetProviderSchema_Request) ProtoMessage() {}
+func (*ImportResourceState_Response) ProtoMessage() {}
-func (x *GetProviderSchema_Request) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin5_proto_msgTypes[43]
- if protoimpl.UnsafeEnabled && x != nil {
+func (x *ImportResourceState_Response) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin5_proto_msgTypes[87]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -2508,44 +4617,76 @@ func (x *GetProviderSchema_Request) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use GetProviderSchema_Request.ProtoReflect.Descriptor instead.
-func (*GetProviderSchema_Request) Descriptor() ([]byte, []int) {
- return file_tfplugin5_proto_rawDescGZIP(), []int{12, 0}
+// Deprecated: Use ImportResourceState_Response.ProtoReflect.Descriptor instead.
+func (*ImportResourceState_Response) Descriptor() ([]byte, []int) {
+ return file_tfplugin5_proto_rawDescGZIP(), []int{24, 2}
}
-type GetProviderSchema_Response struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
+func (x *ImportResourceState_Response) GetImportedResources() []*ImportResourceState_ImportedResource {
+ if x != nil {
+ return x.ImportedResources
+ }
+ return nil
+}
- Provider *Schema `protobuf:"bytes,1,opt,name=provider,proto3" json:"provider,omitempty"`
- ResourceSchemas map[string]*Schema `protobuf:"bytes,2,rep,name=resource_schemas,json=resourceSchemas,proto3" json:"resource_schemas,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
- DataSourceSchemas map[string]*Schema `protobuf:"bytes,3,rep,name=data_source_schemas,json=dataSourceSchemas,proto3" json:"data_source_schemas,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
- Diagnostics []*Diagnostic `protobuf:"bytes,4,rep,name=diagnostics,proto3" json:"diagnostics,omitempty"`
- ProviderMeta *Schema `protobuf:"bytes,5,opt,name=provider_meta,json=providerMeta,proto3" json:"provider_meta,omitempty"`
- ServerCapabilities *ServerCapabilities `protobuf:"bytes,6,opt,name=server_capabilities,json=serverCapabilities,proto3" json:"server_capabilities,omitempty"`
- // functions is a mapping of function names to definitions.
- Functions map[string]*Function `protobuf:"bytes,7,rep,name=functions,proto3" json:"functions,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+func (x *ImportResourceState_Response) GetDiagnostics() []*Diagnostic {
+ if x != nil {
+ return x.Diagnostics
+ }
+ return nil
}
-func (x *GetProviderSchema_Response) Reset() {
- *x = GetProviderSchema_Response{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin5_proto_msgTypes[44]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
+func (x *ImportResourceState_Response) GetDeferred() *Deferred {
+ if x != nil {
+ return x.Deferred
}
+ return nil
}
-func (x *GetProviderSchema_Response) String() string {
+type MoveResourceState_Request struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // The address of the provider the resource is being moved from.
+ SourceProviderAddress string `protobuf:"bytes,1,opt,name=source_provider_address,json=sourceProviderAddress,proto3" json:"source_provider_address,omitempty"`
+ // The resource type that the resource is being moved from.
+ SourceTypeName string `protobuf:"bytes,2,opt,name=source_type_name,json=sourceTypeName,proto3" json:"source_type_name,omitempty"`
+ // The schema version of the resource type that the resource is being
+ // moved from.
+ SourceSchemaVersion int64 `protobuf:"varint,3,opt,name=source_schema_version,json=sourceSchemaVersion,proto3" json:"source_schema_version,omitempty"`
+ // The raw state of the resource being moved. Only the json field is
+ // populated, as there should be no legacy providers using the flatmap
+ // format that support newly introduced RPCs.
+ SourceState *RawState `protobuf:"bytes,4,opt,name=source_state,json=sourceState,proto3" json:"source_state,omitempty"`
+ // The resource type that the resource is being moved to.
+ TargetTypeName string `protobuf:"bytes,5,opt,name=target_type_name,json=targetTypeName,proto3" json:"target_type_name,omitempty"`
+ // The private state of the resource being moved.
+ SourcePrivate []byte `protobuf:"bytes,6,opt,name=source_private,json=sourcePrivate,proto3" json:"source_private,omitempty"`
+ // The raw identity of the resource being moved. Only the json field is
+ // populated, as there should be no legacy providers using the flatmap
+ // format that support newly introduced RPCs.
+ SourceIdentity *RawState `protobuf:"bytes,7,opt,name=source_identity,json=sourceIdentity,proto3" json:"source_identity,omitempty"`
+ // The identity schema version of the resource type that the resource
+ // is being moved from.
+ SourceIdentitySchemaVersion int64 `protobuf:"varint,8,opt,name=source_identity_schema_version,json=sourceIdentitySchemaVersion,proto3" json:"source_identity_schema_version,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *MoveResourceState_Request) Reset() {
+ *x = MoveResourceState_Request{}
+ mi := &file_tfplugin5_proto_msgTypes[88]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *MoveResourceState_Request) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*GetProviderSchema_Response) ProtoMessage() {}
+func (*MoveResourceState_Request) ProtoMessage() {}
-func (x *GetProviderSchema_Response) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin5_proto_msgTypes[44]
- if protoimpl.UnsafeEnabled && x != nil {
+func (x *MoveResourceState_Request) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin5_proto_msgTypes[88]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -2555,86 +4696,96 @@ func (x *GetProviderSchema_Response) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use GetProviderSchema_Response.ProtoReflect.Descriptor instead.
-func (*GetProviderSchema_Response) Descriptor() ([]byte, []int) {
- return file_tfplugin5_proto_rawDescGZIP(), []int{12, 1}
+// Deprecated: Use MoveResourceState_Request.ProtoReflect.Descriptor instead.
+func (*MoveResourceState_Request) Descriptor() ([]byte, []int) {
+ return file_tfplugin5_proto_rawDescGZIP(), []int{25, 0}
}
-func (x *GetProviderSchema_Response) GetProvider() *Schema {
+func (x *MoveResourceState_Request) GetSourceProviderAddress() string {
if x != nil {
- return x.Provider
+ return x.SourceProviderAddress
}
- return nil
+ return ""
}
-func (x *GetProviderSchema_Response) GetResourceSchemas() map[string]*Schema {
+func (x *MoveResourceState_Request) GetSourceTypeName() string {
if x != nil {
- return x.ResourceSchemas
+ return x.SourceTypeName
}
- return nil
+ return ""
}
-func (x *GetProviderSchema_Response) GetDataSourceSchemas() map[string]*Schema {
+func (x *MoveResourceState_Request) GetSourceSchemaVersion() int64 {
if x != nil {
- return x.DataSourceSchemas
+ return x.SourceSchemaVersion
}
- return nil
+ return 0
}
-func (x *GetProviderSchema_Response) GetDiagnostics() []*Diagnostic {
+func (x *MoveResourceState_Request) GetSourceState() *RawState {
if x != nil {
- return x.Diagnostics
+ return x.SourceState
}
return nil
}
-func (x *GetProviderSchema_Response) GetProviderMeta() *Schema {
+func (x *MoveResourceState_Request) GetTargetTypeName() string {
if x != nil {
- return x.ProviderMeta
+ return x.TargetTypeName
}
- return nil
+ return ""
}
-func (x *GetProviderSchema_Response) GetServerCapabilities() *ServerCapabilities {
+func (x *MoveResourceState_Request) GetSourcePrivate() []byte {
if x != nil {
- return x.ServerCapabilities
+ return x.SourcePrivate
}
return nil
}
-func (x *GetProviderSchema_Response) GetFunctions() map[string]*Function {
+func (x *MoveResourceState_Request) GetSourceIdentity() *RawState {
if x != nil {
- return x.Functions
+ return x.SourceIdentity
}
return nil
}
-type PrepareProviderConfig_Request struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
+func (x *MoveResourceState_Request) GetSourceIdentitySchemaVersion() int64 {
+ if x != nil {
+ return x.SourceIdentitySchemaVersion
+ }
+ return 0
+}
- Config *DynamicValue `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"`
+type MoveResourceState_Response struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // The state of the resource after it has been moved.
+ TargetState *DynamicValue `protobuf:"bytes,1,opt,name=target_state,json=targetState,proto3" json:"target_state,omitempty"`
+ // Any diagnostics that occurred during the move.
+ Diagnostics []*Diagnostic `protobuf:"bytes,2,rep,name=diagnostics,proto3" json:"diagnostics,omitempty"`
+ // The private state of the resource after it has been moved.
+ TargetPrivate []byte `protobuf:"bytes,3,opt,name=target_private,json=targetPrivate,proto3" json:"target_private,omitempty"`
+ TargetIdentity *ResourceIdentityData `protobuf:"bytes,4,opt,name=target_identity,json=targetIdentity,proto3" json:"target_identity,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
-func (x *PrepareProviderConfig_Request) Reset() {
- *x = PrepareProviderConfig_Request{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin5_proto_msgTypes[48]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+func (x *MoveResourceState_Response) Reset() {
+ *x = MoveResourceState_Response{}
+ mi := &file_tfplugin5_proto_msgTypes[89]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
-func (x *PrepareProviderConfig_Request) String() string {
+func (x *MoveResourceState_Response) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*PrepareProviderConfig_Request) ProtoMessage() {}
+func (*MoveResourceState_Response) ProtoMessage() {}
-func (x *PrepareProviderConfig_Request) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin5_proto_msgTypes[48]
- if protoimpl.UnsafeEnabled && x != nil {
+func (x *MoveResourceState_Response) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin5_proto_msgTypes[89]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -2644,116 +4795,65 @@ func (x *PrepareProviderConfig_Request) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use PrepareProviderConfig_Request.ProtoReflect.Descriptor instead.
-func (*PrepareProviderConfig_Request) Descriptor() ([]byte, []int) {
- return file_tfplugin5_proto_rawDescGZIP(), []int{13, 0}
+// Deprecated: Use MoveResourceState_Response.ProtoReflect.Descriptor instead.
+func (*MoveResourceState_Response) Descriptor() ([]byte, []int) {
+ return file_tfplugin5_proto_rawDescGZIP(), []int{25, 1}
}
-func (x *PrepareProviderConfig_Request) GetConfig() *DynamicValue {
+func (x *MoveResourceState_Response) GetTargetState() *DynamicValue {
if x != nil {
- return x.Config
+ return x.TargetState
}
return nil
}
-type PrepareProviderConfig_Response struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- PreparedConfig *DynamicValue `protobuf:"bytes,1,opt,name=prepared_config,json=preparedConfig,proto3" json:"prepared_config,omitempty"`
- Diagnostics []*Diagnostic `protobuf:"bytes,2,rep,name=diagnostics,proto3" json:"diagnostics,omitempty"`
-}
-
-func (x *PrepareProviderConfig_Response) Reset() {
- *x = PrepareProviderConfig_Response{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin5_proto_msgTypes[49]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
-}
-
-func (x *PrepareProviderConfig_Response) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*PrepareProviderConfig_Response) ProtoMessage() {}
-
-func (x *PrepareProviderConfig_Response) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin5_proto_msgTypes[49]
- if protoimpl.UnsafeEnabled && x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
+func (x *MoveResourceState_Response) GetDiagnostics() []*Diagnostic {
+ if x != nil {
+ return x.Diagnostics
}
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use PrepareProviderConfig_Response.ProtoReflect.Descriptor instead.
-func (*PrepareProviderConfig_Response) Descriptor() ([]byte, []int) {
- return file_tfplugin5_proto_rawDescGZIP(), []int{13, 1}
+ return nil
}
-func (x *PrepareProviderConfig_Response) GetPreparedConfig() *DynamicValue {
+func (x *MoveResourceState_Response) GetTargetPrivate() []byte {
if x != nil {
- return x.PreparedConfig
+ return x.TargetPrivate
}
return nil
}
-func (x *PrepareProviderConfig_Response) GetDiagnostics() []*Diagnostic {
+func (x *MoveResourceState_Response) GetTargetIdentity() *ResourceIdentityData {
if x != nil {
- return x.Diagnostics
+ return x.TargetIdentity
}
return nil
}
-// Request is the message that is sent to the provider during the
-// UpgradeResourceState RPC.
-//
-// This message intentionally does not include configuration data as any
-// configuration-based or configuration-conditional changes should occur
-// during the PlanResourceChange RPC. Additionally, the configuration is
-// not guaranteed to exist (in the case of resource destruction), be wholly
-// known, nor match the given prior state, which could lead to unexpected
-// provider behaviors for practitioners.
-type UpgradeResourceState_Request struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- TypeName string `protobuf:"bytes,1,opt,name=type_name,json=typeName,proto3" json:"type_name,omitempty"`
- // version is the schema_version number recorded in the state file
- Version int64 `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"`
- // raw_state is the raw states as stored for the resource. Core does
- // not have access to the schema of prior_version, so it's the
- // provider's responsibility to interpret this value using the
- // appropriate older schema. The raw_state will be the json encoded
- // state, or a legacy flat-mapped format.
- RawState *RawState `protobuf:"bytes,3,opt,name=raw_state,json=rawState,proto3" json:"raw_state,omitempty"`
-}
-
-func (x *UpgradeResourceState_Request) Reset() {
- *x = UpgradeResourceState_Request{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin5_proto_msgTypes[50]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+type ReadDataSource_Request struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ TypeName string `protobuf:"bytes,1,opt,name=type_name,json=typeName,proto3" json:"type_name,omitempty"`
+ Config *DynamicValue `protobuf:"bytes,2,opt,name=config,proto3" json:"config,omitempty"`
+ ProviderMeta *DynamicValue `protobuf:"bytes,3,opt,name=provider_meta,json=providerMeta,proto3" json:"provider_meta,omitempty"`
+ ClientCapabilities *ClientCapabilities `protobuf:"bytes,4,opt,name=client_capabilities,json=clientCapabilities,proto3" json:"client_capabilities,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
-func (x *UpgradeResourceState_Request) String() string {
+func (x *ReadDataSource_Request) Reset() {
+ *x = ReadDataSource_Request{}
+ mi := &file_tfplugin5_proto_msgTypes[90]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ReadDataSource_Request) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*UpgradeResourceState_Request) ProtoMessage() {}
+func (*ReadDataSource_Request) ProtoMessage() {}
-func (x *UpgradeResourceState_Request) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin5_proto_msgTypes[50]
- if protoimpl.UnsafeEnabled && x != nil {
+func (x *ReadDataSource_Request) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin5_proto_msgTypes[90]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -2763,65 +4863,66 @@ func (x *UpgradeResourceState_Request) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use UpgradeResourceState_Request.ProtoReflect.Descriptor instead.
-func (*UpgradeResourceState_Request) Descriptor() ([]byte, []int) {
- return file_tfplugin5_proto_rawDescGZIP(), []int{14, 0}
+// Deprecated: Use ReadDataSource_Request.ProtoReflect.Descriptor instead.
+func (*ReadDataSource_Request) Descriptor() ([]byte, []int) {
+ return file_tfplugin5_proto_rawDescGZIP(), []int{26, 0}
}
-func (x *UpgradeResourceState_Request) GetTypeName() string {
+func (x *ReadDataSource_Request) GetTypeName() string {
if x != nil {
return x.TypeName
}
return ""
}
-func (x *UpgradeResourceState_Request) GetVersion() int64 {
+func (x *ReadDataSource_Request) GetConfig() *DynamicValue {
if x != nil {
- return x.Version
+ return x.Config
}
- return 0
+ return nil
}
-func (x *UpgradeResourceState_Request) GetRawState() *RawState {
+func (x *ReadDataSource_Request) GetProviderMeta() *DynamicValue {
if x != nil {
- return x.RawState
+ return x.ProviderMeta
}
return nil
}
-type UpgradeResourceState_Response struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
+func (x *ReadDataSource_Request) GetClientCapabilities() *ClientCapabilities {
+ if x != nil {
+ return x.ClientCapabilities
+ }
+ return nil
+}
- // new_state is a msgpack-encoded data structure that, when interpreted with
- // the _current_ schema for this resource type, is functionally equivalent to
- // that which was given in prior_state_raw.
- UpgradedState *DynamicValue `protobuf:"bytes,1,opt,name=upgraded_state,json=upgradedState,proto3" json:"upgraded_state,omitempty"`
- // diagnostics describes any errors encountered during migration that could not
- // be safely resolved, and warnings about any possibly-risky assumptions made
- // in the upgrade process.
- Diagnostics []*Diagnostic `protobuf:"bytes,2,rep,name=diagnostics,proto3" json:"diagnostics,omitempty"`
+type ReadDataSource_Response struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ State *DynamicValue `protobuf:"bytes,1,opt,name=state,proto3" json:"state,omitempty"`
+ Diagnostics []*Diagnostic `protobuf:"bytes,2,rep,name=diagnostics,proto3" json:"diagnostics,omitempty"`
+ // deferred is set if the provider is deferring the change. If set the caller
+ // needs to handle the deferral.
+ Deferred *Deferred `protobuf:"bytes,3,opt,name=deferred,proto3" json:"deferred,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
-func (x *UpgradeResourceState_Response) Reset() {
- *x = UpgradeResourceState_Response{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin5_proto_msgTypes[51]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+func (x *ReadDataSource_Response) Reset() {
+ *x = ReadDataSource_Response{}
+ mi := &file_tfplugin5_proto_msgTypes[91]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
-func (x *UpgradeResourceState_Response) String() string {
+func (x *ReadDataSource_Response) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*UpgradeResourceState_Response) ProtoMessage() {}
+func (*ReadDataSource_Response) ProtoMessage() {}
-func (x *UpgradeResourceState_Response) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin5_proto_msgTypes[51]
- if protoimpl.UnsafeEnabled && x != nil {
+func (x *ReadDataSource_Response) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin5_proto_msgTypes[91]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -2831,52 +4932,54 @@ func (x *UpgradeResourceState_Response) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use UpgradeResourceState_Response.ProtoReflect.Descriptor instead.
-func (*UpgradeResourceState_Response) Descriptor() ([]byte, []int) {
- return file_tfplugin5_proto_rawDescGZIP(), []int{14, 1}
+// Deprecated: Use ReadDataSource_Response.ProtoReflect.Descriptor instead.
+func (*ReadDataSource_Response) Descriptor() ([]byte, []int) {
+ return file_tfplugin5_proto_rawDescGZIP(), []int{26, 1}
}
-func (x *UpgradeResourceState_Response) GetUpgradedState() *DynamicValue {
+func (x *ReadDataSource_Response) GetState() *DynamicValue {
if x != nil {
- return x.UpgradedState
+ return x.State
}
return nil
}
-func (x *UpgradeResourceState_Response) GetDiagnostics() []*Diagnostic {
+func (x *ReadDataSource_Response) GetDiagnostics() []*Diagnostic {
if x != nil {
return x.Diagnostics
}
return nil
}
-type ValidateResourceTypeConfig_Request struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
+func (x *ReadDataSource_Response) GetDeferred() *Deferred {
+ if x != nil {
+ return x.Deferred
+ }
+ return nil
+}
- TypeName string `protobuf:"bytes,1,opt,name=type_name,json=typeName,proto3" json:"type_name,omitempty"`
- Config *DynamicValue `protobuf:"bytes,2,opt,name=config,proto3" json:"config,omitempty"`
+type GetProvisionerSchema_Request struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
-func (x *ValidateResourceTypeConfig_Request) Reset() {
- *x = ValidateResourceTypeConfig_Request{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin5_proto_msgTypes[52]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+func (x *GetProvisionerSchema_Request) Reset() {
+ *x = GetProvisionerSchema_Request{}
+ mi := &file_tfplugin5_proto_msgTypes[92]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
-func (x *ValidateResourceTypeConfig_Request) String() string {
+func (x *GetProvisionerSchema_Request) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*ValidateResourceTypeConfig_Request) ProtoMessage() {}
+func (*GetProvisionerSchema_Request) ProtoMessage() {}
-func (x *ValidateResourceTypeConfig_Request) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin5_proto_msgTypes[52]
- if protoimpl.UnsafeEnabled && x != nil {
+func (x *GetProvisionerSchema_Request) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin5_proto_msgTypes[92]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -2886,51 +4989,35 @@ func (x *ValidateResourceTypeConfig_Request) ProtoReflect() protoreflect.Message
return mi.MessageOf(x)
}
-// Deprecated: Use ValidateResourceTypeConfig_Request.ProtoReflect.Descriptor instead.
-func (*ValidateResourceTypeConfig_Request) Descriptor() ([]byte, []int) {
- return file_tfplugin5_proto_rawDescGZIP(), []int{15, 0}
-}
-
-func (x *ValidateResourceTypeConfig_Request) GetTypeName() string {
- if x != nil {
- return x.TypeName
- }
- return ""
-}
-
-func (x *ValidateResourceTypeConfig_Request) GetConfig() *DynamicValue {
- if x != nil {
- return x.Config
- }
- return nil
+// Deprecated: Use GetProvisionerSchema_Request.ProtoReflect.Descriptor instead.
+func (*GetProvisionerSchema_Request) Descriptor() ([]byte, []int) {
+ return file_tfplugin5_proto_rawDescGZIP(), []int{27, 0}
}
-type ValidateResourceTypeConfig_Response struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+type GetProvisionerSchema_Response struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Provisioner *Schema `protobuf:"bytes,1,opt,name=provisioner,proto3" json:"provisioner,omitempty"`
+ Diagnostics []*Diagnostic `protobuf:"bytes,2,rep,name=diagnostics,proto3" json:"diagnostics,omitempty"`
unknownFields protoimpl.UnknownFields
-
- Diagnostics []*Diagnostic `protobuf:"bytes,1,rep,name=diagnostics,proto3" json:"diagnostics,omitempty"`
+ sizeCache protoimpl.SizeCache
}
-func (x *ValidateResourceTypeConfig_Response) Reset() {
- *x = ValidateResourceTypeConfig_Response{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin5_proto_msgTypes[53]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+func (x *GetProvisionerSchema_Response) Reset() {
+ *x = GetProvisionerSchema_Response{}
+ mi := &file_tfplugin5_proto_msgTypes[93]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
-func (x *ValidateResourceTypeConfig_Response) String() string {
+func (x *GetProvisionerSchema_Response) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*ValidateResourceTypeConfig_Response) ProtoMessage() {}
+func (*GetProvisionerSchema_Response) ProtoMessage() {}
-func (x *ValidateResourceTypeConfig_Response) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin5_proto_msgTypes[53]
- if protoimpl.UnsafeEnabled && x != nil {
+func (x *GetProvisionerSchema_Response) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin5_proto_msgTypes[93]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -2940,45 +5027,48 @@ func (x *ValidateResourceTypeConfig_Response) ProtoReflect() protoreflect.Messag
return mi.MessageOf(x)
}
-// Deprecated: Use ValidateResourceTypeConfig_Response.ProtoReflect.Descriptor instead.
-func (*ValidateResourceTypeConfig_Response) Descriptor() ([]byte, []int) {
- return file_tfplugin5_proto_rawDescGZIP(), []int{15, 1}
+// Deprecated: Use GetProvisionerSchema_Response.ProtoReflect.Descriptor instead.
+func (*GetProvisionerSchema_Response) Descriptor() ([]byte, []int) {
+ return file_tfplugin5_proto_rawDescGZIP(), []int{27, 1}
}
-func (x *ValidateResourceTypeConfig_Response) GetDiagnostics() []*Diagnostic {
+func (x *GetProvisionerSchema_Response) GetProvisioner() *Schema {
+ if x != nil {
+ return x.Provisioner
+ }
+ return nil
+}
+
+func (x *GetProvisionerSchema_Response) GetDiagnostics() []*Diagnostic {
if x != nil {
return x.Diagnostics
}
return nil
}
-type ValidateDataSourceConfig_Request struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+type ValidateProvisionerConfig_Request struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Config *DynamicValue `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"`
unknownFields protoimpl.UnknownFields
-
- TypeName string `protobuf:"bytes,1,opt,name=type_name,json=typeName,proto3" json:"type_name,omitempty"`
- Config *DynamicValue `protobuf:"bytes,2,opt,name=config,proto3" json:"config,omitempty"`
+ sizeCache protoimpl.SizeCache
}
-func (x *ValidateDataSourceConfig_Request) Reset() {
- *x = ValidateDataSourceConfig_Request{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin5_proto_msgTypes[54]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+func (x *ValidateProvisionerConfig_Request) Reset() {
+ *x = ValidateProvisionerConfig_Request{}
+ mi := &file_tfplugin5_proto_msgTypes[94]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
-func (x *ValidateDataSourceConfig_Request) String() string {
+func (x *ValidateProvisionerConfig_Request) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*ValidateDataSourceConfig_Request) ProtoMessage() {}
+func (*ValidateProvisionerConfig_Request) ProtoMessage() {}
-func (x *ValidateDataSourceConfig_Request) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin5_proto_msgTypes[54]
- if protoimpl.UnsafeEnabled && x != nil {
+func (x *ValidateProvisionerConfig_Request) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin5_proto_msgTypes[94]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -2988,51 +5078,41 @@ func (x *ValidateDataSourceConfig_Request) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use ValidateDataSourceConfig_Request.ProtoReflect.Descriptor instead.
-func (*ValidateDataSourceConfig_Request) Descriptor() ([]byte, []int) {
- return file_tfplugin5_proto_rawDescGZIP(), []int{16, 0}
-}
-
-func (x *ValidateDataSourceConfig_Request) GetTypeName() string {
- if x != nil {
- return x.TypeName
- }
- return ""
+// Deprecated: Use ValidateProvisionerConfig_Request.ProtoReflect.Descriptor instead.
+func (*ValidateProvisionerConfig_Request) Descriptor() ([]byte, []int) {
+ return file_tfplugin5_proto_rawDescGZIP(), []int{28, 0}
}
-func (x *ValidateDataSourceConfig_Request) GetConfig() *DynamicValue {
+func (x *ValidateProvisionerConfig_Request) GetConfig() *DynamicValue {
if x != nil {
return x.Config
}
return nil
}
-type ValidateDataSourceConfig_Response struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+type ValidateProvisionerConfig_Response struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Diagnostics []*Diagnostic `protobuf:"bytes,1,rep,name=diagnostics,proto3" json:"diagnostics,omitempty"`
unknownFields protoimpl.UnknownFields
-
- Diagnostics []*Diagnostic `protobuf:"bytes,1,rep,name=diagnostics,proto3" json:"diagnostics,omitempty"`
+ sizeCache protoimpl.SizeCache
}
-func (x *ValidateDataSourceConfig_Response) Reset() {
- *x = ValidateDataSourceConfig_Response{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin5_proto_msgTypes[55]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+func (x *ValidateProvisionerConfig_Response) Reset() {
+ *x = ValidateProvisionerConfig_Response{}
+ mi := &file_tfplugin5_proto_msgTypes[95]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
-func (x *ValidateDataSourceConfig_Response) String() string {
+func (x *ValidateProvisionerConfig_Response) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*ValidateDataSourceConfig_Response) ProtoMessage() {}
+func (*ValidateProvisionerConfig_Response) ProtoMessage() {}
-func (x *ValidateDataSourceConfig_Response) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin5_proto_msgTypes[55]
- if protoimpl.UnsafeEnabled && x != nil {
+func (x *ValidateProvisionerConfig_Response) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin5_proto_msgTypes[95]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -3042,46 +5122,42 @@ func (x *ValidateDataSourceConfig_Response) ProtoReflect() protoreflect.Message
return mi.MessageOf(x)
}
-// Deprecated: Use ValidateDataSourceConfig_Response.ProtoReflect.Descriptor instead.
-func (*ValidateDataSourceConfig_Response) Descriptor() ([]byte, []int) {
- return file_tfplugin5_proto_rawDescGZIP(), []int{16, 1}
+// Deprecated: Use ValidateProvisionerConfig_Response.ProtoReflect.Descriptor instead.
+func (*ValidateProvisionerConfig_Response) Descriptor() ([]byte, []int) {
+ return file_tfplugin5_proto_rawDescGZIP(), []int{28, 1}
}
-func (x *ValidateDataSourceConfig_Response) GetDiagnostics() []*Diagnostic {
+func (x *ValidateProvisionerConfig_Response) GetDiagnostics() []*Diagnostic {
if x != nil {
return x.Diagnostics
}
return nil
}
-type Configure_Request struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+type ProvisionResource_Request struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Config *DynamicValue `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"`
+ Connection *DynamicValue `protobuf:"bytes,2,opt,name=connection,proto3" json:"connection,omitempty"`
unknownFields protoimpl.UnknownFields
-
- TerraformVersion string `protobuf:"bytes,1,opt,name=terraform_version,json=terraformVersion,proto3" json:"terraform_version,omitempty"`
- Config *DynamicValue `protobuf:"bytes,2,opt,name=config,proto3" json:"config,omitempty"`
- ClientCapabilities *ClientCapabilities `protobuf:"bytes,3,opt,name=client_capabilities,json=clientCapabilities,proto3" json:"client_capabilities,omitempty"`
+ sizeCache protoimpl.SizeCache
}
-func (x *Configure_Request) Reset() {
- *x = Configure_Request{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin5_proto_msgTypes[56]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+func (x *ProvisionResource_Request) Reset() {
+ *x = ProvisionResource_Request{}
+ mi := &file_tfplugin5_proto_msgTypes[96]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
-func (x *Configure_Request) String() string {
+func (x *ProvisionResource_Request) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*Configure_Request) ProtoMessage() {}
+func (*ProvisionResource_Request) ProtoMessage() {}
-func (x *Configure_Request) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin5_proto_msgTypes[56]
- if protoimpl.UnsafeEnabled && x != nil {
+func (x *ProvisionResource_Request) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin5_proto_msgTypes[96]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -3091,58 +5167,49 @@ func (x *Configure_Request) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use Configure_Request.ProtoReflect.Descriptor instead.
-func (*Configure_Request) Descriptor() ([]byte, []int) {
- return file_tfplugin5_proto_rawDescGZIP(), []int{17, 0}
-}
-
-func (x *Configure_Request) GetTerraformVersion() string {
- if x != nil {
- return x.TerraformVersion
- }
- return ""
+// Deprecated: Use ProvisionResource_Request.ProtoReflect.Descriptor instead.
+func (*ProvisionResource_Request) Descriptor() ([]byte, []int) {
+ return file_tfplugin5_proto_rawDescGZIP(), []int{29, 0}
}
-func (x *Configure_Request) GetConfig() *DynamicValue {
+func (x *ProvisionResource_Request) GetConfig() *DynamicValue {
if x != nil {
return x.Config
}
return nil
}
-func (x *Configure_Request) GetClientCapabilities() *ClientCapabilities {
+func (x *ProvisionResource_Request) GetConnection() *DynamicValue {
if x != nil {
- return x.ClientCapabilities
+ return x.Connection
}
return nil
}
-type Configure_Response struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+type ProvisionResource_Response struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Output string `protobuf:"bytes,1,opt,name=output,proto3" json:"output,omitempty"`
+ Diagnostics []*Diagnostic `protobuf:"bytes,2,rep,name=diagnostics,proto3" json:"diagnostics,omitempty"`
unknownFields protoimpl.UnknownFields
-
- Diagnostics []*Diagnostic `protobuf:"bytes,1,rep,name=diagnostics,proto3" json:"diagnostics,omitempty"`
+ sizeCache protoimpl.SizeCache
}
-func (x *Configure_Response) Reset() {
- *x = Configure_Response{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin5_proto_msgTypes[57]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+func (x *ProvisionResource_Response) Reset() {
+ *x = ProvisionResource_Response{}
+ mi := &file_tfplugin5_proto_msgTypes[97]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
-func (x *Configure_Response) String() string {
+func (x *ProvisionResource_Response) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*Configure_Response) ProtoMessage() {}
+func (*ProvisionResource_Response) ProtoMessage() {}
-func (x *Configure_Response) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin5_proto_msgTypes[57]
- if protoimpl.UnsafeEnabled && x != nil {
+func (x *ProvisionResource_Response) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin5_proto_msgTypes[97]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -3152,56 +5219,47 @@ func (x *Configure_Response) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use Configure_Response.ProtoReflect.Descriptor instead.
-func (*Configure_Response) Descriptor() ([]byte, []int) {
- return file_tfplugin5_proto_rawDescGZIP(), []int{17, 1}
+// Deprecated: Use ProvisionResource_Response.ProtoReflect.Descriptor instead.
+func (*ProvisionResource_Response) Descriptor() ([]byte, []int) {
+ return file_tfplugin5_proto_rawDescGZIP(), []int{29, 1}
}
-func (x *Configure_Response) GetDiagnostics() []*Diagnostic {
+func (x *ProvisionResource_Response) GetOutput() string {
+ if x != nil {
+ return x.Output
+ }
+ return ""
+}
+
+func (x *ProvisionResource_Response) GetDiagnostics() []*Diagnostic {
if x != nil {
return x.Diagnostics
}
return nil
}
-// Request is the message that is sent to the provider during the
-// ReadResource RPC.
-//
-// This message intentionally does not include configuration data as any
-// configuration-based or configuration-conditional changes should occur
-// during the PlanResourceChange RPC. Additionally, the configuration is
-// not guaranteed to be wholly known nor match the given prior state, which
-// could lead to unexpected provider behaviors for practitioners.
-type ReadResource_Request struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+type GetFunctions_Request struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
unknownFields protoimpl.UnknownFields
-
- TypeName string `protobuf:"bytes,1,opt,name=type_name,json=typeName,proto3" json:"type_name,omitempty"`
- CurrentState *DynamicValue `protobuf:"bytes,2,opt,name=current_state,json=currentState,proto3" json:"current_state,omitempty"`
- Private []byte `protobuf:"bytes,3,opt,name=private,proto3" json:"private,omitempty"`
- ProviderMeta *DynamicValue `protobuf:"bytes,4,opt,name=provider_meta,json=providerMeta,proto3" json:"provider_meta,omitempty"`
- ClientCapabilities *ClientCapabilities `protobuf:"bytes,5,opt,name=client_capabilities,json=clientCapabilities,proto3" json:"client_capabilities,omitempty"`
+ sizeCache protoimpl.SizeCache
}
-func (x *ReadResource_Request) Reset() {
- *x = ReadResource_Request{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin5_proto_msgTypes[58]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+func (x *GetFunctions_Request) Reset() {
+ *x = GetFunctions_Request{}
+ mi := &file_tfplugin5_proto_msgTypes[98]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
-func (x *ReadResource_Request) String() string {
+func (x *GetFunctions_Request) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*ReadResource_Request) ProtoMessage() {}
+func (*GetFunctions_Request) ProtoMessage() {}
-func (x *ReadResource_Request) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin5_proto_msgTypes[58]
- if protoimpl.UnsafeEnabled && x != nil {
+func (x *GetFunctions_Request) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin5_proto_msgTypes[98]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -3211,77 +5269,91 @@ func (x *ReadResource_Request) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use ReadResource_Request.ProtoReflect.Descriptor instead.
-func (*ReadResource_Request) Descriptor() ([]byte, []int) {
- return file_tfplugin5_proto_rawDescGZIP(), []int{18, 0}
+// Deprecated: Use GetFunctions_Request.ProtoReflect.Descriptor instead.
+func (*GetFunctions_Request) Descriptor() ([]byte, []int) {
+ return file_tfplugin5_proto_rawDescGZIP(), []int{30, 0}
}
-func (x *ReadResource_Request) GetTypeName() string {
- if x != nil {
- return x.TypeName
- }
- return ""
+type GetFunctions_Response struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // functions is a mapping of function names to definitions.
+ Functions map[string]*Function `protobuf:"bytes,1,rep,name=functions,proto3" json:"functions,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
+ // diagnostics is any warnings or errors.
+ Diagnostics []*Diagnostic `protobuf:"bytes,2,rep,name=diagnostics,proto3" json:"diagnostics,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
-func (x *ReadResource_Request) GetCurrentState() *DynamicValue {
- if x != nil {
- return x.CurrentState
- }
- return nil
+func (x *GetFunctions_Response) Reset() {
+ *x = GetFunctions_Response{}
+ mi := &file_tfplugin5_proto_msgTypes[99]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
-func (x *ReadResource_Request) GetPrivate() []byte {
+func (x *GetFunctions_Response) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetFunctions_Response) ProtoMessage() {}
+
+func (x *GetFunctions_Response) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin5_proto_msgTypes[99]
if x != nil {
- return x.Private
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
}
- return nil
+ return mi.MessageOf(x)
}
-func (x *ReadResource_Request) GetProviderMeta() *DynamicValue {
+// Deprecated: Use GetFunctions_Response.ProtoReflect.Descriptor instead.
+func (*GetFunctions_Response) Descriptor() ([]byte, []int) {
+ return file_tfplugin5_proto_rawDescGZIP(), []int{30, 1}
+}
+
+func (x *GetFunctions_Response) GetFunctions() map[string]*Function {
if x != nil {
- return x.ProviderMeta
+ return x.Functions
}
return nil
}
-func (x *ReadResource_Request) GetClientCapabilities() *ClientCapabilities {
+func (x *GetFunctions_Response) GetDiagnostics() []*Diagnostic {
if x != nil {
- return x.ClientCapabilities
+ return x.Diagnostics
}
return nil
}
-type ReadResource_Response struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+type CallFunction_Request struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // name is the name of the function being called.
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ // arguments is the data of each function argument value.
+ Arguments []*DynamicValue `protobuf:"bytes,2,rep,name=arguments,proto3" json:"arguments,omitempty"`
unknownFields protoimpl.UnknownFields
-
- NewState *DynamicValue `protobuf:"bytes,1,opt,name=new_state,json=newState,proto3" json:"new_state,omitempty"`
- Diagnostics []*Diagnostic `protobuf:"bytes,2,rep,name=diagnostics,proto3" json:"diagnostics,omitempty"`
- Private []byte `protobuf:"bytes,3,opt,name=private,proto3" json:"private,omitempty"`
- // deferred is set if the provider is deferring the change. If set the caller
- // needs to handle the deferral.
- Deferred *Deferred `protobuf:"bytes,4,opt,name=deferred,proto3" json:"deferred,omitempty"`
+ sizeCache protoimpl.SizeCache
}
-func (x *ReadResource_Response) Reset() {
- *x = ReadResource_Response{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin5_proto_msgTypes[59]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+func (x *CallFunction_Request) Reset() {
+ *x = CallFunction_Request{}
+ mi := &file_tfplugin5_proto_msgTypes[101]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
-func (x *ReadResource_Response) String() string {
+func (x *CallFunction_Request) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*ReadResource_Response) ProtoMessage() {}
+func (*CallFunction_Request) ProtoMessage() {}
-func (x *ReadResource_Response) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin5_proto_msgTypes[59]
- if protoimpl.UnsafeEnabled && x != nil {
+func (x *CallFunction_Request) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin5_proto_msgTypes[101]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -3291,71 +5363,51 @@ func (x *ReadResource_Response) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use ReadResource_Response.ProtoReflect.Descriptor instead.
-func (*ReadResource_Response) Descriptor() ([]byte, []int) {
- return file_tfplugin5_proto_rawDescGZIP(), []int{18, 1}
-}
-
-func (x *ReadResource_Response) GetNewState() *DynamicValue {
- if x != nil {
- return x.NewState
- }
- return nil
-}
-
-func (x *ReadResource_Response) GetDiagnostics() []*Diagnostic {
- if x != nil {
- return x.Diagnostics
- }
- return nil
+// Deprecated: Use CallFunction_Request.ProtoReflect.Descriptor instead.
+func (*CallFunction_Request) Descriptor() ([]byte, []int) {
+ return file_tfplugin5_proto_rawDescGZIP(), []int{31, 0}
}
-func (x *ReadResource_Response) GetPrivate() []byte {
+func (x *CallFunction_Request) GetName() string {
if x != nil {
- return x.Private
+ return x.Name
}
- return nil
+ return ""
}
-func (x *ReadResource_Response) GetDeferred() *Deferred {
+func (x *CallFunction_Request) GetArguments() []*DynamicValue {
if x != nil {
- return x.Deferred
+ return x.Arguments
}
return nil
}
-type PlanResourceChange_Request struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+type CallFunction_Response struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // result is result value after running the function logic.
+ Result *DynamicValue `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"`
+ // error is any error from the function logic.
+ Error *FunctionError `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
unknownFields protoimpl.UnknownFields
-
- TypeName string `protobuf:"bytes,1,opt,name=type_name,json=typeName,proto3" json:"type_name,omitempty"`
- PriorState *DynamicValue `protobuf:"bytes,2,opt,name=prior_state,json=priorState,proto3" json:"prior_state,omitempty"`
- ProposedNewState *DynamicValue `protobuf:"bytes,3,opt,name=proposed_new_state,json=proposedNewState,proto3" json:"proposed_new_state,omitempty"`
- Config *DynamicValue `protobuf:"bytes,4,opt,name=config,proto3" json:"config,omitempty"`
- PriorPrivate []byte `protobuf:"bytes,5,opt,name=prior_private,json=priorPrivate,proto3" json:"prior_private,omitempty"`
- ProviderMeta *DynamicValue `protobuf:"bytes,6,opt,name=provider_meta,json=providerMeta,proto3" json:"provider_meta,omitempty"`
- ClientCapabilities *ClientCapabilities `protobuf:"bytes,7,opt,name=client_capabilities,json=clientCapabilities,proto3" json:"client_capabilities,omitempty"`
+ sizeCache protoimpl.SizeCache
}
-func (x *PlanResourceChange_Request) Reset() {
- *x = PlanResourceChange_Request{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin5_proto_msgTypes[60]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+func (x *CallFunction_Response) Reset() {
+ *x = CallFunction_Response{}
+ mi := &file_tfplugin5_proto_msgTypes[102]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
-func (x *PlanResourceChange_Request) String() string {
+func (x *CallFunction_Response) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*PlanResourceChange_Request) ProtoMessage() {}
+func (*CallFunction_Response) ProtoMessage() {}
-func (x *PlanResourceChange_Request) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin5_proto_msgTypes[60]
- if protoimpl.UnsafeEnabled && x != nil {
+func (x *CallFunction_Response) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin5_proto_msgTypes[102]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -3365,104 +5417,100 @@ func (x *PlanResourceChange_Request) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use PlanResourceChange_Request.ProtoReflect.Descriptor instead.
-func (*PlanResourceChange_Request) Descriptor() ([]byte, []int) {
- return file_tfplugin5_proto_rawDescGZIP(), []int{19, 0}
-}
-
-func (x *PlanResourceChange_Request) GetTypeName() string {
- if x != nil {
- return x.TypeName
- }
- return ""
+// Deprecated: Use CallFunction_Response.ProtoReflect.Descriptor instead.
+func (*CallFunction_Response) Descriptor() ([]byte, []int) {
+ return file_tfplugin5_proto_rawDescGZIP(), []int{31, 1}
}
-func (x *PlanResourceChange_Request) GetPriorState() *DynamicValue {
+func (x *CallFunction_Response) GetResult() *DynamicValue {
if x != nil {
- return x.PriorState
+ return x.Result
}
return nil
}
-func (x *PlanResourceChange_Request) GetProposedNewState() *DynamicValue {
+func (x *CallFunction_Response) GetError() *FunctionError {
if x != nil {
- return x.ProposedNewState
+ return x.Error
}
return nil
}
-func (x *PlanResourceChange_Request) GetConfig() *DynamicValue {
- if x != nil {
- return x.Config
- }
- return nil
+type ValidateEphemeralResourceConfig_Request struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ TypeName string `protobuf:"bytes,1,opt,name=type_name,json=typeName,proto3" json:"type_name,omitempty"`
+ Config *DynamicValue `protobuf:"bytes,2,opt,name=config,proto3" json:"config,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
-func (x *PlanResourceChange_Request) GetPriorPrivate() []byte {
- if x != nil {
- return x.PriorPrivate
- }
- return nil
+func (x *ValidateEphemeralResourceConfig_Request) Reset() {
+ *x = ValidateEphemeralResourceConfig_Request{}
+ mi := &file_tfplugin5_proto_msgTypes[103]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
-func (x *PlanResourceChange_Request) GetProviderMeta() *DynamicValue {
- if x != nil {
- return x.ProviderMeta
- }
- return nil
+func (x *ValidateEphemeralResourceConfig_Request) String() string {
+ return protoimpl.X.MessageStringOf(x)
}
-func (x *PlanResourceChange_Request) GetClientCapabilities() *ClientCapabilities {
+func (*ValidateEphemeralResourceConfig_Request) ProtoMessage() {}
+
+func (x *ValidateEphemeralResourceConfig_Request) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin5_proto_msgTypes[103]
if x != nil {
- return x.ClientCapabilities
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
}
- return nil
+ return mi.MessageOf(x)
}
-type PlanResourceChange_Response struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
+// Deprecated: Use ValidateEphemeralResourceConfig_Request.ProtoReflect.Descriptor instead.
+func (*ValidateEphemeralResourceConfig_Request) Descriptor() ([]byte, []int) {
+ return file_tfplugin5_proto_rawDescGZIP(), []int{32, 0}
+}
- PlannedState *DynamicValue `protobuf:"bytes,1,opt,name=planned_state,json=plannedState,proto3" json:"planned_state,omitempty"`
- RequiresReplace []*AttributePath `protobuf:"bytes,2,rep,name=requires_replace,json=requiresReplace,proto3" json:"requires_replace,omitempty"`
- PlannedPrivate []byte `protobuf:"bytes,3,opt,name=planned_private,json=plannedPrivate,proto3" json:"planned_private,omitempty"`
- Diagnostics []*Diagnostic `protobuf:"bytes,4,rep,name=diagnostics,proto3" json:"diagnostics,omitempty"`
- // This may be set only by the helper/schema "SDK" in the main Terraform
- // repository, to request that Terraform Core >=0.12 permit additional
- // inconsistencies that can result from the legacy SDK type system
- // and its imprecise mapping to the >=0.12 type system.
- // The change in behavior implied by this flag makes sense only for the
- // specific details of the legacy SDK type system, and are not a general
- // mechanism to avoid proper type handling in providers.
- //
- // ==== DO NOT USE THIS ====
- // ==== THIS MUST BE LEFT UNSET IN ALL OTHER SDKS ====
- // ==== DO NOT USE THIS ====
- LegacyTypeSystem bool `protobuf:"varint,5,opt,name=legacy_type_system,json=legacyTypeSystem,proto3" json:"legacy_type_system,omitempty"`
- // deferred is set if the provider is deferring the change. If set the caller
- // needs to handle the deferral.
- Deferred *Deferred `protobuf:"bytes,6,opt,name=deferred,proto3" json:"deferred,omitempty"`
+func (x *ValidateEphemeralResourceConfig_Request) GetTypeName() string {
+ if x != nil {
+ return x.TypeName
+ }
+ return ""
}
-func (x *PlanResourceChange_Response) Reset() {
- *x = PlanResourceChange_Response{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin5_proto_msgTypes[61]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
+func (x *ValidateEphemeralResourceConfig_Request) GetConfig() *DynamicValue {
+ if x != nil {
+ return x.Config
}
+ return nil
}
-func (x *PlanResourceChange_Response) String() string {
+type ValidateEphemeralResourceConfig_Response struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Diagnostics []*Diagnostic `protobuf:"bytes,1,rep,name=diagnostics,proto3" json:"diagnostics,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *ValidateEphemeralResourceConfig_Response) Reset() {
+ *x = ValidateEphemeralResourceConfig_Response{}
+ mi := &file_tfplugin5_proto_msgTypes[104]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ValidateEphemeralResourceConfig_Response) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*PlanResourceChange_Response) ProtoMessage() {}
+func (*ValidateEphemeralResourceConfig_Response) ProtoMessage() {}
-func (x *PlanResourceChange_Response) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin5_proto_msgTypes[61]
- if protoimpl.UnsafeEnabled && x != nil {
+func (x *ValidateEphemeralResourceConfig_Response) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin5_proto_msgTypes[104]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -3472,84 +5520,107 @@ func (x *PlanResourceChange_Response) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use PlanResourceChange_Response.ProtoReflect.Descriptor instead.
-func (*PlanResourceChange_Response) Descriptor() ([]byte, []int) {
- return file_tfplugin5_proto_rawDescGZIP(), []int{19, 1}
+// Deprecated: Use ValidateEphemeralResourceConfig_Response.ProtoReflect.Descriptor instead.
+func (*ValidateEphemeralResourceConfig_Response) Descriptor() ([]byte, []int) {
+ return file_tfplugin5_proto_rawDescGZIP(), []int{32, 1}
}
-func (x *PlanResourceChange_Response) GetPlannedState() *DynamicValue {
+func (x *ValidateEphemeralResourceConfig_Response) GetDiagnostics() []*Diagnostic {
if x != nil {
- return x.PlannedState
+ return x.Diagnostics
}
return nil
}
-func (x *PlanResourceChange_Response) GetRequiresReplace() []*AttributePath {
- if x != nil {
- return x.RequiresReplace
- }
- return nil
+type OpenEphemeralResource_Request struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ TypeName string `protobuf:"bytes,1,opt,name=type_name,json=typeName,proto3" json:"type_name,omitempty"`
+ Config *DynamicValue `protobuf:"bytes,2,opt,name=config,proto3" json:"config,omitempty"`
+ ClientCapabilities *ClientCapabilities `protobuf:"bytes,3,opt,name=client_capabilities,json=clientCapabilities,proto3" json:"client_capabilities,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
-func (x *PlanResourceChange_Response) GetPlannedPrivate() []byte {
+func (x *OpenEphemeralResource_Request) Reset() {
+ *x = OpenEphemeralResource_Request{}
+ mi := &file_tfplugin5_proto_msgTypes[105]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *OpenEphemeralResource_Request) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*OpenEphemeralResource_Request) ProtoMessage() {}
+
+func (x *OpenEphemeralResource_Request) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin5_proto_msgTypes[105]
if x != nil {
- return x.PlannedPrivate
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
}
- return nil
+ return mi.MessageOf(x)
}
-func (x *PlanResourceChange_Response) GetDiagnostics() []*Diagnostic {
+// Deprecated: Use OpenEphemeralResource_Request.ProtoReflect.Descriptor instead.
+func (*OpenEphemeralResource_Request) Descriptor() ([]byte, []int) {
+ return file_tfplugin5_proto_rawDescGZIP(), []int{33, 0}
+}
+
+func (x *OpenEphemeralResource_Request) GetTypeName() string {
if x != nil {
- return x.Diagnostics
+ return x.TypeName
}
- return nil
+ return ""
}
-func (x *PlanResourceChange_Response) GetLegacyTypeSystem() bool {
+func (x *OpenEphemeralResource_Request) GetConfig() *DynamicValue {
if x != nil {
- return x.LegacyTypeSystem
+ return x.Config
}
- return false
+ return nil
}
-func (x *PlanResourceChange_Response) GetDeferred() *Deferred {
+func (x *OpenEphemeralResource_Request) GetClientCapabilities() *ClientCapabilities {
if x != nil {
- return x.Deferred
+ return x.ClientCapabilities
}
return nil
}
-type ApplyResourceChange_Request struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+type OpenEphemeralResource_Response struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Diagnostics []*Diagnostic `protobuf:"bytes,1,rep,name=diagnostics,proto3" json:"diagnostics,omitempty"`
+ RenewAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=renew_at,json=renewAt,proto3,oneof" json:"renew_at,omitempty"`
+ Result *DynamicValue `protobuf:"bytes,3,opt,name=result,proto3" json:"result,omitempty"`
+ Private []byte `protobuf:"bytes,4,opt,name=private,proto3,oneof" json:"private,omitempty"`
+ // deferred is set if the provider is deferring the change. If set the caller
+ // needs to handle the deferral.
+ Deferred *Deferred `protobuf:"bytes,5,opt,name=deferred,proto3" json:"deferred,omitempty"`
unknownFields protoimpl.UnknownFields
-
- TypeName string `protobuf:"bytes,1,opt,name=type_name,json=typeName,proto3" json:"type_name,omitempty"`
- PriorState *DynamicValue `protobuf:"bytes,2,opt,name=prior_state,json=priorState,proto3" json:"prior_state,omitempty"`
- PlannedState *DynamicValue `protobuf:"bytes,3,opt,name=planned_state,json=plannedState,proto3" json:"planned_state,omitempty"`
- Config *DynamicValue `protobuf:"bytes,4,opt,name=config,proto3" json:"config,omitempty"`
- PlannedPrivate []byte `protobuf:"bytes,5,opt,name=planned_private,json=plannedPrivate,proto3" json:"planned_private,omitempty"`
- ProviderMeta *DynamicValue `protobuf:"bytes,6,opt,name=provider_meta,json=providerMeta,proto3" json:"provider_meta,omitempty"`
+ sizeCache protoimpl.SizeCache
}
-func (x *ApplyResourceChange_Request) Reset() {
- *x = ApplyResourceChange_Request{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin5_proto_msgTypes[62]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+func (x *OpenEphemeralResource_Response) Reset() {
+ *x = OpenEphemeralResource_Response{}
+ mi := &file_tfplugin5_proto_msgTypes[106]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
-func (x *ApplyResourceChange_Request) String() string {
+func (x *OpenEphemeralResource_Response) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*ApplyResourceChange_Request) ProtoMessage() {}
+func (*OpenEphemeralResource_Response) ProtoMessage() {}
-func (x *ApplyResourceChange_Request) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin5_proto_msgTypes[62]
- if protoimpl.UnsafeEnabled && x != nil {
+func (x *OpenEphemeralResource_Response) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin5_proto_msgTypes[106]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -3559,93 +5630,70 @@ func (x *ApplyResourceChange_Request) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use ApplyResourceChange_Request.ProtoReflect.Descriptor instead.
-func (*ApplyResourceChange_Request) Descriptor() ([]byte, []int) {
- return file_tfplugin5_proto_rawDescGZIP(), []int{20, 0}
-}
-
-func (x *ApplyResourceChange_Request) GetTypeName() string {
- if x != nil {
- return x.TypeName
- }
- return ""
+// Deprecated: Use OpenEphemeralResource_Response.ProtoReflect.Descriptor instead.
+func (*OpenEphemeralResource_Response) Descriptor() ([]byte, []int) {
+ return file_tfplugin5_proto_rawDescGZIP(), []int{33, 1}
}
-func (x *ApplyResourceChange_Request) GetPriorState() *DynamicValue {
+func (x *OpenEphemeralResource_Response) GetDiagnostics() []*Diagnostic {
if x != nil {
- return x.PriorState
+ return x.Diagnostics
}
return nil
}
-func (x *ApplyResourceChange_Request) GetPlannedState() *DynamicValue {
+func (x *OpenEphemeralResource_Response) GetRenewAt() *timestamppb.Timestamp {
if x != nil {
- return x.PlannedState
+ return x.RenewAt
}
return nil
}
-func (x *ApplyResourceChange_Request) GetConfig() *DynamicValue {
+func (x *OpenEphemeralResource_Response) GetResult() *DynamicValue {
if x != nil {
- return x.Config
+ return x.Result
}
return nil
}
-func (x *ApplyResourceChange_Request) GetPlannedPrivate() []byte {
+func (x *OpenEphemeralResource_Response) GetPrivate() []byte {
if x != nil {
- return x.PlannedPrivate
+ return x.Private
}
return nil
}
-func (x *ApplyResourceChange_Request) GetProviderMeta() *DynamicValue {
+func (x *OpenEphemeralResource_Response) GetDeferred() *Deferred {
if x != nil {
- return x.ProviderMeta
+ return x.Deferred
}
return nil
}
-type ApplyResourceChange_Response struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+type RenewEphemeralResource_Request struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ TypeName string `protobuf:"bytes,1,opt,name=type_name,json=typeName,proto3" json:"type_name,omitempty"`
+ Private []byte `protobuf:"bytes,2,opt,name=private,proto3,oneof" json:"private,omitempty"`
unknownFields protoimpl.UnknownFields
-
- NewState *DynamicValue `protobuf:"bytes,1,opt,name=new_state,json=newState,proto3" json:"new_state,omitempty"`
- Private []byte `protobuf:"bytes,2,opt,name=private,proto3" json:"private,omitempty"`
- Diagnostics []*Diagnostic `protobuf:"bytes,3,rep,name=diagnostics,proto3" json:"diagnostics,omitempty"`
- // This may be set only by the helper/schema "SDK" in the main Terraform
- // repository, to request that Terraform Core >=0.12 permit additional
- // inconsistencies that can result from the legacy SDK type system
- // and its imprecise mapping to the >=0.12 type system.
- // The change in behavior implied by this flag makes sense only for the
- // specific details of the legacy SDK type system, and are not a general
- // mechanism to avoid proper type handling in providers.
- //
- // ==== DO NOT USE THIS ====
- // ==== THIS MUST BE LEFT UNSET IN ALL OTHER SDKS ====
- // ==== DO NOT USE THIS ====
- LegacyTypeSystem bool `protobuf:"varint,4,opt,name=legacy_type_system,json=legacyTypeSystem,proto3" json:"legacy_type_system,omitempty"`
+ sizeCache protoimpl.SizeCache
}
-func (x *ApplyResourceChange_Response) Reset() {
- *x = ApplyResourceChange_Response{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin5_proto_msgTypes[63]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+func (x *RenewEphemeralResource_Request) Reset() {
+ *x = RenewEphemeralResource_Request{}
+ mi := &file_tfplugin5_proto_msgTypes[107]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
-func (x *ApplyResourceChange_Response) String() string {
+func (x *RenewEphemeralResource_Request) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*ApplyResourceChange_Response) ProtoMessage() {}
+func (*RenewEphemeralResource_Request) ProtoMessage() {}
-func (x *ApplyResourceChange_Response) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin5_proto_msgTypes[63]
- if protoimpl.UnsafeEnabled && x != nil {
+func (x *RenewEphemeralResource_Request) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin5_proto_msgTypes[107]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -3655,67 +5703,50 @@ func (x *ApplyResourceChange_Response) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use ApplyResourceChange_Response.ProtoReflect.Descriptor instead.
-func (*ApplyResourceChange_Response) Descriptor() ([]byte, []int) {
- return file_tfplugin5_proto_rawDescGZIP(), []int{20, 1}
+// Deprecated: Use RenewEphemeralResource_Request.ProtoReflect.Descriptor instead.
+func (*RenewEphemeralResource_Request) Descriptor() ([]byte, []int) {
+ return file_tfplugin5_proto_rawDescGZIP(), []int{34, 0}
}
-func (x *ApplyResourceChange_Response) GetNewState() *DynamicValue {
+func (x *RenewEphemeralResource_Request) GetTypeName() string {
if x != nil {
- return x.NewState
+ return x.TypeName
}
- return nil
+ return ""
}
-func (x *ApplyResourceChange_Response) GetPrivate() []byte {
+func (x *RenewEphemeralResource_Request) GetPrivate() []byte {
if x != nil {
return x.Private
}
return nil
}
-func (x *ApplyResourceChange_Response) GetDiagnostics() []*Diagnostic {
- if x != nil {
- return x.Diagnostics
- }
- return nil
-}
-
-func (x *ApplyResourceChange_Response) GetLegacyTypeSystem() bool {
- if x != nil {
- return x.LegacyTypeSystem
- }
- return false
-}
-
-type ImportResourceState_Request struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+type RenewEphemeralResource_Response struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Diagnostics []*Diagnostic `protobuf:"bytes,1,rep,name=diagnostics,proto3" json:"diagnostics,omitempty"`
+ RenewAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=renew_at,json=renewAt,proto3,oneof" json:"renew_at,omitempty"`
+ Private []byte `protobuf:"bytes,3,opt,name=private,proto3,oneof" json:"private,omitempty"`
unknownFields protoimpl.UnknownFields
-
- TypeName string `protobuf:"bytes,1,opt,name=type_name,json=typeName,proto3" json:"type_name,omitempty"`
- Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
- ClientCapabilities *ClientCapabilities `protobuf:"bytes,3,opt,name=client_capabilities,json=clientCapabilities,proto3" json:"client_capabilities,omitempty"`
+ sizeCache protoimpl.SizeCache
}
-func (x *ImportResourceState_Request) Reset() {
- *x = ImportResourceState_Request{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin5_proto_msgTypes[64]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+func (x *RenewEphemeralResource_Response) Reset() {
+ *x = RenewEphemeralResource_Response{}
+ mi := &file_tfplugin5_proto_msgTypes[108]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
-func (x *ImportResourceState_Request) String() string {
+func (x *RenewEphemeralResource_Response) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*ImportResourceState_Request) ProtoMessage() {}
+func (*RenewEphemeralResource_Response) ProtoMessage() {}
-func (x *ImportResourceState_Request) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin5_proto_msgTypes[64]
- if protoimpl.UnsafeEnabled && x != nil {
+func (x *RenewEphemeralResource_Response) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin5_proto_msgTypes[108]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -3725,60 +5756,56 @@ func (x *ImportResourceState_Request) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use ImportResourceState_Request.ProtoReflect.Descriptor instead.
-func (*ImportResourceState_Request) Descriptor() ([]byte, []int) {
- return file_tfplugin5_proto_rawDescGZIP(), []int{21, 0}
+// Deprecated: Use RenewEphemeralResource_Response.ProtoReflect.Descriptor instead.
+func (*RenewEphemeralResource_Response) Descriptor() ([]byte, []int) {
+ return file_tfplugin5_proto_rawDescGZIP(), []int{34, 1}
}
-func (x *ImportResourceState_Request) GetTypeName() string {
+func (x *RenewEphemeralResource_Response) GetDiagnostics() []*Diagnostic {
if x != nil {
- return x.TypeName
+ return x.Diagnostics
}
- return ""
+ return nil
}
-func (x *ImportResourceState_Request) GetId() string {
+func (x *RenewEphemeralResource_Response) GetRenewAt() *timestamppb.Timestamp {
if x != nil {
- return x.Id
+ return x.RenewAt
}
- return ""
+ return nil
}
-func (x *ImportResourceState_Request) GetClientCapabilities() *ClientCapabilities {
+func (x *RenewEphemeralResource_Response) GetPrivate() []byte {
if x != nil {
- return x.ClientCapabilities
+ return x.Private
}
return nil
}
-type ImportResourceState_ImportedResource struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+type CloseEphemeralResource_Request struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ TypeName string `protobuf:"bytes,1,opt,name=type_name,json=typeName,proto3" json:"type_name,omitempty"`
+ Private []byte `protobuf:"bytes,2,opt,name=private,proto3,oneof" json:"private,omitempty"`
unknownFields protoimpl.UnknownFields
-
- TypeName string `protobuf:"bytes,1,opt,name=type_name,json=typeName,proto3" json:"type_name,omitempty"`
- State *DynamicValue `protobuf:"bytes,2,opt,name=state,proto3" json:"state,omitempty"`
- Private []byte `protobuf:"bytes,3,opt,name=private,proto3" json:"private,omitempty"`
+ sizeCache protoimpl.SizeCache
}
-func (x *ImportResourceState_ImportedResource) Reset() {
- *x = ImportResourceState_ImportedResource{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin5_proto_msgTypes[65]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+func (x *CloseEphemeralResource_Request) Reset() {
+ *x = CloseEphemeralResource_Request{}
+ mi := &file_tfplugin5_proto_msgTypes[109]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
-func (x *ImportResourceState_ImportedResource) String() string {
+func (x *CloseEphemeralResource_Request) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*ImportResourceState_ImportedResource) ProtoMessage() {}
+func (*CloseEphemeralResource_Request) ProtoMessage() {}
-func (x *ImportResourceState_ImportedResource) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin5_proto_msgTypes[65]
- if protoimpl.UnsafeEnabled && x != nil {
+func (x *CloseEphemeralResource_Request) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin5_proto_msgTypes[109]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -3788,62 +5815,48 @@ func (x *ImportResourceState_ImportedResource) ProtoReflect() protoreflect.Messa
return mi.MessageOf(x)
}
-// Deprecated: Use ImportResourceState_ImportedResource.ProtoReflect.Descriptor instead.
-func (*ImportResourceState_ImportedResource) Descriptor() ([]byte, []int) {
- return file_tfplugin5_proto_rawDescGZIP(), []int{21, 1}
+// Deprecated: Use CloseEphemeralResource_Request.ProtoReflect.Descriptor instead.
+func (*CloseEphemeralResource_Request) Descriptor() ([]byte, []int) {
+ return file_tfplugin5_proto_rawDescGZIP(), []int{35, 0}
}
-func (x *ImportResourceState_ImportedResource) GetTypeName() string {
+func (x *CloseEphemeralResource_Request) GetTypeName() string {
if x != nil {
return x.TypeName
}
return ""
}
-func (x *ImportResourceState_ImportedResource) GetState() *DynamicValue {
- if x != nil {
- return x.State
- }
- return nil
-}
-
-func (x *ImportResourceState_ImportedResource) GetPrivate() []byte {
+func (x *CloseEphemeralResource_Request) GetPrivate() []byte {
if x != nil {
return x.Private
}
return nil
}
-type ImportResourceState_Response struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+type CloseEphemeralResource_Response struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Diagnostics []*Diagnostic `protobuf:"bytes,1,rep,name=diagnostics,proto3" json:"diagnostics,omitempty"`
unknownFields protoimpl.UnknownFields
-
- ImportedResources []*ImportResourceState_ImportedResource `protobuf:"bytes,1,rep,name=imported_resources,json=importedResources,proto3" json:"imported_resources,omitempty"`
- Diagnostics []*Diagnostic `protobuf:"bytes,2,rep,name=diagnostics,proto3" json:"diagnostics,omitempty"`
- // deferred is set if the provider is deferring the change. If set the caller
- // needs to handle the deferral.
- Deferred *Deferred `protobuf:"bytes,3,opt,name=deferred,proto3" json:"deferred,omitempty"`
+ sizeCache protoimpl.SizeCache
}
-func (x *ImportResourceState_Response) Reset() {
- *x = ImportResourceState_Response{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin5_proto_msgTypes[66]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+func (x *CloseEphemeralResource_Response) Reset() {
+ *x = CloseEphemeralResource_Response{}
+ mi := &file_tfplugin5_proto_msgTypes[110]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
-func (x *ImportResourceState_Response) String() string {
+func (x *CloseEphemeralResource_Response) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*ImportResourceState_Response) ProtoMessage() {}
+func (*CloseEphemeralResource_Response) ProtoMessage() {}
-func (x *ImportResourceState_Response) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin5_proto_msgTypes[66]
- if protoimpl.UnsafeEnabled && x != nil {
+func (x *CloseEphemeralResource_Response) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin5_proto_msgTypes[110]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -3853,72 +5866,80 @@ func (x *ImportResourceState_Response) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use ImportResourceState_Response.ProtoReflect.Descriptor instead.
-func (*ImportResourceState_Response) Descriptor() ([]byte, []int) {
- return file_tfplugin5_proto_rawDescGZIP(), []int{21, 2}
+// Deprecated: Use CloseEphemeralResource_Response.ProtoReflect.Descriptor instead.
+func (*CloseEphemeralResource_Response) Descriptor() ([]byte, []int) {
+ return file_tfplugin5_proto_rawDescGZIP(), []int{35, 1}
}
-func (x *ImportResourceState_Response) GetImportedResources() []*ImportResourceState_ImportedResource {
+func (x *CloseEphemeralResource_Response) GetDiagnostics() []*Diagnostic {
if x != nil {
- return x.ImportedResources
+ return x.Diagnostics
}
return nil
}
-func (x *ImportResourceState_Response) GetDiagnostics() []*Diagnostic {
- if x != nil {
- return x.Diagnostics
- }
- return nil
+type GetResourceIdentitySchemas_Request struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
-func (x *ImportResourceState_Response) GetDeferred() *Deferred {
- if x != nil {
- return x.Deferred
- }
- return nil
+func (x *GetResourceIdentitySchemas_Request) Reset() {
+ *x = GetResourceIdentitySchemas_Request{}
+ mi := &file_tfplugin5_proto_msgTypes[111]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
-type MoveResourceState_Request struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
+func (x *GetResourceIdentitySchemas_Request) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
- // The address of the provider the resource is being moved from.
- SourceProviderAddress string `protobuf:"bytes,1,opt,name=source_provider_address,json=sourceProviderAddress,proto3" json:"source_provider_address,omitempty"`
- // The resource type that the resource is being moved from.
- SourceTypeName string `protobuf:"bytes,2,opt,name=source_type_name,json=sourceTypeName,proto3" json:"source_type_name,omitempty"`
- // The schema version of the resource type that the resource is being
- // moved from.
- SourceSchemaVersion int64 `protobuf:"varint,3,opt,name=source_schema_version,json=sourceSchemaVersion,proto3" json:"source_schema_version,omitempty"`
- // The raw state of the resource being moved. Only the json field is
- // populated, as there should be no legacy providers using the flatmap
- // format that support newly introduced RPCs.
- SourceState *RawState `protobuf:"bytes,4,opt,name=source_state,json=sourceState,proto3" json:"source_state,omitempty"`
- // The resource type that the resource is being moved to.
- TargetTypeName string `protobuf:"bytes,5,opt,name=target_type_name,json=targetTypeName,proto3" json:"target_type_name,omitempty"`
- // The private state of the resource being moved.
- SourcePrivate []byte `protobuf:"bytes,6,opt,name=source_private,json=sourcePrivate,proto3" json:"source_private,omitempty"`
+func (*GetResourceIdentitySchemas_Request) ProtoMessage() {}
+
+func (x *GetResourceIdentitySchemas_Request) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin5_proto_msgTypes[111]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
}
-func (x *MoveResourceState_Request) Reset() {
- *x = MoveResourceState_Request{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin5_proto_msgTypes[67]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+// Deprecated: Use GetResourceIdentitySchemas_Request.ProtoReflect.Descriptor instead.
+func (*GetResourceIdentitySchemas_Request) Descriptor() ([]byte, []int) {
+ return file_tfplugin5_proto_rawDescGZIP(), []int{36, 0}
}
-func (x *MoveResourceState_Request) String() string {
+type GetResourceIdentitySchemas_Response struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // identity_schemas is a mapping of resource type names to their identity schemas.
+ IdentitySchemas map[string]*ResourceIdentitySchema `protobuf:"bytes,1,rep,name=identity_schemas,json=identitySchemas,proto3" json:"identity_schemas,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
+ // diagnostics is the collection of warning and error diagnostics for this request.
+ Diagnostics []*Diagnostic `protobuf:"bytes,2,rep,name=diagnostics,proto3" json:"diagnostics,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *GetResourceIdentitySchemas_Response) Reset() {
+ *x = GetResourceIdentitySchemas_Response{}
+ mi := &file_tfplugin5_proto_msgTypes[112]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *GetResourceIdentitySchemas_Response) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*MoveResourceState_Request) ProtoMessage() {}
+func (*GetResourceIdentitySchemas_Response) ProtoMessage() {}
-func (x *MoveResourceState_Request) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin5_proto_msgTypes[67]
- if protoimpl.UnsafeEnabled && x != nil {
+func (x *GetResourceIdentitySchemas_Response) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin5_proto_msgTypes[112]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -3928,84 +5949,117 @@ func (x *MoveResourceState_Request) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use MoveResourceState_Request.ProtoReflect.Descriptor instead.
-func (*MoveResourceState_Request) Descriptor() ([]byte, []int) {
- return file_tfplugin5_proto_rawDescGZIP(), []int{22, 0}
+// Deprecated: Use GetResourceIdentitySchemas_Response.ProtoReflect.Descriptor instead.
+func (*GetResourceIdentitySchemas_Response) Descriptor() ([]byte, []int) {
+ return file_tfplugin5_proto_rawDescGZIP(), []int{36, 1}
}
-func (x *MoveResourceState_Request) GetSourceProviderAddress() string {
+func (x *GetResourceIdentitySchemas_Response) GetIdentitySchemas() map[string]*ResourceIdentitySchema {
if x != nil {
- return x.SourceProviderAddress
+ return x.IdentitySchemas
}
- return ""
+ return nil
}
-func (x *MoveResourceState_Request) GetSourceTypeName() string {
+func (x *GetResourceIdentitySchemas_Response) GetDiagnostics() []*Diagnostic {
if x != nil {
- return x.SourceTypeName
+ return x.Diagnostics
}
- return ""
+ return nil
}
-func (x *MoveResourceState_Request) GetSourceSchemaVersion() int64 {
+type UpgradeResourceIdentity_Request struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // type_name is the managed resource type name
+ TypeName string `protobuf:"bytes,1,opt,name=type_name,json=typeName,proto3" json:"type_name,omitempty"`
+ // version is the version of the resource identity data to upgrade
+ Version int64 `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"`
+ // raw_identity is the raw identity as stored for the resource. Core does
+ // not have access to the identity schema of prior_version, so it's the
+ // provider's responsibility to interpret this value using the
+ // appropriate older schema. The raw_identity will be json encoded.
+ RawIdentity *RawState `protobuf:"bytes,3,opt,name=raw_identity,json=rawIdentity,proto3" json:"raw_identity,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *UpgradeResourceIdentity_Request) Reset() {
+ *x = UpgradeResourceIdentity_Request{}
+ mi := &file_tfplugin5_proto_msgTypes[114]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *UpgradeResourceIdentity_Request) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UpgradeResourceIdentity_Request) ProtoMessage() {}
+
+func (x *UpgradeResourceIdentity_Request) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin5_proto_msgTypes[114]
if x != nil {
- return x.SourceSchemaVersion
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
}
- return 0
+ return mi.MessageOf(x)
}
-func (x *MoveResourceState_Request) GetSourceState() *RawState {
+// Deprecated: Use UpgradeResourceIdentity_Request.ProtoReflect.Descriptor instead.
+func (*UpgradeResourceIdentity_Request) Descriptor() ([]byte, []int) {
+ return file_tfplugin5_proto_rawDescGZIP(), []int{37, 0}
+}
+
+func (x *UpgradeResourceIdentity_Request) GetTypeName() string {
if x != nil {
- return x.SourceState
+ return x.TypeName
}
- return nil
+ return ""
}
-func (x *MoveResourceState_Request) GetTargetTypeName() string {
+func (x *UpgradeResourceIdentity_Request) GetVersion() int64 {
if x != nil {
- return x.TargetTypeName
+ return x.Version
}
- return ""
+ return 0
}
-func (x *MoveResourceState_Request) GetSourcePrivate() []byte {
+func (x *UpgradeResourceIdentity_Request) GetRawIdentity() *RawState {
if x != nil {
- return x.SourcePrivate
+ return x.RawIdentity
}
return nil
}
-type MoveResourceState_Response struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+type UpgradeResourceIdentity_Response struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // upgraded_identity returns the upgraded resource identity data
+ UpgradedIdentity *ResourceIdentityData `protobuf:"bytes,1,opt,name=upgraded_identity,json=upgradedIdentity,proto3" json:"upgraded_identity,omitempty"`
+ // diagnostics is the collection of warning and error diagnostics for this request
+ Diagnostics []*Diagnostic `protobuf:"bytes,2,rep,name=diagnostics,proto3" json:"diagnostics,omitempty"`
unknownFields protoimpl.UnknownFields
-
- // The state of the resource after it has been moved.
- TargetState *DynamicValue `protobuf:"bytes,1,opt,name=target_state,json=targetState,proto3" json:"target_state,omitempty"`
- // Any diagnostics that occurred during the move.
- Diagnostics []*Diagnostic `protobuf:"bytes,2,rep,name=diagnostics,proto3" json:"diagnostics,omitempty"`
- // The private state of the resource after it has been moved.
- TargetPrivate []byte `protobuf:"bytes,3,opt,name=target_private,json=targetPrivate,proto3" json:"target_private,omitempty"`
+ sizeCache protoimpl.SizeCache
}
-func (x *MoveResourceState_Response) Reset() {
- *x = MoveResourceState_Response{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin5_proto_msgTypes[68]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+func (x *UpgradeResourceIdentity_Response) Reset() {
+ *x = UpgradeResourceIdentity_Response{}
+ mi := &file_tfplugin5_proto_msgTypes[115]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
-func (x *MoveResourceState_Response) String() string {
+func (x *UpgradeResourceIdentity_Response) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*MoveResourceState_Response) ProtoMessage() {}
+func (*UpgradeResourceIdentity_Response) ProtoMessage() {}
-func (x *MoveResourceState_Response) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin5_proto_msgTypes[68]
- if protoimpl.UnsafeEnabled && x != nil {
+func (x *UpgradeResourceIdentity_Response) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin5_proto_msgTypes[115]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -4015,61 +6069,57 @@ func (x *MoveResourceState_Response) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use MoveResourceState_Response.ProtoReflect.Descriptor instead.
-func (*MoveResourceState_Response) Descriptor() ([]byte, []int) {
- return file_tfplugin5_proto_rawDescGZIP(), []int{22, 1}
+// Deprecated: Use UpgradeResourceIdentity_Response.ProtoReflect.Descriptor instead.
+func (*UpgradeResourceIdentity_Response) Descriptor() ([]byte, []int) {
+ return file_tfplugin5_proto_rawDescGZIP(), []int{37, 1}
}
-func (x *MoveResourceState_Response) GetTargetState() *DynamicValue {
+func (x *UpgradeResourceIdentity_Response) GetUpgradedIdentity() *ResourceIdentityData {
if x != nil {
- return x.TargetState
+ return x.UpgradedIdentity
}
return nil
}
-func (x *MoveResourceState_Response) GetDiagnostics() []*Diagnostic {
+func (x *UpgradeResourceIdentity_Response) GetDiagnostics() []*Diagnostic {
if x != nil {
return x.Diagnostics
}
return nil
}
-func (x *MoveResourceState_Response) GetTargetPrivate() []byte {
- if x != nil {
- return x.TargetPrivate
- }
- return nil
-}
-
-type ReadDataSource_Request struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+type ListResource_Request struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // type_name is the list resource type name.
+ TypeName string `protobuf:"bytes,1,opt,name=type_name,json=typeName,proto3" json:"type_name,omitempty"`
+ // configuration is the list ConfigSchema-based configuration data.
+ Config *DynamicValue `protobuf:"bytes,2,opt,name=config,proto3" json:"config,omitempty"`
+ // when include_resource_object is set to true, the provider should
+ // include the full resource object for each result
+ IncludeResourceObject bool `protobuf:"varint,3,opt,name=include_resource_object,json=includeResourceObject,proto3" json:"include_resource_object,omitempty"`
+ // The maximum number of results that Terraform is expecting.
+ // The stream will stop, once this limit is reached.
+ Limit int64 `protobuf:"varint,4,opt,name=limit,proto3" json:"limit,omitempty"`
unknownFields protoimpl.UnknownFields
-
- TypeName string `protobuf:"bytes,1,opt,name=type_name,json=typeName,proto3" json:"type_name,omitempty"`
- Config *DynamicValue `protobuf:"bytes,2,opt,name=config,proto3" json:"config,omitempty"`
- ProviderMeta *DynamicValue `protobuf:"bytes,3,opt,name=provider_meta,json=providerMeta,proto3" json:"provider_meta,omitempty"`
- ClientCapabilities *ClientCapabilities `protobuf:"bytes,4,opt,name=client_capabilities,json=clientCapabilities,proto3" json:"client_capabilities,omitempty"`
+ sizeCache protoimpl.SizeCache
}
-func (x *ReadDataSource_Request) Reset() {
- *x = ReadDataSource_Request{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin5_proto_msgTypes[69]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+func (x *ListResource_Request) Reset() {
+ *x = ListResource_Request{}
+ mi := &file_tfplugin5_proto_msgTypes[116]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
-func (x *ReadDataSource_Request) String() string {
+func (x *ListResource_Request) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*ReadDataSource_Request) ProtoMessage() {}
+func (*ListResource_Request) ProtoMessage() {}
-func (x *ReadDataSource_Request) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin5_proto_msgTypes[69]
- if protoimpl.UnsafeEnabled && x != nil {
+func (x *ListResource_Request) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin5_proto_msgTypes[116]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -4079,69 +6129,69 @@ func (x *ReadDataSource_Request) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use ReadDataSource_Request.ProtoReflect.Descriptor instead.
-func (*ReadDataSource_Request) Descriptor() ([]byte, []int) {
- return file_tfplugin5_proto_rawDescGZIP(), []int{23, 0}
+// Deprecated: Use ListResource_Request.ProtoReflect.Descriptor instead.
+func (*ListResource_Request) Descriptor() ([]byte, []int) {
+ return file_tfplugin5_proto_rawDescGZIP(), []int{38, 0}
}
-func (x *ReadDataSource_Request) GetTypeName() string {
+func (x *ListResource_Request) GetTypeName() string {
if x != nil {
return x.TypeName
}
return ""
}
-func (x *ReadDataSource_Request) GetConfig() *DynamicValue {
+func (x *ListResource_Request) GetConfig() *DynamicValue {
if x != nil {
return x.Config
}
return nil
}
-func (x *ReadDataSource_Request) GetProviderMeta() *DynamicValue {
+func (x *ListResource_Request) GetIncludeResourceObject() bool {
if x != nil {
- return x.ProviderMeta
+ return x.IncludeResourceObject
}
- return nil
+ return false
}
-func (x *ReadDataSource_Request) GetClientCapabilities() *ClientCapabilities {
+func (x *ListResource_Request) GetLimit() int64 {
if x != nil {
- return x.ClientCapabilities
+ return x.Limit
}
- return nil
+ return 0
}
-type ReadDataSource_Response struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+type ListResource_Event struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // identity is the resource identity data of the resource instance.
+ Identity *ResourceIdentityData `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"`
+ // display_name can be displayed in a UI to make it easier for humans to identify a resource
+ DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
+ // optional resource object which can be useful when combining list blocks in configuration
+ ResourceObject *DynamicValue `protobuf:"bytes,3,opt,name=resource_object,json=resourceObject,proto3,oneof" json:"resource_object,omitempty"`
+ // A warning or error diagnostics for this event
+ Diagnostic []*Diagnostic `protobuf:"bytes,4,rep,name=diagnostic,proto3" json:"diagnostic,omitempty"`
unknownFields protoimpl.UnknownFields
-
- State *DynamicValue `protobuf:"bytes,1,opt,name=state,proto3" json:"state,omitempty"`
- Diagnostics []*Diagnostic `protobuf:"bytes,2,rep,name=diagnostics,proto3" json:"diagnostics,omitempty"`
- // deferred is set if the provider is deferring the change. If set the caller
- // needs to handle the deferral.
- Deferred *Deferred `protobuf:"bytes,3,opt,name=deferred,proto3" json:"deferred,omitempty"`
+ sizeCache protoimpl.SizeCache
}
-func (x *ReadDataSource_Response) Reset() {
- *x = ReadDataSource_Response{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin5_proto_msgTypes[70]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+func (x *ListResource_Event) Reset() {
+ *x = ListResource_Event{}
+ mi := &file_tfplugin5_proto_msgTypes[117]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
-func (x *ReadDataSource_Response) String() string {
+func (x *ListResource_Event) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*ReadDataSource_Response) ProtoMessage() {}
+func (*ListResource_Event) ProtoMessage() {}
-func (x *ReadDataSource_Response) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin5_proto_msgTypes[70]
- if protoimpl.UnsafeEnabled && x != nil {
+func (x *ListResource_Event) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin5_proto_msgTypes[117]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -4151,56 +6201,65 @@ func (x *ReadDataSource_Response) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use ReadDataSource_Response.ProtoReflect.Descriptor instead.
-func (*ReadDataSource_Response) Descriptor() ([]byte, []int) {
- return file_tfplugin5_proto_rawDescGZIP(), []int{23, 1}
+// Deprecated: Use ListResource_Event.ProtoReflect.Descriptor instead.
+func (*ListResource_Event) Descriptor() ([]byte, []int) {
+ return file_tfplugin5_proto_rawDescGZIP(), []int{38, 1}
}
-func (x *ReadDataSource_Response) GetState() *DynamicValue {
+func (x *ListResource_Event) GetIdentity() *ResourceIdentityData {
if x != nil {
- return x.State
+ return x.Identity
}
return nil
}
-func (x *ReadDataSource_Response) GetDiagnostics() []*Diagnostic {
+func (x *ListResource_Event) GetDisplayName() string {
if x != nil {
- return x.Diagnostics
+ return x.DisplayName
+ }
+ return ""
+}
+
+func (x *ListResource_Event) GetResourceObject() *DynamicValue {
+ if x != nil {
+ return x.ResourceObject
}
return nil
}
-func (x *ReadDataSource_Response) GetDeferred() *Deferred {
+func (x *ListResource_Event) GetDiagnostic() []*Diagnostic {
if x != nil {
- return x.Deferred
+ return x.Diagnostic
}
return nil
}
-type GetProvisionerSchema_Request struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
+type ValidateListResourceConfig_Request struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ TypeName string `protobuf:"bytes,1,opt,name=type_name,json=typeName,proto3" json:"type_name,omitempty"`
+ Config *DynamicValue `protobuf:"bytes,2,opt,name=config,proto3" json:"config,omitempty"`
+ IncludeResourceObject *DynamicValue `protobuf:"bytes,3,opt,name=include_resource_object,json=includeResourceObject,proto3" json:"include_resource_object,omitempty"`
+ Limit *DynamicValue `protobuf:"bytes,4,opt,name=limit,proto3" json:"limit,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
-func (x *GetProvisionerSchema_Request) Reset() {
- *x = GetProvisionerSchema_Request{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin5_proto_msgTypes[71]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+func (x *ValidateListResourceConfig_Request) Reset() {
+ *x = ValidateListResourceConfig_Request{}
+ mi := &file_tfplugin5_proto_msgTypes[118]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
-func (x *GetProvisionerSchema_Request) String() string {
+func (x *ValidateListResourceConfig_Request) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*GetProvisionerSchema_Request) ProtoMessage() {}
+func (*ValidateListResourceConfig_Request) ProtoMessage() {}
-func (x *GetProvisionerSchema_Request) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin5_proto_msgTypes[71]
- if protoimpl.UnsafeEnabled && x != nil {
+func (x *ValidateListResourceConfig_Request) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin5_proto_msgTypes[118]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -4210,38 +6269,62 @@ func (x *GetProvisionerSchema_Request) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use GetProvisionerSchema_Request.ProtoReflect.Descriptor instead.
-func (*GetProvisionerSchema_Request) Descriptor() ([]byte, []int) {
- return file_tfplugin5_proto_rawDescGZIP(), []int{24, 0}
+// Deprecated: Use ValidateListResourceConfig_Request.ProtoReflect.Descriptor instead.
+func (*ValidateListResourceConfig_Request) Descriptor() ([]byte, []int) {
+ return file_tfplugin5_proto_rawDescGZIP(), []int{39, 0}
}
-type GetProvisionerSchema_Response struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
+func (x *ValidateListResourceConfig_Request) GetTypeName() string {
+ if x != nil {
+ return x.TypeName
+ }
+ return ""
+}
- Provisioner *Schema `protobuf:"bytes,1,opt,name=provisioner,proto3" json:"provisioner,omitempty"`
- Diagnostics []*Diagnostic `protobuf:"bytes,2,rep,name=diagnostics,proto3" json:"diagnostics,omitempty"`
+func (x *ValidateListResourceConfig_Request) GetConfig() *DynamicValue {
+ if x != nil {
+ return x.Config
+ }
+ return nil
}
-func (x *GetProvisionerSchema_Response) Reset() {
- *x = GetProvisionerSchema_Response{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin5_proto_msgTypes[72]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
+func (x *ValidateListResourceConfig_Request) GetIncludeResourceObject() *DynamicValue {
+ if x != nil {
+ return x.IncludeResourceObject
}
+ return nil
}
-func (x *GetProvisionerSchema_Response) String() string {
+func (x *ValidateListResourceConfig_Request) GetLimit() *DynamicValue {
+ if x != nil {
+ return x.Limit
+ }
+ return nil
+}
+
+type ValidateListResourceConfig_Response struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Diagnostics []*Diagnostic `protobuf:"bytes,1,rep,name=diagnostics,proto3" json:"diagnostics,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *ValidateListResourceConfig_Response) Reset() {
+ *x = ValidateListResourceConfig_Response{}
+ mi := &file_tfplugin5_proto_msgTypes[119]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ValidateListResourceConfig_Response) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*GetProvisionerSchema_Response) ProtoMessage() {}
+func (*ValidateListResourceConfig_Response) ProtoMessage() {}
-func (x *GetProvisionerSchema_Response) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin5_proto_msgTypes[72]
- if protoimpl.UnsafeEnabled && x != nil {
+func (x *ValidateListResourceConfig_Response) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin5_proto_msgTypes[119]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -4251,51 +6334,42 @@ func (x *GetProvisionerSchema_Response) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use GetProvisionerSchema_Response.ProtoReflect.Descriptor instead.
-func (*GetProvisionerSchema_Response) Descriptor() ([]byte, []int) {
- return file_tfplugin5_proto_rawDescGZIP(), []int{24, 1}
-}
-
-func (x *GetProvisionerSchema_Response) GetProvisioner() *Schema {
- if x != nil {
- return x.Provisioner
- }
- return nil
+// Deprecated: Use ValidateListResourceConfig_Response.ProtoReflect.Descriptor instead.
+func (*ValidateListResourceConfig_Response) Descriptor() ([]byte, []int) {
+ return file_tfplugin5_proto_rawDescGZIP(), []int{39, 1}
}
-func (x *GetProvisionerSchema_Response) GetDiagnostics() []*Diagnostic {
+func (x *ValidateListResourceConfig_Response) GetDiagnostics() []*Diagnostic {
if x != nil {
return x.Diagnostics
}
return nil
}
-type ValidateProvisionerConfig_Request struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+type ValidateActionConfig_Request struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ ActionType string `protobuf:"bytes,1,opt,name=action_type,json=actionType,proto3" json:"action_type,omitempty"`
+ Config *DynamicValue `protobuf:"bytes,2,opt,name=config,proto3" json:"config,omitempty"`
unknownFields protoimpl.UnknownFields
-
- Config *DynamicValue `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"`
+ sizeCache protoimpl.SizeCache
}
-func (x *ValidateProvisionerConfig_Request) Reset() {
- *x = ValidateProvisionerConfig_Request{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin5_proto_msgTypes[73]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+func (x *ValidateActionConfig_Request) Reset() {
+ *x = ValidateActionConfig_Request{}
+ mi := &file_tfplugin5_proto_msgTypes[120]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
-func (x *ValidateProvisionerConfig_Request) String() string {
+func (x *ValidateActionConfig_Request) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*ValidateProvisionerConfig_Request) ProtoMessage() {}
+func (*ValidateActionConfig_Request) ProtoMessage() {}
-func (x *ValidateProvisionerConfig_Request) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin5_proto_msgTypes[73]
- if protoimpl.UnsafeEnabled && x != nil {
+func (x *ValidateActionConfig_Request) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin5_proto_msgTypes[120]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -4305,44 +6379,48 @@ func (x *ValidateProvisionerConfig_Request) ProtoReflect() protoreflect.Message
return mi.MessageOf(x)
}
-// Deprecated: Use ValidateProvisionerConfig_Request.ProtoReflect.Descriptor instead.
-func (*ValidateProvisionerConfig_Request) Descriptor() ([]byte, []int) {
- return file_tfplugin5_proto_rawDescGZIP(), []int{25, 0}
+// Deprecated: Use ValidateActionConfig_Request.ProtoReflect.Descriptor instead.
+func (*ValidateActionConfig_Request) Descriptor() ([]byte, []int) {
+ return file_tfplugin5_proto_rawDescGZIP(), []int{40, 0}
}
-func (x *ValidateProvisionerConfig_Request) GetConfig() *DynamicValue {
+func (x *ValidateActionConfig_Request) GetActionType() string {
+ if x != nil {
+ return x.ActionType
+ }
+ return ""
+}
+
+func (x *ValidateActionConfig_Request) GetConfig() *DynamicValue {
if x != nil {
return x.Config
}
return nil
}
-type ValidateProvisionerConfig_Response struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+type ValidateActionConfig_Response struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Diagnostics []*Diagnostic `protobuf:"bytes,1,rep,name=diagnostics,proto3" json:"diagnostics,omitempty"`
unknownFields protoimpl.UnknownFields
-
- Diagnostics []*Diagnostic `protobuf:"bytes,1,rep,name=diagnostics,proto3" json:"diagnostics,omitempty"`
+ sizeCache protoimpl.SizeCache
}
-func (x *ValidateProvisionerConfig_Response) Reset() {
- *x = ValidateProvisionerConfig_Response{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin5_proto_msgTypes[74]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+func (x *ValidateActionConfig_Response) Reset() {
+ *x = ValidateActionConfig_Response{}
+ mi := &file_tfplugin5_proto_msgTypes[121]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
-func (x *ValidateProvisionerConfig_Response) String() string {
+func (x *ValidateActionConfig_Response) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*ValidateProvisionerConfig_Response) ProtoMessage() {}
+func (*ValidateActionConfig_Response) ProtoMessage() {}
-func (x *ValidateProvisionerConfig_Response) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin5_proto_msgTypes[74]
- if protoimpl.UnsafeEnabled && x != nil {
+func (x *ValidateActionConfig_Response) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin5_proto_msgTypes[121]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -4352,45 +6430,43 @@ func (x *ValidateProvisionerConfig_Response) ProtoReflect() protoreflect.Message
return mi.MessageOf(x)
}
-// Deprecated: Use ValidateProvisionerConfig_Response.ProtoReflect.Descriptor instead.
-func (*ValidateProvisionerConfig_Response) Descriptor() ([]byte, []int) {
- return file_tfplugin5_proto_rawDescGZIP(), []int{25, 1}
+// Deprecated: Use ValidateActionConfig_Response.ProtoReflect.Descriptor instead.
+func (*ValidateActionConfig_Response) Descriptor() ([]byte, []int) {
+ return file_tfplugin5_proto_rawDescGZIP(), []int{40, 1}
}
-func (x *ValidateProvisionerConfig_Response) GetDiagnostics() []*Diagnostic {
+func (x *ValidateActionConfig_Response) GetDiagnostics() []*Diagnostic {
if x != nil {
return x.Diagnostics
- }
- return nil
-}
-
-type ProvisionResource_Request struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
+ }
+ return nil
+}
- Config *DynamicValue `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"`
- Connection *DynamicValue `protobuf:"bytes,2,opt,name=connection,proto3" json:"connection,omitempty"`
+type PlanAction_Request struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ ActionType string `protobuf:"bytes,1,opt,name=action_type,json=actionType,proto3" json:"action_type,omitempty"`
+ Config *DynamicValue `protobuf:"bytes,2,opt,name=config,proto3" json:"config,omitempty"`
+ ClientCapabilities *ClientCapabilities `protobuf:"bytes,3,opt,name=client_capabilities,json=clientCapabilities,proto3" json:"client_capabilities,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
-func (x *ProvisionResource_Request) Reset() {
- *x = ProvisionResource_Request{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin5_proto_msgTypes[75]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+func (x *PlanAction_Request) Reset() {
+ *x = PlanAction_Request{}
+ mi := &file_tfplugin5_proto_msgTypes[122]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
-func (x *ProvisionResource_Request) String() string {
+func (x *PlanAction_Request) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*ProvisionResource_Request) ProtoMessage() {}
+func (*PlanAction_Request) ProtoMessage() {}
-func (x *ProvisionResource_Request) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin5_proto_msgTypes[75]
- if protoimpl.UnsafeEnabled && x != nil {
+func (x *PlanAction_Request) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin5_proto_msgTypes[122]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -4400,52 +6476,57 @@ func (x *ProvisionResource_Request) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use ProvisionResource_Request.ProtoReflect.Descriptor instead.
-func (*ProvisionResource_Request) Descriptor() ([]byte, []int) {
- return file_tfplugin5_proto_rawDescGZIP(), []int{26, 0}
+// Deprecated: Use PlanAction_Request.ProtoReflect.Descriptor instead.
+func (*PlanAction_Request) Descriptor() ([]byte, []int) {
+ return file_tfplugin5_proto_rawDescGZIP(), []int{41, 0}
}
-func (x *ProvisionResource_Request) GetConfig() *DynamicValue {
+func (x *PlanAction_Request) GetActionType() string {
+ if x != nil {
+ return x.ActionType
+ }
+ return ""
+}
+
+func (x *PlanAction_Request) GetConfig() *DynamicValue {
if x != nil {
return x.Config
}
return nil
}
-func (x *ProvisionResource_Request) GetConnection() *DynamicValue {
+func (x *PlanAction_Request) GetClientCapabilities() *ClientCapabilities {
if x != nil {
- return x.Connection
+ return x.ClientCapabilities
}
return nil
}
-type ProvisionResource_Response struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+type PlanAction_Response struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Diagnostics []*Diagnostic `protobuf:"bytes,1,rep,name=diagnostics,proto3" json:"diagnostics,omitempty"`
+ // metadata
+ Deferred *Deferred `protobuf:"bytes,2,opt,name=deferred,proto3" json:"deferred,omitempty"`
unknownFields protoimpl.UnknownFields
-
- Output string `protobuf:"bytes,1,opt,name=output,proto3" json:"output,omitempty"`
- Diagnostics []*Diagnostic `protobuf:"bytes,2,rep,name=diagnostics,proto3" json:"diagnostics,omitempty"`
+ sizeCache protoimpl.SizeCache
}
-func (x *ProvisionResource_Response) Reset() {
- *x = ProvisionResource_Response{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin5_proto_msgTypes[76]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+func (x *PlanAction_Response) Reset() {
+ *x = PlanAction_Response{}
+ mi := &file_tfplugin5_proto_msgTypes[123]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
-func (x *ProvisionResource_Response) String() string {
+func (x *PlanAction_Response) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*ProvisionResource_Response) ProtoMessage() {}
+func (*PlanAction_Response) ProtoMessage() {}
-func (x *ProvisionResource_Response) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin5_proto_msgTypes[76]
- if protoimpl.UnsafeEnabled && x != nil {
+func (x *PlanAction_Response) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin5_proto_msgTypes[123]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -4455,49 +6536,50 @@ func (x *ProvisionResource_Response) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use ProvisionResource_Response.ProtoReflect.Descriptor instead.
-func (*ProvisionResource_Response) Descriptor() ([]byte, []int) {
- return file_tfplugin5_proto_rawDescGZIP(), []int{26, 1}
+// Deprecated: Use PlanAction_Response.ProtoReflect.Descriptor instead.
+func (*PlanAction_Response) Descriptor() ([]byte, []int) {
+ return file_tfplugin5_proto_rawDescGZIP(), []int{41, 1}
}
-func (x *ProvisionResource_Response) GetOutput() string {
+func (x *PlanAction_Response) GetDiagnostics() []*Diagnostic {
if x != nil {
- return x.Output
+ return x.Diagnostics
}
- return ""
+ return nil
}
-func (x *ProvisionResource_Response) GetDiagnostics() []*Diagnostic {
+func (x *PlanAction_Response) GetDeferred() *Deferred {
if x != nil {
- return x.Diagnostics
+ return x.Deferred
}
return nil
}
-type GetFunctions_Request struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
+type InvokeAction_Request struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ ActionType string `protobuf:"bytes,1,opt,name=action_type,json=actionType,proto3" json:"action_type,omitempty"`
+ Config *DynamicValue `protobuf:"bytes,2,opt,name=config,proto3" json:"config,omitempty"`
+ ClientCapabilities *ClientCapabilities `protobuf:"bytes,3,opt,name=client_capabilities,json=clientCapabilities,proto3" json:"client_capabilities,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
-func (x *GetFunctions_Request) Reset() {
- *x = GetFunctions_Request{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin5_proto_msgTypes[77]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+func (x *InvokeAction_Request) Reset() {
+ *x = InvokeAction_Request{}
+ mi := &file_tfplugin5_proto_msgTypes[124]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
-func (x *GetFunctions_Request) String() string {
+func (x *InvokeAction_Request) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*GetFunctions_Request) ProtoMessage() {}
+func (*InvokeAction_Request) ProtoMessage() {}
-func (x *GetFunctions_Request) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin5_proto_msgTypes[77]
- if protoimpl.UnsafeEnabled && x != nil {
+func (x *InvokeAction_Request) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin5_proto_msgTypes[124]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -4507,40 +6589,59 @@ func (x *GetFunctions_Request) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use GetFunctions_Request.ProtoReflect.Descriptor instead.
-func (*GetFunctions_Request) Descriptor() ([]byte, []int) {
- return file_tfplugin5_proto_rawDescGZIP(), []int{27, 0}
+// Deprecated: Use InvokeAction_Request.ProtoReflect.Descriptor instead.
+func (*InvokeAction_Request) Descriptor() ([]byte, []int) {
+ return file_tfplugin5_proto_rawDescGZIP(), []int{42, 0}
}
-type GetFunctions_Response struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
+func (x *InvokeAction_Request) GetActionType() string {
+ if x != nil {
+ return x.ActionType
+ }
+ return ""
+}
- // functions is a mapping of function names to definitions.
- Functions map[string]*Function `protobuf:"bytes,1,rep,name=functions,proto3" json:"functions,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
- // diagnostics is any warnings or errors.
- Diagnostics []*Diagnostic `protobuf:"bytes,2,rep,name=diagnostics,proto3" json:"diagnostics,omitempty"`
+func (x *InvokeAction_Request) GetConfig() *DynamicValue {
+ if x != nil {
+ return x.Config
+ }
+ return nil
}
-func (x *GetFunctions_Response) Reset() {
- *x = GetFunctions_Response{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin5_proto_msgTypes[78]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
+func (x *InvokeAction_Request) GetClientCapabilities() *ClientCapabilities {
+ if x != nil {
+ return x.ClientCapabilities
}
+ return nil
}
-func (x *GetFunctions_Response) String() string {
+type InvokeAction_Event struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // Types that are valid to be assigned to Type:
+ //
+ // *InvokeAction_Event_Progress_
+ // *InvokeAction_Event_Completed_
+ Type isInvokeAction_Event_Type `protobuf_oneof:"type"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *InvokeAction_Event) Reset() {
+ *x = InvokeAction_Event{}
+ mi := &file_tfplugin5_proto_msgTypes[125]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *InvokeAction_Event) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*GetFunctions_Response) ProtoMessage() {}
+func (*InvokeAction_Event) ProtoMessage() {}
-func (x *GetFunctions_Response) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin5_proto_msgTypes[78]
- if protoimpl.UnsafeEnabled && x != nil {
+func (x *InvokeAction_Event) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin5_proto_msgTypes[125]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -4550,54 +6651,76 @@ func (x *GetFunctions_Response) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use GetFunctions_Response.ProtoReflect.Descriptor instead.
-func (*GetFunctions_Response) Descriptor() ([]byte, []int) {
- return file_tfplugin5_proto_rawDescGZIP(), []int{27, 1}
+// Deprecated: Use InvokeAction_Event.ProtoReflect.Descriptor instead.
+func (*InvokeAction_Event) Descriptor() ([]byte, []int) {
+ return file_tfplugin5_proto_rawDescGZIP(), []int{42, 1}
}
-func (x *GetFunctions_Response) GetFunctions() map[string]*Function {
+func (x *InvokeAction_Event) GetType() isInvokeAction_Event_Type {
if x != nil {
- return x.Functions
+ return x.Type
}
return nil
}
-func (x *GetFunctions_Response) GetDiagnostics() []*Diagnostic {
+func (x *InvokeAction_Event) GetProgress() *InvokeAction_Event_Progress {
if x != nil {
- return x.Diagnostics
+ if x, ok := x.Type.(*InvokeAction_Event_Progress_); ok {
+ return x.Progress
+ }
}
return nil
}
-type CallFunction_Request struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
+func (x *InvokeAction_Event) GetCompleted() *InvokeAction_Event_Completed {
+ if x != nil {
+ if x, ok := x.Type.(*InvokeAction_Event_Completed_); ok {
+ return x.Completed
+ }
+ }
+ return nil
+}
- // name is the name of the function being called.
- Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
- // arguments is the data of each function argument value.
- Arguments []*DynamicValue `protobuf:"bytes,2,rep,name=arguments,proto3" json:"arguments,omitempty"`
+type isInvokeAction_Event_Type interface {
+ isInvokeAction_Event_Type()
}
-func (x *CallFunction_Request) Reset() {
- *x = CallFunction_Request{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin5_proto_msgTypes[80]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+type InvokeAction_Event_Progress_ struct {
+ Progress *InvokeAction_Event_Progress `protobuf:"bytes,1,opt,name=progress,proto3,oneof"`
}
-func (x *CallFunction_Request) String() string {
+type InvokeAction_Event_Completed_ struct {
+ Completed *InvokeAction_Event_Completed `protobuf:"bytes,2,opt,name=completed,proto3,oneof"`
+}
+
+func (*InvokeAction_Event_Progress_) isInvokeAction_Event_Type() {}
+
+func (*InvokeAction_Event_Completed_) isInvokeAction_Event_Type() {}
+
+type InvokeAction_Event_Progress struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // message to be printed in the console / HCPT
+ Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *InvokeAction_Event_Progress) Reset() {
+ *x = InvokeAction_Event_Progress{}
+ mi := &file_tfplugin5_proto_msgTypes[126]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *InvokeAction_Event_Progress) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*CallFunction_Request) ProtoMessage() {}
+func (*InvokeAction_Event_Progress) ProtoMessage() {}
-func (x *CallFunction_Request) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin5_proto_msgTypes[80]
- if protoimpl.UnsafeEnabled && x != nil {
+func (x *InvokeAction_Event_Progress) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin5_proto_msgTypes[126]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -4607,54 +6730,41 @@ func (x *CallFunction_Request) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use CallFunction_Request.ProtoReflect.Descriptor instead.
-func (*CallFunction_Request) Descriptor() ([]byte, []int) {
- return file_tfplugin5_proto_rawDescGZIP(), []int{28, 0}
+// Deprecated: Use InvokeAction_Event_Progress.ProtoReflect.Descriptor instead.
+func (*InvokeAction_Event_Progress) Descriptor() ([]byte, []int) {
+ return file_tfplugin5_proto_rawDescGZIP(), []int{42, 1, 0}
}
-func (x *CallFunction_Request) GetName() string {
+func (x *InvokeAction_Event_Progress) GetMessage() string {
if x != nil {
- return x.Name
+ return x.Message
}
return ""
}
-func (x *CallFunction_Request) GetArguments() []*DynamicValue {
- if x != nil {
- return x.Arguments
- }
- return nil
-}
-
-type CallFunction_Response struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+type InvokeAction_Event_Completed struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Diagnostics []*Diagnostic `protobuf:"bytes,1,rep,name=diagnostics,proto3" json:"diagnostics,omitempty"`
unknownFields protoimpl.UnknownFields
-
- // result is result value after running the function logic.
- Result *DynamicValue `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"`
- // error is any error from the function logic.
- Error *FunctionError `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
+ sizeCache protoimpl.SizeCache
}
-func (x *CallFunction_Response) Reset() {
- *x = CallFunction_Response{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin5_proto_msgTypes[81]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+func (x *InvokeAction_Event_Completed) Reset() {
+ *x = InvokeAction_Event_Completed{}
+ mi := &file_tfplugin5_proto_msgTypes[127]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
-func (x *CallFunction_Response) String() string {
+func (x *InvokeAction_Event_Completed) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*CallFunction_Response) ProtoMessage() {}
+func (*InvokeAction_Event_Completed) ProtoMessage() {}
-func (x *CallFunction_Response) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin5_proto_msgTypes[81]
- if protoimpl.UnsafeEnabled && x != nil {
+func (x *InvokeAction_Event_Completed) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin5_proto_msgTypes[127]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -4664,1000 +6774,878 @@ func (x *CallFunction_Response) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use CallFunction_Response.ProtoReflect.Descriptor instead.
-func (*CallFunction_Response) Descriptor() ([]byte, []int) {
- return file_tfplugin5_proto_rawDescGZIP(), []int{28, 1}
-}
-
-func (x *CallFunction_Response) GetResult() *DynamicValue {
- if x != nil {
- return x.Result
- }
- return nil
+// Deprecated: Use InvokeAction_Event_Completed.ProtoReflect.Descriptor instead.
+func (*InvokeAction_Event_Completed) Descriptor() ([]byte, []int) {
+ return file_tfplugin5_proto_rawDescGZIP(), []int{42, 1, 1}
}
-func (x *CallFunction_Response) GetError() *FunctionError {
+func (x *InvokeAction_Event_Completed) GetDiagnostics() []*Diagnostic {
if x != nil {
- return x.Error
+ return x.Diagnostics
}
return nil
}
var File_tfplugin5_proto protoreflect.FileDescriptor
-var file_tfplugin5_proto_rawDesc = []byte{
- 0x0a, 0x0f, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x35, 0x2e, 0x70, 0x72, 0x6f, 0x74,
- 0x6f, 0x12, 0x09, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x35, 0x22, 0x3c, 0x0a, 0x0c,
- 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x18, 0x0a, 0x07,
- 0x6d, 0x73, 0x67, 0x70, 0x61, 0x63, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x6d,
- 0x73, 0x67, 0x70, 0x61, 0x63, 0x6b, 0x12, 0x12, 0x0a, 0x04, 0x6a, 0x73, 0x6f, 0x6e, 0x18, 0x02,
- 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x6a, 0x73, 0x6f, 0x6e, 0x22, 0xe3, 0x01, 0x0a, 0x0a, 0x44,
- 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x12, 0x3a, 0x0a, 0x08, 0x73, 0x65, 0x76,
- 0x65, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x74, 0x66,
- 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x35, 0x2e, 0x44, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74,
- 0x69, 0x63, 0x2e, 0x53, 0x65, 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, 0x52, 0x08, 0x73, 0x65, 0x76,
- 0x65, 0x72, 0x69, 0x74, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79,
- 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12,
- 0x16, 0x0a, 0x06, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52,
- 0x06, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x74, 0x74, 0x72, 0x69,
- 0x62, 0x75, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x74, 0x66, 0x70,
- 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x35, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65,
- 0x50, 0x61, 0x74, 0x68, 0x52, 0x09, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x22,
- 0x2f, 0x0a, 0x08, 0x53, 0x65, 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, 0x12, 0x0b, 0x0a, 0x07, 0x49,
- 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x52, 0x52, 0x4f,
- 0x52, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x57, 0x41, 0x52, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x02,
- 0x22, 0x6b, 0x0a, 0x0d, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x72, 0x72, 0x6f,
- 0x72, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x65, 0x78, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
- 0x04, 0x74, 0x65, 0x78, 0x74, 0x12, 0x30, 0x0a, 0x11, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f,
- 0x6e, 0x5f, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03,
- 0x48, 0x00, 0x52, 0x10, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x72, 0x67, 0x75,
- 0x6d, 0x65, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x14, 0x0a, 0x12, 0x5f, 0x66, 0x75, 0x6e, 0x63,
- 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0xdc, 0x01,
- 0x0a, 0x0d, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x50, 0x61, 0x74, 0x68, 0x12,
- 0x33, 0x0a, 0x05, 0x73, 0x74, 0x65, 0x70, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d,
- 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x35, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69,
- 0x62, 0x75, 0x74, 0x65, 0x50, 0x61, 0x74, 0x68, 0x2e, 0x53, 0x74, 0x65, 0x70, 0x52, 0x05, 0x73,
- 0x74, 0x65, 0x70, 0x73, 0x1a, 0x95, 0x01, 0x0a, 0x04, 0x53, 0x74, 0x65, 0x70, 0x12, 0x27, 0x0a,
- 0x0e, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18,
- 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0d, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75,
- 0x74, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2e, 0x0a, 0x12, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e,
- 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01,
- 0x28, 0x09, 0x48, 0x00, 0x52, 0x10, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x4b, 0x65, 0x79,
- 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x28, 0x0a, 0x0f, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e,
- 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x69, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x48,
- 0x00, 0x52, 0x0d, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x4b, 0x65, 0x79, 0x49, 0x6e, 0x74,
- 0x42, 0x0a, 0x0a, 0x08, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x22, 0x33, 0x0a, 0x04,
- 0x53, 0x74, 0x6f, 0x70, 0x1a, 0x09, 0x0a, 0x07, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
- 0x20, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x45,
- 0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x45, 0x72, 0x72, 0x6f,
- 0x72, 0x22, 0x96, 0x01, 0x0a, 0x08, 0x52, 0x61, 0x77, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x12,
- 0x0a, 0x04, 0x6a, 0x73, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x6a, 0x73,
- 0x6f, 0x6e, 0x12, 0x3a, 0x0a, 0x07, 0x66, 0x6c, 0x61, 0x74, 0x6d, 0x61, 0x70, 0x18, 0x02, 0x20,
- 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x35, 0x2e,
- 0x52, 0x61, 0x77, 0x53, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x46, 0x6c, 0x61, 0x74, 0x6d, 0x61, 0x70,
- 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x66, 0x6c, 0x61, 0x74, 0x6d, 0x61, 0x70, 0x1a, 0x3a,
- 0x0a, 0x0c, 0x46, 0x6c, 0x61, 0x74, 0x6d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10,
- 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79,
- 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
- 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xcc, 0x07, 0x0a, 0x06, 0x53,
- 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
- 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12,
- 0x2d, 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17,
- 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x35, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d,
- 0x61, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x1a, 0xa2,
- 0x02, 0x0a, 0x05, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73,
- 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69,
- 0x6f, 0x6e, 0x12, 0x3b, 0x0a, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73,
- 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69,
- 0x6e, 0x35, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62,
- 0x75, 0x74, 0x65, 0x52, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x12,
- 0x3e, 0x0a, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x03,
- 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x35,
- 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x42, 0x6c,
- 0x6f, 0x63, 0x6b, 0x52, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12,
- 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04,
- 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f,
- 0x6e, 0x12, 0x40, 0x0a, 0x10, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e,
- 0x5f, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x74, 0x66,
- 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x35, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4b, 0x69,
- 0x6e, 0x64, 0x52, 0x0f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x4b,
- 0x69, 0x6e, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65,
- 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61,
- 0x74, 0x65, 0x64, 0x1a, 0xa9, 0x02, 0x0a, 0x09, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74,
- 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
- 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20,
- 0x01, 0x28, 0x0c, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73,
- 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b,
- 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x72,
- 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x72,
- 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6f, 0x70, 0x74, 0x69, 0x6f,
- 0x6e, 0x61, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x6f, 0x70, 0x74, 0x69, 0x6f,
- 0x6e, 0x61, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x64, 0x18,
- 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x64, 0x12,
- 0x1c, 0x0a, 0x09, 0x73, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x18, 0x07, 0x20, 0x01,
- 0x28, 0x08, 0x52, 0x09, 0x73, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x12, 0x40, 0x0a,
- 0x10, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6b, 0x69, 0x6e,
- 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67,
- 0x69, 0x6e, 0x35, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4b, 0x69, 0x6e, 0x64, 0x52, 0x0f,
- 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x69, 0x6e, 0x64, 0x12,
- 0x1e, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x09, 0x20,
- 0x01, 0x28, 0x08, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x1a,
- 0xa7, 0x02, 0x0a, 0x0b, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12,
- 0x1b, 0x0a, 0x09, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01,
- 0x28, 0x09, 0x52, 0x08, 0x74, 0x79, 0x70, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2d, 0x0a, 0x05,
- 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x74, 0x66,
- 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x35, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x42,
- 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x43, 0x0a, 0x07, 0x6e,
- 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x29, 0x2e, 0x74,
- 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x35, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e,
- 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x4e, 0x65, 0x73, 0x74,
- 0x69, 0x6e, 0x67, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x07, 0x6e, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67,
- 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x69, 0x6e, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x04, 0x20,
- 0x01, 0x28, 0x03, 0x52, 0x08, 0x6d, 0x69, 0x6e, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x1b, 0x0a,
- 0x09, 0x6d, 0x61, 0x78, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03,
- 0x52, 0x08, 0x6d, 0x61, 0x78, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x22, 0x4d, 0x0a, 0x0b, 0x4e, 0x65,
- 0x73, 0x74, 0x69, 0x6e, 0x67, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x49, 0x4e, 0x56,
- 0x41, 0x4c, 0x49, 0x44, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x49, 0x4e, 0x47, 0x4c, 0x45,
- 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x4c, 0x49, 0x53, 0x54, 0x10, 0x02, 0x12, 0x07, 0x0a, 0x03,
- 0x53, 0x45, 0x54, 0x10, 0x03, 0x12, 0x07, 0x0a, 0x03, 0x4d, 0x41, 0x50, 0x10, 0x04, 0x12, 0x09,
- 0x0a, 0x05, 0x47, 0x52, 0x4f, 0x55, 0x50, 0x10, 0x05, 0x22, 0xa8, 0x01, 0x0a, 0x12, 0x53, 0x65,
- 0x72, 0x76, 0x65, 0x72, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73,
- 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x6c, 0x61, 0x6e, 0x5f, 0x64, 0x65, 0x73, 0x74, 0x72, 0x6f, 0x79,
- 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x70, 0x6c, 0x61, 0x6e, 0x44, 0x65, 0x73, 0x74,
- 0x72, 0x6f, 0x79, 0x12, 0x3f, 0x0a, 0x1c, 0x67, 0x65, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69,
- 0x64, 0x65, 0x72, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f,
- 0x6e, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x19, 0x67, 0x65, 0x74, 0x50, 0x72,
- 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4f, 0x70, 0x74, 0x69,
- 0x6f, 0x6e, 0x61, 0x6c, 0x12, 0x2e, 0x0a, 0x13, 0x6d, 0x6f, 0x76, 0x65, 0x5f, 0x72, 0x65, 0x73,
- 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28,
- 0x08, 0x52, 0x11, 0x6d, 0x6f, 0x76, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53,
- 0x74, 0x61, 0x74, 0x65, 0x22, 0x3f, 0x0a, 0x12, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x61,
- 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x29, 0x0a, 0x10, 0x64, 0x65,
- 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, 0x5f, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x18, 0x01,
- 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x64, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, 0x41, 0x6c,
- 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x22, 0x8e, 0x05, 0x0a, 0x08, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69,
- 0x6f, 0x6e, 0x12, 0x3d, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73,
- 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69,
- 0x6e, 0x35, 0x2e, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x50, 0x61, 0x72, 0x61,
- 0x6d, 0x65, 0x74, 0x65, 0x72, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72,
- 0x73, 0x12, 0x4c, 0x0a, 0x12, 0x76, 0x61, 0x72, 0x69, 0x61, 0x64, 0x69, 0x63, 0x5f, 0x70, 0x61,
- 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e,
- 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x35, 0x2e, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69,
- 0x6f, 0x6e, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x52, 0x11, 0x76, 0x61,
- 0x72, 0x69, 0x61, 0x64, 0x69, 0x63, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x12,
- 0x32, 0x0a, 0x06, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32,
- 0x1a, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x35, 0x2e, 0x46, 0x75, 0x6e, 0x63,
- 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x52, 0x06, 0x72, 0x65, 0x74,
- 0x75, 0x72, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x04,
- 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x20, 0x0a,
- 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01,
- 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12,
- 0x40, 0x0a, 0x10, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6b,
- 0x69, 0x6e, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x74, 0x66, 0x70, 0x6c,
- 0x75, 0x67, 0x69, 0x6e, 0x35, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4b, 0x69, 0x6e, 0x64,
- 0x52, 0x0f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x69, 0x6e,
- 0x64, 0x12, 0x2f, 0x0a, 0x13, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,
- 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12,
- 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61,
- 0x67, 0x65, 0x1a, 0xf3, 0x01, 0x0a, 0x09, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72,
- 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
- 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01,
- 0x28, 0x0c, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x28, 0x0a, 0x10, 0x61, 0x6c, 0x6c, 0x6f,
- 0x77, 0x5f, 0x6e, 0x75, 0x6c, 0x6c, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01,
- 0x28, 0x08, 0x52, 0x0e, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x4e, 0x75, 0x6c, 0x6c, 0x56, 0x61, 0x6c,
- 0x75, 0x65, 0x12, 0x30, 0x0a, 0x14, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x75, 0x6e, 0x6b, 0x6e,
- 0x6f, 0x77, 0x6e, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08,
- 0x52, 0x12, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x56, 0x61,
- 0x6c, 0x75, 0x65, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74,
- 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72,
- 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x40, 0x0a, 0x10, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69,
- 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e,
- 0x32, 0x15, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x35, 0x2e, 0x53, 0x74, 0x72,
- 0x69, 0x6e, 0x67, 0x4b, 0x69, 0x6e, 0x64, 0x52, 0x0f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70,
- 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x69, 0x6e, 0x64, 0x1a, 0x1c, 0x0a, 0x06, 0x52, 0x65, 0x74, 0x75,
- 0x72, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c,
- 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0xa2, 0x01, 0x0a, 0x08, 0x44, 0x65, 0x66, 0x65, 0x72,
- 0x72, 0x65, 0x64, 0x12, 0x32, 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x01, 0x20,
- 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x35, 0x2e,
- 0x44, 0x65, 0x66, 0x65, 0x72, 0x72, 0x65, 0x64, 0x2e, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x52,
- 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x22, 0x62, 0x0a, 0x06, 0x52, 0x65, 0x61, 0x73, 0x6f,
- 0x6e, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x1b,
- 0x0a, 0x17, 0x52, 0x45, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x43, 0x4f, 0x4e, 0x46, 0x49,
- 0x47, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x01, 0x12, 0x1b, 0x0a, 0x17, 0x50,
- 0x52, 0x4f, 0x56, 0x49, 0x44, 0x45, 0x52, 0x5f, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x47, 0x5f, 0x55,
- 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x02, 0x12, 0x11, 0x0a, 0x0d, 0x41, 0x42, 0x53, 0x45,
- 0x4e, 0x54, 0x5f, 0x50, 0x52, 0x45, 0x52, 0x45, 0x51, 0x10, 0x03, 0x22, 0x96, 0x04, 0x0a, 0x0b,
- 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x09, 0x0a, 0x07, 0x52,
- 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0xef, 0x02, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x70, 0x6f,
- 0x6e, 0x73, 0x65, 0x12, 0x4e, 0x0a, 0x13, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x63, 0x61,
- 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b,
- 0x32, 0x1d, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x35, 0x2e, 0x53, 0x65, 0x72,
- 0x76, 0x65, 0x72, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x52,
- 0x12, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74,
- 0x69, 0x65, 0x73, 0x12, 0x37, 0x0a, 0x0b, 0x64, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69,
- 0x63, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75,
- 0x67, 0x69, 0x6e, 0x35, 0x2e, 0x44, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x52,
- 0x0b, 0x64, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x73, 0x12, 0x4c, 0x0a, 0x0c,
- 0x64, 0x61, 0x74, 0x61, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03,
- 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x35, 0x2e, 0x47,
- 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53,
- 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x0b, 0x64,
- 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x45, 0x0a, 0x09, 0x72, 0x65,
- 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e,
- 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x35, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74,
- 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65,
- 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
- 0x73, 0x12, 0x45, 0x0a, 0x09, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05,
- 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x35,
- 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x46, 0x75, 0x6e,
- 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x09, 0x66,
- 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x26, 0x0a, 0x10, 0x46, 0x75, 0x6e, 0x63,
- 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04,
- 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65,
- 0x1a, 0x31, 0x0a, 0x12, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65,
- 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x6e,
- 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x79, 0x70, 0x65, 0x4e,
- 0x61, 0x6d, 0x65, 0x1a, 0x2f, 0x0a, 0x10, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d,
- 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x79, 0x70, 0x65, 0x5f,
- 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x79, 0x70, 0x65,
- 0x4e, 0x61, 0x6d, 0x65, 0x22, 0xc7, 0x06, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x76,
- 0x69, 0x64, 0x65, 0x72, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x1a, 0x09, 0x0a, 0x07, 0x52, 0x65,
- 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0xa6, 0x06, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
- 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x01,
- 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x35,
- 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65,
- 0x72, 0x12, 0x65, 0x0a, 0x10, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x73, 0x63,
- 0x68, 0x65, 0x6d, 0x61, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x74, 0x66,
- 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x35, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x76, 0x69,
- 0x64, 0x65, 0x72, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
- 0x73, 0x65, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d,
- 0x61, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
- 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x12, 0x6c, 0x0a, 0x13, 0x64, 0x61, 0x74, 0x61,
- 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x18,
- 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e,
- 0x35, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x53, 0x63, 0x68,
- 0x65, 0x6d, 0x61, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x44, 0x61, 0x74,
- 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x45, 0x6e,
- 0x74, 0x72, 0x79, 0x52, 0x11, 0x64, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53,
- 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x12, 0x37, 0x0a, 0x0b, 0x64, 0x69, 0x61, 0x67, 0x6e, 0x6f,
- 0x73, 0x74, 0x69, 0x63, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x66,
- 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x35, 0x2e, 0x44, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74,
- 0x69, 0x63, 0x52, 0x0b, 0x64, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x73, 0x12,
- 0x36, 0x0a, 0x0d, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x5f, 0x6d, 0x65, 0x74, 0x61,
- 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69,
- 0x6e, 0x35, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x0c, 0x70, 0x72, 0x6f, 0x76, 0x69,
- 0x64, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x4e, 0x0a, 0x13, 0x73, 0x65, 0x72, 0x76, 0x65,
- 0x72, 0x5f, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x06,
- 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x35,
- 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74,
- 0x69, 0x65, 0x73, 0x52, 0x12, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x43, 0x61, 0x70, 0x61, 0x62,
- 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x52, 0x0a, 0x09, 0x66, 0x75, 0x6e, 0x63, 0x74,
- 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x74, 0x66, 0x70,
- 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x35, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64,
- 0x65, 0x72, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
- 0x65, 0x2e, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79,
- 0x52, 0x09, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x55, 0x0a, 0x14, 0x52,
- 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x45, 0x6e,
- 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
- 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x27, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02,
- 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x35,
- 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02,
- 0x38, 0x01, 0x1a, 0x57, 0x0a, 0x16, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65,
- 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03,
- 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x27,
- 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e,
- 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x35, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61,
- 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x51, 0x0a, 0x0e, 0x46,
- 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a,
- 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12,
- 0x29, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13,
- 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x35, 0x2e, 0x46, 0x75, 0x6e, 0x63, 0x74,
- 0x69, 0x6f, 0x6e, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xdb,
- 0x01, 0x0a, 0x15, 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, 0x65, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64,
- 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0x3a, 0x0a, 0x07, 0x52, 0x65, 0x71, 0x75,
- 0x65, 0x73, 0x74, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20,
- 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x35, 0x2e,
- 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x63, 0x6f,
- 0x6e, 0x66, 0x69, 0x67, 0x1a, 0x85, 0x01, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
- 0x65, 0x12, 0x40, 0x0a, 0x0f, 0x70, 0x72, 0x65, 0x70, 0x61, 0x72, 0x65, 0x64, 0x5f, 0x63, 0x6f,
- 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x74, 0x66, 0x70,
- 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x35, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x56, 0x61,
- 0x6c, 0x75, 0x65, 0x52, 0x0e, 0x70, 0x72, 0x65, 0x70, 0x61, 0x72, 0x65, 0x64, 0x43, 0x6f, 0x6e,
- 0x66, 0x69, 0x67, 0x12, 0x37, 0x0a, 0x0b, 0x64, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69,
- 0x63, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75,
- 0x67, 0x69, 0x6e, 0x35, 0x2e, 0x44, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x52,
- 0x0b, 0x64, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x73, 0x22, 0x90, 0x02, 0x0a,
- 0x14, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
- 0x53, 0x74, 0x61, 0x74, 0x65, 0x1a, 0x72, 0x0a, 0x07, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
- 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20,
- 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x79, 0x70, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a,
- 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07,
- 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x30, 0x0a, 0x09, 0x72, 0x61, 0x77, 0x5f, 0x73,
- 0x74, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x74, 0x66, 0x70,
- 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x35, 0x2e, 0x52, 0x61, 0x77, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52,
- 0x08, 0x72, 0x61, 0x77, 0x53, 0x74, 0x61, 0x74, 0x65, 0x1a, 0x83, 0x01, 0x0a, 0x08, 0x52, 0x65,
- 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3e, 0x0a, 0x0e, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64,
- 0x65, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17,
- 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x35, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d,
- 0x69, 0x63, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0d, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65,
- 0x64, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x37, 0x0a, 0x0b, 0x64, 0x69, 0x61, 0x67, 0x6e, 0x6f,
- 0x73, 0x74, 0x69, 0x63, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x66,
- 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x35, 0x2e, 0x44, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74,
- 0x69, 0x63, 0x52, 0x0b, 0x64, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x73, 0x22,
- 0xba, 0x01, 0x0a, 0x1a, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f,
- 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0x57,
- 0x0a, 0x07, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x79, 0x70,
- 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x79,
- 0x70, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67,
- 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69,
- 0x6e, 0x35, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52,
- 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0x43, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x70, 0x6f,
- 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x0b, 0x64, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69,
- 0x63, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75,
- 0x67, 0x69, 0x6e, 0x35, 0x2e, 0x44, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x52,
- 0x0b, 0x64, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x73, 0x22, 0xb8, 0x01, 0x0a,
- 0x18, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75,
- 0x72, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0x57, 0x0a, 0x07, 0x52, 0x65, 0x71,
- 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x6e, 0x61, 0x6d,
- 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x79, 0x70, 0x65, 0x4e, 0x61, 0x6d,
- 0x65, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28,
- 0x0b, 0x32, 0x17, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x35, 0x2e, 0x44, 0x79,
- 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66,
- 0x69, 0x67, 0x1a, 0x43, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37,
- 0x0a, 0x0b, 0x64, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x73, 0x18, 0x01, 0x20,
- 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x35, 0x2e,
- 0x44, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x52, 0x0b, 0x64, 0x69, 0x61, 0x67,
- 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x73, 0x22, 0x8a, 0x02, 0x0a, 0x09, 0x43, 0x6f, 0x6e, 0x66,
- 0x69, 0x67, 0x75, 0x72, 0x65, 0x1a, 0xb7, 0x01, 0x0a, 0x07, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
- 0x74, 0x12, 0x2b, 0x0a, 0x11, 0x74, 0x65, 0x72, 0x72, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x5f, 0x76,
- 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x74, 0x65,
- 0x72, 0x72, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x2f,
- 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17,
- 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x35, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d,
- 0x69, 0x63, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12,
- 0x4e, 0x0a, 0x13, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69,
- 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x74,
- 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x35, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43,
- 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x52, 0x12, 0x63, 0x6c, 0x69,
- 0x65, 0x6e, 0x74, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x1a,
- 0x43, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x0b, 0x64,
- 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b,
- 0x32, 0x15, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x35, 0x2e, 0x44, 0x69, 0x61,
- 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x52, 0x0b, 0x64, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73,
- 0x74, 0x69, 0x63, 0x73, 0x22, 0xe4, 0x03, 0x0a, 0x0c, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x73,
- 0x6f, 0x75, 0x72, 0x63, 0x65, 0x1a, 0x8c, 0x02, 0x0a, 0x07, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
- 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01,
- 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x79, 0x70, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x3c,
- 0x0a, 0x0d, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18,
- 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e,
- 0x35, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0c,
- 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x18, 0x0a, 0x07,
- 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x70,
- 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x12, 0x3c, 0x0a, 0x0d, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64,
- 0x65, 0x72, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e,
- 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x35, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69,
- 0x63, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0c, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72,
- 0x4d, 0x65, 0x74, 0x61, 0x12, 0x4e, 0x0a, 0x13, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x63,
- 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28,
- 0x0b, 0x32, 0x1d, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x35, 0x2e, 0x43, 0x6c,
- 0x69, 0x65, 0x6e, 0x74, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73,
- 0x52, 0x12, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69,
- 0x74, 0x69, 0x65, 0x73, 0x1a, 0xc4, 0x01, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
- 0x65, 0x12, 0x34, 0x0a, 0x09, 0x6e, 0x65, 0x77, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01,
- 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x35,
- 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x08, 0x6e,
- 0x65, 0x77, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x37, 0x0a, 0x0b, 0x64, 0x69, 0x61, 0x67, 0x6e,
- 0x6f, 0x73, 0x74, 0x69, 0x63, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74,
- 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x35, 0x2e, 0x44, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73,
- 0x74, 0x69, 0x63, 0x52, 0x0b, 0x64, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x73,
- 0x12, 0x18, 0x0a, 0x07, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28,
- 0x0c, 0x52, 0x07, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x12, 0x2f, 0x0a, 0x08, 0x64, 0x65,
- 0x66, 0x65, 0x72, 0x72, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x74,
- 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x35, 0x2e, 0x44, 0x65, 0x66, 0x65, 0x72, 0x72, 0x65,
- 0x64, 0x52, 0x08, 0x64, 0x65, 0x66, 0x65, 0x72, 0x72, 0x65, 0x64, 0x22, 0xf3, 0x05, 0x0a, 0x12,
- 0x50, 0x6c, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x68, 0x61, 0x6e,
- 0x67, 0x65, 0x1a, 0x8b, 0x03, 0x0a, 0x07, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b,
- 0x0a, 0x09, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
- 0x09, 0x52, 0x08, 0x74, 0x79, 0x70, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x38, 0x0a, 0x0b, 0x70,
- 0x72, 0x69, 0x6f, 0x72, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,
- 0x32, 0x17, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x35, 0x2e, 0x44, 0x79, 0x6e,
- 0x61, 0x6d, 0x69, 0x63, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0a, 0x70, 0x72, 0x69, 0x6f, 0x72,
- 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x45, 0x0a, 0x12, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65,
- 0x64, 0x5f, 0x6e, 0x65, 0x77, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28,
- 0x0b, 0x32, 0x17, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x35, 0x2e, 0x44, 0x79,
- 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x10, 0x70, 0x72, 0x6f, 0x70,
- 0x6f, 0x73, 0x65, 0x64, 0x4e, 0x65, 0x77, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x2f, 0x0a, 0x06,
- 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x74,
- 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x35, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63,
- 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x23, 0x0a,
- 0x0d, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x5f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x18, 0x05,
- 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x50, 0x72, 0x69, 0x76, 0x61,
- 0x74, 0x65, 0x12, 0x3c, 0x0a, 0x0d, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x5f, 0x6d,
- 0x65, 0x74, 0x61, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x74, 0x66, 0x70, 0x6c,
- 0x75, 0x67, 0x69, 0x6e, 0x35, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x56, 0x61, 0x6c,
- 0x75, 0x65, 0x52, 0x0c, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x61,
- 0x12, 0x4e, 0x0a, 0x13, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x61, 0x70, 0x61, 0x62,
- 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e,
- 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x35, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74,
- 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x52, 0x12, 0x63, 0x6c,
- 0x69, 0x65, 0x6e, 0x74, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73,
- 0x1a, 0xce, 0x02, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3c, 0x0a,
- 0x0d, 0x70, 0x6c, 0x61, 0x6e, 0x6e, 0x65, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01,
- 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x35,
- 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0c, 0x70,
- 0x6c, 0x61, 0x6e, 0x6e, 0x65, 0x64, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x43, 0x0a, 0x10, 0x72,
- 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x73, 0x5f, 0x72, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x18,
- 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e,
- 0x35, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x50, 0x61, 0x74, 0x68, 0x52,
- 0x0f, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65,
- 0x12, 0x27, 0x0a, 0x0f, 0x70, 0x6c, 0x61, 0x6e, 0x6e, 0x65, 0x64, 0x5f, 0x70, 0x72, 0x69, 0x76,
- 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0e, 0x70, 0x6c, 0x61, 0x6e, 0x6e,
- 0x65, 0x64, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x12, 0x37, 0x0a, 0x0b, 0x64, 0x69, 0x61,
- 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15,
- 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x35, 0x2e, 0x44, 0x69, 0x61, 0x67, 0x6e,
- 0x6f, 0x73, 0x74, 0x69, 0x63, 0x52, 0x0b, 0x64, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69,
- 0x63, 0x73, 0x12, 0x2c, 0x0a, 0x12, 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x5f, 0x74, 0x79, 0x70,
- 0x65, 0x5f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10,
- 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x54, 0x79, 0x70, 0x65, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d,
- 0x12, 0x2f, 0x0a, 0x08, 0x64, 0x65, 0x66, 0x65, 0x72, 0x72, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01,
- 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x35, 0x2e, 0x44,
- 0x65, 0x66, 0x65, 0x72, 0x72, 0x65, 0x64, 0x52, 0x08, 0x64, 0x65, 0x66, 0x65, 0x72, 0x72, 0x65,
- 0x64, 0x22, 0x92, 0x04, 0x0a, 0x13, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x52, 0x65, 0x73, 0x6f, 0x75,
- 0x72, 0x63, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x1a, 0xb6, 0x02, 0x0a, 0x07, 0x52, 0x65,
- 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x6e, 0x61,
- 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x79, 0x70, 0x65, 0x4e, 0x61,
- 0x6d, 0x65, 0x12, 0x38, 0x0a, 0x0b, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x5f, 0x73, 0x74, 0x61, 0x74,
- 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67,
- 0x69, 0x6e, 0x35, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x56, 0x61, 0x6c, 0x75, 0x65,
- 0x52, 0x0a, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x3c, 0x0a, 0x0d,
- 0x70, 0x6c, 0x61, 0x6e, 0x6e, 0x65, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20,
- 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x35, 0x2e,
- 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0c, 0x70, 0x6c,
- 0x61, 0x6e, 0x6e, 0x65, 0x64, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f,
- 0x6e, 0x66, 0x69, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x74, 0x66, 0x70,
- 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x35, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x56, 0x61,
- 0x6c, 0x75, 0x65, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x27, 0x0a, 0x0f, 0x70,
- 0x6c, 0x61, 0x6e, 0x6e, 0x65, 0x64, 0x5f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x18, 0x05,
- 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0e, 0x70, 0x6c, 0x61, 0x6e, 0x6e, 0x65, 0x64, 0x50, 0x72, 0x69,
- 0x76, 0x61, 0x74, 0x65, 0x12, 0x3c, 0x0a, 0x0d, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72,
- 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x74, 0x66,
- 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x35, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x56,
- 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0c, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x4d, 0x65,
- 0x74, 0x61, 0x1a, 0xc1, 0x01, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
- 0x34, 0x0a, 0x09, 0x6e, 0x65, 0x77, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01,
- 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x35, 0x2e, 0x44,
- 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x08, 0x6e, 0x65, 0x77,
- 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65,
- 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x12,
- 0x37, 0x0a, 0x0b, 0x64, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x73, 0x18, 0x03,
- 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x35,
- 0x2e, 0x44, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x52, 0x0b, 0x64, 0x69, 0x61,
- 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x73, 0x12, 0x2c, 0x0a, 0x12, 0x6c, 0x65, 0x67, 0x61,
- 0x63, 0x79, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x18, 0x04,
- 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x54, 0x79, 0x70, 0x65,
- 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x22, 0xef, 0x03, 0x0a, 0x13, 0x49, 0x6d, 0x70, 0x6f, 0x72,
- 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x1a, 0x86,
- 0x01, 0x0a, 0x07, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x79,
- 0x70, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74,
- 0x79, 0x70, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20,
- 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x4e, 0x0a, 0x13, 0x63, 0x6c, 0x69, 0x65, 0x6e,
- 0x74, 0x5f, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x03,
- 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x35,
- 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74,
- 0x69, 0x65, 0x73, 0x52, 0x12, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x61, 0x70, 0x61, 0x62,
- 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x1a, 0x78, 0x0a, 0x10, 0x49, 0x6d, 0x70, 0x6f, 0x72,
- 0x74, 0x65, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x74,
- 0x79, 0x70, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08,
- 0x74, 0x79, 0x70, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2d, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74,
- 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67,
- 0x69, 0x6e, 0x35, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x56, 0x61, 0x6c, 0x75, 0x65,
- 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x72, 0x69, 0x76, 0x61,
- 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74,
- 0x65, 0x1a, 0xd4, 0x01, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5e,
- 0x0a, 0x12, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75,
- 0x72, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x74, 0x66, 0x70,
- 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x35, 0x2e, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x73,
- 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x49, 0x6d, 0x70, 0x6f, 0x72,
- 0x74, 0x65, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x11, 0x69, 0x6d, 0x70,
- 0x6f, 0x72, 0x74, 0x65, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x37,
- 0x0a, 0x0b, 0x64, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x73, 0x18, 0x02, 0x20,
- 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x35, 0x2e,
- 0x44, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x52, 0x0b, 0x64, 0x69, 0x61, 0x67,
- 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x73, 0x12, 0x2f, 0x0a, 0x08, 0x64, 0x65, 0x66, 0x65, 0x72,
- 0x72, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x74, 0x66, 0x70, 0x6c,
- 0x75, 0x67, 0x69, 0x6e, 0x35, 0x2e, 0x44, 0x65, 0x66, 0x65, 0x72, 0x72, 0x65, 0x64, 0x52, 0x08,
- 0x64, 0x65, 0x66, 0x65, 0x72, 0x72, 0x65, 0x64, 0x22, 0xe7, 0x03, 0x0a, 0x11, 0x4d, 0x6f, 0x76,
- 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x1a, 0xa8,
- 0x02, 0x0a, 0x07, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x36, 0x0a, 0x17, 0x73, 0x6f,
- 0x75, 0x72, 0x63, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x5f, 0x61, 0x64,
- 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x15, 0x73, 0x6f, 0x75,
- 0x72, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65,
- 0x73, 0x73, 0x12, 0x28, 0x0a, 0x10, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70,
- 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x73, 0x6f,
- 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x32, 0x0a, 0x15,
- 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x76, 0x65,
- 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x13, 0x73, 0x6f, 0x75,
- 0x72, 0x63, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
- 0x12, 0x36, 0x0a, 0x0c, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65,
- 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69,
- 0x6e, 0x35, 0x2e, 0x52, 0x61, 0x77, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0b, 0x73, 0x6f, 0x75,
- 0x72, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x28, 0x0a, 0x10, 0x74, 0x61, 0x72, 0x67,
- 0x65, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01,
- 0x28, 0x09, 0x52, 0x0e, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x4e, 0x61,
- 0x6d, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x70, 0x72, 0x69,
- 0x76, 0x61, 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0d, 0x73, 0x6f, 0x75, 0x72,
- 0x63, 0x65, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x1a, 0xa6, 0x01, 0x0a, 0x08, 0x52, 0x65,
- 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, 0x0c, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74,
- 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x74,
- 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x35, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63,
- 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0b, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x53, 0x74, 0x61,
- 0x74, 0x65, 0x12, 0x37, 0x0a, 0x0b, 0x64, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63,
- 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67,
- 0x69, 0x6e, 0x35, 0x2e, 0x44, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x52, 0x0b,
- 0x64, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x74,
- 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20,
- 0x01, 0x28, 0x0c, 0x52, 0x0d, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x50, 0x72, 0x69, 0x76, 0x61,
- 0x74, 0x65, 0x22, 0x9e, 0x03, 0x0a, 0x0e, 0x52, 0x65, 0x61, 0x64, 0x44, 0x61, 0x74, 0x61, 0x53,
- 0x6f, 0x75, 0x72, 0x63, 0x65, 0x1a, 0xe5, 0x01, 0x0a, 0x07, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
- 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01,
- 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x79, 0x70, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2f,
- 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17,
- 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x35, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d,
- 0x69, 0x63, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12,
- 0x3c, 0x0a, 0x0d, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x5f, 0x6d, 0x65, 0x74, 0x61,
- 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69,
- 0x6e, 0x35, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52,
- 0x0c, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x4e, 0x0a,
- 0x13, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69,
- 0x74, 0x69, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x74, 0x66, 0x70,
- 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x35, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x61, 0x70,
- 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x52, 0x12, 0x63, 0x6c, 0x69, 0x65, 0x6e,
- 0x74, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x1a, 0xa3, 0x01,
- 0x0a, 0x08, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x05, 0x73, 0x74,
- 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x74, 0x66, 0x70, 0x6c,
- 0x75, 0x67, 0x69, 0x6e, 0x35, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x56, 0x61, 0x6c,
- 0x75, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x37, 0x0a, 0x0b, 0x64, 0x69, 0x61,
- 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15,
- 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x35, 0x2e, 0x44, 0x69, 0x61, 0x67, 0x6e,
- 0x6f, 0x73, 0x74, 0x69, 0x63, 0x52, 0x0b, 0x64, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69,
- 0x63, 0x73, 0x12, 0x2f, 0x0a, 0x08, 0x64, 0x65, 0x66, 0x65, 0x72, 0x72, 0x65, 0x64, 0x18, 0x03,
- 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x35,
- 0x2e, 0x44, 0x65, 0x66, 0x65, 0x72, 0x72, 0x65, 0x64, 0x52, 0x08, 0x64, 0x65, 0x66, 0x65, 0x72,
- 0x72, 0x65, 0x64, 0x22, 0x9b, 0x01, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x76, 0x69,
- 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x1a, 0x09, 0x0a, 0x07,
- 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x78, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x70, 0x6f,
- 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e,
- 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75,
- 0x67, 0x69, 0x6e, 0x35, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x0b, 0x70, 0x72, 0x6f,
- 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x12, 0x37, 0x0a, 0x0b, 0x64, 0x69, 0x61, 0x67,
- 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e,
- 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x35, 0x2e, 0x44, 0x69, 0x61, 0x67, 0x6e, 0x6f,
- 0x73, 0x74, 0x69, 0x63, 0x52, 0x0b, 0x64, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63,
- 0x73, 0x22, 0x9c, 0x01, 0x0a, 0x19, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x50, 0x72,
- 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a,
- 0x3a, 0x0a, 0x07, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f,
- 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x74, 0x66, 0x70,
- 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x35, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x56, 0x61,
- 0x6c, 0x75, 0x65, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0x43, 0x0a, 0x08, 0x52,
- 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x0b, 0x64, 0x69, 0x61, 0x67, 0x6e,
- 0x6f, 0x73, 0x74, 0x69, 0x63, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74,
- 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x35, 0x2e, 0x44, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73,
- 0x74, 0x69, 0x63, 0x52, 0x0b, 0x64, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x73,
- 0x22, 0xe5, 0x01, 0x0a, 0x11, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65,
- 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x1a, 0x73, 0x0a, 0x07, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
- 0x74, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28,
- 0x0b, 0x32, 0x17, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x35, 0x2e, 0x44, 0x79,
- 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66,
- 0x69, 0x67, 0x12, 0x37, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e,
- 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69,
- 0x6e, 0x35, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52,
- 0x0a, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x5b, 0x0a, 0x08, 0x52,
- 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75,
- 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12,
- 0x37, 0x0a, 0x0b, 0x64, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x73, 0x18, 0x02,
- 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x35,
- 0x2e, 0x44, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x52, 0x0b, 0x64, 0x69, 0x61,
- 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x73, 0x22, 0x81, 0x02, 0x0a, 0x0c, 0x47, 0x65, 0x74,
- 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x09, 0x0a, 0x07, 0x52, 0x65, 0x71,
- 0x75, 0x65, 0x73, 0x74, 0x1a, 0xe5, 0x01, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
- 0x65, 0x12, 0x4d, 0x0a, 0x09, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01,
- 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x35,
- 0x2e, 0x47, 0x65, 0x74, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x52, 0x65,
- 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73,
- 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73,
- 0x12, 0x37, 0x0a, 0x0b, 0x64, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x73, 0x18,
- 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e,
- 0x35, 0x2e, 0x44, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x52, 0x0b, 0x64, 0x69,
- 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x73, 0x1a, 0x51, 0x0a, 0x0e, 0x46, 0x75, 0x6e,
- 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b,
- 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x29, 0x0a,
- 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x74,
- 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x35, 0x2e, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f,
- 0x6e, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xd1, 0x01, 0x0a,
- 0x0c, 0x43, 0x61, 0x6c, 0x6c, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x54, 0x0a,
- 0x07, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65,
- 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x35, 0x0a, 0x09,
- 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32,
- 0x17, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x35, 0x2e, 0x44, 0x79, 0x6e, 0x61,
- 0x6d, 0x69, 0x63, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x09, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65,
- 0x6e, 0x74, 0x73, 0x1a, 0x6b, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
- 0x2f, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
- 0x17, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x35, 0x2e, 0x44, 0x79, 0x6e, 0x61,
- 0x6d, 0x69, 0x63, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74,
- 0x12, 0x2e, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32,
- 0x18, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x35, 0x2e, 0x46, 0x75, 0x6e, 0x63,
- 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72,
- 0x2a, 0x25, 0x0a, 0x0a, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4b, 0x69, 0x6e, 0x64, 0x12, 0x09,
- 0x0a, 0x05, 0x50, 0x4c, 0x41, 0x49, 0x4e, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x4d, 0x41, 0x52,
- 0x4b, 0x44, 0x4f, 0x57, 0x4e, 0x10, 0x01, 0x32, 0xef, 0x0b, 0x0a, 0x08, 0x50, 0x72, 0x6f, 0x76,
- 0x69, 0x64, 0x65, 0x72, 0x12, 0x4e, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64,
- 0x61, 0x74, 0x61, 0x12, 0x1e, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x35, 0x2e,
- 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x71, 0x75,
- 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x35, 0x2e,
- 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x73, 0x70,
- 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x58, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d,
- 0x61, 0x12, 0x24, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x35, 0x2e, 0x47, 0x65,
- 0x74, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e,
- 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67,
- 0x69, 0x6e, 0x35, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x53,
- 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6c,
- 0x0a, 0x15, 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, 0x65, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65,
- 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x28, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67,
- 0x69, 0x6e, 0x35, 0x2e, 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, 0x65, 0x50, 0x72, 0x6f, 0x76, 0x69,
- 0x64, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
- 0x74, 0x1a, 0x29, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x35, 0x2e, 0x50, 0x72,
- 0x65, 0x70, 0x61, 0x72, 0x65, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x43, 0x6f, 0x6e,
- 0x66, 0x69, 0x67, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7b, 0x0a, 0x1a,
- 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
- 0x54, 0x79, 0x70, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x2d, 0x2e, 0x74, 0x66, 0x70,
- 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x35, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x52,
- 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69,
- 0x67, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x74, 0x66, 0x70, 0x6c,
- 0x75, 0x67, 0x69, 0x6e, 0x35, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65,
- 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67,
- 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x75, 0x0a, 0x18, 0x56, 0x61, 0x6c,
- 0x69, 0x64, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43,
- 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x2b, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e,
- 0x35, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f,
- 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65,
- 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x35, 0x2e, 0x56,
- 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63,
- 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
- 0x12, 0x69, 0x0a, 0x14, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75,
- 0x72, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x27, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75,
- 0x67, 0x69, 0x6e, 0x35, 0x2e, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x52, 0x65, 0x73, 0x6f,
- 0x75, 0x72, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
- 0x74, 0x1a, 0x28, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x35, 0x2e, 0x55, 0x70,
- 0x67, 0x72, 0x61, 0x64, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x74, 0x61,
- 0x74, 0x65, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x48, 0x0a, 0x09, 0x43,
- 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x65, 0x12, 0x1c, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75,
- 0x67, 0x69, 0x6e, 0x35, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x65, 0x2e, 0x52,
- 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69,
- 0x6e, 0x35, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x65, 0x2e, 0x52, 0x65, 0x73,
- 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, 0x0c, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x73,
- 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x1f, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e,
- 0x35, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x52,
- 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69,
- 0x6e, 0x35, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e,
- 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x63, 0x0a, 0x12, 0x50, 0x6c, 0x61, 0x6e,
- 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x25,
- 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x35, 0x2e, 0x50, 0x6c, 0x61, 0x6e, 0x52,
- 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x2e, 0x52, 0x65,
- 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e,
- 0x35, 0x2e, 0x50, 0x6c, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x68,
- 0x61, 0x6e, 0x67, 0x65, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x66, 0x0a,
- 0x13, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x68,
- 0x61, 0x6e, 0x67, 0x65, 0x12, 0x26, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x35,
- 0x2e, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x68,
- 0x61, 0x6e, 0x67, 0x65, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x74,
- 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x35, 0x2e, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x52, 0x65,
- 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x2e, 0x52, 0x65, 0x73,
- 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x66, 0x0a, 0x13, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x52,
- 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x26, 0x2e, 0x74,
- 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x35, 0x2e, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x52,
- 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x52, 0x65, 0x71,
- 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x35,
- 0x2e, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53,
- 0x74, 0x61, 0x74, 0x65, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x60, 0x0a,
- 0x11, 0x4d, 0x6f, 0x76, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x74, 0x61,
- 0x74, 0x65, 0x12, 0x24, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x35, 0x2e, 0x4d,
- 0x6f, 0x76, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65,
- 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75,
- 0x67, 0x69, 0x6e, 0x35, 0x2e, 0x4d, 0x6f, 0x76, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
- 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
- 0x57, 0x0a, 0x0e, 0x52, 0x65, 0x61, 0x64, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63,
- 0x65, 0x12, 0x21, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x35, 0x2e, 0x52, 0x65,
- 0x61, 0x64, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x52, 0x65, 0x71,
- 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x35,
- 0x2e, 0x52, 0x65, 0x61, 0x64, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e,
- 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x46,
- 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1f, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75,
- 0x67, 0x69, 0x6e, 0x35, 0x2e, 0x47, 0x65, 0x74, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e,
- 0x73, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x74, 0x66, 0x70, 0x6c,
- 0x75, 0x67, 0x69, 0x6e, 0x35, 0x2e, 0x47, 0x65, 0x74, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f,
- 0x6e, 0x73, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, 0x0c, 0x43,
- 0x61, 0x6c, 0x6c, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x2e, 0x74, 0x66,
- 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x35, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x46, 0x75, 0x6e, 0x63,
- 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x74,
- 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x35, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x46, 0x75, 0x6e,
- 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39,
- 0x0a, 0x04, 0x53, 0x74, 0x6f, 0x70, 0x12, 0x17, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69,
- 0x6e, 0x35, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
- 0x18, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x35, 0x2e, 0x53, 0x74, 0x6f, 0x70,
- 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x86, 0x03, 0x0a, 0x0b, 0x50, 0x72,
- 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x12, 0x5e, 0x0a, 0x09, 0x47, 0x65, 0x74,
- 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x27, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69,
- 0x6e, 0x35, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65,
- 0x72, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
- 0x28, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x35, 0x2e, 0x47, 0x65, 0x74, 0x50,
- 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61,
- 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x78, 0x0a, 0x19, 0x56, 0x61, 0x6c,
- 0x69, 0x64, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72,
- 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x2c, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69,
- 0x6e, 0x35, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x76, 0x69,
- 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x52, 0x65, 0x71,
- 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x35,
- 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69,
- 0x6f, 0x6e, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f,
- 0x6e, 0x73, 0x65, 0x12, 0x62, 0x0a, 0x11, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e,
- 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x24, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75,
- 0x67, 0x69, 0x6e, 0x35, 0x2e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65,
- 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25,
- 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x35, 0x2e, 0x50, 0x72, 0x6f, 0x76, 0x69,
- 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x52, 0x65, 0x73,
- 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x39, 0x0a, 0x04, 0x53, 0x74, 0x6f, 0x70, 0x12,
- 0x17, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x35, 0x2e, 0x53, 0x74, 0x6f, 0x70,
- 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75,
- 0x67, 0x69, 0x6e, 0x35, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
- 0x73, 0x65, 0x42, 0x47, 0x5a, 0x45, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d,
- 0x2f, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2f, 0x74, 0x65, 0x72, 0x72, 0x61,
- 0x66, 0x6f, 0x72, 0x6d, 0x2d, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2d, 0x67, 0x6f, 0x2f, 0x74,
- 0x66, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x76, 0x35, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61,
- 0x6c, 0x2f, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x35, 0x62, 0x06, 0x70, 0x72, 0x6f,
- 0x74, 0x6f, 0x33,
-}
+const file_tfplugin5_proto_rawDesc = "" +
+ "\n" +
+ "\x0ftfplugin5.proto\x12\ttfplugin5\x1a\x1fgoogle/protobuf/timestamp.proto\"<\n" +
+ "\fDynamicValue\x12\x18\n" +
+ "\amsgpack\x18\x01 \x01(\fR\amsgpack\x12\x12\n" +
+ "\x04json\x18\x02 \x01(\fR\x04json\"\xe3\x01\n" +
+ "\n" +
+ "Diagnostic\x12:\n" +
+ "\bseverity\x18\x01 \x01(\x0e2\x1e.tfplugin5.Diagnostic.SeverityR\bseverity\x12\x18\n" +
+ "\asummary\x18\x02 \x01(\tR\asummary\x12\x16\n" +
+ "\x06detail\x18\x03 \x01(\tR\x06detail\x126\n" +
+ "\tattribute\x18\x04 \x01(\v2\x18.tfplugin5.AttributePathR\tattribute\"/\n" +
+ "\bSeverity\x12\v\n" +
+ "\aINVALID\x10\x00\x12\t\n" +
+ "\x05ERROR\x10\x01\x12\v\n" +
+ "\aWARNING\x10\x02\"k\n" +
+ "\rFunctionError\x12\x12\n" +
+ "\x04text\x18\x01 \x01(\tR\x04text\x120\n" +
+ "\x11function_argument\x18\x02 \x01(\x03H\x00R\x10functionArgument\x88\x01\x01B\x14\n" +
+ "\x12_function_argument\"\xdc\x01\n" +
+ "\rAttributePath\x123\n" +
+ "\x05steps\x18\x01 \x03(\v2\x1d.tfplugin5.AttributePath.StepR\x05steps\x1a\x95\x01\n" +
+ "\x04Step\x12'\n" +
+ "\x0eattribute_name\x18\x01 \x01(\tH\x00R\rattributeName\x12.\n" +
+ "\x12element_key_string\x18\x02 \x01(\tH\x00R\x10elementKeyString\x12(\n" +
+ "\x0felement_key_int\x18\x03 \x01(\x03H\x00R\relementKeyIntB\n" +
+ "\n" +
+ "\bselector\"3\n" +
+ "\x04Stop\x1a\t\n" +
+ "\aRequest\x1a \n" +
+ "\bResponse\x12\x14\n" +
+ "\x05Error\x18\x01 \x01(\tR\x05Error\"\x96\x01\n" +
+ "\bRawState\x12\x12\n" +
+ "\x04json\x18\x01 \x01(\fR\x04json\x12:\n" +
+ "\aflatmap\x18\x02 \x03(\v2 .tfplugin5.RawState.FlatmapEntryR\aflatmap\x1a:\n" +
+ "\fFlatmapEntry\x12\x10\n" +
+ "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
+ "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\xeb\a\n" +
+ "\x06Schema\x12\x18\n" +
+ "\aversion\x18\x01 \x01(\x03R\aversion\x12-\n" +
+ "\x05block\x18\x02 \x01(\v2\x17.tfplugin5.Schema.BlockR\x05block\x1a\xa2\x02\n" +
+ "\x05Block\x12\x18\n" +
+ "\aversion\x18\x01 \x01(\x03R\aversion\x12;\n" +
+ "\n" +
+ "attributes\x18\x02 \x03(\v2\x1b.tfplugin5.Schema.AttributeR\n" +
+ "attributes\x12>\n" +
+ "\vblock_types\x18\x03 \x03(\v2\x1d.tfplugin5.Schema.NestedBlockR\n" +
+ "blockTypes\x12 \n" +
+ "\vdescription\x18\x04 \x01(\tR\vdescription\x12@\n" +
+ "\x10description_kind\x18\x05 \x01(\x0e2\x15.tfplugin5.StringKindR\x0fdescriptionKind\x12\x1e\n" +
+ "\n" +
+ "deprecated\x18\x06 \x01(\bR\n" +
+ "deprecated\x1a\xc8\x02\n" +
+ "\tAttribute\x12\x12\n" +
+ "\x04name\x18\x01 \x01(\tR\x04name\x12\x12\n" +
+ "\x04type\x18\x02 \x01(\fR\x04type\x12 \n" +
+ "\vdescription\x18\x03 \x01(\tR\vdescription\x12\x1a\n" +
+ "\brequired\x18\x04 \x01(\bR\brequired\x12\x1a\n" +
+ "\boptional\x18\x05 \x01(\bR\boptional\x12\x1a\n" +
+ "\bcomputed\x18\x06 \x01(\bR\bcomputed\x12\x1c\n" +
+ "\tsensitive\x18\a \x01(\bR\tsensitive\x12@\n" +
+ "\x10description_kind\x18\b \x01(\x0e2\x15.tfplugin5.StringKindR\x0fdescriptionKind\x12\x1e\n" +
+ "\n" +
+ "deprecated\x18\t \x01(\bR\n" +
+ "deprecated\x12\x1d\n" +
+ "\n" +
+ "write_only\x18\n" +
+ " \x01(\bR\twriteOnly\x1a\xa7\x02\n" +
+ "\vNestedBlock\x12\x1b\n" +
+ "\ttype_name\x18\x01 \x01(\tR\btypeName\x12-\n" +
+ "\x05block\x18\x02 \x01(\v2\x17.tfplugin5.Schema.BlockR\x05block\x12C\n" +
+ "\anesting\x18\x03 \x01(\x0e2).tfplugin5.Schema.NestedBlock.NestingModeR\anesting\x12\x1b\n" +
+ "\tmin_items\x18\x04 \x01(\x03R\bminItems\x12\x1b\n" +
+ "\tmax_items\x18\x05 \x01(\x03R\bmaxItems\"M\n" +
+ "\vNestingMode\x12\v\n" +
+ "\aINVALID\x10\x00\x12\n" +
+ "\n" +
+ "\x06SINGLE\x10\x01\x12\b\n" +
+ "\x04LIST\x10\x02\x12\a\n" +
+ "\x03SET\x10\x03\x12\a\n" +
+ "\x03MAP\x10\x04\x12\t\n" +
+ "\x05GROUP\x10\x05\"\xd8\x02\n" +
+ "\x16ResourceIdentitySchema\x12\x18\n" +
+ "\aversion\x18\x01 \x01(\x03R\aversion\x12d\n" +
+ "\x13identity_attributes\x18\x02 \x03(\v23.tfplugin5.ResourceIdentitySchema.IdentityAttributeR\x12identityAttributes\x1a\xbd\x01\n" +
+ "\x11IdentityAttribute\x12\x12\n" +
+ "\x04name\x18\x01 \x01(\tR\x04name\x12\x12\n" +
+ "\x04type\x18\x02 \x01(\fR\x04type\x12.\n" +
+ "\x13required_for_import\x18\x03 \x01(\bR\x11requiredForImport\x12.\n" +
+ "\x13optional_for_import\x18\x04 \x01(\bR\x11optionalForImport\x12 \n" +
+ "\vdescription\x18\x05 \x01(\tR\vdescription\"T\n" +
+ "\x14ResourceIdentityData\x12<\n" +
+ "\ridentity_data\x18\x01 \x01(\v2\x17.tfplugin5.DynamicValueR\fidentityData\"\xa8\x01\n" +
+ "\x12ServerCapabilities\x12!\n" +
+ "\fplan_destroy\x18\x01 \x01(\bR\vplanDestroy\x12?\n" +
+ "\x1cget_provider_schema_optional\x18\x02 \x01(\bR\x19getProviderSchemaOptional\x12.\n" +
+ "\x13move_resource_state\x18\x03 \x01(\bR\x11moveResourceState\"\x82\x01\n" +
+ "\x12ClientCapabilities\x12)\n" +
+ "\x10deferral_allowed\x18\x01 \x01(\bR\x0fdeferralAllowed\x12A\n" +
+ "\x1dwrite_only_attributes_allowed\x18\x02 \x01(\bR\x1awriteOnlyAttributesAllowed\"\x8e\x05\n" +
+ "\bFunction\x12=\n" +
+ "\n" +
+ "parameters\x18\x01 \x03(\v2\x1d.tfplugin5.Function.ParameterR\n" +
+ "parameters\x12L\n" +
+ "\x12variadic_parameter\x18\x02 \x01(\v2\x1d.tfplugin5.Function.ParameterR\x11variadicParameter\x122\n" +
+ "\x06return\x18\x03 \x01(\v2\x1a.tfplugin5.Function.ReturnR\x06return\x12\x18\n" +
+ "\asummary\x18\x04 \x01(\tR\asummary\x12 \n" +
+ "\vdescription\x18\x05 \x01(\tR\vdescription\x12@\n" +
+ "\x10description_kind\x18\x06 \x01(\x0e2\x15.tfplugin5.StringKindR\x0fdescriptionKind\x12/\n" +
+ "\x13deprecation_message\x18\a \x01(\tR\x12deprecationMessage\x1a\xf3\x01\n" +
+ "\tParameter\x12\x12\n" +
+ "\x04name\x18\x01 \x01(\tR\x04name\x12\x12\n" +
+ "\x04type\x18\x02 \x01(\fR\x04type\x12(\n" +
+ "\x10allow_null_value\x18\x03 \x01(\bR\x0eallowNullValue\x120\n" +
+ "\x14allow_unknown_values\x18\x04 \x01(\bR\x12allowUnknownValues\x12 \n" +
+ "\vdescription\x18\x05 \x01(\tR\vdescription\x12@\n" +
+ "\x10description_kind\x18\x06 \x01(\x0e2\x15.tfplugin5.StringKindR\x0fdescriptionKind\x1a\x1c\n" +
+ "\x06Return\x12\x12\n" +
+ "\x04type\x18\x01 \x01(\fR\x04type\"9\n" +
+ "\fActionSchema\x12)\n" +
+ "\x06schema\x18\x01 \x01(\v2\x11.tfplugin5.SchemaR\x06schema\"\xa2\x01\n" +
+ "\bDeferred\x122\n" +
+ "\x06reason\x18\x01 \x01(\x0e2\x1a.tfplugin5.Deferred.ReasonR\x06reason\"b\n" +
+ "\x06Reason\x12\v\n" +
+ "\aUNKNOWN\x10\x00\x12\x1b\n" +
+ "\x17RESOURCE_CONFIG_UNKNOWN\x10\x01\x12\x1b\n" +
+ "\x17PROVIDER_CONFIG_UNKNOWN\x10\x02\x12\x11\n" +
+ "\rABSENT_PREREQ\x10\x03\"\xb2\a\n" +
+ "\vGetMetadata\x1a\t\n" +
+ "\aRequest\x1a\xed\x04\n" +
+ "\bResponse\x12N\n" +
+ "\x13server_capabilities\x18\x01 \x01(\v2\x1d.tfplugin5.ServerCapabilitiesR\x12serverCapabilities\x127\n" +
+ "\vdiagnostics\x18\x02 \x03(\v2\x15.tfplugin5.DiagnosticR\vdiagnostics\x12L\n" +
+ "\fdata_sources\x18\x03 \x03(\v2).tfplugin5.GetMetadata.DataSourceMetadataR\vdataSources\x12E\n" +
+ "\tresources\x18\x04 \x03(\v2'.tfplugin5.GetMetadata.ResourceMetadataR\tresources\x12E\n" +
+ "\tfunctions\x18\x05 \x03(\v2'.tfplugin5.GetMetadata.FunctionMetadataR\tfunctions\x12a\n" +
+ "\x13ephemeral_resources\x18\x06 \x03(\v20.tfplugin5.GetMetadata.EphemeralResourceMetadataR\x12ephemeralResources\x12R\n" +
+ "\x0elist_resources\x18\a \x03(\v2+.tfplugin5.GetMetadata.ListResourceMetadataR\rlistResources\x12?\n" +
+ "\aactions\x18\t \x03(\v2%.tfplugin5.GetMetadata.ActionMetadataR\aactionsJ\x04\b\b\x10\t\x1a&\n" +
+ "\x10FunctionMetadata\x12\x12\n" +
+ "\x04name\x18\x01 \x01(\tR\x04name\x1a1\n" +
+ "\x12DataSourceMetadata\x12\x1b\n" +
+ "\ttype_name\x18\x01 \x01(\tR\btypeName\x1a/\n" +
+ "\x10ResourceMetadata\x12\x1b\n" +
+ "\ttype_name\x18\x01 \x01(\tR\btypeName\x1a8\n" +
+ "\x19EphemeralResourceMetadata\x12\x1b\n" +
+ "\ttype_name\x18\x01 \x01(\tR\btypeName\x1a3\n" +
+ "\x14ListResourceMetadata\x12\x1b\n" +
+ "\ttype_name\x18\x01 \x01(\tR\btypeName\x1a-\n" +
+ "\x0eActionMetadata\x12\x1b\n" +
+ "\ttype_name\x18\x01 \x01(\tR\btypeName\"\xbc\v\n" +
+ "\x11GetProviderSchema\x1a\t\n" +
+ "\aRequest\x1a\x9b\v\n" +
+ "\bResponse\x12-\n" +
+ "\bprovider\x18\x01 \x01(\v2\x11.tfplugin5.SchemaR\bprovider\x12e\n" +
+ "\x10resource_schemas\x18\x02 \x03(\v2:.tfplugin5.GetProviderSchema.Response.ResourceSchemasEntryR\x0fresourceSchemas\x12l\n" +
+ "\x13data_source_schemas\x18\x03 \x03(\v2<.tfplugin5.GetProviderSchema.Response.DataSourceSchemasEntryR\x11dataSourceSchemas\x127\n" +
+ "\vdiagnostics\x18\x04 \x03(\v2\x15.tfplugin5.DiagnosticR\vdiagnostics\x126\n" +
+ "\rprovider_meta\x18\x05 \x01(\v2\x11.tfplugin5.SchemaR\fproviderMeta\x12N\n" +
+ "\x13server_capabilities\x18\x06 \x01(\v2\x1d.tfplugin5.ServerCapabilitiesR\x12serverCapabilities\x12R\n" +
+ "\tfunctions\x18\a \x03(\v24.tfplugin5.GetProviderSchema.Response.FunctionsEntryR\tfunctions\x12\x81\x01\n" +
+ "\x1aephemeral_resource_schemas\x18\b \x03(\v2C.tfplugin5.GetProviderSchema.Response.EphemeralResourceSchemasEntryR\x18ephemeralResourceSchemas\x12r\n" +
+ "\x15list_resource_schemas\x18\t \x03(\v2>.tfplugin5.GetProviderSchema.Response.ListResourceSchemasEntryR\x13listResourceSchemas\x12_\n" +
+ "\x0eaction_schemas\x18\v \x03(\v28.tfplugin5.GetProviderSchema.Response.ActionSchemasEntryR\ractionSchemas\x1aU\n" +
+ "\x14ResourceSchemasEntry\x12\x10\n" +
+ "\x03key\x18\x01 \x01(\tR\x03key\x12'\n" +
+ "\x05value\x18\x02 \x01(\v2\x11.tfplugin5.SchemaR\x05value:\x028\x01\x1aW\n" +
+ "\x16DataSourceSchemasEntry\x12\x10\n" +
+ "\x03key\x18\x01 \x01(\tR\x03key\x12'\n" +
+ "\x05value\x18\x02 \x01(\v2\x11.tfplugin5.SchemaR\x05value:\x028\x01\x1aQ\n" +
+ "\x0eFunctionsEntry\x12\x10\n" +
+ "\x03key\x18\x01 \x01(\tR\x03key\x12)\n" +
+ "\x05value\x18\x02 \x01(\v2\x13.tfplugin5.FunctionR\x05value:\x028\x01\x1a^\n" +
+ "\x1dEphemeralResourceSchemasEntry\x12\x10\n" +
+ "\x03key\x18\x01 \x01(\tR\x03key\x12'\n" +
+ "\x05value\x18\x02 \x01(\v2\x11.tfplugin5.SchemaR\x05value:\x028\x01\x1aY\n" +
+ "\x18ListResourceSchemasEntry\x12\x10\n" +
+ "\x03key\x18\x01 \x01(\tR\x03key\x12'\n" +
+ "\x05value\x18\x02 \x01(\v2\x11.tfplugin5.SchemaR\x05value:\x028\x01\x1aY\n" +
+ "\x12ActionSchemasEntry\x12\x10\n" +
+ "\x03key\x18\x01 \x01(\tR\x03key\x12-\n" +
+ "\x05value\x18\x02 \x01(\v2\x17.tfplugin5.ActionSchemaR\x05value:\x028\x01J\x04\b\n" +
+ "\x10\v\"\xdb\x01\n" +
+ "\x15PrepareProviderConfig\x1a:\n" +
+ "\aRequest\x12/\n" +
+ "\x06config\x18\x01 \x01(\v2\x17.tfplugin5.DynamicValueR\x06config\x1a\x85\x01\n" +
+ "\bResponse\x12@\n" +
+ "\x0fprepared_config\x18\x01 \x01(\v2\x17.tfplugin5.DynamicValueR\x0epreparedConfig\x127\n" +
+ "\vdiagnostics\x18\x02 \x03(\v2\x15.tfplugin5.DiagnosticR\vdiagnostics\"\x90\x02\n" +
+ "\x14UpgradeResourceState\x1ar\n" +
+ "\aRequest\x12\x1b\n" +
+ "\ttype_name\x18\x01 \x01(\tR\btypeName\x12\x18\n" +
+ "\aversion\x18\x02 \x01(\x03R\aversion\x120\n" +
+ "\traw_state\x18\x03 \x01(\v2\x13.tfplugin5.RawStateR\brawState\x1a\x83\x01\n" +
+ "\bResponse\x12>\n" +
+ "\x0eupgraded_state\x18\x01 \x01(\v2\x17.tfplugin5.DynamicValueR\rupgradedState\x127\n" +
+ "\vdiagnostics\x18\x02 \x03(\v2\x15.tfplugin5.DiagnosticR\vdiagnostics\"\x8b\x02\n" +
+ "\x1aValidateResourceTypeConfig\x1a\xa7\x01\n" +
+ "\aRequest\x12\x1b\n" +
+ "\ttype_name\x18\x01 \x01(\tR\btypeName\x12/\n" +
+ "\x06config\x18\x02 \x01(\v2\x17.tfplugin5.DynamicValueR\x06config\x12N\n" +
+ "\x13client_capabilities\x18\x03 \x01(\v2\x1d.tfplugin5.ClientCapabilitiesR\x12clientCapabilities\x1aC\n" +
+ "\bResponse\x127\n" +
+ "\vdiagnostics\x18\x01 \x03(\v2\x15.tfplugin5.DiagnosticR\vdiagnostics\"\xb8\x01\n" +
+ "\x18ValidateDataSourceConfig\x1aW\n" +
+ "\aRequest\x12\x1b\n" +
+ "\ttype_name\x18\x01 \x01(\tR\btypeName\x12/\n" +
+ "\x06config\x18\x02 \x01(\v2\x17.tfplugin5.DynamicValueR\x06config\x1aC\n" +
+ "\bResponse\x127\n" +
+ "\vdiagnostics\x18\x01 \x03(\v2\x15.tfplugin5.DiagnosticR\vdiagnostics\"\x8a\x02\n" +
+ "\tConfigure\x1a\xb7\x01\n" +
+ "\aRequest\x12+\n" +
+ "\x11terraform_version\x18\x01 \x01(\tR\x10terraformVersion\x12/\n" +
+ "\x06config\x18\x02 \x01(\v2\x17.tfplugin5.DynamicValueR\x06config\x12N\n" +
+ "\x13client_capabilities\x18\x03 \x01(\v2\x1d.tfplugin5.ClientCapabilitiesR\x12clientCapabilities\x1aC\n" +
+ "\bResponse\x127\n" +
+ "\vdiagnostics\x18\x01 \x03(\v2\x15.tfplugin5.DiagnosticR\vdiagnostics\"\xf4\x04\n" +
+ "\fReadResource\x1a\xd8\x02\n" +
+ "\aRequest\x12\x1b\n" +
+ "\ttype_name\x18\x01 \x01(\tR\btypeName\x12<\n" +
+ "\rcurrent_state\x18\x02 \x01(\v2\x17.tfplugin5.DynamicValueR\fcurrentState\x12\x18\n" +
+ "\aprivate\x18\x03 \x01(\fR\aprivate\x12<\n" +
+ "\rprovider_meta\x18\x04 \x01(\v2\x17.tfplugin5.DynamicValueR\fproviderMeta\x12N\n" +
+ "\x13client_capabilities\x18\x05 \x01(\v2\x1d.tfplugin5.ClientCapabilitiesR\x12clientCapabilities\x12J\n" +
+ "\x10current_identity\x18\x06 \x01(\v2\x1f.tfplugin5.ResourceIdentityDataR\x0fcurrentIdentity\x1a\x88\x02\n" +
+ "\bResponse\x124\n" +
+ "\tnew_state\x18\x01 \x01(\v2\x17.tfplugin5.DynamicValueR\bnewState\x127\n" +
+ "\vdiagnostics\x18\x02 \x03(\v2\x15.tfplugin5.DiagnosticR\vdiagnostics\x12\x18\n" +
+ "\aprivate\x18\x03 \x01(\fR\aprivate\x12/\n" +
+ "\bdeferred\x18\x04 \x01(\v2\x13.tfplugin5.DeferredR\bdeferred\x12B\n" +
+ "\fnew_identity\x18\x05 \x01(\v2\x1f.tfplugin5.ResourceIdentityDataR\vnewIdentity\"\x87\a\n" +
+ "\x12PlanResourceChange\x1a\xd3\x03\n" +
+ "\aRequest\x12\x1b\n" +
+ "\ttype_name\x18\x01 \x01(\tR\btypeName\x128\n" +
+ "\vprior_state\x18\x02 \x01(\v2\x17.tfplugin5.DynamicValueR\n" +
+ "priorState\x12E\n" +
+ "\x12proposed_new_state\x18\x03 \x01(\v2\x17.tfplugin5.DynamicValueR\x10proposedNewState\x12/\n" +
+ "\x06config\x18\x04 \x01(\v2\x17.tfplugin5.DynamicValueR\x06config\x12#\n" +
+ "\rprior_private\x18\x05 \x01(\fR\fpriorPrivate\x12<\n" +
+ "\rprovider_meta\x18\x06 \x01(\v2\x17.tfplugin5.DynamicValueR\fproviderMeta\x12N\n" +
+ "\x13client_capabilities\x18\a \x01(\v2\x1d.tfplugin5.ClientCapabilitiesR\x12clientCapabilities\x12F\n" +
+ "\x0eprior_identity\x18\b \x01(\v2\x1f.tfplugin5.ResourceIdentityDataR\rpriorIdentity\x1a\x9a\x03\n" +
+ "\bResponse\x12<\n" +
+ "\rplanned_state\x18\x01 \x01(\v2\x17.tfplugin5.DynamicValueR\fplannedState\x12C\n" +
+ "\x10requires_replace\x18\x02 \x03(\v2\x18.tfplugin5.AttributePathR\x0frequiresReplace\x12'\n" +
+ "\x0fplanned_private\x18\x03 \x01(\fR\x0eplannedPrivate\x127\n" +
+ "\vdiagnostics\x18\x04 \x03(\v2\x15.tfplugin5.DiagnosticR\vdiagnostics\x12,\n" +
+ "\x12legacy_type_system\x18\x05 \x01(\bR\x10legacyTypeSystem\x12/\n" +
+ "\bdeferred\x18\x06 \x01(\v2\x13.tfplugin5.DeferredR\bdeferred\x12J\n" +
+ "\x10planned_identity\x18\a \x01(\v2\x1f.tfplugin5.ResourceIdentityDataR\x0fplannedIdentity\"\xa2\x05\n" +
+ "\x13ApplyResourceChange\x1a\x82\x03\n" +
+ "\aRequest\x12\x1b\n" +
+ "\ttype_name\x18\x01 \x01(\tR\btypeName\x128\n" +
+ "\vprior_state\x18\x02 \x01(\v2\x17.tfplugin5.DynamicValueR\n" +
+ "priorState\x12<\n" +
+ "\rplanned_state\x18\x03 \x01(\v2\x17.tfplugin5.DynamicValueR\fplannedState\x12/\n" +
+ "\x06config\x18\x04 \x01(\v2\x17.tfplugin5.DynamicValueR\x06config\x12'\n" +
+ "\x0fplanned_private\x18\x05 \x01(\fR\x0eplannedPrivate\x12<\n" +
+ "\rprovider_meta\x18\x06 \x01(\v2\x17.tfplugin5.DynamicValueR\fproviderMeta\x12J\n" +
+ "\x10planned_identity\x18\a \x01(\v2\x1f.tfplugin5.ResourceIdentityDataR\x0fplannedIdentity\x1a\x85\x02\n" +
+ "\bResponse\x124\n" +
+ "\tnew_state\x18\x01 \x01(\v2\x17.tfplugin5.DynamicValueR\bnewState\x12\x18\n" +
+ "\aprivate\x18\x02 \x01(\fR\aprivate\x127\n" +
+ "\vdiagnostics\x18\x03 \x03(\v2\x15.tfplugin5.DiagnosticR\vdiagnostics\x12,\n" +
+ "\x12legacy_type_system\x18\x04 \x01(\bR\x10legacyTypeSystem\x12B\n" +
+ "\fnew_identity\x18\x05 \x01(\v2\x1f.tfplugin5.ResourceIdentityDataR\vnewIdentity\"\xea\x04\n" +
+ "\x13ImportResourceState\x1a\xc3\x01\n" +
+ "\aRequest\x12\x1b\n" +
+ "\ttype_name\x18\x01 \x01(\tR\btypeName\x12\x0e\n" +
+ "\x02id\x18\x02 \x01(\tR\x02id\x12N\n" +
+ "\x13client_capabilities\x18\x03 \x01(\v2\x1d.tfplugin5.ClientCapabilitiesR\x12clientCapabilities\x12;\n" +
+ "\bidentity\x18\x04 \x01(\v2\x1f.tfplugin5.ResourceIdentityDataR\bidentity\x1a\xb5\x01\n" +
+ "\x10ImportedResource\x12\x1b\n" +
+ "\ttype_name\x18\x01 \x01(\tR\btypeName\x12-\n" +
+ "\x05state\x18\x02 \x01(\v2\x17.tfplugin5.DynamicValueR\x05state\x12\x18\n" +
+ "\aprivate\x18\x03 \x01(\fR\aprivate\x12;\n" +
+ "\bidentity\x18\x04 \x01(\v2\x1f.tfplugin5.ResourceIdentityDataR\bidentity\x1a\xd4\x01\n" +
+ "\bResponse\x12^\n" +
+ "\x12imported_resources\x18\x01 \x03(\v2/.tfplugin5.ImportResourceState.ImportedResourceR\x11importedResources\x127\n" +
+ "\vdiagnostics\x18\x02 \x03(\v2\x15.tfplugin5.DiagnosticR\vdiagnostics\x12/\n" +
+ "\bdeferred\x18\x03 \x01(\v2\x13.tfplugin5.DeferredR\bdeferred\"\xb4\x05\n" +
+ "\x11MoveResourceState\x1a\xab\x03\n" +
+ "\aRequest\x126\n" +
+ "\x17source_provider_address\x18\x01 \x01(\tR\x15sourceProviderAddress\x12(\n" +
+ "\x10source_type_name\x18\x02 \x01(\tR\x0esourceTypeName\x122\n" +
+ "\x15source_schema_version\x18\x03 \x01(\x03R\x13sourceSchemaVersion\x126\n" +
+ "\fsource_state\x18\x04 \x01(\v2\x13.tfplugin5.RawStateR\vsourceState\x12(\n" +
+ "\x10target_type_name\x18\x05 \x01(\tR\x0etargetTypeName\x12%\n" +
+ "\x0esource_private\x18\x06 \x01(\fR\rsourcePrivate\x12<\n" +
+ "\x0fsource_identity\x18\a \x01(\v2\x13.tfplugin5.RawStateR\x0esourceIdentity\x12C\n" +
+ "\x1esource_identity_schema_version\x18\b \x01(\x03R\x1bsourceIdentitySchemaVersion\x1a\xf0\x01\n" +
+ "\bResponse\x12:\n" +
+ "\ftarget_state\x18\x01 \x01(\v2\x17.tfplugin5.DynamicValueR\vtargetState\x127\n" +
+ "\vdiagnostics\x18\x02 \x03(\v2\x15.tfplugin5.DiagnosticR\vdiagnostics\x12%\n" +
+ "\x0etarget_private\x18\x03 \x01(\fR\rtargetPrivate\x12H\n" +
+ "\x0ftarget_identity\x18\x04 \x01(\v2\x1f.tfplugin5.ResourceIdentityDataR\x0etargetIdentity\"\x9e\x03\n" +
+ "\x0eReadDataSource\x1a\xe5\x01\n" +
+ "\aRequest\x12\x1b\n" +
+ "\ttype_name\x18\x01 \x01(\tR\btypeName\x12/\n" +
+ "\x06config\x18\x02 \x01(\v2\x17.tfplugin5.DynamicValueR\x06config\x12<\n" +
+ "\rprovider_meta\x18\x03 \x01(\v2\x17.tfplugin5.DynamicValueR\fproviderMeta\x12N\n" +
+ "\x13client_capabilities\x18\x04 \x01(\v2\x1d.tfplugin5.ClientCapabilitiesR\x12clientCapabilities\x1a\xa3\x01\n" +
+ "\bResponse\x12-\n" +
+ "\x05state\x18\x01 \x01(\v2\x17.tfplugin5.DynamicValueR\x05state\x127\n" +
+ "\vdiagnostics\x18\x02 \x03(\v2\x15.tfplugin5.DiagnosticR\vdiagnostics\x12/\n" +
+ "\bdeferred\x18\x03 \x01(\v2\x13.tfplugin5.DeferredR\bdeferred\"\x9b\x01\n" +
+ "\x14GetProvisionerSchema\x1a\t\n" +
+ "\aRequest\x1ax\n" +
+ "\bResponse\x123\n" +
+ "\vprovisioner\x18\x01 \x01(\v2\x11.tfplugin5.SchemaR\vprovisioner\x127\n" +
+ "\vdiagnostics\x18\x02 \x03(\v2\x15.tfplugin5.DiagnosticR\vdiagnostics\"\x9c\x01\n" +
+ "\x19ValidateProvisionerConfig\x1a:\n" +
+ "\aRequest\x12/\n" +
+ "\x06config\x18\x01 \x01(\v2\x17.tfplugin5.DynamicValueR\x06config\x1aC\n" +
+ "\bResponse\x127\n" +
+ "\vdiagnostics\x18\x01 \x03(\v2\x15.tfplugin5.DiagnosticR\vdiagnostics\"\xe5\x01\n" +
+ "\x11ProvisionResource\x1as\n" +
+ "\aRequest\x12/\n" +
+ "\x06config\x18\x01 \x01(\v2\x17.tfplugin5.DynamicValueR\x06config\x127\n" +
+ "\n" +
+ "connection\x18\x02 \x01(\v2\x17.tfplugin5.DynamicValueR\n" +
+ "connection\x1a[\n" +
+ "\bResponse\x12\x16\n" +
+ "\x06output\x18\x01 \x01(\tR\x06output\x127\n" +
+ "\vdiagnostics\x18\x02 \x03(\v2\x15.tfplugin5.DiagnosticR\vdiagnostics\"\x81\x02\n" +
+ "\fGetFunctions\x1a\t\n" +
+ "\aRequest\x1a\xe5\x01\n" +
+ "\bResponse\x12M\n" +
+ "\tfunctions\x18\x01 \x03(\v2/.tfplugin5.GetFunctions.Response.FunctionsEntryR\tfunctions\x127\n" +
+ "\vdiagnostics\x18\x02 \x03(\v2\x15.tfplugin5.DiagnosticR\vdiagnostics\x1aQ\n" +
+ "\x0eFunctionsEntry\x12\x10\n" +
+ "\x03key\x18\x01 \x01(\tR\x03key\x12)\n" +
+ "\x05value\x18\x02 \x01(\v2\x13.tfplugin5.FunctionR\x05value:\x028\x01\"\xd1\x01\n" +
+ "\fCallFunction\x1aT\n" +
+ "\aRequest\x12\x12\n" +
+ "\x04name\x18\x01 \x01(\tR\x04name\x125\n" +
+ "\targuments\x18\x02 \x03(\v2\x17.tfplugin5.DynamicValueR\targuments\x1ak\n" +
+ "\bResponse\x12/\n" +
+ "\x06result\x18\x01 \x01(\v2\x17.tfplugin5.DynamicValueR\x06result\x12.\n" +
+ "\x05error\x18\x02 \x01(\v2\x18.tfplugin5.FunctionErrorR\x05error\"\xbf\x01\n" +
+ "\x1fValidateEphemeralResourceConfig\x1aW\n" +
+ "\aRequest\x12\x1b\n" +
+ "\ttype_name\x18\x01 \x01(\tR\btypeName\x12/\n" +
+ "\x06config\x18\x02 \x01(\v2\x17.tfplugin5.DynamicValueR\x06config\x1aC\n" +
+ "\bResponse\x127\n" +
+ "\vdiagnostics\x18\x01 \x03(\v2\x15.tfplugin5.DiagnosticR\vdiagnostics\"\xdd\x03\n" +
+ "\x15OpenEphemeralResource\x1a\xa7\x01\n" +
+ "\aRequest\x12\x1b\n" +
+ "\ttype_name\x18\x01 \x01(\tR\btypeName\x12/\n" +
+ "\x06config\x18\x02 \x01(\v2\x17.tfplugin5.DynamicValueR\x06config\x12N\n" +
+ "\x13client_capabilities\x18\x03 \x01(\v2\x1d.tfplugin5.ClientCapabilitiesR\x12clientCapabilities\x1a\x99\x02\n" +
+ "\bResponse\x127\n" +
+ "\vdiagnostics\x18\x01 \x03(\v2\x15.tfplugin5.DiagnosticR\vdiagnostics\x12:\n" +
+ "\brenew_at\x18\x02 \x01(\v2\x1a.google.protobuf.TimestampH\x00R\arenewAt\x88\x01\x01\x12/\n" +
+ "\x06result\x18\x03 \x01(\v2\x17.tfplugin5.DynamicValueR\x06result\x12\x1d\n" +
+ "\aprivate\x18\x04 \x01(\fH\x01R\aprivate\x88\x01\x01\x12/\n" +
+ "\bdeferred\x18\x05 \x01(\v2\x13.tfplugin5.DeferredR\bdeferredB\v\n" +
+ "\t_renew_atB\n" +
+ "\n" +
+ "\b_private\"\xa5\x02\n" +
+ "\x16RenewEphemeralResource\x1aQ\n" +
+ "\aRequest\x12\x1b\n" +
+ "\ttype_name\x18\x01 \x01(\tR\btypeName\x12\x1d\n" +
+ "\aprivate\x18\x02 \x01(\fH\x00R\aprivate\x88\x01\x01B\n" +
+ "\n" +
+ "\b_private\x1a\xb7\x01\n" +
+ "\bResponse\x127\n" +
+ "\vdiagnostics\x18\x01 \x03(\v2\x15.tfplugin5.DiagnosticR\vdiagnostics\x12:\n" +
+ "\brenew_at\x18\x02 \x01(\v2\x1a.google.protobuf.TimestampH\x00R\arenewAt\x88\x01\x01\x12\x1d\n" +
+ "\aprivate\x18\x03 \x01(\fH\x01R\aprivate\x88\x01\x01B\v\n" +
+ "\t_renew_atB\n" +
+ "\n" +
+ "\b_private\"\xb0\x01\n" +
+ "\x16CloseEphemeralResource\x1aQ\n" +
+ "\aRequest\x12\x1b\n" +
+ "\ttype_name\x18\x01 \x01(\tR\btypeName\x12\x1d\n" +
+ "\aprivate\x18\x02 \x01(\fH\x00R\aprivate\x88\x01\x01B\n" +
+ "\n" +
+ "\b_private\x1aC\n" +
+ "\bResponse\x127\n" +
+ "\vdiagnostics\x18\x01 \x03(\v2\x15.tfplugin5.DiagnosticR\vdiagnostics\"\xc4\x02\n" +
+ "\x1aGetResourceIdentitySchemas\x1a\t\n" +
+ "\aRequest\x1a\x9a\x02\n" +
+ "\bResponse\x12n\n" +
+ "\x10identity_schemas\x18\x01 \x03(\v2C.tfplugin5.GetResourceIdentitySchemas.Response.IdentitySchemasEntryR\x0fidentitySchemas\x127\n" +
+ "\vdiagnostics\x18\x02 \x03(\v2\x15.tfplugin5.DiagnosticR\vdiagnostics\x1ae\n" +
+ "\x14IdentitySchemasEntry\x12\x10\n" +
+ "\x03key\x18\x01 \x01(\tR\x03key\x127\n" +
+ "\x05value\x18\x02 \x01(\v2!.tfplugin5.ResourceIdentitySchemaR\x05value:\x028\x01\"\xa7\x02\n" +
+ "\x17UpgradeResourceIdentity\x1ax\n" +
+ "\aRequest\x12\x1b\n" +
+ "\ttype_name\x18\x01 \x01(\tR\btypeName\x12\x18\n" +
+ "\aversion\x18\x02 \x01(\x03R\aversion\x126\n" +
+ "\fraw_identity\x18\x03 \x01(\v2\x13.tfplugin5.RawStateR\vrawIdentity\x1a\x91\x01\n" +
+ "\bResponse\x12L\n" +
+ "\x11upgraded_identity\x18\x01 \x01(\v2\x1f.tfplugin5.ResourceIdentityDataR\x10upgradedIdentity\x127\n" +
+ "\vdiagnostics\x18\x02 \x03(\v2\x15.tfplugin5.DiagnosticR\vdiagnostics\"\xb2\x03\n" +
+ "\fListResource\x1a\xa5\x01\n" +
+ "\aRequest\x12\x1b\n" +
+ "\ttype_name\x18\x01 \x01(\tR\btypeName\x12/\n" +
+ "\x06config\x18\x02 \x01(\v2\x17.tfplugin5.DynamicValueR\x06config\x126\n" +
+ "\x17include_resource_object\x18\x03 \x01(\bR\x15includeResourceObject\x12\x14\n" +
+ "\x05limit\x18\x04 \x01(\x03R\x05limit\x1a\xf9\x01\n" +
+ "\x05Event\x12;\n" +
+ "\bidentity\x18\x01 \x01(\v2\x1f.tfplugin5.ResourceIdentityDataR\bidentity\x12!\n" +
+ "\fdisplay_name\x18\x02 \x01(\tR\vdisplayName\x12E\n" +
+ "\x0fresource_object\x18\x03 \x01(\v2\x17.tfplugin5.DynamicValueH\x00R\x0eresourceObject\x88\x01\x01\x125\n" +
+ "\n" +
+ "diagnostic\x18\x04 \x03(\v2\x15.tfplugin5.DiagnosticR\n" +
+ "diagnosticB\x12\n" +
+ "\x10_resource_object\"\xbb\x02\n" +
+ "\x1aValidateListResourceConfig\x1a\xd7\x01\n" +
+ "\aRequest\x12\x1b\n" +
+ "\ttype_name\x18\x01 \x01(\tR\btypeName\x12/\n" +
+ "\x06config\x18\x02 \x01(\v2\x17.tfplugin5.DynamicValueR\x06config\x12O\n" +
+ "\x17include_resource_object\x18\x03 \x01(\v2\x17.tfplugin5.DynamicValueR\x15includeResourceObject\x12-\n" +
+ "\x05limit\x18\x04 \x01(\v2\x17.tfplugin5.DynamicValueR\x05limit\x1aC\n" +
+ "\bResponse\x127\n" +
+ "\vdiagnostics\x18\x01 \x03(\v2\x15.tfplugin5.DiagnosticR\vdiagnostics\"\xb8\x01\n" +
+ "\x14ValidateActionConfig\x1a[\n" +
+ "\aRequest\x12\x1f\n" +
+ "\vaction_type\x18\x01 \x01(\tR\n" +
+ "actionType\x12/\n" +
+ "\x06config\x18\x02 \x01(\v2\x17.tfplugin5.DynamicValueR\x06config\x1aC\n" +
+ "\bResponse\x127\n" +
+ "\vdiagnostics\x18\x01 \x03(\v2\x15.tfplugin5.DiagnosticR\vdiagnostics\"\xb0\x02\n" +
+ "\n" +
+ "PlanAction\x1a\xab\x01\n" +
+ "\aRequest\x12\x1f\n" +
+ "\vaction_type\x18\x01 \x01(\tR\n" +
+ "actionType\x12/\n" +
+ "\x06config\x18\x02 \x01(\v2\x17.tfplugin5.DynamicValueR\x06config\x12N\n" +
+ "\x13client_capabilities\x18\x03 \x01(\v2\x1d.tfplugin5.ClientCapabilitiesR\x12clientCapabilities\x1at\n" +
+ "\bResponse\x127\n" +
+ "\vdiagnostics\x18\x01 \x03(\v2\x15.tfplugin5.DiagnosticR\vdiagnostics\x12/\n" +
+ "\bdeferred\x18\x02 \x01(\v2\x13.tfplugin5.DeferredR\bdeferred\"\xc9\x03\n" +
+ "\fInvokeAction\x1a\xab\x01\n" +
+ "\aRequest\x12\x1f\n" +
+ "\vaction_type\x18\x01 \x01(\tR\n" +
+ "actionType\x12/\n" +
+ "\x06config\x18\x02 \x01(\v2\x17.tfplugin5.DynamicValueR\x06config\x12N\n" +
+ "\x13client_capabilities\x18\x03 \x01(\v2\x1d.tfplugin5.ClientCapabilitiesR\x12clientCapabilities\x1a\x8a\x02\n" +
+ "\x05Event\x12D\n" +
+ "\bprogress\x18\x01 \x01(\v2&.tfplugin5.InvokeAction.Event.ProgressH\x00R\bprogress\x12G\n" +
+ "\tcompleted\x18\x02 \x01(\v2'.tfplugin5.InvokeAction.Event.CompletedH\x00R\tcompleted\x1a$\n" +
+ "\bProgress\x12\x18\n" +
+ "\amessage\x18\x01 \x01(\tR\amessage\x1aD\n" +
+ "\tCompleted\x127\n" +
+ "\vdiagnostics\x18\x01 \x03(\v2\x15.tfplugin5.DiagnosticR\vdiagnosticsB\x06\n" +
+ "\x04type*%\n" +
+ "\n" +
+ "StringKind\x12\t\n" +
+ "\x05PLAIN\x10\x00\x12\f\n" +
+ "\bMARKDOWN\x10\x012\x96\x15\n" +
+ "\bProvider\x12N\n" +
+ "\vGetMetadata\x12\x1e.tfplugin5.GetMetadata.Request\x1a\x1f.tfplugin5.GetMetadata.Response\x12X\n" +
+ "\tGetSchema\x12$.tfplugin5.GetProviderSchema.Request\x1a%.tfplugin5.GetProviderSchema.Response\x12{\n" +
+ "\x1aGetResourceIdentitySchemas\x12-.tfplugin5.GetResourceIdentitySchemas.Request\x1a..tfplugin5.GetResourceIdentitySchemas.Response\x12l\n" +
+ "\x15PrepareProviderConfig\x12(.tfplugin5.PrepareProviderConfig.Request\x1a).tfplugin5.PrepareProviderConfig.Response\x12{\n" +
+ "\x1aValidateResourceTypeConfig\x12-.tfplugin5.ValidateResourceTypeConfig.Request\x1a..tfplugin5.ValidateResourceTypeConfig.Response\x12u\n" +
+ "\x18ValidateDataSourceConfig\x12+.tfplugin5.ValidateDataSourceConfig.Request\x1a,.tfplugin5.ValidateDataSourceConfig.Response\x12i\n" +
+ "\x14UpgradeResourceState\x12'.tfplugin5.UpgradeResourceState.Request\x1a(.tfplugin5.UpgradeResourceState.Response\x12r\n" +
+ "\x17UpgradeResourceIdentity\x12*.tfplugin5.UpgradeResourceIdentity.Request\x1a+.tfplugin5.UpgradeResourceIdentity.Response\x12H\n" +
+ "\tConfigure\x12\x1c.tfplugin5.Configure.Request\x1a\x1d.tfplugin5.Configure.Response\x12Q\n" +
+ "\fReadResource\x12\x1f.tfplugin5.ReadResource.Request\x1a .tfplugin5.ReadResource.Response\x12c\n" +
+ "\x12PlanResourceChange\x12%.tfplugin5.PlanResourceChange.Request\x1a&.tfplugin5.PlanResourceChange.Response\x12f\n" +
+ "\x13ApplyResourceChange\x12&.tfplugin5.ApplyResourceChange.Request\x1a'.tfplugin5.ApplyResourceChange.Response\x12f\n" +
+ "\x13ImportResourceState\x12&.tfplugin5.ImportResourceState.Request\x1a'.tfplugin5.ImportResourceState.Response\x12`\n" +
+ "\x11MoveResourceState\x12$.tfplugin5.MoveResourceState.Request\x1a%.tfplugin5.MoveResourceState.Response\x12W\n" +
+ "\x0eReadDataSource\x12!.tfplugin5.ReadDataSource.Request\x1a\".tfplugin5.ReadDataSource.Response\x12\x8a\x01\n" +
+ "\x1fValidateEphemeralResourceConfig\x122.tfplugin5.ValidateEphemeralResourceConfig.Request\x1a3.tfplugin5.ValidateEphemeralResourceConfig.Response\x12l\n" +
+ "\x15OpenEphemeralResource\x12(.tfplugin5.OpenEphemeralResource.Request\x1a).tfplugin5.OpenEphemeralResource.Response\x12o\n" +
+ "\x16RenewEphemeralResource\x12).tfplugin5.RenewEphemeralResource.Request\x1a*.tfplugin5.RenewEphemeralResource.Response\x12o\n" +
+ "\x16CloseEphemeralResource\x12).tfplugin5.CloseEphemeralResource.Request\x1a*.tfplugin5.CloseEphemeralResource.Response\x12P\n" +
+ "\fListResource\x12\x1f.tfplugin5.ListResource.Request\x1a\x1d.tfplugin5.ListResource.Event0\x01\x12{\n" +
+ "\x1aValidateListResourceConfig\x12-.tfplugin5.ValidateListResourceConfig.Request\x1a..tfplugin5.ValidateListResourceConfig.Response\x12Q\n" +
+ "\fGetFunctions\x12\x1f.tfplugin5.GetFunctions.Request\x1a .tfplugin5.GetFunctions.Response\x12Q\n" +
+ "\fCallFunction\x12\x1f.tfplugin5.CallFunction.Request\x1a .tfplugin5.CallFunction.Response\x12i\n" +
+ "\x14ValidateActionConfig\x12'.tfplugin5.ValidateActionConfig.Request\x1a(.tfplugin5.ValidateActionConfig.Response\x12K\n" +
+ "\n" +
+ "PlanAction\x12\x1d.tfplugin5.PlanAction.Request\x1a\x1e.tfplugin5.PlanAction.Response\x12P\n" +
+ "\fInvokeAction\x12\x1f.tfplugin5.InvokeAction.Request\x1a\x1d.tfplugin5.InvokeAction.Event0\x01\x129\n" +
+ "\x04Stop\x12\x17.tfplugin5.Stop.Request\x1a\x18.tfplugin5.Stop.Response2\x86\x03\n" +
+ "\vProvisioner\x12^\n" +
+ "\tGetSchema\x12'.tfplugin5.GetProvisionerSchema.Request\x1a(.tfplugin5.GetProvisionerSchema.Response\x12x\n" +
+ "\x19ValidateProvisionerConfig\x12,.tfplugin5.ValidateProvisionerConfig.Request\x1a-.tfplugin5.ValidateProvisionerConfig.Response\x12b\n" +
+ "\x11ProvisionResource\x12$.tfplugin5.ProvisionResource.Request\x1a%.tfplugin5.ProvisionResource.Response0\x01\x129\n" +
+ "\x04Stop\x12\x17.tfplugin5.Stop.Request\x1a\x18.tfplugin5.Stop.ResponseBGZEgithub.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5b\x06proto3"
var (
file_tfplugin5_proto_rawDescOnce sync.Once
- file_tfplugin5_proto_rawDescData = file_tfplugin5_proto_rawDesc
+ file_tfplugin5_proto_rawDescData []byte
)
func file_tfplugin5_proto_rawDescGZIP() []byte {
file_tfplugin5_proto_rawDescOnce.Do(func() {
- file_tfplugin5_proto_rawDescData = protoimpl.X.CompressGZIP(file_tfplugin5_proto_rawDescData)
+ file_tfplugin5_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_tfplugin5_proto_rawDesc), len(file_tfplugin5_proto_rawDesc)))
})
return file_tfplugin5_proto_rawDescData
}
var file_tfplugin5_proto_enumTypes = make([]protoimpl.EnumInfo, 4)
-var file_tfplugin5_proto_msgTypes = make([]protoimpl.MessageInfo, 82)
-var file_tfplugin5_proto_goTypes = []interface{}{
- (StringKind)(0), // 0: tfplugin5.StringKind
- (Diagnostic_Severity)(0), // 1: tfplugin5.Diagnostic.Severity
- (Schema_NestedBlock_NestingMode)(0), // 2: tfplugin5.Schema.NestedBlock.NestingMode
- (Deferred_Reason)(0), // 3: tfplugin5.Deferred.Reason
- (*DynamicValue)(nil), // 4: tfplugin5.DynamicValue
- (*Diagnostic)(nil), // 5: tfplugin5.Diagnostic
- (*FunctionError)(nil), // 6: tfplugin5.FunctionError
- (*AttributePath)(nil), // 7: tfplugin5.AttributePath
- (*Stop)(nil), // 8: tfplugin5.Stop
- (*RawState)(nil), // 9: tfplugin5.RawState
- (*Schema)(nil), // 10: tfplugin5.Schema
- (*ServerCapabilities)(nil), // 11: tfplugin5.ServerCapabilities
- (*ClientCapabilities)(nil), // 12: tfplugin5.ClientCapabilities
- (*Function)(nil), // 13: tfplugin5.Function
- (*Deferred)(nil), // 14: tfplugin5.Deferred
- (*GetMetadata)(nil), // 15: tfplugin5.GetMetadata
- (*GetProviderSchema)(nil), // 16: tfplugin5.GetProviderSchema
- (*PrepareProviderConfig)(nil), // 17: tfplugin5.PrepareProviderConfig
- (*UpgradeResourceState)(nil), // 18: tfplugin5.UpgradeResourceState
- (*ValidateResourceTypeConfig)(nil), // 19: tfplugin5.ValidateResourceTypeConfig
- (*ValidateDataSourceConfig)(nil), // 20: tfplugin5.ValidateDataSourceConfig
- (*Configure)(nil), // 21: tfplugin5.Configure
- (*ReadResource)(nil), // 22: tfplugin5.ReadResource
- (*PlanResourceChange)(nil), // 23: tfplugin5.PlanResourceChange
- (*ApplyResourceChange)(nil), // 24: tfplugin5.ApplyResourceChange
- (*ImportResourceState)(nil), // 25: tfplugin5.ImportResourceState
- (*MoveResourceState)(nil), // 26: tfplugin5.MoveResourceState
- (*ReadDataSource)(nil), // 27: tfplugin5.ReadDataSource
- (*GetProvisionerSchema)(nil), // 28: tfplugin5.GetProvisionerSchema
- (*ValidateProvisionerConfig)(nil), // 29: tfplugin5.ValidateProvisionerConfig
- (*ProvisionResource)(nil), // 30: tfplugin5.ProvisionResource
- (*GetFunctions)(nil), // 31: tfplugin5.GetFunctions
- (*CallFunction)(nil), // 32: tfplugin5.CallFunction
- (*AttributePath_Step)(nil), // 33: tfplugin5.AttributePath.Step
- (*Stop_Request)(nil), // 34: tfplugin5.Stop.Request
- (*Stop_Response)(nil), // 35: tfplugin5.Stop.Response
- nil, // 36: tfplugin5.RawState.FlatmapEntry
- (*Schema_Block)(nil), // 37: tfplugin5.Schema.Block
- (*Schema_Attribute)(nil), // 38: tfplugin5.Schema.Attribute
- (*Schema_NestedBlock)(nil), // 39: tfplugin5.Schema.NestedBlock
- (*Function_Parameter)(nil), // 40: tfplugin5.Function.Parameter
- (*Function_Return)(nil), // 41: tfplugin5.Function.Return
- (*GetMetadata_Request)(nil), // 42: tfplugin5.GetMetadata.Request
- (*GetMetadata_Response)(nil), // 43: tfplugin5.GetMetadata.Response
- (*GetMetadata_FunctionMetadata)(nil), // 44: tfplugin5.GetMetadata.FunctionMetadata
- (*GetMetadata_DataSourceMetadata)(nil), // 45: tfplugin5.GetMetadata.DataSourceMetadata
- (*GetMetadata_ResourceMetadata)(nil), // 46: tfplugin5.GetMetadata.ResourceMetadata
- (*GetProviderSchema_Request)(nil), // 47: tfplugin5.GetProviderSchema.Request
- (*GetProviderSchema_Response)(nil), // 48: tfplugin5.GetProviderSchema.Response
- nil, // 49: tfplugin5.GetProviderSchema.Response.ResourceSchemasEntry
- nil, // 50: tfplugin5.GetProviderSchema.Response.DataSourceSchemasEntry
- nil, // 51: tfplugin5.GetProviderSchema.Response.FunctionsEntry
- (*PrepareProviderConfig_Request)(nil), // 52: tfplugin5.PrepareProviderConfig.Request
- (*PrepareProviderConfig_Response)(nil), // 53: tfplugin5.PrepareProviderConfig.Response
- (*UpgradeResourceState_Request)(nil), // 54: tfplugin5.UpgradeResourceState.Request
- (*UpgradeResourceState_Response)(nil), // 55: tfplugin5.UpgradeResourceState.Response
- (*ValidateResourceTypeConfig_Request)(nil), // 56: tfplugin5.ValidateResourceTypeConfig.Request
- (*ValidateResourceTypeConfig_Response)(nil), // 57: tfplugin5.ValidateResourceTypeConfig.Response
- (*ValidateDataSourceConfig_Request)(nil), // 58: tfplugin5.ValidateDataSourceConfig.Request
- (*ValidateDataSourceConfig_Response)(nil), // 59: tfplugin5.ValidateDataSourceConfig.Response
- (*Configure_Request)(nil), // 60: tfplugin5.Configure.Request
- (*Configure_Response)(nil), // 61: tfplugin5.Configure.Response
- (*ReadResource_Request)(nil), // 62: tfplugin5.ReadResource.Request
- (*ReadResource_Response)(nil), // 63: tfplugin5.ReadResource.Response
- (*PlanResourceChange_Request)(nil), // 64: tfplugin5.PlanResourceChange.Request
- (*PlanResourceChange_Response)(nil), // 65: tfplugin5.PlanResourceChange.Response
- (*ApplyResourceChange_Request)(nil), // 66: tfplugin5.ApplyResourceChange.Request
- (*ApplyResourceChange_Response)(nil), // 67: tfplugin5.ApplyResourceChange.Response
- (*ImportResourceState_Request)(nil), // 68: tfplugin5.ImportResourceState.Request
- (*ImportResourceState_ImportedResource)(nil), // 69: tfplugin5.ImportResourceState.ImportedResource
- (*ImportResourceState_Response)(nil), // 70: tfplugin5.ImportResourceState.Response
- (*MoveResourceState_Request)(nil), // 71: tfplugin5.MoveResourceState.Request
- (*MoveResourceState_Response)(nil), // 72: tfplugin5.MoveResourceState.Response
- (*ReadDataSource_Request)(nil), // 73: tfplugin5.ReadDataSource.Request
- (*ReadDataSource_Response)(nil), // 74: tfplugin5.ReadDataSource.Response
- (*GetProvisionerSchema_Request)(nil), // 75: tfplugin5.GetProvisionerSchema.Request
- (*GetProvisionerSchema_Response)(nil), // 76: tfplugin5.GetProvisionerSchema.Response
- (*ValidateProvisionerConfig_Request)(nil), // 77: tfplugin5.ValidateProvisionerConfig.Request
- (*ValidateProvisionerConfig_Response)(nil), // 78: tfplugin5.ValidateProvisionerConfig.Response
- (*ProvisionResource_Request)(nil), // 79: tfplugin5.ProvisionResource.Request
- (*ProvisionResource_Response)(nil), // 80: tfplugin5.ProvisionResource.Response
- (*GetFunctions_Request)(nil), // 81: tfplugin5.GetFunctions.Request
- (*GetFunctions_Response)(nil), // 82: tfplugin5.GetFunctions.Response
- nil, // 83: tfplugin5.GetFunctions.Response.FunctionsEntry
- (*CallFunction_Request)(nil), // 84: tfplugin5.CallFunction.Request
- (*CallFunction_Response)(nil), // 85: tfplugin5.CallFunction.Response
+var file_tfplugin5_proto_msgTypes = make([]protoimpl.MessageInfo, 128)
+var file_tfplugin5_proto_goTypes = []any{
+ (StringKind)(0), // 0: tfplugin5.StringKind
+ (Diagnostic_Severity)(0), // 1: tfplugin5.Diagnostic.Severity
+ (Schema_NestedBlock_NestingMode)(0), // 2: tfplugin5.Schema.NestedBlock.NestingMode
+ (Deferred_Reason)(0), // 3: tfplugin5.Deferred.Reason
+ (*DynamicValue)(nil), // 4: tfplugin5.DynamicValue
+ (*Diagnostic)(nil), // 5: tfplugin5.Diagnostic
+ (*FunctionError)(nil), // 6: tfplugin5.FunctionError
+ (*AttributePath)(nil), // 7: tfplugin5.AttributePath
+ (*Stop)(nil), // 8: tfplugin5.Stop
+ (*RawState)(nil), // 9: tfplugin5.RawState
+ (*Schema)(nil), // 10: tfplugin5.Schema
+ (*ResourceIdentitySchema)(nil), // 11: tfplugin5.ResourceIdentitySchema
+ (*ResourceIdentityData)(nil), // 12: tfplugin5.ResourceIdentityData
+ (*ServerCapabilities)(nil), // 13: tfplugin5.ServerCapabilities
+ (*ClientCapabilities)(nil), // 14: tfplugin5.ClientCapabilities
+ (*Function)(nil), // 15: tfplugin5.Function
+ (*ActionSchema)(nil), // 16: tfplugin5.ActionSchema
+ (*Deferred)(nil), // 17: tfplugin5.Deferred
+ (*GetMetadata)(nil), // 18: tfplugin5.GetMetadata
+ (*GetProviderSchema)(nil), // 19: tfplugin5.GetProviderSchema
+ (*PrepareProviderConfig)(nil), // 20: tfplugin5.PrepareProviderConfig
+ (*UpgradeResourceState)(nil), // 21: tfplugin5.UpgradeResourceState
+ (*ValidateResourceTypeConfig)(nil), // 22: tfplugin5.ValidateResourceTypeConfig
+ (*ValidateDataSourceConfig)(nil), // 23: tfplugin5.ValidateDataSourceConfig
+ (*Configure)(nil), // 24: tfplugin5.Configure
+ (*ReadResource)(nil), // 25: tfplugin5.ReadResource
+ (*PlanResourceChange)(nil), // 26: tfplugin5.PlanResourceChange
+ (*ApplyResourceChange)(nil), // 27: tfplugin5.ApplyResourceChange
+ (*ImportResourceState)(nil), // 28: tfplugin5.ImportResourceState
+ (*MoveResourceState)(nil), // 29: tfplugin5.MoveResourceState
+ (*ReadDataSource)(nil), // 30: tfplugin5.ReadDataSource
+ (*GetProvisionerSchema)(nil), // 31: tfplugin5.GetProvisionerSchema
+ (*ValidateProvisionerConfig)(nil), // 32: tfplugin5.ValidateProvisionerConfig
+ (*ProvisionResource)(nil), // 33: tfplugin5.ProvisionResource
+ (*GetFunctions)(nil), // 34: tfplugin5.GetFunctions
+ (*CallFunction)(nil), // 35: tfplugin5.CallFunction
+ (*ValidateEphemeralResourceConfig)(nil), // 36: tfplugin5.ValidateEphemeralResourceConfig
+ (*OpenEphemeralResource)(nil), // 37: tfplugin5.OpenEphemeralResource
+ (*RenewEphemeralResource)(nil), // 38: tfplugin5.RenewEphemeralResource
+ (*CloseEphemeralResource)(nil), // 39: tfplugin5.CloseEphemeralResource
+ (*GetResourceIdentitySchemas)(nil), // 40: tfplugin5.GetResourceIdentitySchemas
+ (*UpgradeResourceIdentity)(nil), // 41: tfplugin5.UpgradeResourceIdentity
+ (*ListResource)(nil), // 42: tfplugin5.ListResource
+ (*ValidateListResourceConfig)(nil), // 43: tfplugin5.ValidateListResourceConfig
+ (*ValidateActionConfig)(nil), // 44: tfplugin5.ValidateActionConfig
+ (*PlanAction)(nil), // 45: tfplugin5.PlanAction
+ (*InvokeAction)(nil), // 46: tfplugin5.InvokeAction
+ (*AttributePath_Step)(nil), // 47: tfplugin5.AttributePath.Step
+ (*Stop_Request)(nil), // 48: tfplugin5.Stop.Request
+ (*Stop_Response)(nil), // 49: tfplugin5.Stop.Response
+ nil, // 50: tfplugin5.RawState.FlatmapEntry
+ (*Schema_Block)(nil), // 51: tfplugin5.Schema.Block
+ (*Schema_Attribute)(nil), // 52: tfplugin5.Schema.Attribute
+ (*Schema_NestedBlock)(nil), // 53: tfplugin5.Schema.NestedBlock
+ (*ResourceIdentitySchema_IdentityAttribute)(nil), // 54: tfplugin5.ResourceIdentitySchema.IdentityAttribute
+ (*Function_Parameter)(nil), // 55: tfplugin5.Function.Parameter
+ (*Function_Return)(nil), // 56: tfplugin5.Function.Return
+ (*GetMetadata_Request)(nil), // 57: tfplugin5.GetMetadata.Request
+ (*GetMetadata_Response)(nil), // 58: tfplugin5.GetMetadata.Response
+ (*GetMetadata_FunctionMetadata)(nil), // 59: tfplugin5.GetMetadata.FunctionMetadata
+ (*GetMetadata_DataSourceMetadata)(nil), // 60: tfplugin5.GetMetadata.DataSourceMetadata
+ (*GetMetadata_ResourceMetadata)(nil), // 61: tfplugin5.GetMetadata.ResourceMetadata
+ (*GetMetadata_EphemeralResourceMetadata)(nil), // 62: tfplugin5.GetMetadata.EphemeralResourceMetadata
+ (*GetMetadata_ListResourceMetadata)(nil), // 63: tfplugin5.GetMetadata.ListResourceMetadata
+ (*GetMetadata_ActionMetadata)(nil), // 64: tfplugin5.GetMetadata.ActionMetadata
+ (*GetProviderSchema_Request)(nil), // 65: tfplugin5.GetProviderSchema.Request
+ (*GetProviderSchema_Response)(nil), // 66: tfplugin5.GetProviderSchema.Response
+ nil, // 67: tfplugin5.GetProviderSchema.Response.ResourceSchemasEntry
+ nil, // 68: tfplugin5.GetProviderSchema.Response.DataSourceSchemasEntry
+ nil, // 69: tfplugin5.GetProviderSchema.Response.FunctionsEntry
+ nil, // 70: tfplugin5.GetProviderSchema.Response.EphemeralResourceSchemasEntry
+ nil, // 71: tfplugin5.GetProviderSchema.Response.ListResourceSchemasEntry
+ nil, // 72: tfplugin5.GetProviderSchema.Response.ActionSchemasEntry
+ (*PrepareProviderConfig_Request)(nil), // 73: tfplugin5.PrepareProviderConfig.Request
+ (*PrepareProviderConfig_Response)(nil), // 74: tfplugin5.PrepareProviderConfig.Response
+ (*UpgradeResourceState_Request)(nil), // 75: tfplugin5.UpgradeResourceState.Request
+ (*UpgradeResourceState_Response)(nil), // 76: tfplugin5.UpgradeResourceState.Response
+ (*ValidateResourceTypeConfig_Request)(nil), // 77: tfplugin5.ValidateResourceTypeConfig.Request
+ (*ValidateResourceTypeConfig_Response)(nil), // 78: tfplugin5.ValidateResourceTypeConfig.Response
+ (*ValidateDataSourceConfig_Request)(nil), // 79: tfplugin5.ValidateDataSourceConfig.Request
+ (*ValidateDataSourceConfig_Response)(nil), // 80: tfplugin5.ValidateDataSourceConfig.Response
+ (*Configure_Request)(nil), // 81: tfplugin5.Configure.Request
+ (*Configure_Response)(nil), // 82: tfplugin5.Configure.Response
+ (*ReadResource_Request)(nil), // 83: tfplugin5.ReadResource.Request
+ (*ReadResource_Response)(nil), // 84: tfplugin5.ReadResource.Response
+ (*PlanResourceChange_Request)(nil), // 85: tfplugin5.PlanResourceChange.Request
+ (*PlanResourceChange_Response)(nil), // 86: tfplugin5.PlanResourceChange.Response
+ (*ApplyResourceChange_Request)(nil), // 87: tfplugin5.ApplyResourceChange.Request
+ (*ApplyResourceChange_Response)(nil), // 88: tfplugin5.ApplyResourceChange.Response
+ (*ImportResourceState_Request)(nil), // 89: tfplugin5.ImportResourceState.Request
+ (*ImportResourceState_ImportedResource)(nil), // 90: tfplugin5.ImportResourceState.ImportedResource
+ (*ImportResourceState_Response)(nil), // 91: tfplugin5.ImportResourceState.Response
+ (*MoveResourceState_Request)(nil), // 92: tfplugin5.MoveResourceState.Request
+ (*MoveResourceState_Response)(nil), // 93: tfplugin5.MoveResourceState.Response
+ (*ReadDataSource_Request)(nil), // 94: tfplugin5.ReadDataSource.Request
+ (*ReadDataSource_Response)(nil), // 95: tfplugin5.ReadDataSource.Response
+ (*GetProvisionerSchema_Request)(nil), // 96: tfplugin5.GetProvisionerSchema.Request
+ (*GetProvisionerSchema_Response)(nil), // 97: tfplugin5.GetProvisionerSchema.Response
+ (*ValidateProvisionerConfig_Request)(nil), // 98: tfplugin5.ValidateProvisionerConfig.Request
+ (*ValidateProvisionerConfig_Response)(nil), // 99: tfplugin5.ValidateProvisionerConfig.Response
+ (*ProvisionResource_Request)(nil), // 100: tfplugin5.ProvisionResource.Request
+ (*ProvisionResource_Response)(nil), // 101: tfplugin5.ProvisionResource.Response
+ (*GetFunctions_Request)(nil), // 102: tfplugin5.GetFunctions.Request
+ (*GetFunctions_Response)(nil), // 103: tfplugin5.GetFunctions.Response
+ nil, // 104: tfplugin5.GetFunctions.Response.FunctionsEntry
+ (*CallFunction_Request)(nil), // 105: tfplugin5.CallFunction.Request
+ (*CallFunction_Response)(nil), // 106: tfplugin5.CallFunction.Response
+ (*ValidateEphemeralResourceConfig_Request)(nil), // 107: tfplugin5.ValidateEphemeralResourceConfig.Request
+ (*ValidateEphemeralResourceConfig_Response)(nil), // 108: tfplugin5.ValidateEphemeralResourceConfig.Response
+ (*OpenEphemeralResource_Request)(nil), // 109: tfplugin5.OpenEphemeralResource.Request
+ (*OpenEphemeralResource_Response)(nil), // 110: tfplugin5.OpenEphemeralResource.Response
+ (*RenewEphemeralResource_Request)(nil), // 111: tfplugin5.RenewEphemeralResource.Request
+ (*RenewEphemeralResource_Response)(nil), // 112: tfplugin5.RenewEphemeralResource.Response
+ (*CloseEphemeralResource_Request)(nil), // 113: tfplugin5.CloseEphemeralResource.Request
+ (*CloseEphemeralResource_Response)(nil), // 114: tfplugin5.CloseEphemeralResource.Response
+ (*GetResourceIdentitySchemas_Request)(nil), // 115: tfplugin5.GetResourceIdentitySchemas.Request
+ (*GetResourceIdentitySchemas_Response)(nil), // 116: tfplugin5.GetResourceIdentitySchemas.Response
+ nil, // 117: tfplugin5.GetResourceIdentitySchemas.Response.IdentitySchemasEntry
+ (*UpgradeResourceIdentity_Request)(nil), // 118: tfplugin5.UpgradeResourceIdentity.Request
+ (*UpgradeResourceIdentity_Response)(nil), // 119: tfplugin5.UpgradeResourceIdentity.Response
+ (*ListResource_Request)(nil), // 120: tfplugin5.ListResource.Request
+ (*ListResource_Event)(nil), // 121: tfplugin5.ListResource.Event
+ (*ValidateListResourceConfig_Request)(nil), // 122: tfplugin5.ValidateListResourceConfig.Request
+ (*ValidateListResourceConfig_Response)(nil), // 123: tfplugin5.ValidateListResourceConfig.Response
+ (*ValidateActionConfig_Request)(nil), // 124: tfplugin5.ValidateActionConfig.Request
+ (*ValidateActionConfig_Response)(nil), // 125: tfplugin5.ValidateActionConfig.Response
+ (*PlanAction_Request)(nil), // 126: tfplugin5.PlanAction.Request
+ (*PlanAction_Response)(nil), // 127: tfplugin5.PlanAction.Response
+ (*InvokeAction_Request)(nil), // 128: tfplugin5.InvokeAction.Request
+ (*InvokeAction_Event)(nil), // 129: tfplugin5.InvokeAction.Event
+ (*InvokeAction_Event_Progress)(nil), // 130: tfplugin5.InvokeAction.Event.Progress
+ (*InvokeAction_Event_Completed)(nil), // 131: tfplugin5.InvokeAction.Event.Completed
+ (*timestamppb.Timestamp)(nil), // 132: google.protobuf.Timestamp
}
var file_tfplugin5_proto_depIdxs = []int32{
1, // 0: tfplugin5.Diagnostic.severity:type_name -> tfplugin5.Diagnostic.Severity
7, // 1: tfplugin5.Diagnostic.attribute:type_name -> tfplugin5.AttributePath
- 33, // 2: tfplugin5.AttributePath.steps:type_name -> tfplugin5.AttributePath.Step
- 36, // 3: tfplugin5.RawState.flatmap:type_name -> tfplugin5.RawState.FlatmapEntry
- 37, // 4: tfplugin5.Schema.block:type_name -> tfplugin5.Schema.Block
- 40, // 5: tfplugin5.Function.parameters:type_name -> tfplugin5.Function.Parameter
- 40, // 6: tfplugin5.Function.variadic_parameter:type_name -> tfplugin5.Function.Parameter
- 41, // 7: tfplugin5.Function.return:type_name -> tfplugin5.Function.Return
- 0, // 8: tfplugin5.Function.description_kind:type_name -> tfplugin5.StringKind
- 3, // 9: tfplugin5.Deferred.reason:type_name -> tfplugin5.Deferred.Reason
- 38, // 10: tfplugin5.Schema.Block.attributes:type_name -> tfplugin5.Schema.Attribute
- 39, // 11: tfplugin5.Schema.Block.block_types:type_name -> tfplugin5.Schema.NestedBlock
- 0, // 12: tfplugin5.Schema.Block.description_kind:type_name -> tfplugin5.StringKind
- 0, // 13: tfplugin5.Schema.Attribute.description_kind:type_name -> tfplugin5.StringKind
- 37, // 14: tfplugin5.Schema.NestedBlock.block:type_name -> tfplugin5.Schema.Block
- 2, // 15: tfplugin5.Schema.NestedBlock.nesting:type_name -> tfplugin5.Schema.NestedBlock.NestingMode
- 0, // 16: tfplugin5.Function.Parameter.description_kind:type_name -> tfplugin5.StringKind
- 11, // 17: tfplugin5.GetMetadata.Response.server_capabilities:type_name -> tfplugin5.ServerCapabilities
- 5, // 18: tfplugin5.GetMetadata.Response.diagnostics:type_name -> tfplugin5.Diagnostic
- 45, // 19: tfplugin5.GetMetadata.Response.data_sources:type_name -> tfplugin5.GetMetadata.DataSourceMetadata
- 46, // 20: tfplugin5.GetMetadata.Response.resources:type_name -> tfplugin5.GetMetadata.ResourceMetadata
- 44, // 21: tfplugin5.GetMetadata.Response.functions:type_name -> tfplugin5.GetMetadata.FunctionMetadata
- 10, // 22: tfplugin5.GetProviderSchema.Response.provider:type_name -> tfplugin5.Schema
- 49, // 23: tfplugin5.GetProviderSchema.Response.resource_schemas:type_name -> tfplugin5.GetProviderSchema.Response.ResourceSchemasEntry
- 50, // 24: tfplugin5.GetProviderSchema.Response.data_source_schemas:type_name -> tfplugin5.GetProviderSchema.Response.DataSourceSchemasEntry
- 5, // 25: tfplugin5.GetProviderSchema.Response.diagnostics:type_name -> tfplugin5.Diagnostic
- 10, // 26: tfplugin5.GetProviderSchema.Response.provider_meta:type_name -> tfplugin5.Schema
- 11, // 27: tfplugin5.GetProviderSchema.Response.server_capabilities:type_name -> tfplugin5.ServerCapabilities
- 51, // 28: tfplugin5.GetProviderSchema.Response.functions:type_name -> tfplugin5.GetProviderSchema.Response.FunctionsEntry
- 10, // 29: tfplugin5.GetProviderSchema.Response.ResourceSchemasEntry.value:type_name -> tfplugin5.Schema
- 10, // 30: tfplugin5.GetProviderSchema.Response.DataSourceSchemasEntry.value:type_name -> tfplugin5.Schema
- 13, // 31: tfplugin5.GetProviderSchema.Response.FunctionsEntry.value:type_name -> tfplugin5.Function
- 4, // 32: tfplugin5.PrepareProviderConfig.Request.config:type_name -> tfplugin5.DynamicValue
- 4, // 33: tfplugin5.PrepareProviderConfig.Response.prepared_config:type_name -> tfplugin5.DynamicValue
- 5, // 34: tfplugin5.PrepareProviderConfig.Response.diagnostics:type_name -> tfplugin5.Diagnostic
- 9, // 35: tfplugin5.UpgradeResourceState.Request.raw_state:type_name -> tfplugin5.RawState
- 4, // 36: tfplugin5.UpgradeResourceState.Response.upgraded_state:type_name -> tfplugin5.DynamicValue
- 5, // 37: tfplugin5.UpgradeResourceState.Response.diagnostics:type_name -> tfplugin5.Diagnostic
- 4, // 38: tfplugin5.ValidateResourceTypeConfig.Request.config:type_name -> tfplugin5.DynamicValue
- 5, // 39: tfplugin5.ValidateResourceTypeConfig.Response.diagnostics:type_name -> tfplugin5.Diagnostic
- 4, // 40: tfplugin5.ValidateDataSourceConfig.Request.config:type_name -> tfplugin5.DynamicValue
- 5, // 41: tfplugin5.ValidateDataSourceConfig.Response.diagnostics:type_name -> tfplugin5.Diagnostic
- 4, // 42: tfplugin5.Configure.Request.config:type_name -> tfplugin5.DynamicValue
- 12, // 43: tfplugin5.Configure.Request.client_capabilities:type_name -> tfplugin5.ClientCapabilities
- 5, // 44: tfplugin5.Configure.Response.diagnostics:type_name -> tfplugin5.Diagnostic
- 4, // 45: tfplugin5.ReadResource.Request.current_state:type_name -> tfplugin5.DynamicValue
- 4, // 46: tfplugin5.ReadResource.Request.provider_meta:type_name -> tfplugin5.DynamicValue
- 12, // 47: tfplugin5.ReadResource.Request.client_capabilities:type_name -> tfplugin5.ClientCapabilities
- 4, // 48: tfplugin5.ReadResource.Response.new_state:type_name -> tfplugin5.DynamicValue
- 5, // 49: tfplugin5.ReadResource.Response.diagnostics:type_name -> tfplugin5.Diagnostic
- 14, // 50: tfplugin5.ReadResource.Response.deferred:type_name -> tfplugin5.Deferred
- 4, // 51: tfplugin5.PlanResourceChange.Request.prior_state:type_name -> tfplugin5.DynamicValue
- 4, // 52: tfplugin5.PlanResourceChange.Request.proposed_new_state:type_name -> tfplugin5.DynamicValue
- 4, // 53: tfplugin5.PlanResourceChange.Request.config:type_name -> tfplugin5.DynamicValue
- 4, // 54: tfplugin5.PlanResourceChange.Request.provider_meta:type_name -> tfplugin5.DynamicValue
- 12, // 55: tfplugin5.PlanResourceChange.Request.client_capabilities:type_name -> tfplugin5.ClientCapabilities
- 4, // 56: tfplugin5.PlanResourceChange.Response.planned_state:type_name -> tfplugin5.DynamicValue
- 7, // 57: tfplugin5.PlanResourceChange.Response.requires_replace:type_name -> tfplugin5.AttributePath
- 5, // 58: tfplugin5.PlanResourceChange.Response.diagnostics:type_name -> tfplugin5.Diagnostic
- 14, // 59: tfplugin5.PlanResourceChange.Response.deferred:type_name -> tfplugin5.Deferred
- 4, // 60: tfplugin5.ApplyResourceChange.Request.prior_state:type_name -> tfplugin5.DynamicValue
- 4, // 61: tfplugin5.ApplyResourceChange.Request.planned_state:type_name -> tfplugin5.DynamicValue
- 4, // 62: tfplugin5.ApplyResourceChange.Request.config:type_name -> tfplugin5.DynamicValue
- 4, // 63: tfplugin5.ApplyResourceChange.Request.provider_meta:type_name -> tfplugin5.DynamicValue
- 4, // 64: tfplugin5.ApplyResourceChange.Response.new_state:type_name -> tfplugin5.DynamicValue
- 5, // 65: tfplugin5.ApplyResourceChange.Response.diagnostics:type_name -> tfplugin5.Diagnostic
- 12, // 66: tfplugin5.ImportResourceState.Request.client_capabilities:type_name -> tfplugin5.ClientCapabilities
- 4, // 67: tfplugin5.ImportResourceState.ImportedResource.state:type_name -> tfplugin5.DynamicValue
- 69, // 68: tfplugin5.ImportResourceState.Response.imported_resources:type_name -> tfplugin5.ImportResourceState.ImportedResource
- 5, // 69: tfplugin5.ImportResourceState.Response.diagnostics:type_name -> tfplugin5.Diagnostic
- 14, // 70: tfplugin5.ImportResourceState.Response.deferred:type_name -> tfplugin5.Deferred
- 9, // 71: tfplugin5.MoveResourceState.Request.source_state:type_name -> tfplugin5.RawState
- 4, // 72: tfplugin5.MoveResourceState.Response.target_state:type_name -> tfplugin5.DynamicValue
- 5, // 73: tfplugin5.MoveResourceState.Response.diagnostics:type_name -> tfplugin5.Diagnostic
- 4, // 74: tfplugin5.ReadDataSource.Request.config:type_name -> tfplugin5.DynamicValue
- 4, // 75: tfplugin5.ReadDataSource.Request.provider_meta:type_name -> tfplugin5.DynamicValue
- 12, // 76: tfplugin5.ReadDataSource.Request.client_capabilities:type_name -> tfplugin5.ClientCapabilities
- 4, // 77: tfplugin5.ReadDataSource.Response.state:type_name -> tfplugin5.DynamicValue
- 5, // 78: tfplugin5.ReadDataSource.Response.diagnostics:type_name -> tfplugin5.Diagnostic
- 14, // 79: tfplugin5.ReadDataSource.Response.deferred:type_name -> tfplugin5.Deferred
- 10, // 80: tfplugin5.GetProvisionerSchema.Response.provisioner:type_name -> tfplugin5.Schema
- 5, // 81: tfplugin5.GetProvisionerSchema.Response.diagnostics:type_name -> tfplugin5.Diagnostic
- 4, // 82: tfplugin5.ValidateProvisionerConfig.Request.config:type_name -> tfplugin5.DynamicValue
- 5, // 83: tfplugin5.ValidateProvisionerConfig.Response.diagnostics:type_name -> tfplugin5.Diagnostic
- 4, // 84: tfplugin5.ProvisionResource.Request.config:type_name -> tfplugin5.DynamicValue
- 4, // 85: tfplugin5.ProvisionResource.Request.connection:type_name -> tfplugin5.DynamicValue
- 5, // 86: tfplugin5.ProvisionResource.Response.diagnostics:type_name -> tfplugin5.Diagnostic
- 83, // 87: tfplugin5.GetFunctions.Response.functions:type_name -> tfplugin5.GetFunctions.Response.FunctionsEntry
- 5, // 88: tfplugin5.GetFunctions.Response.diagnostics:type_name -> tfplugin5.Diagnostic
- 13, // 89: tfplugin5.GetFunctions.Response.FunctionsEntry.value:type_name -> tfplugin5.Function
- 4, // 90: tfplugin5.CallFunction.Request.arguments:type_name -> tfplugin5.DynamicValue
- 4, // 91: tfplugin5.CallFunction.Response.result:type_name -> tfplugin5.DynamicValue
- 6, // 92: tfplugin5.CallFunction.Response.error:type_name -> tfplugin5.FunctionError
- 42, // 93: tfplugin5.Provider.GetMetadata:input_type -> tfplugin5.GetMetadata.Request
- 47, // 94: tfplugin5.Provider.GetSchema:input_type -> tfplugin5.GetProviderSchema.Request
- 52, // 95: tfplugin5.Provider.PrepareProviderConfig:input_type -> tfplugin5.PrepareProviderConfig.Request
- 56, // 96: tfplugin5.Provider.ValidateResourceTypeConfig:input_type -> tfplugin5.ValidateResourceTypeConfig.Request
- 58, // 97: tfplugin5.Provider.ValidateDataSourceConfig:input_type -> tfplugin5.ValidateDataSourceConfig.Request
- 54, // 98: tfplugin5.Provider.UpgradeResourceState:input_type -> tfplugin5.UpgradeResourceState.Request
- 60, // 99: tfplugin5.Provider.Configure:input_type -> tfplugin5.Configure.Request
- 62, // 100: tfplugin5.Provider.ReadResource:input_type -> tfplugin5.ReadResource.Request
- 64, // 101: tfplugin5.Provider.PlanResourceChange:input_type -> tfplugin5.PlanResourceChange.Request
- 66, // 102: tfplugin5.Provider.ApplyResourceChange:input_type -> tfplugin5.ApplyResourceChange.Request
- 68, // 103: tfplugin5.Provider.ImportResourceState:input_type -> tfplugin5.ImportResourceState.Request
- 71, // 104: tfplugin5.Provider.MoveResourceState:input_type -> tfplugin5.MoveResourceState.Request
- 73, // 105: tfplugin5.Provider.ReadDataSource:input_type -> tfplugin5.ReadDataSource.Request
- 81, // 106: tfplugin5.Provider.GetFunctions:input_type -> tfplugin5.GetFunctions.Request
- 84, // 107: tfplugin5.Provider.CallFunction:input_type -> tfplugin5.CallFunction.Request
- 34, // 108: tfplugin5.Provider.Stop:input_type -> tfplugin5.Stop.Request
- 75, // 109: tfplugin5.Provisioner.GetSchema:input_type -> tfplugin5.GetProvisionerSchema.Request
- 77, // 110: tfplugin5.Provisioner.ValidateProvisionerConfig:input_type -> tfplugin5.ValidateProvisionerConfig.Request
- 79, // 111: tfplugin5.Provisioner.ProvisionResource:input_type -> tfplugin5.ProvisionResource.Request
- 34, // 112: tfplugin5.Provisioner.Stop:input_type -> tfplugin5.Stop.Request
- 43, // 113: tfplugin5.Provider.GetMetadata:output_type -> tfplugin5.GetMetadata.Response
- 48, // 114: tfplugin5.Provider.GetSchema:output_type -> tfplugin5.GetProviderSchema.Response
- 53, // 115: tfplugin5.Provider.PrepareProviderConfig:output_type -> tfplugin5.PrepareProviderConfig.Response
- 57, // 116: tfplugin5.Provider.ValidateResourceTypeConfig:output_type -> tfplugin5.ValidateResourceTypeConfig.Response
- 59, // 117: tfplugin5.Provider.ValidateDataSourceConfig:output_type -> tfplugin5.ValidateDataSourceConfig.Response
- 55, // 118: tfplugin5.Provider.UpgradeResourceState:output_type -> tfplugin5.UpgradeResourceState.Response
- 61, // 119: tfplugin5.Provider.Configure:output_type -> tfplugin5.Configure.Response
- 63, // 120: tfplugin5.Provider.ReadResource:output_type -> tfplugin5.ReadResource.Response
- 65, // 121: tfplugin5.Provider.PlanResourceChange:output_type -> tfplugin5.PlanResourceChange.Response
- 67, // 122: tfplugin5.Provider.ApplyResourceChange:output_type -> tfplugin5.ApplyResourceChange.Response
- 70, // 123: tfplugin5.Provider.ImportResourceState:output_type -> tfplugin5.ImportResourceState.Response
- 72, // 124: tfplugin5.Provider.MoveResourceState:output_type -> tfplugin5.MoveResourceState.Response
- 74, // 125: tfplugin5.Provider.ReadDataSource:output_type -> tfplugin5.ReadDataSource.Response
- 82, // 126: tfplugin5.Provider.GetFunctions:output_type -> tfplugin5.GetFunctions.Response
- 85, // 127: tfplugin5.Provider.CallFunction:output_type -> tfplugin5.CallFunction.Response
- 35, // 128: tfplugin5.Provider.Stop:output_type -> tfplugin5.Stop.Response
- 76, // 129: tfplugin5.Provisioner.GetSchema:output_type -> tfplugin5.GetProvisionerSchema.Response
- 78, // 130: tfplugin5.Provisioner.ValidateProvisionerConfig:output_type -> tfplugin5.ValidateProvisionerConfig.Response
- 80, // 131: tfplugin5.Provisioner.ProvisionResource:output_type -> tfplugin5.ProvisionResource.Response
- 35, // 132: tfplugin5.Provisioner.Stop:output_type -> tfplugin5.Stop.Response
- 113, // [113:133] is the sub-list for method output_type
- 93, // [93:113] is the sub-list for method input_type
- 93, // [93:93] is the sub-list for extension type_name
- 93, // [93:93] is the sub-list for extension extendee
- 0, // [0:93] is the sub-list for field type_name
+ 47, // 2: tfplugin5.AttributePath.steps:type_name -> tfplugin5.AttributePath.Step
+ 50, // 3: tfplugin5.RawState.flatmap:type_name -> tfplugin5.RawState.FlatmapEntry
+ 51, // 4: tfplugin5.Schema.block:type_name -> tfplugin5.Schema.Block
+ 54, // 5: tfplugin5.ResourceIdentitySchema.identity_attributes:type_name -> tfplugin5.ResourceIdentitySchema.IdentityAttribute
+ 4, // 6: tfplugin5.ResourceIdentityData.identity_data:type_name -> tfplugin5.DynamicValue
+ 55, // 7: tfplugin5.Function.parameters:type_name -> tfplugin5.Function.Parameter
+ 55, // 8: tfplugin5.Function.variadic_parameter:type_name -> tfplugin5.Function.Parameter
+ 56, // 9: tfplugin5.Function.return:type_name -> tfplugin5.Function.Return
+ 0, // 10: tfplugin5.Function.description_kind:type_name -> tfplugin5.StringKind
+ 10, // 11: tfplugin5.ActionSchema.schema:type_name -> tfplugin5.Schema
+ 3, // 12: tfplugin5.Deferred.reason:type_name -> tfplugin5.Deferred.Reason
+ 52, // 13: tfplugin5.Schema.Block.attributes:type_name -> tfplugin5.Schema.Attribute
+ 53, // 14: tfplugin5.Schema.Block.block_types:type_name -> tfplugin5.Schema.NestedBlock
+ 0, // 15: tfplugin5.Schema.Block.description_kind:type_name -> tfplugin5.StringKind
+ 0, // 16: tfplugin5.Schema.Attribute.description_kind:type_name -> tfplugin5.StringKind
+ 51, // 17: tfplugin5.Schema.NestedBlock.block:type_name -> tfplugin5.Schema.Block
+ 2, // 18: tfplugin5.Schema.NestedBlock.nesting:type_name -> tfplugin5.Schema.NestedBlock.NestingMode
+ 0, // 19: tfplugin5.Function.Parameter.description_kind:type_name -> tfplugin5.StringKind
+ 13, // 20: tfplugin5.GetMetadata.Response.server_capabilities:type_name -> tfplugin5.ServerCapabilities
+ 5, // 21: tfplugin5.GetMetadata.Response.diagnostics:type_name -> tfplugin5.Diagnostic
+ 60, // 22: tfplugin5.GetMetadata.Response.data_sources:type_name -> tfplugin5.GetMetadata.DataSourceMetadata
+ 61, // 23: tfplugin5.GetMetadata.Response.resources:type_name -> tfplugin5.GetMetadata.ResourceMetadata
+ 59, // 24: tfplugin5.GetMetadata.Response.functions:type_name -> tfplugin5.GetMetadata.FunctionMetadata
+ 62, // 25: tfplugin5.GetMetadata.Response.ephemeral_resources:type_name -> tfplugin5.GetMetadata.EphemeralResourceMetadata
+ 63, // 26: tfplugin5.GetMetadata.Response.list_resources:type_name -> tfplugin5.GetMetadata.ListResourceMetadata
+ 64, // 27: tfplugin5.GetMetadata.Response.actions:type_name -> tfplugin5.GetMetadata.ActionMetadata
+ 10, // 28: tfplugin5.GetProviderSchema.Response.provider:type_name -> tfplugin5.Schema
+ 67, // 29: tfplugin5.GetProviderSchema.Response.resource_schemas:type_name -> tfplugin5.GetProviderSchema.Response.ResourceSchemasEntry
+ 68, // 30: tfplugin5.GetProviderSchema.Response.data_source_schemas:type_name -> tfplugin5.GetProviderSchema.Response.DataSourceSchemasEntry
+ 5, // 31: tfplugin5.GetProviderSchema.Response.diagnostics:type_name -> tfplugin5.Diagnostic
+ 10, // 32: tfplugin5.GetProviderSchema.Response.provider_meta:type_name -> tfplugin5.Schema
+ 13, // 33: tfplugin5.GetProviderSchema.Response.server_capabilities:type_name -> tfplugin5.ServerCapabilities
+ 69, // 34: tfplugin5.GetProviderSchema.Response.functions:type_name -> tfplugin5.GetProviderSchema.Response.FunctionsEntry
+ 70, // 35: tfplugin5.GetProviderSchema.Response.ephemeral_resource_schemas:type_name -> tfplugin5.GetProviderSchema.Response.EphemeralResourceSchemasEntry
+ 71, // 36: tfplugin5.GetProviderSchema.Response.list_resource_schemas:type_name -> tfplugin5.GetProviderSchema.Response.ListResourceSchemasEntry
+ 72, // 37: tfplugin5.GetProviderSchema.Response.action_schemas:type_name -> tfplugin5.GetProviderSchema.Response.ActionSchemasEntry
+ 10, // 38: tfplugin5.GetProviderSchema.Response.ResourceSchemasEntry.value:type_name -> tfplugin5.Schema
+ 10, // 39: tfplugin5.GetProviderSchema.Response.DataSourceSchemasEntry.value:type_name -> tfplugin5.Schema
+ 15, // 40: tfplugin5.GetProviderSchema.Response.FunctionsEntry.value:type_name -> tfplugin5.Function
+ 10, // 41: tfplugin5.GetProviderSchema.Response.EphemeralResourceSchemasEntry.value:type_name -> tfplugin5.Schema
+ 10, // 42: tfplugin5.GetProviderSchema.Response.ListResourceSchemasEntry.value:type_name -> tfplugin5.Schema
+ 16, // 43: tfplugin5.GetProviderSchema.Response.ActionSchemasEntry.value:type_name -> tfplugin5.ActionSchema
+ 4, // 44: tfplugin5.PrepareProviderConfig.Request.config:type_name -> tfplugin5.DynamicValue
+ 4, // 45: tfplugin5.PrepareProviderConfig.Response.prepared_config:type_name -> tfplugin5.DynamicValue
+ 5, // 46: tfplugin5.PrepareProviderConfig.Response.diagnostics:type_name -> tfplugin5.Diagnostic
+ 9, // 47: tfplugin5.UpgradeResourceState.Request.raw_state:type_name -> tfplugin5.RawState
+ 4, // 48: tfplugin5.UpgradeResourceState.Response.upgraded_state:type_name -> tfplugin5.DynamicValue
+ 5, // 49: tfplugin5.UpgradeResourceState.Response.diagnostics:type_name -> tfplugin5.Diagnostic
+ 4, // 50: tfplugin5.ValidateResourceTypeConfig.Request.config:type_name -> tfplugin5.DynamicValue
+ 14, // 51: tfplugin5.ValidateResourceTypeConfig.Request.client_capabilities:type_name -> tfplugin5.ClientCapabilities
+ 5, // 52: tfplugin5.ValidateResourceTypeConfig.Response.diagnostics:type_name -> tfplugin5.Diagnostic
+ 4, // 53: tfplugin5.ValidateDataSourceConfig.Request.config:type_name -> tfplugin5.DynamicValue
+ 5, // 54: tfplugin5.ValidateDataSourceConfig.Response.diagnostics:type_name -> tfplugin5.Diagnostic
+ 4, // 55: tfplugin5.Configure.Request.config:type_name -> tfplugin5.DynamicValue
+ 14, // 56: tfplugin5.Configure.Request.client_capabilities:type_name -> tfplugin5.ClientCapabilities
+ 5, // 57: tfplugin5.Configure.Response.diagnostics:type_name -> tfplugin5.Diagnostic
+ 4, // 58: tfplugin5.ReadResource.Request.current_state:type_name -> tfplugin5.DynamicValue
+ 4, // 59: tfplugin5.ReadResource.Request.provider_meta:type_name -> tfplugin5.DynamicValue
+ 14, // 60: tfplugin5.ReadResource.Request.client_capabilities:type_name -> tfplugin5.ClientCapabilities
+ 12, // 61: tfplugin5.ReadResource.Request.current_identity:type_name -> tfplugin5.ResourceIdentityData
+ 4, // 62: tfplugin5.ReadResource.Response.new_state:type_name -> tfplugin5.DynamicValue
+ 5, // 63: tfplugin5.ReadResource.Response.diagnostics:type_name -> tfplugin5.Diagnostic
+ 17, // 64: tfplugin5.ReadResource.Response.deferred:type_name -> tfplugin5.Deferred
+ 12, // 65: tfplugin5.ReadResource.Response.new_identity:type_name -> tfplugin5.ResourceIdentityData
+ 4, // 66: tfplugin5.PlanResourceChange.Request.prior_state:type_name -> tfplugin5.DynamicValue
+ 4, // 67: tfplugin5.PlanResourceChange.Request.proposed_new_state:type_name -> tfplugin5.DynamicValue
+ 4, // 68: tfplugin5.PlanResourceChange.Request.config:type_name -> tfplugin5.DynamicValue
+ 4, // 69: tfplugin5.PlanResourceChange.Request.provider_meta:type_name -> tfplugin5.DynamicValue
+ 14, // 70: tfplugin5.PlanResourceChange.Request.client_capabilities:type_name -> tfplugin5.ClientCapabilities
+ 12, // 71: tfplugin5.PlanResourceChange.Request.prior_identity:type_name -> tfplugin5.ResourceIdentityData
+ 4, // 72: tfplugin5.PlanResourceChange.Response.planned_state:type_name -> tfplugin5.DynamicValue
+ 7, // 73: tfplugin5.PlanResourceChange.Response.requires_replace:type_name -> tfplugin5.AttributePath
+ 5, // 74: tfplugin5.PlanResourceChange.Response.diagnostics:type_name -> tfplugin5.Diagnostic
+ 17, // 75: tfplugin5.PlanResourceChange.Response.deferred:type_name -> tfplugin5.Deferred
+ 12, // 76: tfplugin5.PlanResourceChange.Response.planned_identity:type_name -> tfplugin5.ResourceIdentityData
+ 4, // 77: tfplugin5.ApplyResourceChange.Request.prior_state:type_name -> tfplugin5.DynamicValue
+ 4, // 78: tfplugin5.ApplyResourceChange.Request.planned_state:type_name -> tfplugin5.DynamicValue
+ 4, // 79: tfplugin5.ApplyResourceChange.Request.config:type_name -> tfplugin5.DynamicValue
+ 4, // 80: tfplugin5.ApplyResourceChange.Request.provider_meta:type_name -> tfplugin5.DynamicValue
+ 12, // 81: tfplugin5.ApplyResourceChange.Request.planned_identity:type_name -> tfplugin5.ResourceIdentityData
+ 4, // 82: tfplugin5.ApplyResourceChange.Response.new_state:type_name -> tfplugin5.DynamicValue
+ 5, // 83: tfplugin5.ApplyResourceChange.Response.diagnostics:type_name -> tfplugin5.Diagnostic
+ 12, // 84: tfplugin5.ApplyResourceChange.Response.new_identity:type_name -> tfplugin5.ResourceIdentityData
+ 14, // 85: tfplugin5.ImportResourceState.Request.client_capabilities:type_name -> tfplugin5.ClientCapabilities
+ 12, // 86: tfplugin5.ImportResourceState.Request.identity:type_name -> tfplugin5.ResourceIdentityData
+ 4, // 87: tfplugin5.ImportResourceState.ImportedResource.state:type_name -> tfplugin5.DynamicValue
+ 12, // 88: tfplugin5.ImportResourceState.ImportedResource.identity:type_name -> tfplugin5.ResourceIdentityData
+ 90, // 89: tfplugin5.ImportResourceState.Response.imported_resources:type_name -> tfplugin5.ImportResourceState.ImportedResource
+ 5, // 90: tfplugin5.ImportResourceState.Response.diagnostics:type_name -> tfplugin5.Diagnostic
+ 17, // 91: tfplugin5.ImportResourceState.Response.deferred:type_name -> tfplugin5.Deferred
+ 9, // 92: tfplugin5.MoveResourceState.Request.source_state:type_name -> tfplugin5.RawState
+ 9, // 93: tfplugin5.MoveResourceState.Request.source_identity:type_name -> tfplugin5.RawState
+ 4, // 94: tfplugin5.MoveResourceState.Response.target_state:type_name -> tfplugin5.DynamicValue
+ 5, // 95: tfplugin5.MoveResourceState.Response.diagnostics:type_name -> tfplugin5.Diagnostic
+ 12, // 96: tfplugin5.MoveResourceState.Response.target_identity:type_name -> tfplugin5.ResourceIdentityData
+ 4, // 97: tfplugin5.ReadDataSource.Request.config:type_name -> tfplugin5.DynamicValue
+ 4, // 98: tfplugin5.ReadDataSource.Request.provider_meta:type_name -> tfplugin5.DynamicValue
+ 14, // 99: tfplugin5.ReadDataSource.Request.client_capabilities:type_name -> tfplugin5.ClientCapabilities
+ 4, // 100: tfplugin5.ReadDataSource.Response.state:type_name -> tfplugin5.DynamicValue
+ 5, // 101: tfplugin5.ReadDataSource.Response.diagnostics:type_name -> tfplugin5.Diagnostic
+ 17, // 102: tfplugin5.ReadDataSource.Response.deferred:type_name -> tfplugin5.Deferred
+ 10, // 103: tfplugin5.GetProvisionerSchema.Response.provisioner:type_name -> tfplugin5.Schema
+ 5, // 104: tfplugin5.GetProvisionerSchema.Response.diagnostics:type_name -> tfplugin5.Diagnostic
+ 4, // 105: tfplugin5.ValidateProvisionerConfig.Request.config:type_name -> tfplugin5.DynamicValue
+ 5, // 106: tfplugin5.ValidateProvisionerConfig.Response.diagnostics:type_name -> tfplugin5.Diagnostic
+ 4, // 107: tfplugin5.ProvisionResource.Request.config:type_name -> tfplugin5.DynamicValue
+ 4, // 108: tfplugin5.ProvisionResource.Request.connection:type_name -> tfplugin5.DynamicValue
+ 5, // 109: tfplugin5.ProvisionResource.Response.diagnostics:type_name -> tfplugin5.Diagnostic
+ 104, // 110: tfplugin5.GetFunctions.Response.functions:type_name -> tfplugin5.GetFunctions.Response.FunctionsEntry
+ 5, // 111: tfplugin5.GetFunctions.Response.diagnostics:type_name -> tfplugin5.Diagnostic
+ 15, // 112: tfplugin5.GetFunctions.Response.FunctionsEntry.value:type_name -> tfplugin5.Function
+ 4, // 113: tfplugin5.CallFunction.Request.arguments:type_name -> tfplugin5.DynamicValue
+ 4, // 114: tfplugin5.CallFunction.Response.result:type_name -> tfplugin5.DynamicValue
+ 6, // 115: tfplugin5.CallFunction.Response.error:type_name -> tfplugin5.FunctionError
+ 4, // 116: tfplugin5.ValidateEphemeralResourceConfig.Request.config:type_name -> tfplugin5.DynamicValue
+ 5, // 117: tfplugin5.ValidateEphemeralResourceConfig.Response.diagnostics:type_name -> tfplugin5.Diagnostic
+ 4, // 118: tfplugin5.OpenEphemeralResource.Request.config:type_name -> tfplugin5.DynamicValue
+ 14, // 119: tfplugin5.OpenEphemeralResource.Request.client_capabilities:type_name -> tfplugin5.ClientCapabilities
+ 5, // 120: tfplugin5.OpenEphemeralResource.Response.diagnostics:type_name -> tfplugin5.Diagnostic
+ 132, // 121: tfplugin5.OpenEphemeralResource.Response.renew_at:type_name -> google.protobuf.Timestamp
+ 4, // 122: tfplugin5.OpenEphemeralResource.Response.result:type_name -> tfplugin5.DynamicValue
+ 17, // 123: tfplugin5.OpenEphemeralResource.Response.deferred:type_name -> tfplugin5.Deferred
+ 5, // 124: tfplugin5.RenewEphemeralResource.Response.diagnostics:type_name -> tfplugin5.Diagnostic
+ 132, // 125: tfplugin5.RenewEphemeralResource.Response.renew_at:type_name -> google.protobuf.Timestamp
+ 5, // 126: tfplugin5.CloseEphemeralResource.Response.diagnostics:type_name -> tfplugin5.Diagnostic
+ 117, // 127: tfplugin5.GetResourceIdentitySchemas.Response.identity_schemas:type_name -> tfplugin5.GetResourceIdentitySchemas.Response.IdentitySchemasEntry
+ 5, // 128: tfplugin5.GetResourceIdentitySchemas.Response.diagnostics:type_name -> tfplugin5.Diagnostic
+ 11, // 129: tfplugin5.GetResourceIdentitySchemas.Response.IdentitySchemasEntry.value:type_name -> tfplugin5.ResourceIdentitySchema
+ 9, // 130: tfplugin5.UpgradeResourceIdentity.Request.raw_identity:type_name -> tfplugin5.RawState
+ 12, // 131: tfplugin5.UpgradeResourceIdentity.Response.upgraded_identity:type_name -> tfplugin5.ResourceIdentityData
+ 5, // 132: tfplugin5.UpgradeResourceIdentity.Response.diagnostics:type_name -> tfplugin5.Diagnostic
+ 4, // 133: tfplugin5.ListResource.Request.config:type_name -> tfplugin5.DynamicValue
+ 12, // 134: tfplugin5.ListResource.Event.identity:type_name -> tfplugin5.ResourceIdentityData
+ 4, // 135: tfplugin5.ListResource.Event.resource_object:type_name -> tfplugin5.DynamicValue
+ 5, // 136: tfplugin5.ListResource.Event.diagnostic:type_name -> tfplugin5.Diagnostic
+ 4, // 137: tfplugin5.ValidateListResourceConfig.Request.config:type_name -> tfplugin5.DynamicValue
+ 4, // 138: tfplugin5.ValidateListResourceConfig.Request.include_resource_object:type_name -> tfplugin5.DynamicValue
+ 4, // 139: tfplugin5.ValidateListResourceConfig.Request.limit:type_name -> tfplugin5.DynamicValue
+ 5, // 140: tfplugin5.ValidateListResourceConfig.Response.diagnostics:type_name -> tfplugin5.Diagnostic
+ 4, // 141: tfplugin5.ValidateActionConfig.Request.config:type_name -> tfplugin5.DynamicValue
+ 5, // 142: tfplugin5.ValidateActionConfig.Response.diagnostics:type_name -> tfplugin5.Diagnostic
+ 4, // 143: tfplugin5.PlanAction.Request.config:type_name -> tfplugin5.DynamicValue
+ 14, // 144: tfplugin5.PlanAction.Request.client_capabilities:type_name -> tfplugin5.ClientCapabilities
+ 5, // 145: tfplugin5.PlanAction.Response.diagnostics:type_name -> tfplugin5.Diagnostic
+ 17, // 146: tfplugin5.PlanAction.Response.deferred:type_name -> tfplugin5.Deferred
+ 4, // 147: tfplugin5.InvokeAction.Request.config:type_name -> tfplugin5.DynamicValue
+ 14, // 148: tfplugin5.InvokeAction.Request.client_capabilities:type_name -> tfplugin5.ClientCapabilities
+ 130, // 149: tfplugin5.InvokeAction.Event.progress:type_name -> tfplugin5.InvokeAction.Event.Progress
+ 131, // 150: tfplugin5.InvokeAction.Event.completed:type_name -> tfplugin5.InvokeAction.Event.Completed
+ 5, // 151: tfplugin5.InvokeAction.Event.Completed.diagnostics:type_name -> tfplugin5.Diagnostic
+ 57, // 152: tfplugin5.Provider.GetMetadata:input_type -> tfplugin5.GetMetadata.Request
+ 65, // 153: tfplugin5.Provider.GetSchema:input_type -> tfplugin5.GetProviderSchema.Request
+ 115, // 154: tfplugin5.Provider.GetResourceIdentitySchemas:input_type -> tfplugin5.GetResourceIdentitySchemas.Request
+ 73, // 155: tfplugin5.Provider.PrepareProviderConfig:input_type -> tfplugin5.PrepareProviderConfig.Request
+ 77, // 156: tfplugin5.Provider.ValidateResourceTypeConfig:input_type -> tfplugin5.ValidateResourceTypeConfig.Request
+ 79, // 157: tfplugin5.Provider.ValidateDataSourceConfig:input_type -> tfplugin5.ValidateDataSourceConfig.Request
+ 75, // 158: tfplugin5.Provider.UpgradeResourceState:input_type -> tfplugin5.UpgradeResourceState.Request
+ 118, // 159: tfplugin5.Provider.UpgradeResourceIdentity:input_type -> tfplugin5.UpgradeResourceIdentity.Request
+ 81, // 160: tfplugin5.Provider.Configure:input_type -> tfplugin5.Configure.Request
+ 83, // 161: tfplugin5.Provider.ReadResource:input_type -> tfplugin5.ReadResource.Request
+ 85, // 162: tfplugin5.Provider.PlanResourceChange:input_type -> tfplugin5.PlanResourceChange.Request
+ 87, // 163: tfplugin5.Provider.ApplyResourceChange:input_type -> tfplugin5.ApplyResourceChange.Request
+ 89, // 164: tfplugin5.Provider.ImportResourceState:input_type -> tfplugin5.ImportResourceState.Request
+ 92, // 165: tfplugin5.Provider.MoveResourceState:input_type -> tfplugin5.MoveResourceState.Request
+ 94, // 166: tfplugin5.Provider.ReadDataSource:input_type -> tfplugin5.ReadDataSource.Request
+ 107, // 167: tfplugin5.Provider.ValidateEphemeralResourceConfig:input_type -> tfplugin5.ValidateEphemeralResourceConfig.Request
+ 109, // 168: tfplugin5.Provider.OpenEphemeralResource:input_type -> tfplugin5.OpenEphemeralResource.Request
+ 111, // 169: tfplugin5.Provider.RenewEphemeralResource:input_type -> tfplugin5.RenewEphemeralResource.Request
+ 113, // 170: tfplugin5.Provider.CloseEphemeralResource:input_type -> tfplugin5.CloseEphemeralResource.Request
+ 120, // 171: tfplugin5.Provider.ListResource:input_type -> tfplugin5.ListResource.Request
+ 122, // 172: tfplugin5.Provider.ValidateListResourceConfig:input_type -> tfplugin5.ValidateListResourceConfig.Request
+ 102, // 173: tfplugin5.Provider.GetFunctions:input_type -> tfplugin5.GetFunctions.Request
+ 105, // 174: tfplugin5.Provider.CallFunction:input_type -> tfplugin5.CallFunction.Request
+ 124, // 175: tfplugin5.Provider.ValidateActionConfig:input_type -> tfplugin5.ValidateActionConfig.Request
+ 126, // 176: tfplugin5.Provider.PlanAction:input_type -> tfplugin5.PlanAction.Request
+ 128, // 177: tfplugin5.Provider.InvokeAction:input_type -> tfplugin5.InvokeAction.Request
+ 48, // 178: tfplugin5.Provider.Stop:input_type -> tfplugin5.Stop.Request
+ 96, // 179: tfplugin5.Provisioner.GetSchema:input_type -> tfplugin5.GetProvisionerSchema.Request
+ 98, // 180: tfplugin5.Provisioner.ValidateProvisionerConfig:input_type -> tfplugin5.ValidateProvisionerConfig.Request
+ 100, // 181: tfplugin5.Provisioner.ProvisionResource:input_type -> tfplugin5.ProvisionResource.Request
+ 48, // 182: tfplugin5.Provisioner.Stop:input_type -> tfplugin5.Stop.Request
+ 58, // 183: tfplugin5.Provider.GetMetadata:output_type -> tfplugin5.GetMetadata.Response
+ 66, // 184: tfplugin5.Provider.GetSchema:output_type -> tfplugin5.GetProviderSchema.Response
+ 116, // 185: tfplugin5.Provider.GetResourceIdentitySchemas:output_type -> tfplugin5.GetResourceIdentitySchemas.Response
+ 74, // 186: tfplugin5.Provider.PrepareProviderConfig:output_type -> tfplugin5.PrepareProviderConfig.Response
+ 78, // 187: tfplugin5.Provider.ValidateResourceTypeConfig:output_type -> tfplugin5.ValidateResourceTypeConfig.Response
+ 80, // 188: tfplugin5.Provider.ValidateDataSourceConfig:output_type -> tfplugin5.ValidateDataSourceConfig.Response
+ 76, // 189: tfplugin5.Provider.UpgradeResourceState:output_type -> tfplugin5.UpgradeResourceState.Response
+ 119, // 190: tfplugin5.Provider.UpgradeResourceIdentity:output_type -> tfplugin5.UpgradeResourceIdentity.Response
+ 82, // 191: tfplugin5.Provider.Configure:output_type -> tfplugin5.Configure.Response
+ 84, // 192: tfplugin5.Provider.ReadResource:output_type -> tfplugin5.ReadResource.Response
+ 86, // 193: tfplugin5.Provider.PlanResourceChange:output_type -> tfplugin5.PlanResourceChange.Response
+ 88, // 194: tfplugin5.Provider.ApplyResourceChange:output_type -> tfplugin5.ApplyResourceChange.Response
+ 91, // 195: tfplugin5.Provider.ImportResourceState:output_type -> tfplugin5.ImportResourceState.Response
+ 93, // 196: tfplugin5.Provider.MoveResourceState:output_type -> tfplugin5.MoveResourceState.Response
+ 95, // 197: tfplugin5.Provider.ReadDataSource:output_type -> tfplugin5.ReadDataSource.Response
+ 108, // 198: tfplugin5.Provider.ValidateEphemeralResourceConfig:output_type -> tfplugin5.ValidateEphemeralResourceConfig.Response
+ 110, // 199: tfplugin5.Provider.OpenEphemeralResource:output_type -> tfplugin5.OpenEphemeralResource.Response
+ 112, // 200: tfplugin5.Provider.RenewEphemeralResource:output_type -> tfplugin5.RenewEphemeralResource.Response
+ 114, // 201: tfplugin5.Provider.CloseEphemeralResource:output_type -> tfplugin5.CloseEphemeralResource.Response
+ 121, // 202: tfplugin5.Provider.ListResource:output_type -> tfplugin5.ListResource.Event
+ 123, // 203: tfplugin5.Provider.ValidateListResourceConfig:output_type -> tfplugin5.ValidateListResourceConfig.Response
+ 103, // 204: tfplugin5.Provider.GetFunctions:output_type -> tfplugin5.GetFunctions.Response
+ 106, // 205: tfplugin5.Provider.CallFunction:output_type -> tfplugin5.CallFunction.Response
+ 125, // 206: tfplugin5.Provider.ValidateActionConfig:output_type -> tfplugin5.ValidateActionConfig.Response
+ 127, // 207: tfplugin5.Provider.PlanAction:output_type -> tfplugin5.PlanAction.Response
+ 129, // 208: tfplugin5.Provider.InvokeAction:output_type -> tfplugin5.InvokeAction.Event
+ 49, // 209: tfplugin5.Provider.Stop:output_type -> tfplugin5.Stop.Response
+ 97, // 210: tfplugin5.Provisioner.GetSchema:output_type -> tfplugin5.GetProvisionerSchema.Response
+ 99, // 211: tfplugin5.Provisioner.ValidateProvisionerConfig:output_type -> tfplugin5.ValidateProvisionerConfig.Response
+ 101, // 212: tfplugin5.Provisioner.ProvisionResource:output_type -> tfplugin5.ProvisionResource.Response
+ 49, // 213: tfplugin5.Provisioner.Stop:output_type -> tfplugin5.Stop.Response
+ 183, // [183:214] is the sub-list for method output_type
+ 152, // [152:183] is the sub-list for method input_type
+ 152, // [152:152] is the sub-list for extension type_name
+ 152, // [152:152] is the sub-list for extension extendee
+ 0, // [0:152] is the sub-list for field type_name
}
func init() { file_tfplugin5_proto_init() }
@@ -5665,945 +7653,28 @@ func file_tfplugin5_proto_init() {
if File_tfplugin5_proto != nil {
return
}
- if !protoimpl.UnsafeEnabled {
- file_tfplugin5_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*DynamicValue); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin5_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*Diagnostic); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin5_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*FunctionError); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin5_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*AttributePath); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin5_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*Stop); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin5_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*RawState); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin5_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*Schema); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin5_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ServerCapabilities); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin5_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ClientCapabilities); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin5_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*Function); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin5_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*Deferred); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin5_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetMetadata); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin5_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetProviderSchema); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin5_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*PrepareProviderConfig); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin5_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*UpgradeResourceState); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin5_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ValidateResourceTypeConfig); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin5_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ValidateDataSourceConfig); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin5_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*Configure); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin5_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ReadResource); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin5_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*PlanResourceChange); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin5_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ApplyResourceChange); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin5_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ImportResourceState); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin5_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*MoveResourceState); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin5_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ReadDataSource); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin5_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetProvisionerSchema); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin5_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ValidateProvisionerConfig); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin5_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ProvisionResource); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin5_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetFunctions); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin5_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*CallFunction); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin5_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*AttributePath_Step); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin5_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*Stop_Request); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin5_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*Stop_Response); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin5_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*Schema_Block); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin5_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*Schema_Attribute); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin5_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*Schema_NestedBlock); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin5_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*Function_Parameter); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin5_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*Function_Return); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin5_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetMetadata_Request); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin5_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetMetadata_Response); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin5_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetMetadata_FunctionMetadata); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin5_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetMetadata_DataSourceMetadata); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin5_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetMetadata_ResourceMetadata); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin5_proto_msgTypes[43].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetProviderSchema_Request); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin5_proto_msgTypes[44].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetProviderSchema_Response); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin5_proto_msgTypes[48].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*PrepareProviderConfig_Request); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin5_proto_msgTypes[49].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*PrepareProviderConfig_Response); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin5_proto_msgTypes[50].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*UpgradeResourceState_Request); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin5_proto_msgTypes[51].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*UpgradeResourceState_Response); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin5_proto_msgTypes[52].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ValidateResourceTypeConfig_Request); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin5_proto_msgTypes[53].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ValidateResourceTypeConfig_Response); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin5_proto_msgTypes[54].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ValidateDataSourceConfig_Request); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin5_proto_msgTypes[55].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ValidateDataSourceConfig_Response); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin5_proto_msgTypes[56].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*Configure_Request); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin5_proto_msgTypes[57].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*Configure_Response); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin5_proto_msgTypes[58].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ReadResource_Request); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin5_proto_msgTypes[59].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ReadResource_Response); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin5_proto_msgTypes[60].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*PlanResourceChange_Request); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin5_proto_msgTypes[61].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*PlanResourceChange_Response); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin5_proto_msgTypes[62].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ApplyResourceChange_Request); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin5_proto_msgTypes[63].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ApplyResourceChange_Response); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin5_proto_msgTypes[64].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ImportResourceState_Request); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin5_proto_msgTypes[65].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ImportResourceState_ImportedResource); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin5_proto_msgTypes[66].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ImportResourceState_Response); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin5_proto_msgTypes[67].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*MoveResourceState_Request); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin5_proto_msgTypes[68].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*MoveResourceState_Response); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin5_proto_msgTypes[69].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ReadDataSource_Request); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin5_proto_msgTypes[70].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ReadDataSource_Response); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin5_proto_msgTypes[71].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetProvisionerSchema_Request); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin5_proto_msgTypes[72].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetProvisionerSchema_Response); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin5_proto_msgTypes[73].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ValidateProvisionerConfig_Request); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin5_proto_msgTypes[74].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ValidateProvisionerConfig_Response); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin5_proto_msgTypes[75].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ProvisionResource_Request); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin5_proto_msgTypes[76].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ProvisionResource_Response); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin5_proto_msgTypes[77].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetFunctions_Request); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin5_proto_msgTypes[78].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetFunctions_Response); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin5_proto_msgTypes[80].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*CallFunction_Request); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin5_proto_msgTypes[81].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*CallFunction_Response); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- }
- file_tfplugin5_proto_msgTypes[2].OneofWrappers = []interface{}{}
- file_tfplugin5_proto_msgTypes[29].OneofWrappers = []interface{}{
+ file_tfplugin5_proto_msgTypes[2].OneofWrappers = []any{}
+ file_tfplugin5_proto_msgTypes[43].OneofWrappers = []any{
(*AttributePath_Step_AttributeName)(nil),
(*AttributePath_Step_ElementKeyString)(nil),
(*AttributePath_Step_ElementKeyInt)(nil),
}
+ file_tfplugin5_proto_msgTypes[106].OneofWrappers = []any{}
+ file_tfplugin5_proto_msgTypes[107].OneofWrappers = []any{}
+ file_tfplugin5_proto_msgTypes[108].OneofWrappers = []any{}
+ file_tfplugin5_proto_msgTypes[109].OneofWrappers = []any{}
+ file_tfplugin5_proto_msgTypes[117].OneofWrappers = []any{}
+ file_tfplugin5_proto_msgTypes[125].OneofWrappers = []any{
+ (*InvokeAction_Event_Progress_)(nil),
+ (*InvokeAction_Event_Completed_)(nil),
+ }
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
- RawDescriptor: file_tfplugin5_proto_rawDesc,
+ RawDescriptor: unsafe.Slice(unsafe.StringData(file_tfplugin5_proto_rawDesc), len(file_tfplugin5_proto_rawDesc)),
NumEnums: 4,
- NumMessages: 82,
+ NumMessages: 128,
NumExtensions: 0,
NumServices: 2,
},
@@ -6613,7 +7684,6 @@ func file_tfplugin5_proto_init() {
MessageInfos: file_tfplugin5_proto_msgTypes,
}.Build()
File_tfplugin5_proto = out.File
- file_tfplugin5_proto_rawDesc = nil
file_tfplugin5_proto_goTypes = nil
file_tfplugin5_proto_depIdxs = nil
}
diff --git a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5/tfplugin5.proto b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5/tfplugin5.proto
index 3c2fa84aca..6dd90cdbeb 100644
--- a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5/tfplugin5.proto
+++ b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5/tfplugin5.proto
@@ -1,9 +1,9 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
-// Terraform Plugin RPC protocol version 5.6
+// Terraform Plugin RPC protocol version 5.10
//
-// This file defines version 5.6 of the RPC protocol. To implement a plugin
+// This file defines version 5.10 of the RPC protocol. To implement a plugin
// against this protocol, copy this definition into your own codebase and
// use protoc to generate stubs for your target language.
//
@@ -22,6 +22,8 @@
syntax = "proto3";
option go_package = "github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5";
+import "google/protobuf/timestamp.proto";
+
package tfplugin5;
// DynamicValue is an opaque encoding of terraform data, with the field name
@@ -107,6 +109,11 @@ message Schema {
bool sensitive = 7;
StringKind description_kind = 8;
bool deprecated = 9;
+ // write_only indicates that the attribute value will be provided via
+ // configuration and must be omitted from state. write_only must be
+ // combined with optional or required, and is only valid for managed
+ // resource schemas.
+ bool write_only = 10;
}
message NestedBlock {
@@ -135,6 +142,64 @@ message Schema {
Block block = 2;
}
+// ResourceIdentitySchema represents the structure and types of data used to identify
+// a managed resource type. Effectively, resource identity is a versioned object
+// that can be used to compare resources, whether already managed and/or being
+// discovered.
+message ResourceIdentitySchema {
+ // IdentityAttribute represents one value of data within resource identity.
+ // These are always used in resource identity comparisons.
+ message IdentityAttribute {
+ // name is the identity attribute name
+ string name = 1;
+
+ // type is the identity attribute type
+ bytes type = 2;
+
+ // required_for_import when enabled signifies that this attribute must be
+ // defined for ImportResourceState to complete successfully
+ bool required_for_import = 3;
+
+ // optional_for_import when enabled signifies that this attribute is not
+ // required for ImportResourceState, because it can be supplied by the
+ // provider. It is still possible to supply this attribute during import.
+ bool optional_for_import = 4;
+
+ // description is a human-readable description of the attribute in Markdown
+ string description = 5;
+ }
+
+ // version is the identity version and separate from the Schema version.
+ // Any time the structure or format of identity_attributes changes, this version
+ // should be incremented. Versioning implicitly starts at 0 and by convention
+ // should be incremented by 1 each change.
+ //
+ // When comparing identity_attributes data, differing versions should always be treated
+ // as inequal.
+ int64 version = 1;
+
+ // identity_attributes are the individual value definitions which define identity data
+ // for a managed resource type. This information is used to decode DynamicValue of
+ // identity data.
+ //
+ // These attributes are intended for permanent identity data and must be wholly
+ // representative of all data necessary to compare two managed resource instances
+ // with no other data. This generally should include account, endpoint, location,
+ // and automatically generated identifiers. For some resources, this may include
+ // configuration-based data, such as a required name which must be unique.
+ repeated IdentityAttribute identity_attributes = 2;
+}
+
+// ResourceIdentityData is a separate message for better extensibility
+message ResourceIdentityData {
+ // identity_data is the resource identity data for the given definition. It should
+ // be decoded using the identity schema.
+ //
+ // This data is considered permanent for the identity version and suitable for
+ // longer-term storage.
+ DynamicValue identity_data = 1;
+}
+
// ServerCapabilities allows providers to communicate extra information
// regarding supported protocol features. This is used to indicate
// availability of certain forward-compatible changes which may be optional
@@ -163,6 +228,9 @@ message ClientCapabilities {
// The deferral_allowed capability signals that the client is able to
// handle deferred responses from the provider.
bool deferral_allowed = 1;
+ // The write_only_attributes_allowed capability signals that the client
+ // is able to handle write_only attributes for managed resources.
+ bool write_only_attributes_allowed = 2;
}
message Function {
@@ -221,6 +289,10 @@ message Function {
}
}
+message ActionSchema {
+ Schema schema = 1; // of the action itself
+}
+
// Deferred is a message that indicates that change is deferred for a reason.
message Deferred {
// Reason is the reason for deferring the change.
@@ -253,10 +325,16 @@ service Provider {
// GetSchema returns schema information for the provider, data resources,
// and managed resources.
rpc GetSchema(GetProviderSchema.Request) returns (GetProviderSchema.Response);
+ // GetResourceIdentitySchemas returns the identity schemas for all managed
+ // resources.
+ rpc GetResourceIdentitySchemas(GetResourceIdentitySchemas.Request) returns (GetResourceIdentitySchemas.Response);
rpc PrepareProviderConfig(PrepareProviderConfig.Request) returns (PrepareProviderConfig.Response);
rpc ValidateResourceTypeConfig(ValidateResourceTypeConfig.Request) returns (ValidateResourceTypeConfig.Response);
rpc ValidateDataSourceConfig(ValidateDataSourceConfig.Request) returns (ValidateDataSourceConfig.Response);
rpc UpgradeResourceState(UpgradeResourceState.Request) returns (UpgradeResourceState.Response);
+ // UpgradeResourceIdentityData should return the upgraded resource identity
+ // data for a managed resource type.
+ rpc UpgradeResourceIdentity(UpgradeResourceIdentity.Request) returns (UpgradeResourceIdentity.Response);
//////// One-time initialization, called before other functions below
rpc Configure(Configure.Request) returns (Configure.Response);
@@ -269,6 +347,16 @@ service Provider {
rpc MoveResourceState(MoveResourceState.Request) returns (MoveResourceState.Response);
rpc ReadDataSource(ReadDataSource.Request) returns (ReadDataSource.Response);
+ //////// Ephemeral Resource Lifecycle
+ rpc ValidateEphemeralResourceConfig(ValidateEphemeralResourceConfig.Request) returns (ValidateEphemeralResourceConfig.Response);
+ rpc OpenEphemeralResource(OpenEphemeralResource.Request) returns (OpenEphemeralResource.Response);
+ rpc RenewEphemeralResource(RenewEphemeralResource.Request) returns (RenewEphemeralResource.Response);
+ rpc CloseEphemeralResource(CloseEphemeralResource.Request) returns (CloseEphemeralResource.Response);
+
+ /////// List
+ rpc ListResource(ListResource.Request) returns (stream ListResource.Event);
+ rpc ValidateListResourceConfig(ValidateListResourceConfig.Request) returns (ValidateListResourceConfig.Response);
+
// Functions
// GetFunctions returns the definitions of all functions.
@@ -278,6 +366,11 @@ service Provider {
// the result with any diagnostics.
rpc CallFunction(CallFunction.Request) returns (CallFunction.Response);
+ //////// Actions Lifecycle
+ rpc ValidateActionConfig(ValidateActionConfig.Request) returns (ValidateActionConfig.Response);
+ rpc PlanAction(PlanAction.Request) returns (PlanAction.Response);
+ rpc InvokeAction(InvokeAction.Request) returns (stream InvokeAction.Event);
+
//////// Graceful Shutdown
rpc Stop(Stop.Request) returns (Stop.Response);
}
@@ -294,6 +387,10 @@ message GetMetadata {
// functions returns metadata for any functions.
repeated FunctionMetadata functions = 5;
+ repeated EphemeralResourceMetadata ephemeral_resources = 6;
+ repeated ListResourceMetadata list_resources = 7;
+ reserved 8; // Field number 8 is reserved for state stores, which are protocol v6 only.
+ repeated ActionMetadata actions = 9;
}
message FunctionMetadata {
@@ -308,6 +405,18 @@ message GetMetadata {
message ResourceMetadata {
string type_name = 1;
}
+
+ message EphemeralResourceMetadata {
+ string type_name = 1;
+ }
+
+ message ListResourceMetadata {
+ string type_name = 1;
+ }
+
+ message ActionMetadata {
+ string type_name = 1;
+ }
}
message GetProviderSchema {
@@ -323,6 +432,10 @@ message GetProviderSchema {
// functions is a mapping of function names to definitions.
map functions = 7;
+ map ephemeral_resource_schemas = 8;
+ map list_resource_schemas = 9;
+ reserved 10; // Field number 10 is reserved for state stores, which are protocol v6 only.
+ map action_schemas = 11;
}
}
@@ -376,6 +489,7 @@ message ValidateResourceTypeConfig {
message Request {
string type_name = 1;
DynamicValue config = 2;
+ ClientCapabilities client_capabilities = 3;
}
message Response {
repeated Diagnostic diagnostics = 1;
@@ -418,6 +532,7 @@ message ReadResource {
bytes private = 3;
DynamicValue provider_meta = 4;
ClientCapabilities client_capabilities = 5;
+ ResourceIdentityData current_identity = 6;
}
message Response {
DynamicValue new_state = 1;
@@ -426,6 +541,7 @@ message ReadResource {
// deferred is set if the provider is deferring the change. If set the caller
// needs to handle the deferral.
Deferred deferred = 4;
+ ResourceIdentityData new_identity = 5;
}
}
@@ -438,6 +554,7 @@ message PlanResourceChange {
bytes prior_private = 5;
DynamicValue provider_meta = 6;
ClientCapabilities client_capabilities = 7;
+ ResourceIdentityData prior_identity = 8;
}
message Response {
@@ -462,6 +579,7 @@ message PlanResourceChange {
// deferred is set if the provider is deferring the change. If set the caller
// needs to handle the deferral.
Deferred deferred = 6;
+ ResourceIdentityData planned_identity = 7;
}
}
@@ -473,6 +591,7 @@ message ApplyResourceChange {
DynamicValue config = 4;
bytes planned_private = 5;
DynamicValue provider_meta = 6;
+ ResourceIdentityData planned_identity = 7;
}
message Response {
DynamicValue new_state = 1;
@@ -491,6 +610,7 @@ message ApplyResourceChange {
// ==== THIS MUST BE LEFT UNSET IN ALL OTHER SDKS ====
// ==== DO NOT USE THIS ====
bool legacy_type_system = 4;
+ ResourceIdentityData new_identity = 5;
}
}
@@ -499,12 +619,14 @@ message ImportResourceState {
string type_name = 1;
string id = 2;
ClientCapabilities client_capabilities = 3;
+ ResourceIdentityData identity = 4;
}
message ImportedResource {
string type_name = 1;
DynamicValue state = 2;
bytes private = 3;
+ ResourceIdentityData identity = 4;
}
message Response {
@@ -538,6 +660,15 @@ message MoveResourceState {
// The private state of the resource being moved.
bytes source_private = 6;
+
+ // The raw identity of the resource being moved. Only the json field is
+ // populated, as there should be no legacy providers using the flatmap
+ // format that support newly introduced RPCs.
+ RawState source_identity = 7;
+
+ // The identity schema version of the resource type that the resource
+ // is being moved from.
+ int64 source_identity_schema_version = 8;
}
message Response {
@@ -549,6 +680,8 @@ message MoveResourceState {
// The private state of the resource after it has been moved.
bytes target_private = 3;
+
+ ResourceIdentityData target_identity = 4;
}
}
@@ -633,3 +766,178 @@ message CallFunction {
FunctionError error = 2;
}
}
+
+message ValidateEphemeralResourceConfig {
+ message Request {
+ string type_name = 1;
+ DynamicValue config = 2;
+ }
+ message Response {
+ repeated Diagnostic diagnostics = 1;
+ }
+}
+
+message OpenEphemeralResource {
+ message Request {
+ string type_name = 1;
+ DynamicValue config = 2;
+ ClientCapabilities client_capabilities = 3;
+ }
+ message Response {
+ repeated Diagnostic diagnostics = 1;
+ optional google.protobuf.Timestamp renew_at = 2;
+ DynamicValue result = 3;
+ optional bytes private = 4;
+ // deferred is set if the provider is deferring the change. If set the caller
+ // needs to handle the deferral.
+ Deferred deferred = 5;
+ }
+}
+
+message RenewEphemeralResource {
+ message Request {
+ string type_name = 1;
+ optional bytes private = 2;
+ }
+ message Response {
+ repeated Diagnostic diagnostics = 1;
+ optional google.protobuf.Timestamp renew_at = 2;
+ optional bytes private = 3;
+ }
+}
+
+message CloseEphemeralResource {
+ message Request {
+ string type_name = 1;
+ optional bytes private = 2;
+ }
+ message Response {
+ repeated Diagnostic diagnostics = 1;
+ }
+}
+
+// Returns resource identity schemas for all resources
+message GetResourceIdentitySchemas {
+ message Request {
+ }
+ message Response {
+ // identity_schemas is a mapping of resource type names to their identity schemas.
+ map identity_schemas = 1;
+
+ // diagnostics is the collection of warning and error diagnostics for this request.
+ repeated Diagnostic diagnostics = 2;
+ }
+}
+
+message UpgradeResourceIdentity {
+ message Request {
+ // type_name is the managed resource type name
+ string type_name = 1;
+
+ // version is the version of the resource identity data to upgrade
+ int64 version = 2;
+
+ // raw_identity is the raw identity as stored for the resource. Core does
+ // not have access to the identity schema of prior_version, so it's the
+ // provider's responsibility to interpret this value using the
+ // appropriate older schema. The raw_identity will be json encoded.
+ RawState raw_identity = 3;
+ }
+ message Response {
+ // upgraded_identity returns the upgraded resource identity data
+ ResourceIdentityData upgraded_identity = 1;
+
+ // diagnostics is the collection of warning and error diagnostics for this request
+ repeated Diagnostic diagnostics = 2;
+ }
+}
+
+message ListResource {
+ message Request {
+ // type_name is the list resource type name.
+ string type_name = 1;
+
+ // configuration is the list ConfigSchema-based configuration data.
+ DynamicValue config = 2;
+
+ // when include_resource_object is set to true, the provider should
+ // include the full resource object for each result
+ bool include_resource_object = 3;
+
+ // The maximum number of results that Terraform is expecting.
+ // The stream will stop, once this limit is reached.
+ int64 limit = 4;
+ }
+
+ message Event {
+ // identity is the resource identity data of the resource instance.
+ ResourceIdentityData identity = 1;
+
+ // display_name can be displayed in a UI to make it easier for humans to identify a resource
+ string display_name = 2;
+
+ // optional resource object which can be useful when combining list blocks in configuration
+ optional DynamicValue resource_object = 3;
+
+ // A warning or error diagnostics for this event
+ repeated Diagnostic diagnostic = 4;
+ }
+}
+
+message ValidateListResourceConfig {
+ message Request {
+ string type_name = 1;
+ DynamicValue config = 2;
+ DynamicValue include_resource_object = 3;
+ DynamicValue limit = 4;
+ }
+ message Response {
+ repeated Diagnostic diagnostics = 1;
+ }
+}
+
+message ValidateActionConfig {
+ message Request {
+ string action_type = 1;
+ DynamicValue config = 2;
+ }
+ message Response {
+ repeated Diagnostic diagnostics = 1;
+ }
+}
+
+message PlanAction {
+ message Request {
+ string action_type = 1;
+ DynamicValue config = 2;
+ ClientCapabilities client_capabilities = 3;
+ }
+ message Response {
+ repeated Diagnostic diagnostics = 1;
+ // metadata
+ Deferred deferred = 2;
+ }
+}
+
+message InvokeAction {
+ message Request {
+ string action_type = 1;
+ DynamicValue config = 2;
+ ClientCapabilities client_capabilities = 3;
+ }
+
+ message Event {
+ message Progress {
+ // message to be printed in the console / HCPT
+ string message = 1;
+ }
+ message Completed {
+ repeated Diagnostic diagnostics = 1;
+ }
+ oneof type {
+ Progress progress = 1;
+ Completed completed = 2;
+ }
+ }
+
+}
diff --git a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go
index 8a8c8a5a01..aea2273831 100644
--- a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go
+++ b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go
@@ -1,9 +1,9 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
-// Terraform Plugin RPC protocol version 5.6
+// Terraform Plugin RPC protocol version 5.10
//
-// This file defines version 5.6 of the RPC protocol. To implement a plugin
+// This file defines version 5.10 of the RPC protocol. To implement a plugin
// against this protocol, copy this definition into your own codebase and
// use protoc to generate stubs for your target language.
//
@@ -22,8 +22,8 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
-// - protoc-gen-go-grpc v1.3.0
-// - protoc v5.26.1
+// - protoc-gen-go-grpc v1.5.1
+// - protoc v5.29.3
// source: tfplugin5.proto
package tfplugin5
@@ -37,26 +37,37 @@ import (
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
-// Requires gRPC-Go v1.32.0 or later.
-const _ = grpc.SupportPackageIsVersion7
+// Requires gRPC-Go v1.64.0 or later.
+const _ = grpc.SupportPackageIsVersion9
const (
- Provider_GetMetadata_FullMethodName = "/tfplugin5.Provider/GetMetadata"
- Provider_GetSchema_FullMethodName = "/tfplugin5.Provider/GetSchema"
- Provider_PrepareProviderConfig_FullMethodName = "/tfplugin5.Provider/PrepareProviderConfig"
- Provider_ValidateResourceTypeConfig_FullMethodName = "/tfplugin5.Provider/ValidateResourceTypeConfig"
- Provider_ValidateDataSourceConfig_FullMethodName = "/tfplugin5.Provider/ValidateDataSourceConfig"
- Provider_UpgradeResourceState_FullMethodName = "/tfplugin5.Provider/UpgradeResourceState"
- Provider_Configure_FullMethodName = "/tfplugin5.Provider/Configure"
- Provider_ReadResource_FullMethodName = "/tfplugin5.Provider/ReadResource"
- Provider_PlanResourceChange_FullMethodName = "/tfplugin5.Provider/PlanResourceChange"
- Provider_ApplyResourceChange_FullMethodName = "/tfplugin5.Provider/ApplyResourceChange"
- Provider_ImportResourceState_FullMethodName = "/tfplugin5.Provider/ImportResourceState"
- Provider_MoveResourceState_FullMethodName = "/tfplugin5.Provider/MoveResourceState"
- Provider_ReadDataSource_FullMethodName = "/tfplugin5.Provider/ReadDataSource"
- Provider_GetFunctions_FullMethodName = "/tfplugin5.Provider/GetFunctions"
- Provider_CallFunction_FullMethodName = "/tfplugin5.Provider/CallFunction"
- Provider_Stop_FullMethodName = "/tfplugin5.Provider/Stop"
+ Provider_GetMetadata_FullMethodName = "/tfplugin5.Provider/GetMetadata"
+ Provider_GetSchema_FullMethodName = "/tfplugin5.Provider/GetSchema"
+ Provider_GetResourceIdentitySchemas_FullMethodName = "/tfplugin5.Provider/GetResourceIdentitySchemas"
+ Provider_PrepareProviderConfig_FullMethodName = "/tfplugin5.Provider/PrepareProviderConfig"
+ Provider_ValidateResourceTypeConfig_FullMethodName = "/tfplugin5.Provider/ValidateResourceTypeConfig"
+ Provider_ValidateDataSourceConfig_FullMethodName = "/tfplugin5.Provider/ValidateDataSourceConfig"
+ Provider_UpgradeResourceState_FullMethodName = "/tfplugin5.Provider/UpgradeResourceState"
+ Provider_UpgradeResourceIdentity_FullMethodName = "/tfplugin5.Provider/UpgradeResourceIdentity"
+ Provider_Configure_FullMethodName = "/tfplugin5.Provider/Configure"
+ Provider_ReadResource_FullMethodName = "/tfplugin5.Provider/ReadResource"
+ Provider_PlanResourceChange_FullMethodName = "/tfplugin5.Provider/PlanResourceChange"
+ Provider_ApplyResourceChange_FullMethodName = "/tfplugin5.Provider/ApplyResourceChange"
+ Provider_ImportResourceState_FullMethodName = "/tfplugin5.Provider/ImportResourceState"
+ Provider_MoveResourceState_FullMethodName = "/tfplugin5.Provider/MoveResourceState"
+ Provider_ReadDataSource_FullMethodName = "/tfplugin5.Provider/ReadDataSource"
+ Provider_ValidateEphemeralResourceConfig_FullMethodName = "/tfplugin5.Provider/ValidateEphemeralResourceConfig"
+ Provider_OpenEphemeralResource_FullMethodName = "/tfplugin5.Provider/OpenEphemeralResource"
+ Provider_RenewEphemeralResource_FullMethodName = "/tfplugin5.Provider/RenewEphemeralResource"
+ Provider_CloseEphemeralResource_FullMethodName = "/tfplugin5.Provider/CloseEphemeralResource"
+ Provider_ListResource_FullMethodName = "/tfplugin5.Provider/ListResource"
+ Provider_ValidateListResourceConfig_FullMethodName = "/tfplugin5.Provider/ValidateListResourceConfig"
+ Provider_GetFunctions_FullMethodName = "/tfplugin5.Provider/GetFunctions"
+ Provider_CallFunction_FullMethodName = "/tfplugin5.Provider/CallFunction"
+ Provider_ValidateActionConfig_FullMethodName = "/tfplugin5.Provider/ValidateActionConfig"
+ Provider_PlanAction_FullMethodName = "/tfplugin5.Provider/PlanAction"
+ Provider_InvokeAction_FullMethodName = "/tfplugin5.Provider/InvokeAction"
+ Provider_Stop_FullMethodName = "/tfplugin5.Provider/Stop"
)
// ProviderClient is the client API for Provider service.
@@ -72,10 +83,16 @@ type ProviderClient interface {
// GetSchema returns schema information for the provider, data resources,
// and managed resources.
GetSchema(ctx context.Context, in *GetProviderSchema_Request, opts ...grpc.CallOption) (*GetProviderSchema_Response, error)
+ // GetResourceIdentitySchemas returns the identity schemas for all managed
+ // resources.
+ GetResourceIdentitySchemas(ctx context.Context, in *GetResourceIdentitySchemas_Request, opts ...grpc.CallOption) (*GetResourceIdentitySchemas_Response, error)
PrepareProviderConfig(ctx context.Context, in *PrepareProviderConfig_Request, opts ...grpc.CallOption) (*PrepareProviderConfig_Response, error)
ValidateResourceTypeConfig(ctx context.Context, in *ValidateResourceTypeConfig_Request, opts ...grpc.CallOption) (*ValidateResourceTypeConfig_Response, error)
ValidateDataSourceConfig(ctx context.Context, in *ValidateDataSourceConfig_Request, opts ...grpc.CallOption) (*ValidateDataSourceConfig_Response, error)
UpgradeResourceState(ctx context.Context, in *UpgradeResourceState_Request, opts ...grpc.CallOption) (*UpgradeResourceState_Response, error)
+ // UpgradeResourceIdentityData should return the upgraded resource identity
+ // data for a managed resource type.
+ UpgradeResourceIdentity(ctx context.Context, in *UpgradeResourceIdentity_Request, opts ...grpc.CallOption) (*UpgradeResourceIdentity_Response, error)
// ////// One-time initialization, called before other functions below
Configure(ctx context.Context, in *Configure_Request, opts ...grpc.CallOption) (*Configure_Response, error)
// ////// Managed Resource Lifecycle
@@ -85,11 +102,23 @@ type ProviderClient interface {
ImportResourceState(ctx context.Context, in *ImportResourceState_Request, opts ...grpc.CallOption) (*ImportResourceState_Response, error)
MoveResourceState(ctx context.Context, in *MoveResourceState_Request, opts ...grpc.CallOption) (*MoveResourceState_Response, error)
ReadDataSource(ctx context.Context, in *ReadDataSource_Request, opts ...grpc.CallOption) (*ReadDataSource_Response, error)
+ // ////// Ephemeral Resource Lifecycle
+ ValidateEphemeralResourceConfig(ctx context.Context, in *ValidateEphemeralResourceConfig_Request, opts ...grpc.CallOption) (*ValidateEphemeralResourceConfig_Response, error)
+ OpenEphemeralResource(ctx context.Context, in *OpenEphemeralResource_Request, opts ...grpc.CallOption) (*OpenEphemeralResource_Response, error)
+ RenewEphemeralResource(ctx context.Context, in *RenewEphemeralResource_Request, opts ...grpc.CallOption) (*RenewEphemeralResource_Response, error)
+ CloseEphemeralResource(ctx context.Context, in *CloseEphemeralResource_Request, opts ...grpc.CallOption) (*CloseEphemeralResource_Response, error)
+ // ///// List
+ ListResource(ctx context.Context, in *ListResource_Request, opts ...grpc.CallOption) (grpc.ServerStreamingClient[ListResource_Event], error)
+ ValidateListResourceConfig(ctx context.Context, in *ValidateListResourceConfig_Request, opts ...grpc.CallOption) (*ValidateListResourceConfig_Response, error)
// GetFunctions returns the definitions of all functions.
GetFunctions(ctx context.Context, in *GetFunctions_Request, opts ...grpc.CallOption) (*GetFunctions_Response, error)
// CallFunction runs the provider-defined function logic and returns
// the result with any diagnostics.
CallFunction(ctx context.Context, in *CallFunction_Request, opts ...grpc.CallOption) (*CallFunction_Response, error)
+ // ////// Actions Lifecycle
+ ValidateActionConfig(ctx context.Context, in *ValidateActionConfig_Request, opts ...grpc.CallOption) (*ValidateActionConfig_Response, error)
+ PlanAction(ctx context.Context, in *PlanAction_Request, opts ...grpc.CallOption) (*PlanAction_Response, error)
+ InvokeAction(ctx context.Context, in *InvokeAction_Request, opts ...grpc.CallOption) (grpc.ServerStreamingClient[InvokeAction_Event], error)
// ////// Graceful Shutdown
Stop(ctx context.Context, in *Stop_Request, opts ...grpc.CallOption) (*Stop_Response, error)
}
@@ -103,8 +132,9 @@ func NewProviderClient(cc grpc.ClientConnInterface) ProviderClient {
}
func (c *providerClient) GetMetadata(ctx context.Context, in *GetMetadata_Request, opts ...grpc.CallOption) (*GetMetadata_Response, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetMetadata_Response)
- err := c.cc.Invoke(ctx, Provider_GetMetadata_FullMethodName, in, out, opts...)
+ err := c.cc.Invoke(ctx, Provider_GetMetadata_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -112,8 +142,19 @@ func (c *providerClient) GetMetadata(ctx context.Context, in *GetMetadata_Reques
}
func (c *providerClient) GetSchema(ctx context.Context, in *GetProviderSchema_Request, opts ...grpc.CallOption) (*GetProviderSchema_Response, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetProviderSchema_Response)
- err := c.cc.Invoke(ctx, Provider_GetSchema_FullMethodName, in, out, opts...)
+ err := c.cc.Invoke(ctx, Provider_GetSchema_FullMethodName, in, out, cOpts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *providerClient) GetResourceIdentitySchemas(ctx context.Context, in *GetResourceIdentitySchemas_Request, opts ...grpc.CallOption) (*GetResourceIdentitySchemas_Response, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
+ out := new(GetResourceIdentitySchemas_Response)
+ err := c.cc.Invoke(ctx, Provider_GetResourceIdentitySchemas_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -121,8 +162,9 @@ func (c *providerClient) GetSchema(ctx context.Context, in *GetProviderSchema_Re
}
func (c *providerClient) PrepareProviderConfig(ctx context.Context, in *PrepareProviderConfig_Request, opts ...grpc.CallOption) (*PrepareProviderConfig_Response, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(PrepareProviderConfig_Response)
- err := c.cc.Invoke(ctx, Provider_PrepareProviderConfig_FullMethodName, in, out, opts...)
+ err := c.cc.Invoke(ctx, Provider_PrepareProviderConfig_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -130,8 +172,9 @@ func (c *providerClient) PrepareProviderConfig(ctx context.Context, in *PrepareP
}
func (c *providerClient) ValidateResourceTypeConfig(ctx context.Context, in *ValidateResourceTypeConfig_Request, opts ...grpc.CallOption) (*ValidateResourceTypeConfig_Response, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ValidateResourceTypeConfig_Response)
- err := c.cc.Invoke(ctx, Provider_ValidateResourceTypeConfig_FullMethodName, in, out, opts...)
+ err := c.cc.Invoke(ctx, Provider_ValidateResourceTypeConfig_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -139,8 +182,9 @@ func (c *providerClient) ValidateResourceTypeConfig(ctx context.Context, in *Val
}
func (c *providerClient) ValidateDataSourceConfig(ctx context.Context, in *ValidateDataSourceConfig_Request, opts ...grpc.CallOption) (*ValidateDataSourceConfig_Response, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ValidateDataSourceConfig_Response)
- err := c.cc.Invoke(ctx, Provider_ValidateDataSourceConfig_FullMethodName, in, out, opts...)
+ err := c.cc.Invoke(ctx, Provider_ValidateDataSourceConfig_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -148,8 +192,19 @@ func (c *providerClient) ValidateDataSourceConfig(ctx context.Context, in *Valid
}
func (c *providerClient) UpgradeResourceState(ctx context.Context, in *UpgradeResourceState_Request, opts ...grpc.CallOption) (*UpgradeResourceState_Response, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(UpgradeResourceState_Response)
- err := c.cc.Invoke(ctx, Provider_UpgradeResourceState_FullMethodName, in, out, opts...)
+ err := c.cc.Invoke(ctx, Provider_UpgradeResourceState_FullMethodName, in, out, cOpts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *providerClient) UpgradeResourceIdentity(ctx context.Context, in *UpgradeResourceIdentity_Request, opts ...grpc.CallOption) (*UpgradeResourceIdentity_Response, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
+ out := new(UpgradeResourceIdentity_Response)
+ err := c.cc.Invoke(ctx, Provider_UpgradeResourceIdentity_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -157,8 +212,9 @@ func (c *providerClient) UpgradeResourceState(ctx context.Context, in *UpgradeRe
}
func (c *providerClient) Configure(ctx context.Context, in *Configure_Request, opts ...grpc.CallOption) (*Configure_Response, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Configure_Response)
- err := c.cc.Invoke(ctx, Provider_Configure_FullMethodName, in, out, opts...)
+ err := c.cc.Invoke(ctx, Provider_Configure_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -166,8 +222,9 @@ func (c *providerClient) Configure(ctx context.Context, in *Configure_Request, o
}
func (c *providerClient) ReadResource(ctx context.Context, in *ReadResource_Request, opts ...grpc.CallOption) (*ReadResource_Response, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ReadResource_Response)
- err := c.cc.Invoke(ctx, Provider_ReadResource_FullMethodName, in, out, opts...)
+ err := c.cc.Invoke(ctx, Provider_ReadResource_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -175,8 +232,9 @@ func (c *providerClient) ReadResource(ctx context.Context, in *ReadResource_Requ
}
func (c *providerClient) PlanResourceChange(ctx context.Context, in *PlanResourceChange_Request, opts ...grpc.CallOption) (*PlanResourceChange_Response, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(PlanResourceChange_Response)
- err := c.cc.Invoke(ctx, Provider_PlanResourceChange_FullMethodName, in, out, opts...)
+ err := c.cc.Invoke(ctx, Provider_PlanResourceChange_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -184,8 +242,9 @@ func (c *providerClient) PlanResourceChange(ctx context.Context, in *PlanResourc
}
func (c *providerClient) ApplyResourceChange(ctx context.Context, in *ApplyResourceChange_Request, opts ...grpc.CallOption) (*ApplyResourceChange_Response, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ApplyResourceChange_Response)
- err := c.cc.Invoke(ctx, Provider_ApplyResourceChange_FullMethodName, in, out, opts...)
+ err := c.cc.Invoke(ctx, Provider_ApplyResourceChange_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -193,8 +252,9 @@ func (c *providerClient) ApplyResourceChange(ctx context.Context, in *ApplyResou
}
func (c *providerClient) ImportResourceState(ctx context.Context, in *ImportResourceState_Request, opts ...grpc.CallOption) (*ImportResourceState_Response, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ImportResourceState_Response)
- err := c.cc.Invoke(ctx, Provider_ImportResourceState_FullMethodName, in, out, opts...)
+ err := c.cc.Invoke(ctx, Provider_ImportResourceState_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -202,8 +262,9 @@ func (c *providerClient) ImportResourceState(ctx context.Context, in *ImportReso
}
func (c *providerClient) MoveResourceState(ctx context.Context, in *MoveResourceState_Request, opts ...grpc.CallOption) (*MoveResourceState_Response, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(MoveResourceState_Response)
- err := c.cc.Invoke(ctx, Provider_MoveResourceState_FullMethodName, in, out, opts...)
+ err := c.cc.Invoke(ctx, Provider_MoveResourceState_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -211,8 +272,78 @@ func (c *providerClient) MoveResourceState(ctx context.Context, in *MoveResource
}
func (c *providerClient) ReadDataSource(ctx context.Context, in *ReadDataSource_Request, opts ...grpc.CallOption) (*ReadDataSource_Response, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ReadDataSource_Response)
- err := c.cc.Invoke(ctx, Provider_ReadDataSource_FullMethodName, in, out, opts...)
+ err := c.cc.Invoke(ctx, Provider_ReadDataSource_FullMethodName, in, out, cOpts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *providerClient) ValidateEphemeralResourceConfig(ctx context.Context, in *ValidateEphemeralResourceConfig_Request, opts ...grpc.CallOption) (*ValidateEphemeralResourceConfig_Response, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
+ out := new(ValidateEphemeralResourceConfig_Response)
+ err := c.cc.Invoke(ctx, Provider_ValidateEphemeralResourceConfig_FullMethodName, in, out, cOpts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *providerClient) OpenEphemeralResource(ctx context.Context, in *OpenEphemeralResource_Request, opts ...grpc.CallOption) (*OpenEphemeralResource_Response, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
+ out := new(OpenEphemeralResource_Response)
+ err := c.cc.Invoke(ctx, Provider_OpenEphemeralResource_FullMethodName, in, out, cOpts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *providerClient) RenewEphemeralResource(ctx context.Context, in *RenewEphemeralResource_Request, opts ...grpc.CallOption) (*RenewEphemeralResource_Response, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
+ out := new(RenewEphemeralResource_Response)
+ err := c.cc.Invoke(ctx, Provider_RenewEphemeralResource_FullMethodName, in, out, cOpts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *providerClient) CloseEphemeralResource(ctx context.Context, in *CloseEphemeralResource_Request, opts ...grpc.CallOption) (*CloseEphemeralResource_Response, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
+ out := new(CloseEphemeralResource_Response)
+ err := c.cc.Invoke(ctx, Provider_CloseEphemeralResource_FullMethodName, in, out, cOpts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *providerClient) ListResource(ctx context.Context, in *ListResource_Request, opts ...grpc.CallOption) (grpc.ServerStreamingClient[ListResource_Event], error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
+ stream, err := c.cc.NewStream(ctx, &Provider_ServiceDesc.Streams[0], Provider_ListResource_FullMethodName, cOpts...)
+ if err != nil {
+ return nil, err
+ }
+ x := &grpc.GenericClientStream[ListResource_Request, ListResource_Event]{ClientStream: stream}
+ if err := x.ClientStream.SendMsg(in); err != nil {
+ return nil, err
+ }
+ if err := x.ClientStream.CloseSend(); err != nil {
+ return nil, err
+ }
+ return x, nil
+}
+
+// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
+type Provider_ListResourceClient = grpc.ServerStreamingClient[ListResource_Event]
+
+func (c *providerClient) ValidateListResourceConfig(ctx context.Context, in *ValidateListResourceConfig_Request, opts ...grpc.CallOption) (*ValidateListResourceConfig_Response, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
+ out := new(ValidateListResourceConfig_Response)
+ err := c.cc.Invoke(ctx, Provider_ValidateListResourceConfig_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -220,8 +351,9 @@ func (c *providerClient) ReadDataSource(ctx context.Context, in *ReadDataSource_
}
func (c *providerClient) GetFunctions(ctx context.Context, in *GetFunctions_Request, opts ...grpc.CallOption) (*GetFunctions_Response, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetFunctions_Response)
- err := c.cc.Invoke(ctx, Provider_GetFunctions_FullMethodName, in, out, opts...)
+ err := c.cc.Invoke(ctx, Provider_GetFunctions_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -229,17 +361,58 @@ func (c *providerClient) GetFunctions(ctx context.Context, in *GetFunctions_Requ
}
func (c *providerClient) CallFunction(ctx context.Context, in *CallFunction_Request, opts ...grpc.CallOption) (*CallFunction_Response, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(CallFunction_Response)
- err := c.cc.Invoke(ctx, Provider_CallFunction_FullMethodName, in, out, opts...)
+ err := c.cc.Invoke(ctx, Provider_CallFunction_FullMethodName, in, out, cOpts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *providerClient) ValidateActionConfig(ctx context.Context, in *ValidateActionConfig_Request, opts ...grpc.CallOption) (*ValidateActionConfig_Response, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
+ out := new(ValidateActionConfig_Response)
+ err := c.cc.Invoke(ctx, Provider_ValidateActionConfig_FullMethodName, in, out, cOpts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *providerClient) PlanAction(ctx context.Context, in *PlanAction_Request, opts ...grpc.CallOption) (*PlanAction_Response, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
+ out := new(PlanAction_Response)
+ err := c.cc.Invoke(ctx, Provider_PlanAction_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
+func (c *providerClient) InvokeAction(ctx context.Context, in *InvokeAction_Request, opts ...grpc.CallOption) (grpc.ServerStreamingClient[InvokeAction_Event], error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
+ stream, err := c.cc.NewStream(ctx, &Provider_ServiceDesc.Streams[1], Provider_InvokeAction_FullMethodName, cOpts...)
+ if err != nil {
+ return nil, err
+ }
+ x := &grpc.GenericClientStream[InvokeAction_Request, InvokeAction_Event]{ClientStream: stream}
+ if err := x.ClientStream.SendMsg(in); err != nil {
+ return nil, err
+ }
+ if err := x.ClientStream.CloseSend(); err != nil {
+ return nil, err
+ }
+ return x, nil
+}
+
+// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
+type Provider_InvokeActionClient = grpc.ServerStreamingClient[InvokeAction_Event]
+
func (c *providerClient) Stop(ctx context.Context, in *Stop_Request, opts ...grpc.CallOption) (*Stop_Response, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Stop_Response)
- err := c.cc.Invoke(ctx, Provider_Stop_FullMethodName, in, out, opts...)
+ err := c.cc.Invoke(ctx, Provider_Stop_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -248,7 +421,7 @@ func (c *providerClient) Stop(ctx context.Context, in *Stop_Request, opts ...grp
// ProviderServer is the server API for Provider service.
// All implementations must embed UnimplementedProviderServer
-// for forward compatibility
+// for forward compatibility.
type ProviderServer interface {
// GetMetadata returns upfront information about server capabilities and
// supported resource types without requiring the server to instantiate all
@@ -259,10 +432,16 @@ type ProviderServer interface {
// GetSchema returns schema information for the provider, data resources,
// and managed resources.
GetSchema(context.Context, *GetProviderSchema_Request) (*GetProviderSchema_Response, error)
+ // GetResourceIdentitySchemas returns the identity schemas for all managed
+ // resources.
+ GetResourceIdentitySchemas(context.Context, *GetResourceIdentitySchemas_Request) (*GetResourceIdentitySchemas_Response, error)
PrepareProviderConfig(context.Context, *PrepareProviderConfig_Request) (*PrepareProviderConfig_Response, error)
ValidateResourceTypeConfig(context.Context, *ValidateResourceTypeConfig_Request) (*ValidateResourceTypeConfig_Response, error)
ValidateDataSourceConfig(context.Context, *ValidateDataSourceConfig_Request) (*ValidateDataSourceConfig_Response, error)
UpgradeResourceState(context.Context, *UpgradeResourceState_Request) (*UpgradeResourceState_Response, error)
+ // UpgradeResourceIdentityData should return the upgraded resource identity
+ // data for a managed resource type.
+ UpgradeResourceIdentity(context.Context, *UpgradeResourceIdentity_Request) (*UpgradeResourceIdentity_Response, error)
// ////// One-time initialization, called before other functions below
Configure(context.Context, *Configure_Request) (*Configure_Response, error)
// ////// Managed Resource Lifecycle
@@ -272,19 +451,34 @@ type ProviderServer interface {
ImportResourceState(context.Context, *ImportResourceState_Request) (*ImportResourceState_Response, error)
MoveResourceState(context.Context, *MoveResourceState_Request) (*MoveResourceState_Response, error)
ReadDataSource(context.Context, *ReadDataSource_Request) (*ReadDataSource_Response, error)
+ // ////// Ephemeral Resource Lifecycle
+ ValidateEphemeralResourceConfig(context.Context, *ValidateEphemeralResourceConfig_Request) (*ValidateEphemeralResourceConfig_Response, error)
+ OpenEphemeralResource(context.Context, *OpenEphemeralResource_Request) (*OpenEphemeralResource_Response, error)
+ RenewEphemeralResource(context.Context, *RenewEphemeralResource_Request) (*RenewEphemeralResource_Response, error)
+ CloseEphemeralResource(context.Context, *CloseEphemeralResource_Request) (*CloseEphemeralResource_Response, error)
+ // ///// List
+ ListResource(*ListResource_Request, grpc.ServerStreamingServer[ListResource_Event]) error
+ ValidateListResourceConfig(context.Context, *ValidateListResourceConfig_Request) (*ValidateListResourceConfig_Response, error)
// GetFunctions returns the definitions of all functions.
GetFunctions(context.Context, *GetFunctions_Request) (*GetFunctions_Response, error)
// CallFunction runs the provider-defined function logic and returns
// the result with any diagnostics.
CallFunction(context.Context, *CallFunction_Request) (*CallFunction_Response, error)
+ // ////// Actions Lifecycle
+ ValidateActionConfig(context.Context, *ValidateActionConfig_Request) (*ValidateActionConfig_Response, error)
+ PlanAction(context.Context, *PlanAction_Request) (*PlanAction_Response, error)
+ InvokeAction(*InvokeAction_Request, grpc.ServerStreamingServer[InvokeAction_Event]) error
// ////// Graceful Shutdown
Stop(context.Context, *Stop_Request) (*Stop_Response, error)
mustEmbedUnimplementedProviderServer()
}
-// UnimplementedProviderServer must be embedded to have forward compatible implementations.
-type UnimplementedProviderServer struct {
-}
+// UnimplementedProviderServer must be embedded to have
+// forward compatible implementations.
+//
+// NOTE: this should be embedded by value instead of pointer to avoid a nil
+// pointer dereference when methods are called.
+type UnimplementedProviderServer struct{}
func (UnimplementedProviderServer) GetMetadata(context.Context, *GetMetadata_Request) (*GetMetadata_Response, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetMetadata not implemented")
@@ -292,6 +486,9 @@ func (UnimplementedProviderServer) GetMetadata(context.Context, *GetMetadata_Req
func (UnimplementedProviderServer) GetSchema(context.Context, *GetProviderSchema_Request) (*GetProviderSchema_Response, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetSchema not implemented")
}
+func (UnimplementedProviderServer) GetResourceIdentitySchemas(context.Context, *GetResourceIdentitySchemas_Request) (*GetResourceIdentitySchemas_Response, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method GetResourceIdentitySchemas not implemented")
+}
func (UnimplementedProviderServer) PrepareProviderConfig(context.Context, *PrepareProviderConfig_Request) (*PrepareProviderConfig_Response, error) {
return nil, status.Errorf(codes.Unimplemented, "method PrepareProviderConfig not implemented")
}
@@ -304,6 +501,9 @@ func (UnimplementedProviderServer) ValidateDataSourceConfig(context.Context, *Va
func (UnimplementedProviderServer) UpgradeResourceState(context.Context, *UpgradeResourceState_Request) (*UpgradeResourceState_Response, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpgradeResourceState not implemented")
}
+func (UnimplementedProviderServer) UpgradeResourceIdentity(context.Context, *UpgradeResourceIdentity_Request) (*UpgradeResourceIdentity_Response, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method UpgradeResourceIdentity not implemented")
+}
func (UnimplementedProviderServer) Configure(context.Context, *Configure_Request) (*Configure_Response, error) {
return nil, status.Errorf(codes.Unimplemented, "method Configure not implemented")
}
@@ -325,16 +525,44 @@ func (UnimplementedProviderServer) MoveResourceState(context.Context, *MoveResou
func (UnimplementedProviderServer) ReadDataSource(context.Context, *ReadDataSource_Request) (*ReadDataSource_Response, error) {
return nil, status.Errorf(codes.Unimplemented, "method ReadDataSource not implemented")
}
+func (UnimplementedProviderServer) ValidateEphemeralResourceConfig(context.Context, *ValidateEphemeralResourceConfig_Request) (*ValidateEphemeralResourceConfig_Response, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method ValidateEphemeralResourceConfig not implemented")
+}
+func (UnimplementedProviderServer) OpenEphemeralResource(context.Context, *OpenEphemeralResource_Request) (*OpenEphemeralResource_Response, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method OpenEphemeralResource not implemented")
+}
+func (UnimplementedProviderServer) RenewEphemeralResource(context.Context, *RenewEphemeralResource_Request) (*RenewEphemeralResource_Response, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method RenewEphemeralResource not implemented")
+}
+func (UnimplementedProviderServer) CloseEphemeralResource(context.Context, *CloseEphemeralResource_Request) (*CloseEphemeralResource_Response, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method CloseEphemeralResource not implemented")
+}
+func (UnimplementedProviderServer) ListResource(*ListResource_Request, grpc.ServerStreamingServer[ListResource_Event]) error {
+ return status.Errorf(codes.Unimplemented, "method ListResource not implemented")
+}
+func (UnimplementedProviderServer) ValidateListResourceConfig(context.Context, *ValidateListResourceConfig_Request) (*ValidateListResourceConfig_Response, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method ValidateListResourceConfig not implemented")
+}
func (UnimplementedProviderServer) GetFunctions(context.Context, *GetFunctions_Request) (*GetFunctions_Response, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetFunctions not implemented")
}
func (UnimplementedProviderServer) CallFunction(context.Context, *CallFunction_Request) (*CallFunction_Response, error) {
return nil, status.Errorf(codes.Unimplemented, "method CallFunction not implemented")
}
+func (UnimplementedProviderServer) ValidateActionConfig(context.Context, *ValidateActionConfig_Request) (*ValidateActionConfig_Response, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method ValidateActionConfig not implemented")
+}
+func (UnimplementedProviderServer) PlanAction(context.Context, *PlanAction_Request) (*PlanAction_Response, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method PlanAction not implemented")
+}
+func (UnimplementedProviderServer) InvokeAction(*InvokeAction_Request, grpc.ServerStreamingServer[InvokeAction_Event]) error {
+ return status.Errorf(codes.Unimplemented, "method InvokeAction not implemented")
+}
func (UnimplementedProviderServer) Stop(context.Context, *Stop_Request) (*Stop_Response, error) {
return nil, status.Errorf(codes.Unimplemented, "method Stop not implemented")
}
func (UnimplementedProviderServer) mustEmbedUnimplementedProviderServer() {}
+func (UnimplementedProviderServer) testEmbeddedByValue() {}
// UnsafeProviderServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to ProviderServer will
@@ -344,6 +572,13 @@ type UnsafeProviderServer interface {
}
func RegisterProviderServer(s grpc.ServiceRegistrar, srv ProviderServer) {
+ // If the following call pancis, it indicates UnimplementedProviderServer was
+ // embedded by pointer and is nil. This will cause panics if an
+ // unimplemented method is ever invoked, so we test this at initialization
+ // time to prevent it from happening at runtime later due to I/O.
+ if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
+ t.testEmbeddedByValue()
+ }
s.RegisterService(&Provider_ServiceDesc, srv)
}
@@ -383,6 +618,24 @@ func _Provider_GetSchema_Handler(srv interface{}, ctx context.Context, dec func(
return interceptor(ctx, in, info, handler)
}
+func _Provider_GetResourceIdentitySchemas_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(GetResourceIdentitySchemas_Request)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(ProviderServer).GetResourceIdentitySchemas(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: Provider_GetResourceIdentitySchemas_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(ProviderServer).GetResourceIdentitySchemas(ctx, req.(*GetResourceIdentitySchemas_Request))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
func _Provider_PrepareProviderConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(PrepareProviderConfig_Request)
if err := dec(in); err != nil {
@@ -455,6 +708,24 @@ func _Provider_UpgradeResourceState_Handler(srv interface{}, ctx context.Context
return interceptor(ctx, in, info, handler)
}
+func _Provider_UpgradeResourceIdentity_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(UpgradeResourceIdentity_Request)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(ProviderServer).UpgradeResourceIdentity(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: Provider_UpgradeResourceIdentity_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(ProviderServer).UpgradeResourceIdentity(ctx, req.(*UpgradeResourceIdentity_Request))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
func _Provider_Configure_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(Configure_Request)
if err := dec(in); err != nil {
@@ -581,6 +852,107 @@ func _Provider_ReadDataSource_Handler(srv interface{}, ctx context.Context, dec
return interceptor(ctx, in, info, handler)
}
+func _Provider_ValidateEphemeralResourceConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(ValidateEphemeralResourceConfig_Request)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(ProviderServer).ValidateEphemeralResourceConfig(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: Provider_ValidateEphemeralResourceConfig_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(ProviderServer).ValidateEphemeralResourceConfig(ctx, req.(*ValidateEphemeralResourceConfig_Request))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _Provider_OpenEphemeralResource_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(OpenEphemeralResource_Request)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(ProviderServer).OpenEphemeralResource(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: Provider_OpenEphemeralResource_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(ProviderServer).OpenEphemeralResource(ctx, req.(*OpenEphemeralResource_Request))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _Provider_RenewEphemeralResource_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(RenewEphemeralResource_Request)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(ProviderServer).RenewEphemeralResource(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: Provider_RenewEphemeralResource_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(ProviderServer).RenewEphemeralResource(ctx, req.(*RenewEphemeralResource_Request))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _Provider_CloseEphemeralResource_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(CloseEphemeralResource_Request)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(ProviderServer).CloseEphemeralResource(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: Provider_CloseEphemeralResource_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(ProviderServer).CloseEphemeralResource(ctx, req.(*CloseEphemeralResource_Request))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _Provider_ListResource_Handler(srv interface{}, stream grpc.ServerStream) error {
+ m := new(ListResource_Request)
+ if err := stream.RecvMsg(m); err != nil {
+ return err
+ }
+ return srv.(ProviderServer).ListResource(m, &grpc.GenericServerStream[ListResource_Request, ListResource_Event]{ServerStream: stream})
+}
+
+// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
+type Provider_ListResourceServer = grpc.ServerStreamingServer[ListResource_Event]
+
+func _Provider_ValidateListResourceConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(ValidateListResourceConfig_Request)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(ProviderServer).ValidateListResourceConfig(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: Provider_ValidateListResourceConfig_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(ProviderServer).ValidateListResourceConfig(ctx, req.(*ValidateListResourceConfig_Request))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
func _Provider_GetFunctions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetFunctions_Request)
if err := dec(in); err != nil {
@@ -617,6 +989,53 @@ func _Provider_CallFunction_Handler(srv interface{}, ctx context.Context, dec fu
return interceptor(ctx, in, info, handler)
}
+func _Provider_ValidateActionConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(ValidateActionConfig_Request)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(ProviderServer).ValidateActionConfig(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: Provider_ValidateActionConfig_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(ProviderServer).ValidateActionConfig(ctx, req.(*ValidateActionConfig_Request))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _Provider_PlanAction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(PlanAction_Request)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(ProviderServer).PlanAction(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: Provider_PlanAction_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(ProviderServer).PlanAction(ctx, req.(*PlanAction_Request))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _Provider_InvokeAction_Handler(srv interface{}, stream grpc.ServerStream) error {
+ m := new(InvokeAction_Request)
+ if err := stream.RecvMsg(m); err != nil {
+ return err
+ }
+ return srv.(ProviderServer).InvokeAction(m, &grpc.GenericServerStream[InvokeAction_Request, InvokeAction_Event]{ServerStream: stream})
+}
+
+// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
+type Provider_InvokeActionServer = grpc.ServerStreamingServer[InvokeAction_Event]
+
func _Provider_Stop_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(Stop_Request)
if err := dec(in); err != nil {
@@ -650,6 +1069,10 @@ var Provider_ServiceDesc = grpc.ServiceDesc{
MethodName: "GetSchema",
Handler: _Provider_GetSchema_Handler,
},
+ {
+ MethodName: "GetResourceIdentitySchemas",
+ Handler: _Provider_GetResourceIdentitySchemas_Handler,
+ },
{
MethodName: "PrepareProviderConfig",
Handler: _Provider_PrepareProviderConfig_Handler,
@@ -666,6 +1089,10 @@ var Provider_ServiceDesc = grpc.ServiceDesc{
MethodName: "UpgradeResourceState",
Handler: _Provider_UpgradeResourceState_Handler,
},
+ {
+ MethodName: "UpgradeResourceIdentity",
+ Handler: _Provider_UpgradeResourceIdentity_Handler,
+ },
{
MethodName: "Configure",
Handler: _Provider_Configure_Handler,
@@ -694,6 +1121,26 @@ var Provider_ServiceDesc = grpc.ServiceDesc{
MethodName: "ReadDataSource",
Handler: _Provider_ReadDataSource_Handler,
},
+ {
+ MethodName: "ValidateEphemeralResourceConfig",
+ Handler: _Provider_ValidateEphemeralResourceConfig_Handler,
+ },
+ {
+ MethodName: "OpenEphemeralResource",
+ Handler: _Provider_OpenEphemeralResource_Handler,
+ },
+ {
+ MethodName: "RenewEphemeralResource",
+ Handler: _Provider_RenewEphemeralResource_Handler,
+ },
+ {
+ MethodName: "CloseEphemeralResource",
+ Handler: _Provider_CloseEphemeralResource_Handler,
+ },
+ {
+ MethodName: "ValidateListResourceConfig",
+ Handler: _Provider_ValidateListResourceConfig_Handler,
+ },
{
MethodName: "GetFunctions",
Handler: _Provider_GetFunctions_Handler,
@@ -702,12 +1149,31 @@ var Provider_ServiceDesc = grpc.ServiceDesc{
MethodName: "CallFunction",
Handler: _Provider_CallFunction_Handler,
},
+ {
+ MethodName: "ValidateActionConfig",
+ Handler: _Provider_ValidateActionConfig_Handler,
+ },
+ {
+ MethodName: "PlanAction",
+ Handler: _Provider_PlanAction_Handler,
+ },
{
MethodName: "Stop",
Handler: _Provider_Stop_Handler,
},
},
- Streams: []grpc.StreamDesc{},
+ Streams: []grpc.StreamDesc{
+ {
+ StreamName: "ListResource",
+ Handler: _Provider_ListResource_Handler,
+ ServerStreams: true,
+ },
+ {
+ StreamName: "InvokeAction",
+ Handler: _Provider_InvokeAction_Handler,
+ ServerStreams: true,
+ },
+ },
Metadata: "tfplugin5.proto",
}
@@ -724,7 +1190,7 @@ const (
type ProvisionerClient interface {
GetSchema(ctx context.Context, in *GetProvisionerSchema_Request, opts ...grpc.CallOption) (*GetProvisionerSchema_Response, error)
ValidateProvisionerConfig(ctx context.Context, in *ValidateProvisionerConfig_Request, opts ...grpc.CallOption) (*ValidateProvisionerConfig_Response, error)
- ProvisionResource(ctx context.Context, in *ProvisionResource_Request, opts ...grpc.CallOption) (Provisioner_ProvisionResourceClient, error)
+ ProvisionResource(ctx context.Context, in *ProvisionResource_Request, opts ...grpc.CallOption) (grpc.ServerStreamingClient[ProvisionResource_Response], error)
Stop(ctx context.Context, in *Stop_Request, opts ...grpc.CallOption) (*Stop_Response, error)
}
@@ -737,8 +1203,9 @@ func NewProvisionerClient(cc grpc.ClientConnInterface) ProvisionerClient {
}
func (c *provisionerClient) GetSchema(ctx context.Context, in *GetProvisionerSchema_Request, opts ...grpc.CallOption) (*GetProvisionerSchema_Response, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetProvisionerSchema_Response)
- err := c.cc.Invoke(ctx, Provisioner_GetSchema_FullMethodName, in, out, opts...)
+ err := c.cc.Invoke(ctx, Provisioner_GetSchema_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -746,20 +1213,22 @@ func (c *provisionerClient) GetSchema(ctx context.Context, in *GetProvisionerSch
}
func (c *provisionerClient) ValidateProvisionerConfig(ctx context.Context, in *ValidateProvisionerConfig_Request, opts ...grpc.CallOption) (*ValidateProvisionerConfig_Response, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ValidateProvisionerConfig_Response)
- err := c.cc.Invoke(ctx, Provisioner_ValidateProvisionerConfig_FullMethodName, in, out, opts...)
+ err := c.cc.Invoke(ctx, Provisioner_ValidateProvisionerConfig_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
-func (c *provisionerClient) ProvisionResource(ctx context.Context, in *ProvisionResource_Request, opts ...grpc.CallOption) (Provisioner_ProvisionResourceClient, error) {
- stream, err := c.cc.NewStream(ctx, &Provisioner_ServiceDesc.Streams[0], Provisioner_ProvisionResource_FullMethodName, opts...)
+func (c *provisionerClient) ProvisionResource(ctx context.Context, in *ProvisionResource_Request, opts ...grpc.CallOption) (grpc.ServerStreamingClient[ProvisionResource_Response], error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
+ stream, err := c.cc.NewStream(ctx, &Provisioner_ServiceDesc.Streams[0], Provisioner_ProvisionResource_FullMethodName, cOpts...)
if err != nil {
return nil, err
}
- x := &provisionerProvisionResourceClient{stream}
+ x := &grpc.GenericClientStream[ProvisionResource_Request, ProvisionResource_Response]{ClientStream: stream}
if err := x.ClientStream.SendMsg(in); err != nil {
return nil, err
}
@@ -769,26 +1238,13 @@ func (c *provisionerClient) ProvisionResource(ctx context.Context, in *Provision
return x, nil
}
-type Provisioner_ProvisionResourceClient interface {
- Recv() (*ProvisionResource_Response, error)
- grpc.ClientStream
-}
-
-type provisionerProvisionResourceClient struct {
- grpc.ClientStream
-}
-
-func (x *provisionerProvisionResourceClient) Recv() (*ProvisionResource_Response, error) {
- m := new(ProvisionResource_Response)
- if err := x.ClientStream.RecvMsg(m); err != nil {
- return nil, err
- }
- return m, nil
-}
+// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
+type Provisioner_ProvisionResourceClient = grpc.ServerStreamingClient[ProvisionResource_Response]
func (c *provisionerClient) Stop(ctx context.Context, in *Stop_Request, opts ...grpc.CallOption) (*Stop_Response, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Stop_Response)
- err := c.cc.Invoke(ctx, Provisioner_Stop_FullMethodName, in, out, opts...)
+ err := c.cc.Invoke(ctx, Provisioner_Stop_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -797,18 +1253,21 @@ func (c *provisionerClient) Stop(ctx context.Context, in *Stop_Request, opts ...
// ProvisionerServer is the server API for Provisioner service.
// All implementations must embed UnimplementedProvisionerServer
-// for forward compatibility
+// for forward compatibility.
type ProvisionerServer interface {
GetSchema(context.Context, *GetProvisionerSchema_Request) (*GetProvisionerSchema_Response, error)
ValidateProvisionerConfig(context.Context, *ValidateProvisionerConfig_Request) (*ValidateProvisionerConfig_Response, error)
- ProvisionResource(*ProvisionResource_Request, Provisioner_ProvisionResourceServer) error
+ ProvisionResource(*ProvisionResource_Request, grpc.ServerStreamingServer[ProvisionResource_Response]) error
Stop(context.Context, *Stop_Request) (*Stop_Response, error)
mustEmbedUnimplementedProvisionerServer()
}
-// UnimplementedProvisionerServer must be embedded to have forward compatible implementations.
-type UnimplementedProvisionerServer struct {
-}
+// UnimplementedProvisionerServer must be embedded to have
+// forward compatible implementations.
+//
+// NOTE: this should be embedded by value instead of pointer to avoid a nil
+// pointer dereference when methods are called.
+type UnimplementedProvisionerServer struct{}
func (UnimplementedProvisionerServer) GetSchema(context.Context, *GetProvisionerSchema_Request) (*GetProvisionerSchema_Response, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetSchema not implemented")
@@ -816,13 +1275,14 @@ func (UnimplementedProvisionerServer) GetSchema(context.Context, *GetProvisioner
func (UnimplementedProvisionerServer) ValidateProvisionerConfig(context.Context, *ValidateProvisionerConfig_Request) (*ValidateProvisionerConfig_Response, error) {
return nil, status.Errorf(codes.Unimplemented, "method ValidateProvisionerConfig not implemented")
}
-func (UnimplementedProvisionerServer) ProvisionResource(*ProvisionResource_Request, Provisioner_ProvisionResourceServer) error {
+func (UnimplementedProvisionerServer) ProvisionResource(*ProvisionResource_Request, grpc.ServerStreamingServer[ProvisionResource_Response]) error {
return status.Errorf(codes.Unimplemented, "method ProvisionResource not implemented")
}
func (UnimplementedProvisionerServer) Stop(context.Context, *Stop_Request) (*Stop_Response, error) {
return nil, status.Errorf(codes.Unimplemented, "method Stop not implemented")
}
func (UnimplementedProvisionerServer) mustEmbedUnimplementedProvisionerServer() {}
+func (UnimplementedProvisionerServer) testEmbeddedByValue() {}
// UnsafeProvisionerServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to ProvisionerServer will
@@ -832,6 +1292,13 @@ type UnsafeProvisionerServer interface {
}
func RegisterProvisionerServer(s grpc.ServiceRegistrar, srv ProvisionerServer) {
+ // If the following call pancis, it indicates UnimplementedProvisionerServer was
+ // embedded by pointer and is nil. This will cause panics if an
+ // unimplemented method is ever invoked, so we test this at initialization
+ // time to prevent it from happening at runtime later due to I/O.
+ if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
+ t.testEmbeddedByValue()
+ }
s.RegisterService(&Provisioner_ServiceDesc, srv)
}
@@ -876,21 +1343,11 @@ func _Provisioner_ProvisionResource_Handler(srv interface{}, stream grpc.ServerS
if err := stream.RecvMsg(m); err != nil {
return err
}
- return srv.(ProvisionerServer).ProvisionResource(m, &provisionerProvisionResourceServer{stream})
-}
-
-type Provisioner_ProvisionResourceServer interface {
- Send(*ProvisionResource_Response) error
- grpc.ServerStream
-}
-
-type provisionerProvisionResourceServer struct {
- grpc.ServerStream
+ return srv.(ProvisionerServer).ProvisionResource(m, &grpc.GenericServerStream[ProvisionResource_Request, ProvisionResource_Response]{ServerStream: stream})
}
-func (x *provisionerProvisionResourceServer) Send(m *ProvisionResource_Response) error {
- return x.ServerStream.SendMsg(m)
-}
+// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
+type Provisioner_ProvisionResourceServer = grpc.ServerStreamingServer[ProvisionResource_Response]
func _Provisioner_Stop_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(Stop_Request)
diff --git a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/toproto/action.go b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/toproto/action.go
new file mode 100644
index 0000000000..b3af5dcc39
--- /dev/null
+++ b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/toproto/action.go
@@ -0,0 +1,75 @@
+// Copyright (c) HashiCorp, Inc.
+// SPDX-License-Identifier: MPL-2.0
+
+package toproto
+
+import (
+ "fmt"
+
+ "github.com/hashicorp/terraform-plugin-go/tfprotov5"
+ "github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5"
+)
+
+func GetMetadata_ActionMetadata(in *tfprotov5.ActionMetadata) *tfplugin5.GetMetadata_ActionMetadata {
+ if in == nil {
+ return nil
+ }
+
+ return &tfplugin5.GetMetadata_ActionMetadata{
+ TypeName: in.TypeName,
+ }
+}
+
+func ValidateActionConfig_Response(in *tfprotov5.ValidateActionConfigResponse) *tfplugin5.ValidateActionConfig_Response {
+ if in == nil {
+ return nil
+ }
+
+ return &tfplugin5.ValidateActionConfig_Response{
+ Diagnostics: Diagnostics(in.Diagnostics),
+ }
+}
+
+func PlanAction_Response(in *tfprotov5.PlanActionResponse) *tfplugin5.PlanAction_Response {
+ if in == nil {
+ return nil
+ }
+
+ resp := &tfplugin5.PlanAction_Response{
+ Diagnostics: Diagnostics(in.Diagnostics),
+ Deferred: Deferred(in.Deferred),
+ }
+
+ return resp
+}
+
+func InvokeAction_InvokeActionEvent(in *tfprotov5.InvokeActionEvent) *tfplugin5.InvokeAction_Event {
+ if in == nil {
+ return nil
+ }
+
+ switch event := (in.Type).(type) {
+ case tfprotov5.ProgressInvokeActionEventType:
+ return &tfplugin5.InvokeAction_Event{
+ Type: &tfplugin5.InvokeAction_Event_Progress_{
+ Progress: &tfplugin5.InvokeAction_Event_Progress{
+ Message: event.Message,
+ },
+ },
+ }
+ case tfprotov5.CompletedInvokeActionEventType:
+ return &tfplugin5.InvokeAction_Event{
+ Type: &tfplugin5.InvokeAction_Event_Completed_{
+ Completed: &tfplugin5.InvokeAction_Event_Completed{
+ Diagnostics: Diagnostics(event.Diagnostics),
+ },
+ },
+ }
+ }
+
+ // It is not currently possible to create tfprotov5.InvokeActionEventType
+ // implementations outside the tfprotov5 package. If this panic was reached,
+ // it implies that a new event type was introduced and needs to be implemented
+ // as a new case above.
+ panic(fmt.Sprintf("unimplemented tfprotov5.InvokeActionEventType type: %T", in.Type))
+}
diff --git a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/toproto/action_schema.go b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/toproto/action_schema.go
new file mode 100644
index 0000000000..4c91458b27
--- /dev/null
+++ b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/toproto/action_schema.go
@@ -0,0 +1,21 @@
+// Copyright (c) HashiCorp, Inc.
+// SPDX-License-Identifier: MPL-2.0
+
+package toproto
+
+import (
+ "github.com/hashicorp/terraform-plugin-go/tfprotov5"
+ "github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5"
+)
+
+func ActionSchema(in *tfprotov5.ActionSchema) *tfplugin5.ActionSchema {
+ if in == nil {
+ return nil
+ }
+
+ resp := &tfplugin5.ActionSchema{
+ Schema: Schema(in.Schema),
+ }
+
+ return resp
+}
diff --git a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/toproto/ephemeral_resource.go b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/toproto/ephemeral_resource.go
new file mode 100644
index 0000000000..952f5d9673
--- /dev/null
+++ b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/toproto/ephemeral_resource.go
@@ -0,0 +1,65 @@
+// Copyright (c) HashiCorp, Inc.
+// SPDX-License-Identifier: MPL-2.0
+
+package toproto
+
+import (
+ "github.com/hashicorp/terraform-plugin-go/tfprotov5"
+ "github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5"
+)
+
+func GetMetadata_EphemeralResourceMetadata(in *tfprotov5.EphemeralResourceMetadata) *tfplugin5.GetMetadata_EphemeralResourceMetadata {
+ if in == nil {
+ return nil
+ }
+
+ return &tfplugin5.GetMetadata_EphemeralResourceMetadata{
+ TypeName: in.TypeName,
+ }
+}
+
+func ValidateEphemeralResourceConfig_Response(in *tfprotov5.ValidateEphemeralResourceConfigResponse) *tfplugin5.ValidateEphemeralResourceConfig_Response {
+ if in == nil {
+ return nil
+ }
+
+ return &tfplugin5.ValidateEphemeralResourceConfig_Response{
+ Diagnostics: Diagnostics(in.Diagnostics),
+ }
+}
+
+func OpenEphemeralResource_Response(in *tfprotov5.OpenEphemeralResourceResponse) *tfplugin5.OpenEphemeralResource_Response {
+ if in == nil {
+ return nil
+ }
+
+ return &tfplugin5.OpenEphemeralResource_Response{
+ Result: DynamicValue(in.Result),
+ Diagnostics: Diagnostics(in.Diagnostics),
+ Private: in.Private,
+ RenewAt: Timestamp(in.RenewAt),
+ Deferred: Deferred(in.Deferred),
+ }
+}
+
+func RenewEphemeralResource_Response(in *tfprotov5.RenewEphemeralResourceResponse) *tfplugin5.RenewEphemeralResource_Response {
+ if in == nil {
+ return nil
+ }
+
+ return &tfplugin5.RenewEphemeralResource_Response{
+ Diagnostics: Diagnostics(in.Diagnostics),
+ Private: in.Private,
+ RenewAt: Timestamp(in.RenewAt),
+ }
+}
+
+func CloseEphemeralResource_Response(in *tfprotov5.CloseEphemeralResourceResponse) *tfplugin5.CloseEphemeralResource_Response {
+ if in == nil {
+ return nil
+ }
+
+ return &tfplugin5.CloseEphemeralResource_Response{
+ Diagnostics: Diagnostics(in.Diagnostics),
+ }
+}
diff --git a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/toproto/list_resource.go b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/toproto/list_resource.go
new file mode 100644
index 0000000000..e4969adc02
--- /dev/null
+++ b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/toproto/list_resource.go
@@ -0,0 +1,38 @@
+// Copyright (c) HashiCorp, Inc.
+// SPDX-License-Identifier: MPL-2.0
+
+package toproto
+
+import (
+ "github.com/hashicorp/terraform-plugin-go/tfprotov5"
+ "github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5"
+)
+
+func GetMetadata_ListResourceMetadata(in *tfprotov5.ListResourceMetadata) *tfplugin5.GetMetadata_ListResourceMetadata {
+ if in == nil {
+ return nil
+ }
+
+ return &tfplugin5.GetMetadata_ListResourceMetadata{
+ TypeName: in.TypeName,
+ }
+}
+
+func ListResource_ListResourceEvent(in *tfprotov5.ListResourceResult) *tfplugin5.ListResource_Event {
+ return &tfplugin5.ListResource_Event{
+ DisplayName: in.DisplayName,
+ ResourceObject: DynamicValue(in.Resource),
+ Identity: ResourceIdentityData(in.Identity),
+ Diagnostic: Diagnostics(in.Diagnostics),
+ }
+}
+
+func ValidateListResourceConfig_Response(in *tfprotov5.ValidateListResourceConfigResponse) *tfplugin5.ValidateListResourceConfig_Response {
+ if in == nil {
+ return nil
+ }
+
+ return &tfplugin5.ValidateListResourceConfig_Response{
+ Diagnostics: Diagnostics(in.Diagnostics),
+ }
+}
diff --git a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/toproto/provider.go b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/toproto/provider.go
index 4891c53874..ad96ed36e0 100644
--- a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/toproto/provider.go
+++ b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/toproto/provider.go
@@ -14,8 +14,11 @@ func GetMetadata_Response(in *tfprotov5.GetMetadataResponse) *tfplugin5.GetMetad
}
resp := &tfplugin5.GetMetadata_Response{
+ Actions: make([]*tfplugin5.GetMetadata_ActionMetadata, 0, len(in.Actions)),
DataSources: make([]*tfplugin5.GetMetadata_DataSourceMetadata, 0, len(in.DataSources)),
Diagnostics: Diagnostics(in.Diagnostics),
+ EphemeralResources: make([]*tfplugin5.GetMetadata_EphemeralResourceMetadata, 0, len(in.EphemeralResources)),
+ ListResources: make([]*tfplugin5.GetMetadata_ListResourceMetadata, 0, len(in.ListResources)),
Functions: make([]*tfplugin5.GetMetadata_FunctionMetadata, 0, len(in.Functions)),
Resources: make([]*tfplugin5.GetMetadata_ResourceMetadata, 0, len(in.Resources)),
ServerCapabilities: ServerCapabilities(in.ServerCapabilities),
@@ -25,6 +28,14 @@ func GetMetadata_Response(in *tfprotov5.GetMetadataResponse) *tfplugin5.GetMetad
resp.DataSources = append(resp.DataSources, GetMetadata_DataSourceMetadata(&datasource))
}
+ for _, ephemeralResource := range in.EphemeralResources {
+ resp.EphemeralResources = append(resp.EphemeralResources, GetMetadata_EphemeralResourceMetadata(&ephemeralResource))
+ }
+
+ for _, listResource := range in.ListResources {
+ resp.ListResources = append(resp.ListResources, GetMetadata_ListResourceMetadata(&listResource))
+ }
+
for _, function := range in.Functions {
resp.Functions = append(resp.Functions, GetMetadata_FunctionMetadata(&function))
}
@@ -33,6 +44,10 @@ func GetMetadata_Response(in *tfprotov5.GetMetadataResponse) *tfplugin5.GetMetad
resp.Resources = append(resp.Resources, GetMetadata_ResourceMetadata(&resource))
}
+ for _, action := range in.Actions {
+ resp.Actions = append(resp.Actions, GetMetadata_ActionMetadata(&action))
+ }
+
return resp
}
@@ -42,13 +57,24 @@ func GetProviderSchema_Response(in *tfprotov5.GetProviderSchemaResponse) *tfplug
}
resp := &tfplugin5.GetProviderSchema_Response{
- DataSourceSchemas: make(map[string]*tfplugin5.Schema, len(in.DataSourceSchemas)),
- Diagnostics: Diagnostics(in.Diagnostics),
- Functions: make(map[string]*tfplugin5.Function, len(in.Functions)),
- Provider: Schema(in.Provider),
- ProviderMeta: Schema(in.ProviderMeta),
- ResourceSchemas: make(map[string]*tfplugin5.Schema, len(in.ResourceSchemas)),
- ServerCapabilities: ServerCapabilities(in.ServerCapabilities),
+ ActionSchemas: make(map[string]*tfplugin5.ActionSchema, len(in.ActionSchemas)),
+ DataSourceSchemas: make(map[string]*tfplugin5.Schema, len(in.DataSourceSchemas)),
+ Diagnostics: Diagnostics(in.Diagnostics),
+ EphemeralResourceSchemas: make(map[string]*tfplugin5.Schema, len(in.EphemeralResourceSchemas)),
+ ListResourceSchemas: make(map[string]*tfplugin5.Schema, len(in.ListResourceSchemas)),
+ Functions: make(map[string]*tfplugin5.Function, len(in.Functions)),
+ Provider: Schema(in.Provider),
+ ProviderMeta: Schema(in.ProviderMeta),
+ ResourceSchemas: make(map[string]*tfplugin5.Schema, len(in.ResourceSchemas)),
+ ServerCapabilities: ServerCapabilities(in.ServerCapabilities),
+ }
+
+ for name, schema := range in.EphemeralResourceSchemas {
+ resp.EphemeralResourceSchemas[name] = Schema(schema)
+ }
+
+ for name, schema := range in.ListResourceSchemas {
+ resp.ListResourceSchemas[name] = Schema(schema)
}
for name, schema := range in.ResourceSchemas {
@@ -63,6 +89,27 @@ func GetProviderSchema_Response(in *tfprotov5.GetProviderSchemaResponse) *tfplug
resp.Functions[name] = Function(function)
}
+ for name, actionSchema := range in.ActionSchemas {
+ resp.ActionSchemas[name] = ActionSchema(actionSchema)
+ }
+
+ return resp
+}
+
+func GetResourceIdentitySchemas_Response(in *tfprotov5.GetResourceIdentitySchemasResponse) *tfplugin5.GetResourceIdentitySchemas_Response {
+ if in == nil {
+ return nil
+ }
+
+ resp := &tfplugin5.GetResourceIdentitySchemas_Response{
+ Diagnostics: Diagnostics(in.Diagnostics),
+ IdentitySchemas: make(map[string]*tfplugin5.ResourceIdentitySchema, len(in.IdentitySchemas)),
+ }
+
+ for name, schema := range in.IdentitySchemas {
+ resp.IdentitySchemas[name] = ResourceIdentitySchema(schema)
+ }
+
return resp
}
diff --git a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/toproto/resource.go b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/toproto/resource.go
index 8e65712e97..214f757a06 100644
--- a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/toproto/resource.go
+++ b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/toproto/resource.go
@@ -45,6 +45,19 @@ func UpgradeResourceState_Response(in *tfprotov5.UpgradeResourceStateResponse) *
return resp
}
+func UpgradeResourceIdentity_Response(in *tfprotov5.UpgradeResourceIdentityResponse) *tfplugin5.UpgradeResourceIdentity_Response {
+ if in == nil {
+ return nil
+ }
+
+ resp := &tfplugin5.UpgradeResourceIdentity_Response{
+ Diagnostics: Diagnostics(in.Diagnostics),
+ UpgradedIdentity: ResourceIdentityData(in.UpgradedIdentity),
+ }
+
+ return resp
+}
+
func ReadResource_Response(in *tfprotov5.ReadResourceResponse) *tfplugin5.ReadResource_Response {
if in == nil {
return nil
@@ -55,6 +68,7 @@ func ReadResource_Response(in *tfprotov5.ReadResourceResponse) *tfplugin5.ReadRe
NewState: DynamicValue(in.NewState),
Private: in.Private,
Deferred: Deferred(in.Deferred),
+ NewIdentity: ResourceIdentityData(in.NewIdentity),
}
return resp
@@ -72,6 +86,7 @@ func PlanResourceChange_Response(in *tfprotov5.PlanResourceChangeResponse) *tfpl
PlannedState: DynamicValue(in.PlannedState),
RequiresReplace: AttributePaths(in.RequiresReplace),
Deferred: Deferred(in.Deferred),
+ PlannedIdentity: ResourceIdentityData(in.PlannedIdentity),
}
return resp
@@ -87,6 +102,7 @@ func ApplyResourceChange_Response(in *tfprotov5.ApplyResourceChangeResponse) *tf
LegacyTypeSystem: in.UnsafeToUseLegacyTypeSystem, //nolint:staticcheck
NewState: DynamicValue(in.NewState),
Private: in.Private,
+ NewIdentity: ResourceIdentityData(in.NewIdentity),
}
return resp
@@ -115,6 +131,7 @@ func ImportResourceState_ImportedResource(in *tfprotov5.ImportedResource) *tfplu
Private: in.Private,
State: DynamicValue(in.State),
TypeName: in.TypeName,
+ Identity: ResourceIdentityData(in.Identity),
}
return resp
@@ -136,9 +153,10 @@ func MoveResourceState_Response(in *tfprotov5.MoveResourceStateResponse) *tfplug
}
resp := &tfplugin5.MoveResourceState_Response{
- Diagnostics: Diagnostics(in.Diagnostics),
- TargetPrivate: in.TargetPrivate,
- TargetState: DynamicValue(in.TargetState),
+ Diagnostics: Diagnostics(in.Diagnostics),
+ TargetPrivate: in.TargetPrivate,
+ TargetState: DynamicValue(in.TargetState),
+ TargetIdentity: ResourceIdentityData(in.TargetIdentity),
}
return resp
diff --git a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/toproto/resource_identity_data.go b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/toproto/resource_identity_data.go
new file mode 100644
index 0000000000..80ceb84a13
--- /dev/null
+++ b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/toproto/resource_identity_data.go
@@ -0,0 +1,21 @@
+// Copyright (c) HashiCorp, Inc.
+// SPDX-License-Identifier: MPL-2.0
+
+package toproto
+
+import (
+ "github.com/hashicorp/terraform-plugin-go/tfprotov5"
+ "github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5"
+)
+
+func ResourceIdentityData(in *tfprotov5.ResourceIdentityData) *tfplugin5.ResourceIdentityData {
+ if in == nil {
+ return nil
+ }
+
+ resp := &tfplugin5.ResourceIdentityData{
+ IdentityData: DynamicValue(in.IdentityData),
+ }
+
+ return resp
+}
diff --git a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/toproto/resource_identity_schema.go b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/toproto/resource_identity_schema.go
new file mode 100644
index 0000000000..6226813d91
--- /dev/null
+++ b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/toproto/resource_identity_schema.go
@@ -0,0 +1,52 @@
+// Copyright (c) HashiCorp, Inc.
+// SPDX-License-Identifier: MPL-2.0
+
+package toproto
+
+import (
+ "github.com/hashicorp/terraform-plugin-go/tfprotov5"
+ "github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5"
+)
+
+func ResourceIdentitySchema(in *tfprotov5.ResourceIdentitySchema) *tfplugin5.ResourceIdentitySchema {
+ if in == nil {
+ return nil
+ }
+
+ resp := &tfplugin5.ResourceIdentitySchema{
+ Version: in.Version,
+ IdentityAttributes: ResourceIdentitySchema_IdentityAttributes(in.IdentityAttributes),
+ }
+
+ return resp
+}
+
+func ResourceIdentitySchema_IdentityAttribute(in *tfprotov5.ResourceIdentitySchemaAttribute) *tfplugin5.ResourceIdentitySchema_IdentityAttribute {
+ if in == nil {
+ return nil
+ }
+
+ resp := &tfplugin5.ResourceIdentitySchema_IdentityAttribute{
+ Name: in.Name,
+ Type: CtyType(in.Type),
+ RequiredForImport: in.RequiredForImport,
+ OptionalForImport: in.OptionalForImport,
+ Description: in.Description,
+ }
+
+ return resp
+}
+
+func ResourceIdentitySchema_IdentityAttributes(in []*tfprotov5.ResourceIdentitySchemaAttribute) []*tfplugin5.ResourceIdentitySchema_IdentityAttribute {
+ if in == nil {
+ return nil
+ }
+
+ resp := make([]*tfplugin5.ResourceIdentitySchema_IdentityAttribute, 0, len(in))
+
+ for _, a := range in {
+ resp = append(resp, ResourceIdentitySchema_IdentityAttribute(a))
+ }
+
+ return resp
+}
diff --git a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/toproto/schema.go b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/toproto/schema.go
index 69d47af1a2..30cabc1e29 100644
--- a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/toproto/schema.go
+++ b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/toproto/schema.go
@@ -53,6 +53,7 @@ func Schema_Attribute(in *tfprotov5.SchemaAttribute) *tfplugin5.Schema_Attribute
Required: in.Required,
Sensitive: in.Sensitive,
Type: CtyType(in.Type),
+ WriteOnly: in.WriteOnly,
}
return resp
diff --git a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/toproto/timestamp.go b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/toproto/timestamp.go
new file mode 100644
index 0000000000..3ee28365e9
--- /dev/null
+++ b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/toproto/timestamp.go
@@ -0,0 +1,18 @@
+// Copyright (c) HashiCorp, Inc.
+// SPDX-License-Identifier: MPL-2.0
+
+package toproto
+
+import (
+ "time"
+
+ "google.golang.org/protobuf/types/known/timestamppb"
+)
+
+func Timestamp(in time.Time) *timestamppb.Timestamp {
+ if in.IsZero() {
+ return nil
+ }
+
+ return timestamppb.New(in)
+}
diff --git a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/list_resource.go b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/list_resource.go
new file mode 100644
index 0000000000..f8ff26e7e1
--- /dev/null
+++ b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/list_resource.go
@@ -0,0 +1,130 @@
+// Copyright (c) HashiCorp, Inc.
+// SPDX-License-Identifier: MPL-2.0
+
+package tfprotov5
+
+import (
+ "context"
+ "iter"
+)
+
+// ListResourceMetadata describes metadata for a list resource in the GetMetadata
+// RPC.
+type ListResourceMetadata struct {
+ // TypeName is the name of the list resource.
+ TypeName string
+}
+
+// ListResourceRequest is the request Terraform sends when it wants to evaluate
+// a list block, typically in response to a `terraform query` command.
+type ListResourceRequest struct {
+ // TypeName is the type of list resource that Terraform is evaluating.
+ TypeName string
+
+ // Config is the configuration the user supplied for a list block. See the
+ // documentation on `DynamicValue` for more information about safely
+ // accessing the configuration.
+ //
+ // The configuration is represented as a tftypes.Object, with each
+ // attribute and nested block getting its own key and value.
+ //
+ // This configuration may contain unknown values if a user uses
+ // interpolation or other functionality that would prevent Terraform from
+ // knowing the value at request time. Any attributes not directly set in
+ // the configuration will be null.
+ Config *DynamicValue
+
+ // IncludeResource is a boolean indicating whether to populate the Resource
+ // field in list results.
+ IncludeResource bool // TODO: propose rename in protocol: IncludeResourceObject -> IncludeResource
+
+ // Limit specifies the maximum number of results that Terraform is expecting.
+ Limit int64
+}
+
+// ListResourceServerStream represents a streaming response to a
+// ListResourceRequest. An instance of this struct is supplied as an argument
+// to the provider's ListResource implementation. The provider should set a
+// Results iterator function that pushes zero or more results of type
+// ListResourceResult.
+//
+// For convenience, a provider implementation may choose to convert a slice of
+// results into an iterator using [slices.Values].
+//
+// [slices.Values]: https://pkg.go.dev/slices#Values
+type ListResourceServerStream struct {
+ Results iter.Seq[ListResourceResult]
+}
+
+// NoListResults is a convenient value to return when there are no list results.
+var NoListResults = func(func(ListResourceResult) bool) {}
+
+type ListResourceResult struct { // TODO: propose rename in protocol: ListResource_Event -> ListResource_Result
+ // DisplayName is the display name of the resource. This is a ...
+ DisplayName string
+
+ // Resource is the data for the resource, as determined by the provider.
+ Resource *DynamicValue // TODO: propose rename in protocol: ResourceObject -> Resource
+
+ // Identity is the identity data for the resource, as determined by the
+ // provider.
+ Identity *ResourceIdentityData
+
+ // Diagnostics report errors or warnings related to retrieving the current
+ // state of the resource. An empty slice indicates a successful validation
+ // with no warnings or errors.
+ Diagnostics []*Diagnostic
+}
+
+// ListResourceServer is an interface containing the methods an list resource
+// implementation needs to fill.
+type ListResourceServer interface {
+ // ValidateListResourceConfig is called when Terraform is checking that an
+ // list resource configuration is valid. It is guaranteed to have types
+ // conforming to your schema, but it is not guaranteed that all values
+ // will be known. This is your opportunity to do custom or advanced
+ // validation prior to a list resource being used.
+ ValidateListResourceConfig(context.Context, *ValidateListResourceConfigRequest) (*ValidateListResourceConfigResponse, error)
+
+ // ListResource is called when Terraform is evaluating a list block,
+ // typically in response to a `terraform query` command.
+ ListResource(context.Context, *ListResourceRequest) (*ListResourceServerStream, error)
+}
+
+// ValidateListResourceConfigRequest is the request Terraform sends when it
+// wants to validate an list resource's configuration.
+type ValidateListResourceConfigRequest struct {
+ // TypeName is the type of list resource Terraform is validating.
+ TypeName string
+
+ // Config is the configuration the user supplied for a list block. See the
+ // documentation on `DynamicValue` for more information about safely
+ // accessing the configuration.
+ //
+ // The configuration is represented as a tftypes.Object, with each
+ // attribute and nested block getting its own key and value.
+ //
+ // This configuration may contain unknown values if a user uses
+ // interpolation or other functionality that would prevent Terraform from
+ // knowing the value at request time. Any attributes not directly set in
+ // the configuration will be null.
+ Config *DynamicValue
+
+ // IncludeResourceObject is the value of the include_resource
+ // argument in the list block. This is a DynamicValue so that it can
+ // contain unknown values.
+ IncludeResourceObject *DynamicValue
+
+ // Limit is the maximum number of results to return. This is a
+ // DynamicValue so that it can contain unknown values.
+ Limit *DynamicValue
+}
+
+// ValidateListResourceConfigResponse is the response from the provider about
+// the validity of an list resource's configuration.
+type ValidateListResourceConfigResponse struct {
+ // Diagnostics report errors or warnings related to the given
+ // configuration. Returning an empty slice indicates a successful
+ // validation with no warnings or errors generated.
+ Diagnostics []*Diagnostic
+}
diff --git a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/provider.go b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/provider.go
index 799f90238a..0521479b9d 100644
--- a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/provider.go
+++ b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/provider.go
@@ -22,6 +22,10 @@ type ProviderServer interface {
// and data sources.
GetProviderSchema(context.Context, *GetProviderSchemaRequest) (*GetProviderSchemaResponse, error)
+ // GetResourceIdentitySchemas is called when Terraform needs to know
+ // what the provider's resource identity schemas are.
+ GetResourceIdentitySchemas(context.Context, *GetResourceIdentitySchemasRequest) (*GetResourceIdentitySchemasResponse, error)
+
// PrepareProviderConfig is called to give a provider a chance to
// modify the configuration the user specified before validation.
PrepareProviderConfig(context.Context, *PrepareProviderConfigRequest) (*PrepareProviderConfigResponse, error)
@@ -54,6 +58,55 @@ type ProviderServer interface {
// terraform-plugin-go, so they are their own interface that is composed
// into ProviderServer.
FunctionServer
+
+ // EphemeralResourceServer is an interface encapsulating all the ephemeral
+ // resource-related RPC requests. ProviderServer implementations must
+ // implement them, but they are a handy interface for defining what an
+ // ephemeral resource is to terraform-plugin-go, so they're their own
+ // interface that is composed into ProviderServer.
+ EphemeralResourceServer
+
+ /* // Add this back once temporary interface is removed
+ // ListResourceServer is an interface encapsulating all the list
+ // resource-related RPC requests.
+ ListResourceServer*/
+
+ /* // Add this back once temporary interface is removed
+ // ActionServer is an interface encapsulating all the action-related RPC requests.
+ ActionServer*/
+}
+
+// ProviderServerWithListResource is a temporary interface for servers
+// to implement List Resource RPC handling with:
+//
+// - ListResource
+// - ValidateListResourceConfig
+//
+// Deprecated: All methods will be moved into the
+// ProviderServer and ResourceServer interfaces and this interface will be removed in a future
+// version.
+type ProviderServerWithListResource interface {
+ ProviderServer
+
+ // ListResourceServer is an interface encapsulating all the list
+ // resource-related RPC requests.
+ ListResourceServer
+}
+
+// ProviderServerWithActions is a temporary interface for servers
+// to implement Action RPCs
+//
+// - PlanAction
+// - InvokeAction
+//
+// Deprecated: All methods will be moved into the
+// ProviderServer interface and this interface will be removed in a future
+// version.
+type ProviderServerWithActions interface {
+ ProviderServer
+
+ // ActionServer is an interface encapsulating all the action-related RPC requests.
+ ActionServer
}
// GetMetadataRequest represents a GetMetadata RPC request.
@@ -78,6 +131,15 @@ type GetMetadataResponse struct {
// Resources returns metadata for all managed resources.
Resources []ResourceMetadata
+
+ // EphemeralResources returns metadata for all ephemeral resources.
+ EphemeralResources []EphemeralResourceMetadata
+
+ // ListResources returns metadata for all list resources.
+ ListResources []ListResourceMetadata
+
+ // Actions returns metadata for all actions.
+ Actions []ActionMetadata
}
// GetProviderSchemaRequest represents a Terraform RPC request for the
@@ -124,12 +186,47 @@ type GetProviderSchemaResponse struct {
// includes the provider name.
Functions map[string]*Function
+ // EphemeralResourceSchemas is a map of ephemeral resource names to the schema for
+ // the configuration specified in the ephemeral resource. The name should be an
+ // ephemeral resource name, and should be prefixed with your provider's
+ // shortname and an underscore. It should match the first label after
+ // `ephemeral` in a user's configuration.
+ EphemeralResourceSchemas map[string]*Schema
+
+ // ListResourceSchemas is a map of list resource schemas and names.
+ ListResourceSchemas map[string]*Schema
+
+ // ActionSchemas is a map of action names to their schema and action type.
+ // The name should be an action name that is prefixed with your provider's
+ // shortname and an underscore.
+ ActionSchemas map[string]*ActionSchema
+
// Diagnostics report errors or warnings related to returning the
// provider's schemas. Returning an empty slice indicates success, with
// no errors or warnings generated.
Diagnostics []*Diagnostic
}
+// GetResourceIdentitySchemasRequest represents a Terraform RPC request for the
+// provider's resource identity schemas.
+type GetResourceIdentitySchemasRequest struct{}
+
+// GetResourceIdentitySchemasResponse represents a Terraform RPC response containing
+// the provider's resource identity schemas.
+type GetResourceIdentitySchemasResponse struct {
+ // IdentitySchemas is a map of resource names to the schema for the
+ // identity specified for the resource. The name should be a
+ // resource name, and should be prefixed with your provider's shortname
+ // and an underscore. It should match the first label after `resource`
+ // in a user's configuration.
+ IdentitySchemas map[string]*ResourceIdentitySchema
+
+ // Diagnostics report errors or warnings related to returning the
+ // provider's resource identity schemas. Returning an empty slice
+ // indicates success, with no errors or warnings generated.
+ Diagnostics []*Diagnostic
+}
+
// PrepareProviderConfigRequest represents a Terraform RPC request for the
// provider to modify the provider configuration in preparation for Terraform
// validating it.
diff --git a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/resource.go b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/resource.go
index 9e50a0ce6c..8b7a7c0aad 100644
--- a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/resource.go
+++ b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/resource.go
@@ -63,26 +63,12 @@ type ResourceServer interface {
// provider must have enabled the MoveResourceState server capability to
// enable these requests.
MoveResourceState(context.Context, *MoveResourceStateRequest) (*MoveResourceStateResponse, error)
-}
-
-// ResourceServerWithMoveResourceState is a temporary interface for servers
-// to implement MoveResourceState RPC handling.
-//
-// Deprecated: This interface will be removed in a future version. Use
-// ResourceServer instead.
-type ResourceServerWithMoveResourceState interface {
- ResourceServer
- // MoveResourceState is called when Terraform is asked to change a resource
- // type for an existing resource. The provider must accept the change as
- // valid by ensuring the source resource type, schema version, and provider
- // address are compatible to convert the source state into the target
- // resource type and latest state version.
- //
- // This functionality is only supported in Terraform 1.8 and later. The
- // provider must have enabled the MoveResourceState server capability to
- // enable these requests.
- MoveResourceState(context.Context, *MoveResourceStateRequest) (*MoveResourceStateResponse, error)
+ // UpgradeResourceIdentity is called when Terraform has encountered a
+ // resource with an identity state in a schema that doesn't match the schema's
+ // current version. It is the provider's responsibility to modify the
+ // identity state to upgrade it to the latest state schema.
+ UpgradeResourceIdentity(context.Context, *UpgradeResourceIdentityRequest) (*UpgradeResourceIdentityResponse, error)
}
// ValidateResourceTypeConfigRequest is the request Terraform sends when it
@@ -103,6 +89,10 @@ type ValidateResourceTypeConfigRequest struct {
// from knowing the value at request time. Any attributes not directly
// set in the configuration will be null.
Config *DynamicValue
+
+ // ClientCapabilities defines optionally supported protocol features for the
+ // ValidateResourceTypeConfig RPC, such as forward-compatible Terraform behavior changes.
+ ClientCapabilities *ValidateResourceTypeConfigClientCapabilities
}
// ValidateResourceTypeConfigResponse is the response from the provider about
@@ -150,6 +140,31 @@ type UpgradeResourceStateResponse struct {
Diagnostics []*Diagnostic
}
+type UpgradeResourceIdentityRequest struct {
+ // TypeName is the type of resource that Terraform needs to upgrade the
+ // identity state for.
+ TypeName string
+
+ // Version is the version of the identity state the resource currently has.
+ Version int64
+
+ // RawIdentity is the identity state as Terraform sees it right now. See the
+ // documentation for `RawIdentity` for information on how to work with the
+ // data it contains.
+ RawIdentity *RawState
+}
+
+type UpgradeResourceIdentityResponse struct {
+ // UpgradedIdentity is the upgraded identity for the resource, represented as
+ // a `ResourceIdentityData`.
+ UpgradedIdentity *ResourceIdentityData
+
+ // Diagnostics report errors or warnings related to upgrading the
+ // identity of the requested resource. Returning an empty slice indicates
+ // a successful validation with no warnings or errors generated.
+ Diagnostics []*Diagnostic
+}
+
// ReadResourceRequest is the request Terraform sends when it wants to get the
// latest state for a resource.
type ReadResourceRequest struct {
@@ -191,6 +206,10 @@ type ReadResourceRequest struct {
// ClientCapabilities defines optionally supported protocol features for the
// ReadResource RPC, such as forward-compatible Terraform behavior changes.
ClientCapabilities *ReadResourceClientCapabilities
+
+ // CurrentIdentity is the current identity of the resource as far as
+ // Terraform knows, represented as a `ResourceIdentityData`.
+ CurrentIdentity *ResourceIdentityData
}
// ReadResourceResponse is the response from the provider about the current
@@ -219,6 +238,10 @@ type ReadResourceResponse struct {
// Deferred is used to indicate to Terraform that the ReadResource operation
// needs to be deferred for a reason.
Deferred *Deferred
+
+ // NewIdentity is the current identity of the resource according to the
+ // provider, represented as a `ResourceIdentityData`.
+ NewIdentity *ResourceIdentityData
}
// PlanResourceChangeRequest is the request Terraform sends when it is
@@ -289,6 +312,10 @@ type PlanResourceChangeRequest struct {
// ClientCapabilities defines optionally supported protocol features for the
// PlanResourceChange RPC, such as forward-compatible Terraform behavior changes.
ClientCapabilities *PlanResourceChangeClientCapabilities
+
+ // PriorIdentity is the identity of the resource before the plan is
+ // applied, represented as a `ResourceIdentityData`.
+ PriorIdentity *ResourceIdentityData
}
// PlanResourceChangeResponse is the response from the provider about what the
@@ -371,6 +398,10 @@ type PlanResourceChangeResponse struct {
// Deferred is used to indicate to Terraform that the PlanResourceChange operation
// needs to be deferred for a reason.
Deferred *Deferred
+
+ // PlannedIdentity is the provider's indication of what the identity for the
+ // resource should be after apply, represented as a `ResourceIdentityData`
+ PlannedIdentity *ResourceIdentityData
}
// ApplyResourceChangeRequest is the request Terraform sends when it needs to
@@ -433,6 +464,10 @@ type ApplyResourceChangeRequest struct {
//
// This configuration will have known values for all fields.
ProviderMeta *DynamicValue
+
+ // PlannedIdentity is Terraform's plan for what the resource identity should look like
+ // after the changes are applied, represented as a `ResourceIdentityData`.
+ PlannedIdentity *ResourceIdentityData
}
// ApplyResourceChangeResponse is the response from the provider about what the
@@ -478,6 +513,10 @@ type ApplyResourceChangeResponse struct {
//
// Deprecated: Really, just don't use this, you don't need it.
UnsafeToUseLegacyTypeSystem bool
+
+ // NewIdentity is the provider's understanding of what the resource's
+ // identity is after changes are applied, represented as a `ResourceIdentityData`.
+ NewIdentity *ResourceIdentityData
}
// ImportResourceStateRequest is the request Terraform sends when it wants a
@@ -490,11 +529,17 @@ type ImportResourceStateRequest struct {
// or resources. Providers decide and communicate to users the format
// for the ID, and use it to determine what resource or resources to
// import.
+ // ID is mutually exclusive with Identity
ID string
// ClientCapabilities defines optionally supported protocol features for the
// ImportResourceState RPC, such as forward-compatible Terraform behavior changes.
ClientCapabilities *ImportResourceStateClientCapabilities
+
+ // Identity is the user-supplied identifying information about the resource
+ // in the form of a `ResourceIdentityData`.
+ // Identity is mutually exclusive with ID.
+ Identity *ResourceIdentityData
}
// ImportResourceStateResponse is the response from the provider about the
@@ -533,6 +578,10 @@ type ImportedResource struct {
// with requests for this resource. This state will be associated with
// the resource, but will not be considered when calculating diffs.
Private []byte
+
+ // Identity is the identity of the imported resource in the form
+ // of a `ResourceIdentityData`.
+ Identity *ResourceIdentityData
}
// MoveResourceStateRequest is the request Terraform sends when it requests a
@@ -564,6 +613,14 @@ type MoveResourceStateRequest struct {
// TargetTypeName is the target resource type for the move request.
TargetTypeName string
+
+ // SourceIdentity is the identity of the source resource.
+ //
+ // Only the underlying JSON field is populated.
+ SourceIdentity *RawState
+
+ // SourceIdentitySchemaVersion is the version of the source resource state.
+ SourceIdentitySchemaVersion int64
}
// MoveResourceStateResponse is the response from the provider containing
@@ -577,4 +634,7 @@ type MoveResourceStateResponse struct {
// Diagnostics report any warnings or errors related to moving the state.
Diagnostics []*Diagnostic
+
+ // TargetIdentity is the identity of the target resource.
+ TargetIdentity *ResourceIdentityData
}
diff --git a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/resource_identity_data.go b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/resource_identity_data.go
new file mode 100644
index 0000000000..90256ddd7a
--- /dev/null
+++ b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/resource_identity_data.go
@@ -0,0 +1,15 @@
+// Copyright (c) HashiCorp, Inc.
+// SPDX-License-Identifier: MPL-2.0
+
+package tfprotov5
+
+// ResourceIdentityData contains the raw undecoded identity data
+// for a resource.
+type ResourceIdentityData struct {
+ // IdentityData is represented as a `DynamicValue`. See the documentation for
+ // `DynamicValue` for information about safely creating the
+ // `DynamicValue`.
+ // The identity should be represented as a tftypes.Object, with each
+ // attribute and nested block getting its own key and value.
+ IdentityData *DynamicValue
+}
diff --git a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/resource_identity_schema.go b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/resource_identity_schema.go
new file mode 100644
index 0000000000..670f763a1e
--- /dev/null
+++ b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/resource_identity_schema.go
@@ -0,0 +1,100 @@
+// Copyright (c) HashiCorp, Inc.
+// SPDX-License-Identifier: MPL-2.0
+
+package tfprotov5
+
+import "github.com/hashicorp/terraform-plugin-go/tftypes"
+
+// ResourceIdentitySchema is the identity schema for a Resource.
+type ResourceIdentitySchema struct {
+ // Version indicates which version of the schema this is. Versions
+ // should be monotonically incrementing numbers. When Terraform
+ // encounters a resource identity stored in state with a schema version
+ // lower that the identity schema version the provider advertises for
+ // that resource, Terraform requests the provider upgrade the resource's
+ // identity state.
+ Version int64
+
+ // IdentityAttributes is a list of attributes that uniquely identify a
+ // resource. These attributes are used to identify a resource in the
+ // state and to import existing resources into the state.
+ IdentityAttributes []*ResourceIdentitySchemaAttribute
+}
+
+// ValueType returns the tftypes.Type for a ResourceIdentitySchema.
+//
+// If ResourceIdentitySchema is missing, an empty Object is returned.
+func (s *ResourceIdentitySchema) ValueType() tftypes.Type {
+ if s == nil {
+ return tftypes.Object{
+ AttributeTypes: map[string]tftypes.Type{},
+ }
+ }
+
+ attributeTypes := map[string]tftypes.Type{}
+
+ for _, attribute := range s.IdentityAttributes {
+ if attribute == nil {
+ continue
+ }
+
+ attributeType := attribute.ValueType()
+
+ if attributeType == nil {
+ continue
+ }
+
+ attributeTypes[attribute.Name] = attributeType
+ }
+
+ return tftypes.Object{
+ AttributeTypes: attributeTypes,
+ }
+}
+
+// ResourceIdentitySchemaAttribute represents one value of data within
+// resource identity.
+// These are always used in resource identity comparisons.
+type ResourceIdentitySchemaAttribute struct {
+ // Name is the name of the attribute. This is what the user will put
+ // before the equals sign to assign a value to this attribute during import.
+ Name string
+
+ // Type indicates the type of data the attribute expects. See the
+ // documentation for the tftypes package for information on what types
+ // are supported and their behaviors.
+ // For resource identity Terraform core only supports the following types:
+ // - bool
+ // - number
+ // - string
+ // - list of bool
+ // - list of number
+ // - list of string
+ Type tftypes.Type
+
+ // RequiredForImport indicates whether this attribute is required to
+ // import the resource. For example it might be false if the value
+ // can be derived from provider configuration. Either this or OptionalForImport
+ // needs to be true.
+ RequiredForImport bool
+
+ // OptionalForImport indicates whether this attribute is optional to
+ // import the resource. For example it might be true if the value
+ // can be derived from provider configuration. Either this or RequiredForImport
+ // needs to be true.
+ OptionalForImport bool
+
+ // Description is a human-readable description of the attribute.
+ Description string
+}
+
+// ValueType returns the tftypes.Type for a ResourceIdentitySchemaAttribute.
+//
+// If ResourceIdentitySchemaAttribute is missing, nil is returned.
+func (s *ResourceIdentitySchemaAttribute) ValueType() tftypes.Type {
+ if s == nil {
+ return nil
+ }
+
+ return s.Type
+}
diff --git a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/schema.go b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/schema.go
index 9b860275f1..a91dbd7cad 100644
--- a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/schema.go
+++ b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/schema.go
@@ -221,6 +221,12 @@ type SchemaAttribute struct {
// experiences. Providers should set it when deprecating attributes in
// preparation for these tools.
Deprecated bool
+
+ // WriteOnly, when set to true, indicates that the attribute value will
+ // be provided via configuration and must be omitted from plan and state response objects. WriteOnly
+ // must be combined with Optional or Required, and is only valid for managed
+ // resource schemas.
+ WriteOnly bool
}
// ValueType returns the tftypes.Type for a SchemaAttribute.
diff --git a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server/server.go b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server/server.go
index 17c5c147ae..6777f04494 100644
--- a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server/server.go
+++ b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server/server.go
@@ -17,19 +17,22 @@ import (
"time"
"google.golang.org/grpc"
+ "google.golang.org/grpc/codes"
+ "google.golang.org/grpc/status"
+
+ "github.com/hashicorp/go-hclog"
+ "github.com/hashicorp/go-plugin"
+ "github.com/hashicorp/terraform-plugin-log/tflog"
+ "github.com/hashicorp/terraform-plugin-log/tfsdklog"
+ "github.com/mitchellh/go-testing-interface"
"github.com/hashicorp/terraform-plugin-go/internal/logging"
"github.com/hashicorp/terraform-plugin-go/tfprotov5"
+ "github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/diag"
"github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/fromproto"
"github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tf5serverlogging"
"github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5"
"github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/toproto"
-
- "github.com/hashicorp/go-hclog"
- "github.com/hashicorp/go-plugin"
- "github.com/hashicorp/terraform-plugin-log/tflog"
- "github.com/hashicorp/terraform-plugin-log/tfsdklog"
- "github.com/mitchellh/go-testing-interface"
)
const (
@@ -49,7 +52,7 @@ const (
//
// In the future, it may be possible to include this information directly
// in the protocol buffers rather than recreating a constant here.
- protocolVersionMinor uint = 6
+ protocolVersionMinor uint = 10
)
// protocolVersion represents the combined major and minor version numbers of
@@ -104,6 +107,7 @@ type ServeConfig struct {
managedDebug bool
managedDebugReattachConfigTimeout time.Duration
managedDebugStopSignals []os.Signal
+ managedDebugEnvFilePath string
disableLogInitStderr bool
disableLogLocation bool
@@ -178,6 +182,15 @@ func WithManagedDebugReattachConfigTimeout(timeout time.Duration) ServeOpt {
})
}
+// WithManagedDebugEnvFilePath returns a ServeOpt that will set the output path
+// for the managed debug process to write the reattach configuration into.
+func WithManagedDebugEnvFilePath(path string) ServeOpt {
+ return serveConfigFunc(func(in *ServeConfig) error {
+ in.managedDebugEnvFilePath = path
+ return nil
+ })
+}
+
// WithGoPluginLogger returns a ServeOpt that will set the logger that
// go-plugin should use to log messages.
func WithGoPluginLogger(logger hclog.Logger) ServeOpt {
@@ -380,6 +393,15 @@ func Serve(name string, serverFactory func() tfprotov5.ProviderServer, opts ...S
fmt.Println("")
+ if conf.managedDebugEnvFilePath != "" {
+ fmt.Printf("Writing reattach configuration to env file at path %s\n", conf.managedDebugEnvFilePath)
+
+ err = os.WriteFile(conf.managedDebugEnvFilePath, []byte(fmt.Sprintf("%s='%s'\n", envTfReattachProviders, strings.ReplaceAll(reattachStr, `'`, `'"'"'`))), 0644)
+ if err != nil {
+ return fmt.Errorf("Error writing to env file at path %s: %w", conf.managedDebugEnvFilePath, err)
+ }
+ }
+
// Wait for the server to be done.
<-conf.debugCloseCh
@@ -541,6 +563,32 @@ func (s *server) GetSchema(ctx context.Context, protoReq *tfplugin5.GetProviderS
return protoResp, nil
}
+func (s *server) GetResourceIdentitySchemas(ctx context.Context, protoReq *tfplugin5.GetResourceIdentitySchemas_Request) (*tfplugin5.GetResourceIdentitySchemas_Response, error) {
+ rpc := "GetResourceIdentitySchemas"
+ ctx = s.loggingContext(ctx)
+ ctx = logging.RpcContext(ctx, rpc)
+ ctx = s.stoppableContext(ctx)
+ logging.ProtocolTrace(ctx, "Received request")
+ defer logging.ProtocolTrace(ctx, "Served request")
+
+ req := fromproto.GetResourceIdentitySchemasRequest(protoReq)
+
+ ctx = tf5serverlogging.DownstreamRequest(ctx)
+
+ resp, err := s.downstream.GetResourceIdentitySchemas(ctx, req)
+
+ if err != nil {
+ logging.ProtocolError(ctx, "Error from downstream", map[string]interface{}{logging.KeyError: err})
+ return nil, err
+ }
+
+ tf5serverlogging.DownstreamResponse(ctx, resp.Diagnostics)
+
+ protoResp := toproto.GetResourceIdentitySchemas_Response(resp)
+
+ return protoResp, nil
+}
+
func (s *server) PrepareProviderConfig(ctx context.Context, protoReq *tfplugin5.PrepareProviderConfig_Request) (*tfplugin5.PrepareProviderConfig_Response, error) {
rpc := "PrepareProviderConfig"
ctx = s.loggingContext(ctx)
@@ -716,6 +764,7 @@ func (s *server) ValidateResourceTypeConfig(ctx context.Context, protoReq *tfplu
req := fromproto.ValidateResourceTypeConfigRequest(protoReq)
+ tf5serverlogging.ValidateResourceTypeConfigClientCapabilities(ctx, req.ClientCapabilities)
logging.ProtocolData(ctx, s.protocolDataDir, rpc, "Request", "Config", req.Config)
ctx = tf5serverlogging.DownstreamRequest(ctx)
@@ -762,6 +811,36 @@ func (s *server) UpgradeResourceState(ctx context.Context, protoReq *tfplugin5.U
return protoResp, nil
}
+func (s *server) UpgradeResourceIdentity(ctx context.Context, protoReq *tfplugin5.UpgradeResourceIdentity_Request) (*tfplugin5.UpgradeResourceIdentity_Response, error) {
+ rpc := "UpgradeResourceIdentity"
+ ctx = s.loggingContext(ctx)
+ ctx = logging.RpcContext(ctx, rpc)
+ ctx = logging.ResourceContext(ctx, protoReq.TypeName)
+ ctx = s.stoppableContext(ctx)
+ logging.ProtocolTrace(ctx, "Received request")
+ defer logging.ProtocolTrace(ctx, "Served request")
+
+ req := fromproto.UpgradeResourceIdentityRequest(protoReq)
+
+ ctx = tf5serverlogging.DownstreamRequest(ctx)
+
+ resp, err := s.downstream.UpgradeResourceIdentity(ctx, req)
+
+ if err != nil {
+ logging.ProtocolError(ctx, "Error from downstream", map[string]interface{}{logging.KeyError: err})
+ return nil, err
+ }
+
+ tf5serverlogging.DownstreamResponse(ctx, resp.Diagnostics)
+ if resp.UpgradedIdentity != nil {
+ logging.ProtocolData(ctx, s.protocolDataDir, rpc, "Response", "UpgradedResourceIdentity", resp.UpgradedIdentity.IdentityData)
+ }
+
+ protoResp := toproto.UpgradeResourceIdentity_Response(resp)
+
+ return protoResp, nil
+}
+
func (s *server) ReadResource(ctx context.Context, protoReq *tfplugin5.ReadResource_Request) (*tfplugin5.ReadResource_Response, error) {
rpc := "ReadResource"
ctx = s.loggingContext(ctx)
@@ -1003,6 +1082,408 @@ func (s *server) GetFunctions(ctx context.Context, protoReq *tfplugin5.GetFuncti
return protoResp, nil
}
+func (s *server) ValidateEphemeralResourceConfig(ctx context.Context, protoReq *tfplugin5.ValidateEphemeralResourceConfig_Request) (*tfplugin5.ValidateEphemeralResourceConfig_Response, error) {
+ rpc := "ValidateEphemeralResourceConfig"
+ ctx = s.loggingContext(ctx)
+ ctx = logging.RpcContext(ctx, rpc)
+ ctx = logging.EphemeralResourceContext(ctx, protoReq.TypeName)
+ ctx = s.stoppableContext(ctx)
+ logging.ProtocolTrace(ctx, "Received request")
+ defer logging.ProtocolTrace(ctx, "Served request")
+
+ req := fromproto.ValidateEphemeralResourceConfigRequest(protoReq)
+
+ logging.ProtocolData(ctx, s.protocolDataDir, rpc, "Request", "Config", req.Config)
+
+ ctx = tf5serverlogging.DownstreamRequest(ctx)
+
+ resp, err := s.downstream.ValidateEphemeralResourceConfig(ctx, req)
+ if err != nil {
+ logging.ProtocolError(ctx, "Error from downstream", map[string]any{logging.KeyError: err})
+ return nil, err
+ }
+
+ tf5serverlogging.DownstreamResponse(ctx, resp.Diagnostics)
+
+ protoResp := toproto.ValidateEphemeralResourceConfig_Response(resp)
+
+ return protoResp, nil
+}
+
+func (s *server) OpenEphemeralResource(ctx context.Context, protoReq *tfplugin5.OpenEphemeralResource_Request) (*tfplugin5.OpenEphemeralResource_Response, error) {
+ rpc := "OpenEphemeralResource"
+ ctx = s.loggingContext(ctx)
+ ctx = logging.RpcContext(ctx, rpc)
+ ctx = logging.EphemeralResourceContext(ctx, protoReq.TypeName)
+ ctx = s.stoppableContext(ctx)
+ logging.ProtocolTrace(ctx, "Received request")
+ defer logging.ProtocolTrace(ctx, "Served request")
+
+ req := fromproto.OpenEphemeralResourceRequest(protoReq)
+
+ tf5serverlogging.OpenEphemeralResourceClientCapabilities(ctx, req.ClientCapabilities)
+ logging.ProtocolData(ctx, s.protocolDataDir, rpc, "Request", "Config", req.Config)
+ ctx = tf5serverlogging.DownstreamRequest(ctx)
+
+ resp, err := s.downstream.OpenEphemeralResource(ctx, req)
+ if err != nil {
+ logging.ProtocolError(ctx, "Error from downstream", map[string]any{logging.KeyError: err})
+ return nil, err
+ }
+
+ tf5serverlogging.DownstreamResponse(ctx, resp.Diagnostics)
+ logging.ProtocolData(ctx, s.protocolDataDir, rpc, "Response", "Result", resp.Result)
+ tf5serverlogging.Deferred(ctx, resp.Deferred)
+
+ if resp.Deferred != nil && (req.ClientCapabilities == nil || !req.ClientCapabilities.DeferralAllowed) {
+ resp.Diagnostics = append(resp.Diagnostics, invalidDeferredResponseDiag(resp.Deferred.Reason))
+ }
+
+ protoResp := toproto.OpenEphemeralResource_Response(resp)
+
+ return protoResp, nil
+}
+
+func (s *server) RenewEphemeralResource(ctx context.Context, protoReq *tfplugin5.RenewEphemeralResource_Request) (*tfplugin5.RenewEphemeralResource_Response, error) {
+ rpc := "RenewEphemeralResource"
+ ctx = s.loggingContext(ctx)
+ ctx = logging.RpcContext(ctx, rpc)
+ ctx = logging.EphemeralResourceContext(ctx, protoReq.TypeName)
+ ctx = s.stoppableContext(ctx)
+ logging.ProtocolTrace(ctx, "Received request")
+ defer logging.ProtocolTrace(ctx, "Served request")
+
+ req := fromproto.RenewEphemeralResourceRequest(protoReq)
+
+ ctx = tf5serverlogging.DownstreamRequest(ctx)
+
+ resp, err := s.downstream.RenewEphemeralResource(ctx, req)
+ if err != nil {
+ logging.ProtocolError(ctx, "Error from downstream", map[string]any{logging.KeyError: err})
+ return nil, err
+ }
+
+ tf5serverlogging.DownstreamResponse(ctx, resp.Diagnostics)
+
+ protoResp := toproto.RenewEphemeralResource_Response(resp)
+
+ return protoResp, nil
+}
+
+func (s *server) CloseEphemeralResource(ctx context.Context, protoReq *tfplugin5.CloseEphemeralResource_Request) (*tfplugin5.CloseEphemeralResource_Response, error) {
+ rpc := "CloseEphemeralResource"
+ ctx = s.loggingContext(ctx)
+ ctx = logging.RpcContext(ctx, rpc)
+ ctx = logging.EphemeralResourceContext(ctx, protoReq.TypeName)
+ ctx = s.stoppableContext(ctx)
+ logging.ProtocolTrace(ctx, "Received request")
+ defer logging.ProtocolTrace(ctx, "Served request")
+
+ req := fromproto.CloseEphemeralResourceRequest(protoReq)
+
+ ctx = tf5serverlogging.DownstreamRequest(ctx)
+
+ resp, err := s.downstream.CloseEphemeralResource(ctx, req)
+ if err != nil {
+ logging.ProtocolError(ctx, "Error from downstream", map[string]any{logging.KeyError: err})
+ return nil, err
+ }
+
+ tf5serverlogging.DownstreamResponse(ctx, resp.Diagnostics)
+
+ protoResp := toproto.CloseEphemeralResource_Response(resp)
+
+ return protoResp, nil
+}
+
+func (s *server) ValidateListResourceConfig(ctx context.Context, protoReq *tfplugin5.ValidateListResourceConfig_Request) (*tfplugin5.ValidateListResourceConfig_Response, error) {
+ rpc := "ValidateListResourceConfig"
+ ctx = s.loggingContext(ctx)
+ ctx = logging.RpcContext(ctx, rpc)
+ ctx = logging.ListResourceContext(ctx, protoReq.TypeName)
+ ctx = s.stoppableContext(ctx)
+ logging.ProtocolTrace(ctx, "Received request")
+ defer logging.ProtocolTrace(ctx, "Served request")
+
+ req := fromproto.ValidateListResourceConfigRequest(protoReq)
+
+ logging.ProtocolData(ctx, s.protocolDataDir, rpc, "Request", "Config", req.Config)
+
+ ctx = tf5serverlogging.DownstreamRequest(ctx)
+
+ // TODO: Remove this check and error once ProviderServer interface
+ // implements this RPC method.
+ // nolint:staticcheck
+ listResourceServer, ok := s.downstream.(tfprotov5.ProviderServerWithListResource)
+ if !ok {
+ logging.ProtocolError(ctx, "ProviderServer does not implement ValidateListResourceConfig")
+
+ protoResp := &tfplugin5.ValidateListResourceConfig_Response{
+ Diagnostics: []*tfplugin5.Diagnostic{
+ {
+ Severity: tfplugin5.Diagnostic_ERROR,
+ Summary: "Provider ValidateListResourceConfig Not Implemented",
+ Detail: "A ValidateListResourceConfig call was received by the provider, however the provider does not implement the call. " +
+ "Either upgrade the provider to a version that implements list support or this is a bug in Terraform that should be reported to the Terraform maintainers.",
+ },
+ },
+ }
+
+ return protoResp, nil
+ }
+
+ // TODO: Update this to call downstream once optional interface is removed
+ // resp, err := s.downstream.ValidateListResourceConfig(ctx, req)
+ resp, err := listResourceServer.ValidateListResourceConfig(ctx, req)
+
+ if err != nil {
+ logging.ProtocolError(ctx, "Error from downstream", map[string]interface{}{logging.KeyError: err})
+ return nil, err
+ }
+
+ tf5serverlogging.DownstreamResponse(ctx, resp.Diagnostics)
+
+ protoResp := toproto.ValidateListResourceConfig_Response(resp)
+
+ return protoResp, nil
+}
+
+func (s *server) ListResource(protoReq *tfplugin5.ListResource_Request, protoStream grpc.ServerStreamingServer[tfplugin5.ListResource_Event]) error {
+ rpc := "ListResource"
+ ctx := protoStream.Context()
+ ctx = s.loggingContext(ctx)
+ ctx = logging.RpcContext(ctx, rpc)
+ ctx = logging.ListResourceContext(ctx, protoReq.TypeName)
+ ctx = s.stoppableContext(ctx)
+ logging.ProtocolTrace(ctx, "Received request")
+ defer logging.ProtocolTrace(ctx, "Served request")
+
+ req := fromproto.ListResourceRequest(protoReq)
+ logging.ProtocolData(ctx, s.protocolDataDir, rpc, "Request", "Config", req.Config)
+
+ ctx = tf5serverlogging.DownstreamRequest(ctx)
+
+ // TODO: Remove this check and error in preference of
+ // s.downstream.ValidateListResourceConfig below once ProviderServer interface
+ // implements this RPC method.
+ // nolint:staticcheck
+ downstream, ok := s.downstream.(tfprotov5.ProviderServerWithListResource)
+ if !ok {
+ err := status.Error(codes.Unimplemented, "ProviderServer does not implement ListResource")
+ logging.ProtocolError(ctx, err.Error())
+ return err
+ }
+
+ resp, err := downstream.ListResource(ctx, req)
+ if err != nil {
+ logging.ProtocolError(ctx, "Error from downstream", map[string]interface{}{logging.KeyError: err})
+ return err
+ }
+
+ for ev := range resp.Results {
+ select {
+ case <-ctx.Done():
+ logging.ProtocolTrace(ctx, "Context done")
+ return nil
+
+ default:
+ tf5serverlogging.DownstreamServerEvent(ctx, ev.Diagnostics)
+
+ protoEv := toproto.ListResource_ListResourceEvent(&ev)
+ if err := protoStream.Send(protoEv); err != nil {
+ logging.ProtocolError(ctx, "Error sending event", map[string]any{logging.KeyError: err})
+ return err
+ }
+ }
+ }
+
+ return nil
+}
+
+func (s *server) ValidateActionConfig(ctx context.Context, protoReq *tfplugin5.ValidateActionConfig_Request) (*tfplugin5.ValidateActionConfig_Response, error) {
+ rpc := "ValidateActionConfig"
+ ctx = s.loggingContext(ctx)
+ ctx = logging.RpcContext(ctx, rpc)
+ ctx = logging.ActionContext(ctx, protoReq.ActionType)
+ ctx = s.stoppableContext(ctx)
+ logging.ProtocolTrace(ctx, "Received request")
+ defer logging.ProtocolTrace(ctx, "Served request")
+
+ req := fromproto.ValidateActionConfigRequest(protoReq)
+
+ logging.ProtocolData(ctx, s.protocolDataDir, rpc, "Request", "Config", req.Config)
+
+ ctx = tf5serverlogging.DownstreamRequest(ctx)
+
+ // TODO: Remove this check and error in preference of
+ // s.downstream.ValidateActionConfig below once ProviderServer interface
+ // implements this RPC method.
+ // nolint:staticcheck
+ actionsProviderServer, ok := s.downstream.(tfprotov5.ProviderServerWithActions)
+ if !ok {
+ logging.ProtocolError(ctx, "ProviderServer does not implement ValidateActionConfig")
+
+ protoResp := &tfplugin5.ValidateActionConfig_Response{
+ Diagnostics: []*tfplugin5.Diagnostic{
+ {
+ Severity: tfplugin5.Diagnostic_ERROR,
+ Summary: "Provider ValidateActionConfig Not Implemented",
+ Detail: "A ValidateActionConfig call was received by the provider, however the provider does not implement the call. " +
+ "Either upgrade the provider to a version that implements action support or this is a bug in Terraform that should be reported to the Terraform maintainers.",
+ },
+ },
+ }
+
+ return protoResp, nil
+ }
+
+ resp, err := actionsProviderServer.ValidateActionConfig(ctx, req)
+ if err != nil {
+ logging.ProtocolError(ctx, "Error from downstream", map[string]any{logging.KeyError: err})
+ return nil, err
+ }
+
+ tf5serverlogging.DownstreamResponse(ctx, resp.Diagnostics)
+
+ protoResp := toproto.ValidateActionConfig_Response(resp)
+
+ return protoResp, nil
+}
+
+func (s *server) PlanAction(ctx context.Context, protoReq *tfplugin5.PlanAction_Request) (*tfplugin5.PlanAction_Response, error) {
+ rpc := "PlanAction"
+ ctx = s.loggingContext(ctx)
+ ctx = logging.RpcContext(ctx, rpc)
+ ctx = logging.ActionContext(ctx, protoReq.ActionType)
+ ctx = s.stoppableContext(ctx)
+ logging.ProtocolTrace(ctx, "Received request")
+ defer logging.ProtocolTrace(ctx, "Served request")
+
+ req := fromproto.PlanActionRequest(protoReq)
+
+ tf5serverlogging.PlanActionClientCapabilities(ctx, req.ClientCapabilities)
+ logging.ProtocolData(ctx, s.protocolDataDir, rpc, "Request", "Config", req.Config)
+
+ ctx = tf5serverlogging.DownstreamRequest(ctx)
+
+ // TODO: Remove this check and error in preference of
+ // s.downstream.PlanAction below once ProviderServer interface
+ // implements this RPC method.
+ // nolint:staticcheck
+ actionsProviderServer, ok := s.downstream.(tfprotov5.ProviderServerWithActions)
+ if !ok {
+ logging.ProtocolError(ctx, "ProviderServer does not implement PlanAction")
+
+ protoResp := &tfplugin5.PlanAction_Response{
+ Diagnostics: []*tfplugin5.Diagnostic{
+ {
+ Severity: tfplugin5.Diagnostic_ERROR,
+ Summary: "Provider PlanAction Not Implemented",
+ Detail: "A PlanAction call was received by the provider, however the provider does not implement the call. " +
+ "Either upgrade the provider to a version that implements action support or this is a bug in Terraform that should be reported to the Terraform maintainers.",
+ },
+ },
+ }
+
+ return protoResp, nil
+ }
+
+ // TODO: Update this to call downstream once optional interface is removed
+ // resp, err := s.downstream.PlanAction(ctx, req)
+ resp, err := actionsProviderServer.PlanAction(ctx, req)
+ if err != nil {
+ logging.ProtocolError(ctx, "Error from downstream", map[string]interface{}{logging.KeyError: err})
+ return nil, err
+ }
+
+ tf5serverlogging.DownstreamResponse(ctx, resp.Diagnostics)
+
+ tf5serverlogging.Deferred(ctx, resp.Deferred)
+
+ if resp.Deferred != nil && (req.ClientCapabilities == nil || !req.ClientCapabilities.DeferralAllowed) {
+ resp.Diagnostics = append(resp.Diagnostics, invalidDeferredResponseDiag(resp.Deferred.Reason))
+ }
+
+ protoResp := toproto.PlanAction_Response(resp)
+
+ return protoResp, nil
+}
+
+func (s *server) InvokeAction(protoReq *tfplugin5.InvokeAction_Request, protoStream grpc.ServerStreamingServer[tfplugin5.InvokeAction_Event]) error {
+ rpc := "InvokeAction"
+ ctx := protoStream.Context()
+ ctx = s.loggingContext(ctx)
+ ctx = logging.RpcContext(ctx, rpc)
+ ctx = logging.ActionContext(ctx, protoReq.ActionType)
+ ctx = s.stoppableContext(ctx)
+ logging.ProtocolTrace(ctx, "Received request")
+ defer logging.ProtocolTrace(ctx, "Served request")
+
+ req := fromproto.InvokeActionRequest(protoReq)
+ logging.ProtocolData(ctx, s.protocolDataDir, rpc, "Request", "Config", req.Config)
+
+ ctx = tf5serverlogging.DownstreamRequest(ctx)
+
+ // TODO: Remove this check and error in preference of
+ // s.downstream.InvokeAction below once ProviderServer interface
+ // implements this RPC method.
+ // nolint:staticcheck
+ actionsProviderServer, ok := s.downstream.(tfprotov5.ProviderServerWithActions)
+ if !ok {
+ logging.ProtocolError(ctx, "ProviderServer does not implement InvokeAction")
+
+ protoEvent := &tfplugin5.InvokeAction_Event{
+ Type: &tfplugin5.InvokeAction_Event_Completed_{
+ Completed: &tfplugin5.InvokeAction_Event_Completed{
+ Diagnostics: []*tfplugin5.Diagnostic{
+ {
+ Severity: tfplugin5.Diagnostic_ERROR,
+ Summary: "Provider InvokeAction Not Implemented",
+ Detail: "An InvokeAction call was received by the provider, however the provider does not implement the call. " +
+ "Either upgrade the provider to a version that implements action support or this is a bug in Terraform that should be reported to the Terraform maintainers.",
+ },
+ },
+ },
+ },
+ }
+
+ return protoStream.Send(protoEvent)
+ }
+
+ // TODO: Update this to call downstream once optional interface is removed
+ // resp, err := s.downstream.InvokeAction(ctx, req)
+ resp, err := actionsProviderServer.InvokeAction(ctx, req)
+ if err != nil {
+ logging.ProtocolError(ctx, "Error from downstream", map[string]interface{}{logging.KeyError: err})
+ return err
+ }
+
+ for ev := range resp.Events {
+ select {
+ case <-ctx.Done():
+ logging.ProtocolTrace(ctx, "Context done")
+ return nil
+
+ default:
+ switch ev := ev.Type.(type) {
+ // MAINTAINER NOTE: Only the completed event has diagnostics to log, otherwise we just send an empty slice.
+ case *tfprotov5.CompletedInvokeActionEventType:
+ tf5serverlogging.DownstreamServerEvent(ctx, ev.Diagnostics)
+ default:
+ tf5serverlogging.DownstreamServerEvent(ctx, make(diag.Diagnostics, 0))
+ }
+
+ protoEv := toproto.InvokeAction_InvokeActionEvent(&ev)
+ if err := protoStream.Send(protoEv); err != nil {
+ logging.ProtocolError(ctx, "Error sending event", map[string]any{logging.KeyError: err})
+ return err
+ }
+ }
+ }
+
+ return nil
+}
+
func invalidDeferredResponseDiag(reason tfprotov5.DeferredReason) *tfprotov5.Diagnostic {
return &tfprotov5.Diagnostic{
Severity: tfprotov5.DiagnosticSeverityError,
diff --git a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/action.go b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/action.go
new file mode 100644
index 0000000000..b79efefce9
--- /dev/null
+++ b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/action.go
@@ -0,0 +1,159 @@
+// Copyright (c) HashiCorp, Inc.
+// SPDX-License-Identifier: MPL-2.0
+
+package tfprotov6
+
+import (
+ "context"
+ "iter"
+)
+
+// ActionMetadata describes metadata for an action in the GetMetadata RPC.
+type ActionMetadata struct {
+ // TypeName is the name of the action.
+ TypeName string
+}
+
+// ActionServer is an interface containing the methods an action implementation needs to fill.
+type ActionServer interface {
+ // ValidateActionConfig is called when Terraform is checking that an
+ // action configuration is valid. It is guaranteed to have types
+ // conforming to your schema, but it is not guaranteed that all values
+ // will be known. This is your opportunity to do custom or advanced
+ // validation prior to an action being planned/invoked.
+ ValidateActionConfig(context.Context, *ValidateActionConfigRequest) (*ValidateActionConfigResponse, error)
+
+ // PlanAction is called when Terraform is attempting to
+ // calculate a plan for an action.
+ PlanAction(context.Context, *PlanActionRequest) (*PlanActionResponse, error)
+
+ // InvokeAction is called when Terraform wants to execute the logic of an action.
+ // The provider runs the logic of the action, reporting progress
+ // events as desired, then sends a final complete event.
+ //
+ // If an error occurs, the provider sends a complete event with the relevant diagnostics.
+ InvokeAction(context.Context, *InvokeActionRequest) (*InvokeActionServerStream, error)
+}
+
+// ValidateActionConfigRequest is the request Terraform sends when it
+// wants to validate an action's configuration.
+type ValidateActionConfigRequest struct {
+ // ActionType is the type of action Terraform is validating.
+ ActionType string
+
+ // Config is the configuration the user supplied for that action. See
+ // the documentation on `DynamicValue` for more information about
+ // safely accessing the configuration.
+ //
+ // The configuration is represented as a tftypes.Object, with each
+ // attribute and nested block getting its own key and value.
+ //
+ // This configuration may contain unknown values if a user uses
+ // interpolation or other functionality that would prevent Terraform
+ // from knowing the value at request time. Any attributes not directly
+ // set in the configuration will be null.
+ Config *DynamicValue
+}
+
+// ValidateActionConfigResponse is the response from the provider about
+// the validity of an action's configuration.
+type ValidateActionConfigResponse struct {
+ // Diagnostics report errors or warnings related to the given
+ // configuration. Returning an empty slice indicates a successful
+ // validation with no warnings or errors generated.
+ Diagnostics []*Diagnostic
+}
+
+// PlanActionRequest is the request Terraform sends when it is attempting to
+// calculate a plan for an action.
+type PlanActionRequest struct {
+ // ActionType is the name of the action being called.
+ ActionType string
+
+ // Config is the configuration the user supplied for the action. See
+ // the documentation on `DynamicValue` for more information about
+ // safely accessing the configuration.
+ Config *DynamicValue
+
+ // ClientCapabilities defines optionally supported protocol features for the
+ // PlanAction RPC, such as forward-compatible Terraform behavior changes.
+ ClientCapabilities *PlanActionClientCapabilities
+}
+
+// PlanActionResponse is the response from the provider when planning an action.
+type PlanActionResponse struct {
+ // Diagnostics report errors or warnings related to planning the action. Returning an empty slice
+ // indicates a successful validation with no warnings or errors generated.
+ Diagnostics []*Diagnostic
+
+ // Deferred is used to indicate to Terraform that the PlanAction operation
+ // needs to be deferred for a reason.
+ Deferred *Deferred
+}
+
+// InvokeActionRequest is the request Terraform sends when it wants to execute
+// the logic of an action.
+type InvokeActionRequest struct {
+ // ActionType is the name of the action being called.
+ ActionType string
+
+ // Config is the configuration the user supplied for the action. See
+ // the documentation on `DynamicValue` for more information about
+ // safely accessing the configuration.
+ Config *DynamicValue
+
+ // ClientCapabilities defines optionally supported protocol features for the
+ // InvokeAction RPC, such as forward-compatible Terraform behavior changes.
+ ClientCapabilities *InvokeActionClientCapabilities
+}
+
+// InvokeActionServerStream represents a streaming response to an
+// InvokeActionRequest. An instance of this struct is supplied as an argument
+// to the provider's InvokeAction implementation. The provider should set an
+// Events iterator function that pushes zero or more events of type InvokeActionEvent.
+type InvokeActionServerStream struct {
+ // Events is the iterator that the provider can stream progress messages back to Terraform
+ // as the action is executing. Once the provider has completed the action invocation, the provider must
+ // respond with a completed event. If the action failed, the completed event must contain
+ // diagnostics explaining why the action failed.
+ Events iter.Seq[InvokeActionEvent]
+}
+
+// InvokeActionEvent is an event sent back to Terraform during the InvokeAction RPC.
+type InvokeActionEvent struct {
+ // Type is the type of event that is being sent back during InvokeAction, either a Progress event
+ // or a Completed event.
+ Type InvokeActionEventType
+}
+
+// InvokeActionEventType is an intentionally unimplementable interface that
+// functions as an enum, allowing us to use different strongly-typed event types
+// that contain additional, but different data, as a generic "event" type.
+type InvokeActionEventType interface {
+ isInvokeActionEventType() // this interface is only implementable in this package
+}
+
+var (
+ _ InvokeActionEventType = ProgressInvokeActionEventType{}
+ _ InvokeActionEventType = CompletedInvokeActionEventType{}
+)
+
+// ProgressInvokeActionEventType represents a progress update that should be displayed in the Terraform
+// CLI or external system running Terraform.
+type ProgressInvokeActionEventType struct {
+ // Message is the human-readable message to display about the progress of the action invocation.
+ Message string
+}
+
+func (a ProgressInvokeActionEventType) isInvokeActionEventType() {}
+
+// CompletedInvokeActionEventType represents the final completed event, along with
+// potential diagnostics about an action invocation failure.
+type CompletedInvokeActionEventType struct {
+ // Diagnostics report errors or warnings related to invoking an action.
+ // Returning an empty slice indicates a successful invocation with no warnings
+ // or errors generated.
+ Diagnostics []*Diagnostic
+}
+
+func (a CompletedInvokeActionEventType) isInvokeActionEventType() {}
diff --git a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/action_schema.go b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/action_schema.go
new file mode 100644
index 0000000000..b3d550b716
--- /dev/null
+++ b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/action_schema.go
@@ -0,0 +1,10 @@
+// Copyright (c) HashiCorp, Inc.
+// SPDX-License-Identifier: MPL-2.0
+
+package tfprotov6
+
+// ActionSchema is how Terraform defines the shape of action data.
+type ActionSchema struct {
+ // Schema is the definition for the action data itself, which will be specified in an action block in the user's configuration.
+ Schema *Schema
+}
diff --git a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/client_capabilities.go b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/client_capabilities.go
index b528c123ab..2b1db94d87 100644
--- a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/client_capabilities.go
+++ b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/client_capabilities.go
@@ -3,6 +3,15 @@
package tfprotov6
+// ValidateResourceConfigClientCapabilities allows Terraform to publish information
+// regarding optionally supported protocol features for the ValidateResourceConfig RPC,
+// such as forward-compatible Terraform behavior changes.
+type ValidateResourceConfigClientCapabilities struct {
+ // WriteOnlyAttributesAllowed signals that the client is able to
+ // handle write_only attributes for managed resources.
+ WriteOnlyAttributesAllowed bool
+}
+
// ConfigureProviderClientCapabilities allows Terraform to publish information
// regarding optionally supported protocol features for the ConfigureProvider RPC,
// such as forward-compatible Terraform behavior changes.
@@ -47,3 +56,30 @@ type ImportResourceStateClientCapabilities struct {
// handle deferred responses from the provider.
DeferralAllowed bool
}
+
+// OpenEphemeralResourceClientCapabilities allows Terraform to publish information
+// regarding optionally supported protocol features for the OpenEphemeralResource RPC,
+// such as forward-compatible Terraform behavior changes.
+type OpenEphemeralResourceClientCapabilities struct {
+ // DeferralAllowed signals that the request from Terraform is able to
+ // handle deferred responses from the provider.
+ DeferralAllowed bool
+}
+
+// PlanActionClientCapabilities allows Terraform to publish information
+// regarding optionally supported protocol features for the PlanAction RPC,
+// such as forward-compatible Terraform behavior changes.
+type PlanActionClientCapabilities struct {
+ // DeferralAllowed signals that the request from Terraform is able to
+ // handle deferred responses from the provider.
+ DeferralAllowed bool
+}
+
+// InvokeActionClientCapabilities allows Terraform to publish information
+// regarding optionally supported protocol features for the InvokeAction RPC,
+// such as forward-compatible Terraform behavior changes.
+//
+// Maintainer Note: This is in the protocol in Terraform Core,
+// but currently they are not sending any capabilities for this RPC.
+type InvokeActionClientCapabilities struct {
+}
diff --git a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/ephemeral_resource.go b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/ephemeral_resource.go
new file mode 100644
index 0000000000..038b21f7e1
--- /dev/null
+++ b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/ephemeral_resource.go
@@ -0,0 +1,185 @@
+// Copyright (c) HashiCorp, Inc.
+// SPDX-License-Identifier: MPL-2.0
+
+package tfprotov6
+
+import (
+ "context"
+ "time"
+)
+
+// EphemeralResourceMetadata describes metadata for an ephemeral resource in the GetMetadata
+// RPC.
+type EphemeralResourceMetadata struct {
+ // TypeName is the name of the ephemeral resource.
+ TypeName string
+}
+
+// EphemeralResourceServer is an interface containing the methods an ephemeral resource
+// implementation needs to fill.
+type EphemeralResourceServer interface {
+ // ValidateEphemeralResourceConfig is called when Terraform is checking that an
+ // ephemeral resource configuration is valid. It is guaranteed to have types
+ // conforming to your schema, but it is not guaranteed that all values
+ // will be known. This is your opportunity to do custom or advanced
+ // validation prior to an ephemeral resource being opened.
+ ValidateEphemeralResourceConfig(context.Context, *ValidateEphemeralResourceConfigRequest) (*ValidateEphemeralResourceConfigResponse, error)
+
+ // OpenEphemeralResource is called when Terraform wants to open the ephemeral resource,
+ // usually during planning. If the config for the ephemeral resource contains unknown
+ // values, Terraform will defer the OpenEphemeralResource call until apply.
+ OpenEphemeralResource(context.Context, *OpenEphemeralResourceRequest) (*OpenEphemeralResourceResponse, error)
+
+ // RenewEphemeralResource is called when Terraform detects that the previously specified
+ // RenewAt timestamp has passed. The RenewAt timestamp is supplied either from the
+ // OpenEphemeralResource call or a previous RenewEphemeralResource call.
+ RenewEphemeralResource(context.Context, *RenewEphemeralResourceRequest) (*RenewEphemeralResourceResponse, error)
+
+ // CloseEphemeralResource is called when Terraform is closing the ephemeral resource.
+ CloseEphemeralResource(context.Context, *CloseEphemeralResourceRequest) (*CloseEphemeralResourceResponse, error)
+}
+
+// ValidateEphemeralResourceConfigRequest is the request Terraform sends when it
+// wants to validate an ephemeral resource's configuration.
+type ValidateEphemeralResourceConfigRequest struct {
+ // TypeName is the type of resource Terraform is validating.
+ TypeName string
+
+ // Config is the configuration the user supplied for that ephemeral resource. See
+ // the documentation on `DynamicValue` for more information about
+ // safely accessing the configuration.
+ //
+ // The configuration is represented as a tftypes.Object, with each
+ // attribute and nested block getting its own key and value.
+ //
+ // This configuration may contain unknown values if a user uses
+ // interpolation or other functionality that would prevent Terraform
+ // from knowing the value at request time. Any attributes not directly
+ // set in the configuration will be null.
+ Config *DynamicValue
+}
+
+// ValidateEphemeralResourceConfigResponse is the response from the provider about
+// the validity of an ephemeral resource's configuration.
+type ValidateEphemeralResourceConfigResponse struct {
+ // Diagnostics report errors or warnings related to the given
+ // configuration. Returning an empty slice indicates a successful
+ // validation with no warnings or errors generated.
+ Diagnostics []*Diagnostic
+}
+
+// OpenEphemeralResourceRequest is the request Terraform sends when it
+// wants to open an ephemeral resource.
+type OpenEphemeralResourceRequest struct {
+ // TypeName is the type of resource Terraform is opening.
+ TypeName string
+
+ // Config is the configuration the user supplied for that ephemeral resource. See
+ // the documentation on `DynamicValue` for more information about
+ // safely accessing the configuration.
+ //
+ // The configuration is represented as a tftypes.Object, with each
+ // attribute and nested block getting its own key and value.
+ //
+ // This configuration will always be fully known. If Config contains unknown values,
+ // Terraform will defer the OpenEphemeralResource RPC until apply.
+ Config *DynamicValue
+
+ // ClientCapabilities defines optionally supported protocol features for the
+ // OpenEphemeralResource RPC, such as forward-compatible Terraform behavior changes.
+ ClientCapabilities *OpenEphemeralResourceClientCapabilities
+}
+
+// OpenEphemeralResourceResponse is the response from the provider about the current
+// state of the opened ephemeral resource.
+type OpenEphemeralResourceResponse struct {
+ // Result is the provider's understanding of what the ephemeral resource's
+ // data is after it has been opened, represented as a `DynamicValue`.
+ // See the documentation for `DynamicValue` for information about
+ // safely creating the `DynamicValue`.
+ //
+ // Any attribute, whether computed or not, that has a known value in
+ // the Config in the OpenEphemeralResourceRequest must be preserved
+ // exactly as it was in Result.
+ //
+ // Any attribute in the Config in the OpenEphemeralResourceRequest
+ // that is unknown must take on a known value at this time. No unknown
+ // values are allowed in the Result.
+ //
+ // The result should be represented as a tftypes.Object, with each
+ // attribute and nested block getting its own key and value.
+ Result *DynamicValue
+
+ // Diagnostics report errors or warnings related to opening the
+ // requested ephemeral resource. Returning an empty slice
+ // indicates a successful creation with no warnings or errors
+ // generated.
+ Diagnostics []*Diagnostic
+
+ // Private should be set to any private data that the provider would like to be
+ // sent to the next Renew or Close call.
+ Private []byte
+
+ // RenewAt indicates to Terraform that the ephemeral resource
+ // needs to be renewed at the specified time. Terraform will
+ // call the RenewEphemeralResource RPC when the specified time has passed.
+ RenewAt time.Time
+
+ // Deferred is used to indicate to Terraform that the OpenEphemeralResource operation
+ // needs to be deferred for a reason.
+ Deferred *Deferred
+}
+
+// RenewEphemeralResourceRequest is the request Terraform sends when it
+// wants to renew an ephemeral resource.
+type RenewEphemeralResourceRequest struct {
+ // TypeName is the type of resource Terraform is renewing.
+ TypeName string
+
+ // Private is any provider-defined private data stored with the
+ // ephemeral resource from the most recent Open or Renew call.
+ //
+ // To ensure private data is preserved, copy any necessary data to
+ // the RenewEphemeralResourceResponse type Private field.
+ Private []byte
+}
+
+// RenewEphemeralResourceResponse is the response from the provider after an ephemeral resource
+// has been renewed.
+type RenewEphemeralResourceResponse struct {
+ // Diagnostics report errors or warnings related to renewing the
+ // requested ephemeral resource. Returning an empty slice
+ // indicates a successful creation with no warnings or errors
+ // generated.
+ Diagnostics []*Diagnostic
+
+ // Private should be set to any private data that the provider would like to be
+ // sent to the next Renew or Close call.
+ Private []byte
+
+ // RenewAt indicates to Terraform that the ephemeral resource
+ // needs to be renewed at the specified time. Terraform will
+ // call the RenewEphemeralResource RPC when the specified time has passed.
+ RenewAt time.Time
+}
+
+// CloseEphemeralResourceRequest is the request Terraform sends when it
+// wants to close an ephemeral resource.
+type CloseEphemeralResourceRequest struct {
+ // TypeName is the type of resource Terraform is closing.
+ TypeName string
+
+ // Private is any provider-defined private data stored with the
+ // ephemeral resource from the most recent Open or Renew call.
+ Private []byte
+}
+
+// CloseEphemeralResourceResponse is the response from the provider about
+// the closed ephemeral resource.
+type CloseEphemeralResourceResponse struct {
+ // Diagnostics report errors or warnings related to closing the
+ // requested ephemeral resource. Returning an empty slice
+ // indicates a successful creation with no warnings or errors
+ // generated.
+ Diagnostics []*Diagnostic
+}
diff --git a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/fromproto/action.go b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/fromproto/action.go
new file mode 100644
index 0000000000..1c11b91ec0
--- /dev/null
+++ b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/fromproto/action.go
@@ -0,0 +1,48 @@
+// Copyright (c) HashiCorp, Inc.
+// SPDX-License-Identifier: MPL-2.0
+
+package fromproto
+
+import (
+ "github.com/hashicorp/terraform-plugin-go/tfprotov6"
+ "github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/tfplugin6"
+)
+
+func ValidateActionConfigRequest(in *tfplugin6.ValidateActionConfig_Request) *tfprotov6.ValidateActionConfigRequest {
+ if in == nil {
+ return nil
+ }
+
+ return &tfprotov6.ValidateActionConfigRequest{
+ ActionType: in.ActionType,
+ Config: DynamicValue(in.Config),
+ }
+}
+
+func PlanActionRequest(in *tfplugin6.PlanAction_Request) *tfprotov6.PlanActionRequest {
+ if in == nil {
+ return nil
+ }
+
+ resp := &tfprotov6.PlanActionRequest{
+ ActionType: in.ActionType,
+ Config: DynamicValue(in.Config),
+ ClientCapabilities: PlanActionClientCapabilities(in.ClientCapabilities),
+ }
+
+ return resp
+}
+
+func InvokeActionRequest(in *tfplugin6.InvokeAction_Request) *tfprotov6.InvokeActionRequest {
+ if in == nil {
+ return nil
+ }
+
+ resp := &tfprotov6.InvokeActionRequest{
+ ActionType: in.ActionType,
+ Config: DynamicValue(in.Config),
+ ClientCapabilities: InvokeActionClientCapabilities(in.ClientCapabilities),
+ }
+
+ return resp
+}
diff --git a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/fromproto/client_capabilities.go b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/fromproto/client_capabilities.go
index 06238eac04..09df23bee2 100644
--- a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/fromproto/client_capabilities.go
+++ b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/fromproto/client_capabilities.go
@@ -8,6 +8,18 @@ import (
"github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/tfplugin6"
)
+func ValidateResourceConfigClientCapabilities(in *tfplugin6.ClientCapabilities) *tfprotov6.ValidateResourceConfigClientCapabilities {
+ if in == nil {
+ return nil
+ }
+
+ resp := &tfprotov6.ValidateResourceConfigClientCapabilities{
+ WriteOnlyAttributesAllowed: in.WriteOnlyAttributesAllowed,
+ }
+
+ return resp
+}
+
func ConfigureProviderClientCapabilities(in *tfplugin6.ClientCapabilities) *tfprotov6.ConfigureProviderClientCapabilities {
if in == nil {
return nil
@@ -67,3 +79,37 @@ func ImportResourceStateClientCapabilities(in *tfplugin6.ClientCapabilities) *tf
return resp
}
+
+func OpenEphemeralResourceClientCapabilities(in *tfplugin6.ClientCapabilities) *tfprotov6.OpenEphemeralResourceClientCapabilities {
+ if in == nil {
+ return nil
+ }
+
+ resp := &tfprotov6.OpenEphemeralResourceClientCapabilities{
+ DeferralAllowed: in.DeferralAllowed,
+ }
+
+ return resp
+}
+
+func PlanActionClientCapabilities(in *tfplugin6.ClientCapabilities) *tfprotov6.PlanActionClientCapabilities {
+ if in == nil {
+ return nil
+ }
+
+ resp := &tfprotov6.PlanActionClientCapabilities{
+ DeferralAllowed: in.DeferralAllowed,
+ }
+
+ return resp
+}
+
+func InvokeActionClientCapabilities(in *tfplugin6.ClientCapabilities) *tfprotov6.InvokeActionClientCapabilities {
+ if in == nil {
+ return nil
+ }
+
+ resp := &tfprotov6.InvokeActionClientCapabilities{}
+
+ return resp
+}
diff --git a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/fromproto/ephemeral_resource.go b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/fromproto/ephemeral_resource.go
new file mode 100644
index 0000000000..103aabd833
--- /dev/null
+++ b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/fromproto/ephemeral_resource.go
@@ -0,0 +1,54 @@
+// Copyright (c) HashiCorp, Inc.
+// SPDX-License-Identifier: MPL-2.0
+
+package fromproto
+
+import (
+ "github.com/hashicorp/terraform-plugin-go/tfprotov6"
+ "github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/tfplugin6"
+)
+
+func ValidateEphemeralResourceConfigRequest(in *tfplugin6.ValidateEphemeralResourceConfig_Request) *tfprotov6.ValidateEphemeralResourceConfigRequest {
+ if in == nil {
+ return nil
+ }
+
+ return &tfprotov6.ValidateEphemeralResourceConfigRequest{
+ TypeName: in.TypeName,
+ Config: DynamicValue(in.Config),
+ }
+}
+
+func OpenEphemeralResourceRequest(in *tfplugin6.OpenEphemeralResource_Request) *tfprotov6.OpenEphemeralResourceRequest {
+ if in == nil {
+ return nil
+ }
+
+ return &tfprotov6.OpenEphemeralResourceRequest{
+ TypeName: in.TypeName,
+ Config: DynamicValue(in.Config),
+ ClientCapabilities: OpenEphemeralResourceClientCapabilities(in.ClientCapabilities),
+ }
+}
+
+func RenewEphemeralResourceRequest(in *tfplugin6.RenewEphemeralResource_Request) *tfprotov6.RenewEphemeralResourceRequest {
+ if in == nil {
+ return nil
+ }
+
+ return &tfprotov6.RenewEphemeralResourceRequest{
+ TypeName: in.TypeName,
+ Private: in.Private,
+ }
+}
+
+func CloseEphemeralResourceRequest(in *tfplugin6.CloseEphemeralResource_Request) *tfprotov6.CloseEphemeralResourceRequest {
+ if in == nil {
+ return nil
+ }
+
+ return &tfprotov6.CloseEphemeralResourceRequest{
+ TypeName: in.TypeName,
+ Private: in.Private,
+ }
+}
diff --git a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/fromproto/list_resource.go b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/fromproto/list_resource.go
new file mode 100644
index 0000000000..9d6e725ea0
--- /dev/null
+++ b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/fromproto/list_resource.go
@@ -0,0 +1,35 @@
+// Copyright (c) HashiCorp, Inc.
+// SPDX-License-Identifier: MPL-2.0
+
+package fromproto
+
+import (
+ "github.com/hashicorp/terraform-plugin-go/tfprotov6"
+ "github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/tfplugin6"
+)
+
+func ListResourceRequest(in *tfplugin6.ListResource_Request) *tfprotov6.ListResourceRequest {
+ if in == nil {
+ return nil
+ }
+
+ return &tfprotov6.ListResourceRequest{
+ TypeName: in.TypeName,
+ Config: DynamicValue(in.Config),
+ IncludeResource: in.IncludeResourceObject,
+ Limit: in.Limit,
+ }
+}
+
+func ValidateListResourceConfigRequest(in *tfplugin6.ValidateListResourceConfig_Request) *tfprotov6.ValidateListResourceConfigRequest {
+ if in == nil {
+ return nil
+ }
+
+ return &tfprotov6.ValidateListResourceConfigRequest{
+ TypeName: in.TypeName,
+ Config: DynamicValue(in.Config),
+ IncludeResourceObject: DynamicValue(in.IncludeResourceObject),
+ Limit: DynamicValue(in.Limit),
+ }
+}
diff --git a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/fromproto/provider.go b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/fromproto/provider.go
index 99a6cc5563..4c5565cd5f 100644
--- a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/fromproto/provider.go
+++ b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/fromproto/provider.go
@@ -28,6 +28,16 @@ func GetProviderSchemaRequest(in *tfplugin6.GetProviderSchema_Request) *tfprotov
return resp
}
+func GetResourceIdentitySchemasRequest(in *tfplugin6.GetResourceIdentitySchemas_Request) *tfprotov6.GetResourceIdentitySchemasRequest {
+ if in == nil {
+ return nil
+ }
+
+ resp := &tfprotov6.GetResourceIdentitySchemasRequest{}
+
+ return resp
+}
+
func ValidateProviderConfigRequest(in *tfplugin6.ValidateProviderConfig_Request) *tfprotov6.ValidateProviderConfigRequest {
if in == nil {
return nil
diff --git a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/fromproto/resource.go b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/fromproto/resource.go
index 24e336953f..c845e360fc 100644
--- a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/fromproto/resource.go
+++ b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/fromproto/resource.go
@@ -14,8 +14,9 @@ func ValidateResourceConfigRequest(in *tfplugin6.ValidateResourceConfig_Request)
}
resp := &tfprotov6.ValidateResourceConfigRequest{
- Config: DynamicValue(in.Config),
- TypeName: in.TypeName,
+ ClientCapabilities: ValidateResourceConfigClientCapabilities(in.ClientCapabilities),
+ Config: DynamicValue(in.Config),
+ TypeName: in.TypeName,
}
return resp
@@ -35,6 +36,20 @@ func UpgradeResourceStateRequest(in *tfplugin6.UpgradeResourceState_Request) *tf
return resp
}
+func UpgradeResourceIdentityRequest(in *tfplugin6.UpgradeResourceIdentity_Request) *tfprotov6.UpgradeResourceIdentityRequest {
+ if in == nil {
+ return nil
+ }
+
+ resp := &tfprotov6.UpgradeResourceIdentityRequest{
+ RawIdentity: RawState(in.RawIdentity),
+ TypeName: in.TypeName,
+ Version: in.Version,
+ }
+
+ return resp
+}
+
func ReadResourceRequest(in *tfplugin6.ReadResource_Request) *tfprotov6.ReadResourceRequest {
if in == nil {
return nil
@@ -46,6 +61,7 @@ func ReadResourceRequest(in *tfplugin6.ReadResource_Request) *tfprotov6.ReadReso
ProviderMeta: DynamicValue(in.ProviderMeta),
TypeName: in.TypeName,
ClientCapabilities: ReadResourceClientCapabilities(in.ClientCapabilities),
+ CurrentIdentity: ResourceIdentityData(in.CurrentIdentity),
}
return resp
@@ -64,6 +80,7 @@ func PlanResourceChangeRequest(in *tfplugin6.PlanResourceChange_Request) *tfprot
ProviderMeta: DynamicValue(in.ProviderMeta),
TypeName: in.TypeName,
ClientCapabilities: PlanResourceChangeClientCapabilities(in.ClientCapabilities),
+ PriorIdentity: ResourceIdentityData(in.PriorIdentity),
}
return resp
@@ -75,12 +92,13 @@ func ApplyResourceChangeRequest(in *tfplugin6.ApplyResourceChange_Request) *tfpr
}
resp := &tfprotov6.ApplyResourceChangeRequest{
- Config: DynamicValue(in.Config),
- PlannedPrivate: in.PlannedPrivate,
- PlannedState: DynamicValue(in.PlannedState),
- PriorState: DynamicValue(in.PriorState),
- ProviderMeta: DynamicValue(in.ProviderMeta),
- TypeName: in.TypeName,
+ Config: DynamicValue(in.Config),
+ PlannedPrivate: in.PlannedPrivate,
+ PlannedState: DynamicValue(in.PlannedState),
+ PriorState: DynamicValue(in.PriorState),
+ ProviderMeta: DynamicValue(in.ProviderMeta),
+ TypeName: in.TypeName,
+ PlannedIdentity: ResourceIdentityData(in.PlannedIdentity),
}
return resp
@@ -95,6 +113,7 @@ func ImportResourceStateRequest(in *tfplugin6.ImportResourceState_Request) *tfpr
TypeName: in.TypeName,
ID: in.Id,
ClientCapabilities: ImportResourceStateClientCapabilities(in.ClientCapabilities),
+ Identity: ResourceIdentityData(in.Identity),
}
return resp
@@ -112,6 +131,7 @@ func MoveResourceStateRequest(in *tfplugin6.MoveResourceState_Request) *tfprotov
SourceState: RawState(in.SourceState),
SourceTypeName: in.SourceTypeName,
TargetTypeName: in.TargetTypeName,
+ SourceIdentity: RawState(in.SourceIdentity),
}
return resp
diff --git a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/fromproto/resource_identity_data.go b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/fromproto/resource_identity_data.go
new file mode 100644
index 0000000000..f1fca647f3
--- /dev/null
+++ b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/fromproto/resource_identity_data.go
@@ -0,0 +1,21 @@
+// Copyright (c) HashiCorp, Inc.
+// SPDX-License-Identifier: MPL-2.0
+
+package fromproto
+
+import (
+ "github.com/hashicorp/terraform-plugin-go/tfprotov6"
+ "github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/tfplugin6"
+)
+
+func ResourceIdentityData(in *tfplugin6.ResourceIdentityData) *tfprotov6.ResourceIdentityData {
+ if in == nil {
+ return nil
+ }
+
+ resp := &tfprotov6.ResourceIdentityData{
+ IdentityData: DynamicValue(in.IdentityData),
+ }
+
+ return resp
+}
diff --git a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/tf6serverlogging/client_capabilities.go b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/tf6serverlogging/client_capabilities.go
index d8d5859f43..1f107e4fd9 100644
--- a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/tf6serverlogging/client_capabilities.go
+++ b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/tf6serverlogging/client_capabilities.go
@@ -10,6 +10,20 @@ import (
"github.com/hashicorp/terraform-plugin-go/tfprotov6"
)
+// ValidateResourceConfigClientCapabilities generates a TRACE "Announced client capabilities" log.
+func ValidateResourceConfigClientCapabilities(ctx context.Context, capabilities *tfprotov6.ValidateResourceConfigClientCapabilities) {
+ if capabilities == nil {
+ logging.ProtocolTrace(ctx, "No announced client capabilities", map[string]interface{}{})
+ return
+ }
+
+ responseFields := map[string]interface{}{
+ logging.KeyClientCapabilityWriteOnlyAttributesAllowed: capabilities.WriteOnlyAttributesAllowed,
+ }
+
+ logging.ProtocolTrace(ctx, "Announced client capabilities", responseFields)
+}
+
// ConfigureProviderClientCapabilities generates a TRACE "Announced client capabilities" log.
func ConfigureProviderClientCapabilities(ctx context.Context, capabilities *tfprotov6.ConfigureProviderClientCapabilities) {
if capabilities == nil {
@@ -79,3 +93,31 @@ func ImportResourceStateClientCapabilities(ctx context.Context, capabilities *tf
logging.ProtocolTrace(ctx, "Announced client capabilities", responseFields)
}
+
+// OpenEphemeralResourceClientCapabilities generates a TRACE "Announced client capabilities" log.
+func OpenEphemeralResourceClientCapabilities(ctx context.Context, capabilities *tfprotov6.OpenEphemeralResourceClientCapabilities) {
+ if capabilities == nil {
+ logging.ProtocolTrace(ctx, "No announced client capabilities", map[string]interface{}{})
+ return
+ }
+
+ responseFields := map[string]interface{}{
+ logging.KeyClientCapabilityDeferralAllowed: capabilities.DeferralAllowed,
+ }
+
+ logging.ProtocolTrace(ctx, "Announced client capabilities", responseFields)
+}
+
+// PlanActionClientCapabilities generates a TRACE "Announced client capabilities" log.
+func PlanActionClientCapabilities(ctx context.Context, capabilities *tfprotov6.PlanActionClientCapabilities) {
+ if capabilities == nil {
+ logging.ProtocolTrace(ctx, "No announced client capabilities", map[string]interface{}{})
+ return
+ }
+
+ responseFields := map[string]interface{}{
+ logging.KeyClientCapabilityDeferralAllowed: capabilities.DeferralAllowed,
+ }
+
+ logging.ProtocolTrace(ctx, "Announced client capabilities", responseFields)
+}
diff --git a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/tf6serverlogging/downstream_request.go b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/tf6serverlogging/downstream_request.go
index 9c27d41739..42e9b1aeee 100644
--- a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/tf6serverlogging/downstream_request.go
+++ b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/tf6serverlogging/downstream_request.go
@@ -24,6 +24,25 @@ func DownstreamRequest(ctx context.Context) context.Context {
return ctx
}
+// DownstreamServerEvent generates the following logging:
+//
+// - TRACE "Received downstream server event" log with time elapsed since
+// request start and diagnostic severity counts
+// - Per-diagnostic logs
+func DownstreamServerEvent(ctx context.Context, diagnostics diag.Diagnostics) {
+ eventFields := map[string]interface{}{
+ logging.KeyDiagnosticErrorCount: diagnostics.ErrorCount(),
+ logging.KeyDiagnosticWarningCount: diagnostics.WarningCount(),
+ }
+
+ if requestStart, ok := ctx.Value(ContextKeyDownstreamRequestStartTime{}).(time.Time); ok {
+ eventFields[logging.KeyRequestDurationMs] = time.Since(requestStart).Milliseconds()
+ }
+
+ logging.ProtocolTrace(ctx, "Received downstream server event", eventFields)
+ diagnostics.Log(ctx)
+}
+
// DownstreamResponse generates the following logging:
//
// - TRACE "Received downstream response" log with request duration and
diff --git a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/tf6serverlogging/server_capabilities.go b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/tf6serverlogging/server_capabilities.go
index f6aaf953d9..74f9931aca 100644
--- a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/tf6serverlogging/server_capabilities.go
+++ b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/tf6serverlogging/server_capabilities.go
@@ -14,11 +14,13 @@ import (
func ServerCapabilities(ctx context.Context, capabilities *tfprotov6.ServerCapabilities) {
responseFields := map[string]interface{}{
logging.KeyServerCapabilityGetProviderSchemaOptional: false,
+ logging.KeyServerCapabilityMoveResourceState: false,
logging.KeyServerCapabilityPlanDestroy: false,
}
if capabilities != nil {
responseFields[logging.KeyServerCapabilityGetProviderSchemaOptional] = capabilities.GetProviderSchemaOptional
+ responseFields[logging.KeyServerCapabilityMoveResourceState] = capabilities.MoveResourceState
responseFields[logging.KeyServerCapabilityPlanDestroy] = capabilities.PlanDestroy
}
diff --git a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/tfplugin6/tfplugin6.pb.go b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/tfplugin6/tfplugin6.pb.go
index e0f55a1f54..dde77d7aa3 100644
--- a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/tfplugin6/tfplugin6.pb.go
+++ b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/tfplugin6/tfplugin6.pb.go
@@ -1,14 +1,14 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
-// Terraform Plugin RPC protocol version 6.6
+// Terraform Plugin RPC protocol version 6.10
//
-// This file defines version 6.6 of the RPC protocol. To implement a plugin
+// This file defines version 6.10 of the RPC protocol. To implement a plugin
// against this protocol, copy this definition into your own codebase and
// use protoc to generate stubs for your target language.
//
// This file will not be updated. Any minor versions of protocol 6 to follow
-// should copy this file and modify the copy while maintaing backwards
+// should copy this file and modify the copy while maintaining backwards
// compatibility. Breaking changes, if any are required, will come
// in a subsequent major version with its own separate proto definition.
//
@@ -22,8 +22,8 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.34.0
-// protoc v5.26.1
+// protoc-gen-go v1.36.9
+// protoc v5.29.3
// source: tfplugin6.proto
package tfplugin6
@@ -31,8 +31,10 @@ package tfplugin6
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ timestamppb "google.golang.org/protobuf/types/known/timestamppb"
reflect "reflect"
sync "sync"
+ unsafe "unsafe"
)
const (
@@ -306,27 +308,24 @@ func (x Deferred_Reason) Number() protoreflect.EnumNumber {
// Deprecated: Use Deferred_Reason.Descriptor instead.
func (Deferred_Reason) EnumDescriptor() ([]byte, []int) {
- return file_tfplugin6_proto_rawDescGZIP(), []int{10, 0}
+ return file_tfplugin6_proto_rawDescGZIP(), []int{13, 0}
}
// DynamicValue is an opaque encoding of terraform data, with the field name
// indicating the encoding scheme used.
type DynamicValue struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Msgpack []byte `protobuf:"bytes,1,opt,name=msgpack,proto3" json:"msgpack,omitempty"`
+ Json []byte `protobuf:"bytes,2,opt,name=json,proto3" json:"json,omitempty"`
unknownFields protoimpl.UnknownFields
-
- Msgpack []byte `protobuf:"bytes,1,opt,name=msgpack,proto3" json:"msgpack,omitempty"`
- Json []byte `protobuf:"bytes,2,opt,name=json,proto3" json:"json,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *DynamicValue) Reset() {
*x = DynamicValue{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin6_proto_msgTypes[0]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_tfplugin6_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *DynamicValue) String() string {
@@ -337,7 +336,7 @@ func (*DynamicValue) ProtoMessage() {}
func (x *DynamicValue) ProtoReflect() protoreflect.Message {
mi := &file_tfplugin6_proto_msgTypes[0]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -367,23 +366,20 @@ func (x *DynamicValue) GetJson() []byte {
}
type Diagnostic struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Severity Diagnostic_Severity `protobuf:"varint,1,opt,name=severity,proto3,enum=tfplugin6.Diagnostic_Severity" json:"severity,omitempty"`
+ Summary string `protobuf:"bytes,2,opt,name=summary,proto3" json:"summary,omitempty"`
+ Detail string `protobuf:"bytes,3,opt,name=detail,proto3" json:"detail,omitempty"`
+ Attribute *AttributePath `protobuf:"bytes,4,opt,name=attribute,proto3" json:"attribute,omitempty"`
unknownFields protoimpl.UnknownFields
-
- Severity Diagnostic_Severity `protobuf:"varint,1,opt,name=severity,proto3,enum=tfplugin6.Diagnostic_Severity" json:"severity,omitempty"`
- Summary string `protobuf:"bytes,2,opt,name=summary,proto3" json:"summary,omitempty"`
- Detail string `protobuf:"bytes,3,opt,name=detail,proto3" json:"detail,omitempty"`
- Attribute *AttributePath `protobuf:"bytes,4,opt,name=attribute,proto3" json:"attribute,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *Diagnostic) Reset() {
*x = Diagnostic{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin6_proto_msgTypes[1]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_tfplugin6_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *Diagnostic) String() string {
@@ -394,7 +390,7 @@ func (*Diagnostic) ProtoMessage() {}
func (x *Diagnostic) ProtoReflect() protoreflect.Message {
mi := &file_tfplugin6_proto_msgTypes[1]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -438,23 +434,20 @@ func (x *Diagnostic) GetAttribute() *AttributePath {
}
type FunctionError struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- Text string `protobuf:"bytes,1,opt,name=text,proto3" json:"text,omitempty"`
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Text string `protobuf:"bytes,1,opt,name=text,proto3" json:"text,omitempty"`
// The optional function_argument records the index position of the
// argument which caused the error.
FunctionArgument *int64 `protobuf:"varint,2,opt,name=function_argument,json=functionArgument,proto3,oneof" json:"function_argument,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *FunctionError) Reset() {
*x = FunctionError{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin6_proto_msgTypes[2]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_tfplugin6_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *FunctionError) String() string {
@@ -465,7 +458,7 @@ func (*FunctionError) ProtoMessage() {}
func (x *FunctionError) ProtoReflect() protoreflect.Message {
mi := &file_tfplugin6_proto_msgTypes[2]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -495,20 +488,17 @@ func (x *FunctionError) GetFunctionArgument() int64 {
}
type AttributePath struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Steps []*AttributePath_Step `protobuf:"bytes,1,rep,name=steps,proto3" json:"steps,omitempty"`
unknownFields protoimpl.UnknownFields
-
- Steps []*AttributePath_Step `protobuf:"bytes,1,rep,name=steps,proto3" json:"steps,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *AttributePath) Reset() {
*x = AttributePath{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin6_proto_msgTypes[3]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_tfplugin6_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *AttributePath) String() string {
@@ -519,7 +509,7 @@ func (*AttributePath) ProtoMessage() {}
func (x *AttributePath) ProtoReflect() protoreflect.Message {
mi := &file_tfplugin6_proto_msgTypes[3]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -542,18 +532,16 @@ func (x *AttributePath) GetSteps() []*AttributePath_Step {
}
type StopProvider struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *StopProvider) Reset() {
*x = StopProvider{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin6_proto_msgTypes[4]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_tfplugin6_proto_msgTypes[4]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *StopProvider) String() string {
@@ -564,7 +552,7 @@ func (*StopProvider) ProtoMessage() {}
func (x *StopProvider) ProtoReflect() protoreflect.Message {
mi := &file_tfplugin6_proto_msgTypes[4]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -583,21 +571,18 @@ func (*StopProvider) Descriptor() ([]byte, []int) {
// provider. It can be in one of two formats, the current json encoded format
// in bytes, or the legacy flatmap format as a map of strings.
type RawState struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Json []byte `protobuf:"bytes,1,opt,name=json,proto3" json:"json,omitempty"`
+ Flatmap map[string]string `protobuf:"bytes,2,rep,name=flatmap,proto3" json:"flatmap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
unknownFields protoimpl.UnknownFields
-
- Json []byte `protobuf:"bytes,1,opt,name=json,proto3" json:"json,omitempty"`
- Flatmap map[string]string `protobuf:"bytes,2,rep,name=flatmap,proto3" json:"flatmap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+ sizeCache protoimpl.SizeCache
}
func (x *RawState) Reset() {
*x = RawState{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin6_proto_msgTypes[5]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_tfplugin6_proto_msgTypes[5]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *RawState) String() string {
@@ -608,7 +593,7 @@ func (*RawState) ProtoMessage() {}
func (x *RawState) ProtoReflect() protoreflect.Message {
mi := &file_tfplugin6_proto_msgTypes[5]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -639,25 +624,22 @@ func (x *RawState) GetFlatmap() map[string]string {
// Schema is the configuration schema for a Resource or Provider.
type Schema struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
+ state protoimpl.MessageState `protogen:"open.v1"`
// The version of the schema.
// Schemas are versioned, so that providers can upgrade a saved resource
// state when the schema is changed.
Version int64 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"`
// Block is the top level configuration block for this schema.
- Block *Schema_Block `protobuf:"bytes,2,opt,name=block,proto3" json:"block,omitempty"`
+ Block *Schema_Block `protobuf:"bytes,2,opt,name=block,proto3" json:"block,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *Schema) Reset() {
*x = Schema{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin6_proto_msgTypes[6]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_tfplugin6_proto_msgTypes[6]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *Schema) String() string {
@@ -668,7 +650,7 @@ func (*Schema) ProtoMessage() {}
func (x *Schema) ProtoReflect() protoreflect.Message {
mi := &file_tfplugin6_proto_msgTypes[6]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -697,11 +679,130 @@ func (x *Schema) GetBlock() *Schema_Block {
return nil
}
-type Function struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+// ResourceIdentitySchema represents the structure and types of data used to identify
+// a managed resource type. Effectively, resource identity is a versioned object
+// that can be used to compare resources, whether already managed and/or being
+// discovered.
+type ResourceIdentitySchema struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // version is the identity version and separate from the Schema version.
+ // Any time the structure or format of identity_attributes changes, this version
+ // should be incremented. Versioning implicitly starts at 0 and by convention
+ // should be incremented by 1 each change.
+ //
+ // When comparing identity_attributes data, differing versions should always be treated
+ // as inequal.
+ Version int64 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"`
+ // identity_attributes are the individual value definitions which define identity data
+ // for a managed resource type. This information is used to decode DynamicValue of
+ // identity data.
+ //
+ // These attributes are intended for permanent identity data and must be wholly
+ // representative of all data necessary to compare two managed resource instances
+ // with no other data. This generally should include account, endpoint, location,
+ // and automatically generated identifiers. For some resources, this may include
+ // configuration-based data, such as a required name which must be unique.
+ IdentityAttributes []*ResourceIdentitySchema_IdentityAttribute `protobuf:"bytes,2,rep,name=identity_attributes,json=identityAttributes,proto3" json:"identity_attributes,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *ResourceIdentitySchema) Reset() {
+ *x = ResourceIdentitySchema{}
+ mi := &file_tfplugin6_proto_msgTypes[7]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ResourceIdentitySchema) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ResourceIdentitySchema) ProtoMessage() {}
+
+func (x *ResourceIdentitySchema) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin6_proto_msgTypes[7]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ResourceIdentitySchema.ProtoReflect.Descriptor instead.
+func (*ResourceIdentitySchema) Descriptor() ([]byte, []int) {
+ return file_tfplugin6_proto_rawDescGZIP(), []int{7}
+}
+
+func (x *ResourceIdentitySchema) GetVersion() int64 {
+ if x != nil {
+ return x.Version
+ }
+ return 0
+}
+
+func (x *ResourceIdentitySchema) GetIdentityAttributes() []*ResourceIdentitySchema_IdentityAttribute {
+ if x != nil {
+ return x.IdentityAttributes
+ }
+ return nil
+}
+
+// ResourceIdentityData is a separate message for better extensibility
+type ResourceIdentityData struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // identity_data is the resource identity data for the given definition. It should
+ // be decoded using the identity schema.
+ //
+ // This data is considered permanent for the identity version and suitable for
+ // longer-term storage.
+ IdentityData *DynamicValue `protobuf:"bytes,1,opt,name=identity_data,json=identityData,proto3" json:"identity_data,omitempty"`
unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *ResourceIdentityData) Reset() {
+ *x = ResourceIdentityData{}
+ mi := &file_tfplugin6_proto_msgTypes[8]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ResourceIdentityData) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ResourceIdentityData) ProtoMessage() {}
+
+func (x *ResourceIdentityData) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin6_proto_msgTypes[8]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ResourceIdentityData.ProtoReflect.Descriptor instead.
+func (*ResourceIdentityData) Descriptor() ([]byte, []int) {
+ return file_tfplugin6_proto_rawDescGZIP(), []int{8}
+}
+func (x *ResourceIdentityData) GetIdentityData() *DynamicValue {
+ if x != nil {
+ return x.IdentityData
+ }
+ return nil
+}
+
+type Function struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
// parameters is the ordered list of positional function parameters.
Parameters []*Function_Parameter `protobuf:"bytes,1,rep,name=parameters,proto3" json:"parameters,omitempty"`
// variadic_parameter is an optional final parameter which accepts
@@ -719,15 +820,15 @@ type Function struct {
// deprecation_message is human-readable documentation if the
// function is deprecated.
DeprecationMessage string `protobuf:"bytes,7,opt,name=deprecation_message,json=deprecationMessage,proto3" json:"deprecation_message,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *Function) Reset() {
*x = Function{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin6_proto_msgTypes[7]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_tfplugin6_proto_msgTypes[9]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *Function) String() string {
@@ -737,8 +838,8 @@ func (x *Function) String() string {
func (*Function) ProtoMessage() {}
func (x *Function) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin6_proto_msgTypes[7]
- if protoimpl.UnsafeEnabled && x != nil {
+ mi := &file_tfplugin6_proto_msgTypes[9]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -750,7 +851,7 @@ func (x *Function) ProtoReflect() protoreflect.Message {
// Deprecated: Use Function.ProtoReflect.Descriptor instead.
func (*Function) Descriptor() ([]byte, []int) {
- return file_tfplugin6_proto_rawDescGZIP(), []int{7}
+ return file_tfplugin6_proto_rawDescGZIP(), []int{9}
}
func (x *Function) GetParameters() []*Function_Parameter {
@@ -802,15 +903,56 @@ func (x *Function) GetDeprecationMessage() string {
return ""
}
+type ActionSchema struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Schema *Schema `protobuf:"bytes,1,opt,name=schema,proto3" json:"schema,omitempty"` // of the action itself
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *ActionSchema) Reset() {
+ *x = ActionSchema{}
+ mi := &file_tfplugin6_proto_msgTypes[10]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ActionSchema) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ActionSchema) ProtoMessage() {}
+
+func (x *ActionSchema) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin6_proto_msgTypes[10]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ActionSchema.ProtoReflect.Descriptor instead.
+func (*ActionSchema) Descriptor() ([]byte, []int) {
+ return file_tfplugin6_proto_rawDescGZIP(), []int{10}
+}
+
+func (x *ActionSchema) GetSchema() *Schema {
+ if x != nil {
+ return x.Schema
+ }
+ return nil
+}
+
// ServerCapabilities allows providers to communicate extra information
// regarding supported protocol features. This is used to indicate
// availability of certain forward-compatible changes which may be optional
// in a major protocol version, but cannot be tested for directly.
type ServerCapabilities struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
+ state protoimpl.MessageState `protogen:"open.v1"`
// The plan_destroy capability signals that a provider expects a call
// to PlanResourceChange when a resource is going to be destroyed.
PlanDestroy bool `protobuf:"varint,1,opt,name=plan_destroy,json=planDestroy,proto3" json:"plan_destroy,omitempty"`
@@ -822,15 +964,15 @@ type ServerCapabilities struct {
// The move_resource_state capability signals that a provider supports the
// MoveResourceState RPC.
MoveResourceState bool `protobuf:"varint,3,opt,name=move_resource_state,json=moveResourceState,proto3" json:"move_resource_state,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *ServerCapabilities) Reset() {
*x = ServerCapabilities{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin6_proto_msgTypes[8]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_tfplugin6_proto_msgTypes[11]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *ServerCapabilities) String() string {
@@ -840,8 +982,8 @@ func (x *ServerCapabilities) String() string {
func (*ServerCapabilities) ProtoMessage() {}
func (x *ServerCapabilities) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin6_proto_msgTypes[8]
- if protoimpl.UnsafeEnabled && x != nil {
+ mi := &file_tfplugin6_proto_msgTypes[11]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -853,7 +995,7 @@ func (x *ServerCapabilities) ProtoReflect() protoreflect.Message {
// Deprecated: Use ServerCapabilities.ProtoReflect.Descriptor instead.
func (*ServerCapabilities) Descriptor() ([]byte, []int) {
- return file_tfplugin6_proto_rawDescGZIP(), []int{8}
+ return file_tfplugin6_proto_rawDescGZIP(), []int{11}
}
func (x *ServerCapabilities) GetPlanDestroy() bool {
@@ -882,22 +1024,22 @@ func (x *ServerCapabilities) GetMoveResourceState() bool {
// certain forward-compatible changes which may be optional in a major
// protocol version, but cannot be tested for directly.
type ClientCapabilities struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
+ state protoimpl.MessageState `protogen:"open.v1"`
// The deferral_allowed capability signals that the client is able to
// handle deferred responses from the provider.
DeferralAllowed bool `protobuf:"varint,1,opt,name=deferral_allowed,json=deferralAllowed,proto3" json:"deferral_allowed,omitempty"`
+ // The write_only_attributes_allowed capability signals that the client
+ // is able to handle write_only attributes for managed resources.
+ WriteOnlyAttributesAllowed bool `protobuf:"varint,2,opt,name=write_only_attributes_allowed,json=writeOnlyAttributesAllowed,proto3" json:"write_only_attributes_allowed,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *ClientCapabilities) Reset() {
*x = ClientCapabilities{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin6_proto_msgTypes[9]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_tfplugin6_proto_msgTypes[12]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *ClientCapabilities) String() string {
@@ -907,8 +1049,8 @@ func (x *ClientCapabilities) String() string {
func (*ClientCapabilities) ProtoMessage() {}
func (x *ClientCapabilities) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin6_proto_msgTypes[9]
- if protoimpl.UnsafeEnabled && x != nil {
+ mi := &file_tfplugin6_proto_msgTypes[12]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -920,7 +1062,7 @@ func (x *ClientCapabilities) ProtoReflect() protoreflect.Message {
// Deprecated: Use ClientCapabilities.ProtoReflect.Descriptor instead.
func (*ClientCapabilities) Descriptor() ([]byte, []int) {
- return file_tfplugin6_proto_rawDescGZIP(), []int{9}
+ return file_tfplugin6_proto_rawDescGZIP(), []int{12}
}
func (x *ClientCapabilities) GetDeferralAllowed() bool {
@@ -930,23 +1072,27 @@ func (x *ClientCapabilities) GetDeferralAllowed() bool {
return false
}
+func (x *ClientCapabilities) GetWriteOnlyAttributesAllowed() bool {
+ if x != nil {
+ return x.WriteOnlyAttributesAllowed
+ }
+ return false
+}
+
// Deferred is a message that indicates that change is deferred for a reason.
type Deferred struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
+ state protoimpl.MessageState `protogen:"open.v1"`
// reason is the reason for deferring the change.
- Reason Deferred_Reason `protobuf:"varint,1,opt,name=reason,proto3,enum=tfplugin6.Deferred_Reason" json:"reason,omitempty"`
+ Reason Deferred_Reason `protobuf:"varint,1,opt,name=reason,proto3,enum=tfplugin6.Deferred_Reason" json:"reason,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *Deferred) Reset() {
*x = Deferred{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin6_proto_msgTypes[10]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_tfplugin6_proto_msgTypes[13]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *Deferred) String() string {
@@ -956,8 +1102,8 @@ func (x *Deferred) String() string {
func (*Deferred) ProtoMessage() {}
func (x *Deferred) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin6_proto_msgTypes[10]
- if protoimpl.UnsafeEnabled && x != nil {
+ mi := &file_tfplugin6_proto_msgTypes[13]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -969,7 +1115,7 @@ func (x *Deferred) ProtoReflect() protoreflect.Message {
// Deprecated: Use Deferred.ProtoReflect.Descriptor instead.
func (*Deferred) Descriptor() ([]byte, []int) {
- return file_tfplugin6_proto_rawDescGZIP(), []int{10}
+ return file_tfplugin6_proto_rawDescGZIP(), []int{13}
}
func (x *Deferred) GetReason() Deferred_Reason {
@@ -980,18 +1126,16 @@ func (x *Deferred) GetReason() Deferred_Reason {
}
type GetMetadata struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *GetMetadata) Reset() {
*x = GetMetadata{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin6_proto_msgTypes[11]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_tfplugin6_proto_msgTypes[14]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *GetMetadata) String() string {
@@ -1001,8 +1145,8 @@ func (x *GetMetadata) String() string {
func (*GetMetadata) ProtoMessage() {}
func (x *GetMetadata) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin6_proto_msgTypes[11]
- if protoimpl.UnsafeEnabled && x != nil {
+ mi := &file_tfplugin6_proto_msgTypes[14]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1014,22 +1158,20 @@ func (x *GetMetadata) ProtoReflect() protoreflect.Message {
// Deprecated: Use GetMetadata.ProtoReflect.Descriptor instead.
func (*GetMetadata) Descriptor() ([]byte, []int) {
- return file_tfplugin6_proto_rawDescGZIP(), []int{11}
+ return file_tfplugin6_proto_rawDescGZIP(), []int{14}
}
type GetProviderSchema struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *GetProviderSchema) Reset() {
*x = GetProviderSchema{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin6_proto_msgTypes[12]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_tfplugin6_proto_msgTypes[15]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *GetProviderSchema) String() string {
@@ -1039,8 +1181,8 @@ func (x *GetProviderSchema) String() string {
func (*GetProviderSchema) ProtoMessage() {}
func (x *GetProviderSchema) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin6_proto_msgTypes[12]
- if protoimpl.UnsafeEnabled && x != nil {
+ mi := &file_tfplugin6_proto_msgTypes[15]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1052,22 +1194,20 @@ func (x *GetProviderSchema) ProtoReflect() protoreflect.Message {
// Deprecated: Use GetProviderSchema.ProtoReflect.Descriptor instead.
func (*GetProviderSchema) Descriptor() ([]byte, []int) {
- return file_tfplugin6_proto_rawDescGZIP(), []int{12}
+ return file_tfplugin6_proto_rawDescGZIP(), []int{15}
}
type ValidateProviderConfig struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *ValidateProviderConfig) Reset() {
*x = ValidateProviderConfig{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin6_proto_msgTypes[13]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_tfplugin6_proto_msgTypes[16]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *ValidateProviderConfig) String() string {
@@ -1077,8 +1217,8 @@ func (x *ValidateProviderConfig) String() string {
func (*ValidateProviderConfig) ProtoMessage() {}
func (x *ValidateProviderConfig) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin6_proto_msgTypes[13]
- if protoimpl.UnsafeEnabled && x != nil {
+ mi := &file_tfplugin6_proto_msgTypes[16]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1090,22 +1230,20 @@ func (x *ValidateProviderConfig) ProtoReflect() protoreflect.Message {
// Deprecated: Use ValidateProviderConfig.ProtoReflect.Descriptor instead.
func (*ValidateProviderConfig) Descriptor() ([]byte, []int) {
- return file_tfplugin6_proto_rawDescGZIP(), []int{13}
+ return file_tfplugin6_proto_rawDescGZIP(), []int{16}
}
type UpgradeResourceState struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *UpgradeResourceState) Reset() {
*x = UpgradeResourceState{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin6_proto_msgTypes[14]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_tfplugin6_proto_msgTypes[17]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *UpgradeResourceState) String() string {
@@ -1115,8 +1253,8 @@ func (x *UpgradeResourceState) String() string {
func (*UpgradeResourceState) ProtoMessage() {}
func (x *UpgradeResourceState) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin6_proto_msgTypes[14]
- if protoimpl.UnsafeEnabled && x != nil {
+ mi := &file_tfplugin6_proto_msgTypes[17]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1128,22 +1266,20 @@ func (x *UpgradeResourceState) ProtoReflect() protoreflect.Message {
// Deprecated: Use UpgradeResourceState.ProtoReflect.Descriptor instead.
func (*UpgradeResourceState) Descriptor() ([]byte, []int) {
- return file_tfplugin6_proto_rawDescGZIP(), []int{14}
+ return file_tfplugin6_proto_rawDescGZIP(), []int{17}
}
type ValidateResourceConfig struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *ValidateResourceConfig) Reset() {
*x = ValidateResourceConfig{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin6_proto_msgTypes[15]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_tfplugin6_proto_msgTypes[18]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *ValidateResourceConfig) String() string {
@@ -1153,8 +1289,8 @@ func (x *ValidateResourceConfig) String() string {
func (*ValidateResourceConfig) ProtoMessage() {}
func (x *ValidateResourceConfig) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin6_proto_msgTypes[15]
- if protoimpl.UnsafeEnabled && x != nil {
+ mi := &file_tfplugin6_proto_msgTypes[18]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1166,22 +1302,20 @@ func (x *ValidateResourceConfig) ProtoReflect() protoreflect.Message {
// Deprecated: Use ValidateResourceConfig.ProtoReflect.Descriptor instead.
func (*ValidateResourceConfig) Descriptor() ([]byte, []int) {
- return file_tfplugin6_proto_rawDescGZIP(), []int{15}
+ return file_tfplugin6_proto_rawDescGZIP(), []int{18}
}
type ValidateDataResourceConfig struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *ValidateDataResourceConfig) Reset() {
*x = ValidateDataResourceConfig{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin6_proto_msgTypes[16]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_tfplugin6_proto_msgTypes[19]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *ValidateDataResourceConfig) String() string {
@@ -1191,8 +1325,8 @@ func (x *ValidateDataResourceConfig) String() string {
func (*ValidateDataResourceConfig) ProtoMessage() {}
func (x *ValidateDataResourceConfig) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin6_proto_msgTypes[16]
- if protoimpl.UnsafeEnabled && x != nil {
+ mi := &file_tfplugin6_proto_msgTypes[19]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1204,22 +1338,20 @@ func (x *ValidateDataResourceConfig) ProtoReflect() protoreflect.Message {
// Deprecated: Use ValidateDataResourceConfig.ProtoReflect.Descriptor instead.
func (*ValidateDataResourceConfig) Descriptor() ([]byte, []int) {
- return file_tfplugin6_proto_rawDescGZIP(), []int{16}
+ return file_tfplugin6_proto_rawDescGZIP(), []int{19}
}
type ConfigureProvider struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *ConfigureProvider) Reset() {
*x = ConfigureProvider{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin6_proto_msgTypes[17]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_tfplugin6_proto_msgTypes[20]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *ConfigureProvider) String() string {
@@ -1229,8 +1361,8 @@ func (x *ConfigureProvider) String() string {
func (*ConfigureProvider) ProtoMessage() {}
func (x *ConfigureProvider) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin6_proto_msgTypes[17]
- if protoimpl.UnsafeEnabled && x != nil {
+ mi := &file_tfplugin6_proto_msgTypes[20]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1242,22 +1374,20 @@ func (x *ConfigureProvider) ProtoReflect() protoreflect.Message {
// Deprecated: Use ConfigureProvider.ProtoReflect.Descriptor instead.
func (*ConfigureProvider) Descriptor() ([]byte, []int) {
- return file_tfplugin6_proto_rawDescGZIP(), []int{17}
+ return file_tfplugin6_proto_rawDescGZIP(), []int{20}
}
type ReadResource struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *ReadResource) Reset() {
*x = ReadResource{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin6_proto_msgTypes[18]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_tfplugin6_proto_msgTypes[21]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *ReadResource) String() string {
@@ -1267,8 +1397,8 @@ func (x *ReadResource) String() string {
func (*ReadResource) ProtoMessage() {}
func (x *ReadResource) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin6_proto_msgTypes[18]
- if protoimpl.UnsafeEnabled && x != nil {
+ mi := &file_tfplugin6_proto_msgTypes[21]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1280,22 +1410,20 @@ func (x *ReadResource) ProtoReflect() protoreflect.Message {
// Deprecated: Use ReadResource.ProtoReflect.Descriptor instead.
func (*ReadResource) Descriptor() ([]byte, []int) {
- return file_tfplugin6_proto_rawDescGZIP(), []int{18}
+ return file_tfplugin6_proto_rawDescGZIP(), []int{21}
}
type PlanResourceChange struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *PlanResourceChange) Reset() {
*x = PlanResourceChange{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin6_proto_msgTypes[19]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_tfplugin6_proto_msgTypes[22]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *PlanResourceChange) String() string {
@@ -1305,8 +1433,8 @@ func (x *PlanResourceChange) String() string {
func (*PlanResourceChange) ProtoMessage() {}
func (x *PlanResourceChange) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin6_proto_msgTypes[19]
- if protoimpl.UnsafeEnabled && x != nil {
+ mi := &file_tfplugin6_proto_msgTypes[22]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1318,22 +1446,20 @@ func (x *PlanResourceChange) ProtoReflect() protoreflect.Message {
// Deprecated: Use PlanResourceChange.ProtoReflect.Descriptor instead.
func (*PlanResourceChange) Descriptor() ([]byte, []int) {
- return file_tfplugin6_proto_rawDescGZIP(), []int{19}
+ return file_tfplugin6_proto_rawDescGZIP(), []int{22}
}
type ApplyResourceChange struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *ApplyResourceChange) Reset() {
*x = ApplyResourceChange{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin6_proto_msgTypes[20]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_tfplugin6_proto_msgTypes[23]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *ApplyResourceChange) String() string {
@@ -1343,8 +1469,8 @@ func (x *ApplyResourceChange) String() string {
func (*ApplyResourceChange) ProtoMessage() {}
func (x *ApplyResourceChange) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin6_proto_msgTypes[20]
- if protoimpl.UnsafeEnabled && x != nil {
+ mi := &file_tfplugin6_proto_msgTypes[23]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1356,22 +1482,20 @@ func (x *ApplyResourceChange) ProtoReflect() protoreflect.Message {
// Deprecated: Use ApplyResourceChange.ProtoReflect.Descriptor instead.
func (*ApplyResourceChange) Descriptor() ([]byte, []int) {
- return file_tfplugin6_proto_rawDescGZIP(), []int{20}
+ return file_tfplugin6_proto_rawDescGZIP(), []int{23}
}
type ImportResourceState struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *ImportResourceState) Reset() {
*x = ImportResourceState{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin6_proto_msgTypes[21]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_tfplugin6_proto_msgTypes[24]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *ImportResourceState) String() string {
@@ -1381,8 +1505,8 @@ func (x *ImportResourceState) String() string {
func (*ImportResourceState) ProtoMessage() {}
func (x *ImportResourceState) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin6_proto_msgTypes[21]
- if protoimpl.UnsafeEnabled && x != nil {
+ mi := &file_tfplugin6_proto_msgTypes[24]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1394,22 +1518,20 @@ func (x *ImportResourceState) ProtoReflect() protoreflect.Message {
// Deprecated: Use ImportResourceState.ProtoReflect.Descriptor instead.
func (*ImportResourceState) Descriptor() ([]byte, []int) {
- return file_tfplugin6_proto_rawDescGZIP(), []int{21}
+ return file_tfplugin6_proto_rawDescGZIP(), []int{24}
}
type MoveResourceState struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *MoveResourceState) Reset() {
*x = MoveResourceState{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin6_proto_msgTypes[22]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_tfplugin6_proto_msgTypes[25]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *MoveResourceState) String() string {
@@ -1419,8 +1541,8 @@ func (x *MoveResourceState) String() string {
func (*MoveResourceState) ProtoMessage() {}
func (x *MoveResourceState) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin6_proto_msgTypes[22]
- if protoimpl.UnsafeEnabled && x != nil {
+ mi := &file_tfplugin6_proto_msgTypes[25]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1432,22 +1554,20 @@ func (x *MoveResourceState) ProtoReflect() protoreflect.Message {
// Deprecated: Use MoveResourceState.ProtoReflect.Descriptor instead.
func (*MoveResourceState) Descriptor() ([]byte, []int) {
- return file_tfplugin6_proto_rawDescGZIP(), []int{22}
+ return file_tfplugin6_proto_rawDescGZIP(), []int{25}
}
type ReadDataSource struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *ReadDataSource) Reset() {
*x = ReadDataSource{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin6_proto_msgTypes[23]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_tfplugin6_proto_msgTypes[26]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *ReadDataSource) String() string {
@@ -1457,8 +1577,8 @@ func (x *ReadDataSource) String() string {
func (*ReadDataSource) ProtoMessage() {}
func (x *ReadDataSource) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin6_proto_msgTypes[23]
- if protoimpl.UnsafeEnabled && x != nil {
+ mi := &file_tfplugin6_proto_msgTypes[26]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1470,22 +1590,20 @@ func (x *ReadDataSource) ProtoReflect() protoreflect.Message {
// Deprecated: Use ReadDataSource.ProtoReflect.Descriptor instead.
func (*ReadDataSource) Descriptor() ([]byte, []int) {
- return file_tfplugin6_proto_rawDescGZIP(), []int{23}
+ return file_tfplugin6_proto_rawDescGZIP(), []int{26}
}
type GetFunctions struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *GetFunctions) Reset() {
*x = GetFunctions{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin6_proto_msgTypes[24]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_tfplugin6_proto_msgTypes[27]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *GetFunctions) String() string {
@@ -1495,8 +1613,8 @@ func (x *GetFunctions) String() string {
func (*GetFunctions) ProtoMessage() {}
func (x *GetFunctions) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin6_proto_msgTypes[24]
- if protoimpl.UnsafeEnabled && x != nil {
+ mi := &file_tfplugin6_proto_msgTypes[27]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1508,22 +1626,20 @@ func (x *GetFunctions) ProtoReflect() protoreflect.Message {
// Deprecated: Use GetFunctions.ProtoReflect.Descriptor instead.
func (*GetFunctions) Descriptor() ([]byte, []int) {
- return file_tfplugin6_proto_rawDescGZIP(), []int{24}
+ return file_tfplugin6_proto_rawDescGZIP(), []int{27}
}
type CallFunction struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *CallFunction) Reset() {
*x = CallFunction{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin6_proto_msgTypes[25]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_tfplugin6_proto_msgTypes[28]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *CallFunction) String() string {
@@ -1533,8 +1649,8 @@ func (x *CallFunction) String() string {
func (*CallFunction) ProtoMessage() {}
func (x *CallFunction) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin6_proto_msgTypes[25]
- if protoimpl.UnsafeEnabled && x != nil {
+ mi := &file_tfplugin6_proto_msgTypes[28]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1546,40 +1662,31 @@ func (x *CallFunction) ProtoReflect() protoreflect.Message {
// Deprecated: Use CallFunction.ProtoReflect.Descriptor instead.
func (*CallFunction) Descriptor() ([]byte, []int) {
- return file_tfplugin6_proto_rawDescGZIP(), []int{25}
+ return file_tfplugin6_proto_rawDescGZIP(), []int{28}
}
-type AttributePath_Step struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+type ValidateEphemeralResourceConfig struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
unknownFields protoimpl.UnknownFields
-
- // Types that are assignable to Selector:
- //
- // *AttributePath_Step_AttributeName
- // *AttributePath_Step_ElementKeyString
- // *AttributePath_Step_ElementKeyInt
- Selector isAttributePath_Step_Selector `protobuf_oneof:"selector"`
+ sizeCache protoimpl.SizeCache
}
-func (x *AttributePath_Step) Reset() {
- *x = AttributePath_Step{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin6_proto_msgTypes[26]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+func (x *ValidateEphemeralResourceConfig) Reset() {
+ *x = ValidateEphemeralResourceConfig{}
+ mi := &file_tfplugin6_proto_msgTypes[29]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
-func (x *AttributePath_Step) String() string {
+func (x *ValidateEphemeralResourceConfig) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*AttributePath_Step) ProtoMessage() {}
+func (*ValidateEphemeralResourceConfig) ProtoMessage() {}
-func (x *AttributePath_Step) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin6_proto_msgTypes[26]
- if protoimpl.UnsafeEnabled && x != nil {
+func (x *ValidateEphemeralResourceConfig) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin6_proto_msgTypes[29]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1589,89 +1696,105 @@ func (x *AttributePath_Step) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use AttributePath_Step.ProtoReflect.Descriptor instead.
-func (*AttributePath_Step) Descriptor() ([]byte, []int) {
- return file_tfplugin6_proto_rawDescGZIP(), []int{3, 0}
+// Deprecated: Use ValidateEphemeralResourceConfig.ProtoReflect.Descriptor instead.
+func (*ValidateEphemeralResourceConfig) Descriptor() ([]byte, []int) {
+ return file_tfplugin6_proto_rawDescGZIP(), []int{29}
}
-func (m *AttributePath_Step) GetSelector() isAttributePath_Step_Selector {
- if m != nil {
- return m.Selector
- }
- return nil
+type OpenEphemeralResource struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
-func (x *AttributePath_Step) GetAttributeName() string {
- if x, ok := x.GetSelector().(*AttributePath_Step_AttributeName); ok {
- return x.AttributeName
- }
- return ""
+func (x *OpenEphemeralResource) Reset() {
+ *x = OpenEphemeralResource{}
+ mi := &file_tfplugin6_proto_msgTypes[30]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
-func (x *AttributePath_Step) GetElementKeyString() string {
- if x, ok := x.GetSelector().(*AttributePath_Step_ElementKeyString); ok {
- return x.ElementKeyString
- }
- return ""
+func (x *OpenEphemeralResource) String() string {
+ return protoimpl.X.MessageStringOf(x)
}
-func (x *AttributePath_Step) GetElementKeyInt() int64 {
- if x, ok := x.GetSelector().(*AttributePath_Step_ElementKeyInt); ok {
- return x.ElementKeyInt
+func (*OpenEphemeralResource) ProtoMessage() {}
+
+func (x *OpenEphemeralResource) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin6_proto_msgTypes[30]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
}
- return 0
+ return mi.MessageOf(x)
}
-type isAttributePath_Step_Selector interface {
- isAttributePath_Step_Selector()
+// Deprecated: Use OpenEphemeralResource.ProtoReflect.Descriptor instead.
+func (*OpenEphemeralResource) Descriptor() ([]byte, []int) {
+ return file_tfplugin6_proto_rawDescGZIP(), []int{30}
}
-type AttributePath_Step_AttributeName struct {
- // Set "attribute_name" to represent looking up an attribute
- // in the current object value.
- AttributeName string `protobuf:"bytes,1,opt,name=attribute_name,json=attributeName,proto3,oneof"`
+type RenewEphemeralResource struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
-type AttributePath_Step_ElementKeyString struct {
- // Set "element_key_*" to represent looking up an element in
- // an indexable collection type.
- ElementKeyString string `protobuf:"bytes,2,opt,name=element_key_string,json=elementKeyString,proto3,oneof"`
+func (x *RenewEphemeralResource) Reset() {
+ *x = RenewEphemeralResource{}
+ mi := &file_tfplugin6_proto_msgTypes[31]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
-type AttributePath_Step_ElementKeyInt struct {
- ElementKeyInt int64 `protobuf:"varint,3,opt,name=element_key_int,json=elementKeyInt,proto3,oneof"`
+func (x *RenewEphemeralResource) String() string {
+ return protoimpl.X.MessageStringOf(x)
}
-func (*AttributePath_Step_AttributeName) isAttributePath_Step_Selector() {}
+func (*RenewEphemeralResource) ProtoMessage() {}
-func (*AttributePath_Step_ElementKeyString) isAttributePath_Step_Selector() {}
+func (x *RenewEphemeralResource) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin6_proto_msgTypes[31]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
-func (*AttributePath_Step_ElementKeyInt) isAttributePath_Step_Selector() {}
+// Deprecated: Use RenewEphemeralResource.ProtoReflect.Descriptor instead.
+func (*RenewEphemeralResource) Descriptor() ([]byte, []int) {
+ return file_tfplugin6_proto_rawDescGZIP(), []int{31}
+}
-type StopProvider_Request struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+type CloseEphemeralResource struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
-func (x *StopProvider_Request) Reset() {
- *x = StopProvider_Request{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin6_proto_msgTypes[27]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+func (x *CloseEphemeralResource) Reset() {
+ *x = CloseEphemeralResource{}
+ mi := &file_tfplugin6_proto_msgTypes[32]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
-func (x *StopProvider_Request) String() string {
+func (x *CloseEphemeralResource) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*StopProvider_Request) ProtoMessage() {}
+func (*CloseEphemeralResource) ProtoMessage() {}
-func (x *StopProvider_Request) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin6_proto_msgTypes[27]
- if protoimpl.UnsafeEnabled && x != nil {
+func (x *CloseEphemeralResource) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin6_proto_msgTypes[32]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1681,37 +1804,34 @@ func (x *StopProvider_Request) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use StopProvider_Request.ProtoReflect.Descriptor instead.
-func (*StopProvider_Request) Descriptor() ([]byte, []int) {
- return file_tfplugin6_proto_rawDescGZIP(), []int{4, 0}
+// Deprecated: Use CloseEphemeralResource.ProtoReflect.Descriptor instead.
+func (*CloseEphemeralResource) Descriptor() ([]byte, []int) {
+ return file_tfplugin6_proto_rawDescGZIP(), []int{32}
}
-type StopProvider_Response struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+// Returns resource identity schemas for all resources
+type GetResourceIdentitySchemas struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
unknownFields protoimpl.UnknownFields
-
- Error string `protobuf:"bytes,1,opt,name=Error,proto3" json:"Error,omitempty"`
+ sizeCache protoimpl.SizeCache
}
-func (x *StopProvider_Response) Reset() {
- *x = StopProvider_Response{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin6_proto_msgTypes[28]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+func (x *GetResourceIdentitySchemas) Reset() {
+ *x = GetResourceIdentitySchemas{}
+ mi := &file_tfplugin6_proto_msgTypes[33]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
-func (x *StopProvider_Response) String() string {
+func (x *GetResourceIdentitySchemas) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*StopProvider_Response) ProtoMessage() {}
+func (*GetResourceIdentitySchemas) ProtoMessage() {}
-func (x *StopProvider_Response) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin6_proto_msgTypes[28]
- if protoimpl.UnsafeEnabled && x != nil {
+func (x *GetResourceIdentitySchemas) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin6_proto_msgTypes[33]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1721,49 +1841,33 @@ func (x *StopProvider_Response) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use StopProvider_Response.ProtoReflect.Descriptor instead.
-func (*StopProvider_Response) Descriptor() ([]byte, []int) {
- return file_tfplugin6_proto_rawDescGZIP(), []int{4, 1}
-}
-
-func (x *StopProvider_Response) GetError() string {
- if x != nil {
- return x.Error
- }
- return ""
+// Deprecated: Use GetResourceIdentitySchemas.ProtoReflect.Descriptor instead.
+func (*GetResourceIdentitySchemas) Descriptor() ([]byte, []int) {
+ return file_tfplugin6_proto_rawDescGZIP(), []int{33}
}
-type Schema_Block struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+type UpgradeResourceIdentity struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
unknownFields protoimpl.UnknownFields
-
- Version int64 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"`
- Attributes []*Schema_Attribute `protobuf:"bytes,2,rep,name=attributes,proto3" json:"attributes,omitempty"`
- BlockTypes []*Schema_NestedBlock `protobuf:"bytes,3,rep,name=block_types,json=blockTypes,proto3" json:"block_types,omitempty"`
- Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"`
- DescriptionKind StringKind `protobuf:"varint,5,opt,name=description_kind,json=descriptionKind,proto3,enum=tfplugin6.StringKind" json:"description_kind,omitempty"`
- Deprecated bool `protobuf:"varint,6,opt,name=deprecated,proto3" json:"deprecated,omitempty"`
+ sizeCache protoimpl.SizeCache
}
-func (x *Schema_Block) Reset() {
- *x = Schema_Block{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin6_proto_msgTypes[30]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+func (x *UpgradeResourceIdentity) Reset() {
+ *x = UpgradeResourceIdentity{}
+ mi := &file_tfplugin6_proto_msgTypes[34]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
-func (x *Schema_Block) String() string {
+func (x *UpgradeResourceIdentity) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*Schema_Block) ProtoMessage() {}
+func (*UpgradeResourceIdentity) ProtoMessage() {}
-func (x *Schema_Block) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin6_proto_msgTypes[30]
- if protoimpl.UnsafeEnabled && x != nil {
+func (x *UpgradeResourceIdentity) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin6_proto_msgTypes[34]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1773,88 +1877,2078 @@ func (x *Schema_Block) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use Schema_Block.ProtoReflect.Descriptor instead.
-func (*Schema_Block) Descriptor() ([]byte, []int) {
- return file_tfplugin6_proto_rawDescGZIP(), []int{6, 0}
+// Deprecated: Use UpgradeResourceIdentity.ProtoReflect.Descriptor instead.
+func (*UpgradeResourceIdentity) Descriptor() ([]byte, []int) {
+ return file_tfplugin6_proto_rawDescGZIP(), []int{34}
}
-func (x *Schema_Block) GetVersion() int64 {
- if x != nil {
- return x.Version
- }
- return 0
+type ListResource struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
-func (x *Schema_Block) GetAttributes() []*Schema_Attribute {
- if x != nil {
- return x.Attributes
- }
- return nil
+func (x *ListResource) Reset() {
+ *x = ListResource{}
+ mi := &file_tfplugin6_proto_msgTypes[35]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
-func (x *Schema_Block) GetBlockTypes() []*Schema_NestedBlock {
- if x != nil {
- return x.BlockTypes
- }
- return nil
+func (x *ListResource) String() string {
+ return protoimpl.X.MessageStringOf(x)
}
-func (x *Schema_Block) GetDescription() string {
+func (*ListResource) ProtoMessage() {}
+
+func (x *ListResource) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin6_proto_msgTypes[35]
if x != nil {
- return x.Description
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
}
- return ""
+ return mi.MessageOf(x)
}
-func (x *Schema_Block) GetDescriptionKind() StringKind {
- if x != nil {
- return x.DescriptionKind
- }
- return StringKind_PLAIN
+// Deprecated: Use ListResource.ProtoReflect.Descriptor instead.
+func (*ListResource) Descriptor() ([]byte, []int) {
+ return file_tfplugin6_proto_rawDescGZIP(), []int{35}
}
-func (x *Schema_Block) GetDeprecated() bool {
+type ValidateListResourceConfig struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *ValidateListResourceConfig) Reset() {
+ *x = ValidateListResourceConfig{}
+ mi := &file_tfplugin6_proto_msgTypes[36]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ValidateListResourceConfig) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ValidateListResourceConfig) ProtoMessage() {}
+
+func (x *ValidateListResourceConfig) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin6_proto_msgTypes[36]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ValidateListResourceConfig.ProtoReflect.Descriptor instead.
+func (*ValidateListResourceConfig) Descriptor() ([]byte, []int) {
+ return file_tfplugin6_proto_rawDescGZIP(), []int{36}
+}
+
+type ValidateActionConfig struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *ValidateActionConfig) Reset() {
+ *x = ValidateActionConfig{}
+ mi := &file_tfplugin6_proto_msgTypes[37]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ValidateActionConfig) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ValidateActionConfig) ProtoMessage() {}
+
+func (x *ValidateActionConfig) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin6_proto_msgTypes[37]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ValidateActionConfig.ProtoReflect.Descriptor instead.
+func (*ValidateActionConfig) Descriptor() ([]byte, []int) {
+ return file_tfplugin6_proto_rawDescGZIP(), []int{37}
+}
+
+type PlanAction struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *PlanAction) Reset() {
+ *x = PlanAction{}
+ mi := &file_tfplugin6_proto_msgTypes[38]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *PlanAction) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*PlanAction) ProtoMessage() {}
+
+func (x *PlanAction) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin6_proto_msgTypes[38]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use PlanAction.ProtoReflect.Descriptor instead.
+func (*PlanAction) Descriptor() ([]byte, []int) {
+ return file_tfplugin6_proto_rawDescGZIP(), []int{38}
+}
+
+type InvokeAction struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *InvokeAction) Reset() {
+ *x = InvokeAction{}
+ mi := &file_tfplugin6_proto_msgTypes[39]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *InvokeAction) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*InvokeAction) ProtoMessage() {}
+
+func (x *InvokeAction) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin6_proto_msgTypes[39]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use InvokeAction.ProtoReflect.Descriptor instead.
+func (*InvokeAction) Descriptor() ([]byte, []int) {
+ return file_tfplugin6_proto_rawDescGZIP(), []int{39}
+}
+
+type AttributePath_Step struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // Types that are valid to be assigned to Selector:
+ //
+ // *AttributePath_Step_AttributeName
+ // *AttributePath_Step_ElementKeyString
+ // *AttributePath_Step_ElementKeyInt
+ Selector isAttributePath_Step_Selector `protobuf_oneof:"selector"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *AttributePath_Step) Reset() {
+ *x = AttributePath_Step{}
+ mi := &file_tfplugin6_proto_msgTypes[40]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *AttributePath_Step) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*AttributePath_Step) ProtoMessage() {}
+
+func (x *AttributePath_Step) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin6_proto_msgTypes[40]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use AttributePath_Step.ProtoReflect.Descriptor instead.
+func (*AttributePath_Step) Descriptor() ([]byte, []int) {
+ return file_tfplugin6_proto_rawDescGZIP(), []int{3, 0}
+}
+
+func (x *AttributePath_Step) GetSelector() isAttributePath_Step_Selector {
+ if x != nil {
+ return x.Selector
+ }
+ return nil
+}
+
+func (x *AttributePath_Step) GetAttributeName() string {
+ if x != nil {
+ if x, ok := x.Selector.(*AttributePath_Step_AttributeName); ok {
+ return x.AttributeName
+ }
+ }
+ return ""
+}
+
+func (x *AttributePath_Step) GetElementKeyString() string {
+ if x != nil {
+ if x, ok := x.Selector.(*AttributePath_Step_ElementKeyString); ok {
+ return x.ElementKeyString
+ }
+ }
+ return ""
+}
+
+func (x *AttributePath_Step) GetElementKeyInt() int64 {
+ if x != nil {
+ if x, ok := x.Selector.(*AttributePath_Step_ElementKeyInt); ok {
+ return x.ElementKeyInt
+ }
+ }
+ return 0
+}
+
+type isAttributePath_Step_Selector interface {
+ isAttributePath_Step_Selector()
+}
+
+type AttributePath_Step_AttributeName struct {
+ // Set "attribute_name" to represent looking up an attribute
+ // in the current object value.
+ AttributeName string `protobuf:"bytes,1,opt,name=attribute_name,json=attributeName,proto3,oneof"`
+}
+
+type AttributePath_Step_ElementKeyString struct {
+ // Set "element_key_*" to represent looking up an element in
+ // an indexable collection type.
+ ElementKeyString string `protobuf:"bytes,2,opt,name=element_key_string,json=elementKeyString,proto3,oneof"`
+}
+
+type AttributePath_Step_ElementKeyInt struct {
+ ElementKeyInt int64 `protobuf:"varint,3,opt,name=element_key_int,json=elementKeyInt,proto3,oneof"`
+}
+
+func (*AttributePath_Step_AttributeName) isAttributePath_Step_Selector() {}
+
+func (*AttributePath_Step_ElementKeyString) isAttributePath_Step_Selector() {}
+
+func (*AttributePath_Step_ElementKeyInt) isAttributePath_Step_Selector() {}
+
+type StopProvider_Request struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *StopProvider_Request) Reset() {
+ *x = StopProvider_Request{}
+ mi := &file_tfplugin6_proto_msgTypes[41]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *StopProvider_Request) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*StopProvider_Request) ProtoMessage() {}
+
+func (x *StopProvider_Request) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin6_proto_msgTypes[41]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use StopProvider_Request.ProtoReflect.Descriptor instead.
+func (*StopProvider_Request) Descriptor() ([]byte, []int) {
+ return file_tfplugin6_proto_rawDescGZIP(), []int{4, 0}
+}
+
+type StopProvider_Response struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Error string `protobuf:"bytes,1,opt,name=Error,proto3" json:"Error,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *StopProvider_Response) Reset() {
+ *x = StopProvider_Response{}
+ mi := &file_tfplugin6_proto_msgTypes[42]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *StopProvider_Response) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*StopProvider_Response) ProtoMessage() {}
+
+func (x *StopProvider_Response) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin6_proto_msgTypes[42]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use StopProvider_Response.ProtoReflect.Descriptor instead.
+func (*StopProvider_Response) Descriptor() ([]byte, []int) {
+ return file_tfplugin6_proto_rawDescGZIP(), []int{4, 1}
+}
+
+func (x *StopProvider_Response) GetError() string {
+ if x != nil {
+ return x.Error
+ }
+ return ""
+}
+
+type Schema_Block struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Version int64 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"`
+ Attributes []*Schema_Attribute `protobuf:"bytes,2,rep,name=attributes,proto3" json:"attributes,omitempty"`
+ BlockTypes []*Schema_NestedBlock `protobuf:"bytes,3,rep,name=block_types,json=blockTypes,proto3" json:"block_types,omitempty"`
+ Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"`
+ DescriptionKind StringKind `protobuf:"varint,5,opt,name=description_kind,json=descriptionKind,proto3,enum=tfplugin6.StringKind" json:"description_kind,omitempty"`
+ Deprecated bool `protobuf:"varint,6,opt,name=deprecated,proto3" json:"deprecated,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *Schema_Block) Reset() {
+ *x = Schema_Block{}
+ mi := &file_tfplugin6_proto_msgTypes[44]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *Schema_Block) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Schema_Block) ProtoMessage() {}
+
+func (x *Schema_Block) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin6_proto_msgTypes[44]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Schema_Block.ProtoReflect.Descriptor instead.
+func (*Schema_Block) Descriptor() ([]byte, []int) {
+ return file_tfplugin6_proto_rawDescGZIP(), []int{6, 0}
+}
+
+func (x *Schema_Block) GetVersion() int64 {
+ if x != nil {
+ return x.Version
+ }
+ return 0
+}
+
+func (x *Schema_Block) GetAttributes() []*Schema_Attribute {
+ if x != nil {
+ return x.Attributes
+ }
+ return nil
+}
+
+func (x *Schema_Block) GetBlockTypes() []*Schema_NestedBlock {
+ if x != nil {
+ return x.BlockTypes
+ }
+ return nil
+}
+
+func (x *Schema_Block) GetDescription() string {
+ if x != nil {
+ return x.Description
+ }
+ return ""
+}
+
+func (x *Schema_Block) GetDescriptionKind() StringKind {
+ if x != nil {
+ return x.DescriptionKind
+ }
+ return StringKind_PLAIN
+}
+
+func (x *Schema_Block) GetDeprecated() bool {
+ if x != nil {
+ return x.Deprecated
+ }
+ return false
+}
+
+type Schema_Attribute struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ Type []byte `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
+ NestedType *Schema_Object `protobuf:"bytes,10,opt,name=nested_type,json=nestedType,proto3" json:"nested_type,omitempty"`
+ Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
+ Required bool `protobuf:"varint,4,opt,name=required,proto3" json:"required,omitempty"`
+ Optional bool `protobuf:"varint,5,opt,name=optional,proto3" json:"optional,omitempty"`
+ Computed bool `protobuf:"varint,6,opt,name=computed,proto3" json:"computed,omitempty"`
+ Sensitive bool `protobuf:"varint,7,opt,name=sensitive,proto3" json:"sensitive,omitempty"`
+ DescriptionKind StringKind `protobuf:"varint,8,opt,name=description_kind,json=descriptionKind,proto3,enum=tfplugin6.StringKind" json:"description_kind,omitempty"`
+ Deprecated bool `protobuf:"varint,9,opt,name=deprecated,proto3" json:"deprecated,omitempty"`
+ // write_only indicates that the attribute value will be provided via
+ // configuration and must be omitted from state. write_only must be
+ // combined with optional or required, and is only valid for managed
+ // resource schemas.
+ WriteOnly bool `protobuf:"varint,11,opt,name=write_only,json=writeOnly,proto3" json:"write_only,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *Schema_Attribute) Reset() {
+ *x = Schema_Attribute{}
+ mi := &file_tfplugin6_proto_msgTypes[45]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *Schema_Attribute) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Schema_Attribute) ProtoMessage() {}
+
+func (x *Schema_Attribute) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin6_proto_msgTypes[45]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Schema_Attribute.ProtoReflect.Descriptor instead.
+func (*Schema_Attribute) Descriptor() ([]byte, []int) {
+ return file_tfplugin6_proto_rawDescGZIP(), []int{6, 1}
+}
+
+func (x *Schema_Attribute) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *Schema_Attribute) GetType() []byte {
+ if x != nil {
+ return x.Type
+ }
+ return nil
+}
+
+func (x *Schema_Attribute) GetNestedType() *Schema_Object {
+ if x != nil {
+ return x.NestedType
+ }
+ return nil
+}
+
+func (x *Schema_Attribute) GetDescription() string {
+ if x != nil {
+ return x.Description
+ }
+ return ""
+}
+
+func (x *Schema_Attribute) GetRequired() bool {
+ if x != nil {
+ return x.Required
+ }
+ return false
+}
+
+func (x *Schema_Attribute) GetOptional() bool {
+ if x != nil {
+ return x.Optional
+ }
+ return false
+}
+
+func (x *Schema_Attribute) GetComputed() bool {
+ if x != nil {
+ return x.Computed
+ }
+ return false
+}
+
+func (x *Schema_Attribute) GetSensitive() bool {
+ if x != nil {
+ return x.Sensitive
+ }
+ return false
+}
+
+func (x *Schema_Attribute) GetDescriptionKind() StringKind {
+ if x != nil {
+ return x.DescriptionKind
+ }
+ return StringKind_PLAIN
+}
+
+func (x *Schema_Attribute) GetDeprecated() bool {
+ if x != nil {
+ return x.Deprecated
+ }
+ return false
+}
+
+func (x *Schema_Attribute) GetWriteOnly() bool {
+ if x != nil {
+ return x.WriteOnly
+ }
+ return false
+}
+
+type Schema_NestedBlock struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ TypeName string `protobuf:"bytes,1,opt,name=type_name,json=typeName,proto3" json:"type_name,omitempty"`
+ Block *Schema_Block `protobuf:"bytes,2,opt,name=block,proto3" json:"block,omitempty"`
+ Nesting Schema_NestedBlock_NestingMode `protobuf:"varint,3,opt,name=nesting,proto3,enum=tfplugin6.Schema_NestedBlock_NestingMode" json:"nesting,omitempty"`
+ MinItems int64 `protobuf:"varint,4,opt,name=min_items,json=minItems,proto3" json:"min_items,omitempty"`
+ MaxItems int64 `protobuf:"varint,5,opt,name=max_items,json=maxItems,proto3" json:"max_items,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *Schema_NestedBlock) Reset() {
+ *x = Schema_NestedBlock{}
+ mi := &file_tfplugin6_proto_msgTypes[46]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *Schema_NestedBlock) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Schema_NestedBlock) ProtoMessage() {}
+
+func (x *Schema_NestedBlock) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin6_proto_msgTypes[46]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Schema_NestedBlock.ProtoReflect.Descriptor instead.
+func (*Schema_NestedBlock) Descriptor() ([]byte, []int) {
+ return file_tfplugin6_proto_rawDescGZIP(), []int{6, 2}
+}
+
+func (x *Schema_NestedBlock) GetTypeName() string {
+ if x != nil {
+ return x.TypeName
+ }
+ return ""
+}
+
+func (x *Schema_NestedBlock) GetBlock() *Schema_Block {
+ if x != nil {
+ return x.Block
+ }
+ return nil
+}
+
+func (x *Schema_NestedBlock) GetNesting() Schema_NestedBlock_NestingMode {
+ if x != nil {
+ return x.Nesting
+ }
+ return Schema_NestedBlock_INVALID
+}
+
+func (x *Schema_NestedBlock) GetMinItems() int64 {
+ if x != nil {
+ return x.MinItems
+ }
+ return 0
+}
+
+func (x *Schema_NestedBlock) GetMaxItems() int64 {
+ if x != nil {
+ return x.MaxItems
+ }
+ return 0
+}
+
+type Schema_Object struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Attributes []*Schema_Attribute `protobuf:"bytes,1,rep,name=attributes,proto3" json:"attributes,omitempty"`
+ Nesting Schema_Object_NestingMode `protobuf:"varint,3,opt,name=nesting,proto3,enum=tfplugin6.Schema_Object_NestingMode" json:"nesting,omitempty"`
+ // MinItems and MaxItems were never used in the protocol, and have no
+ // effect on validation.
+ //
+ // Deprecated: Marked as deprecated in tfplugin6.proto.
+ MinItems int64 `protobuf:"varint,4,opt,name=min_items,json=minItems,proto3" json:"min_items,omitempty"`
+ // Deprecated: Marked as deprecated in tfplugin6.proto.
+ MaxItems int64 `protobuf:"varint,5,opt,name=max_items,json=maxItems,proto3" json:"max_items,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *Schema_Object) Reset() {
+ *x = Schema_Object{}
+ mi := &file_tfplugin6_proto_msgTypes[47]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *Schema_Object) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Schema_Object) ProtoMessage() {}
+
+func (x *Schema_Object) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin6_proto_msgTypes[47]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Schema_Object.ProtoReflect.Descriptor instead.
+func (*Schema_Object) Descriptor() ([]byte, []int) {
+ return file_tfplugin6_proto_rawDescGZIP(), []int{6, 3}
+}
+
+func (x *Schema_Object) GetAttributes() []*Schema_Attribute {
+ if x != nil {
+ return x.Attributes
+ }
+ return nil
+}
+
+func (x *Schema_Object) GetNesting() Schema_Object_NestingMode {
+ if x != nil {
+ return x.Nesting
+ }
+ return Schema_Object_INVALID
+}
+
+// Deprecated: Marked as deprecated in tfplugin6.proto.
+func (x *Schema_Object) GetMinItems() int64 {
+ if x != nil {
+ return x.MinItems
+ }
+ return 0
+}
+
+// Deprecated: Marked as deprecated in tfplugin6.proto.
+func (x *Schema_Object) GetMaxItems() int64 {
+ if x != nil {
+ return x.MaxItems
+ }
+ return 0
+}
+
+// IdentityAttribute represents one value of data within resource identity.
+// These are always used in resource identity comparisons.
+type ResourceIdentitySchema_IdentityAttribute struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // name is the identity attribute name
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ // type is the identity attribute type
+ Type []byte `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
+ // required_for_import when enabled signifies that this attribute must be
+ // defined for ImportResourceState to complete successfully
+ RequiredForImport bool `protobuf:"varint,3,opt,name=required_for_import,json=requiredForImport,proto3" json:"required_for_import,omitempty"`
+ // optional_for_import when enabled signifies that this attribute is not
+ // required for ImportResourceState, because it can be supplied by the
+ // provider. It is still possible to supply this attribute during import.
+ OptionalForImport bool `protobuf:"varint,4,opt,name=optional_for_import,json=optionalForImport,proto3" json:"optional_for_import,omitempty"`
+ // description is a human-readable description of the attribute in Markdown
+ Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *ResourceIdentitySchema_IdentityAttribute) Reset() {
+ *x = ResourceIdentitySchema_IdentityAttribute{}
+ mi := &file_tfplugin6_proto_msgTypes[48]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ResourceIdentitySchema_IdentityAttribute) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ResourceIdentitySchema_IdentityAttribute) ProtoMessage() {}
+
+func (x *ResourceIdentitySchema_IdentityAttribute) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin6_proto_msgTypes[48]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ResourceIdentitySchema_IdentityAttribute.ProtoReflect.Descriptor instead.
+func (*ResourceIdentitySchema_IdentityAttribute) Descriptor() ([]byte, []int) {
+ return file_tfplugin6_proto_rawDescGZIP(), []int{7, 0}
+}
+
+func (x *ResourceIdentitySchema_IdentityAttribute) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *ResourceIdentitySchema_IdentityAttribute) GetType() []byte {
+ if x != nil {
+ return x.Type
+ }
+ return nil
+}
+
+func (x *ResourceIdentitySchema_IdentityAttribute) GetRequiredForImport() bool {
+ if x != nil {
+ return x.RequiredForImport
+ }
+ return false
+}
+
+func (x *ResourceIdentitySchema_IdentityAttribute) GetOptionalForImport() bool {
+ if x != nil {
+ return x.OptionalForImport
+ }
+ return false
+}
+
+func (x *ResourceIdentitySchema_IdentityAttribute) GetDescription() string {
+ if x != nil {
+ return x.Description
+ }
+ return ""
+}
+
+type Function_Parameter struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // name is the human-readable display name for the parameter.
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ // type is the type constraint for the parameter.
+ Type []byte `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
+ // allow_null_value when enabled denotes that a null argument value can
+ // be passed to the provider. When disabled, Terraform returns an error
+ // if the argument value is null.
+ AllowNullValue bool `protobuf:"varint,3,opt,name=allow_null_value,json=allowNullValue,proto3" json:"allow_null_value,omitempty"`
+ // allow_unknown_values when enabled denotes that only wholly known
+ // argument values will be passed to the provider. When disabled,
+ // Terraform skips the function call entirely and assumes an unknown
+ // value result from the function.
+ AllowUnknownValues bool `protobuf:"varint,4,opt,name=allow_unknown_values,json=allowUnknownValues,proto3" json:"allow_unknown_values,omitempty"`
+ // description is human-readable documentation for the parameter.
+ Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"`
+ // description_kind is the formatting of the description.
+ DescriptionKind StringKind `protobuf:"varint,6,opt,name=description_kind,json=descriptionKind,proto3,enum=tfplugin6.StringKind" json:"description_kind,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *Function_Parameter) Reset() {
+ *x = Function_Parameter{}
+ mi := &file_tfplugin6_proto_msgTypes[49]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *Function_Parameter) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Function_Parameter) ProtoMessage() {}
+
+func (x *Function_Parameter) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin6_proto_msgTypes[49]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Function_Parameter.ProtoReflect.Descriptor instead.
+func (*Function_Parameter) Descriptor() ([]byte, []int) {
+ return file_tfplugin6_proto_rawDescGZIP(), []int{9, 0}
+}
+
+func (x *Function_Parameter) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *Function_Parameter) GetType() []byte {
+ if x != nil {
+ return x.Type
+ }
+ return nil
+}
+
+func (x *Function_Parameter) GetAllowNullValue() bool {
+ if x != nil {
+ return x.AllowNullValue
+ }
+ return false
+}
+
+func (x *Function_Parameter) GetAllowUnknownValues() bool {
+ if x != nil {
+ return x.AllowUnknownValues
+ }
+ return false
+}
+
+func (x *Function_Parameter) GetDescription() string {
+ if x != nil {
+ return x.Description
+ }
+ return ""
+}
+
+func (x *Function_Parameter) GetDescriptionKind() StringKind {
+ if x != nil {
+ return x.DescriptionKind
+ }
+ return StringKind_PLAIN
+}
+
+type Function_Return struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // type is the type constraint for the function result.
+ Type []byte `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *Function_Return) Reset() {
+ *x = Function_Return{}
+ mi := &file_tfplugin6_proto_msgTypes[50]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *Function_Return) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Function_Return) ProtoMessage() {}
+
+func (x *Function_Return) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin6_proto_msgTypes[50]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Function_Return.ProtoReflect.Descriptor instead.
+func (*Function_Return) Descriptor() ([]byte, []int) {
+ return file_tfplugin6_proto_rawDescGZIP(), []int{9, 1}
+}
+
+func (x *Function_Return) GetType() []byte {
+ if x != nil {
+ return x.Type
+ }
+ return nil
+}
+
+type GetMetadata_Request struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *GetMetadata_Request) Reset() {
+ *x = GetMetadata_Request{}
+ mi := &file_tfplugin6_proto_msgTypes[51]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *GetMetadata_Request) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetMetadata_Request) ProtoMessage() {}
+
+func (x *GetMetadata_Request) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin6_proto_msgTypes[51]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetMetadata_Request.ProtoReflect.Descriptor instead.
+func (*GetMetadata_Request) Descriptor() ([]byte, []int) {
+ return file_tfplugin6_proto_rawDescGZIP(), []int{14, 0}
+}
+
+type GetMetadata_Response struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ ServerCapabilities *ServerCapabilities `protobuf:"bytes,1,opt,name=server_capabilities,json=serverCapabilities,proto3" json:"server_capabilities,omitempty"`
+ Diagnostics []*Diagnostic `protobuf:"bytes,2,rep,name=diagnostics,proto3" json:"diagnostics,omitempty"`
+ DataSources []*GetMetadata_DataSourceMetadata `protobuf:"bytes,3,rep,name=data_sources,json=dataSources,proto3" json:"data_sources,omitempty"`
+ Resources []*GetMetadata_ResourceMetadata `protobuf:"bytes,4,rep,name=resources,proto3" json:"resources,omitempty"`
+ // functions returns metadata for any functions.
+ Functions []*GetMetadata_FunctionMetadata `protobuf:"bytes,5,rep,name=functions,proto3" json:"functions,omitempty"`
+ EphemeralResources []*GetMetadata_EphemeralResourceMetadata `protobuf:"bytes,6,rep,name=ephemeral_resources,json=ephemeralResources,proto3" json:"ephemeral_resources,omitempty"`
+ ListResources []*GetMetadata_ListResourceMetadata `protobuf:"bytes,7,rep,name=list_resources,json=listResources,proto3" json:"list_resources,omitempty"`
+ Actions []*GetMetadata_ActionMetadata `protobuf:"bytes,9,rep,name=actions,proto3" json:"actions,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *GetMetadata_Response) Reset() {
+ *x = GetMetadata_Response{}
+ mi := &file_tfplugin6_proto_msgTypes[52]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *GetMetadata_Response) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetMetadata_Response) ProtoMessage() {}
+
+func (x *GetMetadata_Response) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin6_proto_msgTypes[52]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetMetadata_Response.ProtoReflect.Descriptor instead.
+func (*GetMetadata_Response) Descriptor() ([]byte, []int) {
+ return file_tfplugin6_proto_rawDescGZIP(), []int{14, 1}
+}
+
+func (x *GetMetadata_Response) GetServerCapabilities() *ServerCapabilities {
+ if x != nil {
+ return x.ServerCapabilities
+ }
+ return nil
+}
+
+func (x *GetMetadata_Response) GetDiagnostics() []*Diagnostic {
+ if x != nil {
+ return x.Diagnostics
+ }
+ return nil
+}
+
+func (x *GetMetadata_Response) GetDataSources() []*GetMetadata_DataSourceMetadata {
+ if x != nil {
+ return x.DataSources
+ }
+ return nil
+}
+
+func (x *GetMetadata_Response) GetResources() []*GetMetadata_ResourceMetadata {
+ if x != nil {
+ return x.Resources
+ }
+ return nil
+}
+
+func (x *GetMetadata_Response) GetFunctions() []*GetMetadata_FunctionMetadata {
+ if x != nil {
+ return x.Functions
+ }
+ return nil
+}
+
+func (x *GetMetadata_Response) GetEphemeralResources() []*GetMetadata_EphemeralResourceMetadata {
+ if x != nil {
+ return x.EphemeralResources
+ }
+ return nil
+}
+
+func (x *GetMetadata_Response) GetListResources() []*GetMetadata_ListResourceMetadata {
+ if x != nil {
+ return x.ListResources
+ }
+ return nil
+}
+
+func (x *GetMetadata_Response) GetActions() []*GetMetadata_ActionMetadata {
+ if x != nil {
+ return x.Actions
+ }
+ return nil
+}
+
+type GetMetadata_FunctionMetadata struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // name is the function name.
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *GetMetadata_FunctionMetadata) Reset() {
+ *x = GetMetadata_FunctionMetadata{}
+ mi := &file_tfplugin6_proto_msgTypes[53]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *GetMetadata_FunctionMetadata) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetMetadata_FunctionMetadata) ProtoMessage() {}
+
+func (x *GetMetadata_FunctionMetadata) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin6_proto_msgTypes[53]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetMetadata_FunctionMetadata.ProtoReflect.Descriptor instead.
+func (*GetMetadata_FunctionMetadata) Descriptor() ([]byte, []int) {
+ return file_tfplugin6_proto_rawDescGZIP(), []int{14, 2}
+}
+
+func (x *GetMetadata_FunctionMetadata) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+type GetMetadata_DataSourceMetadata struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ TypeName string `protobuf:"bytes,1,opt,name=type_name,json=typeName,proto3" json:"type_name,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *GetMetadata_DataSourceMetadata) Reset() {
+ *x = GetMetadata_DataSourceMetadata{}
+ mi := &file_tfplugin6_proto_msgTypes[54]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *GetMetadata_DataSourceMetadata) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetMetadata_DataSourceMetadata) ProtoMessage() {}
+
+func (x *GetMetadata_DataSourceMetadata) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin6_proto_msgTypes[54]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetMetadata_DataSourceMetadata.ProtoReflect.Descriptor instead.
+func (*GetMetadata_DataSourceMetadata) Descriptor() ([]byte, []int) {
+ return file_tfplugin6_proto_rawDescGZIP(), []int{14, 3}
+}
+
+func (x *GetMetadata_DataSourceMetadata) GetTypeName() string {
+ if x != nil {
+ return x.TypeName
+ }
+ return ""
+}
+
+type GetMetadata_ResourceMetadata struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ TypeName string `protobuf:"bytes,1,opt,name=type_name,json=typeName,proto3" json:"type_name,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *GetMetadata_ResourceMetadata) Reset() {
+ *x = GetMetadata_ResourceMetadata{}
+ mi := &file_tfplugin6_proto_msgTypes[55]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *GetMetadata_ResourceMetadata) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetMetadata_ResourceMetadata) ProtoMessage() {}
+
+func (x *GetMetadata_ResourceMetadata) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin6_proto_msgTypes[55]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetMetadata_ResourceMetadata.ProtoReflect.Descriptor instead.
+func (*GetMetadata_ResourceMetadata) Descriptor() ([]byte, []int) {
+ return file_tfplugin6_proto_rawDescGZIP(), []int{14, 4}
+}
+
+func (x *GetMetadata_ResourceMetadata) GetTypeName() string {
+ if x != nil {
+ return x.TypeName
+ }
+ return ""
+}
+
+type GetMetadata_EphemeralResourceMetadata struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ TypeName string `protobuf:"bytes,1,opt,name=type_name,json=typeName,proto3" json:"type_name,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *GetMetadata_EphemeralResourceMetadata) Reset() {
+ *x = GetMetadata_EphemeralResourceMetadata{}
+ mi := &file_tfplugin6_proto_msgTypes[56]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *GetMetadata_EphemeralResourceMetadata) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetMetadata_EphemeralResourceMetadata) ProtoMessage() {}
+
+func (x *GetMetadata_EphemeralResourceMetadata) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin6_proto_msgTypes[56]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetMetadata_EphemeralResourceMetadata.ProtoReflect.Descriptor instead.
+func (*GetMetadata_EphemeralResourceMetadata) Descriptor() ([]byte, []int) {
+ return file_tfplugin6_proto_rawDescGZIP(), []int{14, 5}
+}
+
+func (x *GetMetadata_EphemeralResourceMetadata) GetTypeName() string {
+ if x != nil {
+ return x.TypeName
+ }
+ return ""
+}
+
+type GetMetadata_ListResourceMetadata struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ TypeName string `protobuf:"bytes,1,opt,name=type_name,json=typeName,proto3" json:"type_name,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *GetMetadata_ListResourceMetadata) Reset() {
+ *x = GetMetadata_ListResourceMetadata{}
+ mi := &file_tfplugin6_proto_msgTypes[57]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *GetMetadata_ListResourceMetadata) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetMetadata_ListResourceMetadata) ProtoMessage() {}
+
+func (x *GetMetadata_ListResourceMetadata) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin6_proto_msgTypes[57]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetMetadata_ListResourceMetadata.ProtoReflect.Descriptor instead.
+func (*GetMetadata_ListResourceMetadata) Descriptor() ([]byte, []int) {
+ return file_tfplugin6_proto_rawDescGZIP(), []int{14, 6}
+}
+
+func (x *GetMetadata_ListResourceMetadata) GetTypeName() string {
+ if x != nil {
+ return x.TypeName
+ }
+ return ""
+}
+
+type GetMetadata_ActionMetadata struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ TypeName string `protobuf:"bytes,1,opt,name=type_name,json=typeName,proto3" json:"type_name,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *GetMetadata_ActionMetadata) Reset() {
+ *x = GetMetadata_ActionMetadata{}
+ mi := &file_tfplugin6_proto_msgTypes[58]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *GetMetadata_ActionMetadata) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetMetadata_ActionMetadata) ProtoMessage() {}
+
+func (x *GetMetadata_ActionMetadata) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin6_proto_msgTypes[58]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetMetadata_ActionMetadata.ProtoReflect.Descriptor instead.
+func (*GetMetadata_ActionMetadata) Descriptor() ([]byte, []int) {
+ return file_tfplugin6_proto_rawDescGZIP(), []int{14, 7}
+}
+
+func (x *GetMetadata_ActionMetadata) GetTypeName() string {
+ if x != nil {
+ return x.TypeName
+ }
+ return ""
+}
+
+type GetProviderSchema_Request struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *GetProviderSchema_Request) Reset() {
+ *x = GetProviderSchema_Request{}
+ mi := &file_tfplugin6_proto_msgTypes[59]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *GetProviderSchema_Request) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetProviderSchema_Request) ProtoMessage() {}
+
+func (x *GetProviderSchema_Request) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin6_proto_msgTypes[59]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetProviderSchema_Request.ProtoReflect.Descriptor instead.
+func (*GetProviderSchema_Request) Descriptor() ([]byte, []int) {
+ return file_tfplugin6_proto_rawDescGZIP(), []int{15, 0}
+}
+
+type GetProviderSchema_Response struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Provider *Schema `protobuf:"bytes,1,opt,name=provider,proto3" json:"provider,omitempty"`
+ ResourceSchemas map[string]*Schema `protobuf:"bytes,2,rep,name=resource_schemas,json=resourceSchemas,proto3" json:"resource_schemas,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
+ DataSourceSchemas map[string]*Schema `protobuf:"bytes,3,rep,name=data_source_schemas,json=dataSourceSchemas,proto3" json:"data_source_schemas,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
+ Diagnostics []*Diagnostic `protobuf:"bytes,4,rep,name=diagnostics,proto3" json:"diagnostics,omitempty"`
+ ProviderMeta *Schema `protobuf:"bytes,5,opt,name=provider_meta,json=providerMeta,proto3" json:"provider_meta,omitempty"`
+ ServerCapabilities *ServerCapabilities `protobuf:"bytes,6,opt,name=server_capabilities,json=serverCapabilities,proto3" json:"server_capabilities,omitempty"`
+ // functions is a mapping of function names to definitions.
+ Functions map[string]*Function `protobuf:"bytes,7,rep,name=functions,proto3" json:"functions,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
+ EphemeralResourceSchemas map[string]*Schema `protobuf:"bytes,8,rep,name=ephemeral_resource_schemas,json=ephemeralResourceSchemas,proto3" json:"ephemeral_resource_schemas,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
+ ListResourceSchemas map[string]*Schema `protobuf:"bytes,9,rep,name=list_resource_schemas,json=listResourceSchemas,proto3" json:"list_resource_schemas,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
+ ActionSchemas map[string]*ActionSchema `protobuf:"bytes,11,rep,name=action_schemas,json=actionSchemas,proto3" json:"action_schemas,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *GetProviderSchema_Response) Reset() {
+ *x = GetProviderSchema_Response{}
+ mi := &file_tfplugin6_proto_msgTypes[60]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *GetProviderSchema_Response) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetProviderSchema_Response) ProtoMessage() {}
+
+func (x *GetProviderSchema_Response) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin6_proto_msgTypes[60]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetProviderSchema_Response.ProtoReflect.Descriptor instead.
+func (*GetProviderSchema_Response) Descriptor() ([]byte, []int) {
+ return file_tfplugin6_proto_rawDescGZIP(), []int{15, 1}
+}
+
+func (x *GetProviderSchema_Response) GetProvider() *Schema {
+ if x != nil {
+ return x.Provider
+ }
+ return nil
+}
+
+func (x *GetProviderSchema_Response) GetResourceSchemas() map[string]*Schema {
+ if x != nil {
+ return x.ResourceSchemas
+ }
+ return nil
+}
+
+func (x *GetProviderSchema_Response) GetDataSourceSchemas() map[string]*Schema {
+ if x != nil {
+ return x.DataSourceSchemas
+ }
+ return nil
+}
+
+func (x *GetProviderSchema_Response) GetDiagnostics() []*Diagnostic {
+ if x != nil {
+ return x.Diagnostics
+ }
+ return nil
+}
+
+func (x *GetProviderSchema_Response) GetProviderMeta() *Schema {
+ if x != nil {
+ return x.ProviderMeta
+ }
+ return nil
+}
+
+func (x *GetProviderSchema_Response) GetServerCapabilities() *ServerCapabilities {
+ if x != nil {
+ return x.ServerCapabilities
+ }
+ return nil
+}
+
+func (x *GetProviderSchema_Response) GetFunctions() map[string]*Function {
+ if x != nil {
+ return x.Functions
+ }
+ return nil
+}
+
+func (x *GetProviderSchema_Response) GetEphemeralResourceSchemas() map[string]*Schema {
+ if x != nil {
+ return x.EphemeralResourceSchemas
+ }
+ return nil
+}
+
+func (x *GetProviderSchema_Response) GetListResourceSchemas() map[string]*Schema {
+ if x != nil {
+ return x.ListResourceSchemas
+ }
+ return nil
+}
+
+func (x *GetProviderSchema_Response) GetActionSchemas() map[string]*ActionSchema {
+ if x != nil {
+ return x.ActionSchemas
+ }
+ return nil
+}
+
+type ValidateProviderConfig_Request struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Config *DynamicValue `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *ValidateProviderConfig_Request) Reset() {
+ *x = ValidateProviderConfig_Request{}
+ mi := &file_tfplugin6_proto_msgTypes[67]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ValidateProviderConfig_Request) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ValidateProviderConfig_Request) ProtoMessage() {}
+
+func (x *ValidateProviderConfig_Request) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin6_proto_msgTypes[67]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ValidateProviderConfig_Request.ProtoReflect.Descriptor instead.
+func (*ValidateProviderConfig_Request) Descriptor() ([]byte, []int) {
+ return file_tfplugin6_proto_rawDescGZIP(), []int{16, 0}
+}
+
+func (x *ValidateProviderConfig_Request) GetConfig() *DynamicValue {
+ if x != nil {
+ return x.Config
+ }
+ return nil
+}
+
+type ValidateProviderConfig_Response struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Diagnostics []*Diagnostic `protobuf:"bytes,2,rep,name=diagnostics,proto3" json:"diagnostics,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *ValidateProviderConfig_Response) Reset() {
+ *x = ValidateProviderConfig_Response{}
+ mi := &file_tfplugin6_proto_msgTypes[68]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ValidateProviderConfig_Response) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ValidateProviderConfig_Response) ProtoMessage() {}
+
+func (x *ValidateProviderConfig_Response) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin6_proto_msgTypes[68]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ValidateProviderConfig_Response.ProtoReflect.Descriptor instead.
+func (*ValidateProviderConfig_Response) Descriptor() ([]byte, []int) {
+ return file_tfplugin6_proto_rawDescGZIP(), []int{16, 1}
+}
+
+func (x *ValidateProviderConfig_Response) GetDiagnostics() []*Diagnostic {
+ if x != nil {
+ return x.Diagnostics
+ }
+ return nil
+}
+
+// Request is the message that is sent to the provider during the
+// UpgradeResourceState RPC.
+//
+// This message intentionally does not include configuration data as any
+// configuration-based or configuration-conditional changes should occur
+// during the PlanResourceChange RPC. Additionally, the configuration is
+// not guaranteed to exist (in the case of resource destruction), be wholly
+// known, nor match the given prior state, which could lead to unexpected
+// provider behaviors for practitioners.
+type UpgradeResourceState_Request struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ TypeName string `protobuf:"bytes,1,opt,name=type_name,json=typeName,proto3" json:"type_name,omitempty"`
+ // version is the schema_version number recorded in the state file
+ Version int64 `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"`
+ // raw_state is the raw states as stored for the resource. Core does
+ // not have access to the schema of prior_version, so it's the
+ // provider's responsibility to interpret this value using the
+ // appropriate older schema. The raw_state will be the json encoded
+ // state, or a legacy flat-mapped format.
+ RawState *RawState `protobuf:"bytes,3,opt,name=raw_state,json=rawState,proto3" json:"raw_state,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *UpgradeResourceState_Request) Reset() {
+ *x = UpgradeResourceState_Request{}
+ mi := &file_tfplugin6_proto_msgTypes[69]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *UpgradeResourceState_Request) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UpgradeResourceState_Request) ProtoMessage() {}
+
+func (x *UpgradeResourceState_Request) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin6_proto_msgTypes[69]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use UpgradeResourceState_Request.ProtoReflect.Descriptor instead.
+func (*UpgradeResourceState_Request) Descriptor() ([]byte, []int) {
+ return file_tfplugin6_proto_rawDescGZIP(), []int{17, 0}
+}
+
+func (x *UpgradeResourceState_Request) GetTypeName() string {
+ if x != nil {
+ return x.TypeName
+ }
+ return ""
+}
+
+func (x *UpgradeResourceState_Request) GetVersion() int64 {
+ if x != nil {
+ return x.Version
+ }
+ return 0
+}
+
+func (x *UpgradeResourceState_Request) GetRawState() *RawState {
+ if x != nil {
+ return x.RawState
+ }
+ return nil
+}
+
+type UpgradeResourceState_Response struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // new_state is a msgpack-encoded data structure that, when interpreted with
+ // the _current_ schema for this resource type, is functionally equivalent to
+ // that which was given in prior_state_raw.
+ UpgradedState *DynamicValue `protobuf:"bytes,1,opt,name=upgraded_state,json=upgradedState,proto3" json:"upgraded_state,omitempty"`
+ // diagnostics describes any errors encountered during migration that could not
+ // be safely resolved, and warnings about any possibly-risky assumptions made
+ // in the upgrade process.
+ Diagnostics []*Diagnostic `protobuf:"bytes,2,rep,name=diagnostics,proto3" json:"diagnostics,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *UpgradeResourceState_Response) Reset() {
+ *x = UpgradeResourceState_Response{}
+ mi := &file_tfplugin6_proto_msgTypes[70]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *UpgradeResourceState_Response) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UpgradeResourceState_Response) ProtoMessage() {}
+
+func (x *UpgradeResourceState_Response) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin6_proto_msgTypes[70]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use UpgradeResourceState_Response.ProtoReflect.Descriptor instead.
+func (*UpgradeResourceState_Response) Descriptor() ([]byte, []int) {
+ return file_tfplugin6_proto_rawDescGZIP(), []int{17, 1}
+}
+
+func (x *UpgradeResourceState_Response) GetUpgradedState() *DynamicValue {
+ if x != nil {
+ return x.UpgradedState
+ }
+ return nil
+}
+
+func (x *UpgradeResourceState_Response) GetDiagnostics() []*Diagnostic {
+ if x != nil {
+ return x.Diagnostics
+ }
+ return nil
+}
+
+type ValidateResourceConfig_Request struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ TypeName string `protobuf:"bytes,1,opt,name=type_name,json=typeName,proto3" json:"type_name,omitempty"`
+ Config *DynamicValue `protobuf:"bytes,2,opt,name=config,proto3" json:"config,omitempty"`
+ ClientCapabilities *ClientCapabilities `protobuf:"bytes,3,opt,name=client_capabilities,json=clientCapabilities,proto3" json:"client_capabilities,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *ValidateResourceConfig_Request) Reset() {
+ *x = ValidateResourceConfig_Request{}
+ mi := &file_tfplugin6_proto_msgTypes[71]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ValidateResourceConfig_Request) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ValidateResourceConfig_Request) ProtoMessage() {}
+
+func (x *ValidateResourceConfig_Request) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin6_proto_msgTypes[71]
if x != nil {
- return x.Deprecated
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
}
- return false
+ return mi.MessageOf(x)
}
-type Schema_Attribute struct {
- state protoimpl.MessageState
+// Deprecated: Use ValidateResourceConfig_Request.ProtoReflect.Descriptor instead.
+func (*ValidateResourceConfig_Request) Descriptor() ([]byte, []int) {
+ return file_tfplugin6_proto_rawDescGZIP(), []int{18, 0}
+}
+
+func (x *ValidateResourceConfig_Request) GetTypeName() string {
+ if x != nil {
+ return x.TypeName
+ }
+ return ""
+}
+
+func (x *ValidateResourceConfig_Request) GetConfig() *DynamicValue {
+ if x != nil {
+ return x.Config
+ }
+ return nil
+}
+
+func (x *ValidateResourceConfig_Request) GetClientCapabilities() *ClientCapabilities {
+ if x != nil {
+ return x.ClientCapabilities
+ }
+ return nil
+}
+
+type ValidateResourceConfig_Response struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Diagnostics []*Diagnostic `protobuf:"bytes,1,rep,name=diagnostics,proto3" json:"diagnostics,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *ValidateResourceConfig_Response) Reset() {
+ *x = ValidateResourceConfig_Response{}
+ mi := &file_tfplugin6_proto_msgTypes[72]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ValidateResourceConfig_Response) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ValidateResourceConfig_Response) ProtoMessage() {}
+
+func (x *ValidateResourceConfig_Response) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin6_proto_msgTypes[72]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ValidateResourceConfig_Response.ProtoReflect.Descriptor instead.
+func (*ValidateResourceConfig_Response) Descriptor() ([]byte, []int) {
+ return file_tfplugin6_proto_rawDescGZIP(), []int{18, 1}
+}
+
+func (x *ValidateResourceConfig_Response) GetDiagnostics() []*Diagnostic {
+ if x != nil {
+ return x.Diagnostics
+ }
+ return nil
+}
+
+type ValidateDataResourceConfig_Request struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ TypeName string `protobuf:"bytes,1,opt,name=type_name,json=typeName,proto3" json:"type_name,omitempty"`
+ Config *DynamicValue `protobuf:"bytes,2,opt,name=config,proto3" json:"config,omitempty"`
+ unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
+}
+
+func (x *ValidateDataResourceConfig_Request) Reset() {
+ *x = ValidateDataResourceConfig_Request{}
+ mi := &file_tfplugin6_proto_msgTypes[73]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ValidateDataResourceConfig_Request) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ValidateDataResourceConfig_Request) ProtoMessage() {}
+
+func (x *ValidateDataResourceConfig_Request) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin6_proto_msgTypes[73]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ValidateDataResourceConfig_Request.ProtoReflect.Descriptor instead.
+func (*ValidateDataResourceConfig_Request) Descriptor() ([]byte, []int) {
+ return file_tfplugin6_proto_rawDescGZIP(), []int{19, 0}
+}
+
+func (x *ValidateDataResourceConfig_Request) GetTypeName() string {
+ if x != nil {
+ return x.TypeName
+ }
+ return ""
+}
+
+func (x *ValidateDataResourceConfig_Request) GetConfig() *DynamicValue {
+ if x != nil {
+ return x.Config
+ }
+ return nil
+}
+
+type ValidateDataResourceConfig_Response struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Diagnostics []*Diagnostic `protobuf:"bytes,1,rep,name=diagnostics,proto3" json:"diagnostics,omitempty"`
unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
- Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
- Type []byte `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
- NestedType *Schema_Object `protobuf:"bytes,10,opt,name=nested_type,json=nestedType,proto3" json:"nested_type,omitempty"`
- Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
- Required bool `protobuf:"varint,4,opt,name=required,proto3" json:"required,omitempty"`
- Optional bool `protobuf:"varint,5,opt,name=optional,proto3" json:"optional,omitempty"`
- Computed bool `protobuf:"varint,6,opt,name=computed,proto3" json:"computed,omitempty"`
- Sensitive bool `protobuf:"varint,7,opt,name=sensitive,proto3" json:"sensitive,omitempty"`
- DescriptionKind StringKind `protobuf:"varint,8,opt,name=description_kind,json=descriptionKind,proto3,enum=tfplugin6.StringKind" json:"description_kind,omitempty"`
- Deprecated bool `protobuf:"varint,9,opt,name=deprecated,proto3" json:"deprecated,omitempty"`
+func (x *ValidateDataResourceConfig_Response) Reset() {
+ *x = ValidateDataResourceConfig_Response{}
+ mi := &file_tfplugin6_proto_msgTypes[74]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
-func (x *Schema_Attribute) Reset() {
- *x = Schema_Attribute{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin6_proto_msgTypes[31]
+func (x *ValidateDataResourceConfig_Response) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ValidateDataResourceConfig_Response) ProtoMessage() {}
+
+func (x *ValidateDataResourceConfig_Response) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin6_proto_msgTypes[74]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ValidateDataResourceConfig_Response.ProtoReflect.Descriptor instead.
+func (*ValidateDataResourceConfig_Response) Descriptor() ([]byte, []int) {
+ return file_tfplugin6_proto_rawDescGZIP(), []int{19, 1}
+}
+
+func (x *ValidateDataResourceConfig_Response) GetDiagnostics() []*Diagnostic {
+ if x != nil {
+ return x.Diagnostics
+ }
+ return nil
+}
+
+type ConfigureProvider_Request struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ TerraformVersion string `protobuf:"bytes,1,opt,name=terraform_version,json=terraformVersion,proto3" json:"terraform_version,omitempty"`
+ Config *DynamicValue `protobuf:"bytes,2,opt,name=config,proto3" json:"config,omitempty"`
+ ClientCapabilities *ClientCapabilities `protobuf:"bytes,3,opt,name=client_capabilities,json=clientCapabilities,proto3" json:"client_capabilities,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *ConfigureProvider_Request) Reset() {
+ *x = ConfigureProvider_Request{}
+ mi := &file_tfplugin6_proto_msgTypes[75]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ConfigureProvider_Request) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ConfigureProvider_Request) ProtoMessage() {}
+
+func (x *ConfigureProvider_Request) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin6_proto_msgTypes[75]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ConfigureProvider_Request.ProtoReflect.Descriptor instead.
+func (*ConfigureProvider_Request) Descriptor() ([]byte, []int) {
+ return file_tfplugin6_proto_rawDescGZIP(), []int{20, 0}
+}
+
+func (x *ConfigureProvider_Request) GetTerraformVersion() string {
+ if x != nil {
+ return x.TerraformVersion
+ }
+ return ""
+}
+
+func (x *ConfigureProvider_Request) GetConfig() *DynamicValue {
+ if x != nil {
+ return x.Config
+ }
+ return nil
+}
+
+func (x *ConfigureProvider_Request) GetClientCapabilities() *ClientCapabilities {
+ if x != nil {
+ return x.ClientCapabilities
+ }
+ return nil
+}
+
+type ConfigureProvider_Response struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Diagnostics []*Diagnostic `protobuf:"bytes,1,rep,name=diagnostics,proto3" json:"diagnostics,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *ConfigureProvider_Response) Reset() {
+ *x = ConfigureProvider_Response{}
+ mi := &file_tfplugin6_proto_msgTypes[76]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ConfigureProvider_Response) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ConfigureProvider_Response) ProtoMessage() {}
+
+func (x *ConfigureProvider_Response) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin6_proto_msgTypes[76]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ConfigureProvider_Response.ProtoReflect.Descriptor instead.
+func (*ConfigureProvider_Response) Descriptor() ([]byte, []int) {
+ return file_tfplugin6_proto_rawDescGZIP(), []int{20, 1}
+}
+
+func (x *ConfigureProvider_Response) GetDiagnostics() []*Diagnostic {
+ if x != nil {
+ return x.Diagnostics
}
+ return nil
+}
+
+// Request is the message that is sent to the provider during the
+// ReadResource RPC.
+//
+// This message intentionally does not include configuration data as any
+// configuration-based or configuration-conditional changes should occur
+// during the PlanResourceChange RPC. Additionally, the configuration is
+// not guaranteed to be wholly known nor match the given prior state, which
+// could lead to unexpected provider behaviors for practitioners.
+type ReadResource_Request struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ TypeName string `protobuf:"bytes,1,opt,name=type_name,json=typeName,proto3" json:"type_name,omitempty"`
+ CurrentState *DynamicValue `protobuf:"bytes,2,opt,name=current_state,json=currentState,proto3" json:"current_state,omitempty"`
+ Private []byte `protobuf:"bytes,3,opt,name=private,proto3" json:"private,omitempty"`
+ ProviderMeta *DynamicValue `protobuf:"bytes,4,opt,name=provider_meta,json=providerMeta,proto3" json:"provider_meta,omitempty"`
+ ClientCapabilities *ClientCapabilities `protobuf:"bytes,5,opt,name=client_capabilities,json=clientCapabilities,proto3" json:"client_capabilities,omitempty"`
+ CurrentIdentity *ResourceIdentityData `protobuf:"bytes,6,opt,name=current_identity,json=currentIdentity,proto3" json:"current_identity,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *ReadResource_Request) Reset() {
+ *x = ReadResource_Request{}
+ mi := &file_tfplugin6_proto_msgTypes[77]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
-func (x *Schema_Attribute) String() string {
+func (x *ReadResource_Request) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*Schema_Attribute) ProtoMessage() {}
+func (*ReadResource_Request) ProtoMessage() {}
-func (x *Schema_Attribute) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin6_proto_msgTypes[31]
- if protoimpl.UnsafeEnabled && x != nil {
+func (x *ReadResource_Request) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin6_proto_msgTypes[77]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1864,111 +3958,82 @@ func (x *Schema_Attribute) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use Schema_Attribute.ProtoReflect.Descriptor instead.
-func (*Schema_Attribute) Descriptor() ([]byte, []int) {
- return file_tfplugin6_proto_rawDescGZIP(), []int{6, 1}
+// Deprecated: Use ReadResource_Request.ProtoReflect.Descriptor instead.
+func (*ReadResource_Request) Descriptor() ([]byte, []int) {
+ return file_tfplugin6_proto_rawDescGZIP(), []int{21, 0}
}
-func (x *Schema_Attribute) GetName() string {
+func (x *ReadResource_Request) GetTypeName() string {
if x != nil {
- return x.Name
+ return x.TypeName
}
return ""
}
-func (x *Schema_Attribute) GetType() []byte {
+func (x *ReadResource_Request) GetCurrentState() *DynamicValue {
if x != nil {
- return x.Type
+ return x.CurrentState
}
return nil
}
-func (x *Schema_Attribute) GetNestedType() *Schema_Object {
+func (x *ReadResource_Request) GetPrivate() []byte {
if x != nil {
- return x.NestedType
+ return x.Private
}
return nil
}
-func (x *Schema_Attribute) GetDescription() string {
- if x != nil {
- return x.Description
- }
- return ""
-}
-
-func (x *Schema_Attribute) GetRequired() bool {
- if x != nil {
- return x.Required
- }
- return false
-}
-
-func (x *Schema_Attribute) GetOptional() bool {
- if x != nil {
- return x.Optional
- }
- return false
-}
-
-func (x *Schema_Attribute) GetComputed() bool {
- if x != nil {
- return x.Computed
- }
- return false
-}
-
-func (x *Schema_Attribute) GetSensitive() bool {
+func (x *ReadResource_Request) GetProviderMeta() *DynamicValue {
if x != nil {
- return x.Sensitive
+ return x.ProviderMeta
}
- return false
+ return nil
}
-func (x *Schema_Attribute) GetDescriptionKind() StringKind {
+func (x *ReadResource_Request) GetClientCapabilities() *ClientCapabilities {
if x != nil {
- return x.DescriptionKind
+ return x.ClientCapabilities
}
- return StringKind_PLAIN
+ return nil
}
-func (x *Schema_Attribute) GetDeprecated() bool {
+func (x *ReadResource_Request) GetCurrentIdentity() *ResourceIdentityData {
if x != nil {
- return x.Deprecated
+ return x.CurrentIdentity
}
- return false
+ return nil
}
-type Schema_NestedBlock struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+type ReadResource_Response struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ NewState *DynamicValue `protobuf:"bytes,1,opt,name=new_state,json=newState,proto3" json:"new_state,omitempty"`
+ Diagnostics []*Diagnostic `protobuf:"bytes,2,rep,name=diagnostics,proto3" json:"diagnostics,omitempty"`
+ Private []byte `protobuf:"bytes,3,opt,name=private,proto3" json:"private,omitempty"`
+ // deferred is set if the provider is deferring the change. If set the caller
+ // needs to handle the deferral.
+ Deferred *Deferred `protobuf:"bytes,4,opt,name=deferred,proto3" json:"deferred,omitempty"`
+ NewIdentity *ResourceIdentityData `protobuf:"bytes,5,opt,name=new_identity,json=newIdentity,proto3" json:"new_identity,omitempty"`
unknownFields protoimpl.UnknownFields
-
- TypeName string `protobuf:"bytes,1,opt,name=type_name,json=typeName,proto3" json:"type_name,omitempty"`
- Block *Schema_Block `protobuf:"bytes,2,opt,name=block,proto3" json:"block,omitempty"`
- Nesting Schema_NestedBlock_NestingMode `protobuf:"varint,3,opt,name=nesting,proto3,enum=tfplugin6.Schema_NestedBlock_NestingMode" json:"nesting,omitempty"`
- MinItems int64 `protobuf:"varint,4,opt,name=min_items,json=minItems,proto3" json:"min_items,omitempty"`
- MaxItems int64 `protobuf:"varint,5,opt,name=max_items,json=maxItems,proto3" json:"max_items,omitempty"`
+ sizeCache protoimpl.SizeCache
}
-func (x *Schema_NestedBlock) Reset() {
- *x = Schema_NestedBlock{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin6_proto_msgTypes[32]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+func (x *ReadResource_Response) Reset() {
+ *x = ReadResource_Response{}
+ mi := &file_tfplugin6_proto_msgTypes[78]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
-func (x *Schema_NestedBlock) String() string {
+func (x *ReadResource_Response) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*Schema_NestedBlock) ProtoMessage() {}
+func (*ReadResource_Response) ProtoMessage() {}
-func (x *Schema_NestedBlock) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin6_proto_msgTypes[32]
- if protoimpl.UnsafeEnabled && x != nil {
+func (x *ReadResource_Response) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin6_proto_msgTypes[78]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1978,80 +4043,76 @@ func (x *Schema_NestedBlock) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use Schema_NestedBlock.ProtoReflect.Descriptor instead.
-func (*Schema_NestedBlock) Descriptor() ([]byte, []int) {
- return file_tfplugin6_proto_rawDescGZIP(), []int{6, 2}
+// Deprecated: Use ReadResource_Response.ProtoReflect.Descriptor instead.
+func (*ReadResource_Response) Descriptor() ([]byte, []int) {
+ return file_tfplugin6_proto_rawDescGZIP(), []int{21, 1}
}
-func (x *Schema_NestedBlock) GetTypeName() string {
+func (x *ReadResource_Response) GetNewState() *DynamicValue {
if x != nil {
- return x.TypeName
+ return x.NewState
}
- return ""
+ return nil
}
-func (x *Schema_NestedBlock) GetBlock() *Schema_Block {
+func (x *ReadResource_Response) GetDiagnostics() []*Diagnostic {
if x != nil {
- return x.Block
+ return x.Diagnostics
}
return nil
}
-func (x *Schema_NestedBlock) GetNesting() Schema_NestedBlock_NestingMode {
+func (x *ReadResource_Response) GetPrivate() []byte {
if x != nil {
- return x.Nesting
+ return x.Private
}
- return Schema_NestedBlock_INVALID
+ return nil
}
-func (x *Schema_NestedBlock) GetMinItems() int64 {
+func (x *ReadResource_Response) GetDeferred() *Deferred {
if x != nil {
- return x.MinItems
+ return x.Deferred
}
- return 0
+ return nil
}
-func (x *Schema_NestedBlock) GetMaxItems() int64 {
+func (x *ReadResource_Response) GetNewIdentity() *ResourceIdentityData {
if x != nil {
- return x.MaxItems
+ return x.NewIdentity
}
- return 0
+ return nil
}
-type Schema_Object struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- Attributes []*Schema_Attribute `protobuf:"bytes,1,rep,name=attributes,proto3" json:"attributes,omitempty"`
- Nesting Schema_Object_NestingMode `protobuf:"varint,3,opt,name=nesting,proto3,enum=tfplugin6.Schema_Object_NestingMode" json:"nesting,omitempty"`
- // MinItems and MaxItems were never used in the protocol, and have no
- // effect on validation.
- //
- // Deprecated: Marked as deprecated in tfplugin6.proto.
- MinItems int64 `protobuf:"varint,4,opt,name=min_items,json=minItems,proto3" json:"min_items,omitempty"`
- // Deprecated: Marked as deprecated in tfplugin6.proto.
- MaxItems int64 `protobuf:"varint,5,opt,name=max_items,json=maxItems,proto3" json:"max_items,omitempty"`
+type PlanResourceChange_Request struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ TypeName string `protobuf:"bytes,1,opt,name=type_name,json=typeName,proto3" json:"type_name,omitempty"`
+ PriorState *DynamicValue `protobuf:"bytes,2,opt,name=prior_state,json=priorState,proto3" json:"prior_state,omitempty"`
+ ProposedNewState *DynamicValue `protobuf:"bytes,3,opt,name=proposed_new_state,json=proposedNewState,proto3" json:"proposed_new_state,omitempty"`
+ Config *DynamicValue `protobuf:"bytes,4,opt,name=config,proto3" json:"config,omitempty"`
+ PriorPrivate []byte `protobuf:"bytes,5,opt,name=prior_private,json=priorPrivate,proto3" json:"prior_private,omitempty"`
+ ProviderMeta *DynamicValue `protobuf:"bytes,6,opt,name=provider_meta,json=providerMeta,proto3" json:"provider_meta,omitempty"`
+ ClientCapabilities *ClientCapabilities `protobuf:"bytes,7,opt,name=client_capabilities,json=clientCapabilities,proto3" json:"client_capabilities,omitempty"`
+ PriorIdentity *ResourceIdentityData `protobuf:"bytes,8,opt,name=prior_identity,json=priorIdentity,proto3" json:"prior_identity,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
-func (x *Schema_Object) Reset() {
- *x = Schema_Object{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin6_proto_msgTypes[33]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+func (x *PlanResourceChange_Request) Reset() {
+ *x = PlanResourceChange_Request{}
+ mi := &file_tfplugin6_proto_msgTypes[79]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
-func (x *Schema_Object) String() string {
+func (x *PlanResourceChange_Request) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*Schema_Object) ProtoMessage() {}
+func (*PlanResourceChange_Request) ProtoMessage() {}
-func (x *Schema_Object) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin6_proto_msgTypes[33]
- if protoimpl.UnsafeEnabled && x != nil {
+func (x *PlanResourceChange_Request) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin6_proto_msgTypes[79]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -2061,83 +4122,109 @@ func (x *Schema_Object) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use Schema_Object.ProtoReflect.Descriptor instead.
-func (*Schema_Object) Descriptor() ([]byte, []int) {
- return file_tfplugin6_proto_rawDescGZIP(), []int{6, 3}
+// Deprecated: Use PlanResourceChange_Request.ProtoReflect.Descriptor instead.
+func (*PlanResourceChange_Request) Descriptor() ([]byte, []int) {
+ return file_tfplugin6_proto_rawDescGZIP(), []int{22, 0}
}
-func (x *Schema_Object) GetAttributes() []*Schema_Attribute {
+func (x *PlanResourceChange_Request) GetTypeName() string {
if x != nil {
- return x.Attributes
+ return x.TypeName
+ }
+ return ""
+}
+
+func (x *PlanResourceChange_Request) GetPriorState() *DynamicValue {
+ if x != nil {
+ return x.PriorState
}
return nil
}
-func (x *Schema_Object) GetNesting() Schema_Object_NestingMode {
+func (x *PlanResourceChange_Request) GetProposedNewState() *DynamicValue {
if x != nil {
- return x.Nesting
+ return x.ProposedNewState
}
- return Schema_Object_INVALID
+ return nil
}
-// Deprecated: Marked as deprecated in tfplugin6.proto.
-func (x *Schema_Object) GetMinItems() int64 {
+func (x *PlanResourceChange_Request) GetConfig() *DynamicValue {
if x != nil {
- return x.MinItems
+ return x.Config
}
- return 0
+ return nil
}
-// Deprecated: Marked as deprecated in tfplugin6.proto.
-func (x *Schema_Object) GetMaxItems() int64 {
+func (x *PlanResourceChange_Request) GetPriorPrivate() []byte {
if x != nil {
- return x.MaxItems
+ return x.PriorPrivate
}
- return 0
+ return nil
}
-type Function_Parameter struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
+func (x *PlanResourceChange_Request) GetProviderMeta() *DynamicValue {
+ if x != nil {
+ return x.ProviderMeta
+ }
+ return nil
+}
- // name is the human-readable display name for the parameter.
- Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
- // type is the type constraint for the parameter.
- Type []byte `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
- // allow_null_value when enabled denotes that a null argument value can
- // be passed to the provider. When disabled, Terraform returns an error
- // if the argument value is null.
- AllowNullValue bool `protobuf:"varint,3,opt,name=allow_null_value,json=allowNullValue,proto3" json:"allow_null_value,omitempty"`
- // allow_unknown_values when enabled denotes that only wholly known
- // argument values will be passed to the provider. When disabled,
- // Terraform skips the function call entirely and assumes an unknown
- // value result from the function.
- AllowUnknownValues bool `protobuf:"varint,4,opt,name=allow_unknown_values,json=allowUnknownValues,proto3" json:"allow_unknown_values,omitempty"`
- // description is human-readable documentation for the parameter.
- Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"`
- // description_kind is the formatting of the description.
- DescriptionKind StringKind `protobuf:"varint,6,opt,name=description_kind,json=descriptionKind,proto3,enum=tfplugin6.StringKind" json:"description_kind,omitempty"`
+func (x *PlanResourceChange_Request) GetClientCapabilities() *ClientCapabilities {
+ if x != nil {
+ return x.ClientCapabilities
+ }
+ return nil
}
-func (x *Function_Parameter) Reset() {
- *x = Function_Parameter{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin6_proto_msgTypes[34]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
+func (x *PlanResourceChange_Request) GetPriorIdentity() *ResourceIdentityData {
+ if x != nil {
+ return x.PriorIdentity
}
+ return nil
}
-func (x *Function_Parameter) String() string {
+type PlanResourceChange_Response struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ PlannedState *DynamicValue `protobuf:"bytes,1,opt,name=planned_state,json=plannedState,proto3" json:"planned_state,omitempty"`
+ RequiresReplace []*AttributePath `protobuf:"bytes,2,rep,name=requires_replace,json=requiresReplace,proto3" json:"requires_replace,omitempty"`
+ PlannedPrivate []byte `protobuf:"bytes,3,opt,name=planned_private,json=plannedPrivate,proto3" json:"planned_private,omitempty"`
+ Diagnostics []*Diagnostic `protobuf:"bytes,4,rep,name=diagnostics,proto3" json:"diagnostics,omitempty"`
+ // This may be set only by the helper/schema "SDK" in the main Terraform
+ // repository, to request that Terraform Core >=0.12 permit additional
+ // inconsistencies that can result from the legacy SDK type system
+ // and its imprecise mapping to the >=0.12 type system.
+ // The change in behavior implied by this flag makes sense only for the
+ // specific details of the legacy SDK type system, and are not a general
+ // mechanism to avoid proper type handling in providers.
+ //
+ // ==== DO NOT USE THIS ====
+ // ==== THIS MUST BE LEFT UNSET IN ALL OTHER SDKS ====
+ // ==== DO NOT USE THIS ====
+ LegacyTypeSystem bool `protobuf:"varint,5,opt,name=legacy_type_system,json=legacyTypeSystem,proto3" json:"legacy_type_system,omitempty"`
+ // deferred is set if the provider is deferring the change. If set the caller
+ // needs to handle the deferral.
+ Deferred *Deferred `protobuf:"bytes,6,opt,name=deferred,proto3" json:"deferred,omitempty"`
+ PlannedIdentity *ResourceIdentityData `protobuf:"bytes,7,opt,name=planned_identity,json=plannedIdentity,proto3" json:"planned_identity,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *PlanResourceChange_Response) Reset() {
+ *x = PlanResourceChange_Response{}
+ mi := &file_tfplugin6_proto_msgTypes[80]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *PlanResourceChange_Response) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*Function_Parameter) ProtoMessage() {}
+func (*PlanResourceChange_Response) ProtoMessage() {}
-func (x *Function_Parameter) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin6_proto_msgTypes[34]
- if protoimpl.UnsafeEnabled && x != nil {
+func (x *PlanResourceChange_Response) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin6_proto_msgTypes[80]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -2147,80 +4234,89 @@ func (x *Function_Parameter) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use Function_Parameter.ProtoReflect.Descriptor instead.
-func (*Function_Parameter) Descriptor() ([]byte, []int) {
- return file_tfplugin6_proto_rawDescGZIP(), []int{7, 0}
+// Deprecated: Use PlanResourceChange_Response.ProtoReflect.Descriptor instead.
+func (*PlanResourceChange_Response) Descriptor() ([]byte, []int) {
+ return file_tfplugin6_proto_rawDescGZIP(), []int{22, 1}
+}
+
+func (x *PlanResourceChange_Response) GetPlannedState() *DynamicValue {
+ if x != nil {
+ return x.PlannedState
+ }
+ return nil
}
-func (x *Function_Parameter) GetName() string {
+func (x *PlanResourceChange_Response) GetRequiresReplace() []*AttributePath {
if x != nil {
- return x.Name
+ return x.RequiresReplace
}
- return ""
+ return nil
}
-func (x *Function_Parameter) GetType() []byte {
+func (x *PlanResourceChange_Response) GetPlannedPrivate() []byte {
if x != nil {
- return x.Type
+ return x.PlannedPrivate
}
return nil
}
-func (x *Function_Parameter) GetAllowNullValue() bool {
+func (x *PlanResourceChange_Response) GetDiagnostics() []*Diagnostic {
if x != nil {
- return x.AllowNullValue
+ return x.Diagnostics
}
- return false
+ return nil
}
-func (x *Function_Parameter) GetAllowUnknownValues() bool {
+func (x *PlanResourceChange_Response) GetLegacyTypeSystem() bool {
if x != nil {
- return x.AllowUnknownValues
+ return x.LegacyTypeSystem
}
return false
}
-func (x *Function_Parameter) GetDescription() string {
+func (x *PlanResourceChange_Response) GetDeferred() *Deferred {
if x != nil {
- return x.Description
+ return x.Deferred
}
- return ""
+ return nil
}
-func (x *Function_Parameter) GetDescriptionKind() StringKind {
+func (x *PlanResourceChange_Response) GetPlannedIdentity() *ResourceIdentityData {
if x != nil {
- return x.DescriptionKind
+ return x.PlannedIdentity
}
- return StringKind_PLAIN
+ return nil
}
-type Function_Return struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- // type is the type constraint for the function result.
- Type []byte `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
+type ApplyResourceChange_Request struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ TypeName string `protobuf:"bytes,1,opt,name=type_name,json=typeName,proto3" json:"type_name,omitempty"`
+ PriorState *DynamicValue `protobuf:"bytes,2,opt,name=prior_state,json=priorState,proto3" json:"prior_state,omitempty"`
+ PlannedState *DynamicValue `protobuf:"bytes,3,opt,name=planned_state,json=plannedState,proto3" json:"planned_state,omitempty"`
+ Config *DynamicValue `protobuf:"bytes,4,opt,name=config,proto3" json:"config,omitempty"`
+ PlannedPrivate []byte `protobuf:"bytes,5,opt,name=planned_private,json=plannedPrivate,proto3" json:"planned_private,omitempty"`
+ ProviderMeta *DynamicValue `protobuf:"bytes,6,opt,name=provider_meta,json=providerMeta,proto3" json:"provider_meta,omitempty"`
+ PlannedIdentity *ResourceIdentityData `protobuf:"bytes,7,opt,name=planned_identity,json=plannedIdentity,proto3" json:"planned_identity,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
-func (x *Function_Return) Reset() {
- *x = Function_Return{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin6_proto_msgTypes[35]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+func (x *ApplyResourceChange_Request) Reset() {
+ *x = ApplyResourceChange_Request{}
+ mi := &file_tfplugin6_proto_msgTypes[81]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
-func (x *Function_Return) String() string {
+func (x *ApplyResourceChange_Request) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*Function_Return) ProtoMessage() {}
+func (*ApplyResourceChange_Request) ProtoMessage() {}
-func (x *Function_Return) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin6_proto_msgTypes[35]
- if protoimpl.UnsafeEnabled && x != nil {
+func (x *ApplyResourceChange_Request) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin6_proto_msgTypes[81]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -2230,87 +4326,98 @@ func (x *Function_Return) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use Function_Return.ProtoReflect.Descriptor instead.
-func (*Function_Return) Descriptor() ([]byte, []int) {
- return file_tfplugin6_proto_rawDescGZIP(), []int{7, 1}
+// Deprecated: Use ApplyResourceChange_Request.ProtoReflect.Descriptor instead.
+func (*ApplyResourceChange_Request) Descriptor() ([]byte, []int) {
+ return file_tfplugin6_proto_rawDescGZIP(), []int{23, 0}
}
-func (x *Function_Return) GetType() []byte {
+func (x *ApplyResourceChange_Request) GetTypeName() string {
if x != nil {
- return x.Type
+ return x.TypeName
}
- return nil
+ return ""
}
-type GetMetadata_Request struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
+func (x *ApplyResourceChange_Request) GetPriorState() *DynamicValue {
+ if x != nil {
+ return x.PriorState
+ }
+ return nil
}
-func (x *GetMetadata_Request) Reset() {
- *x = GetMetadata_Request{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin6_proto_msgTypes[36]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
+func (x *ApplyResourceChange_Request) GetPlannedState() *DynamicValue {
+ if x != nil {
+ return x.PlannedState
}
+ return nil
}
-func (x *GetMetadata_Request) String() string {
- return protoimpl.X.MessageStringOf(x)
+func (x *ApplyResourceChange_Request) GetConfig() *DynamicValue {
+ if x != nil {
+ return x.Config
+ }
+ return nil
}
-func (*GetMetadata_Request) ProtoMessage() {}
-
-func (x *GetMetadata_Request) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin6_proto_msgTypes[36]
- if protoimpl.UnsafeEnabled && x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
+func (x *ApplyResourceChange_Request) GetPlannedPrivate() []byte {
+ if x != nil {
+ return x.PlannedPrivate
}
- return mi.MessageOf(x)
+ return nil
}
-// Deprecated: Use GetMetadata_Request.ProtoReflect.Descriptor instead.
-func (*GetMetadata_Request) Descriptor() ([]byte, []int) {
- return file_tfplugin6_proto_rawDescGZIP(), []int{11, 0}
+func (x *ApplyResourceChange_Request) GetProviderMeta() *DynamicValue {
+ if x != nil {
+ return x.ProviderMeta
+ }
+ return nil
}
-type GetMetadata_Response struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
+func (x *ApplyResourceChange_Request) GetPlannedIdentity() *ResourceIdentityData {
+ if x != nil {
+ return x.PlannedIdentity
+ }
+ return nil
+}
- ServerCapabilities *ServerCapabilities `protobuf:"bytes,1,opt,name=server_capabilities,json=serverCapabilities,proto3" json:"server_capabilities,omitempty"`
- Diagnostics []*Diagnostic `protobuf:"bytes,2,rep,name=diagnostics,proto3" json:"diagnostics,omitempty"`
- DataSources []*GetMetadata_DataSourceMetadata `protobuf:"bytes,3,rep,name=data_sources,json=dataSources,proto3" json:"data_sources,omitempty"`
- Resources []*GetMetadata_ResourceMetadata `protobuf:"bytes,4,rep,name=resources,proto3" json:"resources,omitempty"`
- // functions returns metadata for any functions.
- Functions []*GetMetadata_FunctionMetadata `protobuf:"bytes,5,rep,name=functions,proto3" json:"functions,omitempty"`
+type ApplyResourceChange_Response struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ NewState *DynamicValue `protobuf:"bytes,1,opt,name=new_state,json=newState,proto3" json:"new_state,omitempty"`
+ Private []byte `protobuf:"bytes,2,opt,name=private,proto3" json:"private,omitempty"`
+ Diagnostics []*Diagnostic `protobuf:"bytes,3,rep,name=diagnostics,proto3" json:"diagnostics,omitempty"`
+ // This may be set only by the helper/schema "SDK" in the main Terraform
+ // repository, to request that Terraform Core >=0.12 permit additional
+ // inconsistencies that can result from the legacy SDK type system
+ // and its imprecise mapping to the >=0.12 type system.
+ // The change in behavior implied by this flag makes sense only for the
+ // specific details of the legacy SDK type system, and are not a general
+ // mechanism to avoid proper type handling in providers.
+ //
+ // ==== DO NOT USE THIS ====
+ // ==== THIS MUST BE LEFT UNSET IN ALL OTHER SDKS ====
+ // ==== DO NOT USE THIS ====
+ LegacyTypeSystem bool `protobuf:"varint,4,opt,name=legacy_type_system,json=legacyTypeSystem,proto3" json:"legacy_type_system,omitempty"`
+ NewIdentity *ResourceIdentityData `protobuf:"bytes,5,opt,name=new_identity,json=newIdentity,proto3" json:"new_identity,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
-func (x *GetMetadata_Response) Reset() {
- *x = GetMetadata_Response{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin6_proto_msgTypes[37]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+func (x *ApplyResourceChange_Response) Reset() {
+ *x = ApplyResourceChange_Response{}
+ mi := &file_tfplugin6_proto_msgTypes[82]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
-func (x *GetMetadata_Response) String() string {
+func (x *ApplyResourceChange_Response) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*GetMetadata_Response) ProtoMessage() {}
+func (*ApplyResourceChange_Response) ProtoMessage() {}
-func (x *GetMetadata_Response) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin6_proto_msgTypes[37]
- if protoimpl.UnsafeEnabled && x != nil {
+func (x *ApplyResourceChange_Response) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin6_proto_msgTypes[82]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -2320,73 +4427,72 @@ func (x *GetMetadata_Response) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use GetMetadata_Response.ProtoReflect.Descriptor instead.
-func (*GetMetadata_Response) Descriptor() ([]byte, []int) {
- return file_tfplugin6_proto_rawDescGZIP(), []int{11, 1}
+// Deprecated: Use ApplyResourceChange_Response.ProtoReflect.Descriptor instead.
+func (*ApplyResourceChange_Response) Descriptor() ([]byte, []int) {
+ return file_tfplugin6_proto_rawDescGZIP(), []int{23, 1}
}
-func (x *GetMetadata_Response) GetServerCapabilities() *ServerCapabilities {
+func (x *ApplyResourceChange_Response) GetNewState() *DynamicValue {
if x != nil {
- return x.ServerCapabilities
+ return x.NewState
}
return nil
}
-func (x *GetMetadata_Response) GetDiagnostics() []*Diagnostic {
+func (x *ApplyResourceChange_Response) GetPrivate() []byte {
if x != nil {
- return x.Diagnostics
+ return x.Private
}
return nil
}
-func (x *GetMetadata_Response) GetDataSources() []*GetMetadata_DataSourceMetadata {
+func (x *ApplyResourceChange_Response) GetDiagnostics() []*Diagnostic {
if x != nil {
- return x.DataSources
+ return x.Diagnostics
}
return nil
}
-func (x *GetMetadata_Response) GetResources() []*GetMetadata_ResourceMetadata {
+func (x *ApplyResourceChange_Response) GetLegacyTypeSystem() bool {
if x != nil {
- return x.Resources
+ return x.LegacyTypeSystem
}
- return nil
+ return false
}
-func (x *GetMetadata_Response) GetFunctions() []*GetMetadata_FunctionMetadata {
+func (x *ApplyResourceChange_Response) GetNewIdentity() *ResourceIdentityData {
if x != nil {
- return x.Functions
+ return x.NewIdentity
}
return nil
}
-type GetMetadata_FunctionMetadata struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- // name is the function name.
- Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+type ImportResourceState_Request struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ TypeName string `protobuf:"bytes,1,opt,name=type_name,json=typeName,proto3" json:"type_name,omitempty"`
+ Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
+ ClientCapabilities *ClientCapabilities `protobuf:"bytes,3,opt,name=client_capabilities,json=clientCapabilities,proto3" json:"client_capabilities,omitempty"`
+ Identity *ResourceIdentityData `protobuf:"bytes,4,opt,name=identity,proto3" json:"identity,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
-func (x *GetMetadata_FunctionMetadata) Reset() {
- *x = GetMetadata_FunctionMetadata{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin6_proto_msgTypes[38]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+func (x *ImportResourceState_Request) Reset() {
+ *x = ImportResourceState_Request{}
+ mi := &file_tfplugin6_proto_msgTypes[83]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
-func (x *GetMetadata_FunctionMetadata) String() string {
+func (x *ImportResourceState_Request) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*GetMetadata_FunctionMetadata) ProtoMessage() {}
+func (*ImportResourceState_Request) ProtoMessage() {}
-func (x *GetMetadata_FunctionMetadata) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin6_proto_msgTypes[38]
- if protoimpl.UnsafeEnabled && x != nil {
+func (x *ImportResourceState_Request) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin6_proto_msgTypes[83]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -2396,91 +4502,65 @@ func (x *GetMetadata_FunctionMetadata) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use GetMetadata_FunctionMetadata.ProtoReflect.Descriptor instead.
-func (*GetMetadata_FunctionMetadata) Descriptor() ([]byte, []int) {
- return file_tfplugin6_proto_rawDescGZIP(), []int{11, 2}
+// Deprecated: Use ImportResourceState_Request.ProtoReflect.Descriptor instead.
+func (*ImportResourceState_Request) Descriptor() ([]byte, []int) {
+ return file_tfplugin6_proto_rawDescGZIP(), []int{24, 0}
}
-func (x *GetMetadata_FunctionMetadata) GetName() string {
+func (x *ImportResourceState_Request) GetTypeName() string {
if x != nil {
- return x.Name
+ return x.TypeName
}
return ""
}
-type GetMetadata_DataSourceMetadata struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- TypeName string `protobuf:"bytes,1,opt,name=type_name,json=typeName,proto3" json:"type_name,omitempty"`
-}
-
-func (x *GetMetadata_DataSourceMetadata) Reset() {
- *x = GetMetadata_DataSourceMetadata{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin6_proto_msgTypes[39]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
+func (x *ImportResourceState_Request) GetId() string {
+ if x != nil {
+ return x.Id
}
+ return ""
}
-func (x *GetMetadata_DataSourceMetadata) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*GetMetadata_DataSourceMetadata) ProtoMessage() {}
-
-func (x *GetMetadata_DataSourceMetadata) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin6_proto_msgTypes[39]
- if protoimpl.UnsafeEnabled && x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
+func (x *ImportResourceState_Request) GetClientCapabilities() *ClientCapabilities {
+ if x != nil {
+ return x.ClientCapabilities
}
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use GetMetadata_DataSourceMetadata.ProtoReflect.Descriptor instead.
-func (*GetMetadata_DataSourceMetadata) Descriptor() ([]byte, []int) {
- return file_tfplugin6_proto_rawDescGZIP(), []int{11, 3}
+ return nil
}
-func (x *GetMetadata_DataSourceMetadata) GetTypeName() string {
+func (x *ImportResourceState_Request) GetIdentity() *ResourceIdentityData {
if x != nil {
- return x.TypeName
+ return x.Identity
}
- return ""
+ return nil
}
-type GetMetadata_ResourceMetadata struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+type ImportResourceState_ImportedResource struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ TypeName string `protobuf:"bytes,1,opt,name=type_name,json=typeName,proto3" json:"type_name,omitempty"`
+ State *DynamicValue `protobuf:"bytes,2,opt,name=state,proto3" json:"state,omitempty"`
+ Private []byte `protobuf:"bytes,3,opt,name=private,proto3" json:"private,omitempty"`
+ Identity *ResourceIdentityData `protobuf:"bytes,4,opt,name=identity,proto3" json:"identity,omitempty"`
unknownFields protoimpl.UnknownFields
-
- TypeName string `protobuf:"bytes,1,opt,name=type_name,json=typeName,proto3" json:"type_name,omitempty"`
+ sizeCache protoimpl.SizeCache
}
-func (x *GetMetadata_ResourceMetadata) Reset() {
- *x = GetMetadata_ResourceMetadata{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin6_proto_msgTypes[40]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+func (x *ImportResourceState_ImportedResource) Reset() {
+ *x = ImportResourceState_ImportedResource{}
+ mi := &file_tfplugin6_proto_msgTypes[84]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
-func (x *GetMetadata_ResourceMetadata) String() string {
+func (x *ImportResourceState_ImportedResource) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*GetMetadata_ResourceMetadata) ProtoMessage() {}
+func (*ImportResourceState_ImportedResource) ProtoMessage() {}
-func (x *GetMetadata_ResourceMetadata) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin6_proto_msgTypes[40]
- if protoimpl.UnsafeEnabled && x != nil {
+func (x *ImportResourceState_ImportedResource) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin6_proto_msgTypes[84]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -2490,42 +4570,66 @@ func (x *GetMetadata_ResourceMetadata) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use GetMetadata_ResourceMetadata.ProtoReflect.Descriptor instead.
-func (*GetMetadata_ResourceMetadata) Descriptor() ([]byte, []int) {
- return file_tfplugin6_proto_rawDescGZIP(), []int{11, 4}
+// Deprecated: Use ImportResourceState_ImportedResource.ProtoReflect.Descriptor instead.
+func (*ImportResourceState_ImportedResource) Descriptor() ([]byte, []int) {
+ return file_tfplugin6_proto_rawDescGZIP(), []int{24, 1}
}
-func (x *GetMetadata_ResourceMetadata) GetTypeName() string {
+func (x *ImportResourceState_ImportedResource) GetTypeName() string {
if x != nil {
return x.TypeName
}
return ""
}
-type GetProviderSchema_Request struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
+func (x *ImportResourceState_ImportedResource) GetState() *DynamicValue {
+ if x != nil {
+ return x.State
+ }
+ return nil
}
-func (x *GetProviderSchema_Request) Reset() {
- *x = GetProviderSchema_Request{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin6_proto_msgTypes[41]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
+func (x *ImportResourceState_ImportedResource) GetPrivate() []byte {
+ if x != nil {
+ return x.Private
+ }
+ return nil
+}
+
+func (x *ImportResourceState_ImportedResource) GetIdentity() *ResourceIdentityData {
+ if x != nil {
+ return x.Identity
}
+ return nil
}
-func (x *GetProviderSchema_Request) String() string {
+type ImportResourceState_Response struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ ImportedResources []*ImportResourceState_ImportedResource `protobuf:"bytes,1,rep,name=imported_resources,json=importedResources,proto3" json:"imported_resources,omitempty"`
+ Diagnostics []*Diagnostic `protobuf:"bytes,2,rep,name=diagnostics,proto3" json:"diagnostics,omitempty"`
+ // deferred is set if the provider is deferring the change. If set the caller
+ // needs to handle the deferral.
+ Deferred *Deferred `protobuf:"bytes,3,opt,name=deferred,proto3" json:"deferred,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *ImportResourceState_Response) Reset() {
+ *x = ImportResourceState_Response{}
+ mi := &file_tfplugin6_proto_msgTypes[85]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ImportResourceState_Response) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*GetProviderSchema_Request) ProtoMessage() {}
+func (*ImportResourceState_Response) ProtoMessage() {}
-func (x *GetProviderSchema_Request) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin6_proto_msgTypes[41]
- if protoimpl.UnsafeEnabled && x != nil {
+func (x *ImportResourceState_Response) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin6_proto_msgTypes[85]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -2535,44 +4639,76 @@ func (x *GetProviderSchema_Request) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use GetProviderSchema_Request.ProtoReflect.Descriptor instead.
-func (*GetProviderSchema_Request) Descriptor() ([]byte, []int) {
- return file_tfplugin6_proto_rawDescGZIP(), []int{12, 0}
+// Deprecated: Use ImportResourceState_Response.ProtoReflect.Descriptor instead.
+func (*ImportResourceState_Response) Descriptor() ([]byte, []int) {
+ return file_tfplugin6_proto_rawDescGZIP(), []int{24, 2}
}
-type GetProviderSchema_Response struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
+func (x *ImportResourceState_Response) GetImportedResources() []*ImportResourceState_ImportedResource {
+ if x != nil {
+ return x.ImportedResources
+ }
+ return nil
+}
- Provider *Schema `protobuf:"bytes,1,opt,name=provider,proto3" json:"provider,omitempty"`
- ResourceSchemas map[string]*Schema `protobuf:"bytes,2,rep,name=resource_schemas,json=resourceSchemas,proto3" json:"resource_schemas,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
- DataSourceSchemas map[string]*Schema `protobuf:"bytes,3,rep,name=data_source_schemas,json=dataSourceSchemas,proto3" json:"data_source_schemas,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
- Diagnostics []*Diagnostic `protobuf:"bytes,4,rep,name=diagnostics,proto3" json:"diagnostics,omitempty"`
- ProviderMeta *Schema `protobuf:"bytes,5,opt,name=provider_meta,json=providerMeta,proto3" json:"provider_meta,omitempty"`
- ServerCapabilities *ServerCapabilities `protobuf:"bytes,6,opt,name=server_capabilities,json=serverCapabilities,proto3" json:"server_capabilities,omitempty"`
- // functions is a mapping of function names to definitions.
- Functions map[string]*Function `protobuf:"bytes,7,rep,name=functions,proto3" json:"functions,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+func (x *ImportResourceState_Response) GetDiagnostics() []*Diagnostic {
+ if x != nil {
+ return x.Diagnostics
+ }
+ return nil
}
-func (x *GetProviderSchema_Response) Reset() {
- *x = GetProviderSchema_Response{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin6_proto_msgTypes[42]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
+func (x *ImportResourceState_Response) GetDeferred() *Deferred {
+ if x != nil {
+ return x.Deferred
}
+ return nil
}
-func (x *GetProviderSchema_Response) String() string {
+type MoveResourceState_Request struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // The address of the provider the resource is being moved from.
+ SourceProviderAddress string `protobuf:"bytes,1,opt,name=source_provider_address,json=sourceProviderAddress,proto3" json:"source_provider_address,omitempty"`
+ // The resource type that the resource is being moved from.
+ SourceTypeName string `protobuf:"bytes,2,opt,name=source_type_name,json=sourceTypeName,proto3" json:"source_type_name,omitempty"`
+ // The schema version of the resource type that the resource is being
+ // moved from.
+ SourceSchemaVersion int64 `protobuf:"varint,3,opt,name=source_schema_version,json=sourceSchemaVersion,proto3" json:"source_schema_version,omitempty"`
+ // The raw state of the resource being moved. Only the json field is
+ // populated, as there should be no legacy providers using the flatmap
+ // format that support newly introduced RPCs.
+ SourceState *RawState `protobuf:"bytes,4,opt,name=source_state,json=sourceState,proto3" json:"source_state,omitempty"`
+ // The resource type that the resource is being moved to.
+ TargetTypeName string `protobuf:"bytes,5,opt,name=target_type_name,json=targetTypeName,proto3" json:"target_type_name,omitempty"`
+ // The private state of the resource being moved.
+ SourcePrivate []byte `protobuf:"bytes,6,opt,name=source_private,json=sourcePrivate,proto3" json:"source_private,omitempty"`
+ // The raw identity of the resource being moved. Only the json field is
+ // populated, as there should be no legacy providers using the flatmap
+ // format that support newly introduced RPCs.
+ SourceIdentity *RawState `protobuf:"bytes,7,opt,name=source_identity,json=sourceIdentity,proto3" json:"source_identity,omitempty"`
+ // The identity schema version of the resource type that the resource
+ // is being moved from.
+ SourceIdentitySchemaVersion int64 `protobuf:"varint,8,opt,name=source_identity_schema_version,json=sourceIdentitySchemaVersion,proto3" json:"source_identity_schema_version,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *MoveResourceState_Request) Reset() {
+ *x = MoveResourceState_Request{}
+ mi := &file_tfplugin6_proto_msgTypes[86]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *MoveResourceState_Request) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*GetProviderSchema_Response) ProtoMessage() {}
+func (*MoveResourceState_Request) ProtoMessage() {}
-func (x *GetProviderSchema_Response) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin6_proto_msgTypes[42]
- if protoimpl.UnsafeEnabled && x != nil {
+func (x *MoveResourceState_Request) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin6_proto_msgTypes[86]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -2582,86 +4718,96 @@ func (x *GetProviderSchema_Response) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use GetProviderSchema_Response.ProtoReflect.Descriptor instead.
-func (*GetProviderSchema_Response) Descriptor() ([]byte, []int) {
- return file_tfplugin6_proto_rawDescGZIP(), []int{12, 1}
+// Deprecated: Use MoveResourceState_Request.ProtoReflect.Descriptor instead.
+func (*MoveResourceState_Request) Descriptor() ([]byte, []int) {
+ return file_tfplugin6_proto_rawDescGZIP(), []int{25, 0}
}
-func (x *GetProviderSchema_Response) GetProvider() *Schema {
+func (x *MoveResourceState_Request) GetSourceProviderAddress() string {
if x != nil {
- return x.Provider
+ return x.SourceProviderAddress
}
- return nil
+ return ""
}
-func (x *GetProviderSchema_Response) GetResourceSchemas() map[string]*Schema {
+func (x *MoveResourceState_Request) GetSourceTypeName() string {
if x != nil {
- return x.ResourceSchemas
+ return x.SourceTypeName
}
- return nil
+ return ""
}
-func (x *GetProviderSchema_Response) GetDataSourceSchemas() map[string]*Schema {
+func (x *MoveResourceState_Request) GetSourceSchemaVersion() int64 {
if x != nil {
- return x.DataSourceSchemas
+ return x.SourceSchemaVersion
}
- return nil
+ return 0
}
-func (x *GetProviderSchema_Response) GetDiagnostics() []*Diagnostic {
+func (x *MoveResourceState_Request) GetSourceState() *RawState {
if x != nil {
- return x.Diagnostics
+ return x.SourceState
}
return nil
}
-func (x *GetProviderSchema_Response) GetProviderMeta() *Schema {
+func (x *MoveResourceState_Request) GetTargetTypeName() string {
if x != nil {
- return x.ProviderMeta
+ return x.TargetTypeName
}
- return nil
+ return ""
}
-func (x *GetProviderSchema_Response) GetServerCapabilities() *ServerCapabilities {
+func (x *MoveResourceState_Request) GetSourcePrivate() []byte {
if x != nil {
- return x.ServerCapabilities
+ return x.SourcePrivate
}
return nil
}
-func (x *GetProviderSchema_Response) GetFunctions() map[string]*Function {
+func (x *MoveResourceState_Request) GetSourceIdentity() *RawState {
if x != nil {
- return x.Functions
+ return x.SourceIdentity
}
return nil
}
-type ValidateProviderConfig_Request struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
+func (x *MoveResourceState_Request) GetSourceIdentitySchemaVersion() int64 {
+ if x != nil {
+ return x.SourceIdentitySchemaVersion
+ }
+ return 0
+}
- Config *DynamicValue `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"`
+type MoveResourceState_Response struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // The state of the resource after it has been moved.
+ TargetState *DynamicValue `protobuf:"bytes,1,opt,name=target_state,json=targetState,proto3" json:"target_state,omitempty"`
+ // Any diagnostics that occurred during the move.
+ Diagnostics []*Diagnostic `protobuf:"bytes,2,rep,name=diagnostics,proto3" json:"diagnostics,omitempty"`
+ // The private state of the resource after it has been moved.
+ TargetPrivate []byte `protobuf:"bytes,3,opt,name=target_private,json=targetPrivate,proto3" json:"target_private,omitempty"`
+ TargetIdentity *ResourceIdentityData `protobuf:"bytes,4,opt,name=target_identity,json=targetIdentity,proto3" json:"target_identity,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
-func (x *ValidateProviderConfig_Request) Reset() {
- *x = ValidateProviderConfig_Request{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin6_proto_msgTypes[46]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+func (x *MoveResourceState_Response) Reset() {
+ *x = MoveResourceState_Response{}
+ mi := &file_tfplugin6_proto_msgTypes[87]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
-func (x *ValidateProviderConfig_Request) String() string {
+func (x *MoveResourceState_Response) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*ValidateProviderConfig_Request) ProtoMessage() {}
+func (*MoveResourceState_Response) ProtoMessage() {}
-func (x *ValidateProviderConfig_Request) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin6_proto_msgTypes[46]
- if protoimpl.UnsafeEnabled && x != nil {
+func (x *MoveResourceState_Response) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin6_proto_msgTypes[87]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -2671,108 +4817,65 @@ func (x *ValidateProviderConfig_Request) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use ValidateProviderConfig_Request.ProtoReflect.Descriptor instead.
-func (*ValidateProviderConfig_Request) Descriptor() ([]byte, []int) {
- return file_tfplugin6_proto_rawDescGZIP(), []int{13, 0}
+// Deprecated: Use MoveResourceState_Response.ProtoReflect.Descriptor instead.
+func (*MoveResourceState_Response) Descriptor() ([]byte, []int) {
+ return file_tfplugin6_proto_rawDescGZIP(), []int{25, 1}
}
-func (x *ValidateProviderConfig_Request) GetConfig() *DynamicValue {
+func (x *MoveResourceState_Response) GetTargetState() *DynamicValue {
if x != nil {
- return x.Config
+ return x.TargetState
}
return nil
}
-type ValidateProviderConfig_Response struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- Diagnostics []*Diagnostic `protobuf:"bytes,2,rep,name=diagnostics,proto3" json:"diagnostics,omitempty"`
-}
-
-func (x *ValidateProviderConfig_Response) Reset() {
- *x = ValidateProviderConfig_Response{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin6_proto_msgTypes[47]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
+func (x *MoveResourceState_Response) GetDiagnostics() []*Diagnostic {
+ if x != nil {
+ return x.Diagnostics
}
+ return nil
}
-func (x *ValidateProviderConfig_Response) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*ValidateProviderConfig_Response) ProtoMessage() {}
-
-func (x *ValidateProviderConfig_Response) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin6_proto_msgTypes[47]
- if protoimpl.UnsafeEnabled && x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
+func (x *MoveResourceState_Response) GetTargetPrivate() []byte {
+ if x != nil {
+ return x.TargetPrivate
}
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use ValidateProviderConfig_Response.ProtoReflect.Descriptor instead.
-func (*ValidateProviderConfig_Response) Descriptor() ([]byte, []int) {
- return file_tfplugin6_proto_rawDescGZIP(), []int{13, 1}
+ return nil
}
-func (x *ValidateProviderConfig_Response) GetDiagnostics() []*Diagnostic {
+func (x *MoveResourceState_Response) GetTargetIdentity() *ResourceIdentityData {
if x != nil {
- return x.Diagnostics
+ return x.TargetIdentity
}
return nil
}
-// Request is the message that is sent to the provider during the
-// UpgradeResourceState RPC.
-//
-// This message intentionally does not include configuration data as any
-// configuration-based or configuration-conditional changes should occur
-// during the PlanResourceChange RPC. Additionally, the configuration is
-// not guaranteed to exist (in the case of resource destruction), be wholly
-// known, nor match the given prior state, which could lead to unexpected
-// provider behaviors for practitioners.
-type UpgradeResourceState_Request struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- TypeName string `protobuf:"bytes,1,opt,name=type_name,json=typeName,proto3" json:"type_name,omitempty"`
- // version is the schema_version number recorded in the state file
- Version int64 `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"`
- // raw_state is the raw states as stored for the resource. Core does
- // not have access to the schema of prior_version, so it's the
- // provider's responsibility to interpret this value using the
- // appropriate older schema. The raw_state will be the json encoded
- // state, or a legacy flat-mapped format.
- RawState *RawState `protobuf:"bytes,3,opt,name=raw_state,json=rawState,proto3" json:"raw_state,omitempty"`
+type ReadDataSource_Request struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ TypeName string `protobuf:"bytes,1,opt,name=type_name,json=typeName,proto3" json:"type_name,omitempty"`
+ Config *DynamicValue `protobuf:"bytes,2,opt,name=config,proto3" json:"config,omitempty"`
+ ProviderMeta *DynamicValue `protobuf:"bytes,3,opt,name=provider_meta,json=providerMeta,proto3" json:"provider_meta,omitempty"`
+ ClientCapabilities *ClientCapabilities `protobuf:"bytes,4,opt,name=client_capabilities,json=clientCapabilities,proto3" json:"client_capabilities,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
-func (x *UpgradeResourceState_Request) Reset() {
- *x = UpgradeResourceState_Request{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin6_proto_msgTypes[48]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+func (x *ReadDataSource_Request) Reset() {
+ *x = ReadDataSource_Request{}
+ mi := &file_tfplugin6_proto_msgTypes[88]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
-func (x *UpgradeResourceState_Request) String() string {
+func (x *ReadDataSource_Request) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*UpgradeResourceState_Request) ProtoMessage() {}
+func (*ReadDataSource_Request) ProtoMessage() {}
-func (x *UpgradeResourceState_Request) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin6_proto_msgTypes[48]
- if protoimpl.UnsafeEnabled && x != nil {
+func (x *ReadDataSource_Request) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin6_proto_msgTypes[88]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -2782,65 +4885,66 @@ func (x *UpgradeResourceState_Request) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use UpgradeResourceState_Request.ProtoReflect.Descriptor instead.
-func (*UpgradeResourceState_Request) Descriptor() ([]byte, []int) {
- return file_tfplugin6_proto_rawDescGZIP(), []int{14, 0}
+// Deprecated: Use ReadDataSource_Request.ProtoReflect.Descriptor instead.
+func (*ReadDataSource_Request) Descriptor() ([]byte, []int) {
+ return file_tfplugin6_proto_rawDescGZIP(), []int{26, 0}
}
-func (x *UpgradeResourceState_Request) GetTypeName() string {
+func (x *ReadDataSource_Request) GetTypeName() string {
if x != nil {
return x.TypeName
}
return ""
}
-func (x *UpgradeResourceState_Request) GetVersion() int64 {
+func (x *ReadDataSource_Request) GetConfig() *DynamicValue {
if x != nil {
- return x.Version
+ return x.Config
}
- return 0
+ return nil
}
-func (x *UpgradeResourceState_Request) GetRawState() *RawState {
+func (x *ReadDataSource_Request) GetProviderMeta() *DynamicValue {
if x != nil {
- return x.RawState
+ return x.ProviderMeta
}
return nil
}
-type UpgradeResourceState_Response struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
+func (x *ReadDataSource_Request) GetClientCapabilities() *ClientCapabilities {
+ if x != nil {
+ return x.ClientCapabilities
+ }
+ return nil
+}
- // new_state is a msgpack-encoded data structure that, when interpreted with
- // the _current_ schema for this resource type, is functionally equivalent to
- // that which was given in prior_state_raw.
- UpgradedState *DynamicValue `protobuf:"bytes,1,opt,name=upgraded_state,json=upgradedState,proto3" json:"upgraded_state,omitempty"`
- // diagnostics describes any errors encountered during migration that could not
- // be safely resolved, and warnings about any possibly-risky assumptions made
- // in the upgrade process.
- Diagnostics []*Diagnostic `protobuf:"bytes,2,rep,name=diagnostics,proto3" json:"diagnostics,omitempty"`
+type ReadDataSource_Response struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ State *DynamicValue `protobuf:"bytes,1,opt,name=state,proto3" json:"state,omitempty"`
+ Diagnostics []*Diagnostic `protobuf:"bytes,2,rep,name=diagnostics,proto3" json:"diagnostics,omitempty"`
+ // deferred is set if the provider is deferring the change. If set the caller
+ // needs to handle the deferral.
+ Deferred *Deferred `protobuf:"bytes,3,opt,name=deferred,proto3" json:"deferred,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
-func (x *UpgradeResourceState_Response) Reset() {
- *x = UpgradeResourceState_Response{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin6_proto_msgTypes[49]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+func (x *ReadDataSource_Response) Reset() {
+ *x = ReadDataSource_Response{}
+ mi := &file_tfplugin6_proto_msgTypes[89]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
-func (x *UpgradeResourceState_Response) String() string {
+func (x *ReadDataSource_Response) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*UpgradeResourceState_Response) ProtoMessage() {}
+func (*ReadDataSource_Response) ProtoMessage() {}
-func (x *UpgradeResourceState_Response) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin6_proto_msgTypes[49]
- if protoimpl.UnsafeEnabled && x != nil {
+func (x *ReadDataSource_Response) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin6_proto_msgTypes[89]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -2850,52 +4954,54 @@ func (x *UpgradeResourceState_Response) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use UpgradeResourceState_Response.ProtoReflect.Descriptor instead.
-func (*UpgradeResourceState_Response) Descriptor() ([]byte, []int) {
- return file_tfplugin6_proto_rawDescGZIP(), []int{14, 1}
+// Deprecated: Use ReadDataSource_Response.ProtoReflect.Descriptor instead.
+func (*ReadDataSource_Response) Descriptor() ([]byte, []int) {
+ return file_tfplugin6_proto_rawDescGZIP(), []int{26, 1}
}
-func (x *UpgradeResourceState_Response) GetUpgradedState() *DynamicValue {
+func (x *ReadDataSource_Response) GetState() *DynamicValue {
if x != nil {
- return x.UpgradedState
+ return x.State
}
return nil
}
-func (x *UpgradeResourceState_Response) GetDiagnostics() []*Diagnostic {
+func (x *ReadDataSource_Response) GetDiagnostics() []*Diagnostic {
if x != nil {
return x.Diagnostics
}
return nil
}
-type ValidateResourceConfig_Request struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
+func (x *ReadDataSource_Response) GetDeferred() *Deferred {
+ if x != nil {
+ return x.Deferred
+ }
+ return nil
+}
- TypeName string `protobuf:"bytes,1,opt,name=type_name,json=typeName,proto3" json:"type_name,omitempty"`
- Config *DynamicValue `protobuf:"bytes,2,opt,name=config,proto3" json:"config,omitempty"`
+type GetFunctions_Request struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
-func (x *ValidateResourceConfig_Request) Reset() {
- *x = ValidateResourceConfig_Request{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin6_proto_msgTypes[50]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+func (x *GetFunctions_Request) Reset() {
+ *x = GetFunctions_Request{}
+ mi := &file_tfplugin6_proto_msgTypes[90]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
-func (x *ValidateResourceConfig_Request) String() string {
+func (x *GetFunctions_Request) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*ValidateResourceConfig_Request) ProtoMessage() {}
+func (*GetFunctions_Request) ProtoMessage() {}
-func (x *ValidateResourceConfig_Request) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin6_proto_msgTypes[50]
- if protoimpl.UnsafeEnabled && x != nil {
+func (x *GetFunctions_Request) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin6_proto_msgTypes[90]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -2905,51 +5011,37 @@ func (x *ValidateResourceConfig_Request) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use ValidateResourceConfig_Request.ProtoReflect.Descriptor instead.
-func (*ValidateResourceConfig_Request) Descriptor() ([]byte, []int) {
- return file_tfplugin6_proto_rawDescGZIP(), []int{15, 0}
-}
-
-func (x *ValidateResourceConfig_Request) GetTypeName() string {
- if x != nil {
- return x.TypeName
- }
- return ""
-}
-
-func (x *ValidateResourceConfig_Request) GetConfig() *DynamicValue {
- if x != nil {
- return x.Config
- }
- return nil
+// Deprecated: Use GetFunctions_Request.ProtoReflect.Descriptor instead.
+func (*GetFunctions_Request) Descriptor() ([]byte, []int) {
+ return file_tfplugin6_proto_rawDescGZIP(), []int{27, 0}
}
-type ValidateResourceConfig_Response struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+type GetFunctions_Response struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // functions is a mapping of function names to definitions.
+ Functions map[string]*Function `protobuf:"bytes,1,rep,name=functions,proto3" json:"functions,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
+ // diagnostics is any warnings or errors.
+ Diagnostics []*Diagnostic `protobuf:"bytes,2,rep,name=diagnostics,proto3" json:"diagnostics,omitempty"`
unknownFields protoimpl.UnknownFields
-
- Diagnostics []*Diagnostic `protobuf:"bytes,1,rep,name=diagnostics,proto3" json:"diagnostics,omitempty"`
+ sizeCache protoimpl.SizeCache
}
-func (x *ValidateResourceConfig_Response) Reset() {
- *x = ValidateResourceConfig_Response{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin6_proto_msgTypes[51]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+func (x *GetFunctions_Response) Reset() {
+ *x = GetFunctions_Response{}
+ mi := &file_tfplugin6_proto_msgTypes[91]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
-func (x *ValidateResourceConfig_Response) String() string {
+func (x *GetFunctions_Response) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*ValidateResourceConfig_Response) ProtoMessage() {}
+func (*GetFunctions_Response) ProtoMessage() {}
-func (x *ValidateResourceConfig_Response) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin6_proto_msgTypes[51]
- if protoimpl.UnsafeEnabled && x != nil {
+func (x *GetFunctions_Response) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin6_proto_msgTypes[91]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -2959,45 +5051,51 @@ func (x *ValidateResourceConfig_Response) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use ValidateResourceConfig_Response.ProtoReflect.Descriptor instead.
-func (*ValidateResourceConfig_Response) Descriptor() ([]byte, []int) {
- return file_tfplugin6_proto_rawDescGZIP(), []int{15, 1}
+// Deprecated: Use GetFunctions_Response.ProtoReflect.Descriptor instead.
+func (*GetFunctions_Response) Descriptor() ([]byte, []int) {
+ return file_tfplugin6_proto_rawDescGZIP(), []int{27, 1}
}
-func (x *ValidateResourceConfig_Response) GetDiagnostics() []*Diagnostic {
+func (x *GetFunctions_Response) GetFunctions() map[string]*Function {
+ if x != nil {
+ return x.Functions
+ }
+ return nil
+}
+
+func (x *GetFunctions_Response) GetDiagnostics() []*Diagnostic {
if x != nil {
return x.Diagnostics
}
return nil
}
-type ValidateDataResourceConfig_Request struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+type CallFunction_Request struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // name is the name of the function being called.
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ // arguments is the data of each function argument value.
+ Arguments []*DynamicValue `protobuf:"bytes,2,rep,name=arguments,proto3" json:"arguments,omitempty"`
unknownFields protoimpl.UnknownFields
-
- TypeName string `protobuf:"bytes,1,opt,name=type_name,json=typeName,proto3" json:"type_name,omitempty"`
- Config *DynamicValue `protobuf:"bytes,2,opt,name=config,proto3" json:"config,omitempty"`
+ sizeCache protoimpl.SizeCache
}
-func (x *ValidateDataResourceConfig_Request) Reset() {
- *x = ValidateDataResourceConfig_Request{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin6_proto_msgTypes[52]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+func (x *CallFunction_Request) Reset() {
+ *x = CallFunction_Request{}
+ mi := &file_tfplugin6_proto_msgTypes[93]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
-func (x *ValidateDataResourceConfig_Request) String() string {
+func (x *CallFunction_Request) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*ValidateDataResourceConfig_Request) ProtoMessage() {}
+func (*CallFunction_Request) ProtoMessage() {}
-func (x *ValidateDataResourceConfig_Request) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin6_proto_msgTypes[52]
- if protoimpl.UnsafeEnabled && x != nil {
+func (x *CallFunction_Request) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin6_proto_msgTypes[93]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -3007,51 +5105,51 @@ func (x *ValidateDataResourceConfig_Request) ProtoReflect() protoreflect.Message
return mi.MessageOf(x)
}
-// Deprecated: Use ValidateDataResourceConfig_Request.ProtoReflect.Descriptor instead.
-func (*ValidateDataResourceConfig_Request) Descriptor() ([]byte, []int) {
- return file_tfplugin6_proto_rawDescGZIP(), []int{16, 0}
+// Deprecated: Use CallFunction_Request.ProtoReflect.Descriptor instead.
+func (*CallFunction_Request) Descriptor() ([]byte, []int) {
+ return file_tfplugin6_proto_rawDescGZIP(), []int{28, 0}
}
-func (x *ValidateDataResourceConfig_Request) GetTypeName() string {
+func (x *CallFunction_Request) GetName() string {
if x != nil {
- return x.TypeName
+ return x.Name
}
return ""
}
-func (x *ValidateDataResourceConfig_Request) GetConfig() *DynamicValue {
+func (x *CallFunction_Request) GetArguments() []*DynamicValue {
if x != nil {
- return x.Config
+ return x.Arguments
}
return nil
}
-type ValidateDataResourceConfig_Response struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+type CallFunction_Response struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // result is result value after running the function logic.
+ Result *DynamicValue `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"`
+ // error is any error from the function logic.
+ Error *FunctionError `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
unknownFields protoimpl.UnknownFields
-
- Diagnostics []*Diagnostic `protobuf:"bytes,1,rep,name=diagnostics,proto3" json:"diagnostics,omitempty"`
+ sizeCache protoimpl.SizeCache
}
-func (x *ValidateDataResourceConfig_Response) Reset() {
- *x = ValidateDataResourceConfig_Response{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin6_proto_msgTypes[53]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+func (x *CallFunction_Response) Reset() {
+ *x = CallFunction_Response{}
+ mi := &file_tfplugin6_proto_msgTypes[94]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
-func (x *ValidateDataResourceConfig_Response) String() string {
+func (x *CallFunction_Response) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*ValidateDataResourceConfig_Response) ProtoMessage() {}
+func (*CallFunction_Response) ProtoMessage() {}
-func (x *ValidateDataResourceConfig_Response) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin6_proto_msgTypes[53]
- if protoimpl.UnsafeEnabled && x != nil {
+func (x *CallFunction_Response) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin6_proto_msgTypes[94]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -3061,46 +5159,49 @@ func (x *ValidateDataResourceConfig_Response) ProtoReflect() protoreflect.Messag
return mi.MessageOf(x)
}
-// Deprecated: Use ValidateDataResourceConfig_Response.ProtoReflect.Descriptor instead.
-func (*ValidateDataResourceConfig_Response) Descriptor() ([]byte, []int) {
- return file_tfplugin6_proto_rawDescGZIP(), []int{16, 1}
+// Deprecated: Use CallFunction_Response.ProtoReflect.Descriptor instead.
+func (*CallFunction_Response) Descriptor() ([]byte, []int) {
+ return file_tfplugin6_proto_rawDescGZIP(), []int{28, 1}
}
-func (x *ValidateDataResourceConfig_Response) GetDiagnostics() []*Diagnostic {
+func (x *CallFunction_Response) GetResult() *DynamicValue {
if x != nil {
- return x.Diagnostics
+ return x.Result
}
return nil
}
-type ConfigureProvider_Request struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
+func (x *CallFunction_Response) GetError() *FunctionError {
+ if x != nil {
+ return x.Error
+ }
+ return nil
+}
- TerraformVersion string `protobuf:"bytes,1,opt,name=terraform_version,json=terraformVersion,proto3" json:"terraform_version,omitempty"`
- Config *DynamicValue `protobuf:"bytes,2,opt,name=config,proto3" json:"config,omitempty"`
- ClientCapabilities *ClientCapabilities `protobuf:"bytes,3,opt,name=client_capabilities,json=clientCapabilities,proto3" json:"client_capabilities,omitempty"`
+type ValidateEphemeralResourceConfig_Request struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ TypeName string `protobuf:"bytes,1,opt,name=type_name,json=typeName,proto3" json:"type_name,omitempty"`
+ Config *DynamicValue `protobuf:"bytes,2,opt,name=config,proto3" json:"config,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
-func (x *ConfigureProvider_Request) Reset() {
- *x = ConfigureProvider_Request{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin6_proto_msgTypes[54]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+func (x *ValidateEphemeralResourceConfig_Request) Reset() {
+ *x = ValidateEphemeralResourceConfig_Request{}
+ mi := &file_tfplugin6_proto_msgTypes[95]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
-func (x *ConfigureProvider_Request) String() string {
+func (x *ValidateEphemeralResourceConfig_Request) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*ConfigureProvider_Request) ProtoMessage() {}
+func (*ValidateEphemeralResourceConfig_Request) ProtoMessage() {}
-func (x *ConfigureProvider_Request) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin6_proto_msgTypes[54]
- if protoimpl.UnsafeEnabled && x != nil {
+func (x *ValidateEphemeralResourceConfig_Request) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin6_proto_msgTypes[95]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -3110,58 +5211,48 @@ func (x *ConfigureProvider_Request) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use ConfigureProvider_Request.ProtoReflect.Descriptor instead.
-func (*ConfigureProvider_Request) Descriptor() ([]byte, []int) {
- return file_tfplugin6_proto_rawDescGZIP(), []int{17, 0}
+// Deprecated: Use ValidateEphemeralResourceConfig_Request.ProtoReflect.Descriptor instead.
+func (*ValidateEphemeralResourceConfig_Request) Descriptor() ([]byte, []int) {
+ return file_tfplugin6_proto_rawDescGZIP(), []int{29, 0}
}
-func (x *ConfigureProvider_Request) GetTerraformVersion() string {
+func (x *ValidateEphemeralResourceConfig_Request) GetTypeName() string {
if x != nil {
- return x.TerraformVersion
+ return x.TypeName
}
return ""
}
-func (x *ConfigureProvider_Request) GetConfig() *DynamicValue {
+func (x *ValidateEphemeralResourceConfig_Request) GetConfig() *DynamicValue {
if x != nil {
return x.Config
}
return nil
}
-func (x *ConfigureProvider_Request) GetClientCapabilities() *ClientCapabilities {
- if x != nil {
- return x.ClientCapabilities
- }
- return nil
-}
-
-type ConfigureProvider_Response struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+type ValidateEphemeralResourceConfig_Response struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Diagnostics []*Diagnostic `protobuf:"bytes,1,rep,name=diagnostics,proto3" json:"diagnostics,omitempty"`
unknownFields protoimpl.UnknownFields
-
- Diagnostics []*Diagnostic `protobuf:"bytes,1,rep,name=diagnostics,proto3" json:"diagnostics,omitempty"`
+ sizeCache protoimpl.SizeCache
}
-func (x *ConfigureProvider_Response) Reset() {
- *x = ConfigureProvider_Response{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin6_proto_msgTypes[55]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+func (x *ValidateEphemeralResourceConfig_Response) Reset() {
+ *x = ValidateEphemeralResourceConfig_Response{}
+ mi := &file_tfplugin6_proto_msgTypes[96]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
-func (x *ConfigureProvider_Response) String() string {
+func (x *ValidateEphemeralResourceConfig_Response) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*ConfigureProvider_Response) ProtoMessage() {}
+func (*ValidateEphemeralResourceConfig_Response) ProtoMessage() {}
-func (x *ConfigureProvider_Response) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin6_proto_msgTypes[55]
- if protoimpl.UnsafeEnabled && x != nil {
+func (x *ValidateEphemeralResourceConfig_Response) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin6_proto_msgTypes[96]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -3171,56 +5262,43 @@ func (x *ConfigureProvider_Response) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use ConfigureProvider_Response.ProtoReflect.Descriptor instead.
-func (*ConfigureProvider_Response) Descriptor() ([]byte, []int) {
- return file_tfplugin6_proto_rawDescGZIP(), []int{17, 1}
+// Deprecated: Use ValidateEphemeralResourceConfig_Response.ProtoReflect.Descriptor instead.
+func (*ValidateEphemeralResourceConfig_Response) Descriptor() ([]byte, []int) {
+ return file_tfplugin6_proto_rawDescGZIP(), []int{29, 1}
}
-func (x *ConfigureProvider_Response) GetDiagnostics() []*Diagnostic {
+func (x *ValidateEphemeralResourceConfig_Response) GetDiagnostics() []*Diagnostic {
if x != nil {
return x.Diagnostics
}
return nil
}
-// Request is the message that is sent to the provider during the
-// ReadResource RPC.
-//
-// This message intentionally does not include configuration data as any
-// configuration-based or configuration-conditional changes should occur
-// during the PlanResourceChange RPC. Additionally, the configuration is
-// not guaranteed to be wholly known nor match the given prior state, which
-// could lead to unexpected provider behaviors for practitioners.
-type ReadResource_Request struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- TypeName string `protobuf:"bytes,1,opt,name=type_name,json=typeName,proto3" json:"type_name,omitempty"`
- CurrentState *DynamicValue `protobuf:"bytes,2,opt,name=current_state,json=currentState,proto3" json:"current_state,omitempty"`
- Private []byte `protobuf:"bytes,3,opt,name=private,proto3" json:"private,omitempty"`
- ProviderMeta *DynamicValue `protobuf:"bytes,4,opt,name=provider_meta,json=providerMeta,proto3" json:"provider_meta,omitempty"`
- ClientCapabilities *ClientCapabilities `protobuf:"bytes,5,opt,name=client_capabilities,json=clientCapabilities,proto3" json:"client_capabilities,omitempty"`
+type OpenEphemeralResource_Request struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ TypeName string `protobuf:"bytes,1,opt,name=type_name,json=typeName,proto3" json:"type_name,omitempty"`
+ Config *DynamicValue `protobuf:"bytes,2,opt,name=config,proto3" json:"config,omitempty"`
+ ClientCapabilities *ClientCapabilities `protobuf:"bytes,3,opt,name=client_capabilities,json=clientCapabilities,proto3" json:"client_capabilities,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
-func (x *ReadResource_Request) Reset() {
- *x = ReadResource_Request{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin6_proto_msgTypes[56]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+func (x *OpenEphemeralResource_Request) Reset() {
+ *x = OpenEphemeralResource_Request{}
+ mi := &file_tfplugin6_proto_msgTypes[97]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
-func (x *ReadResource_Request) String() string {
+func (x *OpenEphemeralResource_Request) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*ReadResource_Request) ProtoMessage() {}
+func (*OpenEphemeralResource_Request) ProtoMessage() {}
-func (x *ReadResource_Request) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin6_proto_msgTypes[56]
- if protoimpl.UnsafeEnabled && x != nil {
+func (x *OpenEphemeralResource_Request) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin6_proto_msgTypes[97]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -3230,77 +5308,61 @@ func (x *ReadResource_Request) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use ReadResource_Request.ProtoReflect.Descriptor instead.
-func (*ReadResource_Request) Descriptor() ([]byte, []int) {
- return file_tfplugin6_proto_rawDescGZIP(), []int{18, 0}
+// Deprecated: Use OpenEphemeralResource_Request.ProtoReflect.Descriptor instead.
+func (*OpenEphemeralResource_Request) Descriptor() ([]byte, []int) {
+ return file_tfplugin6_proto_rawDescGZIP(), []int{30, 0}
}
-func (x *ReadResource_Request) GetTypeName() string {
+func (x *OpenEphemeralResource_Request) GetTypeName() string {
if x != nil {
return x.TypeName
}
return ""
}
-func (x *ReadResource_Request) GetCurrentState() *DynamicValue {
- if x != nil {
- return x.CurrentState
- }
- return nil
-}
-
-func (x *ReadResource_Request) GetPrivate() []byte {
- if x != nil {
- return x.Private
- }
- return nil
-}
-
-func (x *ReadResource_Request) GetProviderMeta() *DynamicValue {
+func (x *OpenEphemeralResource_Request) GetConfig() *DynamicValue {
if x != nil {
- return x.ProviderMeta
+ return x.Config
}
return nil
}
-func (x *ReadResource_Request) GetClientCapabilities() *ClientCapabilities {
+func (x *OpenEphemeralResource_Request) GetClientCapabilities() *ClientCapabilities {
if x != nil {
return x.ClientCapabilities
}
return nil
}
-type ReadResource_Response struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- NewState *DynamicValue `protobuf:"bytes,1,opt,name=new_state,json=newState,proto3" json:"new_state,omitempty"`
- Diagnostics []*Diagnostic `protobuf:"bytes,2,rep,name=diagnostics,proto3" json:"diagnostics,omitempty"`
- Private []byte `protobuf:"bytes,3,opt,name=private,proto3" json:"private,omitempty"`
+type OpenEphemeralResource_Response struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Diagnostics []*Diagnostic `protobuf:"bytes,1,rep,name=diagnostics,proto3" json:"diagnostics,omitempty"`
+ RenewAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=renew_at,json=renewAt,proto3,oneof" json:"renew_at,omitempty"`
+ Result *DynamicValue `protobuf:"bytes,3,opt,name=result,proto3" json:"result,omitempty"`
+ Private []byte `protobuf:"bytes,4,opt,name=private,proto3,oneof" json:"private,omitempty"`
// deferred is set if the provider is deferring the change. If set the caller
// needs to handle the deferral.
- Deferred *Deferred `protobuf:"bytes,4,opt,name=deferred,proto3" json:"deferred,omitempty"`
+ Deferred *Deferred `protobuf:"bytes,5,opt,name=deferred,proto3" json:"deferred,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
-func (x *ReadResource_Response) Reset() {
- *x = ReadResource_Response{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin6_proto_msgTypes[57]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+func (x *OpenEphemeralResource_Response) Reset() {
+ *x = OpenEphemeralResource_Response{}
+ mi := &file_tfplugin6_proto_msgTypes[98]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
-func (x *ReadResource_Response) String() string {
+func (x *OpenEphemeralResource_Response) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*ReadResource_Response) ProtoMessage() {}
+func (*OpenEphemeralResource_Response) ProtoMessage() {}
-func (x *ReadResource_Response) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin6_proto_msgTypes[57]
- if protoimpl.UnsafeEnabled && x != nil {
+func (x *OpenEphemeralResource_Response) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin6_proto_msgTypes[98]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -3310,71 +5372,70 @@ func (x *ReadResource_Response) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use ReadResource_Response.ProtoReflect.Descriptor instead.
-func (*ReadResource_Response) Descriptor() ([]byte, []int) {
- return file_tfplugin6_proto_rawDescGZIP(), []int{18, 1}
+// Deprecated: Use OpenEphemeralResource_Response.ProtoReflect.Descriptor instead.
+func (*OpenEphemeralResource_Response) Descriptor() ([]byte, []int) {
+ return file_tfplugin6_proto_rawDescGZIP(), []int{30, 1}
}
-func (x *ReadResource_Response) GetNewState() *DynamicValue {
+func (x *OpenEphemeralResource_Response) GetDiagnostics() []*Diagnostic {
if x != nil {
- return x.NewState
+ return x.Diagnostics
}
return nil
}
-func (x *ReadResource_Response) GetDiagnostics() []*Diagnostic {
+func (x *OpenEphemeralResource_Response) GetRenewAt() *timestamppb.Timestamp {
if x != nil {
- return x.Diagnostics
+ return x.RenewAt
}
return nil
}
-func (x *ReadResource_Response) GetPrivate() []byte {
+func (x *OpenEphemeralResource_Response) GetResult() *DynamicValue {
+ if x != nil {
+ return x.Result
+ }
+ return nil
+}
+
+func (x *OpenEphemeralResource_Response) GetPrivate() []byte {
if x != nil {
return x.Private
}
return nil
}
-func (x *ReadResource_Response) GetDeferred() *Deferred {
+func (x *OpenEphemeralResource_Response) GetDeferred() *Deferred {
if x != nil {
return x.Deferred
}
return nil
}
-type PlanResourceChange_Request struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+type RenewEphemeralResource_Request struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ TypeName string `protobuf:"bytes,1,opt,name=type_name,json=typeName,proto3" json:"type_name,omitempty"`
+ Private []byte `protobuf:"bytes,2,opt,name=private,proto3,oneof" json:"private,omitempty"`
unknownFields protoimpl.UnknownFields
-
- TypeName string `protobuf:"bytes,1,opt,name=type_name,json=typeName,proto3" json:"type_name,omitempty"`
- PriorState *DynamicValue `protobuf:"bytes,2,opt,name=prior_state,json=priorState,proto3" json:"prior_state,omitempty"`
- ProposedNewState *DynamicValue `protobuf:"bytes,3,opt,name=proposed_new_state,json=proposedNewState,proto3" json:"proposed_new_state,omitempty"`
- Config *DynamicValue `protobuf:"bytes,4,opt,name=config,proto3" json:"config,omitempty"`
- PriorPrivate []byte `protobuf:"bytes,5,opt,name=prior_private,json=priorPrivate,proto3" json:"prior_private,omitempty"`
- ProviderMeta *DynamicValue `protobuf:"bytes,6,opt,name=provider_meta,json=providerMeta,proto3" json:"provider_meta,omitempty"`
- ClientCapabilities *ClientCapabilities `protobuf:"bytes,7,opt,name=client_capabilities,json=clientCapabilities,proto3" json:"client_capabilities,omitempty"`
+ sizeCache protoimpl.SizeCache
}
-func (x *PlanResourceChange_Request) Reset() {
- *x = PlanResourceChange_Request{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin6_proto_msgTypes[58]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+func (x *RenewEphemeralResource_Request) Reset() {
+ *x = RenewEphemeralResource_Request{}
+ mi := &file_tfplugin6_proto_msgTypes[99]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
-func (x *PlanResourceChange_Request) String() string {
+func (x *RenewEphemeralResource_Request) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*PlanResourceChange_Request) ProtoMessage() {}
+func (*RenewEphemeralResource_Request) ProtoMessage() {}
-func (x *PlanResourceChange_Request) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin6_proto_msgTypes[58]
- if protoimpl.UnsafeEnabled && x != nil {
+func (x *RenewEphemeralResource_Request) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin6_proto_msgTypes[99]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -3384,104 +5445,109 @@ func (x *PlanResourceChange_Request) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use PlanResourceChange_Request.ProtoReflect.Descriptor instead.
-func (*PlanResourceChange_Request) Descriptor() ([]byte, []int) {
- return file_tfplugin6_proto_rawDescGZIP(), []int{19, 0}
+// Deprecated: Use RenewEphemeralResource_Request.ProtoReflect.Descriptor instead.
+func (*RenewEphemeralResource_Request) Descriptor() ([]byte, []int) {
+ return file_tfplugin6_proto_rawDescGZIP(), []int{31, 0}
}
-func (x *PlanResourceChange_Request) GetTypeName() string {
+func (x *RenewEphemeralResource_Request) GetTypeName() string {
if x != nil {
return x.TypeName
}
return ""
}
-func (x *PlanResourceChange_Request) GetPriorState() *DynamicValue {
+func (x *RenewEphemeralResource_Request) GetPrivate() []byte {
if x != nil {
- return x.PriorState
+ return x.Private
}
return nil
}
-func (x *PlanResourceChange_Request) GetProposedNewState() *DynamicValue {
- if x != nil {
- return x.ProposedNewState
- }
- return nil
+type RenewEphemeralResource_Response struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Diagnostics []*Diagnostic `protobuf:"bytes,1,rep,name=diagnostics,proto3" json:"diagnostics,omitempty"`
+ RenewAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=renew_at,json=renewAt,proto3,oneof" json:"renew_at,omitempty"`
+ Private []byte `protobuf:"bytes,3,opt,name=private,proto3,oneof" json:"private,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
-func (x *PlanResourceChange_Request) GetConfig() *DynamicValue {
+func (x *RenewEphemeralResource_Response) Reset() {
+ *x = RenewEphemeralResource_Response{}
+ mi := &file_tfplugin6_proto_msgTypes[100]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *RenewEphemeralResource_Response) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*RenewEphemeralResource_Response) ProtoMessage() {}
+
+func (x *RenewEphemeralResource_Response) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin6_proto_msgTypes[100]
if x != nil {
- return x.Config
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
}
- return nil
+ return mi.MessageOf(x)
}
-func (x *PlanResourceChange_Request) GetPriorPrivate() []byte {
+// Deprecated: Use RenewEphemeralResource_Response.ProtoReflect.Descriptor instead.
+func (*RenewEphemeralResource_Response) Descriptor() ([]byte, []int) {
+ return file_tfplugin6_proto_rawDescGZIP(), []int{31, 1}
+}
+
+func (x *RenewEphemeralResource_Response) GetDiagnostics() []*Diagnostic {
if x != nil {
- return x.PriorPrivate
+ return x.Diagnostics
}
return nil
}
-func (x *PlanResourceChange_Request) GetProviderMeta() *DynamicValue {
+func (x *RenewEphemeralResource_Response) GetRenewAt() *timestamppb.Timestamp {
if x != nil {
- return x.ProviderMeta
+ return x.RenewAt
}
return nil
}
-func (x *PlanResourceChange_Request) GetClientCapabilities() *ClientCapabilities {
+func (x *RenewEphemeralResource_Response) GetPrivate() []byte {
if x != nil {
- return x.ClientCapabilities
+ return x.Private
}
return nil
}
-type PlanResourceChange_Response struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+type CloseEphemeralResource_Request struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ TypeName string `protobuf:"bytes,1,opt,name=type_name,json=typeName,proto3" json:"type_name,omitempty"`
+ Private []byte `protobuf:"bytes,2,opt,name=private,proto3,oneof" json:"private,omitempty"`
unknownFields protoimpl.UnknownFields
-
- PlannedState *DynamicValue `protobuf:"bytes,1,opt,name=planned_state,json=plannedState,proto3" json:"planned_state,omitempty"`
- RequiresReplace []*AttributePath `protobuf:"bytes,2,rep,name=requires_replace,json=requiresReplace,proto3" json:"requires_replace,omitempty"`
- PlannedPrivate []byte `protobuf:"bytes,3,opt,name=planned_private,json=plannedPrivate,proto3" json:"planned_private,omitempty"`
- Diagnostics []*Diagnostic `protobuf:"bytes,4,rep,name=diagnostics,proto3" json:"diagnostics,omitempty"`
- // This may be set only by the helper/schema "SDK" in the main Terraform
- // repository, to request that Terraform Core >=0.12 permit additional
- // inconsistencies that can result from the legacy SDK type system
- // and its imprecise mapping to the >=0.12 type system.
- // The change in behavior implied by this flag makes sense only for the
- // specific details of the legacy SDK type system, and are not a general
- // mechanism to avoid proper type handling in providers.
- //
- // ==== DO NOT USE THIS ====
- // ==== THIS MUST BE LEFT UNSET IN ALL OTHER SDKS ====
- // ==== DO NOT USE THIS ====
- LegacyTypeSystem bool `protobuf:"varint,5,opt,name=legacy_type_system,json=legacyTypeSystem,proto3" json:"legacy_type_system,omitempty"`
- // deferred is set if the provider is deferring the change. If set the caller
- // needs to handle the deferral.
- Deferred *Deferred `protobuf:"bytes,6,opt,name=deferred,proto3" json:"deferred,omitempty"`
+ sizeCache protoimpl.SizeCache
}
-func (x *PlanResourceChange_Response) Reset() {
- *x = PlanResourceChange_Response{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin6_proto_msgTypes[59]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+func (x *CloseEphemeralResource_Request) Reset() {
+ *x = CloseEphemeralResource_Request{}
+ mi := &file_tfplugin6_proto_msgTypes[101]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
-func (x *PlanResourceChange_Response) String() string {
+func (x *CloseEphemeralResource_Request) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*PlanResourceChange_Response) ProtoMessage() {}
+func (*CloseEphemeralResource_Request) ProtoMessage() {}
-func (x *PlanResourceChange_Response) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin6_proto_msgTypes[59]
- if protoimpl.UnsafeEnabled && x != nil {
+func (x *CloseEphemeralResource_Request) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin6_proto_msgTypes[101]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -3491,84 +5557,91 @@ func (x *PlanResourceChange_Response) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use PlanResourceChange_Response.ProtoReflect.Descriptor instead.
-func (*PlanResourceChange_Response) Descriptor() ([]byte, []int) {
- return file_tfplugin6_proto_rawDescGZIP(), []int{19, 1}
+// Deprecated: Use CloseEphemeralResource_Request.ProtoReflect.Descriptor instead.
+func (*CloseEphemeralResource_Request) Descriptor() ([]byte, []int) {
+ return file_tfplugin6_proto_rawDescGZIP(), []int{32, 0}
}
-func (x *PlanResourceChange_Response) GetPlannedState() *DynamicValue {
+func (x *CloseEphemeralResource_Request) GetTypeName() string {
if x != nil {
- return x.PlannedState
+ return x.TypeName
}
- return nil
+ return ""
}
-func (x *PlanResourceChange_Response) GetRequiresReplace() []*AttributePath {
+func (x *CloseEphemeralResource_Request) GetPrivate() []byte {
if x != nil {
- return x.RequiresReplace
+ return x.Private
}
return nil
}
-func (x *PlanResourceChange_Response) GetPlannedPrivate() []byte {
- if x != nil {
- return x.PlannedPrivate
- }
- return nil
+type CloseEphemeralResource_Response struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Diagnostics []*Diagnostic `protobuf:"bytes,1,rep,name=diagnostics,proto3" json:"diagnostics,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
-func (x *PlanResourceChange_Response) GetDiagnostics() []*Diagnostic {
- if x != nil {
- return x.Diagnostics
- }
- return nil
+func (x *CloseEphemeralResource_Response) Reset() {
+ *x = CloseEphemeralResource_Response{}
+ mi := &file_tfplugin6_proto_msgTypes[102]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
-func (x *PlanResourceChange_Response) GetLegacyTypeSystem() bool {
+func (x *CloseEphemeralResource_Response) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CloseEphemeralResource_Response) ProtoMessage() {}
+
+func (x *CloseEphemeralResource_Response) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin6_proto_msgTypes[102]
if x != nil {
- return x.LegacyTypeSystem
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
}
- return false
+ return mi.MessageOf(x)
}
-func (x *PlanResourceChange_Response) GetDeferred() *Deferred {
+// Deprecated: Use CloseEphemeralResource_Response.ProtoReflect.Descriptor instead.
+func (*CloseEphemeralResource_Response) Descriptor() ([]byte, []int) {
+ return file_tfplugin6_proto_rawDescGZIP(), []int{32, 1}
+}
+
+func (x *CloseEphemeralResource_Response) GetDiagnostics() []*Diagnostic {
if x != nil {
- return x.Deferred
+ return x.Diagnostics
}
return nil
}
-type ApplyResourceChange_Request struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+type GetResourceIdentitySchemas_Request struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
unknownFields protoimpl.UnknownFields
-
- TypeName string `protobuf:"bytes,1,opt,name=type_name,json=typeName,proto3" json:"type_name,omitempty"`
- PriorState *DynamicValue `protobuf:"bytes,2,opt,name=prior_state,json=priorState,proto3" json:"prior_state,omitempty"`
- PlannedState *DynamicValue `protobuf:"bytes,3,opt,name=planned_state,json=plannedState,proto3" json:"planned_state,omitempty"`
- Config *DynamicValue `protobuf:"bytes,4,opt,name=config,proto3" json:"config,omitempty"`
- PlannedPrivate []byte `protobuf:"bytes,5,opt,name=planned_private,json=plannedPrivate,proto3" json:"planned_private,omitempty"`
- ProviderMeta *DynamicValue `protobuf:"bytes,6,opt,name=provider_meta,json=providerMeta,proto3" json:"provider_meta,omitempty"`
+ sizeCache protoimpl.SizeCache
}
-func (x *ApplyResourceChange_Request) Reset() {
- *x = ApplyResourceChange_Request{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin6_proto_msgTypes[60]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+func (x *GetResourceIdentitySchemas_Request) Reset() {
+ *x = GetResourceIdentitySchemas_Request{}
+ mi := &file_tfplugin6_proto_msgTypes[103]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
-func (x *ApplyResourceChange_Request) String() string {
+func (x *GetResourceIdentitySchemas_Request) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*ApplyResourceChange_Request) ProtoMessage() {}
+func (*GetResourceIdentitySchemas_Request) ProtoMessage() {}
-func (x *ApplyResourceChange_Request) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin6_proto_msgTypes[60]
- if protoimpl.UnsafeEnabled && x != nil {
+func (x *GetResourceIdentitySchemas_Request) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin6_proto_msgTypes[103]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -3578,93 +5651,96 @@ func (x *ApplyResourceChange_Request) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use ApplyResourceChange_Request.ProtoReflect.Descriptor instead.
-func (*ApplyResourceChange_Request) Descriptor() ([]byte, []int) {
- return file_tfplugin6_proto_rawDescGZIP(), []int{20, 0}
+// Deprecated: Use GetResourceIdentitySchemas_Request.ProtoReflect.Descriptor instead.
+func (*GetResourceIdentitySchemas_Request) Descriptor() ([]byte, []int) {
+ return file_tfplugin6_proto_rawDescGZIP(), []int{33, 0}
}
-func (x *ApplyResourceChange_Request) GetTypeName() string {
- if x != nil {
- return x.TypeName
- }
- return ""
+type GetResourceIdentitySchemas_Response struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // identity_schemas is a mapping of resource type names to their identity schemas.
+ IdentitySchemas map[string]*ResourceIdentitySchema `protobuf:"bytes,1,rep,name=identity_schemas,json=identitySchemas,proto3" json:"identity_schemas,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
+ // diagnostics is the collection of warning and error diagnostics for this request.
+ Diagnostics []*Diagnostic `protobuf:"bytes,2,rep,name=diagnostics,proto3" json:"diagnostics,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
-func (x *ApplyResourceChange_Request) GetPriorState() *DynamicValue {
- if x != nil {
- return x.PriorState
- }
- return nil
+func (x *GetResourceIdentitySchemas_Response) Reset() {
+ *x = GetResourceIdentitySchemas_Response{}
+ mi := &file_tfplugin6_proto_msgTypes[104]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
-func (x *ApplyResourceChange_Request) GetPlannedState() *DynamicValue {
- if x != nil {
- return x.PlannedState
- }
- return nil
+func (x *GetResourceIdentitySchemas_Response) String() string {
+ return protoimpl.X.MessageStringOf(x)
}
-func (x *ApplyResourceChange_Request) GetConfig() *DynamicValue {
+func (*GetResourceIdentitySchemas_Response) ProtoMessage() {}
+
+func (x *GetResourceIdentitySchemas_Response) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin6_proto_msgTypes[104]
if x != nil {
- return x.Config
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
}
- return nil
+ return mi.MessageOf(x)
}
-func (x *ApplyResourceChange_Request) GetPlannedPrivate() []byte {
+// Deprecated: Use GetResourceIdentitySchemas_Response.ProtoReflect.Descriptor instead.
+func (*GetResourceIdentitySchemas_Response) Descriptor() ([]byte, []int) {
+ return file_tfplugin6_proto_rawDescGZIP(), []int{33, 1}
+}
+
+func (x *GetResourceIdentitySchemas_Response) GetIdentitySchemas() map[string]*ResourceIdentitySchema {
if x != nil {
- return x.PlannedPrivate
+ return x.IdentitySchemas
}
return nil
}
-func (x *ApplyResourceChange_Request) GetProviderMeta() *DynamicValue {
+func (x *GetResourceIdentitySchemas_Response) GetDiagnostics() []*Diagnostic {
if x != nil {
- return x.ProviderMeta
+ return x.Diagnostics
}
return nil
}
-type ApplyResourceChange_Response struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+type UpgradeResourceIdentity_Request struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // type_name is the managed resource type name
+ TypeName string `protobuf:"bytes,1,opt,name=type_name,json=typeName,proto3" json:"type_name,omitempty"`
+ // version is the version of the resource identity data to upgrade
+ Version int64 `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"`
+ // raw_identity is the raw identity as stored for the resource. Core does
+ // not have access to the identity schema of prior_version, so it's the
+ // provider's responsibility to interpret this value using the
+ // appropriate older schema. The raw_identity will be json encoded.
+ RawIdentity *RawState `protobuf:"bytes,3,opt,name=raw_identity,json=rawIdentity,proto3" json:"raw_identity,omitempty"`
unknownFields protoimpl.UnknownFields
-
- NewState *DynamicValue `protobuf:"bytes,1,opt,name=new_state,json=newState,proto3" json:"new_state,omitempty"`
- Private []byte `protobuf:"bytes,2,opt,name=private,proto3" json:"private,omitempty"`
- Diagnostics []*Diagnostic `protobuf:"bytes,3,rep,name=diagnostics,proto3" json:"diagnostics,omitempty"`
- // This may be set only by the helper/schema "SDK" in the main Terraform
- // repository, to request that Terraform Core >=0.12 permit additional
- // inconsistencies that can result from the legacy SDK type system
- // and its imprecise mapping to the >=0.12 type system.
- // The change in behavior implied by this flag makes sense only for the
- // specific details of the legacy SDK type system, and are not a general
- // mechanism to avoid proper type handling in providers.
- //
- // ==== DO NOT USE THIS ====
- // ==== THIS MUST BE LEFT UNSET IN ALL OTHER SDKS ====
- // ==== DO NOT USE THIS ====
- LegacyTypeSystem bool `protobuf:"varint,4,opt,name=legacy_type_system,json=legacyTypeSystem,proto3" json:"legacy_type_system,omitempty"`
+ sizeCache protoimpl.SizeCache
}
-func (x *ApplyResourceChange_Response) Reset() {
- *x = ApplyResourceChange_Response{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin6_proto_msgTypes[61]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+func (x *UpgradeResourceIdentity_Request) Reset() {
+ *x = UpgradeResourceIdentity_Request{}
+ mi := &file_tfplugin6_proto_msgTypes[106]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
-func (x *ApplyResourceChange_Response) String() string {
+func (x *UpgradeResourceIdentity_Request) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*ApplyResourceChange_Response) ProtoMessage() {}
+func (*UpgradeResourceIdentity_Request) ProtoMessage() {}
-func (x *ApplyResourceChange_Response) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin6_proto_msgTypes[61]
- if protoimpl.UnsafeEnabled && x != nil {
+func (x *UpgradeResourceIdentity_Request) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin6_proto_msgTypes[106]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -3674,67 +5750,58 @@ func (x *ApplyResourceChange_Response) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use ApplyResourceChange_Response.ProtoReflect.Descriptor instead.
-func (*ApplyResourceChange_Response) Descriptor() ([]byte, []int) {
- return file_tfplugin6_proto_rawDescGZIP(), []int{20, 1}
+// Deprecated: Use UpgradeResourceIdentity_Request.ProtoReflect.Descriptor instead.
+func (*UpgradeResourceIdentity_Request) Descriptor() ([]byte, []int) {
+ return file_tfplugin6_proto_rawDescGZIP(), []int{34, 0}
}
-func (x *ApplyResourceChange_Response) GetNewState() *DynamicValue {
+func (x *UpgradeResourceIdentity_Request) GetTypeName() string {
if x != nil {
- return x.NewState
+ return x.TypeName
}
- return nil
+ return ""
}
-func (x *ApplyResourceChange_Response) GetPrivate() []byte {
+func (x *UpgradeResourceIdentity_Request) GetVersion() int64 {
if x != nil {
- return x.Private
+ return x.Version
}
- return nil
+ return 0
}
-func (x *ApplyResourceChange_Response) GetDiagnostics() []*Diagnostic {
+func (x *UpgradeResourceIdentity_Request) GetRawIdentity() *RawState {
if x != nil {
- return x.Diagnostics
+ return x.RawIdentity
}
return nil
}
-func (x *ApplyResourceChange_Response) GetLegacyTypeSystem() bool {
- if x != nil {
- return x.LegacyTypeSystem
- }
- return false
-}
-
-type ImportResourceState_Request struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+type UpgradeResourceIdentity_Response struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // upgraded_identity returns the upgraded resource identity data
+ UpgradedIdentity *ResourceIdentityData `protobuf:"bytes,1,opt,name=upgraded_identity,json=upgradedIdentity,proto3" json:"upgraded_identity,omitempty"`
+ // diagnostics is the collection of warning and error diagnostics for this request
+ Diagnostics []*Diagnostic `protobuf:"bytes,2,rep,name=diagnostics,proto3" json:"diagnostics,omitempty"`
unknownFields protoimpl.UnknownFields
-
- TypeName string `protobuf:"bytes,1,opt,name=type_name,json=typeName,proto3" json:"type_name,omitempty"`
- Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
- ClientCapabilities *ClientCapabilities `protobuf:"bytes,3,opt,name=client_capabilities,json=clientCapabilities,proto3" json:"client_capabilities,omitempty"`
+ sizeCache protoimpl.SizeCache
}
-func (x *ImportResourceState_Request) Reset() {
- *x = ImportResourceState_Request{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin6_proto_msgTypes[62]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+func (x *UpgradeResourceIdentity_Response) Reset() {
+ *x = UpgradeResourceIdentity_Response{}
+ mi := &file_tfplugin6_proto_msgTypes[107]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
-func (x *ImportResourceState_Request) String() string {
+func (x *UpgradeResourceIdentity_Response) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*ImportResourceState_Request) ProtoMessage() {}
+func (*UpgradeResourceIdentity_Response) ProtoMessage() {}
-func (x *ImportResourceState_Request) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin6_proto_msgTypes[62]
- if protoimpl.UnsafeEnabled && x != nil {
+func (x *UpgradeResourceIdentity_Response) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin6_proto_msgTypes[107]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -3744,60 +5811,57 @@ func (x *ImportResourceState_Request) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use ImportResourceState_Request.ProtoReflect.Descriptor instead.
-func (*ImportResourceState_Request) Descriptor() ([]byte, []int) {
- return file_tfplugin6_proto_rawDescGZIP(), []int{21, 0}
-}
-
-func (x *ImportResourceState_Request) GetTypeName() string {
- if x != nil {
- return x.TypeName
- }
- return ""
+// Deprecated: Use UpgradeResourceIdentity_Response.ProtoReflect.Descriptor instead.
+func (*UpgradeResourceIdentity_Response) Descriptor() ([]byte, []int) {
+ return file_tfplugin6_proto_rawDescGZIP(), []int{34, 1}
}
-func (x *ImportResourceState_Request) GetId() string {
+func (x *UpgradeResourceIdentity_Response) GetUpgradedIdentity() *ResourceIdentityData {
if x != nil {
- return x.Id
+ return x.UpgradedIdentity
}
- return ""
+ return nil
}
-func (x *ImportResourceState_Request) GetClientCapabilities() *ClientCapabilities {
+func (x *UpgradeResourceIdentity_Response) GetDiagnostics() []*Diagnostic {
if x != nil {
- return x.ClientCapabilities
+ return x.Diagnostics
}
return nil
}
-type ImportResourceState_ImportedResource struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+type ListResource_Request struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // type_name is the list resource type name.
+ TypeName string `protobuf:"bytes,1,opt,name=type_name,json=typeName,proto3" json:"type_name,omitempty"`
+ // configuration is the list ConfigSchema-based configuration data.
+ Config *DynamicValue `protobuf:"bytes,2,opt,name=config,proto3" json:"config,omitempty"`
+ // when include_resource_object is set to true, the provider should
+ // include the full resource object for each result
+ IncludeResourceObject bool `protobuf:"varint,3,opt,name=include_resource_object,json=includeResourceObject,proto3" json:"include_resource_object,omitempty"`
+ // The maximum number of results that Terraform is expecting.
+ // The stream will stop, once this limit is reached.
+ Limit int64 `protobuf:"varint,4,opt,name=limit,proto3" json:"limit,omitempty"`
unknownFields protoimpl.UnknownFields
-
- TypeName string `protobuf:"bytes,1,opt,name=type_name,json=typeName,proto3" json:"type_name,omitempty"`
- State *DynamicValue `protobuf:"bytes,2,opt,name=state,proto3" json:"state,omitempty"`
- Private []byte `protobuf:"bytes,3,opt,name=private,proto3" json:"private,omitempty"`
+ sizeCache protoimpl.SizeCache
}
-func (x *ImportResourceState_ImportedResource) Reset() {
- *x = ImportResourceState_ImportedResource{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin6_proto_msgTypes[63]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+func (x *ListResource_Request) Reset() {
+ *x = ListResource_Request{}
+ mi := &file_tfplugin6_proto_msgTypes[108]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
-func (x *ImportResourceState_ImportedResource) String() string {
+func (x *ListResource_Request) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*ImportResourceState_ImportedResource) ProtoMessage() {}
+func (*ListResource_Request) ProtoMessage() {}
-func (x *ImportResourceState_ImportedResource) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin6_proto_msgTypes[63]
- if protoimpl.UnsafeEnabled && x != nil {
+func (x *ListResource_Request) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin6_proto_msgTypes[108]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -3807,62 +5871,69 @@ func (x *ImportResourceState_ImportedResource) ProtoReflect() protoreflect.Messa
return mi.MessageOf(x)
}
-// Deprecated: Use ImportResourceState_ImportedResource.ProtoReflect.Descriptor instead.
-func (*ImportResourceState_ImportedResource) Descriptor() ([]byte, []int) {
- return file_tfplugin6_proto_rawDescGZIP(), []int{21, 1}
+// Deprecated: Use ListResource_Request.ProtoReflect.Descriptor instead.
+func (*ListResource_Request) Descriptor() ([]byte, []int) {
+ return file_tfplugin6_proto_rawDescGZIP(), []int{35, 0}
}
-func (x *ImportResourceState_ImportedResource) GetTypeName() string {
+func (x *ListResource_Request) GetTypeName() string {
if x != nil {
return x.TypeName
}
return ""
}
-func (x *ImportResourceState_ImportedResource) GetState() *DynamicValue {
+func (x *ListResource_Request) GetConfig() *DynamicValue {
if x != nil {
- return x.State
+ return x.Config
}
return nil
}
-func (x *ImportResourceState_ImportedResource) GetPrivate() []byte {
+func (x *ListResource_Request) GetIncludeResourceObject() bool {
if x != nil {
- return x.Private
+ return x.IncludeResourceObject
}
- return nil
+ return false
}
-type ImportResourceState_Response struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
+func (x *ListResource_Request) GetLimit() int64 {
+ if x != nil {
+ return x.Limit
+ }
+ return 0
+}
- ImportedResources []*ImportResourceState_ImportedResource `protobuf:"bytes,1,rep,name=imported_resources,json=importedResources,proto3" json:"imported_resources,omitempty"`
- Diagnostics []*Diagnostic `protobuf:"bytes,2,rep,name=diagnostics,proto3" json:"diagnostics,omitempty"`
- // deferred is set if the provider is deferring the change. If set the caller
- // needs to handle the deferral.
- Deferred *Deferred `protobuf:"bytes,3,opt,name=deferred,proto3" json:"deferred,omitempty"`
+type ListResource_Event struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // identity is the resource identity data of the resource instance.
+ Identity *ResourceIdentityData `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"`
+ // display_name can be displayed in a UI to make it easier for humans to identify a resource
+ DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
+ // optional resource object which can be useful when combining list blocks in configuration
+ ResourceObject *DynamicValue `protobuf:"bytes,3,opt,name=resource_object,json=resourceObject,proto3,oneof" json:"resource_object,omitempty"`
+ // A warning or error diagnostics for this event
+ Diagnostic []*Diagnostic `protobuf:"bytes,4,rep,name=diagnostic,proto3" json:"diagnostic,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
-func (x *ImportResourceState_Response) Reset() {
- *x = ImportResourceState_Response{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin6_proto_msgTypes[64]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+func (x *ListResource_Event) Reset() {
+ *x = ListResource_Event{}
+ mi := &file_tfplugin6_proto_msgTypes[109]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
-func (x *ImportResourceState_Response) String() string {
+func (x *ListResource_Event) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*ImportResourceState_Response) ProtoMessage() {}
+func (*ListResource_Event) ProtoMessage() {}
-func (x *ImportResourceState_Response) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin6_proto_msgTypes[64]
- if protoimpl.UnsafeEnabled && x != nil {
+func (x *ListResource_Event) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin6_proto_msgTypes[109]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -3872,72 +5943,65 @@ func (x *ImportResourceState_Response) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use ImportResourceState_Response.ProtoReflect.Descriptor instead.
-func (*ImportResourceState_Response) Descriptor() ([]byte, []int) {
- return file_tfplugin6_proto_rawDescGZIP(), []int{21, 2}
+// Deprecated: Use ListResource_Event.ProtoReflect.Descriptor instead.
+func (*ListResource_Event) Descriptor() ([]byte, []int) {
+ return file_tfplugin6_proto_rawDescGZIP(), []int{35, 1}
}
-func (x *ImportResourceState_Response) GetImportedResources() []*ImportResourceState_ImportedResource {
+func (x *ListResource_Event) GetIdentity() *ResourceIdentityData {
if x != nil {
- return x.ImportedResources
+ return x.Identity
}
return nil
}
-func (x *ImportResourceState_Response) GetDiagnostics() []*Diagnostic {
+func (x *ListResource_Event) GetDisplayName() string {
if x != nil {
- return x.Diagnostics
+ return x.DisplayName
}
- return nil
+ return ""
}
-func (x *ImportResourceState_Response) GetDeferred() *Deferred {
+func (x *ListResource_Event) GetResourceObject() *DynamicValue {
if x != nil {
- return x.Deferred
+ return x.ResourceObject
}
return nil
}
-type MoveResourceState_Request struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
+func (x *ListResource_Event) GetDiagnostic() []*Diagnostic {
+ if x != nil {
+ return x.Diagnostic
+ }
+ return nil
+}
- // The address of the provider the resource is being moved from.
- SourceProviderAddress string `protobuf:"bytes,1,opt,name=source_provider_address,json=sourceProviderAddress,proto3" json:"source_provider_address,omitempty"`
- // The resource type that the resource is being moved from.
- SourceTypeName string `protobuf:"bytes,2,opt,name=source_type_name,json=sourceTypeName,proto3" json:"source_type_name,omitempty"`
- // The schema version of the resource type that the resource is being
- // moved from.
- SourceSchemaVersion int64 `protobuf:"varint,3,opt,name=source_schema_version,json=sourceSchemaVersion,proto3" json:"source_schema_version,omitempty"`
- // The raw state of the resource being moved. Only the json field is
- // populated, as there should be no legacy providers using the flatmap
- // format that support newly introduced RPCs.
- SourceState *RawState `protobuf:"bytes,4,opt,name=source_state,json=sourceState,proto3" json:"source_state,omitempty"`
- // The resource type that the resource is being moved to.
- TargetTypeName string `protobuf:"bytes,5,opt,name=target_type_name,json=targetTypeName,proto3" json:"target_type_name,omitempty"`
- // The private state of the resource being moved.
- SourcePrivate []byte `protobuf:"bytes,6,opt,name=source_private,json=sourcePrivate,proto3" json:"source_private,omitempty"`
+type ValidateListResourceConfig_Request struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ TypeName string `protobuf:"bytes,1,opt,name=type_name,json=typeName,proto3" json:"type_name,omitempty"`
+ Config *DynamicValue `protobuf:"bytes,2,opt,name=config,proto3" json:"config,omitempty"`
+ IncludeResourceObject *DynamicValue `protobuf:"bytes,3,opt,name=include_resource_object,json=includeResourceObject,proto3" json:"include_resource_object,omitempty"`
+ Limit *DynamicValue `protobuf:"bytes,4,opt,name=limit,proto3" json:"limit,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
-func (x *MoveResourceState_Request) Reset() {
- *x = MoveResourceState_Request{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin6_proto_msgTypes[65]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+func (x *ValidateListResourceConfig_Request) Reset() {
+ *x = ValidateListResourceConfig_Request{}
+ mi := &file_tfplugin6_proto_msgTypes[110]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
-func (x *MoveResourceState_Request) String() string {
+func (x *ValidateListResourceConfig_Request) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*MoveResourceState_Request) ProtoMessage() {}
+func (*ValidateListResourceConfig_Request) ProtoMessage() {}
-func (x *MoveResourceState_Request) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin6_proto_msgTypes[65]
- if protoimpl.UnsafeEnabled && x != nil {
+func (x *ValidateListResourceConfig_Request) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin6_proto_msgTypes[110]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -3947,84 +6011,107 @@ func (x *MoveResourceState_Request) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use MoveResourceState_Request.ProtoReflect.Descriptor instead.
-func (*MoveResourceState_Request) Descriptor() ([]byte, []int) {
- return file_tfplugin6_proto_rawDescGZIP(), []int{22, 0}
+// Deprecated: Use ValidateListResourceConfig_Request.ProtoReflect.Descriptor instead.
+func (*ValidateListResourceConfig_Request) Descriptor() ([]byte, []int) {
+ return file_tfplugin6_proto_rawDescGZIP(), []int{36, 0}
}
-func (x *MoveResourceState_Request) GetSourceProviderAddress() string {
+func (x *ValidateListResourceConfig_Request) GetTypeName() string {
if x != nil {
- return x.SourceProviderAddress
+ return x.TypeName
}
return ""
}
-func (x *MoveResourceState_Request) GetSourceTypeName() string {
+func (x *ValidateListResourceConfig_Request) GetConfig() *DynamicValue {
if x != nil {
- return x.SourceTypeName
+ return x.Config
}
- return ""
+ return nil
}
-func (x *MoveResourceState_Request) GetSourceSchemaVersion() int64 {
+func (x *ValidateListResourceConfig_Request) GetIncludeResourceObject() *DynamicValue {
if x != nil {
- return x.SourceSchemaVersion
+ return x.IncludeResourceObject
}
- return 0
+ return nil
}
-func (x *MoveResourceState_Request) GetSourceState() *RawState {
+func (x *ValidateListResourceConfig_Request) GetLimit() *DynamicValue {
if x != nil {
- return x.SourceState
+ return x.Limit
}
return nil
}
-func (x *MoveResourceState_Request) GetTargetTypeName() string {
+type ValidateListResourceConfig_Response struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Diagnostics []*Diagnostic `protobuf:"bytes,1,rep,name=diagnostics,proto3" json:"diagnostics,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *ValidateListResourceConfig_Response) Reset() {
+ *x = ValidateListResourceConfig_Response{}
+ mi := &file_tfplugin6_proto_msgTypes[111]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ValidateListResourceConfig_Response) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ValidateListResourceConfig_Response) ProtoMessage() {}
+
+func (x *ValidateListResourceConfig_Response) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin6_proto_msgTypes[111]
if x != nil {
- return x.TargetTypeName
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
}
- return ""
+ return mi.MessageOf(x)
}
-func (x *MoveResourceState_Request) GetSourcePrivate() []byte {
+// Deprecated: Use ValidateListResourceConfig_Response.ProtoReflect.Descriptor instead.
+func (*ValidateListResourceConfig_Response) Descriptor() ([]byte, []int) {
+ return file_tfplugin6_proto_rawDescGZIP(), []int{36, 1}
+}
+
+func (x *ValidateListResourceConfig_Response) GetDiagnostics() []*Diagnostic {
if x != nil {
- return x.SourcePrivate
+ return x.Diagnostics
}
return nil
}
-type MoveResourceState_Response struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+type ValidateActionConfig_Request struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ ActionType string `protobuf:"bytes,1,opt,name=action_type,json=actionType,proto3" json:"action_type,omitempty"`
+ Config *DynamicValue `protobuf:"bytes,2,opt,name=config,proto3" json:"config,omitempty"`
unknownFields protoimpl.UnknownFields
-
- // The state of the resource after it has been moved.
- TargetState *DynamicValue `protobuf:"bytes,1,opt,name=target_state,json=targetState,proto3" json:"target_state,omitempty"`
- // Any diagnostics that occurred during the move.
- Diagnostics []*Diagnostic `protobuf:"bytes,2,rep,name=diagnostics,proto3" json:"diagnostics,omitempty"`
- // The private state of the resource after it has been moved.
- TargetPrivate []byte `protobuf:"bytes,3,opt,name=target_private,json=targetPrivate,proto3" json:"target_private,omitempty"`
+ sizeCache protoimpl.SizeCache
}
-func (x *MoveResourceState_Response) Reset() {
- *x = MoveResourceState_Response{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin6_proto_msgTypes[66]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+func (x *ValidateActionConfig_Request) Reset() {
+ *x = ValidateActionConfig_Request{}
+ mi := &file_tfplugin6_proto_msgTypes[112]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
-func (x *MoveResourceState_Response) String() string {
+func (x *ValidateActionConfig_Request) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*MoveResourceState_Response) ProtoMessage() {}
+func (*ValidateActionConfig_Request) ProtoMessage() {}
-func (x *MoveResourceState_Response) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin6_proto_msgTypes[66]
- if protoimpl.UnsafeEnabled && x != nil {
+func (x *ValidateActionConfig_Request) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin6_proto_msgTypes[112]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -4034,61 +6121,94 @@ func (x *MoveResourceState_Response) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use MoveResourceState_Response.ProtoReflect.Descriptor instead.
-func (*MoveResourceState_Response) Descriptor() ([]byte, []int) {
- return file_tfplugin6_proto_rawDescGZIP(), []int{22, 1}
+// Deprecated: Use ValidateActionConfig_Request.ProtoReflect.Descriptor instead.
+func (*ValidateActionConfig_Request) Descriptor() ([]byte, []int) {
+ return file_tfplugin6_proto_rawDescGZIP(), []int{37, 0}
}
-func (x *MoveResourceState_Response) GetTargetState() *DynamicValue {
+func (x *ValidateActionConfig_Request) GetActionType() string {
if x != nil {
- return x.TargetState
+ return x.ActionType
}
- return nil
+ return ""
}
-func (x *MoveResourceState_Response) GetDiagnostics() []*Diagnostic {
+func (x *ValidateActionConfig_Request) GetConfig() *DynamicValue {
if x != nil {
- return x.Diagnostics
+ return x.Config
}
return nil
}
-func (x *MoveResourceState_Response) GetTargetPrivate() []byte {
+type ValidateActionConfig_Response struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Diagnostics []*Diagnostic `protobuf:"bytes,1,rep,name=diagnostics,proto3" json:"diagnostics,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *ValidateActionConfig_Response) Reset() {
+ *x = ValidateActionConfig_Response{}
+ mi := &file_tfplugin6_proto_msgTypes[113]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ValidateActionConfig_Response) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ValidateActionConfig_Response) ProtoMessage() {}
+
+func (x *ValidateActionConfig_Response) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin6_proto_msgTypes[113]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ValidateActionConfig_Response.ProtoReflect.Descriptor instead.
+func (*ValidateActionConfig_Response) Descriptor() ([]byte, []int) {
+ return file_tfplugin6_proto_rawDescGZIP(), []int{37, 1}
+}
+
+func (x *ValidateActionConfig_Response) GetDiagnostics() []*Diagnostic {
if x != nil {
- return x.TargetPrivate
+ return x.Diagnostics
}
return nil
}
-type ReadDataSource_Request struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- TypeName string `protobuf:"bytes,1,opt,name=type_name,json=typeName,proto3" json:"type_name,omitempty"`
- Config *DynamicValue `protobuf:"bytes,2,opt,name=config,proto3" json:"config,omitempty"`
- ProviderMeta *DynamicValue `protobuf:"bytes,3,opt,name=provider_meta,json=providerMeta,proto3" json:"provider_meta,omitempty"`
- ClientCapabilities *ClientCapabilities `protobuf:"bytes,4,opt,name=client_capabilities,json=clientCapabilities,proto3" json:"client_capabilities,omitempty"`
+type PlanAction_Request struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ ActionType string `protobuf:"bytes,1,opt,name=action_type,json=actionType,proto3" json:"action_type,omitempty"`
+ Config *DynamicValue `protobuf:"bytes,2,opt,name=config,proto3" json:"config,omitempty"`
+ ClientCapabilities *ClientCapabilities `protobuf:"bytes,3,opt,name=client_capabilities,json=clientCapabilities,proto3" json:"client_capabilities,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
-func (x *ReadDataSource_Request) Reset() {
- *x = ReadDataSource_Request{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin6_proto_msgTypes[67]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+func (x *PlanAction_Request) Reset() {
+ *x = PlanAction_Request{}
+ mi := &file_tfplugin6_proto_msgTypes[114]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
-func (x *ReadDataSource_Request) String() string {
+func (x *PlanAction_Request) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*ReadDataSource_Request) ProtoMessage() {}
+func (*PlanAction_Request) ProtoMessage() {}
-func (x *ReadDataSource_Request) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin6_proto_msgTypes[67]
- if protoimpl.UnsafeEnabled && x != nil {
+func (x *PlanAction_Request) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin6_proto_msgTypes[114]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -4098,69 +6218,57 @@ func (x *ReadDataSource_Request) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use ReadDataSource_Request.ProtoReflect.Descriptor instead.
-func (*ReadDataSource_Request) Descriptor() ([]byte, []int) {
- return file_tfplugin6_proto_rawDescGZIP(), []int{23, 0}
+// Deprecated: Use PlanAction_Request.ProtoReflect.Descriptor instead.
+func (*PlanAction_Request) Descriptor() ([]byte, []int) {
+ return file_tfplugin6_proto_rawDescGZIP(), []int{38, 0}
}
-func (x *ReadDataSource_Request) GetTypeName() string {
+func (x *PlanAction_Request) GetActionType() string {
if x != nil {
- return x.TypeName
+ return x.ActionType
}
return ""
}
-func (x *ReadDataSource_Request) GetConfig() *DynamicValue {
+func (x *PlanAction_Request) GetConfig() *DynamicValue {
if x != nil {
return x.Config
}
return nil
}
-func (x *ReadDataSource_Request) GetProviderMeta() *DynamicValue {
- if x != nil {
- return x.ProviderMeta
- }
- return nil
-}
-
-func (x *ReadDataSource_Request) GetClientCapabilities() *ClientCapabilities {
+func (x *PlanAction_Request) GetClientCapabilities() *ClientCapabilities {
if x != nil {
return x.ClientCapabilities
}
return nil
}
-type ReadDataSource_Response struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+type PlanAction_Response struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Diagnostics []*Diagnostic `protobuf:"bytes,1,rep,name=diagnostics,proto3" json:"diagnostics,omitempty"`
+ // metadata
+ Deferred *Deferred `protobuf:"bytes,2,opt,name=deferred,proto3" json:"deferred,omitempty"`
unknownFields protoimpl.UnknownFields
-
- State *DynamicValue `protobuf:"bytes,1,opt,name=state,proto3" json:"state,omitempty"`
- Diagnostics []*Diagnostic `protobuf:"bytes,2,rep,name=diagnostics,proto3" json:"diagnostics,omitempty"`
- // deferred is set if the provider is deferring the change. If set the caller
- // needs to handle the deferral.
- Deferred *Deferred `protobuf:"bytes,3,opt,name=deferred,proto3" json:"deferred,omitempty"`
+ sizeCache protoimpl.SizeCache
}
-func (x *ReadDataSource_Response) Reset() {
- *x = ReadDataSource_Response{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin6_proto_msgTypes[68]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+func (x *PlanAction_Response) Reset() {
+ *x = PlanAction_Response{}
+ mi := &file_tfplugin6_proto_msgTypes[115]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
-func (x *ReadDataSource_Response) String() string {
+func (x *PlanAction_Response) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*ReadDataSource_Response) ProtoMessage() {}
+func (*PlanAction_Response) ProtoMessage() {}
-func (x *ReadDataSource_Response) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin6_proto_msgTypes[68]
- if protoimpl.UnsafeEnabled && x != nil {
+func (x *PlanAction_Response) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin6_proto_msgTypes[115]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -4170,56 +6278,50 @@ func (x *ReadDataSource_Response) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use ReadDataSource_Response.ProtoReflect.Descriptor instead.
-func (*ReadDataSource_Response) Descriptor() ([]byte, []int) {
- return file_tfplugin6_proto_rawDescGZIP(), []int{23, 1}
-}
-
-func (x *ReadDataSource_Response) GetState() *DynamicValue {
- if x != nil {
- return x.State
- }
- return nil
+// Deprecated: Use PlanAction_Response.ProtoReflect.Descriptor instead.
+func (*PlanAction_Response) Descriptor() ([]byte, []int) {
+ return file_tfplugin6_proto_rawDescGZIP(), []int{38, 1}
}
-func (x *ReadDataSource_Response) GetDiagnostics() []*Diagnostic {
+func (x *PlanAction_Response) GetDiagnostics() []*Diagnostic {
if x != nil {
return x.Diagnostics
}
return nil
}
-func (x *ReadDataSource_Response) GetDeferred() *Deferred {
+func (x *PlanAction_Response) GetDeferred() *Deferred {
if x != nil {
return x.Deferred
}
return nil
}
-type GetFunctions_Request struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
+type InvokeAction_Request struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ ActionType string `protobuf:"bytes,1,opt,name=action_type,json=actionType,proto3" json:"action_type,omitempty"`
+ Config *DynamicValue `protobuf:"bytes,2,opt,name=config,proto3" json:"config,omitempty"`
+ ClientCapabilities *ClientCapabilities `protobuf:"bytes,3,opt,name=client_capabilities,json=clientCapabilities,proto3" json:"client_capabilities,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
-func (x *GetFunctions_Request) Reset() {
- *x = GetFunctions_Request{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin6_proto_msgTypes[69]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+func (x *InvokeAction_Request) Reset() {
+ *x = InvokeAction_Request{}
+ mi := &file_tfplugin6_proto_msgTypes[116]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
-func (x *GetFunctions_Request) String() string {
+func (x *InvokeAction_Request) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*GetFunctions_Request) ProtoMessage() {}
+func (*InvokeAction_Request) ProtoMessage() {}
-func (x *GetFunctions_Request) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin6_proto_msgTypes[69]
- if protoimpl.UnsafeEnabled && x != nil {
+func (x *InvokeAction_Request) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin6_proto_msgTypes[116]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -4229,40 +6331,59 @@ func (x *GetFunctions_Request) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use GetFunctions_Request.ProtoReflect.Descriptor instead.
-func (*GetFunctions_Request) Descriptor() ([]byte, []int) {
- return file_tfplugin6_proto_rawDescGZIP(), []int{24, 0}
+// Deprecated: Use InvokeAction_Request.ProtoReflect.Descriptor instead.
+func (*InvokeAction_Request) Descriptor() ([]byte, []int) {
+ return file_tfplugin6_proto_rawDescGZIP(), []int{39, 0}
}
-type GetFunctions_Response struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
+func (x *InvokeAction_Request) GetActionType() string {
+ if x != nil {
+ return x.ActionType
+ }
+ return ""
+}
- // functions is a mapping of function names to definitions.
- Functions map[string]*Function `protobuf:"bytes,1,rep,name=functions,proto3" json:"functions,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
- // diagnostics is any warnings or errors.
- Diagnostics []*Diagnostic `protobuf:"bytes,2,rep,name=diagnostics,proto3" json:"diagnostics,omitempty"`
+func (x *InvokeAction_Request) GetConfig() *DynamicValue {
+ if x != nil {
+ return x.Config
+ }
+ return nil
}
-func (x *GetFunctions_Response) Reset() {
- *x = GetFunctions_Response{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin6_proto_msgTypes[70]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
+func (x *InvokeAction_Request) GetClientCapabilities() *ClientCapabilities {
+ if x != nil {
+ return x.ClientCapabilities
}
+ return nil
}
-func (x *GetFunctions_Response) String() string {
+type InvokeAction_Event struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // Types that are valid to be assigned to Type:
+ //
+ // *InvokeAction_Event_Progress_
+ // *InvokeAction_Event_Completed_
+ Type isInvokeAction_Event_Type `protobuf_oneof:"type"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *InvokeAction_Event) Reset() {
+ *x = InvokeAction_Event{}
+ mi := &file_tfplugin6_proto_msgTypes[117]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *InvokeAction_Event) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*GetFunctions_Response) ProtoMessage() {}
+func (*InvokeAction_Event) ProtoMessage() {}
-func (x *GetFunctions_Response) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin6_proto_msgTypes[70]
- if protoimpl.UnsafeEnabled && x != nil {
+func (x *InvokeAction_Event) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin6_proto_msgTypes[117]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -4272,54 +6393,76 @@ func (x *GetFunctions_Response) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use GetFunctions_Response.ProtoReflect.Descriptor instead.
-func (*GetFunctions_Response) Descriptor() ([]byte, []int) {
- return file_tfplugin6_proto_rawDescGZIP(), []int{24, 1}
+// Deprecated: Use InvokeAction_Event.ProtoReflect.Descriptor instead.
+func (*InvokeAction_Event) Descriptor() ([]byte, []int) {
+ return file_tfplugin6_proto_rawDescGZIP(), []int{39, 1}
}
-func (x *GetFunctions_Response) GetFunctions() map[string]*Function {
+func (x *InvokeAction_Event) GetType() isInvokeAction_Event_Type {
if x != nil {
- return x.Functions
+ return x.Type
}
return nil
}
-func (x *GetFunctions_Response) GetDiagnostics() []*Diagnostic {
+func (x *InvokeAction_Event) GetProgress() *InvokeAction_Event_Progress {
if x != nil {
- return x.Diagnostics
+ if x, ok := x.Type.(*InvokeAction_Event_Progress_); ok {
+ return x.Progress
+ }
}
return nil
}
-type CallFunction_Request struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
+func (x *InvokeAction_Event) GetCompleted() *InvokeAction_Event_Completed {
+ if x != nil {
+ if x, ok := x.Type.(*InvokeAction_Event_Completed_); ok {
+ return x.Completed
+ }
+ }
+ return nil
+}
- // name is the name of the function being called.
- Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
- // arguments is the data of each function argument value.
- Arguments []*DynamicValue `protobuf:"bytes,2,rep,name=arguments,proto3" json:"arguments,omitempty"`
+type isInvokeAction_Event_Type interface {
+ isInvokeAction_Event_Type()
}
-func (x *CallFunction_Request) Reset() {
- *x = CallFunction_Request{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin6_proto_msgTypes[72]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+type InvokeAction_Event_Progress_ struct {
+ Progress *InvokeAction_Event_Progress `protobuf:"bytes,1,opt,name=progress,proto3,oneof"`
}
-func (x *CallFunction_Request) String() string {
+type InvokeAction_Event_Completed_ struct {
+ Completed *InvokeAction_Event_Completed `protobuf:"bytes,2,opt,name=completed,proto3,oneof"`
+}
+
+func (*InvokeAction_Event_Progress_) isInvokeAction_Event_Type() {}
+
+func (*InvokeAction_Event_Completed_) isInvokeAction_Event_Type() {}
+
+type InvokeAction_Event_Progress struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // message to be printed in the console / HCPT
+ Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *InvokeAction_Event_Progress) Reset() {
+ *x = InvokeAction_Event_Progress{}
+ mi := &file_tfplugin6_proto_msgTypes[118]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *InvokeAction_Event_Progress) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*CallFunction_Request) ProtoMessage() {}
+func (*InvokeAction_Event_Progress) ProtoMessage() {}
-func (x *CallFunction_Request) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin6_proto_msgTypes[72]
- if protoimpl.UnsafeEnabled && x != nil {
+func (x *InvokeAction_Event_Progress) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin6_proto_msgTypes[118]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -4329,54 +6472,41 @@ func (x *CallFunction_Request) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use CallFunction_Request.ProtoReflect.Descriptor instead.
-func (*CallFunction_Request) Descriptor() ([]byte, []int) {
- return file_tfplugin6_proto_rawDescGZIP(), []int{25, 0}
+// Deprecated: Use InvokeAction_Event_Progress.ProtoReflect.Descriptor instead.
+func (*InvokeAction_Event_Progress) Descriptor() ([]byte, []int) {
+ return file_tfplugin6_proto_rawDescGZIP(), []int{39, 1, 0}
}
-func (x *CallFunction_Request) GetName() string {
+func (x *InvokeAction_Event_Progress) GetMessage() string {
if x != nil {
- return x.Name
+ return x.Message
}
return ""
}
-func (x *CallFunction_Request) GetArguments() []*DynamicValue {
- if x != nil {
- return x.Arguments
- }
- return nil
-}
-
-type CallFunction_Response struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+type InvokeAction_Event_Completed struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Diagnostics []*Diagnostic `protobuf:"bytes,1,rep,name=diagnostics,proto3" json:"diagnostics,omitempty"`
unknownFields protoimpl.UnknownFields
-
- // result is result value after running the function logic.
- Result *DynamicValue `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"`
- // error is any errors from the function logic.
- Error *FunctionError `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
+ sizeCache protoimpl.SizeCache
}
-func (x *CallFunction_Response) Reset() {
- *x = CallFunction_Response{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tfplugin6_proto_msgTypes[73]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+func (x *InvokeAction_Event_Completed) Reset() {
+ *x = InvokeAction_Event_Completed{}
+ mi := &file_tfplugin6_proto_msgTypes[119]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
-func (x *CallFunction_Response) String() string {
+func (x *InvokeAction_Event_Completed) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*CallFunction_Response) ProtoMessage() {}
+func (*InvokeAction_Event_Completed) ProtoMessage() {}
-func (x *CallFunction_Response) ProtoReflect() protoreflect.Message {
- mi := &file_tfplugin6_proto_msgTypes[73]
- if protoimpl.UnsafeEnabled && x != nil {
+func (x *InvokeAction_Event_Completed) ProtoReflect() protoreflect.Message {
+ mi := &file_tfplugin6_proto_msgTypes[119]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -4386,941 +6516,850 @@ func (x *CallFunction_Response) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use CallFunction_Response.ProtoReflect.Descriptor instead.
-func (*CallFunction_Response) Descriptor() ([]byte, []int) {
- return file_tfplugin6_proto_rawDescGZIP(), []int{25, 1}
-}
-
-func (x *CallFunction_Response) GetResult() *DynamicValue {
- if x != nil {
- return x.Result
- }
- return nil
+// Deprecated: Use InvokeAction_Event_Completed.ProtoReflect.Descriptor instead.
+func (*InvokeAction_Event_Completed) Descriptor() ([]byte, []int) {
+ return file_tfplugin6_proto_rawDescGZIP(), []int{39, 1, 1}
}
-func (x *CallFunction_Response) GetError() *FunctionError {
+func (x *InvokeAction_Event_Completed) GetDiagnostics() []*Diagnostic {
if x != nil {
- return x.Error
+ return x.Diagnostics
}
return nil
}
var File_tfplugin6_proto protoreflect.FileDescriptor
-var file_tfplugin6_proto_rawDesc = []byte{
- 0x0a, 0x0f, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x36, 0x2e, 0x70, 0x72, 0x6f, 0x74,
- 0x6f, 0x12, 0x09, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x36, 0x22, 0x3c, 0x0a, 0x0c,
- 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x18, 0x0a, 0x07,
- 0x6d, 0x73, 0x67, 0x70, 0x61, 0x63, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x6d,
- 0x73, 0x67, 0x70, 0x61, 0x63, 0x6b, 0x12, 0x12, 0x0a, 0x04, 0x6a, 0x73, 0x6f, 0x6e, 0x18, 0x02,
- 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x6a, 0x73, 0x6f, 0x6e, 0x22, 0xe3, 0x01, 0x0a, 0x0a, 0x44,
- 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x12, 0x3a, 0x0a, 0x08, 0x73, 0x65, 0x76,
- 0x65, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x74, 0x66,
- 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x36, 0x2e, 0x44, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74,
- 0x69, 0x63, 0x2e, 0x53, 0x65, 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, 0x52, 0x08, 0x73, 0x65, 0x76,
- 0x65, 0x72, 0x69, 0x74, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79,
- 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12,
- 0x16, 0x0a, 0x06, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52,
- 0x06, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x74, 0x74, 0x72, 0x69,
- 0x62, 0x75, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x74, 0x66, 0x70,
- 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x36, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65,
- 0x50, 0x61, 0x74, 0x68, 0x52, 0x09, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x22,
- 0x2f, 0x0a, 0x08, 0x53, 0x65, 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, 0x12, 0x0b, 0x0a, 0x07, 0x49,
- 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x52, 0x52, 0x4f,
- 0x52, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x57, 0x41, 0x52, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x02,
- 0x22, 0x6b, 0x0a, 0x0d, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x72, 0x72, 0x6f,
- 0x72, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x65, 0x78, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
- 0x04, 0x74, 0x65, 0x78, 0x74, 0x12, 0x30, 0x0a, 0x11, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f,
- 0x6e, 0x5f, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03,
- 0x48, 0x00, 0x52, 0x10, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x72, 0x67, 0x75,
- 0x6d, 0x65, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x14, 0x0a, 0x12, 0x5f, 0x66, 0x75, 0x6e, 0x63,
- 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0xdc, 0x01,
- 0x0a, 0x0d, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x50, 0x61, 0x74, 0x68, 0x12,
- 0x33, 0x0a, 0x05, 0x73, 0x74, 0x65, 0x70, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d,
- 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x36, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69,
- 0x62, 0x75, 0x74, 0x65, 0x50, 0x61, 0x74, 0x68, 0x2e, 0x53, 0x74, 0x65, 0x70, 0x52, 0x05, 0x73,
- 0x74, 0x65, 0x70, 0x73, 0x1a, 0x95, 0x01, 0x0a, 0x04, 0x53, 0x74, 0x65, 0x70, 0x12, 0x27, 0x0a,
- 0x0e, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18,
- 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0d, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75,
- 0x74, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2e, 0x0a, 0x12, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e,
- 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01,
- 0x28, 0x09, 0x48, 0x00, 0x52, 0x10, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x4b, 0x65, 0x79,
- 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x28, 0x0a, 0x0f, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e,
- 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x69, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x48,
- 0x00, 0x52, 0x0d, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x4b, 0x65, 0x79, 0x49, 0x6e, 0x74,
- 0x42, 0x0a, 0x0a, 0x08, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x22, 0x3b, 0x0a, 0x0c,
- 0x53, 0x74, 0x6f, 0x70, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x1a, 0x09, 0x0a, 0x07,
- 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x70, 0x6f,
- 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01,
- 0x28, 0x09, 0x52, 0x05, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x96, 0x01, 0x0a, 0x08, 0x52, 0x61,
- 0x77, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6a, 0x73, 0x6f, 0x6e, 0x18, 0x01,
- 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x6a, 0x73, 0x6f, 0x6e, 0x12, 0x3a, 0x0a, 0x07, 0x66, 0x6c,
- 0x61, 0x74, 0x6d, 0x61, 0x70, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x74, 0x66,
- 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x36, 0x2e, 0x52, 0x61, 0x77, 0x53, 0x74, 0x61, 0x74, 0x65,
- 0x2e, 0x46, 0x6c, 0x61, 0x74, 0x6d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x66,
- 0x6c, 0x61, 0x74, 0x6d, 0x61, 0x70, 0x1a, 0x3a, 0x0a, 0x0c, 0x46, 0x6c, 0x61, 0x74, 0x6d, 0x61,
- 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20,
- 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75,
- 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02,
- 0x38, 0x01, 0x22, 0x95, 0x0a, 0x0a, 0x06, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x18, 0x0a,
- 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07,
- 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x2d, 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b,
- 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69,
- 0x6e, 0x36, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52,
- 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x1a, 0xa2, 0x02, 0x0a, 0x05, 0x42, 0x6c, 0x6f, 0x63, 0x6b,
- 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28,
- 0x03, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x3b, 0x0a, 0x0a, 0x61, 0x74,
- 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b,
- 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x36, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d,
- 0x61, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x52, 0x0a, 0x61, 0x74, 0x74,
- 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x12, 0x3e, 0x0a, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b,
- 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x74,
- 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x36, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e,
- 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x0a, 0x62, 0x6c, 0x6f,
- 0x63, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72,
- 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65,
- 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x40, 0x0a, 0x10, 0x64, 0x65, 0x73,
- 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x05, 0x20,
- 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x36, 0x2e,
- 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4b, 0x69, 0x6e, 0x64, 0x52, 0x0f, 0x64, 0x65, 0x73, 0x63,
- 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x69, 0x6e, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x64,
- 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52,
- 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x1a, 0xe4, 0x02, 0x0a, 0x09,
- 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d,
- 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a,
- 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x74, 0x79, 0x70,
- 0x65, 0x12, 0x39, 0x0a, 0x0b, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x74, 0x79, 0x70, 0x65,
- 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69,
- 0x6e, 0x36, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74,
- 0x52, 0x0a, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x54, 0x79, 0x70, 0x65, 0x12, 0x20, 0x0a, 0x0b,
- 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28,
- 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a,
- 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08,
- 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6f, 0x70,
- 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x6f, 0x70,
- 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74,
- 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74,
- 0x65, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x18,
- 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x73, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65,
- 0x12, 0x40, 0x0a, 0x10, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f,
- 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x74, 0x66, 0x70,
- 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x36, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4b, 0x69, 0x6e,
- 0x64, 0x52, 0x0f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x69,
- 0x6e, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64,
- 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74,
- 0x65, 0x64, 0x1a, 0xa7, 0x02, 0x0a, 0x0b, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x42, 0x6c, 0x6f,
- 0x63, 0x6b, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18,
- 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x79, 0x70, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12,
- 0x2d, 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17,
- 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x36, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d,
- 0x61, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x43,
- 0x0a, 0x07, 0x6e, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32,
- 0x29, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x36, 0x2e, 0x53, 0x63, 0x68, 0x65,
- 0x6d, 0x61, 0x2e, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x4e,
- 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x07, 0x6e, 0x65, 0x73, 0x74,
- 0x69, 0x6e, 0x67, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x69, 0x6e, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73,
- 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x6d, 0x69, 0x6e, 0x49, 0x74, 0x65, 0x6d, 0x73,
- 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x78, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x05, 0x20,
- 0x01, 0x28, 0x03, 0x52, 0x08, 0x6d, 0x61, 0x78, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x22, 0x4d, 0x0a,
- 0x0b, 0x4e, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x0b, 0x0a, 0x07,
- 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x49, 0x4e,
- 0x47, 0x4c, 0x45, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x4c, 0x49, 0x53, 0x54, 0x10, 0x02, 0x12,
- 0x07, 0x0a, 0x03, 0x53, 0x45, 0x54, 0x10, 0x03, 0x12, 0x07, 0x0a, 0x03, 0x4d, 0x41, 0x50, 0x10,
- 0x04, 0x12, 0x09, 0x0a, 0x05, 0x47, 0x52, 0x4f, 0x55, 0x50, 0x10, 0x05, 0x1a, 0x8b, 0x02, 0x0a,
- 0x06, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x3b, 0x0a, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69,
- 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x74, 0x66,
- 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x36, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x41,
- 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x52, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62,
- 0x75, 0x74, 0x65, 0x73, 0x12, 0x3e, 0x0a, 0x07, 0x6e, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x18,
- 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e,
- 0x36, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e,
- 0x4e, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x07, 0x6e, 0x65, 0x73,
- 0x74, 0x69, 0x6e, 0x67, 0x12, 0x1f, 0x0a, 0x09, 0x6d, 0x69, 0x6e, 0x5f, 0x69, 0x74, 0x65, 0x6d,
- 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x42, 0x02, 0x18, 0x01, 0x52, 0x08, 0x6d, 0x69, 0x6e,
- 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x1f, 0x0a, 0x09, 0x6d, 0x61, 0x78, 0x5f, 0x69, 0x74, 0x65,
- 0x6d, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x42, 0x02, 0x18, 0x01, 0x52, 0x08, 0x6d, 0x61,
- 0x78, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x22, 0x42, 0x0a, 0x0b, 0x4e, 0x65, 0x73, 0x74, 0x69, 0x6e,
- 0x67, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44,
- 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x49, 0x4e, 0x47, 0x4c, 0x45, 0x10, 0x01, 0x12, 0x08,
- 0x0a, 0x04, 0x4c, 0x49, 0x53, 0x54, 0x10, 0x02, 0x12, 0x07, 0x0a, 0x03, 0x53, 0x45, 0x54, 0x10,
- 0x03, 0x12, 0x07, 0x0a, 0x03, 0x4d, 0x41, 0x50, 0x10, 0x04, 0x22, 0x8e, 0x05, 0x0a, 0x08, 0x46,
- 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3d, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d,
- 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x74, 0x66,
- 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x36, 0x2e, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e,
- 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x61,
- 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x4c, 0x0a, 0x12, 0x76, 0x61, 0x72, 0x69, 0x61, 0x64,
- 0x69, 0x63, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01,
- 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x36, 0x2e, 0x46,
- 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65,
- 0x72, 0x52, 0x11, 0x76, 0x61, 0x72, 0x69, 0x61, 0x64, 0x69, 0x63, 0x50, 0x61, 0x72, 0x61, 0x6d,
- 0x65, 0x74, 0x65, 0x72, 0x12, 0x32, 0x0a, 0x06, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x18, 0x03,
- 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x36,
- 0x2e, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e,
- 0x52, 0x06, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x6d, 0x6d,
- 0x61, 0x72, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61,
- 0x72, 0x79, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f,
- 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70,
- 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x40, 0x0a, 0x10, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74,
- 0x69, 0x6f, 0x6e, 0x5f, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15,
- 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x36, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e,
- 0x67, 0x4b, 0x69, 0x6e, 0x64, 0x52, 0x0f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69,
- 0x6f, 0x6e, 0x4b, 0x69, 0x6e, 0x64, 0x12, 0x2f, 0x0a, 0x13, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63,
- 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x07, 0x20,
- 0x01, 0x28, 0x09, 0x52, 0x12, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,
- 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0xf3, 0x01, 0x0a, 0x09, 0x50, 0x61, 0x72, 0x61,
- 0x6d, 0x65, 0x74, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20,
- 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70,
- 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x28, 0x0a,
- 0x10, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x6e, 0x75, 0x6c, 0x6c, 0x5f, 0x76, 0x61, 0x6c, 0x75,
- 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x4e, 0x75,
- 0x6c, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x30, 0x0a, 0x14, 0x61, 0x6c, 0x6c, 0x6f, 0x77,
- 0x5f, 0x75, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18,
- 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x55, 0x6e, 0x6b, 0x6e,
- 0x6f, 0x77, 0x6e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73,
- 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b,
- 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x40, 0x0a, 0x10, 0x64,
- 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6b, 0x69, 0x6e, 0x64, 0x18,
- 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e,
- 0x36, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4b, 0x69, 0x6e, 0x64, 0x52, 0x0f, 0x64, 0x65,
- 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x69, 0x6e, 0x64, 0x1a, 0x1c, 0x0a,
- 0x06, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18,
- 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0xa8, 0x01, 0x0a, 0x12,
- 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69,
- 0x65, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x6c, 0x61, 0x6e, 0x5f, 0x64, 0x65, 0x73, 0x74, 0x72,
- 0x6f, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x70, 0x6c, 0x61, 0x6e, 0x44, 0x65,
- 0x73, 0x74, 0x72, 0x6f, 0x79, 0x12, 0x3f, 0x0a, 0x1c, 0x67, 0x65, 0x74, 0x5f, 0x70, 0x72, 0x6f,
- 0x76, 0x69, 0x64, 0x65, 0x72, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x6f, 0x70, 0x74,
- 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x19, 0x67, 0x65, 0x74,
- 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4f, 0x70,
- 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x12, 0x2e, 0x0a, 0x13, 0x6d, 0x6f, 0x76, 0x65, 0x5f, 0x72,
- 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20,
- 0x01, 0x28, 0x08, 0x52, 0x11, 0x6d, 0x6f, 0x76, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
- 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x22, 0x3f, 0x0a, 0x12, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74,
- 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x29, 0x0a, 0x10,
- 0x64, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c, 0x5f, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64,
- 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x64, 0x65, 0x66, 0x65, 0x72, 0x72, 0x61, 0x6c,
- 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x22, 0xa2, 0x01, 0x0a, 0x08, 0x44, 0x65, 0x66, 0x65,
- 0x72, 0x72, 0x65, 0x64, 0x12, 0x32, 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x01,
- 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x36,
- 0x2e, 0x44, 0x65, 0x66, 0x65, 0x72, 0x72, 0x65, 0x64, 0x2e, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e,
- 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x22, 0x62, 0x0a, 0x06, 0x52, 0x65, 0x61, 0x73,
- 0x6f, 0x6e, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12,
- 0x1b, 0x0a, 0x17, 0x52, 0x45, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x43, 0x4f, 0x4e, 0x46,
- 0x49, 0x47, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x01, 0x12, 0x1b, 0x0a, 0x17,
- 0x50, 0x52, 0x4f, 0x56, 0x49, 0x44, 0x45, 0x52, 0x5f, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x47, 0x5f,
- 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x02, 0x12, 0x11, 0x0a, 0x0d, 0x41, 0x42, 0x53,
- 0x45, 0x4e, 0x54, 0x5f, 0x50, 0x52, 0x45, 0x52, 0x45, 0x51, 0x10, 0x03, 0x22, 0x96, 0x04, 0x0a,
- 0x0b, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x09, 0x0a, 0x07,
- 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0xef, 0x02, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x70,
- 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4e, 0x0a, 0x13, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x63,
- 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28,
- 0x0b, 0x32, 0x1d, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x36, 0x2e, 0x53, 0x65,
- 0x72, 0x76, 0x65, 0x72, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73,
- 0x52, 0x12, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69,
- 0x74, 0x69, 0x65, 0x73, 0x12, 0x37, 0x0a, 0x0b, 0x64, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74,
- 0x69, 0x63, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x66, 0x70, 0x6c,
- 0x75, 0x67, 0x69, 0x6e, 0x36, 0x2e, 0x44, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63,
- 0x52, 0x0b, 0x64, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x73, 0x12, 0x4c, 0x0a,
- 0x0c, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x03, 0x20,
- 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x36, 0x2e,
- 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x44, 0x61, 0x74, 0x61,
- 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x0b,
- 0x64, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x45, 0x0a, 0x09, 0x72,
- 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27,
- 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x36, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x65,
- 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d,
- 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
- 0x65, 0x73, 0x12, 0x45, 0x0a, 0x09, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18,
- 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e,
- 0x36, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x46, 0x75,
- 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x09,
- 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x26, 0x0a, 0x10, 0x46, 0x75, 0x6e,
- 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x12, 0x0a,
- 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d,
- 0x65, 0x1a, 0x31, 0x0a, 0x12, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d,
- 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x79, 0x70, 0x65, 0x5f,
- 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x79, 0x70, 0x65,
- 0x4e, 0x61, 0x6d, 0x65, 0x1a, 0x2f, 0x0a, 0x10, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
- 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x79, 0x70, 0x65,
- 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x79, 0x70,
- 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0xc7, 0x06, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f,
- 0x76, 0x69, 0x64, 0x65, 0x72, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x1a, 0x09, 0x0a, 0x07, 0x52,
- 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0xa6, 0x06, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x70, 0x6f,
- 0x6e, 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18,
- 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e,
- 0x36, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64,
- 0x65, 0x72, 0x12, 0x65, 0x0a, 0x10, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x73,
- 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x74,
- 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x36, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x76,
- 0x69, 0x64, 0x65, 0x72, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f,
- 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x63, 0x68, 0x65,
- 0x6d, 0x61, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72,
- 0x63, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x12, 0x6c, 0x0a, 0x13, 0x64, 0x61, 0x74,
- 0x61, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73,
- 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69,
- 0x6e, 0x36, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x53, 0x63,
- 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x44, 0x61,
- 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x45,
- 0x6e, 0x74, 0x72, 0x79, 0x52, 0x11, 0x64, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65,
- 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x12, 0x37, 0x0a, 0x0b, 0x64, 0x69, 0x61, 0x67, 0x6e,
- 0x6f, 0x73, 0x74, 0x69, 0x63, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74,
- 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x36, 0x2e, 0x44, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73,
- 0x74, 0x69, 0x63, 0x52, 0x0b, 0x64, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x73,
- 0x12, 0x36, 0x0a, 0x0d, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x5f, 0x6d, 0x65, 0x74,
- 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67,
- 0x69, 0x6e, 0x36, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x0c, 0x70, 0x72, 0x6f, 0x76,
- 0x69, 0x64, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x4e, 0x0a, 0x13, 0x73, 0x65, 0x72, 0x76,
- 0x65, 0x72, 0x5f, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18,
- 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e,
- 0x36, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69,
- 0x74, 0x69, 0x65, 0x73, 0x52, 0x12, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x43, 0x61, 0x70, 0x61,
- 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x52, 0x0a, 0x09, 0x66, 0x75, 0x6e, 0x63,
- 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x74, 0x66,
- 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x36, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x76, 0x69,
- 0x64, 0x65, 0x72, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
- 0x73, 0x65, 0x2e, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72,
- 0x79, 0x52, 0x09, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x55, 0x0a, 0x14,
- 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x45,
- 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28,
- 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x27, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18,
- 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e,
- 0x36, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a,
- 0x02, 0x38, 0x01, 0x1a, 0x57, 0x0a, 0x16, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63,
- 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a,
- 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12,
- 0x27, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11,
- 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x36, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d,
- 0x61, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x51, 0x0a, 0x0e,
- 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10,
- 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79,
- 0x12, 0x29, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32,
- 0x13, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x36, 0x2e, 0x46, 0x75, 0x6e, 0x63,
- 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22,
- 0x99, 0x01, 0x0a, 0x16, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x76,
- 0x69, 0x64, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0x3a, 0x0a, 0x07, 0x52, 0x65,
- 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18,
- 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e,
- 0x36, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06,
- 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0x43, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
- 0x73, 0x65, 0x12, 0x37, 0x0a, 0x0b, 0x64, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63,
- 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67,
- 0x69, 0x6e, 0x36, 0x2e, 0x44, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x52, 0x0b,
- 0x64, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x73, 0x22, 0x90, 0x02, 0x0a, 0x14,
- 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53,
- 0x74, 0x61, 0x74, 0x65, 0x1a, 0x72, 0x0a, 0x07, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
- 0x1b, 0x0a, 0x09, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01,
- 0x28, 0x09, 0x52, 0x08, 0x74, 0x79, 0x70, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07,
- 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x76,
- 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x30, 0x0a, 0x09, 0x72, 0x61, 0x77, 0x5f, 0x73, 0x74,
- 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x74, 0x66, 0x70, 0x6c,
- 0x75, 0x67, 0x69, 0x6e, 0x36, 0x2e, 0x52, 0x61, 0x77, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x08,
- 0x72, 0x61, 0x77, 0x53, 0x74, 0x61, 0x74, 0x65, 0x1a, 0x83, 0x01, 0x0a, 0x08, 0x52, 0x65, 0x73,
- 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3e, 0x0a, 0x0e, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65,
- 0x64, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e,
- 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x36, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69,
- 0x63, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0d, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x64,
- 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x37, 0x0a, 0x0b, 0x64, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73,
- 0x74, 0x69, 0x63, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x66, 0x70,
- 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x36, 0x2e, 0x44, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69,
- 0x63, 0x52, 0x0b, 0x64, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x73, 0x22, 0xb6,
- 0x01, 0x0a, 0x16, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75,
- 0x72, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0x57, 0x0a, 0x07, 0x52, 0x65, 0x71,
- 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x6e, 0x61, 0x6d,
- 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x79, 0x70, 0x65, 0x4e, 0x61, 0x6d,
- 0x65, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28,
- 0x0b, 0x32, 0x17, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x36, 0x2e, 0x44, 0x79,
- 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66,
- 0x69, 0x67, 0x1a, 0x43, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37,
- 0x0a, 0x0b, 0x64, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x73, 0x18, 0x01, 0x20,
- 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x36, 0x2e,
- 0x44, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x52, 0x0b, 0x64, 0x69, 0x61, 0x67,
- 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x73, 0x22, 0xba, 0x01, 0x0a, 0x1a, 0x56, 0x61, 0x6c, 0x69,
- 0x64, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
- 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0x57, 0x0a, 0x07, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
- 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01,
- 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x79, 0x70, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2f,
- 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17,
- 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x36, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d,
- 0x69, 0x63, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a,
- 0x43, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x0b, 0x64,
- 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b,
- 0x32, 0x15, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x36, 0x2e, 0x44, 0x69, 0x61,
- 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x52, 0x0b, 0x64, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73,
- 0x74, 0x69, 0x63, 0x73, 0x22, 0x92, 0x02, 0x0a, 0x11, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75,
- 0x72, 0x65, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x1a, 0xb7, 0x01, 0x0a, 0x07, 0x52,
- 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2b, 0x0a, 0x11, 0x74, 0x65, 0x72, 0x72, 0x61, 0x66,
- 0x6f, 0x72, 0x6d, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28,
- 0x09, 0x52, 0x10, 0x74, 0x65, 0x72, 0x72, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x56, 0x65, 0x72, 0x73,
- 0x69, 0x6f, 0x6e, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20,
- 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x36, 0x2e,
- 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x63, 0x6f,
- 0x6e, 0x66, 0x69, 0x67, 0x12, 0x4e, 0x0a, 0x13, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x63,
- 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28,
- 0x0b, 0x32, 0x1d, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x36, 0x2e, 0x43, 0x6c,
- 0x69, 0x65, 0x6e, 0x74, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73,
- 0x52, 0x12, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69,
- 0x74, 0x69, 0x65, 0x73, 0x1a, 0x43, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
- 0x12, 0x37, 0x0a, 0x0b, 0x64, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x73, 0x18,
- 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e,
- 0x36, 0x2e, 0x44, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x52, 0x0b, 0x64, 0x69,
- 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x73, 0x22, 0xe4, 0x03, 0x0a, 0x0c, 0x52, 0x65,
- 0x61, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x1a, 0x8c, 0x02, 0x0a, 0x07, 0x52,
- 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x6e,
- 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x79, 0x70, 0x65, 0x4e,
- 0x61, 0x6d, 0x65, 0x12, 0x3c, 0x0a, 0x0d, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x73,
- 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x74, 0x66, 0x70,
- 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x36, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x56, 0x61,
- 0x6c, 0x75, 0x65, 0x52, 0x0c, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74,
- 0x65, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01,
- 0x28, 0x0c, 0x52, 0x07, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x12, 0x3c, 0x0a, 0x0d, 0x70,
- 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01,
- 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x36, 0x2e, 0x44,
- 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0c, 0x70, 0x72, 0x6f,
- 0x76, 0x69, 0x64, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x4e, 0x0a, 0x13, 0x63, 0x6c, 0x69,
- 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73,
- 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69,
- 0x6e, 0x36, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c,
- 0x69, 0x74, 0x69, 0x65, 0x73, 0x52, 0x12, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x61, 0x70,
- 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x1a, 0xc4, 0x01, 0x0a, 0x08, 0x52, 0x65,
- 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x09, 0x6e, 0x65, 0x77, 0x5f, 0x73, 0x74,
- 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x74, 0x66, 0x70, 0x6c,
- 0x75, 0x67, 0x69, 0x6e, 0x36, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x56, 0x61, 0x6c,
- 0x75, 0x65, 0x52, 0x08, 0x6e, 0x65, 0x77, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x37, 0x0a, 0x0b,
- 0x64, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28,
- 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x36, 0x2e, 0x44, 0x69,
- 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x52, 0x0b, 0x64, 0x69, 0x61, 0x67, 0x6e, 0x6f,
- 0x73, 0x74, 0x69, 0x63, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65,
- 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x12,
- 0x2f, 0x0a, 0x08, 0x64, 0x65, 0x66, 0x65, 0x72, 0x72, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28,
- 0x0b, 0x32, 0x13, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x36, 0x2e, 0x44, 0x65,
- 0x66, 0x65, 0x72, 0x72, 0x65, 0x64, 0x52, 0x08, 0x64, 0x65, 0x66, 0x65, 0x72, 0x72, 0x65, 0x64,
- 0x22, 0xf3, 0x05, 0x0a, 0x12, 0x50, 0x6c, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
- 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x1a, 0x8b, 0x03, 0x0a, 0x07, 0x52, 0x65, 0x71, 0x75,
- 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65,
- 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x79, 0x70, 0x65, 0x4e, 0x61, 0x6d, 0x65,
- 0x12, 0x38, 0x0a, 0x0b, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18,
- 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e,
- 0x36, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0a,
- 0x70, 0x72, 0x69, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x45, 0x0a, 0x12, 0x70, 0x72,
- 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x64, 0x5f, 0x6e, 0x65, 0x77, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65,
- 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69,
- 0x6e, 0x36, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52,
- 0x10, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x64, 0x4e, 0x65, 0x77, 0x53, 0x74, 0x61, 0x74,
- 0x65, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28,
- 0x0b, 0x32, 0x17, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x36, 0x2e, 0x44, 0x79,
- 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66,
- 0x69, 0x67, 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x5f, 0x70, 0x72, 0x69, 0x76,
- 0x61, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x70, 0x72, 0x69, 0x6f, 0x72,
- 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x12, 0x3c, 0x0a, 0x0d, 0x70, 0x72, 0x6f, 0x76, 0x69,
- 0x64, 0x65, 0x72, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17,
- 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x36, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d,
- 0x69, 0x63, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0c, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65,
- 0x72, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x4e, 0x0a, 0x13, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f,
- 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x07, 0x20, 0x01,
- 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x36, 0x2e, 0x43,
- 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65,
- 0x73, 0x52, 0x12, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c,
- 0x69, 0x74, 0x69, 0x65, 0x73, 0x1a, 0xce, 0x02, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
- 0x73, 0x65, 0x12, 0x3c, 0x0a, 0x0d, 0x70, 0x6c, 0x61, 0x6e, 0x6e, 0x65, 0x64, 0x5f, 0x73, 0x74,
- 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x74, 0x66, 0x70, 0x6c,
- 0x75, 0x67, 0x69, 0x6e, 0x36, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x56, 0x61, 0x6c,
- 0x75, 0x65, 0x52, 0x0c, 0x70, 0x6c, 0x61, 0x6e, 0x6e, 0x65, 0x64, 0x53, 0x74, 0x61, 0x74, 0x65,
- 0x12, 0x43, 0x0a, 0x10, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x73, 0x5f, 0x72, 0x65, 0x70,
- 0x6c, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x74, 0x66, 0x70,
- 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x36, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65,
- 0x50, 0x61, 0x74, 0x68, 0x52, 0x0f, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x73, 0x52, 0x65,
- 0x70, 0x6c, 0x61, 0x63, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x70, 0x6c, 0x61, 0x6e, 0x6e, 0x65, 0x64,
- 0x5f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0e,
- 0x70, 0x6c, 0x61, 0x6e, 0x6e, 0x65, 0x64, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x12, 0x37,
- 0x0a, 0x0b, 0x64, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x73, 0x18, 0x04, 0x20,
- 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x36, 0x2e,
- 0x44, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x52, 0x0b, 0x64, 0x69, 0x61, 0x67,
- 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x73, 0x12, 0x2c, 0x0a, 0x12, 0x6c, 0x65, 0x67, 0x61, 0x63,
- 0x79, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x18, 0x05, 0x20,
- 0x01, 0x28, 0x08, 0x52, 0x10, 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x54, 0x79, 0x70, 0x65, 0x53,
- 0x79, 0x73, 0x74, 0x65, 0x6d, 0x12, 0x2f, 0x0a, 0x08, 0x64, 0x65, 0x66, 0x65, 0x72, 0x72, 0x65,
- 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67,
- 0x69, 0x6e, 0x36, 0x2e, 0x44, 0x65, 0x66, 0x65, 0x72, 0x72, 0x65, 0x64, 0x52, 0x08, 0x64, 0x65,
- 0x66, 0x65, 0x72, 0x72, 0x65, 0x64, 0x22, 0x92, 0x04, 0x0a, 0x13, 0x41, 0x70, 0x70, 0x6c, 0x79,
- 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x1a, 0xb6,
- 0x02, 0x0a, 0x07, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x79,
- 0x70, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74,
- 0x79, 0x70, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x38, 0x0a, 0x0b, 0x70, 0x72, 0x69, 0x6f, 0x72,
- 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x74,
- 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x36, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63,
- 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0a, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x74,
- 0x65, 0x12, 0x3c, 0x0a, 0x0d, 0x70, 0x6c, 0x61, 0x6e, 0x6e, 0x65, 0x64, 0x5f, 0x73, 0x74, 0x61,
- 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75,
- 0x67, 0x69, 0x6e, 0x36, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x56, 0x61, 0x6c, 0x75,
- 0x65, 0x52, 0x0c, 0x70, 0x6c, 0x61, 0x6e, 0x6e, 0x65, 0x64, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12,
- 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32,
- 0x17, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x36, 0x2e, 0x44, 0x79, 0x6e, 0x61,
- 0x6d, 0x69, 0x63, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67,
- 0x12, 0x27, 0x0a, 0x0f, 0x70, 0x6c, 0x61, 0x6e, 0x6e, 0x65, 0x64, 0x5f, 0x70, 0x72, 0x69, 0x76,
- 0x61, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0e, 0x70, 0x6c, 0x61, 0x6e, 0x6e,
- 0x65, 0x64, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x12, 0x3c, 0x0a, 0x0d, 0x70, 0x72, 0x6f,
- 0x76, 0x69, 0x64, 0x65, 0x72, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b,
- 0x32, 0x17, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x36, 0x2e, 0x44, 0x79, 0x6e,
- 0x61, 0x6d, 0x69, 0x63, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0c, 0x70, 0x72, 0x6f, 0x76, 0x69,
- 0x64, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x61, 0x1a, 0xc1, 0x01, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x70,
- 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x09, 0x6e, 0x65, 0x77, 0x5f, 0x73, 0x74, 0x61, 0x74,
- 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67,
- 0x69, 0x6e, 0x36, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x56, 0x61, 0x6c, 0x75, 0x65,
- 0x52, 0x08, 0x6e, 0x65, 0x77, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x72,
- 0x69, 0x76, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x70, 0x72, 0x69,
- 0x76, 0x61, 0x74, 0x65, 0x12, 0x37, 0x0a, 0x0b, 0x64, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74,
- 0x69, 0x63, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x66, 0x70, 0x6c,
- 0x75, 0x67, 0x69, 0x6e, 0x36, 0x2e, 0x44, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63,
- 0x52, 0x0b, 0x64, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x73, 0x12, 0x2c, 0x0a,
- 0x12, 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x73, 0x79, 0x73,
- 0x74, 0x65, 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x6c, 0x65, 0x67, 0x61, 0x63,
- 0x79, 0x54, 0x79, 0x70, 0x65, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x22, 0xef, 0x03, 0x0a, 0x13,
- 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x74,
- 0x61, 0x74, 0x65, 0x1a, 0x86, 0x01, 0x0a, 0x07, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
- 0x1b, 0x0a, 0x09, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01,
- 0x28, 0x09, 0x52, 0x08, 0x74, 0x79, 0x70, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x0e, 0x0a, 0x02,
- 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x4e, 0x0a, 0x13,
- 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74,
- 0x69, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x74, 0x66, 0x70, 0x6c,
- 0x75, 0x67, 0x69, 0x6e, 0x36, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x61, 0x70, 0x61,
- 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x52, 0x12, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74,
- 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x1a, 0x78, 0x0a, 0x10,
- 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
- 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20,
- 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x79, 0x70, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2d, 0x0a,
- 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x74,
- 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x36, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63,
- 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x18, 0x0a, 0x07,
- 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x70,
- 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x1a, 0xd4, 0x01, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x70, 0x6f,
- 0x6e, 0x73, 0x65, 0x12, 0x5e, 0x0a, 0x12, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x5f,
- 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32,
- 0x2f, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x36, 0x2e, 0x49, 0x6d, 0x70, 0x6f,
- 0x72, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x2e,
- 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
- 0x52, 0x11, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72,
- 0x63, 0x65, 0x73, 0x12, 0x37, 0x0a, 0x0b, 0x64, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69,
- 0x63, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75,
- 0x67, 0x69, 0x6e, 0x36, 0x2e, 0x44, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x52,
- 0x0b, 0x64, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x73, 0x12, 0x2f, 0x0a, 0x08,
- 0x64, 0x65, 0x66, 0x65, 0x72, 0x72, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13,
- 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x36, 0x2e, 0x44, 0x65, 0x66, 0x65, 0x72,
- 0x72, 0x65, 0x64, 0x52, 0x08, 0x64, 0x65, 0x66, 0x65, 0x72, 0x72, 0x65, 0x64, 0x22, 0xe7, 0x03,
- 0x0a, 0x11, 0x4d, 0x6f, 0x76, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x74,
- 0x61, 0x74, 0x65, 0x1a, 0xa8, 0x02, 0x0a, 0x07, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
- 0x36, 0x0a, 0x17, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64,
- 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
- 0x52, 0x15, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72,
- 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x28, 0x0a, 0x10, 0x73, 0x6f, 0x75, 0x72, 0x63,
- 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
- 0x09, 0x52, 0x0e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x4e, 0x61, 0x6d,
- 0x65, 0x12, 0x32, 0x0a, 0x15, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x73, 0x63, 0x68, 0x65,
- 0x6d, 0x61, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03,
- 0x52, 0x13, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x56, 0x65,
- 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x36, 0x0a, 0x0c, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f,
- 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x74, 0x66,
- 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x36, 0x2e, 0x52, 0x61, 0x77, 0x53, 0x74, 0x61, 0x74, 0x65,
- 0x52, 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x28, 0x0a,
- 0x10, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x6e, 0x61, 0x6d,
- 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x54,
- 0x79, 0x70, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x6f, 0x75, 0x72, 0x63,
- 0x65, 0x5f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52,
- 0x0d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x1a, 0xa6,
- 0x01, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, 0x0c, 0x74,
- 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
- 0x0b, 0x32, 0x17, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x36, 0x2e, 0x44, 0x79,
- 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0b, 0x74, 0x61, 0x72, 0x67,
- 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x37, 0x0a, 0x0b, 0x64, 0x69, 0x61, 0x67, 0x6e,
- 0x6f, 0x73, 0x74, 0x69, 0x63, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74,
- 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x36, 0x2e, 0x44, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73,
- 0x74, 0x69, 0x63, 0x52, 0x0b, 0x64, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x73,
- 0x12, 0x25, 0x0a, 0x0e, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x70, 0x72, 0x69, 0x76, 0x61,
- 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0d, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74,
- 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x22, 0x9e, 0x03, 0x0a, 0x0e, 0x52, 0x65, 0x61, 0x64,
- 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x1a, 0xe5, 0x01, 0x0a, 0x07, 0x52,
- 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x6e,
- 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x79, 0x70, 0x65, 0x4e,
- 0x61, 0x6d, 0x65, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20,
- 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x36, 0x2e,
- 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x63, 0x6f,
- 0x6e, 0x66, 0x69, 0x67, 0x12, 0x3c, 0x0a, 0x0d, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72,
- 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x74, 0x66,
- 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x36, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x56,
- 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0c, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x4d, 0x65,
- 0x74, 0x61, 0x12, 0x4e, 0x0a, 0x13, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x61, 0x70,
- 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32,
- 0x1d, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x36, 0x2e, 0x43, 0x6c, 0x69, 0x65,
- 0x6e, 0x74, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x52, 0x12,
- 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69,
- 0x65, 0x73, 0x1a, 0xa3, 0x01, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
- 0x2d, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17,
- 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x36, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d,
- 0x69, 0x63, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x37,
- 0x0a, 0x0b, 0x64, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x73, 0x18, 0x02, 0x20,
- 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x36, 0x2e,
- 0x44, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x52, 0x0b, 0x64, 0x69, 0x61, 0x67,
- 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x73, 0x12, 0x2f, 0x0a, 0x08, 0x64, 0x65, 0x66, 0x65, 0x72,
- 0x72, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x74, 0x66, 0x70, 0x6c,
- 0x75, 0x67, 0x69, 0x6e, 0x36, 0x2e, 0x44, 0x65, 0x66, 0x65, 0x72, 0x72, 0x65, 0x64, 0x52, 0x08,
- 0x64, 0x65, 0x66, 0x65, 0x72, 0x72, 0x65, 0x64, 0x22, 0x81, 0x02, 0x0a, 0x0c, 0x47, 0x65, 0x74,
- 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x09, 0x0a, 0x07, 0x52, 0x65, 0x71,
- 0x75, 0x65, 0x73, 0x74, 0x1a, 0xe5, 0x01, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
- 0x65, 0x12, 0x4d, 0x0a, 0x09, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01,
- 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x36,
- 0x2e, 0x47, 0x65, 0x74, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x52, 0x65,
- 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73,
- 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73,
- 0x12, 0x37, 0x0a, 0x0b, 0x64, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x73, 0x18,
- 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e,
- 0x36, 0x2e, 0x44, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x52, 0x0b, 0x64, 0x69,
- 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x73, 0x1a, 0x51, 0x0a, 0x0e, 0x46, 0x75, 0x6e,
- 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b,
- 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x29, 0x0a,
- 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x74,
- 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x36, 0x2e, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f,
- 0x6e, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xd1, 0x01, 0x0a,
- 0x0c, 0x43, 0x61, 0x6c, 0x6c, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x54, 0x0a,
- 0x07, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65,
- 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x35, 0x0a, 0x09,
- 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32,
- 0x17, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x36, 0x2e, 0x44, 0x79, 0x6e, 0x61,
- 0x6d, 0x69, 0x63, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x09, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65,
- 0x6e, 0x74, 0x73, 0x1a, 0x6b, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
- 0x2f, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
- 0x17, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x36, 0x2e, 0x44, 0x79, 0x6e, 0x61,
- 0x6d, 0x69, 0x63, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74,
- 0x12, 0x2e, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32,
- 0x18, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x36, 0x2e, 0x46, 0x75, 0x6e, 0x63,
- 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72,
- 0x2a, 0x25, 0x0a, 0x0a, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4b, 0x69, 0x6e, 0x64, 0x12, 0x09,
- 0x0a, 0x05, 0x50, 0x4c, 0x41, 0x49, 0x4e, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x4d, 0x41, 0x52,
- 0x4b, 0x44, 0x4f, 0x57, 0x4e, 0x10, 0x01, 0x32, 0xa4, 0x0c, 0x0a, 0x08, 0x50, 0x72, 0x6f, 0x76,
- 0x69, 0x64, 0x65, 0x72, 0x12, 0x4e, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64,
- 0x61, 0x74, 0x61, 0x12, 0x1e, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x36, 0x2e,
- 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x71, 0x75,
- 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x36, 0x2e,
- 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x73, 0x70,
- 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x60, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x76, 0x69,
- 0x64, 0x65, 0x72, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x24, 0x2e, 0x74, 0x66, 0x70, 0x6c,
- 0x75, 0x67, 0x69, 0x6e, 0x36, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65,
- 0x72, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
- 0x25, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x36, 0x2e, 0x47, 0x65, 0x74, 0x50,
- 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x52, 0x65,
- 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6f, 0x0a, 0x16, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61,
- 0x74, 0x65, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67,
- 0x12, 0x29, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x36, 0x2e, 0x56, 0x61, 0x6c,
- 0x69, 0x64, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x43, 0x6f, 0x6e,
- 0x66, 0x69, 0x67, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x74, 0x66,
- 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x36, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65,
- 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x52,
- 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6f, 0x0a, 0x16, 0x56, 0x61, 0x6c, 0x69, 0x64,
- 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69,
- 0x67, 0x12, 0x29, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x36, 0x2e, 0x56, 0x61,
- 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f,
- 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x74,
- 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x36, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74,
- 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e,
- 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7b, 0x0a, 0x1a, 0x56, 0x61, 0x6c, 0x69,
- 0x64, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
- 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x2d, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69,
- 0x6e, 0x36, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x52,
- 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x52, 0x65,
- 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e,
- 0x36, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65,
- 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x52, 0x65, 0x73,
- 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x69, 0x0a, 0x14, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65,
- 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x27, 0x2e,
- 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x36, 0x2e, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64,
- 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x52,
- 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69,
- 0x6e, 0x36, 0x2e, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72,
- 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
- 0x12, 0x60, 0x0a, 0x11, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x65, 0x50, 0x72, 0x6f,
- 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x24, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e,
- 0x36, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x65, 0x50, 0x72, 0x6f, 0x76, 0x69,
- 0x64, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x74, 0x66,
- 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x36, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72,
- 0x65, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
- 0x73, 0x65, 0x12, 0x51, 0x0a, 0x0c, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72,
- 0x63, 0x65, 0x12, 0x1f, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x36, 0x2e, 0x52,
- 0x65, 0x61, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x52, 0x65, 0x71, 0x75,
- 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x36, 0x2e,
- 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x52, 0x65, 0x73,
- 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x63, 0x0a, 0x12, 0x50, 0x6c, 0x61, 0x6e, 0x52, 0x65, 0x73,
- 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x25, 0x2e, 0x74, 0x66,
- 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x36, 0x2e, 0x50, 0x6c, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x6f,
- 0x75, 0x72, 0x63, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65,
- 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x36, 0x2e, 0x50,
- 0x6c, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67,
- 0x65, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x66, 0x0a, 0x13, 0x41, 0x70,
- 0x70, 0x6c, 0x79, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67,
- 0x65, 0x12, 0x26, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x36, 0x2e, 0x41, 0x70,
- 0x70, 0x6c, 0x79, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67,
- 0x65, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x74, 0x66, 0x70, 0x6c,
- 0x75, 0x67, 0x69, 0x6e, 0x36, 0x2e, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x52, 0x65, 0x73, 0x6f, 0x75,
- 0x72, 0x63, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
- 0x73, 0x65, 0x12, 0x66, 0x0a, 0x13, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x73, 0x6f,
- 0x75, 0x72, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x26, 0x2e, 0x74, 0x66, 0x70, 0x6c,
- 0x75, 0x67, 0x69, 0x6e, 0x36, 0x2e, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x73, 0x6f,
- 0x75, 0x72, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
- 0x74, 0x1a, 0x27, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x36, 0x2e, 0x49, 0x6d,
- 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74,
- 0x65, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x60, 0x0a, 0x11, 0x4d, 0x6f,
- 0x76, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12,
- 0x24, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x36, 0x2e, 0x4d, 0x6f, 0x76, 0x65,
- 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x52, 0x65,
- 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e,
- 0x36, 0x2e, 0x4d, 0x6f, 0x76, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x74,
- 0x61, 0x74, 0x65, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x57, 0x0a, 0x0e,
- 0x52, 0x65, 0x61, 0x64, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x21,
- 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x36, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x44,
- 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
- 0x74, 0x1a, 0x22, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x36, 0x2e, 0x52, 0x65,
- 0x61, 0x64, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x52, 0x65, 0x73,
- 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x46, 0x75, 0x6e, 0x63,
- 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1f, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e,
- 0x36, 0x2e, 0x47, 0x65, 0x74, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x52,
- 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69,
- 0x6e, 0x36, 0x2e, 0x47, 0x65, 0x74, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e,
- 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, 0x0c, 0x43, 0x61, 0x6c, 0x6c,
- 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x2e, 0x74, 0x66, 0x70, 0x6c, 0x75,
- 0x67, 0x69, 0x6e, 0x36, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f,
- 0x6e, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x74, 0x66, 0x70, 0x6c,
- 0x75, 0x67, 0x69, 0x6e, 0x36, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69,
- 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, 0x0c, 0x53,
- 0x74, 0x6f, 0x70, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x1f, 0x2e, 0x74, 0x66,
- 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x36, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x50, 0x72, 0x6f, 0x76,
- 0x69, 0x64, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x74,
- 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x36, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x50, 0x72, 0x6f,
- 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x47,
- 0x5a, 0x45, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x68, 0x61, 0x73,
- 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2f, 0x74, 0x65, 0x72, 0x72, 0x61, 0x66, 0x6f, 0x72, 0x6d,
- 0x2d, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2d, 0x67, 0x6f, 0x2f, 0x74, 0x66, 0x70, 0x72, 0x6f,
- 0x74, 0x6f, 0x76, 0x36, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x74, 0x66,
- 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x36, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
-}
+const file_tfplugin6_proto_rawDesc = "" +
+ "\n" +
+ "\x0ftfplugin6.proto\x12\ttfplugin6\x1a\x1fgoogle/protobuf/timestamp.proto\"<\n" +
+ "\fDynamicValue\x12\x18\n" +
+ "\amsgpack\x18\x01 \x01(\fR\amsgpack\x12\x12\n" +
+ "\x04json\x18\x02 \x01(\fR\x04json\"\xe3\x01\n" +
+ "\n" +
+ "Diagnostic\x12:\n" +
+ "\bseverity\x18\x01 \x01(\x0e2\x1e.tfplugin6.Diagnostic.SeverityR\bseverity\x12\x18\n" +
+ "\asummary\x18\x02 \x01(\tR\asummary\x12\x16\n" +
+ "\x06detail\x18\x03 \x01(\tR\x06detail\x126\n" +
+ "\tattribute\x18\x04 \x01(\v2\x18.tfplugin6.AttributePathR\tattribute\"/\n" +
+ "\bSeverity\x12\v\n" +
+ "\aINVALID\x10\x00\x12\t\n" +
+ "\x05ERROR\x10\x01\x12\v\n" +
+ "\aWARNING\x10\x02\"k\n" +
+ "\rFunctionError\x12\x12\n" +
+ "\x04text\x18\x01 \x01(\tR\x04text\x120\n" +
+ "\x11function_argument\x18\x02 \x01(\x03H\x00R\x10functionArgument\x88\x01\x01B\x14\n" +
+ "\x12_function_argument\"\xdc\x01\n" +
+ "\rAttributePath\x123\n" +
+ "\x05steps\x18\x01 \x03(\v2\x1d.tfplugin6.AttributePath.StepR\x05steps\x1a\x95\x01\n" +
+ "\x04Step\x12'\n" +
+ "\x0eattribute_name\x18\x01 \x01(\tH\x00R\rattributeName\x12.\n" +
+ "\x12element_key_string\x18\x02 \x01(\tH\x00R\x10elementKeyString\x12(\n" +
+ "\x0felement_key_int\x18\x03 \x01(\x03H\x00R\relementKeyIntB\n" +
+ "\n" +
+ "\bselector\";\n" +
+ "\fStopProvider\x1a\t\n" +
+ "\aRequest\x1a \n" +
+ "\bResponse\x12\x14\n" +
+ "\x05Error\x18\x01 \x01(\tR\x05Error\"\x96\x01\n" +
+ "\bRawState\x12\x12\n" +
+ "\x04json\x18\x01 \x01(\fR\x04json\x12:\n" +
+ "\aflatmap\x18\x02 \x03(\v2 .tfplugin6.RawState.FlatmapEntryR\aflatmap\x1a:\n" +
+ "\fFlatmapEntry\x12\x10\n" +
+ "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
+ "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\xb4\n" +
+ "\n" +
+ "\x06Schema\x12\x18\n" +
+ "\aversion\x18\x01 \x01(\x03R\aversion\x12-\n" +
+ "\x05block\x18\x02 \x01(\v2\x17.tfplugin6.Schema.BlockR\x05block\x1a\xa2\x02\n" +
+ "\x05Block\x12\x18\n" +
+ "\aversion\x18\x01 \x01(\x03R\aversion\x12;\n" +
+ "\n" +
+ "attributes\x18\x02 \x03(\v2\x1b.tfplugin6.Schema.AttributeR\n" +
+ "attributes\x12>\n" +
+ "\vblock_types\x18\x03 \x03(\v2\x1d.tfplugin6.Schema.NestedBlockR\n" +
+ "blockTypes\x12 \n" +
+ "\vdescription\x18\x04 \x01(\tR\vdescription\x12@\n" +
+ "\x10description_kind\x18\x05 \x01(\x0e2\x15.tfplugin6.StringKindR\x0fdescriptionKind\x12\x1e\n" +
+ "\n" +
+ "deprecated\x18\x06 \x01(\bR\n" +
+ "deprecated\x1a\x83\x03\n" +
+ "\tAttribute\x12\x12\n" +
+ "\x04name\x18\x01 \x01(\tR\x04name\x12\x12\n" +
+ "\x04type\x18\x02 \x01(\fR\x04type\x129\n" +
+ "\vnested_type\x18\n" +
+ " \x01(\v2\x18.tfplugin6.Schema.ObjectR\n" +
+ "nestedType\x12 \n" +
+ "\vdescription\x18\x03 \x01(\tR\vdescription\x12\x1a\n" +
+ "\brequired\x18\x04 \x01(\bR\brequired\x12\x1a\n" +
+ "\boptional\x18\x05 \x01(\bR\boptional\x12\x1a\n" +
+ "\bcomputed\x18\x06 \x01(\bR\bcomputed\x12\x1c\n" +
+ "\tsensitive\x18\a \x01(\bR\tsensitive\x12@\n" +
+ "\x10description_kind\x18\b \x01(\x0e2\x15.tfplugin6.StringKindR\x0fdescriptionKind\x12\x1e\n" +
+ "\n" +
+ "deprecated\x18\t \x01(\bR\n" +
+ "deprecated\x12\x1d\n" +
+ "\n" +
+ "write_only\x18\v \x01(\bR\twriteOnly\x1a\xa7\x02\n" +
+ "\vNestedBlock\x12\x1b\n" +
+ "\ttype_name\x18\x01 \x01(\tR\btypeName\x12-\n" +
+ "\x05block\x18\x02 \x01(\v2\x17.tfplugin6.Schema.BlockR\x05block\x12C\n" +
+ "\anesting\x18\x03 \x01(\x0e2).tfplugin6.Schema.NestedBlock.NestingModeR\anesting\x12\x1b\n" +
+ "\tmin_items\x18\x04 \x01(\x03R\bminItems\x12\x1b\n" +
+ "\tmax_items\x18\x05 \x01(\x03R\bmaxItems\"M\n" +
+ "\vNestingMode\x12\v\n" +
+ "\aINVALID\x10\x00\x12\n" +
+ "\n" +
+ "\x06SINGLE\x10\x01\x12\b\n" +
+ "\x04LIST\x10\x02\x12\a\n" +
+ "\x03SET\x10\x03\x12\a\n" +
+ "\x03MAP\x10\x04\x12\t\n" +
+ "\x05GROUP\x10\x05\x1a\x8b\x02\n" +
+ "\x06Object\x12;\n" +
+ "\n" +
+ "attributes\x18\x01 \x03(\v2\x1b.tfplugin6.Schema.AttributeR\n" +
+ "attributes\x12>\n" +
+ "\anesting\x18\x03 \x01(\x0e2$.tfplugin6.Schema.Object.NestingModeR\anesting\x12\x1f\n" +
+ "\tmin_items\x18\x04 \x01(\x03B\x02\x18\x01R\bminItems\x12\x1f\n" +
+ "\tmax_items\x18\x05 \x01(\x03B\x02\x18\x01R\bmaxItems\"B\n" +
+ "\vNestingMode\x12\v\n" +
+ "\aINVALID\x10\x00\x12\n" +
+ "\n" +
+ "\x06SINGLE\x10\x01\x12\b\n" +
+ "\x04LIST\x10\x02\x12\a\n" +
+ "\x03SET\x10\x03\x12\a\n" +
+ "\x03MAP\x10\x04\"\xd8\x02\n" +
+ "\x16ResourceIdentitySchema\x12\x18\n" +
+ "\aversion\x18\x01 \x01(\x03R\aversion\x12d\n" +
+ "\x13identity_attributes\x18\x02 \x03(\v23.tfplugin6.ResourceIdentitySchema.IdentityAttributeR\x12identityAttributes\x1a\xbd\x01\n" +
+ "\x11IdentityAttribute\x12\x12\n" +
+ "\x04name\x18\x01 \x01(\tR\x04name\x12\x12\n" +
+ "\x04type\x18\x02 \x01(\fR\x04type\x12.\n" +
+ "\x13required_for_import\x18\x03 \x01(\bR\x11requiredForImport\x12.\n" +
+ "\x13optional_for_import\x18\x04 \x01(\bR\x11optionalForImport\x12 \n" +
+ "\vdescription\x18\x05 \x01(\tR\vdescription\"T\n" +
+ "\x14ResourceIdentityData\x12<\n" +
+ "\ridentity_data\x18\x01 \x01(\v2\x17.tfplugin6.DynamicValueR\fidentityData\"\x8e\x05\n" +
+ "\bFunction\x12=\n" +
+ "\n" +
+ "parameters\x18\x01 \x03(\v2\x1d.tfplugin6.Function.ParameterR\n" +
+ "parameters\x12L\n" +
+ "\x12variadic_parameter\x18\x02 \x01(\v2\x1d.tfplugin6.Function.ParameterR\x11variadicParameter\x122\n" +
+ "\x06return\x18\x03 \x01(\v2\x1a.tfplugin6.Function.ReturnR\x06return\x12\x18\n" +
+ "\asummary\x18\x04 \x01(\tR\asummary\x12 \n" +
+ "\vdescription\x18\x05 \x01(\tR\vdescription\x12@\n" +
+ "\x10description_kind\x18\x06 \x01(\x0e2\x15.tfplugin6.StringKindR\x0fdescriptionKind\x12/\n" +
+ "\x13deprecation_message\x18\a \x01(\tR\x12deprecationMessage\x1a\xf3\x01\n" +
+ "\tParameter\x12\x12\n" +
+ "\x04name\x18\x01 \x01(\tR\x04name\x12\x12\n" +
+ "\x04type\x18\x02 \x01(\fR\x04type\x12(\n" +
+ "\x10allow_null_value\x18\x03 \x01(\bR\x0eallowNullValue\x120\n" +
+ "\x14allow_unknown_values\x18\x04 \x01(\bR\x12allowUnknownValues\x12 \n" +
+ "\vdescription\x18\x05 \x01(\tR\vdescription\x12@\n" +
+ "\x10description_kind\x18\x06 \x01(\x0e2\x15.tfplugin6.StringKindR\x0fdescriptionKind\x1a\x1c\n" +
+ "\x06Return\x12\x12\n" +
+ "\x04type\x18\x01 \x01(\fR\x04type\"9\n" +
+ "\fActionSchema\x12)\n" +
+ "\x06schema\x18\x01 \x01(\v2\x11.tfplugin6.SchemaR\x06schema\"\xa8\x01\n" +
+ "\x12ServerCapabilities\x12!\n" +
+ "\fplan_destroy\x18\x01 \x01(\bR\vplanDestroy\x12?\n" +
+ "\x1cget_provider_schema_optional\x18\x02 \x01(\bR\x19getProviderSchemaOptional\x12.\n" +
+ "\x13move_resource_state\x18\x03 \x01(\bR\x11moveResourceState\"\x82\x01\n" +
+ "\x12ClientCapabilities\x12)\n" +
+ "\x10deferral_allowed\x18\x01 \x01(\bR\x0fdeferralAllowed\x12A\n" +
+ "\x1dwrite_only_attributes_allowed\x18\x02 \x01(\bR\x1awriteOnlyAttributesAllowed\"\xa2\x01\n" +
+ "\bDeferred\x122\n" +
+ "\x06reason\x18\x01 \x01(\x0e2\x1a.tfplugin6.Deferred.ReasonR\x06reason\"b\n" +
+ "\x06Reason\x12\v\n" +
+ "\aUNKNOWN\x10\x00\x12\x1b\n" +
+ "\x17RESOURCE_CONFIG_UNKNOWN\x10\x01\x12\x1b\n" +
+ "\x17PROVIDER_CONFIG_UNKNOWN\x10\x02\x12\x11\n" +
+ "\rABSENT_PREREQ\x10\x03\"\xb2\a\n" +
+ "\vGetMetadata\x1a\t\n" +
+ "\aRequest\x1a\xed\x04\n" +
+ "\bResponse\x12N\n" +
+ "\x13server_capabilities\x18\x01 \x01(\v2\x1d.tfplugin6.ServerCapabilitiesR\x12serverCapabilities\x127\n" +
+ "\vdiagnostics\x18\x02 \x03(\v2\x15.tfplugin6.DiagnosticR\vdiagnostics\x12L\n" +
+ "\fdata_sources\x18\x03 \x03(\v2).tfplugin6.GetMetadata.DataSourceMetadataR\vdataSources\x12E\n" +
+ "\tresources\x18\x04 \x03(\v2'.tfplugin6.GetMetadata.ResourceMetadataR\tresources\x12E\n" +
+ "\tfunctions\x18\x05 \x03(\v2'.tfplugin6.GetMetadata.FunctionMetadataR\tfunctions\x12a\n" +
+ "\x13ephemeral_resources\x18\x06 \x03(\v20.tfplugin6.GetMetadata.EphemeralResourceMetadataR\x12ephemeralResources\x12R\n" +
+ "\x0elist_resources\x18\a \x03(\v2+.tfplugin6.GetMetadata.ListResourceMetadataR\rlistResources\x12?\n" +
+ "\aactions\x18\t \x03(\v2%.tfplugin6.GetMetadata.ActionMetadataR\aactionsJ\x04\b\b\x10\t\x1a&\n" +
+ "\x10FunctionMetadata\x12\x12\n" +
+ "\x04name\x18\x01 \x01(\tR\x04name\x1a1\n" +
+ "\x12DataSourceMetadata\x12\x1b\n" +
+ "\ttype_name\x18\x01 \x01(\tR\btypeName\x1a/\n" +
+ "\x10ResourceMetadata\x12\x1b\n" +
+ "\ttype_name\x18\x01 \x01(\tR\btypeName\x1a8\n" +
+ "\x19EphemeralResourceMetadata\x12\x1b\n" +
+ "\ttype_name\x18\x01 \x01(\tR\btypeName\x1a3\n" +
+ "\x14ListResourceMetadata\x12\x1b\n" +
+ "\ttype_name\x18\x01 \x01(\tR\btypeName\x1a-\n" +
+ "\x0eActionMetadata\x12\x1b\n" +
+ "\ttype_name\x18\x01 \x01(\tR\btypeName\"\xbc\v\n" +
+ "\x11GetProviderSchema\x1a\t\n" +
+ "\aRequest\x1a\x9b\v\n" +
+ "\bResponse\x12-\n" +
+ "\bprovider\x18\x01 \x01(\v2\x11.tfplugin6.SchemaR\bprovider\x12e\n" +
+ "\x10resource_schemas\x18\x02 \x03(\v2:.tfplugin6.GetProviderSchema.Response.ResourceSchemasEntryR\x0fresourceSchemas\x12l\n" +
+ "\x13data_source_schemas\x18\x03 \x03(\v2<.tfplugin6.GetProviderSchema.Response.DataSourceSchemasEntryR\x11dataSourceSchemas\x127\n" +
+ "\vdiagnostics\x18\x04 \x03(\v2\x15.tfplugin6.DiagnosticR\vdiagnostics\x126\n" +
+ "\rprovider_meta\x18\x05 \x01(\v2\x11.tfplugin6.SchemaR\fproviderMeta\x12N\n" +
+ "\x13server_capabilities\x18\x06 \x01(\v2\x1d.tfplugin6.ServerCapabilitiesR\x12serverCapabilities\x12R\n" +
+ "\tfunctions\x18\a \x03(\v24.tfplugin6.GetProviderSchema.Response.FunctionsEntryR\tfunctions\x12\x81\x01\n" +
+ "\x1aephemeral_resource_schemas\x18\b \x03(\v2C.tfplugin6.GetProviderSchema.Response.EphemeralResourceSchemasEntryR\x18ephemeralResourceSchemas\x12r\n" +
+ "\x15list_resource_schemas\x18\t \x03(\v2>.tfplugin6.GetProviderSchema.Response.ListResourceSchemasEntryR\x13listResourceSchemas\x12_\n" +
+ "\x0eaction_schemas\x18\v \x03(\v28.tfplugin6.GetProviderSchema.Response.ActionSchemasEntryR\ractionSchemas\x1aU\n" +
+ "\x14ResourceSchemasEntry\x12\x10\n" +
+ "\x03key\x18\x01 \x01(\tR\x03key\x12'\n" +
+ "\x05value\x18\x02 \x01(\v2\x11.tfplugin6.SchemaR\x05value:\x028\x01\x1aW\n" +
+ "\x16DataSourceSchemasEntry\x12\x10\n" +
+ "\x03key\x18\x01 \x01(\tR\x03key\x12'\n" +
+ "\x05value\x18\x02 \x01(\v2\x11.tfplugin6.SchemaR\x05value:\x028\x01\x1aQ\n" +
+ "\x0eFunctionsEntry\x12\x10\n" +
+ "\x03key\x18\x01 \x01(\tR\x03key\x12)\n" +
+ "\x05value\x18\x02 \x01(\v2\x13.tfplugin6.FunctionR\x05value:\x028\x01\x1a^\n" +
+ "\x1dEphemeralResourceSchemasEntry\x12\x10\n" +
+ "\x03key\x18\x01 \x01(\tR\x03key\x12'\n" +
+ "\x05value\x18\x02 \x01(\v2\x11.tfplugin6.SchemaR\x05value:\x028\x01\x1aY\n" +
+ "\x18ListResourceSchemasEntry\x12\x10\n" +
+ "\x03key\x18\x01 \x01(\tR\x03key\x12'\n" +
+ "\x05value\x18\x02 \x01(\v2\x11.tfplugin6.SchemaR\x05value:\x028\x01\x1aY\n" +
+ "\x12ActionSchemasEntry\x12\x10\n" +
+ "\x03key\x18\x01 \x01(\tR\x03key\x12-\n" +
+ "\x05value\x18\x02 \x01(\v2\x17.tfplugin6.ActionSchemaR\x05value:\x028\x01J\x04\b\n" +
+ "\x10\v\"\x99\x01\n" +
+ "\x16ValidateProviderConfig\x1a:\n" +
+ "\aRequest\x12/\n" +
+ "\x06config\x18\x01 \x01(\v2\x17.tfplugin6.DynamicValueR\x06config\x1aC\n" +
+ "\bResponse\x127\n" +
+ "\vdiagnostics\x18\x02 \x03(\v2\x15.tfplugin6.DiagnosticR\vdiagnostics\"\x90\x02\n" +
+ "\x14UpgradeResourceState\x1ar\n" +
+ "\aRequest\x12\x1b\n" +
+ "\ttype_name\x18\x01 \x01(\tR\btypeName\x12\x18\n" +
+ "\aversion\x18\x02 \x01(\x03R\aversion\x120\n" +
+ "\traw_state\x18\x03 \x01(\v2\x13.tfplugin6.RawStateR\brawState\x1a\x83\x01\n" +
+ "\bResponse\x12>\n" +
+ "\x0eupgraded_state\x18\x01 \x01(\v2\x17.tfplugin6.DynamicValueR\rupgradedState\x127\n" +
+ "\vdiagnostics\x18\x02 \x03(\v2\x15.tfplugin6.DiagnosticR\vdiagnostics\"\x87\x02\n" +
+ "\x16ValidateResourceConfig\x1a\xa7\x01\n" +
+ "\aRequest\x12\x1b\n" +
+ "\ttype_name\x18\x01 \x01(\tR\btypeName\x12/\n" +
+ "\x06config\x18\x02 \x01(\v2\x17.tfplugin6.DynamicValueR\x06config\x12N\n" +
+ "\x13client_capabilities\x18\x03 \x01(\v2\x1d.tfplugin6.ClientCapabilitiesR\x12clientCapabilities\x1aC\n" +
+ "\bResponse\x127\n" +
+ "\vdiagnostics\x18\x01 \x03(\v2\x15.tfplugin6.DiagnosticR\vdiagnostics\"\xba\x01\n" +
+ "\x1aValidateDataResourceConfig\x1aW\n" +
+ "\aRequest\x12\x1b\n" +
+ "\ttype_name\x18\x01 \x01(\tR\btypeName\x12/\n" +
+ "\x06config\x18\x02 \x01(\v2\x17.tfplugin6.DynamicValueR\x06config\x1aC\n" +
+ "\bResponse\x127\n" +
+ "\vdiagnostics\x18\x01 \x03(\v2\x15.tfplugin6.DiagnosticR\vdiagnostics\"\x92\x02\n" +
+ "\x11ConfigureProvider\x1a\xb7\x01\n" +
+ "\aRequest\x12+\n" +
+ "\x11terraform_version\x18\x01 \x01(\tR\x10terraformVersion\x12/\n" +
+ "\x06config\x18\x02 \x01(\v2\x17.tfplugin6.DynamicValueR\x06config\x12N\n" +
+ "\x13client_capabilities\x18\x03 \x01(\v2\x1d.tfplugin6.ClientCapabilitiesR\x12clientCapabilities\x1aC\n" +
+ "\bResponse\x127\n" +
+ "\vdiagnostics\x18\x01 \x03(\v2\x15.tfplugin6.DiagnosticR\vdiagnostics\"\xf4\x04\n" +
+ "\fReadResource\x1a\xd8\x02\n" +
+ "\aRequest\x12\x1b\n" +
+ "\ttype_name\x18\x01 \x01(\tR\btypeName\x12<\n" +
+ "\rcurrent_state\x18\x02 \x01(\v2\x17.tfplugin6.DynamicValueR\fcurrentState\x12\x18\n" +
+ "\aprivate\x18\x03 \x01(\fR\aprivate\x12<\n" +
+ "\rprovider_meta\x18\x04 \x01(\v2\x17.tfplugin6.DynamicValueR\fproviderMeta\x12N\n" +
+ "\x13client_capabilities\x18\x05 \x01(\v2\x1d.tfplugin6.ClientCapabilitiesR\x12clientCapabilities\x12J\n" +
+ "\x10current_identity\x18\x06 \x01(\v2\x1f.tfplugin6.ResourceIdentityDataR\x0fcurrentIdentity\x1a\x88\x02\n" +
+ "\bResponse\x124\n" +
+ "\tnew_state\x18\x01 \x01(\v2\x17.tfplugin6.DynamicValueR\bnewState\x127\n" +
+ "\vdiagnostics\x18\x02 \x03(\v2\x15.tfplugin6.DiagnosticR\vdiagnostics\x12\x18\n" +
+ "\aprivate\x18\x03 \x01(\fR\aprivate\x12/\n" +
+ "\bdeferred\x18\x04 \x01(\v2\x13.tfplugin6.DeferredR\bdeferred\x12B\n" +
+ "\fnew_identity\x18\x05 \x01(\v2\x1f.tfplugin6.ResourceIdentityDataR\vnewIdentity\"\x87\a\n" +
+ "\x12PlanResourceChange\x1a\xd3\x03\n" +
+ "\aRequest\x12\x1b\n" +
+ "\ttype_name\x18\x01 \x01(\tR\btypeName\x128\n" +
+ "\vprior_state\x18\x02 \x01(\v2\x17.tfplugin6.DynamicValueR\n" +
+ "priorState\x12E\n" +
+ "\x12proposed_new_state\x18\x03 \x01(\v2\x17.tfplugin6.DynamicValueR\x10proposedNewState\x12/\n" +
+ "\x06config\x18\x04 \x01(\v2\x17.tfplugin6.DynamicValueR\x06config\x12#\n" +
+ "\rprior_private\x18\x05 \x01(\fR\fpriorPrivate\x12<\n" +
+ "\rprovider_meta\x18\x06 \x01(\v2\x17.tfplugin6.DynamicValueR\fproviderMeta\x12N\n" +
+ "\x13client_capabilities\x18\a \x01(\v2\x1d.tfplugin6.ClientCapabilitiesR\x12clientCapabilities\x12F\n" +
+ "\x0eprior_identity\x18\b \x01(\v2\x1f.tfplugin6.ResourceIdentityDataR\rpriorIdentity\x1a\x9a\x03\n" +
+ "\bResponse\x12<\n" +
+ "\rplanned_state\x18\x01 \x01(\v2\x17.tfplugin6.DynamicValueR\fplannedState\x12C\n" +
+ "\x10requires_replace\x18\x02 \x03(\v2\x18.tfplugin6.AttributePathR\x0frequiresReplace\x12'\n" +
+ "\x0fplanned_private\x18\x03 \x01(\fR\x0eplannedPrivate\x127\n" +
+ "\vdiagnostics\x18\x04 \x03(\v2\x15.tfplugin6.DiagnosticR\vdiagnostics\x12,\n" +
+ "\x12legacy_type_system\x18\x05 \x01(\bR\x10legacyTypeSystem\x12/\n" +
+ "\bdeferred\x18\x06 \x01(\v2\x13.tfplugin6.DeferredR\bdeferred\x12J\n" +
+ "\x10planned_identity\x18\a \x01(\v2\x1f.tfplugin6.ResourceIdentityDataR\x0fplannedIdentity\"\xa2\x05\n" +
+ "\x13ApplyResourceChange\x1a\x82\x03\n" +
+ "\aRequest\x12\x1b\n" +
+ "\ttype_name\x18\x01 \x01(\tR\btypeName\x128\n" +
+ "\vprior_state\x18\x02 \x01(\v2\x17.tfplugin6.DynamicValueR\n" +
+ "priorState\x12<\n" +
+ "\rplanned_state\x18\x03 \x01(\v2\x17.tfplugin6.DynamicValueR\fplannedState\x12/\n" +
+ "\x06config\x18\x04 \x01(\v2\x17.tfplugin6.DynamicValueR\x06config\x12'\n" +
+ "\x0fplanned_private\x18\x05 \x01(\fR\x0eplannedPrivate\x12<\n" +
+ "\rprovider_meta\x18\x06 \x01(\v2\x17.tfplugin6.DynamicValueR\fproviderMeta\x12J\n" +
+ "\x10planned_identity\x18\a \x01(\v2\x1f.tfplugin6.ResourceIdentityDataR\x0fplannedIdentity\x1a\x85\x02\n" +
+ "\bResponse\x124\n" +
+ "\tnew_state\x18\x01 \x01(\v2\x17.tfplugin6.DynamicValueR\bnewState\x12\x18\n" +
+ "\aprivate\x18\x02 \x01(\fR\aprivate\x127\n" +
+ "\vdiagnostics\x18\x03 \x03(\v2\x15.tfplugin6.DiagnosticR\vdiagnostics\x12,\n" +
+ "\x12legacy_type_system\x18\x04 \x01(\bR\x10legacyTypeSystem\x12B\n" +
+ "\fnew_identity\x18\x05 \x01(\v2\x1f.tfplugin6.ResourceIdentityDataR\vnewIdentity\"\xea\x04\n" +
+ "\x13ImportResourceState\x1a\xc3\x01\n" +
+ "\aRequest\x12\x1b\n" +
+ "\ttype_name\x18\x01 \x01(\tR\btypeName\x12\x0e\n" +
+ "\x02id\x18\x02 \x01(\tR\x02id\x12N\n" +
+ "\x13client_capabilities\x18\x03 \x01(\v2\x1d.tfplugin6.ClientCapabilitiesR\x12clientCapabilities\x12;\n" +
+ "\bidentity\x18\x04 \x01(\v2\x1f.tfplugin6.ResourceIdentityDataR\bidentity\x1a\xb5\x01\n" +
+ "\x10ImportedResource\x12\x1b\n" +
+ "\ttype_name\x18\x01 \x01(\tR\btypeName\x12-\n" +
+ "\x05state\x18\x02 \x01(\v2\x17.tfplugin6.DynamicValueR\x05state\x12\x18\n" +
+ "\aprivate\x18\x03 \x01(\fR\aprivate\x12;\n" +
+ "\bidentity\x18\x04 \x01(\v2\x1f.tfplugin6.ResourceIdentityDataR\bidentity\x1a\xd4\x01\n" +
+ "\bResponse\x12^\n" +
+ "\x12imported_resources\x18\x01 \x03(\v2/.tfplugin6.ImportResourceState.ImportedResourceR\x11importedResources\x127\n" +
+ "\vdiagnostics\x18\x02 \x03(\v2\x15.tfplugin6.DiagnosticR\vdiagnostics\x12/\n" +
+ "\bdeferred\x18\x03 \x01(\v2\x13.tfplugin6.DeferredR\bdeferred\"\xb4\x05\n" +
+ "\x11MoveResourceState\x1a\xab\x03\n" +
+ "\aRequest\x126\n" +
+ "\x17source_provider_address\x18\x01 \x01(\tR\x15sourceProviderAddress\x12(\n" +
+ "\x10source_type_name\x18\x02 \x01(\tR\x0esourceTypeName\x122\n" +
+ "\x15source_schema_version\x18\x03 \x01(\x03R\x13sourceSchemaVersion\x126\n" +
+ "\fsource_state\x18\x04 \x01(\v2\x13.tfplugin6.RawStateR\vsourceState\x12(\n" +
+ "\x10target_type_name\x18\x05 \x01(\tR\x0etargetTypeName\x12%\n" +
+ "\x0esource_private\x18\x06 \x01(\fR\rsourcePrivate\x12<\n" +
+ "\x0fsource_identity\x18\a \x01(\v2\x13.tfplugin6.RawStateR\x0esourceIdentity\x12C\n" +
+ "\x1esource_identity_schema_version\x18\b \x01(\x03R\x1bsourceIdentitySchemaVersion\x1a\xf0\x01\n" +
+ "\bResponse\x12:\n" +
+ "\ftarget_state\x18\x01 \x01(\v2\x17.tfplugin6.DynamicValueR\vtargetState\x127\n" +
+ "\vdiagnostics\x18\x02 \x03(\v2\x15.tfplugin6.DiagnosticR\vdiagnostics\x12%\n" +
+ "\x0etarget_private\x18\x03 \x01(\fR\rtargetPrivate\x12H\n" +
+ "\x0ftarget_identity\x18\x04 \x01(\v2\x1f.tfplugin6.ResourceIdentityDataR\x0etargetIdentity\"\x9e\x03\n" +
+ "\x0eReadDataSource\x1a\xe5\x01\n" +
+ "\aRequest\x12\x1b\n" +
+ "\ttype_name\x18\x01 \x01(\tR\btypeName\x12/\n" +
+ "\x06config\x18\x02 \x01(\v2\x17.tfplugin6.DynamicValueR\x06config\x12<\n" +
+ "\rprovider_meta\x18\x03 \x01(\v2\x17.tfplugin6.DynamicValueR\fproviderMeta\x12N\n" +
+ "\x13client_capabilities\x18\x04 \x01(\v2\x1d.tfplugin6.ClientCapabilitiesR\x12clientCapabilities\x1a\xa3\x01\n" +
+ "\bResponse\x12-\n" +
+ "\x05state\x18\x01 \x01(\v2\x17.tfplugin6.DynamicValueR\x05state\x127\n" +
+ "\vdiagnostics\x18\x02 \x03(\v2\x15.tfplugin6.DiagnosticR\vdiagnostics\x12/\n" +
+ "\bdeferred\x18\x03 \x01(\v2\x13.tfplugin6.DeferredR\bdeferred\"\x81\x02\n" +
+ "\fGetFunctions\x1a\t\n" +
+ "\aRequest\x1a\xe5\x01\n" +
+ "\bResponse\x12M\n" +
+ "\tfunctions\x18\x01 \x03(\v2/.tfplugin6.GetFunctions.Response.FunctionsEntryR\tfunctions\x127\n" +
+ "\vdiagnostics\x18\x02 \x03(\v2\x15.tfplugin6.DiagnosticR\vdiagnostics\x1aQ\n" +
+ "\x0eFunctionsEntry\x12\x10\n" +
+ "\x03key\x18\x01 \x01(\tR\x03key\x12)\n" +
+ "\x05value\x18\x02 \x01(\v2\x13.tfplugin6.FunctionR\x05value:\x028\x01\"\xd1\x01\n" +
+ "\fCallFunction\x1aT\n" +
+ "\aRequest\x12\x12\n" +
+ "\x04name\x18\x01 \x01(\tR\x04name\x125\n" +
+ "\targuments\x18\x02 \x03(\v2\x17.tfplugin6.DynamicValueR\targuments\x1ak\n" +
+ "\bResponse\x12/\n" +
+ "\x06result\x18\x01 \x01(\v2\x17.tfplugin6.DynamicValueR\x06result\x12.\n" +
+ "\x05error\x18\x02 \x01(\v2\x18.tfplugin6.FunctionErrorR\x05error\"\xbf\x01\n" +
+ "\x1fValidateEphemeralResourceConfig\x1aW\n" +
+ "\aRequest\x12\x1b\n" +
+ "\ttype_name\x18\x01 \x01(\tR\btypeName\x12/\n" +
+ "\x06config\x18\x02 \x01(\v2\x17.tfplugin6.DynamicValueR\x06config\x1aC\n" +
+ "\bResponse\x127\n" +
+ "\vdiagnostics\x18\x01 \x03(\v2\x15.tfplugin6.DiagnosticR\vdiagnostics\"\xdd\x03\n" +
+ "\x15OpenEphemeralResource\x1a\xa7\x01\n" +
+ "\aRequest\x12\x1b\n" +
+ "\ttype_name\x18\x01 \x01(\tR\btypeName\x12/\n" +
+ "\x06config\x18\x02 \x01(\v2\x17.tfplugin6.DynamicValueR\x06config\x12N\n" +
+ "\x13client_capabilities\x18\x03 \x01(\v2\x1d.tfplugin6.ClientCapabilitiesR\x12clientCapabilities\x1a\x99\x02\n" +
+ "\bResponse\x127\n" +
+ "\vdiagnostics\x18\x01 \x03(\v2\x15.tfplugin6.DiagnosticR\vdiagnostics\x12:\n" +
+ "\brenew_at\x18\x02 \x01(\v2\x1a.google.protobuf.TimestampH\x00R\arenewAt\x88\x01\x01\x12/\n" +
+ "\x06result\x18\x03 \x01(\v2\x17.tfplugin6.DynamicValueR\x06result\x12\x1d\n" +
+ "\aprivate\x18\x04 \x01(\fH\x01R\aprivate\x88\x01\x01\x12/\n" +
+ "\bdeferred\x18\x05 \x01(\v2\x13.tfplugin6.DeferredR\bdeferredB\v\n" +
+ "\t_renew_atB\n" +
+ "\n" +
+ "\b_private\"\xa5\x02\n" +
+ "\x16RenewEphemeralResource\x1aQ\n" +
+ "\aRequest\x12\x1b\n" +
+ "\ttype_name\x18\x01 \x01(\tR\btypeName\x12\x1d\n" +
+ "\aprivate\x18\x02 \x01(\fH\x00R\aprivate\x88\x01\x01B\n" +
+ "\n" +
+ "\b_private\x1a\xb7\x01\n" +
+ "\bResponse\x127\n" +
+ "\vdiagnostics\x18\x01 \x03(\v2\x15.tfplugin6.DiagnosticR\vdiagnostics\x12:\n" +
+ "\brenew_at\x18\x02 \x01(\v2\x1a.google.protobuf.TimestampH\x00R\arenewAt\x88\x01\x01\x12\x1d\n" +
+ "\aprivate\x18\x03 \x01(\fH\x01R\aprivate\x88\x01\x01B\v\n" +
+ "\t_renew_atB\n" +
+ "\n" +
+ "\b_private\"\xb0\x01\n" +
+ "\x16CloseEphemeralResource\x1aQ\n" +
+ "\aRequest\x12\x1b\n" +
+ "\ttype_name\x18\x01 \x01(\tR\btypeName\x12\x1d\n" +
+ "\aprivate\x18\x02 \x01(\fH\x00R\aprivate\x88\x01\x01B\n" +
+ "\n" +
+ "\b_private\x1aC\n" +
+ "\bResponse\x127\n" +
+ "\vdiagnostics\x18\x01 \x03(\v2\x15.tfplugin6.DiagnosticR\vdiagnostics\"\xc4\x02\n" +
+ "\x1aGetResourceIdentitySchemas\x1a\t\n" +
+ "\aRequest\x1a\x9a\x02\n" +
+ "\bResponse\x12n\n" +
+ "\x10identity_schemas\x18\x01 \x03(\v2C.tfplugin6.GetResourceIdentitySchemas.Response.IdentitySchemasEntryR\x0fidentitySchemas\x127\n" +
+ "\vdiagnostics\x18\x02 \x03(\v2\x15.tfplugin6.DiagnosticR\vdiagnostics\x1ae\n" +
+ "\x14IdentitySchemasEntry\x12\x10\n" +
+ "\x03key\x18\x01 \x01(\tR\x03key\x127\n" +
+ "\x05value\x18\x02 \x01(\v2!.tfplugin6.ResourceIdentitySchemaR\x05value:\x028\x01\"\xa7\x02\n" +
+ "\x17UpgradeResourceIdentity\x1ax\n" +
+ "\aRequest\x12\x1b\n" +
+ "\ttype_name\x18\x01 \x01(\tR\btypeName\x12\x18\n" +
+ "\aversion\x18\x02 \x01(\x03R\aversion\x126\n" +
+ "\fraw_identity\x18\x03 \x01(\v2\x13.tfplugin6.RawStateR\vrawIdentity\x1a\x91\x01\n" +
+ "\bResponse\x12L\n" +
+ "\x11upgraded_identity\x18\x01 \x01(\v2\x1f.tfplugin6.ResourceIdentityDataR\x10upgradedIdentity\x127\n" +
+ "\vdiagnostics\x18\x02 \x03(\v2\x15.tfplugin6.DiagnosticR\vdiagnostics\"\xb2\x03\n" +
+ "\fListResource\x1a\xa5\x01\n" +
+ "\aRequest\x12\x1b\n" +
+ "\ttype_name\x18\x01 \x01(\tR\btypeName\x12/\n" +
+ "\x06config\x18\x02 \x01(\v2\x17.tfplugin6.DynamicValueR\x06config\x126\n" +
+ "\x17include_resource_object\x18\x03 \x01(\bR\x15includeResourceObject\x12\x14\n" +
+ "\x05limit\x18\x04 \x01(\x03R\x05limit\x1a\xf9\x01\n" +
+ "\x05Event\x12;\n" +
+ "\bidentity\x18\x01 \x01(\v2\x1f.tfplugin6.ResourceIdentityDataR\bidentity\x12!\n" +
+ "\fdisplay_name\x18\x02 \x01(\tR\vdisplayName\x12E\n" +
+ "\x0fresource_object\x18\x03 \x01(\v2\x17.tfplugin6.DynamicValueH\x00R\x0eresourceObject\x88\x01\x01\x125\n" +
+ "\n" +
+ "diagnostic\x18\x04 \x03(\v2\x15.tfplugin6.DiagnosticR\n" +
+ "diagnosticB\x12\n" +
+ "\x10_resource_object\"\xbb\x02\n" +
+ "\x1aValidateListResourceConfig\x1a\xd7\x01\n" +
+ "\aRequest\x12\x1b\n" +
+ "\ttype_name\x18\x01 \x01(\tR\btypeName\x12/\n" +
+ "\x06config\x18\x02 \x01(\v2\x17.tfplugin6.DynamicValueR\x06config\x12O\n" +
+ "\x17include_resource_object\x18\x03 \x01(\v2\x17.tfplugin6.DynamicValueR\x15includeResourceObject\x12-\n" +
+ "\x05limit\x18\x04 \x01(\v2\x17.tfplugin6.DynamicValueR\x05limit\x1aC\n" +
+ "\bResponse\x127\n" +
+ "\vdiagnostics\x18\x01 \x03(\v2\x15.tfplugin6.DiagnosticR\vdiagnostics\"\xb8\x01\n" +
+ "\x14ValidateActionConfig\x1a[\n" +
+ "\aRequest\x12\x1f\n" +
+ "\vaction_type\x18\x01 \x01(\tR\n" +
+ "actionType\x12/\n" +
+ "\x06config\x18\x02 \x01(\v2\x17.tfplugin6.DynamicValueR\x06config\x1aC\n" +
+ "\bResponse\x127\n" +
+ "\vdiagnostics\x18\x01 \x03(\v2\x15.tfplugin6.DiagnosticR\vdiagnostics\"\xb0\x02\n" +
+ "\n" +
+ "PlanAction\x1a\xab\x01\n" +
+ "\aRequest\x12\x1f\n" +
+ "\vaction_type\x18\x01 \x01(\tR\n" +
+ "actionType\x12/\n" +
+ "\x06config\x18\x02 \x01(\v2\x17.tfplugin6.DynamicValueR\x06config\x12N\n" +
+ "\x13client_capabilities\x18\x03 \x01(\v2\x1d.tfplugin6.ClientCapabilitiesR\x12clientCapabilities\x1at\n" +
+ "\bResponse\x127\n" +
+ "\vdiagnostics\x18\x01 \x03(\v2\x15.tfplugin6.DiagnosticR\vdiagnostics\x12/\n" +
+ "\bdeferred\x18\x02 \x01(\v2\x13.tfplugin6.DeferredR\bdeferred\"\xc9\x03\n" +
+ "\fInvokeAction\x1a\xab\x01\n" +
+ "\aRequest\x12\x1f\n" +
+ "\vaction_type\x18\x01 \x01(\tR\n" +
+ "actionType\x12/\n" +
+ "\x06config\x18\x02 \x01(\v2\x17.tfplugin6.DynamicValueR\x06config\x12N\n" +
+ "\x13client_capabilities\x18\x03 \x01(\v2\x1d.tfplugin6.ClientCapabilitiesR\x12clientCapabilities\x1a\x8a\x02\n" +
+ "\x05Event\x12D\n" +
+ "\bprogress\x18\x01 \x01(\v2&.tfplugin6.InvokeAction.Event.ProgressH\x00R\bprogress\x12G\n" +
+ "\tcompleted\x18\x02 \x01(\v2'.tfplugin6.InvokeAction.Event.CompletedH\x00R\tcompleted\x1a$\n" +
+ "\bProgress\x12\x18\n" +
+ "\amessage\x18\x01 \x01(\tR\amessage\x1aD\n" +
+ "\tCompleted\x127\n" +
+ "\vdiagnostics\x18\x01 \x03(\v2\x15.tfplugin6.DiagnosticR\vdiagnosticsB\x06\n" +
+ "\x04type*%\n" +
+ "\n" +
+ "StringKind\x12\t\n" +
+ "\x05PLAIN\x10\x00\x12\f\n" +
+ "\bMARKDOWN\x10\x012\xcb\x15\n" +
+ "\bProvider\x12N\n" +
+ "\vGetMetadata\x12\x1e.tfplugin6.GetMetadata.Request\x1a\x1f.tfplugin6.GetMetadata.Response\x12`\n" +
+ "\x11GetProviderSchema\x12$.tfplugin6.GetProviderSchema.Request\x1a%.tfplugin6.GetProviderSchema.Response\x12{\n" +
+ "\x1aGetResourceIdentitySchemas\x12-.tfplugin6.GetResourceIdentitySchemas.Request\x1a..tfplugin6.GetResourceIdentitySchemas.Response\x12o\n" +
+ "\x16ValidateProviderConfig\x12).tfplugin6.ValidateProviderConfig.Request\x1a*.tfplugin6.ValidateProviderConfig.Response\x12o\n" +
+ "\x16ValidateResourceConfig\x12).tfplugin6.ValidateResourceConfig.Request\x1a*.tfplugin6.ValidateResourceConfig.Response\x12{\n" +
+ "\x1aValidateDataResourceConfig\x12-.tfplugin6.ValidateDataResourceConfig.Request\x1a..tfplugin6.ValidateDataResourceConfig.Response\x12i\n" +
+ "\x14UpgradeResourceState\x12'.tfplugin6.UpgradeResourceState.Request\x1a(.tfplugin6.UpgradeResourceState.Response\x12r\n" +
+ "\x17UpgradeResourceIdentity\x12*.tfplugin6.UpgradeResourceIdentity.Request\x1a+.tfplugin6.UpgradeResourceIdentity.Response\x12`\n" +
+ "\x11ConfigureProvider\x12$.tfplugin6.ConfigureProvider.Request\x1a%.tfplugin6.ConfigureProvider.Response\x12Q\n" +
+ "\fReadResource\x12\x1f.tfplugin6.ReadResource.Request\x1a .tfplugin6.ReadResource.Response\x12c\n" +
+ "\x12PlanResourceChange\x12%.tfplugin6.PlanResourceChange.Request\x1a&.tfplugin6.PlanResourceChange.Response\x12f\n" +
+ "\x13ApplyResourceChange\x12&.tfplugin6.ApplyResourceChange.Request\x1a'.tfplugin6.ApplyResourceChange.Response\x12f\n" +
+ "\x13ImportResourceState\x12&.tfplugin6.ImportResourceState.Request\x1a'.tfplugin6.ImportResourceState.Response\x12`\n" +
+ "\x11MoveResourceState\x12$.tfplugin6.MoveResourceState.Request\x1a%.tfplugin6.MoveResourceState.Response\x12W\n" +
+ "\x0eReadDataSource\x12!.tfplugin6.ReadDataSource.Request\x1a\".tfplugin6.ReadDataSource.Response\x12\x8a\x01\n" +
+ "\x1fValidateEphemeralResourceConfig\x122.tfplugin6.ValidateEphemeralResourceConfig.Request\x1a3.tfplugin6.ValidateEphemeralResourceConfig.Response\x12l\n" +
+ "\x15OpenEphemeralResource\x12(.tfplugin6.OpenEphemeralResource.Request\x1a).tfplugin6.OpenEphemeralResource.Response\x12o\n" +
+ "\x16RenewEphemeralResource\x12).tfplugin6.RenewEphemeralResource.Request\x1a*.tfplugin6.RenewEphemeralResource.Response\x12o\n" +
+ "\x16CloseEphemeralResource\x12).tfplugin6.CloseEphemeralResource.Request\x1a*.tfplugin6.CloseEphemeralResource.Response\x12P\n" +
+ "\fListResource\x12\x1f.tfplugin6.ListResource.Request\x1a\x1d.tfplugin6.ListResource.Event0\x01\x12{\n" +
+ "\x1aValidateListResourceConfig\x12-.tfplugin6.ValidateListResourceConfig.Request\x1a..tfplugin6.ValidateListResourceConfig.Response\x12Q\n" +
+ "\fGetFunctions\x12\x1f.tfplugin6.GetFunctions.Request\x1a .tfplugin6.GetFunctions.Response\x12Q\n" +
+ "\fCallFunction\x12\x1f.tfplugin6.CallFunction.Request\x1a .tfplugin6.CallFunction.Response\x12i\n" +
+ "\x14ValidateActionConfig\x12'.tfplugin6.ValidateActionConfig.Request\x1a(.tfplugin6.ValidateActionConfig.Response\x12K\n" +
+ "\n" +
+ "PlanAction\x12\x1d.tfplugin6.PlanAction.Request\x1a\x1e.tfplugin6.PlanAction.Response\x12P\n" +
+ "\fInvokeAction\x12\x1f.tfplugin6.InvokeAction.Request\x1a\x1d.tfplugin6.InvokeAction.Event0\x01\x12Q\n" +
+ "\fStopProvider\x12\x1f.tfplugin6.StopProvider.Request\x1a .tfplugin6.StopProvider.ResponseBGZEgithub.com/hashicorp/terraform-plugin-go/tfprotov6/internal/tfplugin6b\x06proto3"
var (
file_tfplugin6_proto_rawDescOnce sync.Once
- file_tfplugin6_proto_rawDescData = file_tfplugin6_proto_rawDesc
+ file_tfplugin6_proto_rawDescData []byte
)
func file_tfplugin6_proto_rawDescGZIP() []byte {
file_tfplugin6_proto_rawDescOnce.Do(func() {
- file_tfplugin6_proto_rawDescData = protoimpl.X.CompressGZIP(file_tfplugin6_proto_rawDescData)
+ file_tfplugin6_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_tfplugin6_proto_rawDesc), len(file_tfplugin6_proto_rawDesc)))
})
return file_tfplugin6_proto_rawDescData
}
var file_tfplugin6_proto_enumTypes = make([]protoimpl.EnumInfo, 5)
-var file_tfplugin6_proto_msgTypes = make([]protoimpl.MessageInfo, 74)
-var file_tfplugin6_proto_goTypes = []interface{}{
- (StringKind)(0), // 0: tfplugin6.StringKind
- (Diagnostic_Severity)(0), // 1: tfplugin6.Diagnostic.Severity
- (Schema_NestedBlock_NestingMode)(0), // 2: tfplugin6.Schema.NestedBlock.NestingMode
- (Schema_Object_NestingMode)(0), // 3: tfplugin6.Schema.Object.NestingMode
- (Deferred_Reason)(0), // 4: tfplugin6.Deferred.Reason
- (*DynamicValue)(nil), // 5: tfplugin6.DynamicValue
- (*Diagnostic)(nil), // 6: tfplugin6.Diagnostic
- (*FunctionError)(nil), // 7: tfplugin6.FunctionError
- (*AttributePath)(nil), // 8: tfplugin6.AttributePath
- (*StopProvider)(nil), // 9: tfplugin6.StopProvider
- (*RawState)(nil), // 10: tfplugin6.RawState
- (*Schema)(nil), // 11: tfplugin6.Schema
- (*Function)(nil), // 12: tfplugin6.Function
- (*ServerCapabilities)(nil), // 13: tfplugin6.ServerCapabilities
- (*ClientCapabilities)(nil), // 14: tfplugin6.ClientCapabilities
- (*Deferred)(nil), // 15: tfplugin6.Deferred
- (*GetMetadata)(nil), // 16: tfplugin6.GetMetadata
- (*GetProviderSchema)(nil), // 17: tfplugin6.GetProviderSchema
- (*ValidateProviderConfig)(nil), // 18: tfplugin6.ValidateProviderConfig
- (*UpgradeResourceState)(nil), // 19: tfplugin6.UpgradeResourceState
- (*ValidateResourceConfig)(nil), // 20: tfplugin6.ValidateResourceConfig
- (*ValidateDataResourceConfig)(nil), // 21: tfplugin6.ValidateDataResourceConfig
- (*ConfigureProvider)(nil), // 22: tfplugin6.ConfigureProvider
- (*ReadResource)(nil), // 23: tfplugin6.ReadResource
- (*PlanResourceChange)(nil), // 24: tfplugin6.PlanResourceChange
- (*ApplyResourceChange)(nil), // 25: tfplugin6.ApplyResourceChange
- (*ImportResourceState)(nil), // 26: tfplugin6.ImportResourceState
- (*MoveResourceState)(nil), // 27: tfplugin6.MoveResourceState
- (*ReadDataSource)(nil), // 28: tfplugin6.ReadDataSource
- (*GetFunctions)(nil), // 29: tfplugin6.GetFunctions
- (*CallFunction)(nil), // 30: tfplugin6.CallFunction
- (*AttributePath_Step)(nil), // 31: tfplugin6.AttributePath.Step
- (*StopProvider_Request)(nil), // 32: tfplugin6.StopProvider.Request
- (*StopProvider_Response)(nil), // 33: tfplugin6.StopProvider.Response
- nil, // 34: tfplugin6.RawState.FlatmapEntry
- (*Schema_Block)(nil), // 35: tfplugin6.Schema.Block
- (*Schema_Attribute)(nil), // 36: tfplugin6.Schema.Attribute
- (*Schema_NestedBlock)(nil), // 37: tfplugin6.Schema.NestedBlock
- (*Schema_Object)(nil), // 38: tfplugin6.Schema.Object
- (*Function_Parameter)(nil), // 39: tfplugin6.Function.Parameter
- (*Function_Return)(nil), // 40: tfplugin6.Function.Return
- (*GetMetadata_Request)(nil), // 41: tfplugin6.GetMetadata.Request
- (*GetMetadata_Response)(nil), // 42: tfplugin6.GetMetadata.Response
- (*GetMetadata_FunctionMetadata)(nil), // 43: tfplugin6.GetMetadata.FunctionMetadata
- (*GetMetadata_DataSourceMetadata)(nil), // 44: tfplugin6.GetMetadata.DataSourceMetadata
- (*GetMetadata_ResourceMetadata)(nil), // 45: tfplugin6.GetMetadata.ResourceMetadata
- (*GetProviderSchema_Request)(nil), // 46: tfplugin6.GetProviderSchema.Request
- (*GetProviderSchema_Response)(nil), // 47: tfplugin6.GetProviderSchema.Response
- nil, // 48: tfplugin6.GetProviderSchema.Response.ResourceSchemasEntry
- nil, // 49: tfplugin6.GetProviderSchema.Response.DataSourceSchemasEntry
- nil, // 50: tfplugin6.GetProviderSchema.Response.FunctionsEntry
- (*ValidateProviderConfig_Request)(nil), // 51: tfplugin6.ValidateProviderConfig.Request
- (*ValidateProviderConfig_Response)(nil), // 52: tfplugin6.ValidateProviderConfig.Response
- (*UpgradeResourceState_Request)(nil), // 53: tfplugin6.UpgradeResourceState.Request
- (*UpgradeResourceState_Response)(nil), // 54: tfplugin6.UpgradeResourceState.Response
- (*ValidateResourceConfig_Request)(nil), // 55: tfplugin6.ValidateResourceConfig.Request
- (*ValidateResourceConfig_Response)(nil), // 56: tfplugin6.ValidateResourceConfig.Response
- (*ValidateDataResourceConfig_Request)(nil), // 57: tfplugin6.ValidateDataResourceConfig.Request
- (*ValidateDataResourceConfig_Response)(nil), // 58: tfplugin6.ValidateDataResourceConfig.Response
- (*ConfigureProvider_Request)(nil), // 59: tfplugin6.ConfigureProvider.Request
- (*ConfigureProvider_Response)(nil), // 60: tfplugin6.ConfigureProvider.Response
- (*ReadResource_Request)(nil), // 61: tfplugin6.ReadResource.Request
- (*ReadResource_Response)(nil), // 62: tfplugin6.ReadResource.Response
- (*PlanResourceChange_Request)(nil), // 63: tfplugin6.PlanResourceChange.Request
- (*PlanResourceChange_Response)(nil), // 64: tfplugin6.PlanResourceChange.Response
- (*ApplyResourceChange_Request)(nil), // 65: tfplugin6.ApplyResourceChange.Request
- (*ApplyResourceChange_Response)(nil), // 66: tfplugin6.ApplyResourceChange.Response
- (*ImportResourceState_Request)(nil), // 67: tfplugin6.ImportResourceState.Request
- (*ImportResourceState_ImportedResource)(nil), // 68: tfplugin6.ImportResourceState.ImportedResource
- (*ImportResourceState_Response)(nil), // 69: tfplugin6.ImportResourceState.Response
- (*MoveResourceState_Request)(nil), // 70: tfplugin6.MoveResourceState.Request
- (*MoveResourceState_Response)(nil), // 71: tfplugin6.MoveResourceState.Response
- (*ReadDataSource_Request)(nil), // 72: tfplugin6.ReadDataSource.Request
- (*ReadDataSource_Response)(nil), // 73: tfplugin6.ReadDataSource.Response
- (*GetFunctions_Request)(nil), // 74: tfplugin6.GetFunctions.Request
- (*GetFunctions_Response)(nil), // 75: tfplugin6.GetFunctions.Response
- nil, // 76: tfplugin6.GetFunctions.Response.FunctionsEntry
- (*CallFunction_Request)(nil), // 77: tfplugin6.CallFunction.Request
- (*CallFunction_Response)(nil), // 78: tfplugin6.CallFunction.Response
+var file_tfplugin6_proto_msgTypes = make([]protoimpl.MessageInfo, 120)
+var file_tfplugin6_proto_goTypes = []any{
+ (StringKind)(0), // 0: tfplugin6.StringKind
+ (Diagnostic_Severity)(0), // 1: tfplugin6.Diagnostic.Severity
+ (Schema_NestedBlock_NestingMode)(0), // 2: tfplugin6.Schema.NestedBlock.NestingMode
+ (Schema_Object_NestingMode)(0), // 3: tfplugin6.Schema.Object.NestingMode
+ (Deferred_Reason)(0), // 4: tfplugin6.Deferred.Reason
+ (*DynamicValue)(nil), // 5: tfplugin6.DynamicValue
+ (*Diagnostic)(nil), // 6: tfplugin6.Diagnostic
+ (*FunctionError)(nil), // 7: tfplugin6.FunctionError
+ (*AttributePath)(nil), // 8: tfplugin6.AttributePath
+ (*StopProvider)(nil), // 9: tfplugin6.StopProvider
+ (*RawState)(nil), // 10: tfplugin6.RawState
+ (*Schema)(nil), // 11: tfplugin6.Schema
+ (*ResourceIdentitySchema)(nil), // 12: tfplugin6.ResourceIdentitySchema
+ (*ResourceIdentityData)(nil), // 13: tfplugin6.ResourceIdentityData
+ (*Function)(nil), // 14: tfplugin6.Function
+ (*ActionSchema)(nil), // 15: tfplugin6.ActionSchema
+ (*ServerCapabilities)(nil), // 16: tfplugin6.ServerCapabilities
+ (*ClientCapabilities)(nil), // 17: tfplugin6.ClientCapabilities
+ (*Deferred)(nil), // 18: tfplugin6.Deferred
+ (*GetMetadata)(nil), // 19: tfplugin6.GetMetadata
+ (*GetProviderSchema)(nil), // 20: tfplugin6.GetProviderSchema
+ (*ValidateProviderConfig)(nil), // 21: tfplugin6.ValidateProviderConfig
+ (*UpgradeResourceState)(nil), // 22: tfplugin6.UpgradeResourceState
+ (*ValidateResourceConfig)(nil), // 23: tfplugin6.ValidateResourceConfig
+ (*ValidateDataResourceConfig)(nil), // 24: tfplugin6.ValidateDataResourceConfig
+ (*ConfigureProvider)(nil), // 25: tfplugin6.ConfigureProvider
+ (*ReadResource)(nil), // 26: tfplugin6.ReadResource
+ (*PlanResourceChange)(nil), // 27: tfplugin6.PlanResourceChange
+ (*ApplyResourceChange)(nil), // 28: tfplugin6.ApplyResourceChange
+ (*ImportResourceState)(nil), // 29: tfplugin6.ImportResourceState
+ (*MoveResourceState)(nil), // 30: tfplugin6.MoveResourceState
+ (*ReadDataSource)(nil), // 31: tfplugin6.ReadDataSource
+ (*GetFunctions)(nil), // 32: tfplugin6.GetFunctions
+ (*CallFunction)(nil), // 33: tfplugin6.CallFunction
+ (*ValidateEphemeralResourceConfig)(nil), // 34: tfplugin6.ValidateEphemeralResourceConfig
+ (*OpenEphemeralResource)(nil), // 35: tfplugin6.OpenEphemeralResource
+ (*RenewEphemeralResource)(nil), // 36: tfplugin6.RenewEphemeralResource
+ (*CloseEphemeralResource)(nil), // 37: tfplugin6.CloseEphemeralResource
+ (*GetResourceIdentitySchemas)(nil), // 38: tfplugin6.GetResourceIdentitySchemas
+ (*UpgradeResourceIdentity)(nil), // 39: tfplugin6.UpgradeResourceIdentity
+ (*ListResource)(nil), // 40: tfplugin6.ListResource
+ (*ValidateListResourceConfig)(nil), // 41: tfplugin6.ValidateListResourceConfig
+ (*ValidateActionConfig)(nil), // 42: tfplugin6.ValidateActionConfig
+ (*PlanAction)(nil), // 43: tfplugin6.PlanAction
+ (*InvokeAction)(nil), // 44: tfplugin6.InvokeAction
+ (*AttributePath_Step)(nil), // 45: tfplugin6.AttributePath.Step
+ (*StopProvider_Request)(nil), // 46: tfplugin6.StopProvider.Request
+ (*StopProvider_Response)(nil), // 47: tfplugin6.StopProvider.Response
+ nil, // 48: tfplugin6.RawState.FlatmapEntry
+ (*Schema_Block)(nil), // 49: tfplugin6.Schema.Block
+ (*Schema_Attribute)(nil), // 50: tfplugin6.Schema.Attribute
+ (*Schema_NestedBlock)(nil), // 51: tfplugin6.Schema.NestedBlock
+ (*Schema_Object)(nil), // 52: tfplugin6.Schema.Object
+ (*ResourceIdentitySchema_IdentityAttribute)(nil), // 53: tfplugin6.ResourceIdentitySchema.IdentityAttribute
+ (*Function_Parameter)(nil), // 54: tfplugin6.Function.Parameter
+ (*Function_Return)(nil), // 55: tfplugin6.Function.Return
+ (*GetMetadata_Request)(nil), // 56: tfplugin6.GetMetadata.Request
+ (*GetMetadata_Response)(nil), // 57: tfplugin6.GetMetadata.Response
+ (*GetMetadata_FunctionMetadata)(nil), // 58: tfplugin6.GetMetadata.FunctionMetadata
+ (*GetMetadata_DataSourceMetadata)(nil), // 59: tfplugin6.GetMetadata.DataSourceMetadata
+ (*GetMetadata_ResourceMetadata)(nil), // 60: tfplugin6.GetMetadata.ResourceMetadata
+ (*GetMetadata_EphemeralResourceMetadata)(nil), // 61: tfplugin6.GetMetadata.EphemeralResourceMetadata
+ (*GetMetadata_ListResourceMetadata)(nil), // 62: tfplugin6.GetMetadata.ListResourceMetadata
+ (*GetMetadata_ActionMetadata)(nil), // 63: tfplugin6.GetMetadata.ActionMetadata
+ (*GetProviderSchema_Request)(nil), // 64: tfplugin6.GetProviderSchema.Request
+ (*GetProviderSchema_Response)(nil), // 65: tfplugin6.GetProviderSchema.Response
+ nil, // 66: tfplugin6.GetProviderSchema.Response.ResourceSchemasEntry
+ nil, // 67: tfplugin6.GetProviderSchema.Response.DataSourceSchemasEntry
+ nil, // 68: tfplugin6.GetProviderSchema.Response.FunctionsEntry
+ nil, // 69: tfplugin6.GetProviderSchema.Response.EphemeralResourceSchemasEntry
+ nil, // 70: tfplugin6.GetProviderSchema.Response.ListResourceSchemasEntry
+ nil, // 71: tfplugin6.GetProviderSchema.Response.ActionSchemasEntry
+ (*ValidateProviderConfig_Request)(nil), // 72: tfplugin6.ValidateProviderConfig.Request
+ (*ValidateProviderConfig_Response)(nil), // 73: tfplugin6.ValidateProviderConfig.Response
+ (*UpgradeResourceState_Request)(nil), // 74: tfplugin6.UpgradeResourceState.Request
+ (*UpgradeResourceState_Response)(nil), // 75: tfplugin6.UpgradeResourceState.Response
+ (*ValidateResourceConfig_Request)(nil), // 76: tfplugin6.ValidateResourceConfig.Request
+ (*ValidateResourceConfig_Response)(nil), // 77: tfplugin6.ValidateResourceConfig.Response
+ (*ValidateDataResourceConfig_Request)(nil), // 78: tfplugin6.ValidateDataResourceConfig.Request
+ (*ValidateDataResourceConfig_Response)(nil), // 79: tfplugin6.ValidateDataResourceConfig.Response
+ (*ConfigureProvider_Request)(nil), // 80: tfplugin6.ConfigureProvider.Request
+ (*ConfigureProvider_Response)(nil), // 81: tfplugin6.ConfigureProvider.Response
+ (*ReadResource_Request)(nil), // 82: tfplugin6.ReadResource.Request
+ (*ReadResource_Response)(nil), // 83: tfplugin6.ReadResource.Response
+ (*PlanResourceChange_Request)(nil), // 84: tfplugin6.PlanResourceChange.Request
+ (*PlanResourceChange_Response)(nil), // 85: tfplugin6.PlanResourceChange.Response
+ (*ApplyResourceChange_Request)(nil), // 86: tfplugin6.ApplyResourceChange.Request
+ (*ApplyResourceChange_Response)(nil), // 87: tfplugin6.ApplyResourceChange.Response
+ (*ImportResourceState_Request)(nil), // 88: tfplugin6.ImportResourceState.Request
+ (*ImportResourceState_ImportedResource)(nil), // 89: tfplugin6.ImportResourceState.ImportedResource
+ (*ImportResourceState_Response)(nil), // 90: tfplugin6.ImportResourceState.Response
+ (*MoveResourceState_Request)(nil), // 91: tfplugin6.MoveResourceState.Request
+ (*MoveResourceState_Response)(nil), // 92: tfplugin6.MoveResourceState.Response
+ (*ReadDataSource_Request)(nil), // 93: tfplugin6.ReadDataSource.Request
+ (*ReadDataSource_Response)(nil), // 94: tfplugin6.ReadDataSource.Response
+ (*GetFunctions_Request)(nil), // 95: tfplugin6.GetFunctions.Request
+ (*GetFunctions_Response)(nil), // 96: tfplugin6.GetFunctions.Response
+ nil, // 97: tfplugin6.GetFunctions.Response.FunctionsEntry
+ (*CallFunction_Request)(nil), // 98: tfplugin6.CallFunction.Request
+ (*CallFunction_Response)(nil), // 99: tfplugin6.CallFunction.Response
+ (*ValidateEphemeralResourceConfig_Request)(nil), // 100: tfplugin6.ValidateEphemeralResourceConfig.Request
+ (*ValidateEphemeralResourceConfig_Response)(nil), // 101: tfplugin6.ValidateEphemeralResourceConfig.Response
+ (*OpenEphemeralResource_Request)(nil), // 102: tfplugin6.OpenEphemeralResource.Request
+ (*OpenEphemeralResource_Response)(nil), // 103: tfplugin6.OpenEphemeralResource.Response
+ (*RenewEphemeralResource_Request)(nil), // 104: tfplugin6.RenewEphemeralResource.Request
+ (*RenewEphemeralResource_Response)(nil), // 105: tfplugin6.RenewEphemeralResource.Response
+ (*CloseEphemeralResource_Request)(nil), // 106: tfplugin6.CloseEphemeralResource.Request
+ (*CloseEphemeralResource_Response)(nil), // 107: tfplugin6.CloseEphemeralResource.Response
+ (*GetResourceIdentitySchemas_Request)(nil), // 108: tfplugin6.GetResourceIdentitySchemas.Request
+ (*GetResourceIdentitySchemas_Response)(nil), // 109: tfplugin6.GetResourceIdentitySchemas.Response
+ nil, // 110: tfplugin6.GetResourceIdentitySchemas.Response.IdentitySchemasEntry
+ (*UpgradeResourceIdentity_Request)(nil), // 111: tfplugin6.UpgradeResourceIdentity.Request
+ (*UpgradeResourceIdentity_Response)(nil), // 112: tfplugin6.UpgradeResourceIdentity.Response
+ (*ListResource_Request)(nil), // 113: tfplugin6.ListResource.Request
+ (*ListResource_Event)(nil), // 114: tfplugin6.ListResource.Event
+ (*ValidateListResourceConfig_Request)(nil), // 115: tfplugin6.ValidateListResourceConfig.Request
+ (*ValidateListResourceConfig_Response)(nil), // 116: tfplugin6.ValidateListResourceConfig.Response
+ (*ValidateActionConfig_Request)(nil), // 117: tfplugin6.ValidateActionConfig.Request
+ (*ValidateActionConfig_Response)(nil), // 118: tfplugin6.ValidateActionConfig.Response
+ (*PlanAction_Request)(nil), // 119: tfplugin6.PlanAction.Request
+ (*PlanAction_Response)(nil), // 120: tfplugin6.PlanAction.Response
+ (*InvokeAction_Request)(nil), // 121: tfplugin6.InvokeAction.Request
+ (*InvokeAction_Event)(nil), // 122: tfplugin6.InvokeAction.Event
+ (*InvokeAction_Event_Progress)(nil), // 123: tfplugin6.InvokeAction.Event.Progress
+ (*InvokeAction_Event_Completed)(nil), // 124: tfplugin6.InvokeAction.Event.Completed
+ (*timestamppb.Timestamp)(nil), // 125: google.protobuf.Timestamp
}
var file_tfplugin6_proto_depIdxs = []int32{
1, // 0: tfplugin6.Diagnostic.severity:type_name -> tfplugin6.Diagnostic.Severity
8, // 1: tfplugin6.Diagnostic.attribute:type_name -> tfplugin6.AttributePath
- 31, // 2: tfplugin6.AttributePath.steps:type_name -> tfplugin6.AttributePath.Step
- 34, // 3: tfplugin6.RawState.flatmap:type_name -> tfplugin6.RawState.FlatmapEntry
- 35, // 4: tfplugin6.Schema.block:type_name -> tfplugin6.Schema.Block
- 39, // 5: tfplugin6.Function.parameters:type_name -> tfplugin6.Function.Parameter
- 39, // 6: tfplugin6.Function.variadic_parameter:type_name -> tfplugin6.Function.Parameter
- 40, // 7: tfplugin6.Function.return:type_name -> tfplugin6.Function.Return
- 0, // 8: tfplugin6.Function.description_kind:type_name -> tfplugin6.StringKind
- 4, // 9: tfplugin6.Deferred.reason:type_name -> tfplugin6.Deferred.Reason
- 36, // 10: tfplugin6.Schema.Block.attributes:type_name -> tfplugin6.Schema.Attribute
- 37, // 11: tfplugin6.Schema.Block.block_types:type_name -> tfplugin6.Schema.NestedBlock
- 0, // 12: tfplugin6.Schema.Block.description_kind:type_name -> tfplugin6.StringKind
- 38, // 13: tfplugin6.Schema.Attribute.nested_type:type_name -> tfplugin6.Schema.Object
- 0, // 14: tfplugin6.Schema.Attribute.description_kind:type_name -> tfplugin6.StringKind
- 35, // 15: tfplugin6.Schema.NestedBlock.block:type_name -> tfplugin6.Schema.Block
- 2, // 16: tfplugin6.Schema.NestedBlock.nesting:type_name -> tfplugin6.Schema.NestedBlock.NestingMode
- 36, // 17: tfplugin6.Schema.Object.attributes:type_name -> tfplugin6.Schema.Attribute
- 3, // 18: tfplugin6.Schema.Object.nesting:type_name -> tfplugin6.Schema.Object.NestingMode
- 0, // 19: tfplugin6.Function.Parameter.description_kind:type_name -> tfplugin6.StringKind
- 13, // 20: tfplugin6.GetMetadata.Response.server_capabilities:type_name -> tfplugin6.ServerCapabilities
- 6, // 21: tfplugin6.GetMetadata.Response.diagnostics:type_name -> tfplugin6.Diagnostic
- 44, // 22: tfplugin6.GetMetadata.Response.data_sources:type_name -> tfplugin6.GetMetadata.DataSourceMetadata
- 45, // 23: tfplugin6.GetMetadata.Response.resources:type_name -> tfplugin6.GetMetadata.ResourceMetadata
- 43, // 24: tfplugin6.GetMetadata.Response.functions:type_name -> tfplugin6.GetMetadata.FunctionMetadata
- 11, // 25: tfplugin6.GetProviderSchema.Response.provider:type_name -> tfplugin6.Schema
- 48, // 26: tfplugin6.GetProviderSchema.Response.resource_schemas:type_name -> tfplugin6.GetProviderSchema.Response.ResourceSchemasEntry
- 49, // 27: tfplugin6.GetProviderSchema.Response.data_source_schemas:type_name -> tfplugin6.GetProviderSchema.Response.DataSourceSchemasEntry
- 6, // 28: tfplugin6.GetProviderSchema.Response.diagnostics:type_name -> tfplugin6.Diagnostic
- 11, // 29: tfplugin6.GetProviderSchema.Response.provider_meta:type_name -> tfplugin6.Schema
- 13, // 30: tfplugin6.GetProviderSchema.Response.server_capabilities:type_name -> tfplugin6.ServerCapabilities
- 50, // 31: tfplugin6.GetProviderSchema.Response.functions:type_name -> tfplugin6.GetProviderSchema.Response.FunctionsEntry
- 11, // 32: tfplugin6.GetProviderSchema.Response.ResourceSchemasEntry.value:type_name -> tfplugin6.Schema
- 11, // 33: tfplugin6.GetProviderSchema.Response.DataSourceSchemasEntry.value:type_name -> tfplugin6.Schema
- 12, // 34: tfplugin6.GetProviderSchema.Response.FunctionsEntry.value:type_name -> tfplugin6.Function
- 5, // 35: tfplugin6.ValidateProviderConfig.Request.config:type_name -> tfplugin6.DynamicValue
- 6, // 36: tfplugin6.ValidateProviderConfig.Response.diagnostics:type_name -> tfplugin6.Diagnostic
- 10, // 37: tfplugin6.UpgradeResourceState.Request.raw_state:type_name -> tfplugin6.RawState
- 5, // 38: tfplugin6.UpgradeResourceState.Response.upgraded_state:type_name -> tfplugin6.DynamicValue
- 6, // 39: tfplugin6.UpgradeResourceState.Response.diagnostics:type_name -> tfplugin6.Diagnostic
- 5, // 40: tfplugin6.ValidateResourceConfig.Request.config:type_name -> tfplugin6.DynamicValue
- 6, // 41: tfplugin6.ValidateResourceConfig.Response.diagnostics:type_name -> tfplugin6.Diagnostic
- 5, // 42: tfplugin6.ValidateDataResourceConfig.Request.config:type_name -> tfplugin6.DynamicValue
- 6, // 43: tfplugin6.ValidateDataResourceConfig.Response.diagnostics:type_name -> tfplugin6.Diagnostic
- 5, // 44: tfplugin6.ConfigureProvider.Request.config:type_name -> tfplugin6.DynamicValue
- 14, // 45: tfplugin6.ConfigureProvider.Request.client_capabilities:type_name -> tfplugin6.ClientCapabilities
- 6, // 46: tfplugin6.ConfigureProvider.Response.diagnostics:type_name -> tfplugin6.Diagnostic
- 5, // 47: tfplugin6.ReadResource.Request.current_state:type_name -> tfplugin6.DynamicValue
- 5, // 48: tfplugin6.ReadResource.Request.provider_meta:type_name -> tfplugin6.DynamicValue
- 14, // 49: tfplugin6.ReadResource.Request.client_capabilities:type_name -> tfplugin6.ClientCapabilities
- 5, // 50: tfplugin6.ReadResource.Response.new_state:type_name -> tfplugin6.DynamicValue
- 6, // 51: tfplugin6.ReadResource.Response.diagnostics:type_name -> tfplugin6.Diagnostic
- 15, // 52: tfplugin6.ReadResource.Response.deferred:type_name -> tfplugin6.Deferred
- 5, // 53: tfplugin6.PlanResourceChange.Request.prior_state:type_name -> tfplugin6.DynamicValue
- 5, // 54: tfplugin6.PlanResourceChange.Request.proposed_new_state:type_name -> tfplugin6.DynamicValue
- 5, // 55: tfplugin6.PlanResourceChange.Request.config:type_name -> tfplugin6.DynamicValue
- 5, // 56: tfplugin6.PlanResourceChange.Request.provider_meta:type_name -> tfplugin6.DynamicValue
- 14, // 57: tfplugin6.PlanResourceChange.Request.client_capabilities:type_name -> tfplugin6.ClientCapabilities
- 5, // 58: tfplugin6.PlanResourceChange.Response.planned_state:type_name -> tfplugin6.DynamicValue
- 8, // 59: tfplugin6.PlanResourceChange.Response.requires_replace:type_name -> tfplugin6.AttributePath
- 6, // 60: tfplugin6.PlanResourceChange.Response.diagnostics:type_name -> tfplugin6.Diagnostic
- 15, // 61: tfplugin6.PlanResourceChange.Response.deferred:type_name -> tfplugin6.Deferred
- 5, // 62: tfplugin6.ApplyResourceChange.Request.prior_state:type_name -> tfplugin6.DynamicValue
- 5, // 63: tfplugin6.ApplyResourceChange.Request.planned_state:type_name -> tfplugin6.DynamicValue
- 5, // 64: tfplugin6.ApplyResourceChange.Request.config:type_name -> tfplugin6.DynamicValue
- 5, // 65: tfplugin6.ApplyResourceChange.Request.provider_meta:type_name -> tfplugin6.DynamicValue
- 5, // 66: tfplugin6.ApplyResourceChange.Response.new_state:type_name -> tfplugin6.DynamicValue
- 6, // 67: tfplugin6.ApplyResourceChange.Response.diagnostics:type_name -> tfplugin6.Diagnostic
- 14, // 68: tfplugin6.ImportResourceState.Request.client_capabilities:type_name -> tfplugin6.ClientCapabilities
- 5, // 69: tfplugin6.ImportResourceState.ImportedResource.state:type_name -> tfplugin6.DynamicValue
- 68, // 70: tfplugin6.ImportResourceState.Response.imported_resources:type_name -> tfplugin6.ImportResourceState.ImportedResource
- 6, // 71: tfplugin6.ImportResourceState.Response.diagnostics:type_name -> tfplugin6.Diagnostic
- 15, // 72: tfplugin6.ImportResourceState.Response.deferred:type_name -> tfplugin6.Deferred
- 10, // 73: tfplugin6.MoveResourceState.Request.source_state:type_name -> tfplugin6.RawState
- 5, // 74: tfplugin6.MoveResourceState.Response.target_state:type_name -> tfplugin6.DynamicValue
- 6, // 75: tfplugin6.MoveResourceState.Response.diagnostics:type_name -> tfplugin6.Diagnostic
- 5, // 76: tfplugin6.ReadDataSource.Request.config:type_name -> tfplugin6.DynamicValue
- 5, // 77: tfplugin6.ReadDataSource.Request.provider_meta:type_name -> tfplugin6.DynamicValue
- 14, // 78: tfplugin6.ReadDataSource.Request.client_capabilities:type_name -> tfplugin6.ClientCapabilities
- 5, // 79: tfplugin6.ReadDataSource.Response.state:type_name -> tfplugin6.DynamicValue
- 6, // 80: tfplugin6.ReadDataSource.Response.diagnostics:type_name -> tfplugin6.Diagnostic
- 15, // 81: tfplugin6.ReadDataSource.Response.deferred:type_name -> tfplugin6.Deferred
- 76, // 82: tfplugin6.GetFunctions.Response.functions:type_name -> tfplugin6.GetFunctions.Response.FunctionsEntry
- 6, // 83: tfplugin6.GetFunctions.Response.diagnostics:type_name -> tfplugin6.Diagnostic
- 12, // 84: tfplugin6.GetFunctions.Response.FunctionsEntry.value:type_name -> tfplugin6.Function
- 5, // 85: tfplugin6.CallFunction.Request.arguments:type_name -> tfplugin6.DynamicValue
- 5, // 86: tfplugin6.CallFunction.Response.result:type_name -> tfplugin6.DynamicValue
- 7, // 87: tfplugin6.CallFunction.Response.error:type_name -> tfplugin6.FunctionError
- 41, // 88: tfplugin6.Provider.GetMetadata:input_type -> tfplugin6.GetMetadata.Request
- 46, // 89: tfplugin6.Provider.GetProviderSchema:input_type -> tfplugin6.GetProviderSchema.Request
- 51, // 90: tfplugin6.Provider.ValidateProviderConfig:input_type -> tfplugin6.ValidateProviderConfig.Request
- 55, // 91: tfplugin6.Provider.ValidateResourceConfig:input_type -> tfplugin6.ValidateResourceConfig.Request
- 57, // 92: tfplugin6.Provider.ValidateDataResourceConfig:input_type -> tfplugin6.ValidateDataResourceConfig.Request
- 53, // 93: tfplugin6.Provider.UpgradeResourceState:input_type -> tfplugin6.UpgradeResourceState.Request
- 59, // 94: tfplugin6.Provider.ConfigureProvider:input_type -> tfplugin6.ConfigureProvider.Request
- 61, // 95: tfplugin6.Provider.ReadResource:input_type -> tfplugin6.ReadResource.Request
- 63, // 96: tfplugin6.Provider.PlanResourceChange:input_type -> tfplugin6.PlanResourceChange.Request
- 65, // 97: tfplugin6.Provider.ApplyResourceChange:input_type -> tfplugin6.ApplyResourceChange.Request
- 67, // 98: tfplugin6.Provider.ImportResourceState:input_type -> tfplugin6.ImportResourceState.Request
- 70, // 99: tfplugin6.Provider.MoveResourceState:input_type -> tfplugin6.MoveResourceState.Request
- 72, // 100: tfplugin6.Provider.ReadDataSource:input_type -> tfplugin6.ReadDataSource.Request
- 74, // 101: tfplugin6.Provider.GetFunctions:input_type -> tfplugin6.GetFunctions.Request
- 77, // 102: tfplugin6.Provider.CallFunction:input_type -> tfplugin6.CallFunction.Request
- 32, // 103: tfplugin6.Provider.StopProvider:input_type -> tfplugin6.StopProvider.Request
- 42, // 104: tfplugin6.Provider.GetMetadata:output_type -> tfplugin6.GetMetadata.Response
- 47, // 105: tfplugin6.Provider.GetProviderSchema:output_type -> tfplugin6.GetProviderSchema.Response
- 52, // 106: tfplugin6.Provider.ValidateProviderConfig:output_type -> tfplugin6.ValidateProviderConfig.Response
- 56, // 107: tfplugin6.Provider.ValidateResourceConfig:output_type -> tfplugin6.ValidateResourceConfig.Response
- 58, // 108: tfplugin6.Provider.ValidateDataResourceConfig:output_type -> tfplugin6.ValidateDataResourceConfig.Response
- 54, // 109: tfplugin6.Provider.UpgradeResourceState:output_type -> tfplugin6.UpgradeResourceState.Response
- 60, // 110: tfplugin6.Provider.ConfigureProvider:output_type -> tfplugin6.ConfigureProvider.Response
- 62, // 111: tfplugin6.Provider.ReadResource:output_type -> tfplugin6.ReadResource.Response
- 64, // 112: tfplugin6.Provider.PlanResourceChange:output_type -> tfplugin6.PlanResourceChange.Response
- 66, // 113: tfplugin6.Provider.ApplyResourceChange:output_type -> tfplugin6.ApplyResourceChange.Response
- 69, // 114: tfplugin6.Provider.ImportResourceState:output_type -> tfplugin6.ImportResourceState.Response
- 71, // 115: tfplugin6.Provider.MoveResourceState:output_type -> tfplugin6.MoveResourceState.Response
- 73, // 116: tfplugin6.Provider.ReadDataSource:output_type -> tfplugin6.ReadDataSource.Response
- 75, // 117: tfplugin6.Provider.GetFunctions:output_type -> tfplugin6.GetFunctions.Response
- 78, // 118: tfplugin6.Provider.CallFunction:output_type -> tfplugin6.CallFunction.Response
- 33, // 119: tfplugin6.Provider.StopProvider:output_type -> tfplugin6.StopProvider.Response
- 104, // [104:120] is the sub-list for method output_type
- 88, // [88:104] is the sub-list for method input_type
- 88, // [88:88] is the sub-list for extension type_name
- 88, // [88:88] is the sub-list for extension extendee
- 0, // [0:88] is the sub-list for field type_name
+ 45, // 2: tfplugin6.AttributePath.steps:type_name -> tfplugin6.AttributePath.Step
+ 48, // 3: tfplugin6.RawState.flatmap:type_name -> tfplugin6.RawState.FlatmapEntry
+ 49, // 4: tfplugin6.Schema.block:type_name -> tfplugin6.Schema.Block
+ 53, // 5: tfplugin6.ResourceIdentitySchema.identity_attributes:type_name -> tfplugin6.ResourceIdentitySchema.IdentityAttribute
+ 5, // 6: tfplugin6.ResourceIdentityData.identity_data:type_name -> tfplugin6.DynamicValue
+ 54, // 7: tfplugin6.Function.parameters:type_name -> tfplugin6.Function.Parameter
+ 54, // 8: tfplugin6.Function.variadic_parameter:type_name -> tfplugin6.Function.Parameter
+ 55, // 9: tfplugin6.Function.return:type_name -> tfplugin6.Function.Return
+ 0, // 10: tfplugin6.Function.description_kind:type_name -> tfplugin6.StringKind
+ 11, // 11: tfplugin6.ActionSchema.schema:type_name -> tfplugin6.Schema
+ 4, // 12: tfplugin6.Deferred.reason:type_name -> tfplugin6.Deferred.Reason
+ 50, // 13: tfplugin6.Schema.Block.attributes:type_name -> tfplugin6.Schema.Attribute
+ 51, // 14: tfplugin6.Schema.Block.block_types:type_name -> tfplugin6.Schema.NestedBlock
+ 0, // 15: tfplugin6.Schema.Block.description_kind:type_name -> tfplugin6.StringKind
+ 52, // 16: tfplugin6.Schema.Attribute.nested_type:type_name -> tfplugin6.Schema.Object
+ 0, // 17: tfplugin6.Schema.Attribute.description_kind:type_name -> tfplugin6.StringKind
+ 49, // 18: tfplugin6.Schema.NestedBlock.block:type_name -> tfplugin6.Schema.Block
+ 2, // 19: tfplugin6.Schema.NestedBlock.nesting:type_name -> tfplugin6.Schema.NestedBlock.NestingMode
+ 50, // 20: tfplugin6.Schema.Object.attributes:type_name -> tfplugin6.Schema.Attribute
+ 3, // 21: tfplugin6.Schema.Object.nesting:type_name -> tfplugin6.Schema.Object.NestingMode
+ 0, // 22: tfplugin6.Function.Parameter.description_kind:type_name -> tfplugin6.StringKind
+ 16, // 23: tfplugin6.GetMetadata.Response.server_capabilities:type_name -> tfplugin6.ServerCapabilities
+ 6, // 24: tfplugin6.GetMetadata.Response.diagnostics:type_name -> tfplugin6.Diagnostic
+ 59, // 25: tfplugin6.GetMetadata.Response.data_sources:type_name -> tfplugin6.GetMetadata.DataSourceMetadata
+ 60, // 26: tfplugin6.GetMetadata.Response.resources:type_name -> tfplugin6.GetMetadata.ResourceMetadata
+ 58, // 27: tfplugin6.GetMetadata.Response.functions:type_name -> tfplugin6.GetMetadata.FunctionMetadata
+ 61, // 28: tfplugin6.GetMetadata.Response.ephemeral_resources:type_name -> tfplugin6.GetMetadata.EphemeralResourceMetadata
+ 62, // 29: tfplugin6.GetMetadata.Response.list_resources:type_name -> tfplugin6.GetMetadata.ListResourceMetadata
+ 63, // 30: tfplugin6.GetMetadata.Response.actions:type_name -> tfplugin6.GetMetadata.ActionMetadata
+ 11, // 31: tfplugin6.GetProviderSchema.Response.provider:type_name -> tfplugin6.Schema
+ 66, // 32: tfplugin6.GetProviderSchema.Response.resource_schemas:type_name -> tfplugin6.GetProviderSchema.Response.ResourceSchemasEntry
+ 67, // 33: tfplugin6.GetProviderSchema.Response.data_source_schemas:type_name -> tfplugin6.GetProviderSchema.Response.DataSourceSchemasEntry
+ 6, // 34: tfplugin6.GetProviderSchema.Response.diagnostics:type_name -> tfplugin6.Diagnostic
+ 11, // 35: tfplugin6.GetProviderSchema.Response.provider_meta:type_name -> tfplugin6.Schema
+ 16, // 36: tfplugin6.GetProviderSchema.Response.server_capabilities:type_name -> tfplugin6.ServerCapabilities
+ 68, // 37: tfplugin6.GetProviderSchema.Response.functions:type_name -> tfplugin6.GetProviderSchema.Response.FunctionsEntry
+ 69, // 38: tfplugin6.GetProviderSchema.Response.ephemeral_resource_schemas:type_name -> tfplugin6.GetProviderSchema.Response.EphemeralResourceSchemasEntry
+ 70, // 39: tfplugin6.GetProviderSchema.Response.list_resource_schemas:type_name -> tfplugin6.GetProviderSchema.Response.ListResourceSchemasEntry
+ 71, // 40: tfplugin6.GetProviderSchema.Response.action_schemas:type_name -> tfplugin6.GetProviderSchema.Response.ActionSchemasEntry
+ 11, // 41: tfplugin6.GetProviderSchema.Response.ResourceSchemasEntry.value:type_name -> tfplugin6.Schema
+ 11, // 42: tfplugin6.GetProviderSchema.Response.DataSourceSchemasEntry.value:type_name -> tfplugin6.Schema
+ 14, // 43: tfplugin6.GetProviderSchema.Response.FunctionsEntry.value:type_name -> tfplugin6.Function
+ 11, // 44: tfplugin6.GetProviderSchema.Response.EphemeralResourceSchemasEntry.value:type_name -> tfplugin6.Schema
+ 11, // 45: tfplugin6.GetProviderSchema.Response.ListResourceSchemasEntry.value:type_name -> tfplugin6.Schema
+ 15, // 46: tfplugin6.GetProviderSchema.Response.ActionSchemasEntry.value:type_name -> tfplugin6.ActionSchema
+ 5, // 47: tfplugin6.ValidateProviderConfig.Request.config:type_name -> tfplugin6.DynamicValue
+ 6, // 48: tfplugin6.ValidateProviderConfig.Response.diagnostics:type_name -> tfplugin6.Diagnostic
+ 10, // 49: tfplugin6.UpgradeResourceState.Request.raw_state:type_name -> tfplugin6.RawState
+ 5, // 50: tfplugin6.UpgradeResourceState.Response.upgraded_state:type_name -> tfplugin6.DynamicValue
+ 6, // 51: tfplugin6.UpgradeResourceState.Response.diagnostics:type_name -> tfplugin6.Diagnostic
+ 5, // 52: tfplugin6.ValidateResourceConfig.Request.config:type_name -> tfplugin6.DynamicValue
+ 17, // 53: tfplugin6.ValidateResourceConfig.Request.client_capabilities:type_name -> tfplugin6.ClientCapabilities
+ 6, // 54: tfplugin6.ValidateResourceConfig.Response.diagnostics:type_name -> tfplugin6.Diagnostic
+ 5, // 55: tfplugin6.ValidateDataResourceConfig.Request.config:type_name -> tfplugin6.DynamicValue
+ 6, // 56: tfplugin6.ValidateDataResourceConfig.Response.diagnostics:type_name -> tfplugin6.Diagnostic
+ 5, // 57: tfplugin6.ConfigureProvider.Request.config:type_name -> tfplugin6.DynamicValue
+ 17, // 58: tfplugin6.ConfigureProvider.Request.client_capabilities:type_name -> tfplugin6.ClientCapabilities
+ 6, // 59: tfplugin6.ConfigureProvider.Response.diagnostics:type_name -> tfplugin6.Diagnostic
+ 5, // 60: tfplugin6.ReadResource.Request.current_state:type_name -> tfplugin6.DynamicValue
+ 5, // 61: tfplugin6.ReadResource.Request.provider_meta:type_name -> tfplugin6.DynamicValue
+ 17, // 62: tfplugin6.ReadResource.Request.client_capabilities:type_name -> tfplugin6.ClientCapabilities
+ 13, // 63: tfplugin6.ReadResource.Request.current_identity:type_name -> tfplugin6.ResourceIdentityData
+ 5, // 64: tfplugin6.ReadResource.Response.new_state:type_name -> tfplugin6.DynamicValue
+ 6, // 65: tfplugin6.ReadResource.Response.diagnostics:type_name -> tfplugin6.Diagnostic
+ 18, // 66: tfplugin6.ReadResource.Response.deferred:type_name -> tfplugin6.Deferred
+ 13, // 67: tfplugin6.ReadResource.Response.new_identity:type_name -> tfplugin6.ResourceIdentityData
+ 5, // 68: tfplugin6.PlanResourceChange.Request.prior_state:type_name -> tfplugin6.DynamicValue
+ 5, // 69: tfplugin6.PlanResourceChange.Request.proposed_new_state:type_name -> tfplugin6.DynamicValue
+ 5, // 70: tfplugin6.PlanResourceChange.Request.config:type_name -> tfplugin6.DynamicValue
+ 5, // 71: tfplugin6.PlanResourceChange.Request.provider_meta:type_name -> tfplugin6.DynamicValue
+ 17, // 72: tfplugin6.PlanResourceChange.Request.client_capabilities:type_name -> tfplugin6.ClientCapabilities
+ 13, // 73: tfplugin6.PlanResourceChange.Request.prior_identity:type_name -> tfplugin6.ResourceIdentityData
+ 5, // 74: tfplugin6.PlanResourceChange.Response.planned_state:type_name -> tfplugin6.DynamicValue
+ 8, // 75: tfplugin6.PlanResourceChange.Response.requires_replace:type_name -> tfplugin6.AttributePath
+ 6, // 76: tfplugin6.PlanResourceChange.Response.diagnostics:type_name -> tfplugin6.Diagnostic
+ 18, // 77: tfplugin6.PlanResourceChange.Response.deferred:type_name -> tfplugin6.Deferred
+ 13, // 78: tfplugin6.PlanResourceChange.Response.planned_identity:type_name -> tfplugin6.ResourceIdentityData
+ 5, // 79: tfplugin6.ApplyResourceChange.Request.prior_state:type_name -> tfplugin6.DynamicValue
+ 5, // 80: tfplugin6.ApplyResourceChange.Request.planned_state:type_name -> tfplugin6.DynamicValue
+ 5, // 81: tfplugin6.ApplyResourceChange.Request.config:type_name -> tfplugin6.DynamicValue
+ 5, // 82: tfplugin6.ApplyResourceChange.Request.provider_meta:type_name -> tfplugin6.DynamicValue
+ 13, // 83: tfplugin6.ApplyResourceChange.Request.planned_identity:type_name -> tfplugin6.ResourceIdentityData
+ 5, // 84: tfplugin6.ApplyResourceChange.Response.new_state:type_name -> tfplugin6.DynamicValue
+ 6, // 85: tfplugin6.ApplyResourceChange.Response.diagnostics:type_name -> tfplugin6.Diagnostic
+ 13, // 86: tfplugin6.ApplyResourceChange.Response.new_identity:type_name -> tfplugin6.ResourceIdentityData
+ 17, // 87: tfplugin6.ImportResourceState.Request.client_capabilities:type_name -> tfplugin6.ClientCapabilities
+ 13, // 88: tfplugin6.ImportResourceState.Request.identity:type_name -> tfplugin6.ResourceIdentityData
+ 5, // 89: tfplugin6.ImportResourceState.ImportedResource.state:type_name -> tfplugin6.DynamicValue
+ 13, // 90: tfplugin6.ImportResourceState.ImportedResource.identity:type_name -> tfplugin6.ResourceIdentityData
+ 89, // 91: tfplugin6.ImportResourceState.Response.imported_resources:type_name -> tfplugin6.ImportResourceState.ImportedResource
+ 6, // 92: tfplugin6.ImportResourceState.Response.diagnostics:type_name -> tfplugin6.Diagnostic
+ 18, // 93: tfplugin6.ImportResourceState.Response.deferred:type_name -> tfplugin6.Deferred
+ 10, // 94: tfplugin6.MoveResourceState.Request.source_state:type_name -> tfplugin6.RawState
+ 10, // 95: tfplugin6.MoveResourceState.Request.source_identity:type_name -> tfplugin6.RawState
+ 5, // 96: tfplugin6.MoveResourceState.Response.target_state:type_name -> tfplugin6.DynamicValue
+ 6, // 97: tfplugin6.MoveResourceState.Response.diagnostics:type_name -> tfplugin6.Diagnostic
+ 13, // 98: tfplugin6.MoveResourceState.Response.target_identity:type_name -> tfplugin6.ResourceIdentityData
+ 5, // 99: tfplugin6.ReadDataSource.Request.config:type_name -> tfplugin6.DynamicValue
+ 5, // 100: tfplugin6.ReadDataSource.Request.provider_meta:type_name -> tfplugin6.DynamicValue
+ 17, // 101: tfplugin6.ReadDataSource.Request.client_capabilities:type_name -> tfplugin6.ClientCapabilities
+ 5, // 102: tfplugin6.ReadDataSource.Response.state:type_name -> tfplugin6.DynamicValue
+ 6, // 103: tfplugin6.ReadDataSource.Response.diagnostics:type_name -> tfplugin6.Diagnostic
+ 18, // 104: tfplugin6.ReadDataSource.Response.deferred:type_name -> tfplugin6.Deferred
+ 97, // 105: tfplugin6.GetFunctions.Response.functions:type_name -> tfplugin6.GetFunctions.Response.FunctionsEntry
+ 6, // 106: tfplugin6.GetFunctions.Response.diagnostics:type_name -> tfplugin6.Diagnostic
+ 14, // 107: tfplugin6.GetFunctions.Response.FunctionsEntry.value:type_name -> tfplugin6.Function
+ 5, // 108: tfplugin6.CallFunction.Request.arguments:type_name -> tfplugin6.DynamicValue
+ 5, // 109: tfplugin6.CallFunction.Response.result:type_name -> tfplugin6.DynamicValue
+ 7, // 110: tfplugin6.CallFunction.Response.error:type_name -> tfplugin6.FunctionError
+ 5, // 111: tfplugin6.ValidateEphemeralResourceConfig.Request.config:type_name -> tfplugin6.DynamicValue
+ 6, // 112: tfplugin6.ValidateEphemeralResourceConfig.Response.diagnostics:type_name -> tfplugin6.Diagnostic
+ 5, // 113: tfplugin6.OpenEphemeralResource.Request.config:type_name -> tfplugin6.DynamicValue
+ 17, // 114: tfplugin6.OpenEphemeralResource.Request.client_capabilities:type_name -> tfplugin6.ClientCapabilities
+ 6, // 115: tfplugin6.OpenEphemeralResource.Response.diagnostics:type_name -> tfplugin6.Diagnostic
+ 125, // 116: tfplugin6.OpenEphemeralResource.Response.renew_at:type_name -> google.protobuf.Timestamp
+ 5, // 117: tfplugin6.OpenEphemeralResource.Response.result:type_name -> tfplugin6.DynamicValue
+ 18, // 118: tfplugin6.OpenEphemeralResource.Response.deferred:type_name -> tfplugin6.Deferred
+ 6, // 119: tfplugin6.RenewEphemeralResource.Response.diagnostics:type_name -> tfplugin6.Diagnostic
+ 125, // 120: tfplugin6.RenewEphemeralResource.Response.renew_at:type_name -> google.protobuf.Timestamp
+ 6, // 121: tfplugin6.CloseEphemeralResource.Response.diagnostics:type_name -> tfplugin6.Diagnostic
+ 110, // 122: tfplugin6.GetResourceIdentitySchemas.Response.identity_schemas:type_name -> tfplugin6.GetResourceIdentitySchemas.Response.IdentitySchemasEntry
+ 6, // 123: tfplugin6.GetResourceIdentitySchemas.Response.diagnostics:type_name -> tfplugin6.Diagnostic
+ 12, // 124: tfplugin6.GetResourceIdentitySchemas.Response.IdentitySchemasEntry.value:type_name -> tfplugin6.ResourceIdentitySchema
+ 10, // 125: tfplugin6.UpgradeResourceIdentity.Request.raw_identity:type_name -> tfplugin6.RawState
+ 13, // 126: tfplugin6.UpgradeResourceIdentity.Response.upgraded_identity:type_name -> tfplugin6.ResourceIdentityData
+ 6, // 127: tfplugin6.UpgradeResourceIdentity.Response.diagnostics:type_name -> tfplugin6.Diagnostic
+ 5, // 128: tfplugin6.ListResource.Request.config:type_name -> tfplugin6.DynamicValue
+ 13, // 129: tfplugin6.ListResource.Event.identity:type_name -> tfplugin6.ResourceIdentityData
+ 5, // 130: tfplugin6.ListResource.Event.resource_object:type_name -> tfplugin6.DynamicValue
+ 6, // 131: tfplugin6.ListResource.Event.diagnostic:type_name -> tfplugin6.Diagnostic
+ 5, // 132: tfplugin6.ValidateListResourceConfig.Request.config:type_name -> tfplugin6.DynamicValue
+ 5, // 133: tfplugin6.ValidateListResourceConfig.Request.include_resource_object:type_name -> tfplugin6.DynamicValue
+ 5, // 134: tfplugin6.ValidateListResourceConfig.Request.limit:type_name -> tfplugin6.DynamicValue
+ 6, // 135: tfplugin6.ValidateListResourceConfig.Response.diagnostics:type_name -> tfplugin6.Diagnostic
+ 5, // 136: tfplugin6.ValidateActionConfig.Request.config:type_name -> tfplugin6.DynamicValue
+ 6, // 137: tfplugin6.ValidateActionConfig.Response.diagnostics:type_name -> tfplugin6.Diagnostic
+ 5, // 138: tfplugin6.PlanAction.Request.config:type_name -> tfplugin6.DynamicValue
+ 17, // 139: tfplugin6.PlanAction.Request.client_capabilities:type_name -> tfplugin6.ClientCapabilities
+ 6, // 140: tfplugin6.PlanAction.Response.diagnostics:type_name -> tfplugin6.Diagnostic
+ 18, // 141: tfplugin6.PlanAction.Response.deferred:type_name -> tfplugin6.Deferred
+ 5, // 142: tfplugin6.InvokeAction.Request.config:type_name -> tfplugin6.DynamicValue
+ 17, // 143: tfplugin6.InvokeAction.Request.client_capabilities:type_name -> tfplugin6.ClientCapabilities
+ 123, // 144: tfplugin6.InvokeAction.Event.progress:type_name -> tfplugin6.InvokeAction.Event.Progress
+ 124, // 145: tfplugin6.InvokeAction.Event.completed:type_name -> tfplugin6.InvokeAction.Event.Completed
+ 6, // 146: tfplugin6.InvokeAction.Event.Completed.diagnostics:type_name -> tfplugin6.Diagnostic
+ 56, // 147: tfplugin6.Provider.GetMetadata:input_type -> tfplugin6.GetMetadata.Request
+ 64, // 148: tfplugin6.Provider.GetProviderSchema:input_type -> tfplugin6.GetProviderSchema.Request
+ 108, // 149: tfplugin6.Provider.GetResourceIdentitySchemas:input_type -> tfplugin6.GetResourceIdentitySchemas.Request
+ 72, // 150: tfplugin6.Provider.ValidateProviderConfig:input_type -> tfplugin6.ValidateProviderConfig.Request
+ 76, // 151: tfplugin6.Provider.ValidateResourceConfig:input_type -> tfplugin6.ValidateResourceConfig.Request
+ 78, // 152: tfplugin6.Provider.ValidateDataResourceConfig:input_type -> tfplugin6.ValidateDataResourceConfig.Request
+ 74, // 153: tfplugin6.Provider.UpgradeResourceState:input_type -> tfplugin6.UpgradeResourceState.Request
+ 111, // 154: tfplugin6.Provider.UpgradeResourceIdentity:input_type -> tfplugin6.UpgradeResourceIdentity.Request
+ 80, // 155: tfplugin6.Provider.ConfigureProvider:input_type -> tfplugin6.ConfigureProvider.Request
+ 82, // 156: tfplugin6.Provider.ReadResource:input_type -> tfplugin6.ReadResource.Request
+ 84, // 157: tfplugin6.Provider.PlanResourceChange:input_type -> tfplugin6.PlanResourceChange.Request
+ 86, // 158: tfplugin6.Provider.ApplyResourceChange:input_type -> tfplugin6.ApplyResourceChange.Request
+ 88, // 159: tfplugin6.Provider.ImportResourceState:input_type -> tfplugin6.ImportResourceState.Request
+ 91, // 160: tfplugin6.Provider.MoveResourceState:input_type -> tfplugin6.MoveResourceState.Request
+ 93, // 161: tfplugin6.Provider.ReadDataSource:input_type -> tfplugin6.ReadDataSource.Request
+ 100, // 162: tfplugin6.Provider.ValidateEphemeralResourceConfig:input_type -> tfplugin6.ValidateEphemeralResourceConfig.Request
+ 102, // 163: tfplugin6.Provider.OpenEphemeralResource:input_type -> tfplugin6.OpenEphemeralResource.Request
+ 104, // 164: tfplugin6.Provider.RenewEphemeralResource:input_type -> tfplugin6.RenewEphemeralResource.Request
+ 106, // 165: tfplugin6.Provider.CloseEphemeralResource:input_type -> tfplugin6.CloseEphemeralResource.Request
+ 113, // 166: tfplugin6.Provider.ListResource:input_type -> tfplugin6.ListResource.Request
+ 115, // 167: tfplugin6.Provider.ValidateListResourceConfig:input_type -> tfplugin6.ValidateListResourceConfig.Request
+ 95, // 168: tfplugin6.Provider.GetFunctions:input_type -> tfplugin6.GetFunctions.Request
+ 98, // 169: tfplugin6.Provider.CallFunction:input_type -> tfplugin6.CallFunction.Request
+ 117, // 170: tfplugin6.Provider.ValidateActionConfig:input_type -> tfplugin6.ValidateActionConfig.Request
+ 119, // 171: tfplugin6.Provider.PlanAction:input_type -> tfplugin6.PlanAction.Request
+ 121, // 172: tfplugin6.Provider.InvokeAction:input_type -> tfplugin6.InvokeAction.Request
+ 46, // 173: tfplugin6.Provider.StopProvider:input_type -> tfplugin6.StopProvider.Request
+ 57, // 174: tfplugin6.Provider.GetMetadata:output_type -> tfplugin6.GetMetadata.Response
+ 65, // 175: tfplugin6.Provider.GetProviderSchema:output_type -> tfplugin6.GetProviderSchema.Response
+ 109, // 176: tfplugin6.Provider.GetResourceIdentitySchemas:output_type -> tfplugin6.GetResourceIdentitySchemas.Response
+ 73, // 177: tfplugin6.Provider.ValidateProviderConfig:output_type -> tfplugin6.ValidateProviderConfig.Response
+ 77, // 178: tfplugin6.Provider.ValidateResourceConfig:output_type -> tfplugin6.ValidateResourceConfig.Response
+ 79, // 179: tfplugin6.Provider.ValidateDataResourceConfig:output_type -> tfplugin6.ValidateDataResourceConfig.Response
+ 75, // 180: tfplugin6.Provider.UpgradeResourceState:output_type -> tfplugin6.UpgradeResourceState.Response
+ 112, // 181: tfplugin6.Provider.UpgradeResourceIdentity:output_type -> tfplugin6.UpgradeResourceIdentity.Response
+ 81, // 182: tfplugin6.Provider.ConfigureProvider:output_type -> tfplugin6.ConfigureProvider.Response
+ 83, // 183: tfplugin6.Provider.ReadResource:output_type -> tfplugin6.ReadResource.Response
+ 85, // 184: tfplugin6.Provider.PlanResourceChange:output_type -> tfplugin6.PlanResourceChange.Response
+ 87, // 185: tfplugin6.Provider.ApplyResourceChange:output_type -> tfplugin6.ApplyResourceChange.Response
+ 90, // 186: tfplugin6.Provider.ImportResourceState:output_type -> tfplugin6.ImportResourceState.Response
+ 92, // 187: tfplugin6.Provider.MoveResourceState:output_type -> tfplugin6.MoveResourceState.Response
+ 94, // 188: tfplugin6.Provider.ReadDataSource:output_type -> tfplugin6.ReadDataSource.Response
+ 101, // 189: tfplugin6.Provider.ValidateEphemeralResourceConfig:output_type -> tfplugin6.ValidateEphemeralResourceConfig.Response
+ 103, // 190: tfplugin6.Provider.OpenEphemeralResource:output_type -> tfplugin6.OpenEphemeralResource.Response
+ 105, // 191: tfplugin6.Provider.RenewEphemeralResource:output_type -> tfplugin6.RenewEphemeralResource.Response
+ 107, // 192: tfplugin6.Provider.CloseEphemeralResource:output_type -> tfplugin6.CloseEphemeralResource.Response
+ 114, // 193: tfplugin6.Provider.ListResource:output_type -> tfplugin6.ListResource.Event
+ 116, // 194: tfplugin6.Provider.ValidateListResourceConfig:output_type -> tfplugin6.ValidateListResourceConfig.Response
+ 96, // 195: tfplugin6.Provider.GetFunctions:output_type -> tfplugin6.GetFunctions.Response
+ 99, // 196: tfplugin6.Provider.CallFunction:output_type -> tfplugin6.CallFunction.Response
+ 118, // 197: tfplugin6.Provider.ValidateActionConfig:output_type -> tfplugin6.ValidateActionConfig.Response
+ 120, // 198: tfplugin6.Provider.PlanAction:output_type -> tfplugin6.PlanAction.Response
+ 122, // 199: tfplugin6.Provider.InvokeAction:output_type -> tfplugin6.InvokeAction.Event
+ 47, // 200: tfplugin6.Provider.StopProvider:output_type -> tfplugin6.StopProvider.Response
+ 174, // [174:201] is the sub-list for method output_type
+ 147, // [147:174] is the sub-list for method input_type
+ 147, // [147:147] is the sub-list for extension type_name
+ 147, // [147:147] is the sub-list for extension extendee
+ 0, // [0:147] is the sub-list for field type_name
}
func init() { file_tfplugin6_proto_init() }
@@ -5328,849 +7367,28 @@ func file_tfplugin6_proto_init() {
if File_tfplugin6_proto != nil {
return
}
- if !protoimpl.UnsafeEnabled {
- file_tfplugin6_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*DynamicValue); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin6_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*Diagnostic); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin6_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*FunctionError); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin6_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*AttributePath); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin6_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*StopProvider); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin6_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*RawState); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin6_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*Schema); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin6_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*Function); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin6_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ServerCapabilities); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin6_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ClientCapabilities); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin6_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*Deferred); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin6_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetMetadata); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin6_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetProviderSchema); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin6_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ValidateProviderConfig); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin6_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*UpgradeResourceState); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin6_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ValidateResourceConfig); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin6_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ValidateDataResourceConfig); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin6_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ConfigureProvider); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin6_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ReadResource); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin6_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*PlanResourceChange); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin6_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ApplyResourceChange); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin6_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ImportResourceState); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin6_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*MoveResourceState); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin6_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ReadDataSource); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin6_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetFunctions); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin6_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*CallFunction); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin6_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*AttributePath_Step); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin6_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*StopProvider_Request); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin6_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*StopProvider_Response); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin6_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*Schema_Block); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin6_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*Schema_Attribute); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin6_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*Schema_NestedBlock); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin6_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*Schema_Object); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin6_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*Function_Parameter); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin6_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*Function_Return); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin6_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetMetadata_Request); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin6_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetMetadata_Response); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin6_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetMetadata_FunctionMetadata); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin6_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetMetadata_DataSourceMetadata); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin6_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetMetadata_ResourceMetadata); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin6_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetProviderSchema_Request); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin6_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetProviderSchema_Response); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin6_proto_msgTypes[46].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ValidateProviderConfig_Request); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin6_proto_msgTypes[47].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ValidateProviderConfig_Response); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin6_proto_msgTypes[48].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*UpgradeResourceState_Request); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin6_proto_msgTypes[49].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*UpgradeResourceState_Response); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin6_proto_msgTypes[50].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ValidateResourceConfig_Request); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin6_proto_msgTypes[51].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ValidateResourceConfig_Response); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin6_proto_msgTypes[52].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ValidateDataResourceConfig_Request); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin6_proto_msgTypes[53].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ValidateDataResourceConfig_Response); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin6_proto_msgTypes[54].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ConfigureProvider_Request); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin6_proto_msgTypes[55].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ConfigureProvider_Response); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin6_proto_msgTypes[56].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ReadResource_Request); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin6_proto_msgTypes[57].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ReadResource_Response); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin6_proto_msgTypes[58].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*PlanResourceChange_Request); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin6_proto_msgTypes[59].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*PlanResourceChange_Response); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin6_proto_msgTypes[60].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ApplyResourceChange_Request); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin6_proto_msgTypes[61].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ApplyResourceChange_Response); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin6_proto_msgTypes[62].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ImportResourceState_Request); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin6_proto_msgTypes[63].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ImportResourceState_ImportedResource); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin6_proto_msgTypes[64].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ImportResourceState_Response); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin6_proto_msgTypes[65].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*MoveResourceState_Request); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin6_proto_msgTypes[66].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*MoveResourceState_Response); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin6_proto_msgTypes[67].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ReadDataSource_Request); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin6_proto_msgTypes[68].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ReadDataSource_Response); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin6_proto_msgTypes[69].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetFunctions_Request); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin6_proto_msgTypes[70].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetFunctions_Response); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin6_proto_msgTypes[72].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*CallFunction_Request); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_tfplugin6_proto_msgTypes[73].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*CallFunction_Response); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- }
- file_tfplugin6_proto_msgTypes[2].OneofWrappers = []interface{}{}
- file_tfplugin6_proto_msgTypes[26].OneofWrappers = []interface{}{
+ file_tfplugin6_proto_msgTypes[2].OneofWrappers = []any{}
+ file_tfplugin6_proto_msgTypes[40].OneofWrappers = []any{
(*AttributePath_Step_AttributeName)(nil),
(*AttributePath_Step_ElementKeyString)(nil),
(*AttributePath_Step_ElementKeyInt)(nil),
}
+ file_tfplugin6_proto_msgTypes[98].OneofWrappers = []any{}
+ file_tfplugin6_proto_msgTypes[99].OneofWrappers = []any{}
+ file_tfplugin6_proto_msgTypes[100].OneofWrappers = []any{}
+ file_tfplugin6_proto_msgTypes[101].OneofWrappers = []any{}
+ file_tfplugin6_proto_msgTypes[109].OneofWrappers = []any{}
+ file_tfplugin6_proto_msgTypes[117].OneofWrappers = []any{
+ (*InvokeAction_Event_Progress_)(nil),
+ (*InvokeAction_Event_Completed_)(nil),
+ }
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
- RawDescriptor: file_tfplugin6_proto_rawDesc,
+ RawDescriptor: unsafe.Slice(unsafe.StringData(file_tfplugin6_proto_rawDesc), len(file_tfplugin6_proto_rawDesc)),
NumEnums: 5,
- NumMessages: 74,
+ NumMessages: 120,
NumExtensions: 0,
NumServices: 1,
},
@@ -6180,7 +7398,6 @@ func file_tfplugin6_proto_init() {
MessageInfos: file_tfplugin6_proto_msgTypes,
}.Build()
File_tfplugin6_proto = out.File
- file_tfplugin6_proto_rawDesc = nil
file_tfplugin6_proto_goTypes = nil
file_tfplugin6_proto_depIdxs = nil
}
diff --git a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/tfplugin6/tfplugin6.proto b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/tfplugin6/tfplugin6.proto
index 8504e12dcc..fd920f5339 100644
--- a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/tfplugin6/tfplugin6.proto
+++ b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/tfplugin6/tfplugin6.proto
@@ -1,14 +1,14 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
-// Terraform Plugin RPC protocol version 6.6
+// Terraform Plugin RPC protocol version 6.10
//
-// This file defines version 6.6 of the RPC protocol. To implement a plugin
+// This file defines version 6.10 of the RPC protocol. To implement a plugin
// against this protocol, copy this definition into your own codebase and
// use protoc to generate stubs for your target language.
//
// This file will not be updated. Any minor versions of protocol 6 to follow
-// should copy this file and modify the copy while maintaing backwards
+// should copy this file and modify the copy while maintaining backwards
// compatibility. Breaking changes, if any are required, will come
// in a subsequent major version with its own separate proto definition.
//
@@ -22,6 +22,8 @@
syntax = "proto3";
option go_package = "github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/tfplugin6";
+import "google/protobuf/timestamp.proto";
+
package tfplugin6;
// DynamicValue is an opaque encoding of terraform data, with the field name
@@ -108,6 +110,11 @@ message Schema {
bool sensitive = 7;
StringKind description_kind = 8;
bool deprecated = 9;
+ // write_only indicates that the attribute value will be provided via
+ // configuration and must be omitted from state. write_only must be
+ // combined with optional or required, and is only valid for managed
+ // resource schemas.
+ bool write_only = 11;
}
message NestedBlock {
@@ -154,6 +161,65 @@ message Schema {
Block block = 2;
}
+// ResourceIdentitySchema represents the structure and types of data used to identify
+// a managed resource type. Effectively, resource identity is a versioned object
+// that can be used to compare resources, whether already managed and/or being
+// discovered.
+message ResourceIdentitySchema {
+ // IdentityAttribute represents one value of data within resource identity.
+ // These are always used in resource identity comparisons.
+ message IdentityAttribute {
+ // name is the identity attribute name
+ string name = 1;
+
+ // type is the identity attribute type
+ bytes type = 2;
+
+ // required_for_import when enabled signifies that this attribute must be
+ // defined for ImportResourceState to complete successfully
+ bool required_for_import = 3;
+
+ // optional_for_import when enabled signifies that this attribute is not
+ // required for ImportResourceState, because it can be supplied by the
+ // provider. It is still possible to supply this attribute during import.
+ bool optional_for_import = 4;
+
+ // description is a human-readable description of the attribute in Markdown
+ string description = 5;
+ }
+
+ // version is the identity version and separate from the Schema version.
+ // Any time the structure or format of identity_attributes changes, this version
+ // should be incremented. Versioning implicitly starts at 0 and by convention
+ // should be incremented by 1 each change.
+ //
+ // When comparing identity_attributes data, differing versions should always be treated
+ // as inequal.
+ int64 version = 1;
+
+ // identity_attributes are the individual value definitions which define identity data
+ // for a managed resource type. This information is used to decode DynamicValue of
+ // identity data.
+ //
+ // These attributes are intended for permanent identity data and must be wholly
+ // representative of all data necessary to compare two managed resource instances
+ // with no other data. This generally should include account, endpoint, location,
+ // and automatically generated identifiers. For some resources, this may include
+ // configuration-based data, such as a required name which must be unique.
+ repeated IdentityAttribute identity_attributes = 2;
+}
+
+// ResourceIdentityData is a separate message for better extensibility
+message ResourceIdentityData {
+ // identity_data is the resource identity data for the given definition. It should
+ // be decoded using the identity schema.
+ //
+ // This data is considered permanent for the identity version and suitable for
+ // longer-term storage.
+ DynamicValue identity_data = 1;
+}
+
+
message Function {
// parameters is the ordered list of positional function parameters.
repeated Parameter parameters = 1;
@@ -210,6 +276,10 @@ message Function {
}
}
+message ActionSchema {
+ Schema schema = 1; // of the action itself
+}
+
// ServerCapabilities allows providers to communicate extra information
// regarding supported protocol features. This is used to indicate
// availability of certain forward-compatible changes which may be optional
@@ -238,6 +308,9 @@ message ClientCapabilities {
// The deferral_allowed capability signals that the client is able to
// handle deferred responses from the provider.
bool deferral_allowed = 1;
+ // The write_only_attributes_allowed capability signals that the client
+ // is able to handle write_only attributes for managed resources.
+ bool write_only_attributes_allowed = 2;
}
// Deferred is a message that indicates that change is deferred for a reason.
@@ -272,10 +345,16 @@ service Provider {
// GetSchema returns schema information for the provider, data resources,
// and managed resources.
rpc GetProviderSchema(GetProviderSchema.Request) returns (GetProviderSchema.Response);
+ // GetResourceIdentitySchemas returns the identity schemas for all managed
+ // resources.
+ rpc GetResourceIdentitySchemas(GetResourceIdentitySchemas.Request) returns (GetResourceIdentitySchemas.Response);
rpc ValidateProviderConfig(ValidateProviderConfig.Request) returns (ValidateProviderConfig.Response);
rpc ValidateResourceConfig(ValidateResourceConfig.Request) returns (ValidateResourceConfig.Response);
rpc ValidateDataResourceConfig(ValidateDataResourceConfig.Request) returns (ValidateDataResourceConfig.Response);
rpc UpgradeResourceState(UpgradeResourceState.Request) returns (UpgradeResourceState.Response);
+ // UpgradeResourceIdentityData should return the upgraded resource identity
+ // data for a managed resource type.
+ rpc UpgradeResourceIdentity(UpgradeResourceIdentity.Request) returns (UpgradeResourceIdentity.Response);
//////// One-time initialization, called before other functions below
rpc ConfigureProvider(ConfigureProvider.Request) returns (ConfigureProvider.Response);
@@ -288,6 +367,16 @@ service Provider {
rpc MoveResourceState(MoveResourceState.Request) returns (MoveResourceState.Response);
rpc ReadDataSource(ReadDataSource.Request) returns (ReadDataSource.Response);
+ //////// Ephemeral Resource Lifecycle
+ rpc ValidateEphemeralResourceConfig(ValidateEphemeralResourceConfig.Request) returns (ValidateEphemeralResourceConfig.Response);
+ rpc OpenEphemeralResource(OpenEphemeralResource.Request) returns (OpenEphemeralResource.Response);
+ rpc RenewEphemeralResource(RenewEphemeralResource.Request) returns (RenewEphemeralResource.Response);
+ rpc CloseEphemeralResource(CloseEphemeralResource.Request) returns (CloseEphemeralResource.Response);
+
+ /////// List
+ rpc ListResource(ListResource.Request) returns (stream ListResource.Event);
+ rpc ValidateListResourceConfig(ValidateListResourceConfig.Request) returns (ValidateListResourceConfig.Response);
+
// Functions
// GetFunctions returns the definitions of all functions.
@@ -295,7 +384,12 @@ service Provider {
// CallFunction runs the provider-defined function logic and returns
// the result with any diagnostics.
- rpc CallFunction(CallFunction.Request) returns (CallFunction.Response);
+ rpc CallFunction(CallFunction.Request) returns (CallFunction.Response);
+
+ //////// Actions Lifecycle
+ rpc ValidateActionConfig(ValidateActionConfig.Request) returns (ValidateActionConfig.Response);
+ rpc PlanAction(PlanAction.Request) returns (PlanAction.Response);
+ rpc InvokeAction(InvokeAction.Request) returns (stream InvokeAction.Event);
//////// Graceful Shutdown
rpc StopProvider(StopProvider.Request) returns (StopProvider.Response);
@@ -313,6 +407,10 @@ message GetMetadata {
// functions returns metadata for any functions.
repeated FunctionMetadata functions = 5;
+ repeated EphemeralResourceMetadata ephemeral_resources = 6;
+ repeated ListResourceMetadata list_resources = 7;
+ reserved 8; // TODO: Field number 8 will be used by state stores
+ repeated ActionMetadata actions = 9;
}
message FunctionMetadata {
@@ -327,6 +425,18 @@ message GetMetadata {
message ResourceMetadata {
string type_name = 1;
}
+
+ message EphemeralResourceMetadata {
+ string type_name = 1;
+ }
+
+ message ListResourceMetadata {
+ string type_name = 1;
+ }
+
+ message ActionMetadata {
+ string type_name = 1;
+ }
}
message GetProviderSchema {
@@ -342,6 +452,10 @@ message GetProviderSchema {
// functions is a mapping of function names to definitions.
map functions = 7;
+ map ephemeral_resource_schemas = 8;
+ map list_resource_schemas = 9;
+ reserved 10; // TODO: Field number 10 will be used by state stores
+ map action_schemas = 11;
}
}
@@ -394,6 +508,7 @@ message ValidateResourceConfig {
message Request {
string type_name = 1;
DynamicValue config = 2;
+ ClientCapabilities client_capabilities = 3;
}
message Response {
repeated Diagnostic diagnostics = 1;
@@ -436,6 +551,7 @@ message ReadResource {
bytes private = 3;
DynamicValue provider_meta = 4;
ClientCapabilities client_capabilities = 5;
+ ResourceIdentityData current_identity = 6;
}
message Response {
DynamicValue new_state = 1;
@@ -444,6 +560,7 @@ message ReadResource {
// deferred is set if the provider is deferring the change. If set the caller
// needs to handle the deferral.
Deferred deferred = 4;
+ ResourceIdentityData new_identity = 5;
}
}
@@ -456,6 +573,7 @@ message PlanResourceChange {
bytes prior_private = 5;
DynamicValue provider_meta = 6;
ClientCapabilities client_capabilities = 7;
+ ResourceIdentityData prior_identity = 8;
}
message Response {
@@ -464,6 +582,7 @@ message PlanResourceChange {
bytes planned_private = 3;
repeated Diagnostic diagnostics = 4;
+
// This may be set only by the helper/schema "SDK" in the main Terraform
// repository, to request that Terraform Core >=0.12 permit additional
// inconsistencies that can result from the legacy SDK type system
@@ -479,6 +598,7 @@ message PlanResourceChange {
// deferred is set if the provider is deferring the change. If set the caller
// needs to handle the deferral.
Deferred deferred = 6;
+ ResourceIdentityData planned_identity = 7;
}
}
@@ -490,6 +610,7 @@ message ApplyResourceChange {
DynamicValue config = 4;
bytes planned_private = 5;
DynamicValue provider_meta = 6;
+ ResourceIdentityData planned_identity = 7;
}
message Response {
DynamicValue new_state = 1;
@@ -508,6 +629,7 @@ message ApplyResourceChange {
// ==== THIS MUST BE LEFT UNSET IN ALL OTHER SDKS ====
// ==== DO NOT USE THIS ====
bool legacy_type_system = 4;
+ ResourceIdentityData new_identity = 5;
}
}
@@ -516,12 +638,14 @@ message ImportResourceState {
string type_name = 1;
string id = 2;
ClientCapabilities client_capabilities = 3;
+ ResourceIdentityData identity = 4;
}
message ImportedResource {
string type_name = 1;
DynamicValue state = 2;
bytes private = 3;
+ ResourceIdentityData identity = 4;
}
message Response {
@@ -555,6 +679,15 @@ message MoveResourceState {
// The private state of the resource being moved.
bytes source_private = 6;
+
+ // The raw identity of the resource being moved. Only the json field is
+ // populated, as there should be no legacy providers using the flatmap
+ // format that support newly introduced RPCs.
+ RawState source_identity = 7;
+
+ // The identity schema version of the resource type that the resource
+ // is being moved from.
+ int64 source_identity_schema_version = 8;
}
message Response {
@@ -566,6 +699,8 @@ message MoveResourceState {
// The private state of the resource after it has been moved.
bytes target_private = 3;
+
+ ResourceIdentityData target_identity = 4;
}
}
@@ -610,7 +745,182 @@ message CallFunction {
// result is result value after running the function logic.
DynamicValue result = 1;
- // error is any errors from the function logic.
+ // error is any error from the function logic.
FunctionError error = 2;
}
}
+
+message ValidateEphemeralResourceConfig {
+ message Request {
+ string type_name = 1;
+ DynamicValue config = 2;
+ }
+ message Response {
+ repeated Diagnostic diagnostics = 1;
+ }
+}
+
+message OpenEphemeralResource {
+ message Request {
+ string type_name = 1;
+ DynamicValue config = 2;
+ ClientCapabilities client_capabilities = 3;
+ }
+ message Response {
+ repeated Diagnostic diagnostics = 1;
+ optional google.protobuf.Timestamp renew_at = 2;
+ DynamicValue result = 3;
+ optional bytes private = 4;
+ // deferred is set if the provider is deferring the change. If set the caller
+ // needs to handle the deferral.
+ Deferred deferred = 5;
+ }
+}
+
+message RenewEphemeralResource {
+ message Request {
+ string type_name = 1;
+ optional bytes private = 2;
+ }
+ message Response {
+ repeated Diagnostic diagnostics = 1;
+ optional google.protobuf.Timestamp renew_at = 2;
+ optional bytes private = 3;
+ }
+}
+
+message CloseEphemeralResource {
+ message Request {
+ string type_name = 1;
+ optional bytes private = 2;
+ }
+ message Response {
+ repeated Diagnostic diagnostics = 1;
+ }
+}
+
+// Returns resource identity schemas for all resources
+message GetResourceIdentitySchemas {
+ message Request {
+ }
+ message Response {
+ // identity_schemas is a mapping of resource type names to their identity schemas.
+ map identity_schemas = 1;
+
+ // diagnostics is the collection of warning and error diagnostics for this request.
+ repeated Diagnostic diagnostics = 2;
+ }
+}
+
+message UpgradeResourceIdentity {
+ message Request {
+ // type_name is the managed resource type name
+ string type_name = 1;
+
+ // version is the version of the resource identity data to upgrade
+ int64 version = 2;
+
+ // raw_identity is the raw identity as stored for the resource. Core does
+ // not have access to the identity schema of prior_version, so it's the
+ // provider's responsibility to interpret this value using the
+ // appropriate older schema. The raw_identity will be json encoded.
+ RawState raw_identity = 3;
+ }
+ message Response {
+ // upgraded_identity returns the upgraded resource identity data
+ ResourceIdentityData upgraded_identity = 1;
+
+ // diagnostics is the collection of warning and error diagnostics for this request
+ repeated Diagnostic diagnostics = 2;
+ }
+}
+
+message ListResource {
+ message Request {
+ // type_name is the list resource type name.
+ string type_name = 1;
+
+ // configuration is the list ConfigSchema-based configuration data.
+ DynamicValue config = 2;
+
+ // when include_resource_object is set to true, the provider should
+ // include the full resource object for each result
+ bool include_resource_object = 3;
+
+ // The maximum number of results that Terraform is expecting.
+ // The stream will stop, once this limit is reached.
+ int64 limit = 4;
+ }
+
+ message Event {
+ // identity is the resource identity data of the resource instance.
+ ResourceIdentityData identity = 1;
+
+ // display_name can be displayed in a UI to make it easier for humans to identify a resource
+ string display_name = 2;
+
+ // optional resource object which can be useful when combining list blocks in configuration
+ optional DynamicValue resource_object = 3;
+
+ // A warning or error diagnostics for this event
+ repeated Diagnostic diagnostic = 4;
+ }
+}
+
+message ValidateListResourceConfig {
+ message Request {
+ string type_name = 1;
+ DynamicValue config = 2;
+ DynamicValue include_resource_object = 3;
+ DynamicValue limit = 4;
+ }
+ message Response {
+ repeated Diagnostic diagnostics = 1;
+ }
+}
+
+message ValidateActionConfig {
+ message Request {
+ string action_type = 1;
+ DynamicValue config = 2;
+ }
+ message Response {
+ repeated Diagnostic diagnostics = 1;
+ }
+}
+
+message PlanAction {
+ message Request {
+ string action_type = 1;
+ DynamicValue config = 2;
+ ClientCapabilities client_capabilities = 3;
+ }
+ message Response {
+ repeated Diagnostic diagnostics = 1;
+
+ // metadata
+ Deferred deferred = 2;
+ }
+}
+
+message InvokeAction {
+ message Request {
+ string action_type = 1;
+ DynamicValue config = 2;
+ ClientCapabilities client_capabilities = 3;
+ }
+
+ message Event {
+ message Progress {
+ // message to be printed in the console / HCPT
+ string message = 1;
+ }
+ message Completed {
+ repeated Diagnostic diagnostics = 1;
+ }
+ oneof type {
+ Progress progress = 1;
+ Completed completed = 2;
+ }
+ }
+}
\ No newline at end of file
diff --git a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/tfplugin6/tfplugin6_grpc.pb.go b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/tfplugin6/tfplugin6_grpc.pb.go
index d1d31e196c..43fcbf6596 100644
--- a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/tfplugin6/tfplugin6_grpc.pb.go
+++ b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/tfplugin6/tfplugin6_grpc.pb.go
@@ -1,14 +1,14 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
-// Terraform Plugin RPC protocol version 6.6
+// Terraform Plugin RPC protocol version 6.10
//
-// This file defines version 6.6 of the RPC protocol. To implement a plugin
+// This file defines version 6.10 of the RPC protocol. To implement a plugin
// against this protocol, copy this definition into your own codebase and
// use protoc to generate stubs for your target language.
//
// This file will not be updated. Any minor versions of protocol 6 to follow
-// should copy this file and modify the copy while maintaing backwards
+// should copy this file and modify the copy while maintaining backwards
// compatibility. Breaking changes, if any are required, will come
// in a subsequent major version with its own separate proto definition.
//
@@ -22,8 +22,8 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
-// - protoc-gen-go-grpc v1.3.0
-// - protoc v5.26.1
+// - protoc-gen-go-grpc v1.5.1
+// - protoc v5.29.3
// source: tfplugin6.proto
package tfplugin6
@@ -37,26 +37,37 @@ import (
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
-// Requires gRPC-Go v1.32.0 or later.
-const _ = grpc.SupportPackageIsVersion7
+// Requires gRPC-Go v1.64.0 or later.
+const _ = grpc.SupportPackageIsVersion9
const (
- Provider_GetMetadata_FullMethodName = "/tfplugin6.Provider/GetMetadata"
- Provider_GetProviderSchema_FullMethodName = "/tfplugin6.Provider/GetProviderSchema"
- Provider_ValidateProviderConfig_FullMethodName = "/tfplugin6.Provider/ValidateProviderConfig"
- Provider_ValidateResourceConfig_FullMethodName = "/tfplugin6.Provider/ValidateResourceConfig"
- Provider_ValidateDataResourceConfig_FullMethodName = "/tfplugin6.Provider/ValidateDataResourceConfig"
- Provider_UpgradeResourceState_FullMethodName = "/tfplugin6.Provider/UpgradeResourceState"
- Provider_ConfigureProvider_FullMethodName = "/tfplugin6.Provider/ConfigureProvider"
- Provider_ReadResource_FullMethodName = "/tfplugin6.Provider/ReadResource"
- Provider_PlanResourceChange_FullMethodName = "/tfplugin6.Provider/PlanResourceChange"
- Provider_ApplyResourceChange_FullMethodName = "/tfplugin6.Provider/ApplyResourceChange"
- Provider_ImportResourceState_FullMethodName = "/tfplugin6.Provider/ImportResourceState"
- Provider_MoveResourceState_FullMethodName = "/tfplugin6.Provider/MoveResourceState"
- Provider_ReadDataSource_FullMethodName = "/tfplugin6.Provider/ReadDataSource"
- Provider_GetFunctions_FullMethodName = "/tfplugin6.Provider/GetFunctions"
- Provider_CallFunction_FullMethodName = "/tfplugin6.Provider/CallFunction"
- Provider_StopProvider_FullMethodName = "/tfplugin6.Provider/StopProvider"
+ Provider_GetMetadata_FullMethodName = "/tfplugin6.Provider/GetMetadata"
+ Provider_GetProviderSchema_FullMethodName = "/tfplugin6.Provider/GetProviderSchema"
+ Provider_GetResourceIdentitySchemas_FullMethodName = "/tfplugin6.Provider/GetResourceIdentitySchemas"
+ Provider_ValidateProviderConfig_FullMethodName = "/tfplugin6.Provider/ValidateProviderConfig"
+ Provider_ValidateResourceConfig_FullMethodName = "/tfplugin6.Provider/ValidateResourceConfig"
+ Provider_ValidateDataResourceConfig_FullMethodName = "/tfplugin6.Provider/ValidateDataResourceConfig"
+ Provider_UpgradeResourceState_FullMethodName = "/tfplugin6.Provider/UpgradeResourceState"
+ Provider_UpgradeResourceIdentity_FullMethodName = "/tfplugin6.Provider/UpgradeResourceIdentity"
+ Provider_ConfigureProvider_FullMethodName = "/tfplugin6.Provider/ConfigureProvider"
+ Provider_ReadResource_FullMethodName = "/tfplugin6.Provider/ReadResource"
+ Provider_PlanResourceChange_FullMethodName = "/tfplugin6.Provider/PlanResourceChange"
+ Provider_ApplyResourceChange_FullMethodName = "/tfplugin6.Provider/ApplyResourceChange"
+ Provider_ImportResourceState_FullMethodName = "/tfplugin6.Provider/ImportResourceState"
+ Provider_MoveResourceState_FullMethodName = "/tfplugin6.Provider/MoveResourceState"
+ Provider_ReadDataSource_FullMethodName = "/tfplugin6.Provider/ReadDataSource"
+ Provider_ValidateEphemeralResourceConfig_FullMethodName = "/tfplugin6.Provider/ValidateEphemeralResourceConfig"
+ Provider_OpenEphemeralResource_FullMethodName = "/tfplugin6.Provider/OpenEphemeralResource"
+ Provider_RenewEphemeralResource_FullMethodName = "/tfplugin6.Provider/RenewEphemeralResource"
+ Provider_CloseEphemeralResource_FullMethodName = "/tfplugin6.Provider/CloseEphemeralResource"
+ Provider_ListResource_FullMethodName = "/tfplugin6.Provider/ListResource"
+ Provider_ValidateListResourceConfig_FullMethodName = "/tfplugin6.Provider/ValidateListResourceConfig"
+ Provider_GetFunctions_FullMethodName = "/tfplugin6.Provider/GetFunctions"
+ Provider_CallFunction_FullMethodName = "/tfplugin6.Provider/CallFunction"
+ Provider_ValidateActionConfig_FullMethodName = "/tfplugin6.Provider/ValidateActionConfig"
+ Provider_PlanAction_FullMethodName = "/tfplugin6.Provider/PlanAction"
+ Provider_InvokeAction_FullMethodName = "/tfplugin6.Provider/InvokeAction"
+ Provider_StopProvider_FullMethodName = "/tfplugin6.Provider/StopProvider"
)
// ProviderClient is the client API for Provider service.
@@ -72,10 +83,16 @@ type ProviderClient interface {
// GetSchema returns schema information for the provider, data resources,
// and managed resources.
GetProviderSchema(ctx context.Context, in *GetProviderSchema_Request, opts ...grpc.CallOption) (*GetProviderSchema_Response, error)
+ // GetResourceIdentitySchemas returns the identity schemas for all managed
+ // resources.
+ GetResourceIdentitySchemas(ctx context.Context, in *GetResourceIdentitySchemas_Request, opts ...grpc.CallOption) (*GetResourceIdentitySchemas_Response, error)
ValidateProviderConfig(ctx context.Context, in *ValidateProviderConfig_Request, opts ...grpc.CallOption) (*ValidateProviderConfig_Response, error)
ValidateResourceConfig(ctx context.Context, in *ValidateResourceConfig_Request, opts ...grpc.CallOption) (*ValidateResourceConfig_Response, error)
ValidateDataResourceConfig(ctx context.Context, in *ValidateDataResourceConfig_Request, opts ...grpc.CallOption) (*ValidateDataResourceConfig_Response, error)
UpgradeResourceState(ctx context.Context, in *UpgradeResourceState_Request, opts ...grpc.CallOption) (*UpgradeResourceState_Response, error)
+ // UpgradeResourceIdentityData should return the upgraded resource identity
+ // data for a managed resource type.
+ UpgradeResourceIdentity(ctx context.Context, in *UpgradeResourceIdentity_Request, opts ...grpc.CallOption) (*UpgradeResourceIdentity_Response, error)
// ////// One-time initialization, called before other functions below
ConfigureProvider(ctx context.Context, in *ConfigureProvider_Request, opts ...grpc.CallOption) (*ConfigureProvider_Response, error)
// ////// Managed Resource Lifecycle
@@ -85,11 +102,23 @@ type ProviderClient interface {
ImportResourceState(ctx context.Context, in *ImportResourceState_Request, opts ...grpc.CallOption) (*ImportResourceState_Response, error)
MoveResourceState(ctx context.Context, in *MoveResourceState_Request, opts ...grpc.CallOption) (*MoveResourceState_Response, error)
ReadDataSource(ctx context.Context, in *ReadDataSource_Request, opts ...grpc.CallOption) (*ReadDataSource_Response, error)
+ // ////// Ephemeral Resource Lifecycle
+ ValidateEphemeralResourceConfig(ctx context.Context, in *ValidateEphemeralResourceConfig_Request, opts ...grpc.CallOption) (*ValidateEphemeralResourceConfig_Response, error)
+ OpenEphemeralResource(ctx context.Context, in *OpenEphemeralResource_Request, opts ...grpc.CallOption) (*OpenEphemeralResource_Response, error)
+ RenewEphemeralResource(ctx context.Context, in *RenewEphemeralResource_Request, opts ...grpc.CallOption) (*RenewEphemeralResource_Response, error)
+ CloseEphemeralResource(ctx context.Context, in *CloseEphemeralResource_Request, opts ...grpc.CallOption) (*CloseEphemeralResource_Response, error)
+ // ///// List
+ ListResource(ctx context.Context, in *ListResource_Request, opts ...grpc.CallOption) (grpc.ServerStreamingClient[ListResource_Event], error)
+ ValidateListResourceConfig(ctx context.Context, in *ValidateListResourceConfig_Request, opts ...grpc.CallOption) (*ValidateListResourceConfig_Response, error)
// GetFunctions returns the definitions of all functions.
GetFunctions(ctx context.Context, in *GetFunctions_Request, opts ...grpc.CallOption) (*GetFunctions_Response, error)
// CallFunction runs the provider-defined function logic and returns
// the result with any diagnostics.
CallFunction(ctx context.Context, in *CallFunction_Request, opts ...grpc.CallOption) (*CallFunction_Response, error)
+ // ////// Actions Lifecycle
+ ValidateActionConfig(ctx context.Context, in *ValidateActionConfig_Request, opts ...grpc.CallOption) (*ValidateActionConfig_Response, error)
+ PlanAction(ctx context.Context, in *PlanAction_Request, opts ...grpc.CallOption) (*PlanAction_Response, error)
+ InvokeAction(ctx context.Context, in *InvokeAction_Request, opts ...grpc.CallOption) (grpc.ServerStreamingClient[InvokeAction_Event], error)
// ////// Graceful Shutdown
StopProvider(ctx context.Context, in *StopProvider_Request, opts ...grpc.CallOption) (*StopProvider_Response, error)
}
@@ -103,8 +132,9 @@ func NewProviderClient(cc grpc.ClientConnInterface) ProviderClient {
}
func (c *providerClient) GetMetadata(ctx context.Context, in *GetMetadata_Request, opts ...grpc.CallOption) (*GetMetadata_Response, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetMetadata_Response)
- err := c.cc.Invoke(ctx, Provider_GetMetadata_FullMethodName, in, out, opts...)
+ err := c.cc.Invoke(ctx, Provider_GetMetadata_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -112,8 +142,19 @@ func (c *providerClient) GetMetadata(ctx context.Context, in *GetMetadata_Reques
}
func (c *providerClient) GetProviderSchema(ctx context.Context, in *GetProviderSchema_Request, opts ...grpc.CallOption) (*GetProviderSchema_Response, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetProviderSchema_Response)
- err := c.cc.Invoke(ctx, Provider_GetProviderSchema_FullMethodName, in, out, opts...)
+ err := c.cc.Invoke(ctx, Provider_GetProviderSchema_FullMethodName, in, out, cOpts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *providerClient) GetResourceIdentitySchemas(ctx context.Context, in *GetResourceIdentitySchemas_Request, opts ...grpc.CallOption) (*GetResourceIdentitySchemas_Response, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
+ out := new(GetResourceIdentitySchemas_Response)
+ err := c.cc.Invoke(ctx, Provider_GetResourceIdentitySchemas_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -121,8 +162,9 @@ func (c *providerClient) GetProviderSchema(ctx context.Context, in *GetProviderS
}
func (c *providerClient) ValidateProviderConfig(ctx context.Context, in *ValidateProviderConfig_Request, opts ...grpc.CallOption) (*ValidateProviderConfig_Response, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ValidateProviderConfig_Response)
- err := c.cc.Invoke(ctx, Provider_ValidateProviderConfig_FullMethodName, in, out, opts...)
+ err := c.cc.Invoke(ctx, Provider_ValidateProviderConfig_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -130,8 +172,9 @@ func (c *providerClient) ValidateProviderConfig(ctx context.Context, in *Validat
}
func (c *providerClient) ValidateResourceConfig(ctx context.Context, in *ValidateResourceConfig_Request, opts ...grpc.CallOption) (*ValidateResourceConfig_Response, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ValidateResourceConfig_Response)
- err := c.cc.Invoke(ctx, Provider_ValidateResourceConfig_FullMethodName, in, out, opts...)
+ err := c.cc.Invoke(ctx, Provider_ValidateResourceConfig_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -139,8 +182,9 @@ func (c *providerClient) ValidateResourceConfig(ctx context.Context, in *Validat
}
func (c *providerClient) ValidateDataResourceConfig(ctx context.Context, in *ValidateDataResourceConfig_Request, opts ...grpc.CallOption) (*ValidateDataResourceConfig_Response, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ValidateDataResourceConfig_Response)
- err := c.cc.Invoke(ctx, Provider_ValidateDataResourceConfig_FullMethodName, in, out, opts...)
+ err := c.cc.Invoke(ctx, Provider_ValidateDataResourceConfig_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -148,8 +192,19 @@ func (c *providerClient) ValidateDataResourceConfig(ctx context.Context, in *Val
}
func (c *providerClient) UpgradeResourceState(ctx context.Context, in *UpgradeResourceState_Request, opts ...grpc.CallOption) (*UpgradeResourceState_Response, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(UpgradeResourceState_Response)
- err := c.cc.Invoke(ctx, Provider_UpgradeResourceState_FullMethodName, in, out, opts...)
+ err := c.cc.Invoke(ctx, Provider_UpgradeResourceState_FullMethodName, in, out, cOpts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *providerClient) UpgradeResourceIdentity(ctx context.Context, in *UpgradeResourceIdentity_Request, opts ...grpc.CallOption) (*UpgradeResourceIdentity_Response, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
+ out := new(UpgradeResourceIdentity_Response)
+ err := c.cc.Invoke(ctx, Provider_UpgradeResourceIdentity_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -157,8 +212,9 @@ func (c *providerClient) UpgradeResourceState(ctx context.Context, in *UpgradeRe
}
func (c *providerClient) ConfigureProvider(ctx context.Context, in *ConfigureProvider_Request, opts ...grpc.CallOption) (*ConfigureProvider_Response, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ConfigureProvider_Response)
- err := c.cc.Invoke(ctx, Provider_ConfigureProvider_FullMethodName, in, out, opts...)
+ err := c.cc.Invoke(ctx, Provider_ConfigureProvider_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -166,8 +222,9 @@ func (c *providerClient) ConfigureProvider(ctx context.Context, in *ConfigurePro
}
func (c *providerClient) ReadResource(ctx context.Context, in *ReadResource_Request, opts ...grpc.CallOption) (*ReadResource_Response, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ReadResource_Response)
- err := c.cc.Invoke(ctx, Provider_ReadResource_FullMethodName, in, out, opts...)
+ err := c.cc.Invoke(ctx, Provider_ReadResource_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -175,8 +232,9 @@ func (c *providerClient) ReadResource(ctx context.Context, in *ReadResource_Requ
}
func (c *providerClient) PlanResourceChange(ctx context.Context, in *PlanResourceChange_Request, opts ...grpc.CallOption) (*PlanResourceChange_Response, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(PlanResourceChange_Response)
- err := c.cc.Invoke(ctx, Provider_PlanResourceChange_FullMethodName, in, out, opts...)
+ err := c.cc.Invoke(ctx, Provider_PlanResourceChange_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -184,8 +242,9 @@ func (c *providerClient) PlanResourceChange(ctx context.Context, in *PlanResourc
}
func (c *providerClient) ApplyResourceChange(ctx context.Context, in *ApplyResourceChange_Request, opts ...grpc.CallOption) (*ApplyResourceChange_Response, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ApplyResourceChange_Response)
- err := c.cc.Invoke(ctx, Provider_ApplyResourceChange_FullMethodName, in, out, opts...)
+ err := c.cc.Invoke(ctx, Provider_ApplyResourceChange_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -193,8 +252,9 @@ func (c *providerClient) ApplyResourceChange(ctx context.Context, in *ApplyResou
}
func (c *providerClient) ImportResourceState(ctx context.Context, in *ImportResourceState_Request, opts ...grpc.CallOption) (*ImportResourceState_Response, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ImportResourceState_Response)
- err := c.cc.Invoke(ctx, Provider_ImportResourceState_FullMethodName, in, out, opts...)
+ err := c.cc.Invoke(ctx, Provider_ImportResourceState_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -202,8 +262,9 @@ func (c *providerClient) ImportResourceState(ctx context.Context, in *ImportReso
}
func (c *providerClient) MoveResourceState(ctx context.Context, in *MoveResourceState_Request, opts ...grpc.CallOption) (*MoveResourceState_Response, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(MoveResourceState_Response)
- err := c.cc.Invoke(ctx, Provider_MoveResourceState_FullMethodName, in, out, opts...)
+ err := c.cc.Invoke(ctx, Provider_MoveResourceState_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -211,8 +272,78 @@ func (c *providerClient) MoveResourceState(ctx context.Context, in *MoveResource
}
func (c *providerClient) ReadDataSource(ctx context.Context, in *ReadDataSource_Request, opts ...grpc.CallOption) (*ReadDataSource_Response, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ReadDataSource_Response)
- err := c.cc.Invoke(ctx, Provider_ReadDataSource_FullMethodName, in, out, opts...)
+ err := c.cc.Invoke(ctx, Provider_ReadDataSource_FullMethodName, in, out, cOpts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *providerClient) ValidateEphemeralResourceConfig(ctx context.Context, in *ValidateEphemeralResourceConfig_Request, opts ...grpc.CallOption) (*ValidateEphemeralResourceConfig_Response, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
+ out := new(ValidateEphemeralResourceConfig_Response)
+ err := c.cc.Invoke(ctx, Provider_ValidateEphemeralResourceConfig_FullMethodName, in, out, cOpts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *providerClient) OpenEphemeralResource(ctx context.Context, in *OpenEphemeralResource_Request, opts ...grpc.CallOption) (*OpenEphemeralResource_Response, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
+ out := new(OpenEphemeralResource_Response)
+ err := c.cc.Invoke(ctx, Provider_OpenEphemeralResource_FullMethodName, in, out, cOpts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *providerClient) RenewEphemeralResource(ctx context.Context, in *RenewEphemeralResource_Request, opts ...grpc.CallOption) (*RenewEphemeralResource_Response, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
+ out := new(RenewEphemeralResource_Response)
+ err := c.cc.Invoke(ctx, Provider_RenewEphemeralResource_FullMethodName, in, out, cOpts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *providerClient) CloseEphemeralResource(ctx context.Context, in *CloseEphemeralResource_Request, opts ...grpc.CallOption) (*CloseEphemeralResource_Response, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
+ out := new(CloseEphemeralResource_Response)
+ err := c.cc.Invoke(ctx, Provider_CloseEphemeralResource_FullMethodName, in, out, cOpts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *providerClient) ListResource(ctx context.Context, in *ListResource_Request, opts ...grpc.CallOption) (grpc.ServerStreamingClient[ListResource_Event], error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
+ stream, err := c.cc.NewStream(ctx, &Provider_ServiceDesc.Streams[0], Provider_ListResource_FullMethodName, cOpts...)
+ if err != nil {
+ return nil, err
+ }
+ x := &grpc.GenericClientStream[ListResource_Request, ListResource_Event]{ClientStream: stream}
+ if err := x.ClientStream.SendMsg(in); err != nil {
+ return nil, err
+ }
+ if err := x.ClientStream.CloseSend(); err != nil {
+ return nil, err
+ }
+ return x, nil
+}
+
+// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
+type Provider_ListResourceClient = grpc.ServerStreamingClient[ListResource_Event]
+
+func (c *providerClient) ValidateListResourceConfig(ctx context.Context, in *ValidateListResourceConfig_Request, opts ...grpc.CallOption) (*ValidateListResourceConfig_Response, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
+ out := new(ValidateListResourceConfig_Response)
+ err := c.cc.Invoke(ctx, Provider_ValidateListResourceConfig_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -220,8 +351,9 @@ func (c *providerClient) ReadDataSource(ctx context.Context, in *ReadDataSource_
}
func (c *providerClient) GetFunctions(ctx context.Context, in *GetFunctions_Request, opts ...grpc.CallOption) (*GetFunctions_Response, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetFunctions_Response)
- err := c.cc.Invoke(ctx, Provider_GetFunctions_FullMethodName, in, out, opts...)
+ err := c.cc.Invoke(ctx, Provider_GetFunctions_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -229,17 +361,58 @@ func (c *providerClient) GetFunctions(ctx context.Context, in *GetFunctions_Requ
}
func (c *providerClient) CallFunction(ctx context.Context, in *CallFunction_Request, opts ...grpc.CallOption) (*CallFunction_Response, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(CallFunction_Response)
- err := c.cc.Invoke(ctx, Provider_CallFunction_FullMethodName, in, out, opts...)
+ err := c.cc.Invoke(ctx, Provider_CallFunction_FullMethodName, in, out, cOpts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *providerClient) ValidateActionConfig(ctx context.Context, in *ValidateActionConfig_Request, opts ...grpc.CallOption) (*ValidateActionConfig_Response, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
+ out := new(ValidateActionConfig_Response)
+ err := c.cc.Invoke(ctx, Provider_ValidateActionConfig_FullMethodName, in, out, cOpts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *providerClient) PlanAction(ctx context.Context, in *PlanAction_Request, opts ...grpc.CallOption) (*PlanAction_Response, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
+ out := new(PlanAction_Response)
+ err := c.cc.Invoke(ctx, Provider_PlanAction_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
+func (c *providerClient) InvokeAction(ctx context.Context, in *InvokeAction_Request, opts ...grpc.CallOption) (grpc.ServerStreamingClient[InvokeAction_Event], error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
+ stream, err := c.cc.NewStream(ctx, &Provider_ServiceDesc.Streams[1], Provider_InvokeAction_FullMethodName, cOpts...)
+ if err != nil {
+ return nil, err
+ }
+ x := &grpc.GenericClientStream[InvokeAction_Request, InvokeAction_Event]{ClientStream: stream}
+ if err := x.ClientStream.SendMsg(in); err != nil {
+ return nil, err
+ }
+ if err := x.ClientStream.CloseSend(); err != nil {
+ return nil, err
+ }
+ return x, nil
+}
+
+// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
+type Provider_InvokeActionClient = grpc.ServerStreamingClient[InvokeAction_Event]
+
func (c *providerClient) StopProvider(ctx context.Context, in *StopProvider_Request, opts ...grpc.CallOption) (*StopProvider_Response, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(StopProvider_Response)
- err := c.cc.Invoke(ctx, Provider_StopProvider_FullMethodName, in, out, opts...)
+ err := c.cc.Invoke(ctx, Provider_StopProvider_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -248,7 +421,7 @@ func (c *providerClient) StopProvider(ctx context.Context, in *StopProvider_Requ
// ProviderServer is the server API for Provider service.
// All implementations must embed UnimplementedProviderServer
-// for forward compatibility
+// for forward compatibility.
type ProviderServer interface {
// GetMetadata returns upfront information about server capabilities and
// supported resource types without requiring the server to instantiate all
@@ -259,10 +432,16 @@ type ProviderServer interface {
// GetSchema returns schema information for the provider, data resources,
// and managed resources.
GetProviderSchema(context.Context, *GetProviderSchema_Request) (*GetProviderSchema_Response, error)
+ // GetResourceIdentitySchemas returns the identity schemas for all managed
+ // resources.
+ GetResourceIdentitySchemas(context.Context, *GetResourceIdentitySchemas_Request) (*GetResourceIdentitySchemas_Response, error)
ValidateProviderConfig(context.Context, *ValidateProviderConfig_Request) (*ValidateProviderConfig_Response, error)
ValidateResourceConfig(context.Context, *ValidateResourceConfig_Request) (*ValidateResourceConfig_Response, error)
ValidateDataResourceConfig(context.Context, *ValidateDataResourceConfig_Request) (*ValidateDataResourceConfig_Response, error)
UpgradeResourceState(context.Context, *UpgradeResourceState_Request) (*UpgradeResourceState_Response, error)
+ // UpgradeResourceIdentityData should return the upgraded resource identity
+ // data for a managed resource type.
+ UpgradeResourceIdentity(context.Context, *UpgradeResourceIdentity_Request) (*UpgradeResourceIdentity_Response, error)
// ////// One-time initialization, called before other functions below
ConfigureProvider(context.Context, *ConfigureProvider_Request) (*ConfigureProvider_Response, error)
// ////// Managed Resource Lifecycle
@@ -272,19 +451,34 @@ type ProviderServer interface {
ImportResourceState(context.Context, *ImportResourceState_Request) (*ImportResourceState_Response, error)
MoveResourceState(context.Context, *MoveResourceState_Request) (*MoveResourceState_Response, error)
ReadDataSource(context.Context, *ReadDataSource_Request) (*ReadDataSource_Response, error)
+ // ////// Ephemeral Resource Lifecycle
+ ValidateEphemeralResourceConfig(context.Context, *ValidateEphemeralResourceConfig_Request) (*ValidateEphemeralResourceConfig_Response, error)
+ OpenEphemeralResource(context.Context, *OpenEphemeralResource_Request) (*OpenEphemeralResource_Response, error)
+ RenewEphemeralResource(context.Context, *RenewEphemeralResource_Request) (*RenewEphemeralResource_Response, error)
+ CloseEphemeralResource(context.Context, *CloseEphemeralResource_Request) (*CloseEphemeralResource_Response, error)
+ // ///// List
+ ListResource(*ListResource_Request, grpc.ServerStreamingServer[ListResource_Event]) error
+ ValidateListResourceConfig(context.Context, *ValidateListResourceConfig_Request) (*ValidateListResourceConfig_Response, error)
// GetFunctions returns the definitions of all functions.
GetFunctions(context.Context, *GetFunctions_Request) (*GetFunctions_Response, error)
// CallFunction runs the provider-defined function logic and returns
// the result with any diagnostics.
CallFunction(context.Context, *CallFunction_Request) (*CallFunction_Response, error)
+ // ////// Actions Lifecycle
+ ValidateActionConfig(context.Context, *ValidateActionConfig_Request) (*ValidateActionConfig_Response, error)
+ PlanAction(context.Context, *PlanAction_Request) (*PlanAction_Response, error)
+ InvokeAction(*InvokeAction_Request, grpc.ServerStreamingServer[InvokeAction_Event]) error
// ////// Graceful Shutdown
StopProvider(context.Context, *StopProvider_Request) (*StopProvider_Response, error)
mustEmbedUnimplementedProviderServer()
}
-// UnimplementedProviderServer must be embedded to have forward compatible implementations.
-type UnimplementedProviderServer struct {
-}
+// UnimplementedProviderServer must be embedded to have
+// forward compatible implementations.
+//
+// NOTE: this should be embedded by value instead of pointer to avoid a nil
+// pointer dereference when methods are called.
+type UnimplementedProviderServer struct{}
func (UnimplementedProviderServer) GetMetadata(context.Context, *GetMetadata_Request) (*GetMetadata_Response, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetMetadata not implemented")
@@ -292,6 +486,9 @@ func (UnimplementedProviderServer) GetMetadata(context.Context, *GetMetadata_Req
func (UnimplementedProviderServer) GetProviderSchema(context.Context, *GetProviderSchema_Request) (*GetProviderSchema_Response, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetProviderSchema not implemented")
}
+func (UnimplementedProviderServer) GetResourceIdentitySchemas(context.Context, *GetResourceIdentitySchemas_Request) (*GetResourceIdentitySchemas_Response, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method GetResourceIdentitySchemas not implemented")
+}
func (UnimplementedProviderServer) ValidateProviderConfig(context.Context, *ValidateProviderConfig_Request) (*ValidateProviderConfig_Response, error) {
return nil, status.Errorf(codes.Unimplemented, "method ValidateProviderConfig not implemented")
}
@@ -304,6 +501,9 @@ func (UnimplementedProviderServer) ValidateDataResourceConfig(context.Context, *
func (UnimplementedProviderServer) UpgradeResourceState(context.Context, *UpgradeResourceState_Request) (*UpgradeResourceState_Response, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpgradeResourceState not implemented")
}
+func (UnimplementedProviderServer) UpgradeResourceIdentity(context.Context, *UpgradeResourceIdentity_Request) (*UpgradeResourceIdentity_Response, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method UpgradeResourceIdentity not implemented")
+}
func (UnimplementedProviderServer) ConfigureProvider(context.Context, *ConfigureProvider_Request) (*ConfigureProvider_Response, error) {
return nil, status.Errorf(codes.Unimplemented, "method ConfigureProvider not implemented")
}
@@ -325,16 +525,44 @@ func (UnimplementedProviderServer) MoveResourceState(context.Context, *MoveResou
func (UnimplementedProviderServer) ReadDataSource(context.Context, *ReadDataSource_Request) (*ReadDataSource_Response, error) {
return nil, status.Errorf(codes.Unimplemented, "method ReadDataSource not implemented")
}
+func (UnimplementedProviderServer) ValidateEphemeralResourceConfig(context.Context, *ValidateEphemeralResourceConfig_Request) (*ValidateEphemeralResourceConfig_Response, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method ValidateEphemeralResourceConfig not implemented")
+}
+func (UnimplementedProviderServer) OpenEphemeralResource(context.Context, *OpenEphemeralResource_Request) (*OpenEphemeralResource_Response, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method OpenEphemeralResource not implemented")
+}
+func (UnimplementedProviderServer) RenewEphemeralResource(context.Context, *RenewEphemeralResource_Request) (*RenewEphemeralResource_Response, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method RenewEphemeralResource not implemented")
+}
+func (UnimplementedProviderServer) CloseEphemeralResource(context.Context, *CloseEphemeralResource_Request) (*CloseEphemeralResource_Response, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method CloseEphemeralResource not implemented")
+}
+func (UnimplementedProviderServer) ListResource(*ListResource_Request, grpc.ServerStreamingServer[ListResource_Event]) error {
+ return status.Errorf(codes.Unimplemented, "method ListResource not implemented")
+}
+func (UnimplementedProviderServer) ValidateListResourceConfig(context.Context, *ValidateListResourceConfig_Request) (*ValidateListResourceConfig_Response, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method ValidateListResourceConfig not implemented")
+}
func (UnimplementedProviderServer) GetFunctions(context.Context, *GetFunctions_Request) (*GetFunctions_Response, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetFunctions not implemented")
}
func (UnimplementedProviderServer) CallFunction(context.Context, *CallFunction_Request) (*CallFunction_Response, error) {
return nil, status.Errorf(codes.Unimplemented, "method CallFunction not implemented")
}
+func (UnimplementedProviderServer) ValidateActionConfig(context.Context, *ValidateActionConfig_Request) (*ValidateActionConfig_Response, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method ValidateActionConfig not implemented")
+}
+func (UnimplementedProviderServer) PlanAction(context.Context, *PlanAction_Request) (*PlanAction_Response, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method PlanAction not implemented")
+}
+func (UnimplementedProviderServer) InvokeAction(*InvokeAction_Request, grpc.ServerStreamingServer[InvokeAction_Event]) error {
+ return status.Errorf(codes.Unimplemented, "method InvokeAction not implemented")
+}
func (UnimplementedProviderServer) StopProvider(context.Context, *StopProvider_Request) (*StopProvider_Response, error) {
return nil, status.Errorf(codes.Unimplemented, "method StopProvider not implemented")
}
func (UnimplementedProviderServer) mustEmbedUnimplementedProviderServer() {}
+func (UnimplementedProviderServer) testEmbeddedByValue() {}
// UnsafeProviderServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to ProviderServer will
@@ -344,6 +572,13 @@ type UnsafeProviderServer interface {
}
func RegisterProviderServer(s grpc.ServiceRegistrar, srv ProviderServer) {
+ // If the following call pancis, it indicates UnimplementedProviderServer was
+ // embedded by pointer and is nil. This will cause panics if an
+ // unimplemented method is ever invoked, so we test this at initialization
+ // time to prevent it from happening at runtime later due to I/O.
+ if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
+ t.testEmbeddedByValue()
+ }
s.RegisterService(&Provider_ServiceDesc, srv)
}
@@ -383,6 +618,24 @@ func _Provider_GetProviderSchema_Handler(srv interface{}, ctx context.Context, d
return interceptor(ctx, in, info, handler)
}
+func _Provider_GetResourceIdentitySchemas_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(GetResourceIdentitySchemas_Request)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(ProviderServer).GetResourceIdentitySchemas(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: Provider_GetResourceIdentitySchemas_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(ProviderServer).GetResourceIdentitySchemas(ctx, req.(*GetResourceIdentitySchemas_Request))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
func _Provider_ValidateProviderConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ValidateProviderConfig_Request)
if err := dec(in); err != nil {
@@ -455,6 +708,24 @@ func _Provider_UpgradeResourceState_Handler(srv interface{}, ctx context.Context
return interceptor(ctx, in, info, handler)
}
+func _Provider_UpgradeResourceIdentity_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(UpgradeResourceIdentity_Request)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(ProviderServer).UpgradeResourceIdentity(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: Provider_UpgradeResourceIdentity_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(ProviderServer).UpgradeResourceIdentity(ctx, req.(*UpgradeResourceIdentity_Request))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
func _Provider_ConfigureProvider_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ConfigureProvider_Request)
if err := dec(in); err != nil {
@@ -581,6 +852,107 @@ func _Provider_ReadDataSource_Handler(srv interface{}, ctx context.Context, dec
return interceptor(ctx, in, info, handler)
}
+func _Provider_ValidateEphemeralResourceConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(ValidateEphemeralResourceConfig_Request)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(ProviderServer).ValidateEphemeralResourceConfig(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: Provider_ValidateEphemeralResourceConfig_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(ProviderServer).ValidateEphemeralResourceConfig(ctx, req.(*ValidateEphemeralResourceConfig_Request))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _Provider_OpenEphemeralResource_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(OpenEphemeralResource_Request)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(ProviderServer).OpenEphemeralResource(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: Provider_OpenEphemeralResource_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(ProviderServer).OpenEphemeralResource(ctx, req.(*OpenEphemeralResource_Request))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _Provider_RenewEphemeralResource_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(RenewEphemeralResource_Request)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(ProviderServer).RenewEphemeralResource(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: Provider_RenewEphemeralResource_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(ProviderServer).RenewEphemeralResource(ctx, req.(*RenewEphemeralResource_Request))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _Provider_CloseEphemeralResource_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(CloseEphemeralResource_Request)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(ProviderServer).CloseEphemeralResource(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: Provider_CloseEphemeralResource_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(ProviderServer).CloseEphemeralResource(ctx, req.(*CloseEphemeralResource_Request))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _Provider_ListResource_Handler(srv interface{}, stream grpc.ServerStream) error {
+ m := new(ListResource_Request)
+ if err := stream.RecvMsg(m); err != nil {
+ return err
+ }
+ return srv.(ProviderServer).ListResource(m, &grpc.GenericServerStream[ListResource_Request, ListResource_Event]{ServerStream: stream})
+}
+
+// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
+type Provider_ListResourceServer = grpc.ServerStreamingServer[ListResource_Event]
+
+func _Provider_ValidateListResourceConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(ValidateListResourceConfig_Request)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(ProviderServer).ValidateListResourceConfig(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: Provider_ValidateListResourceConfig_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(ProviderServer).ValidateListResourceConfig(ctx, req.(*ValidateListResourceConfig_Request))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
func _Provider_GetFunctions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetFunctions_Request)
if err := dec(in); err != nil {
@@ -617,6 +989,53 @@ func _Provider_CallFunction_Handler(srv interface{}, ctx context.Context, dec fu
return interceptor(ctx, in, info, handler)
}
+func _Provider_ValidateActionConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(ValidateActionConfig_Request)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(ProviderServer).ValidateActionConfig(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: Provider_ValidateActionConfig_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(ProviderServer).ValidateActionConfig(ctx, req.(*ValidateActionConfig_Request))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _Provider_PlanAction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(PlanAction_Request)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(ProviderServer).PlanAction(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: Provider_PlanAction_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(ProviderServer).PlanAction(ctx, req.(*PlanAction_Request))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _Provider_InvokeAction_Handler(srv interface{}, stream grpc.ServerStream) error {
+ m := new(InvokeAction_Request)
+ if err := stream.RecvMsg(m); err != nil {
+ return err
+ }
+ return srv.(ProviderServer).InvokeAction(m, &grpc.GenericServerStream[InvokeAction_Request, InvokeAction_Event]{ServerStream: stream})
+}
+
+// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
+type Provider_InvokeActionServer = grpc.ServerStreamingServer[InvokeAction_Event]
+
func _Provider_StopProvider_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(StopProvider_Request)
if err := dec(in); err != nil {
@@ -650,6 +1069,10 @@ var Provider_ServiceDesc = grpc.ServiceDesc{
MethodName: "GetProviderSchema",
Handler: _Provider_GetProviderSchema_Handler,
},
+ {
+ MethodName: "GetResourceIdentitySchemas",
+ Handler: _Provider_GetResourceIdentitySchemas_Handler,
+ },
{
MethodName: "ValidateProviderConfig",
Handler: _Provider_ValidateProviderConfig_Handler,
@@ -666,6 +1089,10 @@ var Provider_ServiceDesc = grpc.ServiceDesc{
MethodName: "UpgradeResourceState",
Handler: _Provider_UpgradeResourceState_Handler,
},
+ {
+ MethodName: "UpgradeResourceIdentity",
+ Handler: _Provider_UpgradeResourceIdentity_Handler,
+ },
{
MethodName: "ConfigureProvider",
Handler: _Provider_ConfigureProvider_Handler,
@@ -694,6 +1121,26 @@ var Provider_ServiceDesc = grpc.ServiceDesc{
MethodName: "ReadDataSource",
Handler: _Provider_ReadDataSource_Handler,
},
+ {
+ MethodName: "ValidateEphemeralResourceConfig",
+ Handler: _Provider_ValidateEphemeralResourceConfig_Handler,
+ },
+ {
+ MethodName: "OpenEphemeralResource",
+ Handler: _Provider_OpenEphemeralResource_Handler,
+ },
+ {
+ MethodName: "RenewEphemeralResource",
+ Handler: _Provider_RenewEphemeralResource_Handler,
+ },
+ {
+ MethodName: "CloseEphemeralResource",
+ Handler: _Provider_CloseEphemeralResource_Handler,
+ },
+ {
+ MethodName: "ValidateListResourceConfig",
+ Handler: _Provider_ValidateListResourceConfig_Handler,
+ },
{
MethodName: "GetFunctions",
Handler: _Provider_GetFunctions_Handler,
@@ -702,11 +1149,30 @@ var Provider_ServiceDesc = grpc.ServiceDesc{
MethodName: "CallFunction",
Handler: _Provider_CallFunction_Handler,
},
+ {
+ MethodName: "ValidateActionConfig",
+ Handler: _Provider_ValidateActionConfig_Handler,
+ },
+ {
+ MethodName: "PlanAction",
+ Handler: _Provider_PlanAction_Handler,
+ },
{
MethodName: "StopProvider",
Handler: _Provider_StopProvider_Handler,
},
},
- Streams: []grpc.StreamDesc{},
+ Streams: []grpc.StreamDesc{
+ {
+ StreamName: "ListResource",
+ Handler: _Provider_ListResource_Handler,
+ ServerStreams: true,
+ },
+ {
+ StreamName: "InvokeAction",
+ Handler: _Provider_InvokeAction_Handler,
+ ServerStreams: true,
+ },
+ },
Metadata: "tfplugin6.proto",
}
diff --git a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/toproto/action.go b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/toproto/action.go
new file mode 100644
index 0000000000..7de1eec468
--- /dev/null
+++ b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/toproto/action.go
@@ -0,0 +1,75 @@
+// Copyright (c) HashiCorp, Inc.
+// SPDX-License-Identifier: MPL-2.0
+
+package toproto
+
+import (
+ "fmt"
+
+ "github.com/hashicorp/terraform-plugin-go/tfprotov6"
+ "github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/tfplugin6"
+)
+
+func GetMetadata_ActionMetadata(in *tfprotov6.ActionMetadata) *tfplugin6.GetMetadata_ActionMetadata {
+ if in == nil {
+ return nil
+ }
+
+ return &tfplugin6.GetMetadata_ActionMetadata{
+ TypeName: in.TypeName,
+ }
+}
+
+func ValidateActionConfig_Response(in *tfprotov6.ValidateActionConfigResponse) *tfplugin6.ValidateActionConfig_Response {
+ if in == nil {
+ return nil
+ }
+
+ return &tfplugin6.ValidateActionConfig_Response{
+ Diagnostics: Diagnostics(in.Diagnostics),
+ }
+}
+
+func PlanAction_Response(in *tfprotov6.PlanActionResponse) *tfplugin6.PlanAction_Response {
+ if in == nil {
+ return nil
+ }
+
+ resp := &tfplugin6.PlanAction_Response{
+ Diagnostics: Diagnostics(in.Diagnostics),
+ Deferred: Deferred(in.Deferred),
+ }
+
+ return resp
+}
+
+func InvokeAction_InvokeActionEvent(in *tfprotov6.InvokeActionEvent) *tfplugin6.InvokeAction_Event {
+ if in == nil {
+ return nil
+ }
+
+ switch event := (in.Type).(type) {
+ case tfprotov6.ProgressInvokeActionEventType:
+ return &tfplugin6.InvokeAction_Event{
+ Type: &tfplugin6.InvokeAction_Event_Progress_{
+ Progress: &tfplugin6.InvokeAction_Event_Progress{
+ Message: event.Message,
+ },
+ },
+ }
+ case tfprotov6.CompletedInvokeActionEventType:
+ return &tfplugin6.InvokeAction_Event{
+ Type: &tfplugin6.InvokeAction_Event_Completed_{
+ Completed: &tfplugin6.InvokeAction_Event_Completed{
+ Diagnostics: Diagnostics(event.Diagnostics),
+ },
+ },
+ }
+ }
+
+ // It is not currently possible to create tfprotov6.InvokeActionEventType
+ // implementations outside the tfprotov6 package. If this panic was reached,
+ // it implies that a new event type was introduced and needs to be implemented
+ // as a new case above.
+ panic(fmt.Sprintf("unimplemented tfprotov6.InvokeActionEventType type: %T", in.Type))
+}
diff --git a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/toproto/action_schema.go b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/toproto/action_schema.go
new file mode 100644
index 0000000000..e5e17191bc
--- /dev/null
+++ b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/toproto/action_schema.go
@@ -0,0 +1,20 @@
+// Copyright (c) HashiCorp, Inc.
+// SPDX-License-Identifier: MPL-2.0
+
+package toproto
+
+import (
+ "github.com/hashicorp/terraform-plugin-go/tfprotov6"
+ "github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/tfplugin6"
+)
+
+func ActionSchema(in *tfprotov6.ActionSchema) *tfplugin6.ActionSchema {
+ if in == nil {
+ return nil
+ }
+
+ resp := &tfplugin6.ActionSchema{
+ Schema: Schema(in.Schema),
+ }
+ return resp
+}
diff --git a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/toproto/ephemeral_resource.go b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/toproto/ephemeral_resource.go
new file mode 100644
index 0000000000..0c0439b6bd
--- /dev/null
+++ b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/toproto/ephemeral_resource.go
@@ -0,0 +1,65 @@
+// Copyright (c) HashiCorp, Inc.
+// SPDX-License-Identifier: MPL-2.0
+
+package toproto
+
+import (
+ "github.com/hashicorp/terraform-plugin-go/tfprotov6"
+ "github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/tfplugin6"
+)
+
+func GetMetadata_EphemeralResourceMetadata(in *tfprotov6.EphemeralResourceMetadata) *tfplugin6.GetMetadata_EphemeralResourceMetadata {
+ if in == nil {
+ return nil
+ }
+
+ return &tfplugin6.GetMetadata_EphemeralResourceMetadata{
+ TypeName: in.TypeName,
+ }
+}
+
+func ValidateEphemeralResourceConfig_Response(in *tfprotov6.ValidateEphemeralResourceConfigResponse) *tfplugin6.ValidateEphemeralResourceConfig_Response {
+ if in == nil {
+ return nil
+ }
+
+ return &tfplugin6.ValidateEphemeralResourceConfig_Response{
+ Diagnostics: Diagnostics(in.Diagnostics),
+ }
+}
+
+func OpenEphemeralResource_Response(in *tfprotov6.OpenEphemeralResourceResponse) *tfplugin6.OpenEphemeralResource_Response {
+ if in == nil {
+ return nil
+ }
+
+ return &tfplugin6.OpenEphemeralResource_Response{
+ Result: DynamicValue(in.Result),
+ Diagnostics: Diagnostics(in.Diagnostics),
+ Private: in.Private,
+ RenewAt: Timestamp(in.RenewAt),
+ Deferred: Deferred(in.Deferred),
+ }
+}
+
+func RenewEphemeralResource_Response(in *tfprotov6.RenewEphemeralResourceResponse) *tfplugin6.RenewEphemeralResource_Response {
+ if in == nil {
+ return nil
+ }
+
+ return &tfplugin6.RenewEphemeralResource_Response{
+ Diagnostics: Diagnostics(in.Diagnostics),
+ Private: in.Private,
+ RenewAt: Timestamp(in.RenewAt),
+ }
+}
+
+func CloseEphemeralResource_Response(in *tfprotov6.CloseEphemeralResourceResponse) *tfplugin6.CloseEphemeralResource_Response {
+ if in == nil {
+ return nil
+ }
+
+ return &tfplugin6.CloseEphemeralResource_Response{
+ Diagnostics: Diagnostics(in.Diagnostics),
+ }
+}
diff --git a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/toproto/list_resource.go b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/toproto/list_resource.go
new file mode 100644
index 0000000000..d38ec95195
--- /dev/null
+++ b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/toproto/list_resource.go
@@ -0,0 +1,38 @@
+// Copyright (c) HashiCorp, Inc.
+// SPDX-License-Identifier: MPL-2.0
+
+package toproto
+
+import (
+ "github.com/hashicorp/terraform-plugin-go/tfprotov6"
+ "github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/tfplugin6"
+)
+
+func GetMetadata_ListResourceMetadata(in *tfprotov6.ListResourceMetadata) *tfplugin6.GetMetadata_ListResourceMetadata {
+ if in == nil {
+ return nil
+ }
+
+ return &tfplugin6.GetMetadata_ListResourceMetadata{
+ TypeName: in.TypeName,
+ }
+}
+
+func ListResource_ListResourceEvent(in *tfprotov6.ListResourceResult) *tfplugin6.ListResource_Event {
+ return &tfplugin6.ListResource_Event{
+ DisplayName: in.DisplayName,
+ ResourceObject: DynamicValue(in.Resource),
+ Identity: ResourceIdentityData(in.Identity),
+ Diagnostic: Diagnostics(in.Diagnostics),
+ }
+}
+
+func ValidateListResourceConfig_Response(in *tfprotov6.ValidateListResourceConfigResponse) *tfplugin6.ValidateListResourceConfig_Response {
+ if in == nil {
+ return nil
+ }
+
+ return &tfplugin6.ValidateListResourceConfig_Response{
+ Diagnostics: Diagnostics(in.Diagnostics),
+ }
+}
diff --git a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/toproto/provider.go b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/toproto/provider.go
index 7b283c9d47..3f55cad730 100644
--- a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/toproto/provider.go
+++ b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/toproto/provider.go
@@ -14,8 +14,11 @@ func GetMetadata_Response(in *tfprotov6.GetMetadataResponse) *tfplugin6.GetMetad
}
resp := &tfplugin6.GetMetadata_Response{
+ Actions: make([]*tfplugin6.GetMetadata_ActionMetadata, 0, len(in.Actions)),
DataSources: make([]*tfplugin6.GetMetadata_DataSourceMetadata, 0, len(in.DataSources)),
Diagnostics: Diagnostics(in.Diagnostics),
+ EphemeralResources: make([]*tfplugin6.GetMetadata_EphemeralResourceMetadata, 0, len(in.EphemeralResources)),
+ ListResources: make([]*tfplugin6.GetMetadata_ListResourceMetadata, 0, len(in.ListResources)),
Functions: make([]*tfplugin6.GetMetadata_FunctionMetadata, 0, len(in.Functions)),
Resources: make([]*tfplugin6.GetMetadata_ResourceMetadata, 0, len(in.Resources)),
ServerCapabilities: ServerCapabilities(in.ServerCapabilities),
@@ -25,6 +28,14 @@ func GetMetadata_Response(in *tfprotov6.GetMetadataResponse) *tfplugin6.GetMetad
resp.DataSources = append(resp.DataSources, GetMetadata_DataSourceMetadata(&datasource))
}
+ for _, ephemeralResource := range in.EphemeralResources {
+ resp.EphemeralResources = append(resp.EphemeralResources, GetMetadata_EphemeralResourceMetadata(&ephemeralResource))
+ }
+
+ for _, listResource := range in.ListResources {
+ resp.ListResources = append(resp.ListResources, GetMetadata_ListResourceMetadata(&listResource))
+ }
+
for _, function := range in.Functions {
resp.Functions = append(resp.Functions, GetMetadata_FunctionMetadata(&function))
}
@@ -33,6 +44,10 @@ func GetMetadata_Response(in *tfprotov6.GetMetadataResponse) *tfplugin6.GetMetad
resp.Resources = append(resp.Resources, GetMetadata_ResourceMetadata(&resource))
}
+ for _, action := range in.Actions {
+ resp.Actions = append(resp.Actions, GetMetadata_ActionMetadata(&action))
+ }
+
return resp
}
@@ -42,13 +57,24 @@ func GetProviderSchema_Response(in *tfprotov6.GetProviderSchemaResponse) *tfplug
}
resp := &tfplugin6.GetProviderSchema_Response{
- DataSourceSchemas: make(map[string]*tfplugin6.Schema, len(in.DataSourceSchemas)),
- Diagnostics: Diagnostics(in.Diagnostics),
- Functions: make(map[string]*tfplugin6.Function, len(in.Functions)),
- Provider: Schema(in.Provider),
- ProviderMeta: Schema(in.ProviderMeta),
- ResourceSchemas: make(map[string]*tfplugin6.Schema, len(in.ResourceSchemas)),
- ServerCapabilities: ServerCapabilities(in.ServerCapabilities),
+ ActionSchemas: make(map[string]*tfplugin6.ActionSchema, len(in.ActionSchemas)),
+ DataSourceSchemas: make(map[string]*tfplugin6.Schema, len(in.DataSourceSchemas)),
+ Diagnostics: Diagnostics(in.Diagnostics),
+ EphemeralResourceSchemas: make(map[string]*tfplugin6.Schema, len(in.EphemeralResourceSchemas)),
+ ListResourceSchemas: make(map[string]*tfplugin6.Schema, len(in.ListResourceSchemas)),
+ Functions: make(map[string]*tfplugin6.Function, len(in.Functions)),
+ Provider: Schema(in.Provider),
+ ProviderMeta: Schema(in.ProviderMeta),
+ ResourceSchemas: make(map[string]*tfplugin6.Schema, len(in.ResourceSchemas)),
+ ServerCapabilities: ServerCapabilities(in.ServerCapabilities),
+ }
+
+ for name, schema := range in.EphemeralResourceSchemas {
+ resp.EphemeralResourceSchemas[name] = Schema(schema)
+ }
+
+ for name, schema := range in.ListResourceSchemas {
+ resp.ListResourceSchemas[name] = Schema(schema)
}
for name, schema := range in.ResourceSchemas {
@@ -63,6 +89,27 @@ func GetProviderSchema_Response(in *tfprotov6.GetProviderSchemaResponse) *tfplug
resp.Functions[name] = Function(function)
}
+ for name, actionSchema := range in.ActionSchemas {
+ resp.ActionSchemas[name] = ActionSchema(actionSchema)
+ }
+
+ return resp
+}
+
+func GetResourceIdentitySchemas_Response(in *tfprotov6.GetResourceIdentitySchemasResponse) *tfplugin6.GetResourceIdentitySchemas_Response {
+ if in == nil {
+ return nil
+ }
+
+ resp := &tfplugin6.GetResourceIdentitySchemas_Response{
+ Diagnostics: Diagnostics(in.Diagnostics),
+ IdentitySchemas: make(map[string]*tfplugin6.ResourceIdentitySchema, len(in.IdentitySchemas)),
+ }
+
+ for name, schema := range in.IdentitySchemas {
+ resp.IdentitySchemas[name] = ResourceIdentitySchema(schema)
+ }
+
return resp
}
diff --git a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/toproto/resource.go b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/toproto/resource.go
index 876ba5d266..39bdef5ffa 100644
--- a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/toproto/resource.go
+++ b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/toproto/resource.go
@@ -45,6 +45,19 @@ func UpgradeResourceState_Response(in *tfprotov6.UpgradeResourceStateResponse) *
return resp
}
+func UpgradeResourceIdentity_Response(in *tfprotov6.UpgradeResourceIdentityResponse) *tfplugin6.UpgradeResourceIdentity_Response {
+ if in == nil {
+ return nil
+ }
+
+ resp := &tfplugin6.UpgradeResourceIdentity_Response{
+ Diagnostics: Diagnostics(in.Diagnostics),
+ UpgradedIdentity: ResourceIdentityData(in.UpgradedIdentity),
+ }
+
+ return resp
+}
+
func ReadResource_Response(in *tfprotov6.ReadResourceResponse) *tfplugin6.ReadResource_Response {
if in == nil {
return nil
@@ -55,6 +68,7 @@ func ReadResource_Response(in *tfprotov6.ReadResourceResponse) *tfplugin6.ReadRe
NewState: DynamicValue(in.NewState),
Private: in.Private,
Deferred: Deferred(in.Deferred),
+ NewIdentity: ResourceIdentityData(in.NewIdentity),
}
return resp
@@ -72,6 +86,7 @@ func PlanResourceChange_Response(in *tfprotov6.PlanResourceChangeResponse) *tfpl
PlannedState: DynamicValue(in.PlannedState),
RequiresReplace: AttributePaths(in.RequiresReplace),
Deferred: Deferred(in.Deferred),
+ PlannedIdentity: ResourceIdentityData(in.PlannedIdentity),
}
return resp
@@ -87,6 +102,7 @@ func ApplyResourceChange_Response(in *tfprotov6.ApplyResourceChangeResponse) *tf
LegacyTypeSystem: in.UnsafeToUseLegacyTypeSystem, //nolint:staticcheck
NewState: DynamicValue(in.NewState),
Private: in.Private,
+ NewIdentity: ResourceIdentityData(in.NewIdentity),
}
return resp
@@ -115,6 +131,7 @@ func ImportResourceState_ImportedResource(in *tfprotov6.ImportedResource) *tfplu
Private: in.Private,
State: DynamicValue(in.State),
TypeName: in.TypeName,
+ Identity: ResourceIdentityData(in.Identity),
}
return resp
@@ -136,9 +153,10 @@ func MoveResourceState_Response(in *tfprotov6.MoveResourceStateResponse) *tfplug
}
resp := &tfplugin6.MoveResourceState_Response{
- Diagnostics: Diagnostics(in.Diagnostics),
- TargetPrivate: in.TargetPrivate,
- TargetState: DynamicValue(in.TargetState),
+ Diagnostics: Diagnostics(in.Diagnostics),
+ TargetPrivate: in.TargetPrivate,
+ TargetState: DynamicValue(in.TargetState),
+ TargetIdentity: ResourceIdentityData(in.TargetIdentity),
}
return resp
diff --git a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/toproto/resource_identity_data.go b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/toproto/resource_identity_data.go
new file mode 100644
index 0000000000..a1af444b86
--- /dev/null
+++ b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/toproto/resource_identity_data.go
@@ -0,0 +1,21 @@
+// Copyright (c) HashiCorp, Inc.
+// SPDX-License-Identifier: MPL-2.0
+
+package toproto
+
+import (
+ "github.com/hashicorp/terraform-plugin-go/tfprotov6"
+ "github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/tfplugin6"
+)
+
+func ResourceIdentityData(in *tfprotov6.ResourceIdentityData) *tfplugin6.ResourceIdentityData {
+ if in == nil {
+ return nil
+ }
+
+ resp := &tfplugin6.ResourceIdentityData{
+ IdentityData: DynamicValue(in.IdentityData),
+ }
+
+ return resp
+}
diff --git a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/toproto/resource_identity_schema.go b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/toproto/resource_identity_schema.go
new file mode 100644
index 0000000000..d418b18c6a
--- /dev/null
+++ b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/toproto/resource_identity_schema.go
@@ -0,0 +1,52 @@
+// Copyright (c) HashiCorp, Inc.
+// SPDX-License-Identifier: MPL-2.0
+
+package toproto
+
+import (
+ "github.com/hashicorp/terraform-plugin-go/tfprotov6"
+ "github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/tfplugin6"
+)
+
+func ResourceIdentitySchema(in *tfprotov6.ResourceIdentitySchema) *tfplugin6.ResourceIdentitySchema {
+ if in == nil {
+ return nil
+ }
+
+ resp := &tfplugin6.ResourceIdentitySchema{
+ Version: in.Version,
+ IdentityAttributes: ResourceIdentitySchema_IdentityAttributes(in.IdentityAttributes),
+ }
+
+ return resp
+}
+
+func ResourceIdentitySchema_IdentityAttribute(in *tfprotov6.ResourceIdentitySchemaAttribute) *tfplugin6.ResourceIdentitySchema_IdentityAttribute {
+ if in == nil {
+ return nil
+ }
+
+ resp := &tfplugin6.ResourceIdentitySchema_IdentityAttribute{
+ Name: in.Name,
+ Type: CtyType(in.Type),
+ RequiredForImport: in.RequiredForImport,
+ OptionalForImport: in.OptionalForImport,
+ Description: in.Description,
+ }
+
+ return resp
+}
+
+func ResourceIdentitySchema_IdentityAttributes(in []*tfprotov6.ResourceIdentitySchemaAttribute) []*tfplugin6.ResourceIdentitySchema_IdentityAttribute {
+ if in == nil {
+ return nil
+ }
+
+ resp := make([]*tfplugin6.ResourceIdentitySchema_IdentityAttribute, 0, len(in))
+
+ for _, a := range in {
+ resp = append(resp, ResourceIdentitySchema_IdentityAttribute(a))
+ }
+
+ return resp
+}
diff --git a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/toproto/schema.go b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/toproto/schema.go
index fb46bd676d..d5f118ffef 100644
--- a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/toproto/schema.go
+++ b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/toproto/schema.go
@@ -54,6 +54,7 @@ func Schema_Attribute(in *tfprotov6.SchemaAttribute) *tfplugin6.Schema_Attribute
Required: in.Required,
Sensitive: in.Sensitive,
Type: CtyType(in.Type),
+ WriteOnly: in.WriteOnly,
}
return resp
diff --git a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/toproto/timestamp.go b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/toproto/timestamp.go
new file mode 100644
index 0000000000..3ee28365e9
--- /dev/null
+++ b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/toproto/timestamp.go
@@ -0,0 +1,18 @@
+// Copyright (c) HashiCorp, Inc.
+// SPDX-License-Identifier: MPL-2.0
+
+package toproto
+
+import (
+ "time"
+
+ "google.golang.org/protobuf/types/known/timestamppb"
+)
+
+func Timestamp(in time.Time) *timestamppb.Timestamp {
+ if in.IsZero() {
+ return nil
+ }
+
+ return timestamppb.New(in)
+}
diff --git a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/list_resource.go b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/list_resource.go
new file mode 100644
index 0000000000..9e7afcd924
--- /dev/null
+++ b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/list_resource.go
@@ -0,0 +1,130 @@
+// Copyright (c) HashiCorp, Inc.
+// SPDX-License-Identifier: MPL-2.0
+
+package tfprotov6
+
+import (
+ "context"
+ "iter"
+)
+
+// ListResourceMetadata describes metadata for a list resource in the GetMetadata
+// RPC.
+type ListResourceMetadata struct {
+ // TypeName is the name of the list resource.
+ TypeName string
+}
+
+// ListResourceRequest is the request Terraform sends when it wants to evaluate
+// a list block, typically in response to a `terraform query` command.
+type ListResourceRequest struct {
+ // TypeName is the type of list resource that Terraform is evaluating.
+ TypeName string
+
+ // Config is the configuration the user supplied for a list block. See the
+ // documentation on `DynamicValue` for more information about safely
+ // accessing the configuration.
+ //
+ // The configuration is represented as a tftypes.Object, with each
+ // attribute and nested block getting its own key and value.
+ //
+ // This configuration may contain unknown values if a user uses
+ // interpolation or other functionality that would prevent Terraform from
+ // knowing the value at request time. Any attributes not directly set in
+ // the configuration will be null.
+ Config *DynamicValue
+
+ // IncludeResource is a boolean indicating whether to populate the Resource
+ // field in list results.
+ IncludeResource bool // TODO: propose rename in protocol: IncludeResourceObject -> IncludeResource
+
+ // Limit specifies the maximum number of results that Terraform is expecting.
+ Limit int64
+}
+
+// ListResourceServerStream represents a streaming response to a
+// ListResourceRequest. An instance of this struct is supplied as an argument
+// to the provider's ListResource implementation. The provider should set a
+// Results iterator function that pushes zero or more results of type
+// ListResourceResult.
+//
+// For convenience, a provider implementation may choose to convert a slice of
+// results into an iterator using [slices.Values].
+//
+// [slices.Values]: https://pkg.go.dev/slices#Values
+type ListResourceServerStream struct {
+ Results iter.Seq[ListResourceResult]
+}
+
+// NoListResults is a convenient value to return when there are no list results.
+var NoListResults = func(func(ListResourceResult) bool) {}
+
+type ListResourceResult struct { // TODO: propose rename in protocol: ListResource_Event -> ListResource_Result
+ // DisplayName is the display name of the resource. This is a ...
+ DisplayName string
+
+ // Resource is the data for the resource, as determined by the provider.
+ Resource *DynamicValue // TODO: propose rename in protocol: ResourceObject -> Resource
+
+ // Identity is the identity data for the resource, as determined by the
+ // provider.
+ Identity *ResourceIdentityData
+
+ // Diagnostics report errors or warnings related to retrieving the current
+ // state of the resource. An empty slice indicates a successful validation
+ // with no warnings or errors.
+ Diagnostics []*Diagnostic
+}
+
+// ListResourceServer is an interface containing the methods an list resource
+// implementation needs to fill.
+type ListResourceServer interface {
+ // ValidateListResourceConfig is called when Terraform is checking that an
+ // list resource configuration is valid. It is guaranteed to have types
+ // conforming to your schema, but it is not guaranteed that all values
+ // will be known. This is your opportunity to do custom or advanced
+ // validation prior to a list resource being used.
+ ValidateListResourceConfig(context.Context, *ValidateListResourceConfigRequest) (*ValidateListResourceConfigResponse, error)
+
+ // ListResource is called when Terraform is evaluating a list block,
+ // typically in response to a `terraform query` command.
+ ListResource(context.Context, *ListResourceRequest) (*ListResourceServerStream, error)
+}
+
+// ValidateListResourceConfigRequest is the request Terraform sends when it
+// wants to validate an list resource's configuration.
+type ValidateListResourceConfigRequest struct {
+ // TypeName is the type of list resource Terraform is validating.
+ TypeName string
+
+ // Config is the configuration the user supplied for a list block. See the
+ // documentation on `DynamicValue` for more information about safely
+ // accessing the configuration.
+ //
+ // The configuration is represented as a tftypes.Object, with each
+ // attribute and nested block getting its own key and value.
+ //
+ // This configuration may contain unknown values if a user uses
+ // interpolation or other functionality that would prevent Terraform from
+ // knowing the value at request time. Any attributes not directly set in
+ // the configuration will be null.
+ Config *DynamicValue
+
+ // IncludeResourceObject is the value of the include_resource
+ // argument in the list block. This is a DynamicValue so that it can
+ // contain unknown values.
+ IncludeResourceObject *DynamicValue
+
+ // Limit is the maximum number of results to return. This is a
+ // DynamicValue so that it can contain unknown values.
+ Limit *DynamicValue
+}
+
+// ValidateListResourceConfigResponse is the response from the provider about
+// the validity of an list resource's configuration.
+type ValidateListResourceConfigResponse struct {
+ // Diagnostics report errors or warnings related to the given
+ // configuration. Returning an empty slice indicates a successful
+ // validation with no warnings or errors generated.
+ Diagnostics []*Diagnostic
+}
diff --git a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/provider.go b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/provider.go
index a5185138f0..bf27943592 100644
--- a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/provider.go
+++ b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/provider.go
@@ -22,6 +22,10 @@ type ProviderServer interface {
// and data sources.
GetProviderSchema(context.Context, *GetProviderSchemaRequest) (*GetProviderSchemaResponse, error)
+ // GetResourceIdentitySchemas is called when Terraform needs to know
+ // what the provider's resource identity schemas are.
+ GetResourceIdentitySchemas(context.Context, *GetResourceIdentitySchemasRequest) (*GetResourceIdentitySchemasResponse, error)
+
// ValidateProviderConfig is called to give a provider a chance to
// validate the configuration the user specified.
ValidateProviderConfig(context.Context, *ValidateProviderConfigRequest) (*ValidateProviderConfigResponse, error)
@@ -54,6 +58,55 @@ type ProviderServer interface {
// terraform-plugin-go, so they are their own interface that is composed
// into ProviderServer.
FunctionServer
+
+ // EphemeralResourceServer is an interface encapsulating all the ephemeral
+ // resource-related RPC requests. ProviderServer implementations must
+ // implement them, but they are a handy interface for defining what an
+ // ephemeral resource is to terraform-plugin-go, so they're their own
+ // interface that is composed into ProviderServer.
+ EphemeralResourceServer
+
+ /* // Add this back once temporary interface is removed
+ // ListResourceServer is an interface encapsulating all the list
+ // resource-related RPC requests.
+ ListResourceServer*/
+
+ /* // Add this back once temporary interface is removed
+ // ActionServer is an interface encapsulating all the action-related RPC requests.
+ ActionServer*/
+}
+
+// ProviderServerWithListResource is a temporary interface for servers
+// to implement List Resource RPC handling with:
+//
+// - ListResource
+// - ValidateListResourceConfig
+//
+// Deprecated: All methods will be moved into the
+// ProviderServer and ResourceServer interfaces and this interface will be removed in a future
+// version.
+type ProviderServerWithListResource interface {
+ ProviderServer
+
+ // ListResourceServer is an interface encapsulating all the list
+ // resource-related RPC requests.
+ ListResourceServer
+}
+
+// ProviderServerWithActions is a temporary interface for servers
+// to implement Action RPCs
+//
+// - PlanAction
+// - InvokeAction
+//
+// Deprecated: All methods will be moved into the
+// ProviderServer interface and this interface will be removed in a future
+// version.
+type ProviderServerWithActions interface {
+ ProviderServer
+
+ // ActionServer is an interface encapsulating all the action-related RPC requests.
+ ActionServer
}
// GetMetadataRequest represents a GetMetadata RPC request.
@@ -78,6 +131,15 @@ type GetMetadataResponse struct {
// Resources returns metadata for all managed resources.
Resources []ResourceMetadata
+
+ // EphemeralResources returns metadata for all ephemeral resources.
+ EphemeralResources []EphemeralResourceMetadata
+
+ // ListResources returns metadata for all list resources.
+ ListResources []ListResourceMetadata
+
+ // Actions returns metadata for all actions.
+ Actions []ActionMetadata
}
// GetProviderSchemaRequest represents a Terraform RPC request for the
@@ -124,12 +186,47 @@ type GetProviderSchemaResponse struct {
// includes the provider name.
Functions map[string]*Function
+ // EphemeralResourceSchemas is a map of ephemeral resource names to the schema for
+ // the configuration specified in the ephemeral resource. The name should be an
+ // ephemeral resource name, and should be prefixed with your provider's
+ // shortname and an underscore. It should match the first label after
+ // `ephemeral` in a user's configuration.
+ EphemeralResourceSchemas map[string]*Schema
+
+ // ListResourceSchemas is a map of list resource schemas and names.
+ ListResourceSchemas map[string]*Schema
+
+ // ActionSchemas is a map of action names to their schema and action type.
+ // The name should be an action name that is prefixed with your provider's
+ // shortname and an underscore.
+ ActionSchemas map[string]*ActionSchema
+
// Diagnostics report errors or warnings related to returning the
// provider's schemas. Returning an empty slice indicates success, with
// no errors or warnings generated.
Diagnostics []*Diagnostic
}
+// GetResourceIdentitySchemasRequest represents a Terraform RPC request for the
+// provider's resource identity schemas.
+type GetResourceIdentitySchemasRequest struct{}
+
+// GetResourceIdentitySchemasResponse represents a Terraform RPC response containing
+// the provider's resource identity schemas.
+type GetResourceIdentitySchemasResponse struct {
+ // IdentitySchemas is a map of resource names to the schema for the
+ // identity specified for the resource. The name should be a
+ // resource name, and should be prefixed with your provider's shortname
+ // and an underscore. It should match the first label after `resource`
+ // in a user's configuration.
+ IdentitySchemas map[string]*ResourceIdentitySchema
+
+ // Diagnostics report errors or warnings related to returning the
+ // provider's resource identity schemas. Returning an empty slice
+ // indicates success, with no errors or warnings generated.
+ Diagnostics []*Diagnostic
+}
+
// ValidateProviderConfigRequest represents a Terraform RPC request for the
// provider to modify the provider configuration in preparation for Terraform
// validating it.
diff --git a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/resource.go b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/resource.go
index bf1a6e387b..eeb29323a3 100644
--- a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/resource.go
+++ b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/resource.go
@@ -63,26 +63,12 @@ type ResourceServer interface {
// provider must have enabled the MoveResourceState server capability to
// enable these requests.
MoveResourceState(context.Context, *MoveResourceStateRequest) (*MoveResourceStateResponse, error)
-}
-
-// ResourceServerWithMoveResourceState is a temporary interface for servers
-// to implement MoveResourceState RPC handling.
-//
-// Deprecated: This interface will be removed in a future version. Use
-// ResourceServer instead.
-type ResourceServerWithMoveResourceState interface {
- ResourceServer
- // MoveResourceState is called when Terraform is asked to change a resource
- // type for an existing resource. The provider must accept the change as
- // valid by ensuring the source resource type, schema version, and provider
- // address are compatible to convert the source state into the target
- // resource type and latest state version.
- //
- // This functionality is only supported in Terraform 1.8 and later. The
- // provider must have enabled the MoveResourceState server capability to
- // enable these requests.
- MoveResourceState(context.Context, *MoveResourceStateRequest) (*MoveResourceStateResponse, error)
+ // UpgradeResourceIdentity is called when Terraform has encountered a
+ // resource with an identity state in a schema that doesn't match the schema's
+ // current version. It is the provider's responsibility to modify the
+ // identity state to upgrade it to the latest state schema.
+ UpgradeResourceIdentity(context.Context, *UpgradeResourceIdentityRequest) (*UpgradeResourceIdentityResponse, error)
}
// ValidateResourceConfigRequest is the request Terraform sends when it
@@ -103,6 +89,10 @@ type ValidateResourceConfigRequest struct {
// from knowing the value at request time. Any attributes not directly
// set in the configuration will be null.
Config *DynamicValue
+
+ // ClientCapabilities defines optionally supported protocol features for the
+ // ValidateResourceConfig RPC, such as forward-compatible Terraform behavior changes.
+ ClientCapabilities *ValidateResourceConfigClientCapabilities
}
// ValidateResourceConfigResponse is the response from the provider about
@@ -147,6 +137,31 @@ type UpgradeResourceStateResponse struct {
Diagnostics []*Diagnostic
}
+type UpgradeResourceIdentityRequest struct {
+ // TypeName is the type of resource that Terraform needs to upgrade the
+ // identity state for.
+ TypeName string
+
+ // Version is the version of the identity state the resource currently has.
+ Version int64
+
+ // RawIdentity is the identity state as Terraform sees it right now. See the
+ // documentation for `RawIdentity` for information on how to work with the
+ // data it contains.
+ RawIdentity *RawState
+}
+
+type UpgradeResourceIdentityResponse struct {
+ // UpgradedIdentity is the upgraded identity for the resource, represented as
+ // a `ResourceIdentityData`.
+ UpgradedIdentity *ResourceIdentityData
+
+ // Diagnostics report errors or warnings related to upgrading the
+ // identity of the requested resource. Returning an empty slice indicates
+ // a successful validation with no warnings or errors generated.
+ Diagnostics []*Diagnostic
+}
+
// ReadResourceRequest is the request Terraform sends when it wants to get the
// latest state for a resource.
type ReadResourceRequest struct {
@@ -188,6 +203,10 @@ type ReadResourceRequest struct {
// ClientCapabilities defines optionally supported protocol features for the
// ReadResource RPC, such as forward-compatible Terraform behavior changes.
ClientCapabilities *ReadResourceClientCapabilities
+
+ // CurrentIdentity is the current identity of the resource as far as
+ // Terraform knows, represented as a `ResourceIdentityData`.
+ CurrentIdentity *ResourceIdentityData
}
// ReadResourceResponse is the response from the provider about the current
@@ -216,6 +235,10 @@ type ReadResourceResponse struct {
// Deferred is used to indicate to Terraform that the ReadResource operation
// needs to be deferred for a reason.
Deferred *Deferred
+
+ // NewIdentity is the current identity of the resource according to the
+ // provider, represented as a `ResourceIdentityData`.
+ NewIdentity *ResourceIdentityData
}
// PlanResourceChangeRequest is the request Terraform sends when it is
@@ -286,6 +309,10 @@ type PlanResourceChangeRequest struct {
// ClientCapabilities defines optionally supported protocol features for the
// PlanResourceChange RPC, such as forward-compatible Terraform behavior changes.
ClientCapabilities *PlanResourceChangeClientCapabilities
+
+ // PriorIdentity is the identity of the resource before the plan is
+ // applied, represented as a `ResourceIdentityData`.
+ PriorIdentity *ResourceIdentityData
}
// PlanResourceChangeResponse is the response from the provider about what the
@@ -368,6 +395,10 @@ type PlanResourceChangeResponse struct {
// Deferred is used to indicate to Terraform that the PlanResourceChange operation
// needs to be deferred for a reason.
Deferred *Deferred
+
+ // PlannedIdentity is the provider's indication of what the identity for the
+ // resource should be after apply, represented as a `ResourceIdentityData`
+ PlannedIdentity *ResourceIdentityData
}
// ApplyResourceChangeRequest is the request Terraform sends when it needs to
@@ -430,6 +461,10 @@ type ApplyResourceChangeRequest struct {
//
// This configuration will have known values for all fields.
ProviderMeta *DynamicValue
+
+ // PlannedIdentity is Terraform's plan for what the resource identity should look like
+ // after the changes are applied, represented as a `ResourceIdentityData`.
+ PlannedIdentity *ResourceIdentityData
}
// ApplyResourceChangeResponse is the response from the provider about what the
@@ -475,6 +510,10 @@ type ApplyResourceChangeResponse struct {
//
// Deprecated: Really, just don't use this, you don't need it.
UnsafeToUseLegacyTypeSystem bool
+
+ // NewIdentity is the provider's understanding of what the resource's
+ // identity is after changes are applied, represented as a `ResourceIdentityData`.
+ NewIdentity *ResourceIdentityData
}
// ImportResourceStateRequest is the request Terraform sends when it wants a
@@ -487,11 +526,17 @@ type ImportResourceStateRequest struct {
// or resources. Providers decide and communicate to users the format
// for the ID, and use it to determine what resource or resources to
// import.
+ // ID is mutually exclusive with Identity
ID string
// ClientCapabilities defines optionally supported protocol features for the
// ImportResourceState RPC, such as forward-compatible Terraform behavior changes.
ClientCapabilities *ImportResourceStateClientCapabilities
+
+ // Identity is the user-supplied identifying information about the resource
+ // in the form of a `ResourceIdentityData`.
+ // Identity is mutually exclusive with ID.
+ Identity *ResourceIdentityData
}
// ImportResourceStateResponse is the response from the provider about the
@@ -530,6 +575,10 @@ type ImportedResource struct {
// with requests for this resource. This state will be associated with
// the resource, but will not be considered when calculating diffs.
Private []byte
+
+ // Identity is the identity of the imported resource in the form
+ // of a `ResourceIdentityData`.
+ Identity *ResourceIdentityData
}
// MoveResourceStateRequest is the request Terraform sends when it requests a
@@ -561,6 +610,14 @@ type MoveResourceStateRequest struct {
// TargetTypeName is the target resource type for the move request.
TargetTypeName string
+
+ // SourceIdentity is the identity of the source resource.
+ //
+ // Only the underlying JSON field is populated.
+ SourceIdentity *RawState
+
+ // SourceIdentitySchemaVersion is the version of the source resource state.
+ SourceIdentitySchemaVersion int64
}
// MoveResourceStateResponse is the response from the provider containing
@@ -574,4 +631,7 @@ type MoveResourceStateResponse struct {
// Diagnostics report any warnings or errors related to moving the state.
Diagnostics []*Diagnostic
+
+ // TargetIdentity is the identity of the target resource.
+ TargetIdentity *ResourceIdentityData
}
diff --git a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/resource_identity_data.go b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/resource_identity_data.go
new file mode 100644
index 0000000000..a48742a0fb
--- /dev/null
+++ b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/resource_identity_data.go
@@ -0,0 +1,15 @@
+// Copyright (c) HashiCorp, Inc.
+// SPDX-License-Identifier: MPL-2.0
+
+package tfprotov6
+
+// ResourceIdentityData contains the raw undecoded identity data
+// for a resource.
+type ResourceIdentityData struct {
+ // IdentityData is represented as a `DynamicValue`. See the documentation for
+ // `DynamicValue` for information about safely creating the
+ // `DynamicValue`.
+ // The identity should be represented as a tftypes.Object, with each
+ // attribute and nested block getting its own key and value.
+ IdentityData *DynamicValue
+}
diff --git a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/resource_identity_schema.go b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/resource_identity_schema.go
new file mode 100644
index 0000000000..740ec071f6
--- /dev/null
+++ b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/resource_identity_schema.go
@@ -0,0 +1,100 @@
+// Copyright (c) HashiCorp, Inc.
+// SPDX-License-Identifier: MPL-2.0
+
+package tfprotov6
+
+import "github.com/hashicorp/terraform-plugin-go/tftypes"
+
+// ResourceIdentitySchema is the identity schema for a Resource.
+type ResourceIdentitySchema struct {
+ // Version indicates which version of the schema this is. Versions
+ // should be monotonically incrementing numbers. When Terraform
+ // encounters a resource identity stored in state with a schema version
+ // lower that the identity schema version the provider advertises for
+ // that resource, Terraform requests the provider upgrade the resource's
+ // identity state.
+ Version int64
+
+ // IdentityAttributes is a list of attributes that uniquely identify a
+ // resource. These attributes are used to identify a resource in the
+ // state and to import existing resources into the state.
+ IdentityAttributes []*ResourceIdentitySchemaAttribute
+}
+
+// ValueType returns the tftypes.Type for a ResourceIdentitySchema.
+//
+// If ResourceIdentitySchema is missing, an empty Object is returned.
+func (s *ResourceIdentitySchema) ValueType() tftypes.Type {
+ if s == nil {
+ return tftypes.Object{
+ AttributeTypes: map[string]tftypes.Type{},
+ }
+ }
+
+ attributeTypes := map[string]tftypes.Type{}
+
+ for _, attribute := range s.IdentityAttributes {
+ if attribute == nil {
+ continue
+ }
+
+ attributeType := attribute.ValueType()
+
+ if attributeType == nil {
+ continue
+ }
+
+ attributeTypes[attribute.Name] = attributeType
+ }
+
+ return tftypes.Object{
+ AttributeTypes: attributeTypes,
+ }
+}
+
+// ResourceIdentitySchemaAttribute represents one value of data within
+// resource identity.
+// These are always used in resource identity comparisons.
+type ResourceIdentitySchemaAttribute struct {
+ // Name is the name of the attribute. This is what the user will put
+ // before the equals sign to assign a value to this attribute during import.
+ Name string
+
+ // Type indicates the type of data the attribute expects. See the
+ // documentation for the tftypes package for information on what types
+ // are supported and their behaviors.
+ // For resource identity Terraform core only supports the following types:
+ // - bool
+ // - number
+ // - string
+ // - list of bool
+ // - list of number
+ // - list of string
+ Type tftypes.Type
+
+ // RequiredForImport indicates whether this attribute is required to
+ // import the resource. For example it might be false if the value
+ // can be derived from provider configuration. Either this or OptionalForImport
+ // needs to be true.
+ RequiredForImport bool
+
+ // OptionalForImport indicates whether this attribute is optional to
+ // import the resource. For example it might be true if the value
+ // can be derived from provider configuration. Either this or RequiredForImport
+ // needs to be true.
+ OptionalForImport bool
+
+ // Description is a human-readable description of the attribute.
+ Description string
+}
+
+// ValueType returns the tftypes.Type for a ResourceIdentitySchemaAttribute.
+//
+// If ResourceIdentitySchemaAttribute is missing, nil is returned.
+func (s *ResourceIdentitySchemaAttribute) ValueType() tftypes.Type {
+ if s == nil {
+ return nil
+ }
+
+ return s.Type
+}
diff --git a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/schema.go b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/schema.go
index b368c620fb..c287de966f 100644
--- a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/schema.go
+++ b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/schema.go
@@ -253,6 +253,12 @@ type SchemaAttribute struct {
// experiences. Providers should set it when deprecating attributes in
// preparation for these tools.
Deprecated bool
+
+ // WriteOnly, when set to true, indicates that the attribute value will
+ // be provided via configuration and must be omitted from plan and state response objects. WriteOnly
+ // must be combined with Optional or Required, and is only valid for managed
+ // resource schemas.
+ WriteOnly bool
}
// ValueType returns the tftypes.Type for a SchemaAttribute.
diff --git a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/tf6server/server.go b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/tf6server/server.go
index cb79928c17..2f73eeaa44 100644
--- a/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/tf6server/server.go
+++ b/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov6/tf6server/server.go
@@ -17,9 +17,12 @@ import (
"time"
"google.golang.org/grpc"
+ "google.golang.org/grpc/codes"
+ "google.golang.org/grpc/status"
"github.com/hashicorp/terraform-plugin-go/internal/logging"
"github.com/hashicorp/terraform-plugin-go/tfprotov6"
+ "github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/diag"
"github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/fromproto"
"github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/tf6serverlogging"
"github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/tfplugin6"
@@ -49,7 +52,7 @@ const (
//
// In the future, it may be possible to include this information directly
// in the protocol buffers rather than recreating a constant here.
- protocolVersionMinor uint = 6
+ protocolVersionMinor uint = 10
)
// protocolVersion represents the combined major and minor version numbers of
@@ -104,6 +107,7 @@ type ServeConfig struct {
managedDebug bool
managedDebugReattachConfigTimeout time.Duration
managedDebugStopSignals []os.Signal
+ managedDebugEnvFilePath string
disableLogInitStderr bool
disableLogLocation bool
@@ -178,6 +182,15 @@ func WithManagedDebugReattachConfigTimeout(timeout time.Duration) ServeOpt {
})
}
+// WithManagedDebugEnvFilePath returns a ServeOpt that will set the output path
+// for the managed debug process to write the reattach configuration into.
+func WithManagedDebugEnvFilePath(path string) ServeOpt {
+ return serveConfigFunc(func(in *ServeConfig) error {
+ in.managedDebugEnvFilePath = path
+ return nil
+ })
+}
+
// WithGoPluginLogger returns a ServeOpt that will set the logger that
// go-plugin should use to log messages.
func WithGoPluginLogger(logger hclog.Logger) ServeOpt {
@@ -380,6 +393,15 @@ func Serve(name string, serverFactory func() tfprotov6.ProviderServer, opts ...S
fmt.Println("")
+ if conf.managedDebugEnvFilePath != "" {
+ fmt.Printf("Writing reattach configuration to env file at path %s\n", conf.managedDebugEnvFilePath)
+
+ err = os.WriteFile(conf.managedDebugEnvFilePath, []byte(fmt.Sprintf("%s='%s'\n", envTfReattachProviders, strings.ReplaceAll(reattachStr, `'`, `'"'"'`))), 0644)
+ if err != nil {
+ return fmt.Errorf("Error writing to env file at path %s: %w", conf.managedDebugEnvFilePath, err)
+ }
+ }
+
// Wait for the server to be done.
<-conf.debugCloseCh
@@ -541,6 +563,32 @@ func (s *server) GetProviderSchema(ctx context.Context, protoReq *tfplugin6.GetP
return protoResp, nil
}
+func (s *server) GetResourceIdentitySchemas(ctx context.Context, protoReq *tfplugin6.GetResourceIdentitySchemas_Request) (*tfplugin6.GetResourceIdentitySchemas_Response, error) {
+ rpc := "GetResourceIdentitySchemas"
+ ctx = s.loggingContext(ctx)
+ ctx = logging.RpcContext(ctx, rpc)
+ ctx = s.stoppableContext(ctx)
+ logging.ProtocolTrace(ctx, "Received request")
+ defer logging.ProtocolTrace(ctx, "Served request")
+
+ req := fromproto.GetResourceIdentitySchemasRequest(protoReq)
+
+ ctx = tf6serverlogging.DownstreamRequest(ctx)
+
+ resp, err := s.downstream.GetResourceIdentitySchemas(ctx, req)
+
+ if err != nil {
+ logging.ProtocolError(ctx, "Error from downstream", map[string]interface{}{logging.KeyError: err})
+ return nil, err
+ }
+
+ tf6serverlogging.DownstreamResponse(ctx, resp.Diagnostics)
+
+ protoResp := toproto.GetResourceIdentitySchemas_Response(resp)
+
+ return protoResp, nil
+}
+
func (s *server) ConfigureProvider(ctx context.Context, protoReq *tfplugin6.ConfigureProvider_Request) (*tfplugin6.ConfigureProvider_Response, error) {
rpc := "ConfigureProvider"
ctx = s.loggingContext(ctx)
@@ -717,6 +765,7 @@ func (s *server) ValidateResourceConfig(ctx context.Context, protoReq *tfplugin6
req := fromproto.ValidateResourceConfigRequest(protoReq)
+ tf6serverlogging.ValidateResourceConfigClientCapabilities(ctx, req.ClientCapabilities)
logging.ProtocolData(ctx, s.protocolDataDir, rpc, "Request", "Config", req.Config)
ctx = tf6serverlogging.DownstreamRequest(ctx)
@@ -763,6 +812,36 @@ func (s *server) UpgradeResourceState(ctx context.Context, protoReq *tfplugin6.U
return protoResp, nil
}
+func (s *server) UpgradeResourceIdentity(ctx context.Context, protoReq *tfplugin6.UpgradeResourceIdentity_Request) (*tfplugin6.UpgradeResourceIdentity_Response, error) {
+ rpc := "UpgradeResourceIdentity"
+ ctx = s.loggingContext(ctx)
+ ctx = logging.RpcContext(ctx, rpc)
+ ctx = logging.ResourceContext(ctx, protoReq.TypeName)
+ ctx = s.stoppableContext(ctx)
+ logging.ProtocolTrace(ctx, "Received request")
+ defer logging.ProtocolTrace(ctx, "Served request")
+
+ req := fromproto.UpgradeResourceIdentityRequest(protoReq)
+
+ ctx = tf6serverlogging.DownstreamRequest(ctx)
+
+ resp, err := s.downstream.UpgradeResourceIdentity(ctx, req)
+
+ if err != nil {
+ logging.ProtocolError(ctx, "Error from downstream", map[string]interface{}{logging.KeyError: err})
+ return nil, err
+ }
+
+ tf6serverlogging.DownstreamResponse(ctx, resp.Diagnostics)
+ if resp.UpgradedIdentity != nil {
+ logging.ProtocolData(ctx, s.protocolDataDir, rpc, "Response", "UpgradedResourceIdentity", resp.UpgradedIdentity.IdentityData)
+ }
+
+ protoResp := toproto.UpgradeResourceIdentity_Response(resp)
+
+ return protoResp, nil
+}
+
func (s *server) ReadResource(ctx context.Context, protoReq *tfplugin6.ReadResource_Request) (*tfplugin6.ReadResource_Response, error) {
rpc := "ReadResource"
ctx = s.loggingContext(ctx)
@@ -1003,6 +1082,407 @@ func (s *server) GetFunctions(ctx context.Context, protoReq *tfplugin6.GetFuncti
return protoResp, nil
}
+func (s *server) ValidateEphemeralResourceConfig(ctx context.Context, protoReq *tfplugin6.ValidateEphemeralResourceConfig_Request) (*tfplugin6.ValidateEphemeralResourceConfig_Response, error) {
+ rpc := "ValidateEphemeralResourceConfig"
+ ctx = s.loggingContext(ctx)
+ ctx = logging.RpcContext(ctx, rpc)
+ ctx = logging.EphemeralResourceContext(ctx, protoReq.TypeName)
+ ctx = s.stoppableContext(ctx)
+ logging.ProtocolTrace(ctx, "Received request")
+ defer logging.ProtocolTrace(ctx, "Served request")
+
+ req := fromproto.ValidateEphemeralResourceConfigRequest(protoReq)
+
+ logging.ProtocolData(ctx, s.protocolDataDir, rpc, "Request", "Config", req.Config)
+
+ ctx = tf6serverlogging.DownstreamRequest(ctx)
+
+ resp, err := s.downstream.ValidateEphemeralResourceConfig(ctx, req)
+ if err != nil {
+ logging.ProtocolError(ctx, "Error from downstream", map[string]any{logging.KeyError: err})
+ return nil, err
+ }
+
+ tf6serverlogging.DownstreamResponse(ctx, resp.Diagnostics)
+
+ protoResp := toproto.ValidateEphemeralResourceConfig_Response(resp)
+
+ return protoResp, nil
+}
+
+func (s *server) OpenEphemeralResource(ctx context.Context, protoReq *tfplugin6.OpenEphemeralResource_Request) (*tfplugin6.OpenEphemeralResource_Response, error) {
+ rpc := "OpenEphemeralResource"
+ ctx = s.loggingContext(ctx)
+ ctx = logging.RpcContext(ctx, rpc)
+ ctx = logging.EphemeralResourceContext(ctx, protoReq.TypeName)
+ ctx = s.stoppableContext(ctx)
+ logging.ProtocolTrace(ctx, "Received request")
+ defer logging.ProtocolTrace(ctx, "Served request")
+
+ req := fromproto.OpenEphemeralResourceRequest(protoReq)
+
+ tf6serverlogging.OpenEphemeralResourceClientCapabilities(ctx, req.ClientCapabilities)
+ logging.ProtocolData(ctx, s.protocolDataDir, rpc, "Request", "Config", req.Config)
+
+ ctx = tf6serverlogging.DownstreamRequest(ctx)
+
+ resp, err := s.downstream.OpenEphemeralResource(ctx, req)
+ if err != nil {
+ logging.ProtocolError(ctx, "Error from downstream", map[string]any{logging.KeyError: err})
+ return nil, err
+ }
+
+ tf6serverlogging.DownstreamResponse(ctx, resp.Diagnostics)
+ logging.ProtocolData(ctx, s.protocolDataDir, rpc, "Response", "Result", resp.Result)
+ tf6serverlogging.Deferred(ctx, resp.Deferred)
+
+ if resp.Deferred != nil && (req.ClientCapabilities == nil || !req.ClientCapabilities.DeferralAllowed) {
+ resp.Diagnostics = append(resp.Diagnostics, invalidDeferredResponseDiag(resp.Deferred.Reason))
+ }
+
+ protoResp := toproto.OpenEphemeralResource_Response(resp)
+
+ return protoResp, nil
+}
+
+func (s *server) RenewEphemeralResource(ctx context.Context, protoReq *tfplugin6.RenewEphemeralResource_Request) (*tfplugin6.RenewEphemeralResource_Response, error) {
+ rpc := "RenewEphemeralResource"
+ ctx = s.loggingContext(ctx)
+ ctx = logging.RpcContext(ctx, rpc)
+ ctx = logging.EphemeralResourceContext(ctx, protoReq.TypeName)
+ ctx = s.stoppableContext(ctx)
+ logging.ProtocolTrace(ctx, "Received request")
+ defer logging.ProtocolTrace(ctx, "Served request")
+
+ req := fromproto.RenewEphemeralResourceRequest(protoReq)
+
+ ctx = tf6serverlogging.DownstreamRequest(ctx)
+
+ resp, err := s.downstream.RenewEphemeralResource(ctx, req)
+ if err != nil {
+ logging.ProtocolError(ctx, "Error from downstream", map[string]any{logging.KeyError: err})
+ return nil, err
+ }
+
+ tf6serverlogging.DownstreamResponse(ctx, resp.Diagnostics)
+
+ protoResp := toproto.RenewEphemeralResource_Response(resp)
+
+ return protoResp, nil
+}
+
+func (s *server) CloseEphemeralResource(ctx context.Context, protoReq *tfplugin6.CloseEphemeralResource_Request) (*tfplugin6.CloseEphemeralResource_Response, error) {
+ rpc := "CloseEphemeralResource"
+ ctx = s.loggingContext(ctx)
+ ctx = logging.RpcContext(ctx, rpc)
+ ctx = logging.EphemeralResourceContext(ctx, protoReq.TypeName)
+ ctx = s.stoppableContext(ctx)
+ logging.ProtocolTrace(ctx, "Received request")
+ defer logging.ProtocolTrace(ctx, "Served request")
+
+ req := fromproto.CloseEphemeralResourceRequest(protoReq)
+
+ ctx = tf6serverlogging.DownstreamRequest(ctx)
+
+ resp, err := s.downstream.CloseEphemeralResource(ctx, req)
+ if err != nil {
+ logging.ProtocolError(ctx, "Error from downstream", map[string]any{logging.KeyError: err})
+ return nil, err
+ }
+
+ tf6serverlogging.DownstreamResponse(ctx, resp.Diagnostics)
+
+ protoResp := toproto.CloseEphemeralResource_Response(resp)
+
+ return protoResp, nil
+}
+
+func (s *server) ValidateListResourceConfig(ctx context.Context, protoReq *tfplugin6.ValidateListResourceConfig_Request) (*tfplugin6.ValidateListResourceConfig_Response, error) {
+ rpc := "ValidateListResourceConfig"
+ ctx = s.loggingContext(ctx)
+ ctx = logging.RpcContext(ctx, rpc)
+ ctx = logging.ResourceContext(ctx, protoReq.TypeName)
+ ctx = s.stoppableContext(ctx)
+ logging.ProtocolTrace(ctx, "Received request")
+ defer logging.ProtocolTrace(ctx, "Served request")
+
+ req := fromproto.ValidateListResourceConfigRequest(protoReq)
+
+ logging.ProtocolData(ctx, s.protocolDataDir, rpc, "Request", "Config", req.Config)
+
+ ctx = tf6serverlogging.DownstreamRequest(ctx)
+
+ // TODO: Remove this check and error in preference of
+ // s.downstream.ValidateListResourceConfig below once ProviderServer interface
+ // implements this RPC method.
+ // nolint:staticcheck
+ listResourceServer, ok := s.downstream.(tfprotov6.ProviderServerWithListResource)
+ if !ok {
+ logging.ProtocolError(ctx, "ProviderServer does not implement ValidateListResourceConfig")
+
+ protoResp := &tfplugin6.ValidateListResourceConfig_Response{
+ Diagnostics: []*tfplugin6.Diagnostic{
+ {
+ Severity: tfplugin6.Diagnostic_ERROR,
+ Summary: "Provider ValidateListResourceConfig Not Implemented",
+ Detail: "A ValidateListResourceConfig call was received by the provider, however the provider does not implement the call. " +
+ "Either upgrade the provider to a version that implements list support or this is a bug in Terraform that should be reported to the Terraform maintainers.",
+ },
+ },
+ }
+
+ return protoResp, nil
+ }
+
+ // TODO: Update this to call downstream once optional interface is removed
+ // resp, err := s.downstream.ValidateListResourceConfig(ctx, req)
+ resp, err := listResourceServer.ValidateListResourceConfig(ctx, req)
+
+ if err != nil {
+ logging.ProtocolError(ctx, "Error from downstream", map[string]interface{}{logging.KeyError: err})
+ return nil, err
+ }
+
+ tf6serverlogging.DownstreamResponse(ctx, resp.Diagnostics)
+
+ protoResp := toproto.ValidateListResourceConfig_Response(resp)
+
+ return protoResp, nil
+}
+
+func (s *server) ListResource(protoReq *tfplugin6.ListResource_Request, protoStream grpc.ServerStreamingServer[tfplugin6.ListResource_Event]) error {
+ rpc := "ListResource"
+ ctx := protoStream.Context()
+ ctx = s.loggingContext(ctx)
+ ctx = logging.RpcContext(ctx, rpc)
+ ctx = logging.ListResourceContext(ctx, protoReq.TypeName)
+ ctx = s.stoppableContext(ctx)
+ logging.ProtocolTrace(ctx, "Received request")
+ defer logging.ProtocolTrace(ctx, "Served request")
+
+ req := fromproto.ListResourceRequest(protoReq)
+ logging.ProtocolData(ctx, s.protocolDataDir, rpc, "Request", "Config", req.Config)
+
+ ctx = tf6serverlogging.DownstreamRequest(ctx)
+
+ // TODO: Remove this check and error once ProviderServer interface
+ // implements this RPC method.
+ // nolint:staticcheck
+ downstream, ok := s.downstream.(tfprotov6.ProviderServerWithListResource)
+ if !ok {
+ err := status.Error(codes.Unimplemented, "ProviderServer does not implement ListResource")
+ logging.ProtocolError(ctx, err.Error())
+ return err
+ }
+
+ resp, err := downstream.ListResource(ctx, req)
+ if err != nil {
+ logging.ProtocolError(ctx, "Error from downstream", map[string]interface{}{logging.KeyError: err})
+ return err
+ }
+
+ for ev := range resp.Results {
+ select {
+ case <-ctx.Done():
+ logging.ProtocolTrace(ctx, "Context done")
+ return nil
+
+ default:
+ protoEv := toproto.ListResource_ListResourceEvent(&ev)
+ if err := protoStream.Send(protoEv); err != nil {
+ logging.ProtocolError(ctx, "Error sending event", map[string]any{logging.KeyError: err})
+ return err
+ }
+ }
+ }
+
+ return nil
+}
+
+func (s *server) ValidateActionConfig(ctx context.Context, protoReq *tfplugin6.ValidateActionConfig_Request) (*tfplugin6.ValidateActionConfig_Response, error) {
+ rpc := "ValidateActionConfig"
+ ctx = s.loggingContext(ctx)
+ ctx = logging.RpcContext(ctx, rpc)
+ ctx = logging.ActionContext(ctx, protoReq.ActionType)
+ ctx = s.stoppableContext(ctx)
+ logging.ProtocolTrace(ctx, "Received request")
+ defer logging.ProtocolTrace(ctx, "Served request")
+
+ req := fromproto.ValidateActionConfigRequest(protoReq)
+
+ logging.ProtocolData(ctx, s.protocolDataDir, rpc, "Request", "Config", req.Config)
+
+ ctx = tf6serverlogging.DownstreamRequest(ctx)
+
+ // TODO: Remove this check and error in preference of
+ // s.downstream.ValidateActionConfig below once ProviderServer interface
+ // implements this RPC method.
+ // nolint:staticcheck
+ actionsProviderServer, ok := s.downstream.(tfprotov6.ProviderServerWithActions)
+ if !ok {
+ logging.ProtocolError(ctx, "ProviderServer does not implement ValidateActionConfig")
+
+ protoResp := &tfplugin6.ValidateActionConfig_Response{
+ Diagnostics: []*tfplugin6.Diagnostic{
+ {
+ Severity: tfplugin6.Diagnostic_ERROR,
+ Summary: "Provider ValidateActionConfig Not Implemented",
+ Detail: "A ValidateActionConfig call was received by the provider, however the provider does not implement the call. " +
+ "Either upgrade the provider to a version that implements action support or this is a bug in Terraform that should be reported to the Terraform maintainers.",
+ },
+ },
+ }
+
+ return protoResp, nil
+ }
+
+ resp, err := actionsProviderServer.ValidateActionConfig(ctx, req)
+ if err != nil {
+ logging.ProtocolError(ctx, "Error from downstream", map[string]any{logging.KeyError: err})
+ return nil, err
+ }
+
+ tf6serverlogging.DownstreamResponse(ctx, resp.Diagnostics)
+
+ protoResp := toproto.ValidateActionConfig_Response(resp)
+
+ return protoResp, nil
+}
+
+func (s *server) PlanAction(ctx context.Context, protoReq *tfplugin6.PlanAction_Request) (*tfplugin6.PlanAction_Response, error) {
+ rpc := "PlanAction"
+ ctx = s.loggingContext(ctx)
+ ctx = logging.RpcContext(ctx, rpc)
+ ctx = logging.ActionContext(ctx, protoReq.ActionType)
+ ctx = s.stoppableContext(ctx)
+ logging.ProtocolTrace(ctx, "Received request")
+ defer logging.ProtocolTrace(ctx, "Served request")
+
+ req := fromproto.PlanActionRequest(protoReq)
+
+ tf6serverlogging.PlanActionClientCapabilities(ctx, req.ClientCapabilities)
+ logging.ProtocolData(ctx, s.protocolDataDir, rpc, "Request", "Config", req.Config)
+
+ ctx = tf6serverlogging.DownstreamRequest(ctx)
+
+ // TODO: Remove this check and error in preference of
+ // s.downstream.PlanAction below once ProviderServer interface
+ // implements this RPC method.
+ // nolint:staticcheck
+ actionsProviderServer, ok := s.downstream.(tfprotov6.ProviderServerWithActions)
+ if !ok {
+ logging.ProtocolError(ctx, "ProviderServer does not implement PlanAction")
+
+ protoResp := &tfplugin6.PlanAction_Response{
+ Diagnostics: []*tfplugin6.Diagnostic{
+ {
+ Severity: tfplugin6.Diagnostic_ERROR,
+ Summary: "Provider PlanAction Not Implemented",
+ Detail: "A PlanAction call was received by the provider, however the provider does not implement the call. " +
+ "Either upgrade the provider to a version that implements action support or this is a bug in Terraform that should be reported to the Terraform maintainers.",
+ },
+ },
+ }
+
+ return protoResp, nil
+ }
+
+ // TODO: Update this to call downstream once optional interface is removed
+ // resp, err := s.downstream.PlanAction(ctx, req)
+ resp, err := actionsProviderServer.PlanAction(ctx, req)
+ if err != nil {
+ logging.ProtocolError(ctx, "Error from downstream", map[string]interface{}{logging.KeyError: err})
+ return nil, err
+ }
+
+ tf6serverlogging.DownstreamResponse(ctx, resp.Diagnostics)
+
+ tf6serverlogging.Deferred(ctx, resp.Deferred)
+
+ if resp.Deferred != nil && (req.ClientCapabilities == nil || !req.ClientCapabilities.DeferralAllowed) {
+ resp.Diagnostics = append(resp.Diagnostics, invalidDeferredResponseDiag(resp.Deferred.Reason))
+ }
+
+ protoResp := toproto.PlanAction_Response(resp)
+
+ return protoResp, nil
+}
+
+func (s *server) InvokeAction(protoReq *tfplugin6.InvokeAction_Request, protoStream grpc.ServerStreamingServer[tfplugin6.InvokeAction_Event]) error {
+ rpc := "InvokeAction"
+ ctx := protoStream.Context()
+ ctx = s.loggingContext(ctx)
+ ctx = logging.RpcContext(ctx, rpc)
+ ctx = logging.ActionContext(ctx, protoReq.ActionType)
+ ctx = s.stoppableContext(ctx)
+ logging.ProtocolTrace(ctx, "Received request")
+ defer logging.ProtocolTrace(ctx, "Served request")
+
+ req := fromproto.InvokeActionRequest(protoReq)
+ logging.ProtocolData(ctx, s.protocolDataDir, rpc, "Request", "Config", req.Config)
+
+ ctx = tf6serverlogging.DownstreamRequest(ctx)
+
+ // TODO: Remove this check and error in preference of
+ // s.downstream.InvokeAction below once ProviderServer interface
+ // implements this RPC method.
+ // nolint:staticcheck
+ actionsProviderServer, ok := s.downstream.(tfprotov6.ProviderServerWithActions)
+ if !ok {
+ logging.ProtocolError(ctx, "ProviderServer does not implement InvokeAction")
+
+ protoEvent := &tfplugin6.InvokeAction_Event{
+ Type: &tfplugin6.InvokeAction_Event_Completed_{
+ Completed: &tfplugin6.InvokeAction_Event_Completed{
+ Diagnostics: []*tfplugin6.Diagnostic{
+ {
+ Severity: tfplugin6.Diagnostic_ERROR,
+ Summary: "Provider InvokeAction Not Implemented",
+ Detail: "An InvokeAction call was received by the provider, however the provider does not implement the call. " +
+ "Either upgrade the provider to a version that implements action support or this is a bug in Terraform that should be reported to the Terraform maintainers.",
+ },
+ },
+ },
+ },
+ }
+
+ return protoStream.Send(protoEvent)
+ }
+
+ // TODO: Update this to call downstream once optional interface is removed
+ // resp, err := s.downstream.InvokeAction(ctx, req)
+ resp, err := actionsProviderServer.InvokeAction(ctx, req)
+ if err != nil {
+ logging.ProtocolError(ctx, "Error from downstream", map[string]interface{}{logging.KeyError: err})
+ return err
+ }
+
+ for ev := range resp.Events {
+ select {
+ case <-ctx.Done():
+ logging.ProtocolTrace(ctx, "Context done")
+ return nil
+
+ default:
+ switch ev := ev.Type.(type) {
+ // MAINTAINER NOTE: Only the completed event has diagnostics to log, otherwise we just send an empty slice.
+ case *tfprotov6.CompletedInvokeActionEventType:
+ tf6serverlogging.DownstreamServerEvent(ctx, ev.Diagnostics)
+ default:
+ tf6serverlogging.DownstreamServerEvent(ctx, make(diag.Diagnostics, 0))
+ }
+
+ protoEv := toproto.InvokeAction_InvokeActionEvent(&ev)
+ if err := protoStream.Send(protoEv); err != nil {
+ logging.ProtocolError(ctx, "Error sending event", map[string]any{logging.KeyError: err})
+ return err
+ }
+ }
+ }
+
+ return nil
+}
+
func invalidDeferredResponseDiag(reason tfprotov6.DeferredReason) *tfprotov6.Diagnostic {
return &tfprotov6.Diagnostic{
Severity: tfprotov6.DiagnosticSeverityError,
diff --git a/vendor/github.com/hashicorp/terraform-plugin-go/tftypes/value.go b/vendor/github.com/hashicorp/terraform-plugin-go/tftypes/value.go
index 63570211f5..bf9bd1ab77 100644
--- a/vendor/github.com/hashicorp/terraform-plugin-go/tftypes/value.go
+++ b/vendor/github.com/hashicorp/terraform-plugin-go/tftypes/value.go
@@ -574,6 +574,46 @@ func (val Value) IsNull() bool {
return val.value == nil
}
+// IsFullyNull returns true if the Value is null or if the Value is an
+// aggregate that consists of only fully null elements and attributes.
+func (val Value) IsFullyNull() bool {
+ if val.IsNull() {
+ return true
+ }
+
+ switch val.Type().(type) {
+ case primitive:
+ return false // already checked IsNull() and not an aggregate
+
+ case List, Set, Tuple:
+ sliceVal, ok := val.value.([]Value)
+ if !ok {
+ panic(fmt.Sprintf("impossible type assertion failure: %T to slice", val))
+ }
+ for _, v := range sliceVal {
+ if !v.IsFullyNull() {
+ return false
+ }
+ }
+ return true
+
+ case Map, Object:
+ mapVal, ok := val.value.(map[string]Value)
+ if !ok {
+ panic(fmt.Sprintf("impossible type assertion failure: %T to map", val))
+ }
+ for _, v := range mapVal {
+ if !v.IsFullyNull() {
+ return false
+ }
+ }
+ return true
+
+ default:
+ panic(fmt.Sprintf("unknown type %T", val.Type()))
+ }
+}
+
// MarshalMsgPack returns a msgpack representation of the Value. This is used
// for constructing tfprotov5.DynamicValues.
//
diff --git a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest/random.go b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest/random.go
index c26303eb60..382163cbc2 100644
--- a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest/random.go
+++ b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest/random.go
@@ -34,9 +34,9 @@ func RandomWithPrefix(name string) string {
return fmt.Sprintf("%s-%d", name, RandInt())
}
-// RandIntRange returns a random integer between min (inclusive) and max (exclusive)
-func RandIntRange(min int, max int) int {
- return rand.Intn(max-min) + min
+// RandIntRange returns a random integer between minVal (inclusive) and maxVal (exclusive)
+func RandIntRange(minVal int, maxVal int) int {
+ return rand.Intn(maxVal-minVal) + minVal
}
// RandString generates a random alphanumeric string of the length specified
diff --git a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/logging/logging.go b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/logging/logging.go
index ea0764d13a..d012245f03 100644
--- a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/logging/logging.go
+++ b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/logging/logging.go
@@ -90,7 +90,7 @@ func LogOutput(t testing.T) (logOutput io.Writer, err error) {
// SetOutput checks for a log destination with LogOutput, and calls
// log.SetOutput with the result. If LogOutput returns nil, SetOutput uses
-// io.Discard. Any error from LogOutout is fatal.
+// io.Discard. Any error from LogOutput is fatal.
func SetOutput(t testing.T) {
out, err := LogOutput(t)
if err != nil {
diff --git a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource/testing.go b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource/testing.go
index 9bde8e22aa..ac575ed43c 100644
--- a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource/testing.go
+++ b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource/testing.go
@@ -28,7 +28,7 @@ import (
)
// flagSweep is a flag available when running tests on the command line. It
-// contains a comma seperated list of regions to for the sweeper functions to
+// contains a comma separated list of regions to for the sweeper functions to
// run in. This flag bypasses the normal Test path and instead runs functions designed to
// clean up any leaked resources a testing environment could have created. It is
// a best effort attempt, and relies on Provider authors to implement "Sweeper"
@@ -49,7 +49,7 @@ import (
var flagSweep = flag.String("sweep", "", "List of Regions to run available Sweepers")
var flagSweepAllowFailures = flag.Bool("sweep-allow-failures", false, "Enable to allow Sweeper Tests to continue after failures")
-var flagSweepRun = flag.String("sweep-run", "", "Comma seperated list of Sweeper Tests to run")
+var flagSweepRun = flag.String("sweep-run", "", "Comma separated list of Sweeper Tests to run")
var sweeperFuncs map[string]*Sweeper
// SweeperFunc is a signature for a function that acts as a sweeper. It
@@ -103,7 +103,7 @@ func AddTestSweepers(name string, s *Sweeper) {
// Sweeper flags added to the "go test" command:
//
// -sweep: Comma-separated list of locations/regions to run available sweepers.
-// -sweep-allow-failues: Enable to allow other sweepers to run after failures.
+// -sweep-allow-failures: Enable to allow other sweepers to run after failures.
// -sweep-run: Comma-separated list of resource type sweepers to run. Defaults
// to all sweepers.
//
@@ -183,7 +183,7 @@ func runSweepers(regions []string, sweepers map[string]*Sweeper, allowFailures b
return sweeperRunList, nil
}
-// filterSweepers takes a comma seperated string listing the names of sweepers
+// filterSweepers takes a comma separated string listing the names of sweepers
// to be ran, and returns a filtered set from the list of all of sweepers to
// run based on the names given.
func filterSweepers(f string, source map[string]*Sweeper) map[string]*Sweeper {
@@ -230,7 +230,7 @@ func filterSweeperWithDependencies(name string, source map[string]*Sweeper) map[
return result
}
-// runSweeperWithRegion recieves a sweeper and a region, and recursively calls
+// runSweeperWithRegion receives a sweeper and a region, and recursively calls
// itself with that region for every dependency found for that sweeper. If there
// are no dependencies, invoke the contained sweeper fun with the region, and
// add the success/fail status to the sweeperRunList.
@@ -812,7 +812,7 @@ func testResource(c TestStep, state *terraform.State) (*terraform.ResourceState,
// into smaller pieces more easily.
//
// ComposeTestCheckFunc returns immediately on the first TestCheckFunc error.
-// To aggregrate all errors, use ComposeAggregateTestCheckFunc instead.
+// To aggregate all errors, use ComposeAggregateTestCheckFunc instead.
func ComposeTestCheckFunc(fs ...TestCheckFunc) TestCheckFunc {
return func(s *terraform.State) error {
for i, f := range fs {
@@ -831,7 +831,7 @@ func ComposeTestCheckFunc(fs ...TestCheckFunc) TestCheckFunc {
// As a user testing their provider, this lets you decompose your checks
// into smaller pieces more easily.
//
-// Unlike ComposeTestCheckFunc, ComposeAggergateTestCheckFunc runs _all_ of the
+// Unlike ComposeTestCheckFunc, ComposeAggregateTestCheckFunc runs _all_ of the
// TestCheckFuncs and aggregates failures.
func ComposeAggregateTestCheckFunc(fs ...TestCheckFunc) TestCheckFunc {
return func(s *terraform.State) error {
diff --git a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource/testing_sets.go b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource/testing_sets.go
index 8f5a731c32..45cce95732 100644
--- a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource/testing_sets.go
+++ b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource/testing_sets.go
@@ -20,7 +20,7 @@ const (
// TestCheckTypeSetElemNestedAttrs ensures a subset map of values is stored in
// state for the given name and key combination of attributes nested under a
// list or set block. Use this TestCheckFunc in preference over non-set
-// variants to simplify testing code and ensure compatibility with indicies,
+// variants to simplify testing code and ensure compatibility with indices,
// which can easily change with schema changes. State value checking is only
// recommended for testing Computed attributes and attribute defaults.
//
@@ -92,7 +92,7 @@ func TestCheckTypeSetElemNestedAttrs(name, attr string, values map[string]string
// regular expressions, is stored in state for the given name and key
// combination of attributes nested under a list or set block. Use this
// TestCheckFunc in preference over non-set variants to simplify testing code
-// and ensure compatibility with indicies, which can easily change with schema
+// and ensure compatibility with indices, which can easily change with schema
// changes. State value checking is only recommended for testing Computed
// attributes and attribute defaults.
//
@@ -171,7 +171,7 @@ func TestMatchTypeSetElemNestedAttrs(name, attr string, values map[string]*regex
// TestCheckTypeSetElemAttr ensures a specific value is stored in state for the
// given name and key combination under a list or set. Use this TestCheckFunc
// in preference over non-set variants to simplify testing code and ensure
-// compatibility with indicies, which can easily change with schema changes.
+// compatibility with indices, which can easily change with schema changes.
// State value checking is only recommended for testing Computed attributes and
// attribute defaults.
//
diff --git a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/core_schema.go b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/core_schema.go
index 736af218da..d782491d6a 100644
--- a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/core_schema.go
+++ b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/core_schema.go
@@ -4,11 +4,14 @@
package schema
import (
+ "context"
"fmt"
"github.com/hashicorp/go-cty/cty"
+ "github.com/hashicorp/terraform-plugin-go/tfprotov5"
"github.com/hashicorp/terraform-plugin-sdk/v2/internal/configs/configschema"
+ "github.com/hashicorp/terraform-plugin-sdk/v2/internal/plugin/convert"
)
// StringKind represents the format a string is in.
@@ -123,7 +126,7 @@ func (m schemaMap) CoreConfigSchema() *configschema.Block {
// whose elem is a whole resource.
func (s *Schema) coreConfigSchemaAttribute() *configschema.Attribute {
// The Schema.DefaultFunc capability adds some extra weirdness here since
- // it can be combined with "Required: true" to create a sitution where
+ // it can be combined with "Required: true" to create a situation where
// required-ness is conditional. Terraform Core doesn't share this concept,
// so we must sniff for this possibility here and conditionally turn
// off the "Required" flag if it looks like the DefaultFunc is going
@@ -167,6 +170,10 @@ func (s *Schema) coreConfigSchemaAttribute() *configschema.Attribute {
Description: desc,
DescriptionKind: descKind,
Deprecated: s.Deprecated != "",
+ WriteOnly: s.WriteOnly,
+ // For Identity Attributes only
+ OptionalForImport: s.OptionalForImport,
+ RequiredForImport: s.RequiredForImport,
}
}
@@ -369,3 +376,61 @@ func (r *Resource) CoreConfigSchema() *configschema.Block {
func (r *Resource) coreConfigSchema() *configschema.Block {
return schemaMap(r.SchemaMap()).CoreConfigSchema()
}
+
+func (r *Resource) CoreIdentitySchema() (*configschema.Block, error) {
+ block, err := r.coreIdentitySchema()
+
+ if err != nil {
+ return nil, err
+ }
+
+ if block.Attributes == nil {
+ return nil, fmt.Errorf("identity schema must have at least one attribute")
+ }
+
+ return block, nil
+}
+
+func (r *Resource) coreIdentitySchema() (*configschema.Block, error) {
+ if r.Identity.SchemaMap() == nil {
+ return nil, fmt.Errorf("resource does not have an identity schema")
+ }
+ // while there is schemaMapWithIdentity, we don't need to use it here
+ // as we're only interested in the existing CoreConfigSchema() method
+ // to convert our schema
+ return schemaMap(r.Identity.SchemaMap()).CoreConfigSchema(), nil
+}
+
+// ProtoSchema will return a function that returns the *tfprotov5.Schema
+func (r *Resource) ProtoSchema(ctx context.Context) func() *tfprotov5.Schema {
+ return func() *tfprotov5.Schema {
+ return &tfprotov5.Schema{
+ Version: int64(r.SchemaVersion),
+ Block: convert.ConfigSchemaToProto(ctx, r.CoreConfigSchema()),
+ }
+ }
+}
+
+// ProtoIdentitySchema will return a function that returns the *tfprotov5.ResourceIdentitySchema if the resource supports identity,
+// otherwise it will return nil.
+func (r *Resource) ProtoIdentitySchema(ctx context.Context) func() *tfprotov5.ResourceIdentitySchema {
+ // Resource doesn't support identity, return nil
+ if r.Identity == nil {
+ return nil
+ }
+
+ return func() *tfprotov5.ResourceIdentitySchema {
+ idschema, err := r.CoreIdentitySchema()
+
+ if err != nil {
+ // This shouldn't be reachable unless there is an implementation error in the provider, which should raise
+ // a diagnostic prior to reaching this point.
+ panic(fmt.Sprintf("unexpected error retrieving identity schema: %s", err))
+ }
+
+ return &tfprotov5.ResourceIdentitySchema{
+ Version: r.Identity.Version,
+ IdentityAttributes: convert.ConfigIdentitySchemaToProto(ctx, idschema),
+ }
+ }
+}
diff --git a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/field_reader_config.go b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/field_reader_config.go
index df317c20bb..91b7412fcc 100644
--- a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/field_reader_config.go
+++ b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/field_reader_config.go
@@ -269,7 +269,7 @@ func (r *ConfigFieldReader) readSet(
return FieldReadResult{Value: set}, nil
}
- // If the list is computed, the set is necessarilly computed
+ // If the list is computed, the set is necessarily computed
if raw.Computed {
return FieldReadResult{
Value: set,
diff --git a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/grpc_provider.go b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/grpc_provider.go
index ec5d74301a..2e02fde7df 100644
--- a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/grpc_provider.go
+++ b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/grpc_provider.go
@@ -7,7 +7,9 @@ import (
"context"
"encoding/json"
"fmt"
+ "slices"
"strconv"
+ "strings"
"sync"
"github.com/hashicorp/go-cty/cty"
@@ -77,6 +79,115 @@ func (s *GRPCProviderServer) serverCapabilities() *tfprotov5.ServerCapabilities
}
}
+func (s *GRPCProviderServer) GetResourceIdentitySchemas(ctx context.Context, req *tfprotov5.GetResourceIdentitySchemasRequest) (*tfprotov5.GetResourceIdentitySchemasResponse, error) {
+ ctx = logging.InitContext(ctx)
+
+ logging.HelperSchemaTrace(ctx, "Getting resource identity schemas")
+
+ resp := &tfprotov5.GetResourceIdentitySchemasResponse{
+ IdentitySchemas: make(map[string]*tfprotov5.ResourceIdentitySchema),
+ }
+
+ for typ, res := range s.provider.ResourcesMap {
+ logging.HelperSchemaTrace(ctx, "Found resource identity type", map[string]interface{}{logging.KeyResourceType: typ})
+
+ if res.Identity != nil {
+ idschema, err := res.CoreIdentitySchema()
+
+ if err != nil {
+ resp.Diagnostics = convert.AppendProtoDiag(ctx, resp.Diagnostics, fmt.Errorf("getting identity schema failed for resource '%s': %w", typ, err))
+ return resp, nil
+ }
+
+ resp.IdentitySchemas[typ] = &tfprotov5.ResourceIdentitySchema{
+ Version: res.Identity.Version,
+ IdentityAttributes: convert.ConfigIdentitySchemaToProto(ctx, idschema),
+ }
+ }
+ }
+
+ return resp, nil
+
+}
+
+func (s *GRPCProviderServer) UpgradeResourceIdentity(ctx context.Context, req *tfprotov5.UpgradeResourceIdentityRequest) (*tfprotov5.UpgradeResourceIdentityResponse, error) {
+ ctx = logging.InitContext(ctx)
+ resp := &tfprotov5.UpgradeResourceIdentityResponse{}
+
+ res, ok := s.provider.ResourcesMap[req.TypeName]
+ if !ok {
+ resp.Diagnostics = convert.AppendProtoDiag(ctx, resp.Diagnostics, fmt.Errorf("unknown resource type: %s", req.TypeName))
+ return resp, nil
+ }
+
+ schemaBlock, err := s.getResourceIdentitySchemaBlock(req.TypeName)
+ if err != nil {
+ resp.Diagnostics = convert.AppendProtoDiag(ctx, resp.Diagnostics, err)
+ return resp, nil
+ }
+
+ version := req.Version
+
+ jsonMap := map[string]interface{}{}
+
+ switch {
+ // if there's a JSON state, we need to decode it.
+ case req.RawIdentity != nil && len(req.RawIdentity.JSON) > 0:
+ if res.UseJSONNumber {
+ err = unmarshalJSON(req.RawIdentity.JSON, &jsonMap)
+ } else {
+ err = json.Unmarshal(req.RawIdentity.JSON, &jsonMap)
+ }
+ if err != nil {
+ resp.Diagnostics = convert.AppendProtoDiag(ctx, resp.Diagnostics, err)
+ return resp, nil
+ }
+ default:
+ logging.HelperSchemaDebug(ctx, "no resource identity provided to upgrade")
+ return resp, nil
+ }
+
+ // complete the upgrade of the JSON states
+ logging.HelperSchemaTrace(ctx, "Upgrading JSON identity")
+
+ jsonMap, err = s.upgradeJSONIdentity(ctx, version, jsonMap, res)
+ if err != nil {
+ resp.Diagnostics = convert.AppendProtoDiag(ctx, resp.Diagnostics, err)
+ return resp, nil
+ }
+
+ // The provider isn't required to clean out removed fields
+ s.removeAttributes(ctx, jsonMap, schemaBlock.ImpliedType())
+
+ // now we need to turn the state into the default json representation, so
+ // that it can be re-decoded using the actual schema.
+ val, err := JSONMapToStateValue(jsonMap, schemaBlock)
+ if err != nil {
+ resp.Diagnostics = convert.AppendProtoDiag(ctx, resp.Diagnostics, err)
+ return resp, nil
+ }
+
+ // Now we need to make sure blocks are represented correctly, which means
+ // that missing blocks are empty collections, rather than null.
+ // First we need to CoerceValue to ensure that all object types match.
+ val, err = schemaBlock.CoerceValue(val)
+ if err != nil {
+ resp.Diagnostics = convert.AppendProtoDiag(ctx, resp.Diagnostics, err)
+ return resp, nil
+ }
+
+ // encode the final state to the expected msgpack format
+ newStateMP, err := msgpack.Marshal(val, schemaBlock.ImpliedType())
+ if err != nil {
+ resp.Diagnostics = convert.AppendProtoDiag(ctx, resp.Diagnostics, err)
+ return resp, nil
+ }
+
+ resp.UpgradedIdentity = &tfprotov5.ResourceIdentityData{IdentityData: &tfprotov5.DynamicValue{MsgPack: newStateMP}}
+
+ return resp, nil
+}
+
func (s *GRPCProviderServer) GetMetadata(ctx context.Context, req *tfprotov5.GetMetadataRequest) (*tfprotov5.GetMetadataResponse, error) {
ctx = logging.InitContext(ctx)
@@ -84,7 +195,10 @@ func (s *GRPCProviderServer) GetMetadata(ctx context.Context, req *tfprotov5.Get
resp := &tfprotov5.GetMetadataResponse{
DataSources: make([]tfprotov5.DataSourceMetadata, 0, len(s.provider.DataSourcesMap)),
+ EphemeralResources: make([]tfprotov5.EphemeralResourceMetadata, 0),
Functions: make([]tfprotov5.FunctionMetadata, 0),
+ ListResources: make([]tfprotov5.ListResourceMetadata, 0),
+ Actions: make([]tfprotov5.ActionMetadata, 0),
Resources: make([]tfprotov5.ResourceMetadata, 0, len(s.provider.ResourcesMap)),
ServerCapabilities: s.serverCapabilities(),
}
@@ -110,10 +224,13 @@ func (s *GRPCProviderServer) GetProviderSchema(ctx context.Context, req *tfproto
logging.HelperSchemaTrace(ctx, "Getting provider schema")
resp := &tfprotov5.GetProviderSchemaResponse{
- DataSourceSchemas: make(map[string]*tfprotov5.Schema, len(s.provider.DataSourcesMap)),
- Functions: make(map[string]*tfprotov5.Function, 0),
- ResourceSchemas: make(map[string]*tfprotov5.Schema, len(s.provider.ResourcesMap)),
- ServerCapabilities: s.serverCapabilities(),
+ DataSourceSchemas: make(map[string]*tfprotov5.Schema, len(s.provider.DataSourcesMap)),
+ EphemeralResourceSchemas: make(map[string]*tfprotov5.Schema, 0),
+ Functions: make(map[string]*tfprotov5.Function, 0),
+ ListResourceSchemas: make(map[string]*tfprotov5.Schema, 0),
+ ActionSchemas: make(map[string]*tfprotov5.ActionSchema, 0),
+ ResourceSchemas: make(map[string]*tfprotov5.Schema, len(s.provider.ResourcesMap)),
+ ServerCapabilities: s.serverCapabilities(),
}
resp.Provider = &tfprotov5.Schema{
@@ -158,6 +275,11 @@ func (s *GRPCProviderServer) getResourceSchemaBlock(name string) *configschema.B
return res.CoreConfigSchema()
}
+func (s *GRPCProviderServer) getResourceIdentitySchemaBlock(name string) (*configschema.Block, error) {
+ res := s.provider.ResourcesMap[name]
+ return res.CoreIdentitySchema()
+}
+
func (s *GRPCProviderServer) getDatasourceSchemaBlock(name string) *configschema.Block {
dat := s.provider.DataSourcesMap[name]
return dat.CoreConfigSchema()
@@ -281,6 +403,32 @@ func (s *GRPCProviderServer) ValidateResourceTypeConfig(ctx context.Context, req
resp.Diagnostics = convert.AppendProtoDiag(ctx, resp.Diagnostics, err)
return resp, nil
}
+ if req.ClientCapabilities == nil || !req.ClientCapabilities.WriteOnlyAttributesAllowed {
+ resp.Diagnostics = convert.AppendProtoDiag(ctx, resp.Diagnostics, validateWriteOnlyNullValues(configVal, schemaBlock, cty.Path{}))
+ }
+
+ r := s.provider.ResourcesMap[req.TypeName]
+
+ // Calling all ValidateRawResourceConfigFunc here since they validate on the raw go-cty config value
+ // and were introduced after the public provider.ValidateResource method.
+ if r.ValidateRawResourceConfigFuncs != nil {
+ writeOnlyAllowed := false
+
+ if req.ClientCapabilities != nil {
+ writeOnlyAllowed = req.ClientCapabilities.WriteOnlyAttributesAllowed
+ }
+
+ validateReq := ValidateResourceConfigFuncRequest{
+ WriteOnlyAttributesAllowed: writeOnlyAllowed,
+ RawConfig: configVal,
+ }
+
+ for _, validateFunc := range r.ValidateRawResourceConfigFuncs {
+ validateResp := &ValidateResourceConfigFuncResponse{}
+ validateFunc(ctx, validateReq, validateResp)
+ resp.Diagnostics = convert.AppendProtoDiag(ctx, resp.Diagnostics, validateResp.Diagnostics)
+ }
+ }
config := terraform.NewResourceConfigShimmed(configVal, schemaBlock)
@@ -392,6 +540,9 @@ func (s *GRPCProviderServer) UpgradeResourceState(ctx context.Context, req *tfpr
// Normalize the value and fill in any missing blocks.
val = objchange.NormalizeObjectFromLegacySDK(val, schemaBlock)
+ // Set any write-only attribute values to null
+ val = setWriteOnlyNullValues(val, schemaBlock)
+
// encode the final state to the expected msgpack format
newStateMP, err := msgpack.Marshal(val, schemaBlock.ImpliedType())
if err != nil {
@@ -501,7 +652,7 @@ func (s *GRPCProviderServer) upgradeJSONState(ctx context.Context, version int,
// Remove any attributes no longer present in the schema, so that the json can
// be correctly decoded.
func (s *GRPCProviderServer) removeAttributes(ctx context.Context, v interface{}, ty cty.Type) {
- // we're only concerned with finding maps that corespond to object
+ // we're only concerned with finding maps that correspond to object
// attributes
switch v := v.(type) {
case []interface{}:
@@ -643,11 +794,43 @@ func (s *GRPCProviderServer) ConfigureProvider(ctx context.Context, req *tfproto
func (s *GRPCProviderServer) ReadResource(ctx context.Context, req *tfprotov5.ReadResourceRequest) (*tfprotov5.ReadResourceResponse, error) {
ctx = logging.InitContext(ctx)
+ readFollowingImport := false
+
+ reqPrivate := req.Private
+
+ if reqPrivate != nil {
+ // unmarshal the private data
+ if len(reqPrivate) > 0 {
+ newReqPrivate := make(map[string]interface{})
+ if err := json.Unmarshal(reqPrivate, &newReqPrivate); err != nil {
+ return nil, err
+ }
+ // This internal private field is set on a resource during ImportResourceState to help framework determine if
+ // the resource has been recently imported. We only need to read this once, so we immediately clear it after.
+ if _, ok := newReqPrivate[terraform.ImportBeforeReadMetaKey]; ok {
+ readFollowingImport = true
+ delete(newReqPrivate, terraform.ImportBeforeReadMetaKey)
+
+ if len(newReqPrivate) == 0 {
+ // if there are no other private data, set the private data to nil
+ reqPrivate = nil
+ } else {
+ // set the new private data without the import key
+ bytes, err := json.Marshal(newReqPrivate)
+ if err != nil {
+ return nil, err
+ }
+ reqPrivate = bytes
+ }
+ }
+ }
+ }
+
resp := &tfprotov5.ReadResourceResponse{
// helper/schema did previously handle private data during refresh, but
// core is now going to expect this to be maintained in order to
// persist it in the state.
- Private: req.Private,
+ Private: reqPrivate,
}
res, ok := s.provider.ResourcesMap[req.TypeName]
@@ -667,6 +850,7 @@ func (s *GRPCProviderServer) ReadResource(ctx context.Context, req *tfprotov5.Re
)
resp.NewState = req.CurrentState
+ resp.NewIdentity = req.CurrentIdentity
resp.Deferred = &tfprotov5.Deferred{
Reason: tfprotov5.DeferredReason(s.provider.providerDeferred.Reason),
}
@@ -686,9 +870,32 @@ func (s *GRPCProviderServer) ReadResource(ctx context.Context, req *tfprotov5.Re
}
instanceState.RawState = stateVal
+ var currentIdentityVal cty.Value
+ if req.CurrentIdentity != nil && req.CurrentIdentity.IdentityData != nil {
+
+ // convert req.CurrentIdentity to flat map identity structure
+ // Step 1: Turn JSON into cty.Value based on schema
+ identityBlock, err := s.getResourceIdentitySchemaBlock(req.TypeName)
+ if err != nil {
+ resp.Diagnostics = convert.AppendProtoDiag(ctx, resp.Diagnostics, fmt.Errorf("getting identity schema failed for resource '%s': %w", req.TypeName, err))
+ return resp, nil
+ }
+
+ currentIdentityVal, err = msgpack.Unmarshal(req.CurrentIdentity.IdentityData.MsgPack, identityBlock.ImpliedType())
+ if err != nil {
+ resp.Diagnostics = convert.AppendProtoDiag(ctx, resp.Diagnostics, err)
+ return resp, nil
+ }
+
+ // Step 2: Turn cty.Value into flatmap representation
+ identityAttrs := hcl2shim.FlatmapValueFromHCL2(currentIdentityVal)
+ // Step 3: Well, set it in the instanceState
+ instanceState.Identity = identityAttrs
+ }
+
private := make(map[string]interface{})
- if len(req.Private) > 0 {
- if err := json.Unmarshal(req.Private, &private); err != nil {
+ if len(reqPrivate) > 0 {
+ if err := json.Unmarshal(reqPrivate, &private); err != nil {
resp.Diagnostics = convert.AppendProtoDiag(ctx, resp.Diagnostics, err)
return resp, nil
}
@@ -736,6 +943,7 @@ func (s *GRPCProviderServer) ReadResource(ctx context.Context, req *tfprotov5.Re
newStateVal = normalizeNullValues(newStateVal, stateVal, false)
newStateVal = copyTimeoutValues(newStateVal, stateVal)
+ newStateVal = setWriteOnlyNullValues(newStateVal, schemaBlock)
newStateMP, err := msgpack.Marshal(newStateVal, schemaBlock.ImpliedType())
if err != nil {
@@ -747,6 +955,49 @@ func (s *GRPCProviderServer) ReadResource(ctx context.Context, req *tfprotov5.Re
MsgPack: newStateMP,
}
+ if newInstanceState.Identity != nil {
+ identityBlock, err := s.getResourceIdentitySchemaBlock(req.TypeName)
+ if err != nil {
+ resp.Diagnostics = convert.AppendProtoDiag(ctx, resp.Diagnostics, fmt.Errorf("getting identity schema failed for resource '%s': %w", req.TypeName, err))
+ return resp, nil
+ }
+
+ newIdentityVal, err := hcl2shim.HCL2ValueFromFlatmap(newInstanceState.Identity, identityBlock.ImpliedType())
+ if err != nil {
+ resp.Diagnostics = convert.AppendProtoDiag(ctx, resp.Diagnostics, err)
+ return resp, nil
+ }
+
+ if isCtyObjectNullOrEmpty(newIdentityVal) {
+ resp.Diagnostics = convert.AppendProtoDiag(ctx, resp.Diagnostics, fmt.Errorf(
+ "Missing Resource Identity After Read: The Terraform provider unexpectedly returned no resource identity after having no errors in the resource read. "+
+ "This is always a problem with the provider and should be reported to the provider developer",
+ ))
+ return resp, nil
+ }
+
+ // If we're refreshing the resource state (excluding a recently imported resource), validate that the new identity isn't changing
+ if !res.ResourceBehavior.MutableIdentity && !readFollowingImport && !isCtyObjectNullOrEmpty(currentIdentityVal) && !currentIdentityVal.RawEquals(newIdentityVal) {
+ resp.Diagnostics = convert.AppendProtoDiag(ctx, resp.Diagnostics, fmt.Errorf("Unexpected Identity Change: %s", "During the read operation, the Terraform Provider unexpectedly returned a different identity then the previously stored one.\n\n"+
+ "This is always a problem with the provider and should be reported to the provider developer.\n\n"+
+ fmt.Sprintf("Current Identity: %s\n\n", currentIdentityVal.GoString())+
+ fmt.Sprintf("New Identity: %s", newIdentityVal.GoString())))
+ return resp, nil
+ }
+
+ newIdentityMP, err := msgpack.Marshal(newIdentityVal, identityBlock.ImpliedType())
+ if err != nil {
+ resp.Diagnostics = convert.AppendProtoDiag(ctx, resp.Diagnostics, err)
+ return resp, nil
+ }
+
+ resp.NewIdentity = &tfprotov5.ResourceIdentityData{
+ IdentityData: &tfprotov5.DynamicValue{
+ MsgPack: newIdentityMP,
+ },
+ }
+ }
+
return resp, nil
}
@@ -788,6 +1039,7 @@ func (s *GRPCProviderServer) PlanResourceChange(ctx context.Context, req *tfprot
resp.Deferred = &tfprotov5.Deferred{
Reason: tfprotov5.DeferredReason(s.provider.providerDeferred.Reason),
}
+ resp.PlannedIdentity = req.PriorIdentity
return resp, nil
}
@@ -809,6 +1061,7 @@ func (s *GRPCProviderServer) PlanResourceChange(ctx context.Context, req *tfprot
if proposedNewStateVal.IsNull() {
resp.PlannedState = req.ProposedNewState
resp.PlannedPrivate = req.PriorPrivate
+ resp.PlannedIdentity = req.PriorIdentity
return resp, nil
}
@@ -855,6 +1108,28 @@ func (s *GRPCProviderServer) PlanResourceChange(ctx context.Context, req *tfprot
// turn the proposed state into a legacy configuration
cfg := terraform.NewResourceConfigShimmed(proposedNewStateVal, schemaBlock)
+ var priorIdentityVal cty.Value
+ // add identity data to priorState
+ if req.PriorIdentity != nil && req.PriorIdentity.IdentityData != nil {
+ // convert req.PriorIdentity to flat map identity structure
+ // Step 1: Turn JSON into cty.Value based on schema
+ identityBlock, err := s.getResourceIdentitySchemaBlock(req.TypeName)
+ if err != nil {
+ resp.Diagnostics = convert.AppendProtoDiag(ctx, resp.Diagnostics, fmt.Errorf("getting identity schema failed for resource '%s': %w", req.TypeName, err))
+ return resp, nil
+ }
+
+ priorIdentityVal, err = msgpack.Unmarshal(req.PriorIdentity.IdentityData.MsgPack, identityBlock.ImpliedType())
+ if err != nil {
+ resp.Diagnostics = convert.AppendProtoDiag(ctx, resp.Diagnostics, err)
+ return resp, nil
+ }
+ // Step 2: Turn cty.Value into flatmap representation
+ identityAttrs := hcl2shim.FlatmapValueFromHCL2(priorIdentityVal)
+ // Step 3: Well, set it in the priorState
+ priorState.Identity = identityAttrs
+ }
+
diff, err := res.SimpleDiff(ctx, priorState, cfg, s.provider.Meta())
if err != nil {
resp.Diagnostics = convert.AppendProtoDiag(ctx, resp.Diagnostics, err)
@@ -872,13 +1147,14 @@ func (s *GRPCProviderServer) PlanResourceChange(ctx context.Context, req *tfprot
}
}
- if diff == nil || len(diff.Attributes) == 0 {
+ if diff == nil || (len(diff.Attributes) == 0 && len(diff.Identity) == 0) {
// schema.Provider.Diff returns nil if it ends up making a diff with no
// changes, but our new interface wants us to return an actual change
// description that _shows_ there are no changes. This is always the
// prior state, because we force a diff above if this is a new instance.
resp.PlannedState = req.PriorState
resp.PlannedPrivate = req.PriorPrivate
+ resp.PlannedIdentity = req.PriorIdentity
return resp, nil
}
@@ -935,6 +1211,9 @@ func (s *GRPCProviderServer) PlanResourceChange(ctx context.Context, req *tfprot
plannedStateVal = SetUnknowns(plannedStateVal, schemaBlock)
}
+ // Set any write-only attribute values to null
+ plannedStateVal = setWriteOnlyNullValues(plannedStateVal, schemaBlock)
+
plannedMP, err := msgpack.Marshal(plannedStateVal, schemaBlock.ImpliedType())
if err != nil {
resp.Diagnostics = convert.AppendProtoDiag(ctx, resp.Diagnostics, err)
@@ -1026,6 +1305,45 @@ func (s *GRPCProviderServer) PlanResourceChange(ctx context.Context, req *tfprot
}
}
+ if res.Identity != nil {
+ identityBlock, err := s.getResourceIdentitySchemaBlock(req.TypeName)
+ if err != nil {
+ resp.Diagnostics = convert.AppendProtoDiag(ctx, resp.Diagnostics, fmt.Errorf("getting identity schema failed for resource '%s': %w", req.TypeName, err))
+ return resp, nil
+ }
+
+ plannedIdentityVal, err := hcl2shim.HCL2ValueFromFlatmap(diff.Identity, identityBlock.ImpliedType())
+ if err != nil {
+ resp.Diagnostics = convert.AppendProtoDiag(ctx, resp.Diagnostics, err)
+ return resp, nil
+ }
+
+ // If we're updating or deleting and we already have an identity stored, validate that the planned identity isn't changing
+ if !res.ResourceBehavior.MutableIdentity && !create && !isCtyObjectNullOrEmpty(priorIdentityVal) && !priorIdentityVal.RawEquals(plannedIdentityVal) {
+ resp.Diagnostics = convert.AppendProtoDiag(ctx, resp.Diagnostics, fmt.Errorf(
+ "Unexpected Identity Change: During the planning operation, the Terraform Provider unexpectedly returned a different identity than the previously stored one.\n\n"+
+ "This is always a problem with the provider and should be reported to the provider developer.\n\n"+
+ "Prior Identity: %s\n\nPlanned Identity: %s",
+ priorIdentityVal.GoString(),
+ plannedIdentityVal.GoString(),
+ ))
+
+ return resp, nil
+ }
+
+ plannedIdentityMP, err := msgpack.Marshal(plannedIdentityVal, identityBlock.ImpliedType())
+ if err != nil {
+ resp.Diagnostics = convert.AppendProtoDiag(ctx, resp.Diagnostics, err)
+ return resp, nil
+ }
+
+ resp.PlannedIdentity = &tfprotov5.ResourceIdentityData{
+ IdentityData: &tfprotov5.DynamicValue{
+ MsgPack: plannedIdentityMP,
+ },
+ }
+ }
+
return resp, nil
}
@@ -1049,6 +1367,8 @@ func (s *GRPCProviderServer) ApplyResourceChange(ctx context.Context, req *tfpro
return resp, nil
}
+ create := priorStateVal.IsNull()
+
plannedStateVal, err := msgpack.Unmarshal(req.PlannedState.MsgPack, schemaBlock.ImpliedType())
if err != nil {
resp.Diagnostics = convert.AppendProtoDiag(ctx, resp.Diagnostics, err)
@@ -1075,6 +1395,28 @@ func (s *GRPCProviderServer) ApplyResourceChange(ctx context.Context, req *tfpro
}
}
+ var plannedIdentityVal cty.Value
+ // add identity data to priorState
+ if req.PlannedIdentity != nil && req.PlannedIdentity.IdentityData != nil {
+ // convert req.PriorIdentity to flat map identity structure
+ // Step 1: Turn JSON into cty.Value based on schema
+ identityBlock, err := s.getResourceIdentitySchemaBlock(req.TypeName)
+ if err != nil {
+ resp.Diagnostics = convert.AppendProtoDiag(ctx, resp.Diagnostics, fmt.Errorf("getting identity schema failed for resource '%s': %w", req.TypeName, err))
+ return resp, nil
+ }
+
+ plannedIdentityVal, err = msgpack.Unmarshal(req.PlannedIdentity.IdentityData.MsgPack, identityBlock.ImpliedType())
+ if err != nil {
+ resp.Diagnostics = convert.AppendProtoDiag(ctx, resp.Diagnostics, err)
+ return resp, nil
+ }
+ // Step 2: Turn cty.Value into flatmap representation
+ identityAttrs := hcl2shim.FlatmapValueFromHCL2(plannedIdentityVal)
+ // Step 3: Well, set it in the priorState
+ priorState.Identity = identityAttrs
+ }
+
var diff *terraform.InstanceDiff
destroy := false
@@ -1088,6 +1430,7 @@ func (s *GRPCProviderServer) ApplyResourceChange(ctx context.Context, req *tfpro
RawPlan: plannedStateVal,
RawState: priorStateVal,
RawConfig: configVal,
+ Identity: priorState.Identity,
}
} else {
diff, err = DiffFromValues(ctx, priorStateVal, plannedStateVal, configVal, stripResourceModifiers(res))
@@ -1104,7 +1447,10 @@ func (s *GRPCProviderServer) ApplyResourceChange(ctx context.Context, req *tfpro
RawPlan: plannedStateVal,
RawState: priorStateVal,
RawConfig: configVal,
+ Identity: priorState.Identity,
}
+ } else {
+ diff.Identity = priorState.Identity
}
// add NewExtra Fields that may have been stored in the private data
@@ -1182,6 +1528,8 @@ func (s *GRPCProviderServer) ApplyResourceChange(ctx context.Context, req *tfpro
newStateVal = copyTimeoutValues(newStateVal, plannedStateVal)
+ newStateVal = setWriteOnlyNullValues(newStateVal, schemaBlock)
+
newStateMP, err := msgpack.Marshal(newStateVal, schemaBlock.ImpliedType())
if err != nil {
resp.Diagnostics = convert.AppendProtoDiag(ctx, resp.Diagnostics, err)
@@ -1198,6 +1546,58 @@ func (s *GRPCProviderServer) ApplyResourceChange(ctx context.Context, req *tfpro
}
resp.Private = meta
+ if res.Identity != nil {
+ identityBlock, err := s.getResourceIdentitySchemaBlock(req.TypeName)
+ if err != nil {
+ resp.Diagnostics = convert.AppendProtoDiag(ctx, resp.Diagnostics, fmt.Errorf("getting identity schema failed for resource '%s': %w", req.TypeName, err))
+ return resp, nil
+ }
+
+ newIdentityVal, err := hcl2shim.HCL2ValueFromFlatmap(newInstanceState.Identity, identityBlock.ImpliedType())
+ if err != nil {
+ resp.Diagnostics = convert.AppendProtoDiag(ctx, resp.Diagnostics, err)
+ return resp, nil
+ }
+
+ if isCtyObjectNullOrEmpty(newIdentityVal) {
+ op := "Create"
+ if !create {
+ op = "Update"
+ }
+
+ resp.Diagnostics = convert.AppendProtoDiag(ctx, resp.Diagnostics, fmt.Errorf(
+ "Missing Resource Identity After %s: The Terraform provider unexpectedly returned no resource identity after having no errors in the resource %s. "+
+ "This is always a problem with the provider and should be reported to the provider developer", op, strings.ToLower(op),
+ ))
+
+ return resp, nil
+ }
+
+ if !res.ResourceBehavior.MutableIdentity && !create && !isCtyObjectNullOrEmpty(plannedIdentityVal) && !plannedIdentityVal.RawEquals(newIdentityVal) {
+ resp.Diagnostics = convert.AppendProtoDiag(ctx, resp.Diagnostics, fmt.Errorf(
+ "Unexpected Identity Change: During the update operation, the Terraform Provider unexpectedly returned a different identity than the previously stored one.\n\n"+
+ "This is always a problem with the provider and should be reported to the provider developer.\n\n"+
+ "Planned Identity: %s\n\nNew Identity: %s",
+ plannedIdentityVal.GoString(),
+ newIdentityVal.GoString(),
+ ))
+
+ return resp, nil
+ }
+
+ newIdentityMP, err := msgpack.Marshal(newIdentityVal, identityBlock.ImpliedType())
+ if err != nil {
+ resp.Diagnostics = convert.AppendProtoDiag(ctx, resp.Diagnostics, err)
+ return resp, nil
+ }
+
+ resp.NewIdentity = &tfprotov5.ResourceIdentityData{
+ IdentityData: &tfprotov5.DynamicValue{
+ MsgPack: newIdentityMP,
+ },
+ }
+ }
+
// This is a signal to Terraform Core that we're doing the best we can to
// shim the legacy type system of the SDK onto the Terraform type system
// but we need it to cut us some slack. This setting should not be taken
@@ -1262,7 +1662,27 @@ func (s *GRPCProviderServer) ImportResourceState(ctx context.Context, req *tfpro
return resp, nil
}
- newInstanceStates, err := s.provider.ImportState(ctx, info, req.ID)
+ var identity map[string]string
+ // parse identity data if available
+ if req.Identity != nil && req.Identity.IdentityData != nil {
+ // convert req.Identity to flat map identity structure
+ // Step 1: Turn JSON into cty.Value based on schema
+ identityBlock, err := s.getResourceIdentitySchemaBlock(req.TypeName)
+ if err != nil {
+ resp.Diagnostics = convert.AppendProtoDiag(ctx, resp.Diagnostics, fmt.Errorf("getting identity schema failed for resource '%s': %w", req.TypeName, err))
+ return resp, nil
+ }
+
+ identityVal, err := msgpack.Unmarshal(req.Identity.IdentityData.MsgPack, identityBlock.ImpliedType())
+ if err != nil {
+ resp.Diagnostics = convert.AppendProtoDiag(ctx, resp.Diagnostics, err)
+ return resp, nil
+ }
+ // Step 2: Turn cty.Value into flatmap representation
+ identity = hcl2shim.FlatmapValueFromHCL2(identityVal)
+ }
+
+ newInstanceStates, err := s.provider.ImportStateWithIdentity(ctx, info, req.ID, identity)
if err != nil {
resp.Diagnostics = convert.AppendProtoDiag(ctx, resp.Diagnostics, err)
return resp, nil
@@ -1303,24 +1723,59 @@ func (s *GRPCProviderServer) ImportResourceState(ctx context.Context, req *tfpro
newStateVal = cty.ObjectVal(newStateValueMap)
}
+ // Set any write-only attribute values to null
+ newStateVal = setWriteOnlyNullValues(newStateVal, schemaBlock)
+
newStateMP, err := msgpack.Marshal(newStateVal, schemaBlock.ImpliedType())
if err != nil {
resp.Diagnostics = convert.AppendProtoDiag(ctx, resp.Diagnostics, err)
return resp, nil
}
+ // Set an internal private field that will get sent alongside the imported resource. This will be cleared by
+ // the following ReadResource RPC and is primarily used to control validation of resource identities during refresh.
+ is.Meta[terraform.ImportBeforeReadMetaKey] = true
+
meta, err := json.Marshal(is.Meta)
if err != nil {
resp.Diagnostics = convert.AppendProtoDiag(ctx, resp.Diagnostics, err)
return resp, nil
}
+ var identityData *tfprotov5.ResourceIdentityData
+ if is.Identity != nil {
+ identityBlock, err := s.getResourceIdentitySchemaBlock(resourceType)
+ if err != nil {
+ resp.Diagnostics = convert.AppendProtoDiag(ctx, resp.Diagnostics, fmt.Errorf("getting identity schema failed for resource '%s': %w", req.TypeName, err))
+ return resp, nil
+ }
+
+ newIdentityVal, err := hcl2shim.HCL2ValueFromFlatmap(is.Identity, identityBlock.ImpliedType())
+ if err != nil {
+ resp.Diagnostics = convert.AppendProtoDiag(ctx, resp.Diagnostics, err)
+ return resp, nil
+ }
+
+ newIdentityMP, err := msgpack.Marshal(newIdentityVal, identityBlock.ImpliedType())
+ if err != nil {
+ resp.Diagnostics = convert.AppendProtoDiag(ctx, resp.Diagnostics, err)
+ return resp, nil
+ }
+
+ identityData = &tfprotov5.ResourceIdentityData{
+ IdentityData: &tfprotov5.DynamicValue{
+ MsgPack: newIdentityMP,
+ },
+ }
+ }
+
importedResource := &tfprotov5.ImportedResource{
TypeName: resourceType,
State: &tfprotov5.DynamicValue{
MsgPack: newStateMP,
},
- Private: meta,
+ Private: meta,
+ Identity: identityData,
}
resp.ImportedResources = append(resp.ImportedResources, importedResource)
@@ -1482,6 +1937,182 @@ func (s *GRPCProviderServer) GetFunctions(ctx context.Context, req *tfprotov5.Ge
return resp, nil
}
+func (s *GRPCProviderServer) ValidateEphemeralResourceConfig(ctx context.Context, req *tfprotov5.ValidateEphemeralResourceConfigRequest) (*tfprotov5.ValidateEphemeralResourceConfigResponse, error) {
+ ctx = logging.InitContext(ctx)
+
+ logging.HelperSchemaTrace(ctx, "Returning error for ephemeral resource validate")
+
+ resp := &tfprotov5.ValidateEphemeralResourceConfigResponse{
+ Diagnostics: []*tfprotov5.Diagnostic{
+ {
+ Severity: tfprotov5.DiagnosticSeverityError,
+ Summary: "Unknown Ephemeral Resource Type",
+ Detail: fmt.Sprintf("The %q ephemeral resource type is not supported by this provider.", req.TypeName),
+ },
+ },
+ }
+
+ return resp, nil
+}
+
+func (s *GRPCProviderServer) OpenEphemeralResource(ctx context.Context, req *tfprotov5.OpenEphemeralResourceRequest) (*tfprotov5.OpenEphemeralResourceResponse, error) {
+ ctx = logging.InitContext(ctx)
+
+ logging.HelperSchemaTrace(ctx, "Returning error for ephemeral resource open")
+
+ resp := &tfprotov5.OpenEphemeralResourceResponse{
+ Diagnostics: []*tfprotov5.Diagnostic{
+ {
+ Severity: tfprotov5.DiagnosticSeverityError,
+ Summary: "Unknown Ephemeral Resource Type",
+ Detail: fmt.Sprintf("The %q ephemeral resource type is not supported by this provider.", req.TypeName),
+ },
+ },
+ }
+
+ return resp, nil
+}
+
+func (s *GRPCProviderServer) RenewEphemeralResource(ctx context.Context, req *tfprotov5.RenewEphemeralResourceRequest) (*tfprotov5.RenewEphemeralResourceResponse, error) {
+ ctx = logging.InitContext(ctx)
+
+ logging.HelperSchemaTrace(ctx, "Returning error for ephemeral resource renew")
+
+ resp := &tfprotov5.RenewEphemeralResourceResponse{
+ Diagnostics: []*tfprotov5.Diagnostic{
+ {
+ Severity: tfprotov5.DiagnosticSeverityError,
+ Summary: "Unknown Ephemeral Resource Type",
+ Detail: fmt.Sprintf("The %q ephemeral resource type is not supported by this provider.", req.TypeName),
+ },
+ },
+ }
+
+ return resp, nil
+}
+
+func (s *GRPCProviderServer) CloseEphemeralResource(ctx context.Context, req *tfprotov5.CloseEphemeralResourceRequest) (*tfprotov5.CloseEphemeralResourceResponse, error) {
+ ctx = logging.InitContext(ctx)
+
+ logging.HelperSchemaTrace(ctx, "Returning error for ephemeral resource close")
+
+ resp := &tfprotov5.CloseEphemeralResourceResponse{
+ Diagnostics: []*tfprotov5.Diagnostic{
+ {
+ Severity: tfprotov5.DiagnosticSeverityError,
+ Summary: "Unknown Ephemeral Resource Type",
+ Detail: fmt.Sprintf("The %q ephemeral resource type is not supported by this provider.", req.TypeName),
+ },
+ },
+ }
+
+ return resp, nil
+}
+
+func (s *GRPCProviderServer) ValidateListResourceConfig(ctx context.Context, req *tfprotov5.ValidateListResourceConfigRequest) (*tfprotov5.ValidateListResourceConfigResponse, error) {
+ ctx = logging.InitContext(ctx)
+
+ logging.HelperSchemaTrace(ctx, "Returning error for list resource validate")
+
+ resp := &tfprotov5.ValidateListResourceConfigResponse{
+ Diagnostics: []*tfprotov5.Diagnostic{
+ {
+ Severity: tfprotov5.DiagnosticSeverityError,
+ Summary: "Unknown List Resource Type",
+ Detail: fmt.Sprintf("The %q list resource type is not supported by this provider.", req.TypeName),
+ },
+ },
+ }
+
+ return resp, nil
+}
+
+func (s *GRPCProviderServer) ListResource(ctx context.Context, req *tfprotov5.ListResourceRequest) (*tfprotov5.ListResourceServerStream, error) {
+ ctx = logging.InitContext(ctx)
+
+ logging.HelperSchemaTrace(ctx, "Returning error for list resource list")
+
+ result := make([]tfprotov5.ListResourceResult, 0)
+
+ result = append(result, tfprotov5.ListResourceResult{
+ Diagnostics: []*tfprotov5.Diagnostic{
+ {
+ Severity: tfprotov5.DiagnosticSeverityError,
+ Summary: "Unknown List Resource Type",
+ Detail: fmt.Sprintf("The %q list resource type is not supported by this provider.", req.TypeName),
+ },
+ },
+ })
+
+ resp := &tfprotov5.ListResourceServerStream{
+ Results: slices.Values(result),
+ }
+
+ return resp, nil
+}
+
+func (s *GRPCProviderServer) ValidateActionConfig(ctx context.Context, req *tfprotov5.ValidateActionConfigRequest) (*tfprotov5.ValidateActionConfigResponse, error) {
+ ctx = logging.InitContext(ctx)
+
+ logging.HelperSchemaTrace(ctx, "Returning error for action type validate")
+
+ resp := &tfprotov5.ValidateActionConfigResponse{
+ Diagnostics: []*tfprotov5.Diagnostic{
+ {
+ Severity: tfprotov5.DiagnosticSeverityError,
+ Summary: "Unknown Action Type",
+ Detail: fmt.Sprintf("The %q action type is not supported by this provider.", req.ActionType),
+ },
+ },
+ }
+
+ return resp, nil
+}
+
+func (s *GRPCProviderServer) PlanAction(ctx context.Context, req *tfprotov5.PlanActionRequest) (*tfprotov5.PlanActionResponse, error) {
+ ctx = logging.InitContext(ctx)
+
+ logging.HelperSchemaTrace(ctx, "Returning error for action type plan")
+
+ resp := &tfprotov5.PlanActionResponse{
+ Diagnostics: []*tfprotov5.Diagnostic{
+ {
+ Severity: tfprotov5.DiagnosticSeverityError,
+ Summary: "Unknown Action Type",
+ Detail: fmt.Sprintf("The %q action type is not supported by this provider.", req.ActionType),
+ },
+ },
+ }
+
+ return resp, nil
+}
+
+func (s *GRPCProviderServer) InvokeAction(ctx context.Context, req *tfprotov5.InvokeActionRequest) (*tfprotov5.InvokeActionServerStream, error) {
+ ctx = logging.InitContext(ctx)
+
+ logging.HelperSchemaTrace(ctx, "Returning error for action invoke")
+
+ event := make([]tfprotov5.InvokeActionEvent, 0)
+
+ event = append(event, tfprotov5.InvokeActionEvent{
+ Type: tfprotov5.CompletedInvokeActionEventType{
+ Diagnostics: []*tfprotov5.Diagnostic{
+ {
+ Severity: tfprotov5.DiagnosticSeverityError,
+ Summary: "Unknown Action Type",
+ Detail: fmt.Sprintf("The %q action type is not supported by this provider.", req.ActionType),
+ },
+ },
+ },
+ })
+
+ resp := &tfprotov5.InvokeActionServerStream{
+ Events: slices.Values(event),
+ }
+
+ return resp, nil
+}
+
func pathToAttributePath(path cty.Path) *tftypes.AttributePath {
var steps []tftypes.AttributePathStep
@@ -1593,7 +2224,7 @@ func stripSchema(s *Schema) *Schema {
}
// Zero values and empty containers may be interchanged by the apply process.
-// When there is a discrepency between src and dst value being null or empty,
+// When there is a discrepancy between src and dst value being null or empty,
// prefer the src value. This takes a little more liberty with set types, since
// we can't correlate modified set values. In the case of sets, if the src set
// was wholly known we assume the value was correctly applied and copy that
@@ -1828,3 +2459,37 @@ func configureDeferralAllowed(in *tfprotov5.ConfigureProviderClientCapabilities)
return in.DeferralAllowed
}
+
+// Resource Identity version of upgradeJSONState
+func (s *GRPCProviderServer) upgradeJSONIdentity(ctx context.Context, version int64, m map[string]interface{}, res *Resource) (map[string]interface{}, error) {
+ var err error
+
+ for _, upgrader := range res.Identity.IdentityUpgraders {
+ if version != upgrader.Version {
+ continue
+ }
+
+ m, err = upgrader.Upgrade(ctx, m, s.provider.Meta())
+ if err != nil {
+ return nil, err
+ }
+ version++
+ }
+
+ return m, nil
+}
+
+// isCtyObjectNullOrEmpty is a helper function that checks if a given cty object is null or if all it's immediate children are null (empty)
+func isCtyObjectNullOrEmpty(val cty.Value) bool {
+ if val.IsNull() {
+ return true
+ }
+
+ for _, v := range val.AsValueMap() {
+ if !v.IsNull() {
+ return false
+ }
+ }
+
+ return true
+}
diff --git a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/identity_data.go b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/identity_data.go
new file mode 100644
index 0000000000..7107de1cf3
--- /dev/null
+++ b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/identity_data.go
@@ -0,0 +1,142 @@
+// Copyright (c) HashiCorp, Inc.
+// SPDX-License-Identifier: MPL-2.0
+
+package schema
+
+import (
+ "log"
+ "reflect"
+ "strings"
+ "sync"
+)
+
+type IdentityData struct {
+ // raw identity data will be stored internally
+ raw map[string]string
+ schema map[string]*Schema
+
+ // Don't set
+ once sync.Once
+ multiReader *MultiLevelFieldReader
+ setWriter *MapFieldWriter
+
+ panicOnError bool
+}
+
+// Reading/writing data will be similar to the *schema.ResourceData flatmap
+func (d *IdentityData) Get(key string) interface{} {
+ v, _ := d.GetOk(key)
+ return v
+}
+
+func (d *IdentityData) GetOk(key string) (interface{}, bool) {
+ r := d.getRaw(key)
+ exists := r.Exists
+ if exists {
+ // If it exists, we also want to verify it is not the zero-value.
+ value := r.Value
+ zero := r.Schema.Type.Zero()
+
+ if eq, ok := value.(Equal); ok {
+ exists = !eq.Equal(zero)
+ } else {
+ exists = !reflect.DeepEqual(value, zero)
+ }
+ }
+
+ return r.Value, exists
+}
+
+func (d *IdentityData) Set(key string, value interface{}) error {
+ d.once.Do(d.init)
+
+ // If the value is a pointer to a non-struct, get its value and
+ // use that. This allows Set to take a pointer to primitives to
+ // simplify the interface.
+ reflectVal := reflect.ValueOf(value)
+ if reflectVal.Kind() == reflect.Ptr {
+ if reflectVal.IsNil() {
+ // If the pointer is nil, then the value is just nil
+ value = nil
+ } else {
+ // Otherwise, we dereference the pointer as long as its not
+ // a pointer to a struct, since struct pointers are allowed.
+ reflectVal = reflect.Indirect(reflectVal)
+ if reflectVal.Kind() != reflect.Struct {
+ value = reflectVal.Interface()
+ }
+ }
+ }
+
+ err := d.setWriter.WriteField(strings.Split(key, "."), value)
+ if err != nil {
+ if d.panicOnError {
+ panic(err)
+ } else {
+ log.Printf("[ERROR] setting identity state: %s", err)
+ }
+ }
+ return err
+}
+
+func (d *IdentityData) init() {
+ // Initialize the map for storing data set by the user
+ d.setWriter = &MapFieldWriter{Schema: d.schema}
+
+ // Initialize the reader for getting data from the
+ // underlying sources (config, diff, etc.)
+ readers := make(map[string]FieldReader)
+ if d.raw != nil {
+ readers["raw"] = &MapFieldReader{
+ Schema: d.schema,
+ Map: BasicMapReader(d.raw),
+ }
+ }
+ readers["set"] = &MapFieldReader{
+ Schema: d.schema,
+ Map: BasicMapReader(d.setWriter.Map()),
+ }
+ d.multiReader = &MultiLevelFieldReader{
+ Levels: []string{"raw", "set"},
+ Readers: readers,
+ }
+}
+
+func (d *IdentityData) getRaw(key string) getResult {
+ var parts []string
+ if key != "" {
+ parts = strings.Split(key, ".")
+ }
+
+ return d.get(parts)
+}
+
+func (d *IdentityData) get(addr []string) getResult {
+ d.once.Do(d.init)
+
+ result, err := d.multiReader.ReadFieldMerge(addr, "set")
+
+ if err != nil {
+ panic(err)
+ }
+
+ // If the result doesn't exist, then we set the value to the zero value
+ var schema *Schema
+ if schemaL := addrToSchema(addr, d.schema); len(schemaL) > 0 {
+ schema = schemaL[len(schemaL)-1]
+ }
+
+ if result.Value == nil && schema != nil {
+ result.Value = result.ValueOrZero(schema)
+ }
+
+ // Transform the FieldReadResult into a getResult. It might be worth
+ // merging these two structures one day.
+ return getResult{
+ Value: result.Value,
+ ValueProcessed: result.ValueProcessed,
+ Computed: result.Computed,
+ Exists: result.Exists,
+ Schema: schema,
+ }
+}
diff --git a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/provider.go b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/provider.go
index a75ae2fc28..28c39bb049 100644
--- a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/provider.go
+++ b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/provider.go
@@ -13,6 +13,7 @@ import (
"strings"
"github.com/hashicorp/terraform-plugin-go/tfprotov5"
+
"github.com/hashicorp/terraform-plugin-sdk/v2/diag"
"github.com/hashicorp/terraform-plugin-sdk/v2/internal/configs/configschema"
"github.com/hashicorp/terraform-plugin-sdk/v2/internal/logging"
@@ -192,11 +193,23 @@ func (p *Provider) InternalValidate() error {
}
var validationErrors []error
+
+ // Provider schema validation
sm := schemaMap(p.Schema)
if err := sm.InternalValidate(sm); err != nil {
validationErrors = append(validationErrors, err)
}
+ if sm.hasWriteOnly() {
+ validationErrors = append(validationErrors, fmt.Errorf("provider schema cannot contain write-only attributes"))
+ }
+
+ // Provider meta schema validation
+ providerMeta := schemaMap(p.ProviderMetaSchema)
+ if providerMeta.hasWriteOnly() {
+ validationErrors = append(validationErrors, fmt.Errorf("provider meta schema cannot contain write-only attributes"))
+ }
+
// Provider-specific checks
for k := range sm {
if isReservedProviderFieldName(k) {
@@ -205,6 +218,11 @@ func (p *Provider) InternalValidate() error {
}
for k, r := range p.ResourcesMap {
+ if r.Identity != nil {
+ if err := r.Identity.InternalIdentityValidate(); err != nil {
+ validationErrors = append(validationErrors, fmt.Errorf("resource %s identity: %s", k, err))
+ }
+ }
if err := r.InternalValidate(nil, true); err != nil {
validationErrors = append(validationErrors, fmt.Errorf("resource %s: %s", k, err))
}
@@ -214,6 +232,15 @@ func (p *Provider) InternalValidate() error {
if err := r.InternalValidate(nil, false); err != nil {
validationErrors = append(validationErrors, fmt.Errorf("data source %s: %s", k, err))
}
+
+ if len(r.ValidateRawResourceConfigFuncs) > 0 {
+ validationErrors = append(validationErrors, fmt.Errorf("data source %s cannot contain ValidateRawResourceConfigFuncs", k))
+ }
+
+ dataSourceSchema := schemaMap(r.SchemaMap())
+ if dataSourceSchema.hasWriteOnly() {
+ validationErrors = append(validationErrors, fmt.Errorf("data source %s cannot contain write-only attributes", k))
+ }
}
return errors.Join(validationErrors...)
@@ -449,6 +476,14 @@ func (p *Provider) ImportState(
ctx context.Context,
info *terraform.InstanceInfo,
id string) ([]*terraform.InstanceState, error) {
+ return p.ImportStateWithIdentity(ctx, info, id, nil)
+}
+
+func (p *Provider) ImportStateWithIdentity(
+ ctx context.Context,
+ info *terraform.InstanceInfo,
+ id string,
+ identity map[string]string) ([]*terraform.InstanceState, error) {
// Find the resource
r, ok := p.ResourcesMap[info.Type]
if !ok {
@@ -465,6 +500,16 @@ func (p *Provider) ImportState(
data.SetId(id)
data.SetType(info.Type)
+ if data.identitySchema != nil {
+ identityData, err := data.Identity()
+ if err != nil {
+ return nil, err // this should not happen, as we checked above
+ }
+ identityData.raw = identity
+ } else if identity != nil {
+ return nil, fmt.Errorf("resource %s doesn't support identity import", info.Type)
+ }
+
// Call the import function
results := []*ResourceData{data}
if r.Importer.State != nil || r.Importer.StateContext != nil {
diff --git a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/resource.go b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/resource.go
index 1c944c9b48..8314043680 100644
--- a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/resource.go
+++ b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/resource.go
@@ -89,6 +89,12 @@ type Resource struct {
// their Versioning at any integer >= 1
SchemaVersion int
+ // Identity is a nested structure containing information about the structure
+ // and type of this resource's identity. This field is only valid when the
+ // Resource is a managed resource.
+ // This field, is optional.
+ Identity *ResourceIdentity
+
// MigrateState is responsible for updating an InstanceState with an old
// version to the format expected by the current version of the Schema.
// This field is only valid when the Resource is a managed resource.
@@ -189,7 +195,7 @@ type Resource struct {
// This implementation is optional. If omitted, all Schema must enable
// the ForceNew field and any practitioner changes that would have
// caused and update will instead destroy and recreate the infrastructure
- // compontent.
+ // component.
//
// The *ResourceData parameter contains the plan and state data for this
// managed resource instance. The available data in the Get* methods is the
@@ -321,7 +327,7 @@ type Resource struct {
// This implementation is optional. If omitted, all Schema must enable
// the ForceNew field and any practitioner changes that would have
// caused and update will instead destroy and recreate the infrastructure
- // compontent.
+ // component.
//
// The Context parameter stores SDK information, such as loggers and
// timeout deadlines. It also is wired to receive any cancellation from
@@ -460,7 +466,7 @@ type Resource struct {
// This implementation is optional. If omitted, all Schema must enable
// the ForceNew field and any practitioner changes that would have
// caused and update will instead destroy and recreate the infrastructure
- // compontent.
+ // component.
//
// The Context parameter stores SDK information, such as loggers. It also
// is wired to receive any cancellation from Terraform such as a system or
@@ -644,6 +650,19 @@ type Resource struct {
// ResourceBehavior is used to control SDK-specific logic when
// interacting with this resource.
ResourceBehavior ResourceBehavior
+
+ // ValidateRawResourceConfigFuncs allows functions to define arbitrary validation
+ // logic during the ValidateResourceTypeConfig RPC. ValidateRawResourceConfigFunc receives
+ // the client capabilities from the ValidateResourceTypeConfig RPC and the raw cty
+ // config value for the entire resource before it is shimmed, and it can return error
+ // diagnostics based on the inspection of those values.
+ //
+ // ValidateRawResourceConfigFuncs is only valid for Managed Resource types and will not be
+ // called for Data Resource or Provider types.
+ //
+ // Developers should prefer other validation methods first as this validation function
+ // deals with raw cty values.
+ ValidateRawResourceConfigFuncs []ValidateRawResourceConfigFunc
}
// ResourceBehavior controls SDK-specific logic when interacting
@@ -655,6 +674,11 @@ type ResourceBehavior struct {
// NOTE: This functionality is related to deferred action support, which is currently experimental and is subject
// to change or break without warning. It is not protected by version compatibility guarantees.
ProviderDeferred ProviderDeferredBehavior
+
+ // MutableIdentity indicates that the managed resource supports an identity that can change during the
+ // resource's lifecycle. Setting this flag to true will disable the SDK validation that ensures identity
+ // data doesn't change during RPC calls.
+ MutableIdentity bool
}
// ProviderDeferredBehavior enables provider-defined logic to be executed
@@ -664,12 +688,31 @@ type ResourceBehavior struct {
// to change or break without warning. It is not protected by version compatibility guarantees.
type ProviderDeferredBehavior struct {
// When EnablePlanModification is true, the SDK will execute provider-defined logic
- // during plan (CustomizeDiff, Default, DiffSupressFunc, etc.) if ConfigureProvider
+ // during plan (CustomizeDiff, Default, DiffSuppressFunc, etc.) if ConfigureProvider
// returns a deferred response. The SDK will then automatically return a deferred response
// along with the modified plan.
EnablePlanModification bool
}
+// ValidateRawResourceConfigFunc is a function used to validate the raw resource config
+// and has Diagnostic support. it is only valid for Managed Resource types and will not be
+// called for Data Resource or Block types.
+type ValidateRawResourceConfigFunc func(context.Context, ValidateResourceConfigFuncRequest, *ValidateResourceConfigFuncResponse)
+
+type ValidateResourceConfigFuncRequest struct {
+ // WriteOnlyAttributesAllowed indicates that the Terraform client
+ // initiating the request supports write-only attributes for managed
+ // resources.
+ WriteOnlyAttributesAllowed bool
+
+ // The raw config value provided by Terraform core
+ RawConfig cty.Value
+}
+
+type ValidateResourceConfigFuncResponse struct {
+ Diagnostics diag.Diagnostics
+}
+
// SchemaMap returns the schema information for this Resource whether it is
// defined via the SchemaFunc field or Schema field. The SchemaFunc field, if
// defined, takes precedence over the Schema field.
@@ -690,7 +733,7 @@ func (r *Resource) ShimInstanceStateFromValue(state cty.Value) (*terraform.Insta
// We now rebuild the state through the ResourceData, so that the set indexes
// match what helper/schema expects.
- data, err := schemaMap(r.SchemaMap()).Data(s, nil)
+ data, err := schemaMapWithIdentity{r.SchemaMap(), r.Identity.SchemaMap()}.Data(s, nil)
if err != nil {
return nil, err
}
@@ -748,7 +791,7 @@ type StateUpgrader struct {
// Upgrade takes the JSON encoded state and the provider meta value, and
// upgrades the state one single schema version. The provided state is
- // deocded into the default json types using a map[string]interface{}. It
+ // decoded into the default json types using a map[string]interface{}. It
// is up to the StateUpgradeFunc to ensure that the returned value can be
// encoded using the new schema.
Upgrade StateUpgradeFunc
@@ -863,7 +906,7 @@ func (r *Resource) Apply(
s *terraform.InstanceState,
d *terraform.InstanceDiff,
meta interface{}) (*terraform.InstanceState, diag.Diagnostics) {
- schema := schemaMap(r.SchemaMap())
+ schema := schemaMapWithIdentity{r.SchemaMap(), r.Identity.SchemaMap()}
data, err := schema.Data(s, d)
if err != nil {
return s, diag.FromErr(err)
@@ -873,7 +916,7 @@ func (r *Resource) Apply(
data.providerMeta = s.ProviderMeta
}
- // Instance Diff shoould have the timeout info, need to copy it over to the
+ // Instance Diff should have the timeout info, need to copy it over to the
// ResourceData meta
rt := ResourceTimeout{}
if _, ok := d.Meta[TimeoutKey]; ok {
@@ -987,13 +1030,15 @@ func (r *Resource) SimpleDiff(
c *terraform.ResourceConfig,
meta interface{}) (*terraform.InstanceDiff, error) {
- instanceDiff, err := schemaMap(r.SchemaMap()).Diff(ctx, s, c, r.CustomizeDiff, meta, false)
+ // TODO: figure out if it makes sense to be able to set identity in CustomizeDiff at all
+ instanceDiff, err := schemaMapWithIdentity{r.SchemaMap(), r.Identity.SchemaMap()}.Diff(ctx, s, c, r.CustomizeDiff, meta, false)
if err != nil {
return instanceDiff, err
}
if instanceDiff == nil {
instanceDiff = terraform.NewInstanceDiff()
+ instanceDiff.Identity = s.Identity // if we create a new diff, we need to copy the identity
}
// Make sure the old value is set in each of the instance diffs.
@@ -1075,7 +1120,7 @@ func (r *Resource) RefreshWithoutUpgrade(
}
}
- schema := schemaMap(r.SchemaMap())
+ schema := schemaMapWithIdentity{r.SchemaMap(), r.Identity.SchemaMap()}
if r.Exists != nil {
// Make a copy of data so that if it is modified it doesn't
@@ -1176,7 +1221,7 @@ func (r *Resource) InternalValidate(topSchemaMap schemaMap, writable bool) error
if !r.updateFuncSet() {
nonForceNewAttrs := make([]string, 0)
for k, v := range schema {
- if !v.ForceNew && !v.Computed {
+ if !v.ForceNew && !v.Computed && !v.WriteOnly {
nonForceNewAttrs = append(nonForceNewAttrs, k)
}
}
@@ -1358,7 +1403,7 @@ func isReservedResourceFieldName(name string) bool {
//
// This function is useful for unit tests and ResourceImporter functions.
func (r *Resource) Data(s *terraform.InstanceState) *ResourceData {
- result, err := schemaMap(r.SchemaMap()).Data(s, nil)
+ result, err := schemaMapWithIdentity{r.SchemaMap(), r.Identity.SchemaMap()}.Data(s, nil)
if err != nil {
// At the time of writing, this isn't possible (Data never returns
// non-nil errors). We panic to find this in the future if we have to.
@@ -1385,7 +1430,8 @@ func (r *Resource) Data(s *terraform.InstanceState) *ResourceData {
// TODO: May be able to be removed with the above ResourceData function.
func (r *Resource) TestResourceData() *ResourceData {
return &ResourceData{
- schema: r.SchemaMap(),
+ schema: r.SchemaMap(),
+ identitySchema: r.Identity.SchemaMap(),
}
}
@@ -1425,3 +1471,135 @@ func RemoveFromState(d *ResourceData, _ interface{}) error {
d.SetId("")
return nil
}
+
+// Internal validation of provider implementation
+func (r *ResourceIdentity) InternalIdentityValidate() error {
+ if r == nil {
+ return fmt.Errorf(`The resource identity is empty`)
+ }
+
+ if len(r.SchemaMap()) == 0 {
+ return fmt.Errorf(`The resource identity schema is empty`)
+ }
+
+ for k, v := range r.SchemaMap() {
+ if !v.OptionalForImport && !v.RequiredForImport {
+ return fmt.Errorf(`OptionalForImport or RequiredForImport must be set for resource identity`)
+ }
+ if v.OptionalForImport && v.RequiredForImport {
+ return fmt.Errorf(`OptionalForImport or RequiredForImport must be set for resource identity, not both`)
+ }
+
+ if v.Type == TypeMap {
+ return fmt.Errorf(`TypeMap is not valid for resource identity`)
+ }
+ if v.Type == TypeSet {
+ return fmt.Errorf(`TypeSet is not valid for resource identity`)
+ }
+ if v.Type == typeObject {
+ return fmt.Errorf(`TypeObject is not valid for resource identity`)
+ }
+ if v.Type == TypeInvalid {
+ return fmt.Errorf(`TypeInvalid is not valid for resource identity`)
+ }
+
+ if v.Type == TypeList {
+ if v.Elem != nil {
+ if v.Elem == TypeMap {
+ return fmt.Errorf(`TypeMap is not valid for resource identity element type`)
+ }
+ if v.Elem == TypeSet {
+ return fmt.Errorf(`TypeSet is not valid for resource identity element type`)
+ }
+ if v.Elem == typeObject {
+ return fmt.Errorf(`TypeObject is not valid for resource identity element type`)
+ }
+ if v.Elem == TypeInvalid {
+ return fmt.Errorf(`TypeInvalid is not valid for resource identity element type`)
+ }
+ }
+ }
+
+ if v.ForceNew {
+ return fmt.Errorf(`ForceNew is not used in resource identity`)
+ }
+ if v.Required {
+ return fmt.Errorf(`Required is not used in resource identity`)
+ }
+ if v.Optional {
+ return fmt.Errorf(`Optional is not used in resource identity`)
+ }
+ if v.WriteOnly {
+ return fmt.Errorf(`WriteOnly is not used in resource identity`)
+ }
+ if v.Computed {
+ return fmt.Errorf(`Computed is not used in resource identity`)
+ }
+ if v.Sensitive {
+ return fmt.Errorf(`Sensitive is not used in resource identity`)
+ }
+ if v.DiffSuppressOnRefresh {
+ return fmt.Errorf(`DiffSuppressOnRefresh is not used in resource identity`)
+ }
+ if v.Deprecated != "" {
+ return fmt.Errorf(`Deprecated is not used in resource identity`)
+ }
+ if len(v.RequiredWith) > 0 {
+ return fmt.Errorf(`RequiredWith is not used in resource identity`)
+ }
+ if len(v.ComputedWhen) > 0 {
+ return fmt.Errorf(`ComputedWhen is not used in resource identity`)
+ }
+ if len(v.AtLeastOneOf) > 0 {
+ return fmt.Errorf("%s: AtLeastOneOf is for configurable attributes,"+
+ "there's nothing to configure for resource identity", k)
+ }
+ if len(v.ConflictsWith) > 0 {
+ return fmt.Errorf("%s: ConflictsWith is for configurable attributes,"+
+ "there's nothing to configure for resource identity", k)
+ }
+ if v.Default != nil {
+ return fmt.Errorf("%s: Default is for configurable attributes,"+
+ "there's nothing to configure for resource identity", k)
+ }
+ if v.DefaultFunc != nil {
+ return fmt.Errorf("%s: DefaultFunc is for configurable attributes,"+
+ "there's nothing to configure for resource identity", k)
+ }
+ if v.DiffSuppressFunc != nil {
+ return fmt.Errorf("%s: DiffSuppressFunc is for suppressing differences"+
+ " between config and state representation. "+
+ "There is no config for resource identity, nothing to compare.", k)
+ }
+ if len(v.ExactlyOneOf) > 0 {
+ return fmt.Errorf("%s: ExactlyOneOf is for configurable attributes,"+
+ "there's nothing to configure for resource identity", k)
+ }
+ if v.InputDefault != "" {
+ return fmt.Errorf("%s: InputDefault is for configurable attributes,"+
+ "there's nothing to configure for resource identity", k)
+ }
+ if v.MaxItems > 0 {
+ return fmt.Errorf("%s: MaxItems is for configurable attributes,"+
+ "there's nothing to configure for resource identity", k)
+ }
+ if v.MinItems > 0 {
+ return fmt.Errorf("%s: MinItems is for configurable attributes,"+
+ "there's nothing to configure for resource identity", k)
+ }
+ if v.StateFunc != nil {
+ return fmt.Errorf("%s: StateFunc is extraneous, "+
+ "value should just be changed before setting for resource identity", k)
+ }
+ if v.ValidateFunc != nil {
+ return fmt.Errorf("%s: ValidateFunc is for validating user input, "+
+ "there's nothing to validate for resource identity", k)
+ }
+ if v.ValidateDiagFunc != nil {
+ return fmt.Errorf("%s: ValidateDiagFunc is for validating user input, "+
+ "there's nothing to validate for resource identity", k)
+ }
+ }
+
+ return nil
+}
diff --git a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/resource_data.go b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/resource_data.go
index 4380db7e1a..7569b00293 100644
--- a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/resource_data.go
+++ b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/resource_data.go
@@ -4,6 +4,7 @@
package schema
import (
+ "fmt"
"log"
"reflect"
"strings"
@@ -13,6 +14,12 @@ import (
"github.com/google/go-cmp/cmp"
"github.com/hashicorp/go-cty/cty"
"github.com/hashicorp/go-cty/cty/gocty"
+
+ "github.com/hashicorp/terraform-plugin-go/tftypes"
+ "github.com/hashicorp/terraform-plugin-sdk/v2/diag"
+ "github.com/hashicorp/terraform-plugin-sdk/v2/internal/configs/configschema"
+ "github.com/hashicorp/terraform-plugin-sdk/v2/internal/configs/hcl2shim"
+ "github.com/hashicorp/terraform-plugin-sdk/v2/internal/plugin/convert"
"github.com/hashicorp/terraform-plugin-sdk/v2/terraform"
)
@@ -25,18 +32,20 @@ import (
// The most relevant methods to take a look at are Get and Set.
type ResourceData struct {
// Settable (internally)
- schema map[string]*Schema
- config *terraform.ResourceConfig
- state *terraform.InstanceState
- diff *terraform.InstanceDiff
- meta map[string]interface{}
- timeouts *ResourceTimeout
- providerMeta cty.Value
+ schema map[string]*Schema
+ identitySchema map[string]*Schema
+ config *terraform.ResourceConfig
+ state *terraform.InstanceState
+ diff *terraform.InstanceDiff
+ meta map[string]interface{}
+ timeouts *ResourceTimeout
+ providerMeta cty.Value
// Don't set
multiReader *MultiLevelFieldReader
setWriter *MapFieldWriter
newState *terraform.InstanceState
+ newIdentity *IdentityData
partial bool
once sync.Once
isNew bool
@@ -54,6 +63,105 @@ type getResult struct {
Schema *Schema
}
+// TfTypeIdentityState returns the identity data as a tftypes.Value.
+func (d *ResourceData) TfTypeIdentityState() (*tftypes.Value, error) {
+ s := schemaMap(d.identitySchema).CoreConfigSchema()
+
+ state := d.State()
+
+ if state == nil {
+ return nil, fmt.Errorf("state is nil, call SetId() on ResourceData first")
+ }
+
+ stateVal, err := hcl2shim.HCL2ValueFromFlatmap(state.Identity, s.ImpliedType())
+ if err != nil {
+ return nil, fmt.Errorf("converting identity flatmap to cty value: %+v", err)
+ }
+
+ return convert.ToTfValue(stateVal)
+}
+
+// TfTypeResourceState returns the resource data as a tftypes.Value.
+func (d *ResourceData) TfTypeResourceState() (*tftypes.Value, error) {
+ s := schemaMap(d.schema).CoreConfigSchema()
+
+ // The CoreConfigSchema method on schemaMaps doesn't automatically handle adding the id
+ // attribute or timeouts like the method on Resource does
+ if _, ok := s.Attributes["id"]; !ok {
+ s.Attributes["id"] = &configschema.Attribute{
+ Type: cty.String,
+ Optional: true,
+ Computed: true,
+ }
+ }
+
+ _, timeoutsAttr := s.Attributes[TimeoutsConfigKey]
+ _, timeoutsBlock := s.BlockTypes[TimeoutsConfigKey]
+
+ if d.timeouts != nil && !timeoutsAttr && !timeoutsBlock {
+ timeouts := configschema.Block{
+ Attributes: map[string]*configschema.Attribute{},
+ }
+
+ if d.timeouts.Create != nil {
+ timeouts.Attributes[TimeoutCreate] = &configschema.Attribute{
+ Type: cty.String,
+ Optional: true,
+ }
+ }
+
+ if d.timeouts.Read != nil {
+ timeouts.Attributes[TimeoutRead] = &configschema.Attribute{
+ Type: cty.String,
+ Optional: true,
+ }
+ }
+
+ if d.timeouts.Update != nil {
+ timeouts.Attributes[TimeoutUpdate] = &configschema.Attribute{
+ Type: cty.String,
+ Optional: true,
+ }
+ }
+
+ if d.timeouts.Delete != nil {
+ timeouts.Attributes[TimeoutDelete] = &configschema.Attribute{
+ Type: cty.String,
+ Optional: true,
+ }
+ }
+
+ if d.timeouts.Default != nil {
+ timeouts.Attributes[TimeoutDefault] = &configschema.Attribute{
+ Type: cty.String,
+ Optional: true,
+ }
+ }
+
+ if len(timeouts.Attributes) != 0 {
+ s.BlockTypes[TimeoutsConfigKey] = &configschema.NestedBlock{
+ Nesting: configschema.NestingSingle,
+ Block: timeouts,
+ }
+ }
+ }
+
+ state := d.State()
+ if state == nil {
+ return nil, fmt.Errorf("state is nil, call SetId() on ResourceData first")
+ }
+
+ // Although we handle adding/omitting timeouts to the schema depending on how it's been defined on the resource
+ // we don't process or convert the timeout values since they reside in Meta and aren't needed for the purposes
+ // of this function and in the context of a List.
+ stateVal, err := hcl2shim.HCL2ValueFromFlatmap(state.Attributes, s.ImpliedType())
+ if err != nil {
+ return nil, fmt.Errorf("converting resource state flatmap to cty value: %+v", err)
+ }
+
+ return convert.ToTfValue(stateVal)
+}
+
// Get returns the data for the given key, or nil if the key doesn't exist
// in the schema.
//
@@ -82,7 +190,7 @@ func (d *ResourceData) GetChange(key string) (interface{}, interface{}) {
// GetOk returns the data for the given key and whether or not the key
// has been set to a non-zero value at some point.
//
-// The first result will not necessarilly be nil if the value doesn't exist.
+// The first result will not necessarily be nil if the value doesn't exist.
// The second result should be checked to determine this information.
func (d *ResourceData) GetOk(key string) (interface{}, bool) {
r := d.getRaw(key, getSourceSet)
@@ -406,6 +514,36 @@ func (d *ResourceData) State() *terraform.InstanceState {
result.Tainted = d.state.Tainted
}
+ // If the ResourceData has an identitySchema:
+ // copy over identity data (by getting it so we also include changes)
+ // In order to build the final state attributes, we read the full
+ // attribute set as a map[string]interface{}, write it to a MapFieldWriter,
+ // and then use that map.
+ if d.identitySchema != nil {
+ rawMapIdentity := make(map[string]interface{})
+ identityData, err := d.Identity()
+ // This error shouldn't happen, as we check for the identity schema first
+ if err == nil {
+ for k := range d.identitySchema {
+ raw := identityData.get([]string{k})
+ if raw.Exists {
+ rawMapIdentity[k] = raw.Value
+ if raw.ValueProcessed != nil {
+ rawMapIdentity[k] = raw.ValueProcessed
+ }
+ }
+ }
+
+ mapWIdentity := &MapFieldWriter{Schema: d.identitySchema}
+ if err := mapWIdentity.WriteField(nil, rawMapIdentity); err != nil {
+ log.Printf("[ERR] Error writing identity fields: %s", err)
+ return nil
+ }
+
+ result.Identity = mapWIdentity.Map()
+ }
+ }
+
return &result
}
@@ -604,6 +742,67 @@ func (d *ResourceData) GetRawConfig() cty.Value {
return cty.NullVal(schemaMap(d.schema).CoreConfigSchema().ImpliedType())
}
+// GetRawConfigAt is a helper method for retrieving specific values
+// from the RawConfig returned from GetRawConfig. It returns the cty.Value
+// for a given cty.Path or an error diagnostic if the value at the given path does not exist.
+//
+// GetRawConfigAt is considered advanced functionality, and
+// familiarity with the Terraform protocol is suggested when using it.
+func (d *ResourceData) GetRawConfigAt(valPath cty.Path) (cty.Value, diag.Diagnostics) {
+ rawConfig := d.GetRawConfig()
+ configVal := cty.DynamicVal
+
+ if rawConfig.IsNull() {
+ return configVal, diag.Diagnostics{
+ {
+ Severity: diag.Error,
+ Summary: "Empty Raw Config",
+ Detail: "The Terraform Provider unexpectedly received an empty configuration. " +
+ "This is almost always an issue with the Terraform Plugin SDK used to create providers. " +
+ "Please report this to the provider developers. \n\n" +
+ "The RawConfig is empty.",
+ AttributePath: valPath,
+ },
+ }
+ }
+ err := cty.Walk(rawConfig, func(path cty.Path, value cty.Value) (bool, error) {
+ if path.Equals(valPath) {
+ configVal = value
+ return false, nil
+ }
+ return true, nil
+ })
+ if err != nil {
+ return configVal, diag.Diagnostics{
+ {
+ Severity: diag.Error,
+ Summary: "Invalid config path",
+ Detail: "The Terraform Provider unexpectedly provided a path that does not match the current schema. " +
+ "This can happen if the path does not correctly follow the schema in structure or types. " +
+ "Please report this to the provider developers. \n\n" +
+ fmt.Sprintf("Encountered error while retrieving config value %s", err.Error()),
+ AttributePath: valPath,
+ },
+ }
+ }
+
+ if configVal.RawEquals(cty.DynamicVal) {
+ return configVal, diag.Diagnostics{
+ {
+ Severity: diag.Error,
+ Summary: "Invalid config path",
+ Detail: "The Terraform Provider unexpectedly provided a path that does not match the current schema. " +
+ "This can happen if the path does not correctly follow the schema in structure or types. " +
+ "Please report this to the provider developers. \n\n" +
+ "Cannot find config value for given path.",
+ AttributePath: valPath,
+ },
+ }
+ }
+
+ return configVal, nil
+}
+
// GetRawState returns the cty.Value that Terraform sent the SDK for the state.
// If no value was sent, or if a null value was sent, the value will be a null
// value of the resource's type.
@@ -637,3 +836,32 @@ func (d *ResourceData) GetRawPlan() cty.Value {
}
return cty.NullVal(schemaMap(d.schema).CoreConfigSchema().ImpliedType())
}
+
+// IdentityData is only available for managed resources, data sources
+// will return an error. // TODO: return error in case of data sources
+func (d *ResourceData) Identity() (*IdentityData, error) {
+ // return memoized value if available
+ if d.newIdentity != nil {
+ return d.newIdentity, nil
+ }
+
+ if d.identitySchema == nil {
+ return nil, fmt.Errorf("Resource does not have Identity schema. Please set one in order to use Identity(). This is always a problem in the provider code.")
+ }
+
+ var identityData map[string]string
+ if d.state != nil && d.state.Identity != nil {
+ identityData = d.state.Identity
+ }
+ if d.diff != nil && d.diff.Identity != nil {
+ identityData = d.diff.Identity
+ }
+
+ d.newIdentity = &IdentityData{
+ schema: d.identitySchema,
+ raw: identityData,
+ panicOnError: d.panicOnError,
+ }
+
+ return d.newIdentity, nil
+}
diff --git a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/resource_diff.go b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/resource_diff.go
index 6af9490b9e..300c16de4b 100644
--- a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/resource_diff.go
+++ b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/resource_diff.go
@@ -11,6 +11,8 @@ import (
"sync"
"github.com/hashicorp/go-cty/cty"
+
+ "github.com/hashicorp/terraform-plugin-sdk/v2/diag"
"github.com/hashicorp/terraform-plugin-sdk/v2/terraform"
)
@@ -116,6 +118,9 @@ type ResourceDiff struct {
// The schema for the resource being worked on.
schema map[string]*Schema
+ // The identity schema for the resource being worked on.
+ identitySchema map[string]*Schema
+
// The current config for this resource.
config *terraform.ResourceConfig
@@ -143,15 +148,18 @@ type ResourceDiff struct {
// Tracks which keys were flagged as forceNew. These keys are not saved in
// newWriter, but we need to track them so that they can be re-diffed later.
forcedNewKeys map[string]bool
+
+ newIdentity *IdentityData
}
// newResourceDiff creates a new ResourceDiff instance.
-func newResourceDiff(schema map[string]*Schema, config *terraform.ResourceConfig, state *terraform.InstanceState, diff *terraform.InstanceDiff) *ResourceDiff {
+func newResourceDiff(schema schemaMapWithIdentity, config *terraform.ResourceConfig, state *terraform.InstanceState, diff *terraform.InstanceDiff) *ResourceDiff {
d := &ResourceDiff{
- config: config,
- state: state,
- diff: diff,
- schema: schema,
+ config: config,
+ state: state,
+ diff: diff,
+ schema: schema.schemaMap,
+ identitySchema: schema.identitySchema,
}
d.newWriter = &newValueWriter{
@@ -480,6 +488,67 @@ func (d *ResourceDiff) GetRawConfig() cty.Value {
return cty.NullVal(schemaMap(d.schema).CoreConfigSchema().ImpliedType())
}
+// GetRawConfigAt is a helper method for retrieving specific values
+// from the RawConfig returned from GetRawConfig. It returns the cty.Value
+// for a given cty.Path or an error diagnostic if the value at the given path does not exist.
+//
+// GetRawConfigAt is considered advanced functionality, and
+// familiarity with the Terraform protocol is suggested when using it.
+func (d *ResourceDiff) GetRawConfigAt(valPath cty.Path) (cty.Value, diag.Diagnostics) {
+ rawConfig := d.GetRawConfig()
+ configVal := cty.DynamicVal
+
+ if rawConfig.IsNull() {
+ return configVal, diag.Diagnostics{
+ {
+ Severity: diag.Error,
+ Summary: "Empty Raw Config",
+ Detail: "The Terraform Provider unexpectedly received an empty configuration. " +
+ "This is almost always an issue with the Terraform Plugin SDK used to create providers. " +
+ "Please report this to the provider developers. \n\n" +
+ "The RawConfig is empty.",
+ AttributePath: valPath,
+ },
+ }
+ }
+ err := cty.Walk(rawConfig, func(path cty.Path, value cty.Value) (bool, error) {
+ if path.Equals(valPath) {
+ configVal = value
+ return false, nil
+ }
+ return true, nil
+ })
+ if err != nil {
+ return configVal, diag.Diagnostics{
+ {
+ Severity: diag.Error,
+ Summary: "Invalid config path",
+ Detail: "The Terraform Provider unexpectedly provided a path that does not match the current schema. " +
+ "This can happen if the path does not correctly follow the schema in structure or types. " +
+ "Please report this to the provider developers. \n\n" +
+ fmt.Sprintf("Encountered error while retrieving config value %s", err.Error()),
+ AttributePath: valPath,
+ },
+ }
+ }
+
+ if configVal.RawEquals(cty.DynamicVal) {
+ return configVal, diag.Diagnostics{
+ {
+ Severity: diag.Error,
+ Summary: "Invalid config path",
+ Detail: "The Terraform Provider unexpectedly provided a path that does not match the current schema. " +
+ "This can happen if the path does not correctly follow the schema in structure or types. " +
+ "Please report this to the provider developers. \n\n" +
+ "Cannot find config value for given path.",
+ AttributePath: valPath,
+ },
+ }
+ }
+
+ return configVal, nil
+}
+
// GetRawState returns the cty.Value that Terraform sent the SDK for the state.
// If no value was sent, or if a null value was sent, the value will be a null
// value of the resource's type.
@@ -619,3 +688,22 @@ func (d *ResourceDiff) checkKey(key, caller string, nested bool) error {
}
return nil
}
+
+func (d *ResourceDiff) Identity() (*IdentityData, error) {
+ // return memoized value if available
+ if d.newIdentity != nil {
+ return d.newIdentity, nil
+ }
+
+ identity := map[string]string{}
+ if d.state != nil && d.state.Identity != nil {
+ identity = d.state.Identity
+ }
+
+ d.newIdentity = &IdentityData{
+ schema: d.identitySchema,
+ raw: identity,
+ }
+
+ return d.newIdentity, nil
+}
diff --git a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/resource_identity.go b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/resource_identity.go
new file mode 100644
index 0000000000..5609416c44
--- /dev/null
+++ b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/resource_identity.go
@@ -0,0 +1,89 @@
+// Copyright (c) HashiCorp, Inc.
+// SPDX-License-Identifier: MPL-2.0
+
+package schema
+
+import (
+ "context"
+
+ "github.com/hashicorp/terraform-plugin-go/tftypes"
+)
+
+// Implementation of a single identity schema version upgrade.
+type IdentityUpgrader struct {
+ // Version is the version schema that this Upgrader will handle, converting
+ // it to Version+1.
+ Version int64
+
+ // Type describes the schema that this function can upgrade. Type is
+ // required to decode the schema if the state was stored in a legacy
+ // flatmap format.
+ Type tftypes.Type
+
+ // Upgrade takes the JSON encoded state and the provider meta value, and
+ // upgrades the state one single schema version. The provided state is
+ // decoded into the default json types using a map[string]interface{}. It
+ // is up to the StateUpgradeFunc to ensure that the returned value can be
+ // encoded using the new schema.
+ Upgrade ResourceIdentityUpgradeFunc
+}
+
+type ResourceIdentity struct {
+ // Version is the identity schema version.
+ Version int64
+
+ // SchemaFunc is the function that returns the schema for the
+ // identity. Using a function for this field allows to prevent
+ // storing all identity schema information in memory for the
+ // lifecycle of a provider.
+ // The types of the schema values are restricted to the types:
+ // - TypeBool
+ // - TypeFloat
+ // - TypeInt
+ // - TypeString
+ // - TypeList (of any of the above types)
+ SchemaFunc func() map[string]*Schema
+
+ // New struct, will be similar to (Resource).StateUpgraders
+ IdentityUpgraders []IdentityUpgrader
+}
+
+// Function signature for an identity schema version upgrade handler.
+//
+// The Context parameter stores SDK information, such as loggers. It also
+// is wired to receive any cancellation from Terraform such as a system or
+// practitioner sending SIGINT (Ctrl-c).
+//
+// The map[string]interface{} parameter contains the previous identity schema
+// version data for a managed resource instance. The keys are top level attribute
+// names mapped to values that can be type asserted similar to
+// fetching values using the ResourceData Get* methods:
+//
+// - TypeBool: bool
+// - TypeFloat: float
+// - TypeInt: int
+// - TypeList: []interface{}
+// - TypeString: string
+//
+// In certain scenarios, the map may be nil, so checking for that condition
+// upfront is recommended to prevent potential panics.
+//
+// The interface{} parameter is the result of the Provider type
+// ConfigureFunc field execution. If the Provider does not define
+// a ConfigureFunc, this will be nil. This parameter is conventionally
+// used to store API clients and other provider instance specific data.
+//
+// The map[string]interface{} return parameter should contain the upgraded
+// identity schema version data for a managed resource instance. Values must
+// align to the typing mentioned above.
+type ResourceIdentityUpgradeFunc func(ctx context.Context, rawState map[string]interface{}, meta interface{}) (map[string]interface{}, error)
+
+// SchemaMap returns the schema information for this resource identity
+// defined via the SchemaFunc field.
+func (ri *ResourceIdentity) SchemaMap() map[string]*Schema {
+ if ri == nil || ri.SchemaFunc == nil {
+ return nil
+ }
+
+ return ri.SchemaFunc()
+}
diff --git a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/resource_importer.go b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/resource_importer.go
index ad9a5c3b9c..4dd691d226 100644
--- a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/resource_importer.go
+++ b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/resource_importer.go
@@ -6,6 +6,7 @@ package schema
import (
"context"
"errors"
+ "fmt"
)
// ResourceImporter defines how a resource is imported in Terraform. This
@@ -77,6 +78,55 @@ func ImportStatePassthrough(d *ResourceData, m interface{}) ([]*ResourceData, er
// ImportStatePassthroughContext is an implementation of StateContextFunc that can be
// used to simply pass the ID directly through. This should be used only
// in the case that an ID-only refresh is possible.
+// Please note that this implementation does not work when using resource identity as
+// an Id still has to be set and the identity might contain multiple fields
+// that are not the same as the ID.
func ImportStatePassthroughContext(ctx context.Context, d *ResourceData, m interface{}) ([]*ResourceData, error) {
return []*ResourceData{d}, nil
}
+
+// ImportStatePassthroughWithIdentity creates a StateContextFunc that supports both
+// identity-based and ID-only resource import scenarios. This function is useful
+// when a resource can be imported either by its unique ID or by an identity attribute.
+//
+// The `idAttributePath` parameter specifies the name of the identity attribute
+// to use when importing by identity. Since identity attributes are "flat",
+// `idAttributePath` should be a simple attribute name (e.g., "name" or "identifier").
+// Note that the identity attribute must be a string, as this function expects
+// to set the resource ID using the value of the specified attribute.
+//
+// If the resource is imported by ID (i.e., `d.Id()` is already set), the function
+// simply returns the resource data as-is. Otherwise, it attempts to retrieve the
+// identity attribute specified by `idAttributePath` and sets it as the resource ID.
+//
+// Parameters:
+// - idAttributePath: The name of the identity attribute to use for setting the ID.
+//
+// Returns:
+// - A StateContextFunc that handles the import logic.
+func ImportStatePassthroughWithIdentity(idAttributePath string) StateContextFunc {
+ return func(ctx context.Context, d *ResourceData, m interface{}) ([]*ResourceData, error) {
+ // If we import by id, we just return the resource data as is, no need to change it
+ if d.Id() != "" {
+ return []*ResourceData{d}, nil
+ }
+
+ // If we import by identity, we need to set the id based on the idAttributePath
+ identity, err := d.Identity()
+ if err != nil {
+ return nil, fmt.Errorf("error getting identity: %s", err)
+ }
+ id, exists := identity.GetOk(idAttributePath)
+ if !exists {
+ return nil, fmt.Errorf("expected identity to contain key %s", idAttributePath)
+ }
+ idStr, ok := id.(string)
+ if !ok {
+ return nil, fmt.Errorf("expected identity key %s to be a string, was: %T", idAttributePath, id)
+ }
+
+ d.SetId(idStr)
+
+ return []*ResourceData{d}, nil
+ }
+}
diff --git a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/resource_timeout.go b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/resource_timeout.go
index 90d29e6259..72fd6602ea 100644
--- a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/resource_timeout.go
+++ b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/resource_timeout.go
@@ -132,7 +132,7 @@ func (t *ResourceTimeout) ConfigDecode(s *Resource, c *terraform.ResourceConfig)
timeout = t.Default
}
- // If the resource has not delcared this in the definition, then error
+ // If the resource has not declared this in the definition, then error
// with an unsupported message
if timeout == nil {
return unsupportedTimeoutKeyError(timeKey)
diff --git a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/schema.go b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/schema.go
index 176288b0cd..2861b4ad31 100644
--- a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/schema.go
+++ b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/schema.go
@@ -93,6 +93,22 @@ type Schema struct {
// with Required.
Optional bool
+ // RequiredForImport indicates whether the practitioner must enter a value
+ // in the import block for this attribute when importing a resource.
+ //
+ // RequiredForImport is only valid for identity schemas and either
+ // RequiredForImport or OptionalForImport must be set to true.
+ RequiredForImport bool
+
+ // OptionalForImport indicates whether the practitioner can choose to not
+ // enter a value in the import block for this attribute when importing a
+ // resource. For example, this can be data that would normally be the default
+ // of the configured provider running the import.
+ //
+ // OptionalForImport is only valid for identity schemas and either
+ // RequiredForImport or OptionalForImport must be set to true.
+ OptionalForImport bool
+
// Computed indicates whether the provider may return its own value for
// this attribute or not. Computed cannot be used with Required. If
// Required and Optional are both false, the attribute will be considered
@@ -145,7 +161,7 @@ type Schema struct {
//
// The key benefit of activating this flag is that the result of Read or
// ReadContext will be cleaned of normalization-only changes in the same
- // way as the planning result would normaly be, which therefore prevents
+ // way as the planning result would normally be, which therefore prevents
// churn for downstream expressions deriving from this attribute and
// prevents incorrect "Values changed outside of Terraform" messages
// when the remote API returns values which have the same meaning as the
@@ -395,6 +411,18 @@ type Schema struct {
// as sensitive. Any outputs containing a sensitive value must enable the
// output sensitive argument.
Sensitive bool
+
+ // WriteOnly indicates that the practitioner can choose a value for this
+ // attribute, but Terraform will not store this attribute in plan or state.
+ // WriteOnly can only be set for managed resource schemas. If WriteOnly is true,
+ // either Optional or Required must also be true. WriteOnly cannot be set with ForceNew.
+ //
+ // WriteOnly cannot be set to true for TypeList, TypeMap, or TypeSet.
+ //
+ // This functionality is only supported in Terraform 1.11 and later.
+ // Practitioners that choose a value for this attribute with older
+ // versions of Terraform will receive an error.
+ WriteOnly bool
}
// SchemaConfigMode is used to influence how a schema item is mapped into a
@@ -619,6 +647,13 @@ type InternalMap = schemaMap
// schemaMap is a wrapper that adds nice functions on top of schemas.
type schemaMap map[string]*Schema
+// schemaMapWithIdentity is a wrapper around schemaMap that allows passing an
+// identity schema to ResourceData{} structs that are returned.
+type schemaMapWithIdentity struct {
+ schemaMap
+ identitySchema map[string]*Schema
+}
+
func (m schemaMap) panicOnError() bool {
return os.Getenv("TF_ACC") != ""
}
@@ -626,17 +661,27 @@ func (m schemaMap) panicOnError() bool {
// Data returns a ResourceData for the given schema, state, and diff.
//
// The diff is optional.
-func (m schemaMap) Data(
+func (m schemaMapWithIdentity) Data(
s *terraform.InstanceState,
d *terraform.InstanceDiff) (*ResourceData, error) {
return &ResourceData{
- schema: m,
- state: s,
- diff: d,
- panicOnError: m.panicOnError(),
+ schema: m.schemaMap,
+ identitySchema: m.identitySchema,
+ state: s,
+ diff: d,
+ panicOnError: m.panicOnError(),
}, nil
}
+// Data returns a ResourceData for the given schema, state, and diff.
+//
+// The diff is optional.
+func (m schemaMap) Data(
+ s *terraform.InstanceState,
+ d *terraform.InstanceDiff) (*ResourceData, error) {
+ return schemaMapWithIdentity{m, nil}.Data(s, d)
+}
+
// DeepCopy returns a copy of this schemaMap. The copy can be safely modified
// without affecting the original.
func (m *schemaMap) DeepCopy() schemaMap {
@@ -647,9 +692,20 @@ func (m *schemaMap) DeepCopy() schemaMap {
return *copiedMap.(*schemaMap)
}
+// DeepCopy returns a copy of this schemaMapWithIdentity. The copy can be safely modified
+// without affecting the original.
+func (m *schemaMapWithIdentity) DeepCopy() schemaMapWithIdentity {
+ copiedMap := schemaMapWithIdentity{}
+ copiedMap.schemaMap = m.schemaMap.DeepCopy()
+ identitySchema := schemaMap(m.identitySchema)
+ copiedMap.identitySchema = identitySchema.DeepCopy()
+
+ return copiedMap
+}
+
// Diff returns the diff for a resource given the schema map,
// state, and configuration.
-func (m schemaMap) Diff(
+func (m schemaMapWithIdentity) Diff(
ctx context.Context,
s *terraform.InstanceState,
c *terraform.ResourceConfig,
@@ -665,16 +721,18 @@ func (m schemaMap) Diff(
result.RawConfig = s.RawConfig
result.RawState = s.RawState
result.RawPlan = s.RawPlan
+ result.Identity = s.Identity
}
d := &ResourceData{
- schema: m,
- state: s,
- config: c,
- panicOnError: m.panicOnError(),
+ schema: m.schemaMap,
+ identitySchema: m.identitySchema,
+ state: s,
+ config: c,
+ panicOnError: m.panicOnError(),
}
- for k, schema := range m {
+ for k, schema := range m.schemaMap {
err := m.diff(ctx, k, schema, result, d, false)
if err != nil {
return nil, err
@@ -702,11 +760,36 @@ func (m schemaMap) Diff(
return nil, err
}
for _, k := range rd.UpdatedKeys() {
- err := m.diff(ctx, k, mc[k], result, rd, false)
+ err := m.diff(ctx, k, mc.schemaMap[k], result, rd, false)
if err != nil {
return nil, err
}
}
+ // copy over identity data (by getting it so we also include changes)
+ // In order to build the final identity attributes, we read the full
+ // attribute set as a map[string]interface{}, write it to a MapFieldWriter,
+ // and then use that map.
+ rawMapIdentity := make(map[string]interface{})
+ identityData, err := rd.Identity()
+ if err == nil && d.identitySchema != nil {
+ for k := range d.identitySchema {
+ raw := identityData.get([]string{k})
+ if raw.Exists && !raw.Computed {
+ rawMapIdentity[k] = raw.Value
+ if raw.ValueProcessed != nil {
+ rawMapIdentity[k] = raw.ValueProcessed
+ }
+ }
+ }
+
+ mapWIdentity := &MapFieldWriter{Schema: d.identitySchema}
+ if err := mapWIdentity.WriteField(nil, rawMapIdentity); err != nil {
+ log.Printf("[ERR] Error writing identity fields: %s", err)
+ return nil, err
+ }
+
+ result.Identity = mapWIdentity.Map()
+ } // TODO: else log error?
}
if handleRequiresNew {
@@ -731,7 +814,7 @@ func (m schemaMap) Diff(
d.init()
// Perform the diff again
- for k, schema := range m {
+ for k, schema := range m.schemaMap {
err := m.diff(ctx, k, schema, result2, d, false)
if err != nil {
return nil, err
@@ -746,11 +829,37 @@ func (m schemaMap) Diff(
return nil, err
}
for _, k := range rd.UpdatedKeys() {
- err := m.diff(ctx, k, mc[k], result2, rd, false)
+ err := m.diff(ctx, k, mc.schemaMap[k], result2, rd, false)
if err != nil {
return nil, err
}
}
+ // copy over identity data (by getting it so we also include changes)
+ // In order to build the final identity attributes, we read the full
+ // attribute set as a map[string]interface{}, write it to a MapFieldWriter,
+ // and then use that map.
+ rawMapIdentity := make(map[string]interface{})
+ identityData, err := rd.Identity()
+ if err == nil && d.identitySchema != nil {
+ for k := range d.identitySchema {
+ raw := identityData.get([]string{k})
+ if raw.Exists && !raw.Computed {
+ rawMapIdentity[k] = raw.Value
+ if raw.ValueProcessed != nil {
+ rawMapIdentity[k] = raw.ValueProcessed
+ }
+ }
+ }
+
+ mapWIdentity := &MapFieldWriter{Schema: d.identitySchema}
+ if err := mapWIdentity.WriteField(nil, rawMapIdentity); err != nil {
+ log.Printf("[ERR] Error writing identity fields: %s", err)
+ return nil, err
+ }
+
+ result2.Identity = mapWIdentity.Map()
+ } // TODO: else log error?
+
}
// Force all the fields to not force a new since we know what we
@@ -805,6 +914,18 @@ func (m schemaMap) Diff(
return result, nil
}
+// Diff returns the diff for a resource given the schema map,
+// state, and configuration.
+func (m schemaMap) Diff(
+ ctx context.Context,
+ s *terraform.InstanceState,
+ c *terraform.ResourceConfig,
+ customizeDiff CustomizeDiffFunc,
+ meta interface{},
+ handleRequiresNew bool) (*terraform.InstanceDiff, error) {
+ return schemaMapWithIdentity{m, nil}.Diff(ctx, s, c, customizeDiff, meta, handleRequiresNew)
+}
+
// Validate validates the configuration against this schema mapping.
func (m schemaMap) Validate(c *terraform.ResourceConfig) diag.Diagnostics {
return m.validateObject("", m, c, cty.Path{})
@@ -817,6 +938,7 @@ func (m schemaMap) InternalValidate(topSchemaMap schemaMap) error {
return m.internalValidate(topSchemaMap, false)
}
+// TODO: Think about how to check something is a resource Identity so that we can check if RequiredForImport or OptionalForImport is set
func (m schemaMap) internalValidate(topSchemaMap schemaMap, attrsOnly bool) error {
if topSchemaMap == nil {
topSchemaMap = m
@@ -838,6 +960,25 @@ func (m schemaMap) internalValidate(topSchemaMap schemaMap, attrsOnly bool) erro
return fmt.Errorf("%s: One of optional, required, or computed must be set", k)
}
+ if v.WriteOnly && v.Required && v.Optional {
+ return fmt.Errorf("%s: WriteOnly must be set with either Required or Optional", k)
+ }
+
+ if v.WriteOnly && v.Computed {
+ return fmt.Errorf("%s: WriteOnly cannot be set with Computed", k)
+ }
+
+ if v.WriteOnly && v.ForceNew {
+ return fmt.Errorf("%s: WriteOnly cannot be set with ForceNew", k)
+ }
+
+ if v.RequiredForImport {
+ return fmt.Errorf("%s: RequiredForImport is only valid for resource identity schemas", k)
+ }
+ if v.OptionalForImport {
+ return fmt.Errorf("%s: OptionalForImport is only valid for resource identity schemas", k)
+ }
+
computedOnly := v.Computed && !v.Optional
switch v.ConfigMode {
@@ -874,6 +1015,18 @@ func (m schemaMap) internalValidate(topSchemaMap schemaMap, attrsOnly bool) erro
return fmt.Errorf("%s: Default cannot be set with Required", k)
}
+ if v.WriteOnly && v.Default != nil {
+ return fmt.Errorf("%s: Default cannot be set with WriteOnly", k)
+ }
+
+ if v.WriteOnly && v.Default != nil {
+ return fmt.Errorf("%s: Default cannot be set with WriteOnly", k)
+ }
+
+ if v.WriteOnly && v.DefaultFunc != nil {
+ return fmt.Errorf("%s: DefaultFunc cannot be set with WriteOnly", k)
+ }
+
if len(v.ComputedWhen) > 0 && !v.Computed {
return fmt.Errorf("%s: ComputedWhen can only be set with Computed", k)
}
@@ -923,6 +1076,10 @@ func (m schemaMap) internalValidate(topSchemaMap schemaMap, attrsOnly bool) erro
}
if v.Type == TypeList || v.Type == TypeSet {
+ if v.WriteOnly {
+ return fmt.Errorf("%s: WriteOnly is not valid for lists or sets", k)
+ }
+
if v.Elem == nil {
return fmt.Errorf("%s: Elem must be set for lists", k)
}
@@ -939,6 +1096,16 @@ func (m schemaMap) internalValidate(topSchemaMap schemaMap, attrsOnly bool) erro
case *Resource:
attrsOnly := attrsOnly || v.ConfigMode == SchemaConfigModeAttr
+ blockHasWriteOnly := schemaMap(t.SchemaMap()).hasWriteOnly()
+
+ if v.Type == TypeSet && blockHasWriteOnly {
+ return fmt.Errorf("%s: Set Block type cannot contain WriteOnly attributes", k)
+ }
+
+ if v.Computed && blockHasWriteOnly {
+ return fmt.Errorf("%s: Block types with Computed set to true cannot contain WriteOnly attributes", k)
+ }
+
if err := schemaMap(t.SchemaMap()).internalValidate(topSchemaMap, attrsOnly); err != nil {
return err
}
@@ -956,6 +1123,10 @@ func (m schemaMap) internalValidate(topSchemaMap schemaMap, attrsOnly bool) erro
}
if v.Type == TypeMap && v.Elem != nil {
+ if v.WriteOnly {
+ return fmt.Errorf("%s: WriteOnly is not valid for maps", k)
+ }
+
switch v.Elem.(type) {
case *Resource:
return fmt.Errorf("%s: TypeMap with Elem *Resource not supported,"+
@@ -1099,7 +1270,7 @@ func isValidFieldName(name string) bool {
}
// resourceDiffer is an interface that is used by the private diff functions.
-// This helps facilitate diff logic for both ResourceData and ResoureDiff with
+// This helps facilitate diff logic for both ResourceData and ResourceDiff with
// minimal divergence in code.
type resourceDiffer interface {
diffChange(string) (interface{}, interface{}, bool, bool, bool)
@@ -1119,24 +1290,24 @@ func (m schemaMap) diff(
d resourceDiffer,
all bool) error {
- unsupressedDiff := new(terraform.InstanceDiff)
- unsupressedDiff.Attributes = make(map[string]*terraform.ResourceAttrDiff)
+ unsuppressedDiff := new(terraform.InstanceDiff)
+ unsuppressedDiff.Attributes = make(map[string]*terraform.ResourceAttrDiff)
var err error
switch schema.Type {
case TypeBool, TypeInt, TypeFloat, TypeString:
- err = m.diffString(k, schema, unsupressedDiff, d, all)
+ err = m.diffString(k, schema, unsuppressedDiff, d, all)
case TypeList:
- err = m.diffList(ctx, k, schema, unsupressedDiff, d, all)
+ err = m.diffList(ctx, k, schema, unsuppressedDiff, d, all)
case TypeMap:
- err = m.diffMap(k, schema, unsupressedDiff, d, all)
+ err = m.diffMap(k, schema, unsuppressedDiff, d, all)
case TypeSet:
- err = m.diffSet(ctx, k, schema, unsupressedDiff, d, all)
+ err = m.diffSet(ctx, k, schema, unsuppressedDiff, d, all)
default:
err = fmt.Errorf("%s: unknown type %#v", k, schema.Type)
}
- for attrK, attrV := range unsupressedDiff.Attributes {
+ for attrK, attrV := range unsuppressedDiff.Attributes {
switch rd := d.(type) {
case *ResourceData:
if schema.DiffSuppressFunc != nil && attrV != nil &&
@@ -1602,7 +1773,7 @@ func (m schemaMap) diffString(
// DiffSuppressOnRefresh, checks whether the new value is materially different
// than the old and if not it overwrites the new value with the old one,
// in-place.
-func (m schemaMap) handleDiffSuppressOnRefresh(ctx context.Context, oldState, newState *terraform.InstanceState) {
+func (m schemaMapWithIdentity) handleDiffSuppressOnRefresh(ctx context.Context, oldState, newState *terraform.InstanceState) {
if newState == nil || oldState == nil {
return // nothing to do, then
}
@@ -1622,7 +1793,7 @@ func (m schemaMap) handleDiffSuppressOnRefresh(ctx context.Context, oldState, ne
continue // no change to test
}
- schemaList := addrToSchema(strings.Split(k, "."), m)
+ schemaList := addrToSchema(strings.Split(k, "."), m.schemaMap)
if len(schemaList) == 0 {
continue // no schema? weird, but not our responsibility to handle
}
@@ -2353,6 +2524,36 @@ func (m schemaMap) validateType(
return diags
}
+// hasWriteOnly returns true if the schemaMap contains any WriteOnly attributes.
+func (m schemaMap) hasWriteOnly() bool {
+ for _, v := range m {
+ if v.WriteOnly {
+ return true
+ }
+
+ if v.Elem != nil {
+ switch t := v.Elem.(type) {
+ case *Resource:
+ return schemaMap(t.SchemaMap()).hasWriteOnly()
+ case *Schema:
+ if t.WriteOnly {
+ return true
+ }
+
+ // Test the edge case where elements in a collection are set to writeOnly.
+ // Technically, this is an invalid schema as collections cannot have write-only
+ // attributes. However, this method is not concerned with the validity of the schema.
+ isNestedWriteOnly := schemaMap(map[string]*Schema{"nested": t}).hasWriteOnly()
+ if isNestedWriteOnly {
+ return true
+ }
+ }
+ }
+ }
+
+ return false
+}
+
// Zero returns the zero value for a type.
func (t ValueType) Zero() interface{} {
switch t {
diff --git a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/set.go b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/set.go
index e897817fd3..6ef786bd0c 100644
--- a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/set.go
+++ b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/set.go
@@ -219,7 +219,7 @@ func (s *Set) add(item interface{}, computed bool) string {
func (s *Set) hash(item interface{}) string {
code := s.F(item)
- // Always return a nonnegative hashcode.
+ // Always return a non-negative hashcode.
if code < 0 {
code = -code
}
diff --git a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/shims.go b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/shims.go
index e8baebd70c..fb351358df 100644
--- a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/shims.go
+++ b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/shims.go
@@ -43,7 +43,7 @@ func diffFromValues(ctx context.Context, prior, planned, config cty.Value, res *
removeConfigUnknowns(cfg.Config)
removeConfigUnknowns(cfg.Raw)
- diff, err := schemaMap(res.SchemaMap()).Diff(ctx, instanceState, cfg, cust, nil, false)
+ diff, err := schemaMapWithIdentity{res.SchemaMap(), res.Identity.SchemaMap()}.Diff(ctx, instanceState, cfg, cust, nil, false)
if err != nil {
return nil, err
}
diff --git a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/testing.go b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/testing.go
index bdf56d9012..202f8a31f6 100644
--- a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/testing.go
+++ b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/testing.go
@@ -30,3 +30,20 @@ func TestResourceDataRaw(t testing.T, schema map[string]*Schema, raw map[string]
return result
}
+
+// TestResourceDataWithIdentityRaw creates a ResourceData with an identity from a raw identity map.
+func TestResourceDataWithIdentityRaw(t testing.T, schema map[string]*Schema, identitySchema map[string]*Schema, raw map[string]string) *ResourceData {
+ t.Helper()
+
+ sm := schemaMapWithIdentity{schema, identitySchema}
+ state := terraform.InstanceState{
+ Identity: raw,
+ }
+
+ result, err := sm.Data(&state, nil)
+ if err != nil {
+ t.Fatalf("err: %s", err)
+ }
+
+ return result
+}
diff --git a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/write_only.go b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/write_only.go
new file mode 100644
index 0000000000..287c8bd8fd
--- /dev/null
+++ b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/write_only.go
@@ -0,0 +1,214 @@
+// Copyright (c) HashiCorp, Inc.
+// SPDX-License-Identifier: MPL-2.0
+
+package schema
+
+import (
+ "fmt"
+ "sort"
+
+ "github.com/hashicorp/go-cty/cty"
+
+ "github.com/hashicorp/terraform-plugin-sdk/v2/diag"
+ "github.com/hashicorp/terraform-plugin-sdk/v2/internal/configs/configschema"
+)
+
+// setWriteOnlyNullValues takes a cty.Value, and compares it to the schema setting any non-null
+// values that are writeOnly to null.
+func setWriteOnlyNullValues(val cty.Value, schema *configschema.Block) cty.Value {
+ if !val.IsKnown() || val.IsNull() {
+ return val
+ }
+
+ valMap := val.AsValueMap()
+ newVals := make(map[string]cty.Value)
+
+ for name, attr := range schema.Attributes {
+ v := valMap[name]
+
+ if attr.WriteOnly && !v.IsNull() {
+ newVals[name] = cty.NullVal(attr.Type)
+ continue
+ }
+
+ newVals[name] = v
+ }
+
+ for name, blockS := range schema.BlockTypes {
+ blockVal := valMap[name]
+ if blockVal.IsNull() || !blockVal.IsKnown() {
+ newVals[name] = blockVal
+ continue
+ }
+
+ blockValType := blockVal.Type()
+ blockElementType := blockS.Block.ImpliedType()
+
+ // This switches on the value type here, so we can correctly switch
+ // between Tuples/Lists and Maps/Objects.
+ switch {
+ case blockS.Nesting == configschema.NestingSingle || blockS.Nesting == configschema.NestingGroup:
+ // NestingSingle is the only exception here, where we treat the
+ // block directly as an object
+ newVals[name] = setWriteOnlyNullValues(blockVal, &blockS.Block)
+
+ case blockValType.IsSetType(), blockValType.IsListType(), blockValType.IsTupleType():
+ listVals := blockVal.AsValueSlice()
+ newListVals := make([]cty.Value, 0, len(listVals))
+
+ for _, v := range listVals {
+ newListVals = append(newListVals, setWriteOnlyNullValues(v, &blockS.Block))
+ }
+
+ switch {
+ case blockValType.IsSetType():
+ switch len(newListVals) {
+ case 0:
+ newVals[name] = cty.SetValEmpty(blockElementType)
+ default:
+ newVals[name] = cty.SetVal(newListVals)
+ }
+ case blockValType.IsListType():
+ switch len(newListVals) {
+ case 0:
+ newVals[name] = cty.ListValEmpty(blockElementType)
+ default:
+ newVals[name] = cty.ListVal(newListVals)
+ }
+ case blockValType.IsTupleType():
+ newVals[name] = cty.TupleVal(newListVals)
+ }
+
+ case blockValType.IsMapType(), blockValType.IsObjectType():
+ mapVals := blockVal.AsValueMap()
+ newMapVals := make(map[string]cty.Value)
+
+ for k, v := range mapVals {
+ newMapVals[k] = setWriteOnlyNullValues(v, &blockS.Block)
+ }
+
+ switch {
+ case blockValType.IsMapType():
+ switch len(newMapVals) {
+ case 0:
+ newVals[name] = cty.MapValEmpty(blockElementType)
+ default:
+ newVals[name] = cty.MapVal(newMapVals)
+ }
+ case blockValType.IsObjectType():
+ if len(newMapVals) == 0 {
+ // We need to populate empty values to make a valid object.
+ for attr, ty := range blockElementType.AttributeTypes() {
+ newMapVals[attr] = cty.NullVal(ty)
+ }
+ }
+ newVals[name] = cty.ObjectVal(newMapVals)
+ }
+
+ default:
+ panic(fmt.Sprintf("failed to set null values for nested block %q:%#v", name, blockValType))
+ }
+ }
+
+ return cty.ObjectVal(newVals)
+}
+
+// validateWriteOnlyNullValues validates that write-only attribute values
+// are null to ensure that write-only values are not sent to unsupported
+// Terraform client versions.
+//
+// it takes a cty.Value, and compares it to the schema and throws an
+// error diagnostic for each non-null writeOnly attribute value.
+func validateWriteOnlyNullValues(val cty.Value, schema *configschema.Block, path cty.Path) diag.Diagnostics {
+ if !val.IsKnown() || val.IsNull() {
+ return diag.Diagnostics{}
+ }
+
+ valMap := val.AsValueMap()
+ diags := make([]diag.Diagnostic, 0)
+
+ var attrNames []string
+ for k := range schema.Attributes {
+ attrNames = append(attrNames, k)
+ }
+
+ // Sort the attribute names to produce diags in a consistent order.
+ sort.Strings(attrNames)
+
+ for _, name := range attrNames {
+ attr := schema.Attributes[name]
+ v := valMap[name]
+
+ if attr.WriteOnly && !v.IsNull() {
+ diags = append(diags, diag.Diagnostic{
+ Severity: diag.Error,
+ Summary: "Write-only Attribute Not Allowed",
+ Detail: fmt.Sprintf("The resource contains a non-null value for write-only attribute %q ", name) +
+ "Write-only attributes are only supported in Terraform 1.11 and later.",
+ AttributePath: append(path, cty.GetAttrStep{Name: name}),
+ })
+ }
+ }
+
+ var blockNames []string
+ for k := range schema.BlockTypes {
+ blockNames = append(blockNames, k)
+ }
+
+ // Sort the block names to produce diags in a consistent order.
+ sort.Strings(blockNames)
+
+ for _, name := range blockNames {
+ blockS := schema.BlockTypes[name]
+ blockVal := valMap[name]
+ if blockVal.IsNull() || !blockVal.IsKnown() {
+ continue
+ }
+
+ blockValType := blockVal.Type()
+ blockPath := append(path, cty.GetAttrStep{Name: name})
+
+ // This switches on the value type here, so we can correctly switch
+ // between Tuples/Lists and Maps/Objects.
+ switch {
+ case blockS.Nesting == configschema.NestingSingle || blockS.Nesting == configschema.NestingGroup:
+ // NestingSingle is the only exception here, where we treat the
+ // block directly as an object
+ diags = append(diags, validateWriteOnlyNullValues(blockVal, &blockS.Block, blockPath)...)
+ case blockValType.IsSetType():
+ setVals := blockVal.AsValueSlice()
+
+ for _, v := range setVals {
+ setBlockPath := append(blockPath, cty.IndexStep{
+ Key: v,
+ })
+ diags = append(diags, validateWriteOnlyNullValues(v, &blockS.Block, setBlockPath)...)
+ }
+
+ case blockValType.IsListType(), blockValType.IsTupleType():
+ listVals := blockVal.AsValueSlice()
+
+ for i, v := range listVals {
+ listBlockPath := append(blockPath, cty.IndexStep{
+ Key: cty.NumberIntVal(int64(i)),
+ })
+ diags = append(diags, validateWriteOnlyNullValues(v, &blockS.Block, listBlockPath)...)
+ }
+
+ case blockValType.IsMapType(), blockValType.IsObjectType():
+ mapVals := blockVal.AsValueMap()
+
+ for k, v := range mapVals {
+ mapBlockPath := append(blockPath, cty.IndexStep{
+ Key: cty.StringVal(k),
+ })
+ diags = append(diags, validateWriteOnlyNullValues(v, &blockS.Block, mapBlockPath)...)
+ }
+
+ default:
+ panic(fmt.Sprintf("failed to validate WriteOnly values for nested block %q:%#v", name, blockValType))
+ }
+ }
+
+ return diags
+}
diff --git a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation/float.go b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation/float.go
index dfc261842d..2573c33786 100644
--- a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation/float.go
+++ b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation/float.go
@@ -10,8 +10,8 @@ import (
)
// FloatBetween returns a SchemaValidateFunc which tests if the provided value
-// is of type float64 and is between min and max (inclusive).
-func FloatBetween(min, max float64) schema.SchemaValidateFunc {
+// is of type float64 and is between minVal and maxVal (inclusive).
+func FloatBetween(minVal, maxVal float64) schema.SchemaValidateFunc {
return func(i interface{}, k string) (s []string, es []error) {
v, ok := i.(float64)
if !ok {
@@ -19,8 +19,8 @@ func FloatBetween(min, max float64) schema.SchemaValidateFunc {
return
}
- if v < min || v > max {
- es = append(es, fmt.Errorf("expected %s to be in the range (%f - %f), got %f", k, min, max, v))
+ if v < minVal || v > maxVal {
+ es = append(es, fmt.Errorf("expected %s to be in the range (%f - %f), got %f", k, minVal, maxVal, v))
return
}
@@ -29,8 +29,8 @@ func FloatBetween(min, max float64) schema.SchemaValidateFunc {
}
// FloatAtLeast returns a SchemaValidateFunc which tests if the provided value
-// is of type float and is at least min (inclusive)
-func FloatAtLeast(min float64) schema.SchemaValidateFunc {
+// is of type float and is at least minVal (inclusive)
+func FloatAtLeast(minVal float64) schema.SchemaValidateFunc {
return func(i interface{}, k string) (s []string, es []error) {
v, ok := i.(float64)
if !ok {
@@ -38,8 +38,8 @@ func FloatAtLeast(min float64) schema.SchemaValidateFunc {
return
}
- if v < min {
- es = append(es, fmt.Errorf("expected %s to be at least (%f), got %f", k, min, v))
+ if v < minVal {
+ es = append(es, fmt.Errorf("expected %s to be at least (%f), got %f", k, minVal, v))
return
}
@@ -48,8 +48,8 @@ func FloatAtLeast(min float64) schema.SchemaValidateFunc {
}
// FloatAtMost returns a SchemaValidateFunc which tests if the provided value
-// is of type float and is at most max (inclusive)
-func FloatAtMost(max float64) schema.SchemaValidateFunc {
+// is of type float and is at most maxVal (inclusive)
+func FloatAtMost(maxVal float64) schema.SchemaValidateFunc {
return func(i interface{}, k string) (s []string, es []error) {
v, ok := i.(float64)
if !ok {
@@ -57,8 +57,8 @@ func FloatAtMost(max float64) schema.SchemaValidateFunc {
return
}
- if v > max {
- es = append(es, fmt.Errorf("expected %s to be at most (%f), got %f", k, max, v))
+ if v > maxVal {
+ es = append(es, fmt.Errorf("expected %s to be at most (%f), got %f", k, maxVal, v))
return
}
diff --git a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation/int.go b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation/int.go
index 2873897f27..a240e447a9 100644
--- a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation/int.go
+++ b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation/int.go
@@ -11,8 +11,8 @@ import (
)
// IntBetween returns a SchemaValidateFunc which tests if the provided value
-// is of type int and is between min and max (inclusive)
-func IntBetween(min, max int) schema.SchemaValidateFunc {
+// is of type int and is between minVal and maxVal (inclusive)
+func IntBetween(minVal, maxVal int) schema.SchemaValidateFunc {
return func(i interface{}, k string) (warnings []string, errors []error) {
v, ok := i.(int)
if !ok {
@@ -20,8 +20,8 @@ func IntBetween(min, max int) schema.SchemaValidateFunc {
return warnings, errors
}
- if v < min || v > max {
- errors = append(errors, fmt.Errorf("expected %s to be in the range (%d - %d), got %d", k, min, max, v))
+ if v < minVal || v > maxVal {
+ errors = append(errors, fmt.Errorf("expected %s to be in the range (%d - %d), got %d", k, minVal, maxVal, v))
return warnings, errors
}
@@ -30,8 +30,8 @@ func IntBetween(min, max int) schema.SchemaValidateFunc {
}
// IntAtLeast returns a SchemaValidateFunc which tests if the provided value
-// is of type int and is at least min (inclusive)
-func IntAtLeast(min int) schema.SchemaValidateFunc {
+// is of type int and is at least minVal (inclusive)
+func IntAtLeast(minVal int) schema.SchemaValidateFunc {
return func(i interface{}, k string) (warnings []string, errors []error) {
v, ok := i.(int)
if !ok {
@@ -39,8 +39,8 @@ func IntAtLeast(min int) schema.SchemaValidateFunc {
return warnings, errors
}
- if v < min {
- errors = append(errors, fmt.Errorf("expected %s to be at least (%d), got %d", k, min, v))
+ if v < minVal {
+ errors = append(errors, fmt.Errorf("expected %s to be at least (%d), got %d", k, minVal, v))
return warnings, errors
}
@@ -49,8 +49,8 @@ func IntAtLeast(min int) schema.SchemaValidateFunc {
}
// IntAtMost returns a SchemaValidateFunc which tests if the provided value
-// is of type int and is at most max (inclusive)
-func IntAtMost(max int) schema.SchemaValidateFunc {
+// is of type int and is at most maxVal (inclusive)
+func IntAtMost(maxVal int) schema.SchemaValidateFunc {
return func(i interface{}, k string) (warnings []string, errors []error) {
v, ok := i.(int)
if !ok {
@@ -58,8 +58,8 @@ func IntAtMost(max int) schema.SchemaValidateFunc {
return warnings, errors
}
- if v > max {
- errors = append(errors, fmt.Errorf("expected %s to be at most (%d), got %d", k, max, v))
+ if v > maxVal {
+ errors = append(errors, fmt.Errorf("expected %s to be at most (%d), got %d", k, maxVal, v))
return warnings, errors
}
diff --git a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation/map.go b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation/map.go
index 7c92509054..1465859870 100644
--- a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation/map.go
+++ b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation/map.go
@@ -9,23 +9,24 @@ import (
"sort"
"github.com/hashicorp/go-cty/cty"
+
"github.com/hashicorp/terraform-plugin-sdk/v2/diag"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
)
// MapKeyLenBetween returns a SchemaValidateDiagFunc which tests if the provided value
-// is of type map and the length of all keys are between min and max (inclusive)
-func MapKeyLenBetween(min, max int) schema.SchemaValidateDiagFunc {
+// is of type map and the length of all keys are between minVal and maxVal (inclusive)
+func MapKeyLenBetween(minVal, maxVal int) schema.SchemaValidateDiagFunc {
return func(v interface{}, path cty.Path) diag.Diagnostics {
var diags diag.Diagnostics
for _, key := range sortedKeys(v.(map[string]interface{})) {
keyLen := len(key)
- if keyLen < min || keyLen > max {
+ if keyLen < minVal || keyLen > maxVal {
diags = append(diags, diag.Diagnostic{
Severity: diag.Error,
Summary: "Bad map key length",
- Detail: fmt.Sprintf("Map key lengths should be in the range (%d - %d): %s (length = %d)", min, max, key, keyLen),
+ Detail: fmt.Sprintf("Map key lengths should be in the range (%d - %d): %s (length = %d)", minVal, maxVal, key, keyLen),
AttributePath: append(path, cty.IndexStep{Key: cty.StringVal(key)}),
})
}
@@ -36,8 +37,8 @@ func MapKeyLenBetween(min, max int) schema.SchemaValidateDiagFunc {
}
// MapValueLenBetween returns a SchemaValidateDiagFunc which tests if the provided value
-// is of type map and the length of all values are between min and max (inclusive)
-func MapValueLenBetween(min, max int) schema.SchemaValidateDiagFunc {
+// is of type map and the length of all values are between minVal and maxVal (inclusive)
+func MapValueLenBetween(minVal, maxVal int) schema.SchemaValidateDiagFunc {
return func(v interface{}, path cty.Path) diag.Diagnostics {
var diags diag.Diagnostics
@@ -57,11 +58,11 @@ func MapValueLenBetween(min, max int) schema.SchemaValidateDiagFunc {
}
valLen := len(val.(string))
- if valLen < min || valLen > max {
+ if valLen < minVal || valLen > maxVal {
diags = append(diags, diag.Diagnostic{
Severity: diag.Error,
Summary: "Bad map value length",
- Detail: fmt.Sprintf("Map value lengths should be in the range (%d - %d): %s => %v (length = %d)", min, max, key, val, valLen),
+ Detail: fmt.Sprintf("Map value lengths should be in the range (%d - %d): %s => %v (length = %d)", minVal, maxVal, key, val, valLen),
AttributePath: append(path, cty.IndexStep{Key: cty.StringVal(key)}),
})
}
diff --git a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation/network.go b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation/network.go
index 9bc6da2b8e..1aadcdb981 100644
--- a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation/network.go
+++ b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation/network.go
@@ -99,8 +99,8 @@ func IsCIDR(i interface{}, k string) (warnings []string, errors []error) {
}
// IsCIDRNetwork returns a SchemaValidateFunc which tests if the provided value
-// is of type string, is in valid Value network notation, and has significant bits between min and max (inclusive)
-func IsCIDRNetwork(min, max int) schema.SchemaValidateFunc {
+// is of type string, is in valid Value network notation, and has significant bits between minVal and maxVal (inclusive)
+func IsCIDRNetwork(minVal, maxVal int) schema.SchemaValidateFunc {
return func(i interface{}, k string) (warnings []string, errors []error) {
v, ok := i.(string)
if !ok {
@@ -120,8 +120,8 @@ func IsCIDRNetwork(min, max int) schema.SchemaValidateFunc {
}
sigbits, _ := ipnet.Mask.Size()
- if sigbits < min || sigbits > max {
- errors = append(errors, fmt.Errorf("expected %q to contain a network Value with between %d and %d significant bits, got: %d", k, min, max, sigbits))
+ if sigbits < minVal || sigbits > maxVal {
+ errors = append(errors, fmt.Errorf("expected %q to contain a network Value with between %d and %d significant bits, got: %d", k, minVal, maxVal, sigbits))
}
return warnings, errors
diff --git a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation/path.go b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation/path.go
new file mode 100644
index 0000000000..b8707330d0
--- /dev/null
+++ b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation/path.go
@@ -0,0 +1,55 @@
+// Copyright (c) HashiCorp, Inc.
+// SPDX-License-Identifier: MPL-2.0
+
+package validation
+
+import (
+ "github.com/hashicorp/go-cty/cty"
+)
+
+// PathMatches compares two Paths for equality. For cty.IndexStep,
+// unknown key values are treated as an Any qualifier and will
+// match any index step of the same type.
+func PathMatches(p cty.Path, other cty.Path) bool {
+ if len(p) != len(other) {
+ return false
+ }
+
+ for i := range p {
+ pv := p[i]
+ switch pv := pv.(type) {
+ case cty.GetAttrStep:
+ ov, ok := other[i].(cty.GetAttrStep)
+ if !ok || pv != ov {
+ return false
+ }
+ case cty.IndexStep:
+ ov, ok := other[i].(cty.IndexStep)
+ if !ok {
+ return false
+ }
+
+ // Sets need special handling since their Type is the entire object
+ // with attributes.
+ if pv.Key.Type().IsObjectType() && ov.Key.Type().IsObjectType() {
+ if !pv.Key.IsKnown() || !ov.Key.IsKnown() {
+ break
+ }
+ }
+ if !pv.Key.Type().Equals(ov.Key.Type()) {
+ return false
+ }
+
+ if pv.Key.IsKnown() && ov.Key.IsKnown() {
+ if !pv.Key.RawEquals(ov.Key) {
+ return false
+ }
+ }
+ default:
+ // Any invalid steps default to evaluating false.
+ return false
+ }
+ }
+
+ return true
+}
diff --git a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation/strings.go b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation/strings.go
index 375a698f2c..d8c2243937 100644
--- a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation/strings.go
+++ b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation/strings.go
@@ -70,8 +70,8 @@ func StringIsWhiteSpace(i interface{}, k string) ([]string, []error) {
}
// StringLenBetween returns a SchemaValidateFunc which tests if the provided value
-// is of type string and has length between min and max (inclusive)
-func StringLenBetween(min, max int) schema.SchemaValidateFunc {
+// is of type string and has length between minVal and maxVal (inclusive)
+func StringLenBetween(minVal, maxVal int) schema.SchemaValidateFunc {
return func(i interface{}, k string) (warnings []string, errors []error) {
v, ok := i.(string)
if !ok {
@@ -79,8 +79,8 @@ func StringLenBetween(min, max int) schema.SchemaValidateFunc {
return warnings, errors
}
- if len(v) < min || len(v) > max {
- errors = append(errors, fmt.Errorf("expected length of %s to be in the range (%d - %d), got %s", k, min, max, v))
+ if len(v) < minVal || len(v) > maxVal {
+ errors = append(errors, fmt.Errorf("expected length of %s to be in the range (%d - %d), got %s", k, minVal, maxVal, v))
}
return warnings, errors
diff --git a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation/write_only.go b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation/write_only.go
new file mode 100644
index 0000000000..84418ef170
--- /dev/null
+++ b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation/write_only.go
@@ -0,0 +1,120 @@
+// Copyright (c) HashiCorp, Inc.
+// SPDX-License-Identifier: MPL-2.0
+
+package validation
+
+import (
+ "context"
+ "fmt"
+
+ "github.com/hashicorp/go-cty/cty"
+
+ "github.com/hashicorp/terraform-plugin-sdk/v2/diag"
+ "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
+)
+
+// PreferWriteOnlyAttribute is a ValidateRawResourceConfigFunc that returns a warning
+// if the Terraform client supports write-only attributes and the old attribute is
+// not null.
+// The last step in the path must be a cty.GetAttrStep{}.
+// When creating a cty.IndexStep{} to into a nested attribute, use an unknown value
+// of the index type to indicate any key value.
+// For lists: cty.Index(cty.UnknownVal(cty.Number)),
+// For maps: cty.Index(cty.UnknownVal(cty.String)),
+// For sets: cty.Index(cty.UnknownVal(cty.Object(nil))),
+//
+// NOTE: This validator will produce persistent warnings for practitioners on every Terraform run as long as the specified non-write-only attribute
+// has a value in the configuration. The validator will also produce warnings for users of shared modules
+// who cannot immediately take action on the warning.
+func PreferWriteOnlyAttribute(oldAttribute cty.Path, writeOnlyAttribute cty.Path) schema.ValidateRawResourceConfigFunc {
+ return func(ctx context.Context, req schema.ValidateResourceConfigFuncRequest, resp *schema.ValidateResourceConfigFuncResponse) {
+ if !req.WriteOnlyAttributesAllowed {
+ return
+ }
+
+ pathLen := len(writeOnlyAttribute)
+
+ if pathLen == 0 {
+ return
+ }
+
+ lastStep := writeOnlyAttribute[pathLen-1]
+
+ // Only attribute steps have a Name field
+ writeOnlyAttrStep, ok := lastStep.(cty.GetAttrStep)
+ if !ok {
+ resp.Diagnostics = diag.Diagnostics{
+ {
+ Severity: diag.Error,
+ Summary: "Invalid writeOnlyAttribute path",
+ Detail: "The Terraform Provider unexpectedly provided a path that does not match the current schema. " +
+ "This can happen if the path does not correctly follow the schema in structure or types. " +
+ "Please report this to the provider developers. \n\n" +
+ "The writeOnlyAttribute path provided is invalid. The last step in the path must be a cty.GetAttrStep{}",
+ AttributePath: writeOnlyAttribute,
+ },
+ }
+ return
+ }
+
+ var oldAttrs []attribute
+
+ err := cty.Walk(req.RawConfig, func(path cty.Path, value cty.Value) (bool, error) {
+ if PathMatches(path, oldAttribute) {
+ oldAttrs = append(oldAttrs, attribute{
+ value: value,
+ path: path,
+ })
+ }
+
+ return true, nil
+ })
+ if err != nil {
+ return
+ }
+
+ for _, attr := range oldAttrs {
+ attrPath := attr.path.Copy()
+
+ pathLen = len(attrPath)
+
+ if pathLen == 0 {
+ return
+ }
+
+ lastStep = attrPath[pathLen-1]
+
+ // Only attribute steps have a Name field
+ attrStep, ok := lastStep.(cty.GetAttrStep)
+ if !ok {
+ resp.Diagnostics = diag.Diagnostics{
+ {
+ Severity: diag.Error,
+ Summary: "Invalid oldAttribute path",
+ Detail: "The Terraform Provider unexpectedly provided a path that does not match the current schema. " +
+ "This can happen if the path does not correctly follow the schema in structure or types. " +
+ "Please report this to the provider developers. \n\n" +
+ "The oldAttribute path provided is invalid. The last step in the path must be a cty.GetAttrStep{}",
+ AttributePath: attrPath,
+ },
+ }
+ return
+ }
+
+ if !attr.value.IsNull() {
+ resp.Diagnostics = append(resp.Diagnostics, diag.Diagnostic{
+ Severity: diag.Warning,
+ Summary: "Available Write-only Attribute Alternative",
+ Detail: fmt.Sprintf("The attribute %s has a write-only alternative %s available. "+
+ "Use the write-only alternative of the attribute when possible.", attrStep.Name, writeOnlyAttrStep.Name),
+ AttributePath: attr.path,
+ })
+ }
+ }
+ }
+}
+
+type attribute struct {
+ value cty.Value
+ path cty.Path
+}
diff --git a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/internal/addrs/instance_key.go b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/internal/addrs/instance_key.go
index 8373297f87..56700fc057 100644
--- a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/internal/addrs/instance_key.go
+++ b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/internal/addrs/instance_key.go
@@ -20,7 +20,7 @@ type instanceKey interface {
String() string
}
-// NoKey represents the absense of an instanceKey, for the single instance
+// NoKey represents the absence of an instanceKey, for the single instance
// of a configuration object that does not use "count" or "for_each" at all.
var NoKey instanceKey
diff --git a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/internal/configs/configschema/coerce_value.go b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/internal/configs/configschema/coerce_value.go
index d12ff8cced..dab927c8dd 100644
--- a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/internal/configs/configschema/coerce_value.go
+++ b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/internal/configs/configschema/coerce_value.go
@@ -11,7 +11,7 @@ import (
)
// CoerceValue attempts to force the given value to conform to the type
-// implied by the receiever.
+// implied by the receiver.
//
// This is useful in situations where a configuration must be derived from
// an already-decoded value. It is always better to decode directly from
diff --git a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/internal/configs/configschema/empty_value.go b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/internal/configs/configschema/empty_value.go
index 3c9573bc56..cc1107fa0b 100644
--- a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/internal/configs/configschema/empty_value.go
+++ b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/internal/configs/configschema/empty_value.go
@@ -7,12 +7,12 @@ import (
"github.com/hashicorp/go-cty/cty"
)
-// EmptyValue returns the "empty value" for the recieving block, which for
+// EmptyValue returns the "empty value" for the receiving block, which for
// a block type is a non-null object where all of the attribute values are
// the empty values of the block's attributes and nested block types.
//
// In other words, it returns the value that would be returned if an empty
-// block were decoded against the recieving schema, assuming that no required
+// block were decoded against the receiving schema, assuming that no required
// attribute or block constraints were honored.
func (b *Block) EmptyValue() cty.Value {
vals := make(map[string]cty.Value)
diff --git a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/internal/configs/configschema/schema.go b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/internal/configs/configschema/schema.go
index c445b4ba55..5410376cfa 100644
--- a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/internal/configs/configschema/schema.go
+++ b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/internal/configs/configschema/schema.go
@@ -83,6 +83,28 @@ type Attribute struct {
// Deprecated indicates whether the attribute has been marked as deprecated in the
// provider and usage should be discouraged.
Deprecated bool
+
+ // WriteOnly indicates that the practitioner can choose a value for this
+ // attribute, but Terraform will not store this attribute in plan or state.
+ // WriteOnly can only be set for managed resource schemas. If WriteOnly is true,
+ // either Optional or Required must also be true. WriteOnly cannot be set with ForceNew.
+ //
+ // WriteOnly cannot be set to true for TypeList, TypeMap, or TypeSet.
+ //
+ // This functionality is only supported in Terraform 1.11 and later.
+ // Practitioners that choose a value for this attribute with older
+ // versions of Terraform will receive an error.
+ WriteOnly bool
+
+ // RequiredForImport, if set to true, specifies that an omitted or null value is
+ // not permitted when importing by the identity. This field conflicts with OptionalForImport.
+ // Only valid for identity schemas.
+ RequiredForImport bool
+
+ // OptionalForImport, if set to true, specifies that an omitted or null value is
+ // permitted when importing by the identity. This field conflicts with RequiredForImport.
+ // Only valid for identity schemas.
+ OptionalForImport bool
}
// NestedBlock represents the embedding of one block within another.
@@ -125,7 +147,7 @@ const (
NestingSingle
// NestingGroup is similar to NestingSingle in that it calls for only a
- // single instance of a given block type with no labels, but it additonally
+ // single instance of a given block type with no labels, but it additionally
// guarantees that its result will never be null, even if the block is
// absent, and instead the nested attributes and blocks will be treated
// as absent in that case. (Any required attributes or blocks within the
diff --git a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/internal/configs/hcl2shim/values_equiv.go b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/internal/configs/hcl2shim/values_equiv.go
index 6b2be2239d..37d3104975 100644
--- a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/internal/configs/hcl2shim/values_equiv.go
+++ b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/internal/configs/hcl2shim/values_equiv.go
@@ -187,8 +187,8 @@ func valuesSDKEquivalentMappings(a, b cty.Value) bool {
// precision in the round-trip.
//
// This does _not_ attempt to allow for an epsilon difference that may be
-// caused by accumulated innacuracy in a float calculation, under the
-// expectation that providers generally do not actually do compuations on
+// caused by accumulated inaccuracy in a float calculation, under the
+// expectation that providers generally do not actually do computations on
// floats and instead just pass string representations of them on verbatim
// to remote APIs. A remote API _itself_ may introduce inaccuracy, but that's
// a problem for the provider itself to deal with, based on its knowledge of
diff --git a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/internal/logging/environment_variables.go b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/internal/logging/environment_variables.go
index 2ffc73eee6..5919d373a7 100644
--- a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/internal/logging/environment_variables.go
+++ b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/internal/logging/environment_variables.go
@@ -10,7 +10,7 @@ const (
// usage, this environment variable is handled by terraform-plugin-go.
//
// Terraform CLI's logging must be explicitly turned on before this
- // environment varable can be used to reduce the SDK logging levels. It
+ // environment variable can be used to reduce the SDK logging levels. It
// cannot be used to show only SDK logging unless all other logging levels
// are turned off.
EnvTfLogSdk = "TF_LOG_SDK"
diff --git a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/internal/plugin/convert/diagnostics.go b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/internal/plugin/convert/diagnostics.go
index 672f75e6d8..6c1ce3f454 100644
--- a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/internal/plugin/convert/diagnostics.go
+++ b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/internal/plugin/convert/diagnostics.go
@@ -10,6 +10,7 @@ import (
"github.com/hashicorp/terraform-plugin-go/tfprotov5"
"github.com/hashicorp/terraform-plugin-go/tftypes"
+
"github.com/hashicorp/terraform-plugin-sdk/v2/diag"
"github.com/hashicorp/terraform-plugin-sdk/v2/internal/logging"
)
@@ -136,7 +137,7 @@ func AttributePathToPath(ap *tftypes.AttributePath) cty.Path {
// PathToAttributePath takes a cty.Path and converts it to a proto-encoded path.
func PathToAttributePath(p cty.Path) *tftypes.AttributePath {
- if p == nil || len(p) < 1 {
+ if len(p) < 1 {
return nil
}
ap := tftypes.NewAttributePath()
diff --git a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/internal/plugin/convert/schema.go b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/internal/plugin/convert/schema.go
index e2b4e431ce..563e0d38cf 100644
--- a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/internal/plugin/convert/schema.go
+++ b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/internal/plugin/convert/schema.go
@@ -12,6 +12,7 @@ import (
"github.com/hashicorp/go-cty/cty"
"github.com/hashicorp/terraform-plugin-go/tfprotov5"
"github.com/hashicorp/terraform-plugin-go/tftypes"
+
"github.com/hashicorp/terraform-plugin-sdk/v2/internal/configs/configschema"
"github.com/hashicorp/terraform-plugin-sdk/v2/internal/logging"
)
@@ -151,6 +152,7 @@ func ConfigSchemaToProto(ctx context.Context, b *configschema.Block) *tfprotov5.
Required: a.Required,
Sensitive: a.Sensitive,
Deprecated: a.Deprecated,
+ WriteOnly: a.WriteOnly,
}
var err error
@@ -170,6 +172,31 @@ func ConfigSchemaToProto(ctx context.Context, b *configschema.Block) *tfprotov5.
return block
}
+func ConfigIdentitySchemaToProto(ctx context.Context, identitySchema *configschema.Block) []*tfprotov5.ResourceIdentitySchemaAttribute {
+ output := make([]*tfprotov5.ResourceIdentitySchemaAttribute, 0)
+
+ for _, name := range sortedKeys(identitySchema.Attributes) {
+ a := identitySchema.Attributes[name]
+
+ attr := &tfprotov5.ResourceIdentitySchemaAttribute{
+ Name: name,
+ Description: a.Description,
+ OptionalForImport: a.OptionalForImport,
+ RequiredForImport: a.RequiredForImport,
+ }
+
+ var err error
+ attr.Type, err = tftypeFromCtyType(a.Type)
+ if err != nil {
+ panic(err)
+ }
+
+ output = append(output, attr)
+ }
+
+ return output
+}
+
func protoStringKind(ctx context.Context, k configschema.StringKind) tfprotov5.StringKind {
switch k {
default:
diff --git a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/internal/plugin/convert/value.go b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/internal/plugin/convert/value.go
new file mode 100644
index 0000000000..84d710f960
--- /dev/null
+++ b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/internal/plugin/convert/value.go
@@ -0,0 +1,213 @@
+// Copyright (c) HashiCorp, Inc.
+// SPDX-License-Identifier: MPL-2.0
+
+package convert
+
+import (
+ "fmt"
+
+ "github.com/hashicorp/go-cty/cty"
+ "github.com/hashicorp/terraform-plugin-go/tftypes"
+)
+
+func primitiveTfValue(in cty.Value) (*tftypes.Value, error) {
+ primitiveType, err := tftypeFromCtyType(in.Type())
+ if err != nil {
+ return nil, err
+ }
+
+ if in.IsNull() {
+ return nullTfValue(primitiveType), nil
+ }
+
+ if !in.IsKnown() {
+ return unknownTfValue(primitiveType), nil
+ }
+
+ var val tftypes.Value
+ switch in.Type() {
+ case cty.String:
+ val = tftypes.NewValue(tftypes.String, in.AsString())
+ case cty.Bool:
+ val = tftypes.NewValue(tftypes.Bool, in.True())
+ case cty.Number:
+ val = tftypes.NewValue(tftypes.Number, in.AsBigFloat())
+ }
+
+ return &val, nil
+}
+
+func listTfValue(in cty.Value) (*tftypes.Value, error) {
+ listType, err := tftypeFromCtyType(in.Type())
+ if err != nil {
+ return nil, err
+ }
+
+ if in.IsNull() {
+ return nullTfValue(listType), nil
+ }
+
+ if !in.IsKnown() {
+ return unknownTfValue(listType), nil
+ }
+
+ vals := make([]tftypes.Value, 0)
+
+ for _, v := range in.AsValueSlice() {
+ tfVal, err := ToTfValue(v)
+ if err != nil {
+ return nil, err
+ }
+ vals = append(vals, *tfVal)
+ }
+
+ out := tftypes.NewValue(listType, vals)
+
+ return &out, nil
+}
+
+func mapTfValue(in cty.Value) (*tftypes.Value, error) {
+ mapType, err := tftypeFromCtyType(in.Type())
+ if err != nil {
+ return nil, err
+ }
+
+ if in.IsNull() {
+ return nullTfValue(mapType), nil
+ }
+
+ if !in.IsKnown() {
+ return unknownTfValue(mapType), nil
+ }
+
+ vals := make(map[string]tftypes.Value)
+
+ for k, v := range in.AsValueMap() {
+ tfVal, err := ToTfValue(v)
+ if err != nil {
+ return nil, err
+ }
+ vals[k] = *tfVal
+ }
+
+ out := tftypes.NewValue(mapType, vals)
+
+ return &out, nil
+}
+
+func setTfValue(in cty.Value) (*tftypes.Value, error) {
+ setType, err := tftypeFromCtyType(in.Type())
+ if err != nil {
+ return nil, err
+ }
+
+ if in.IsNull() {
+ return nullTfValue(setType), nil
+ }
+
+ if !in.IsKnown() {
+ return unknownTfValue(setType), nil
+ }
+
+ vals := make([]tftypes.Value, 0)
+
+ for _, v := range in.AsValueSlice() {
+ tfVal, err := ToTfValue(v)
+ if err != nil {
+ return nil, err
+ }
+ vals = append(vals, *tfVal)
+ }
+
+ out := tftypes.NewValue(setType, vals)
+
+ return &out, nil
+}
+
+func objectTfValue(in cty.Value) (*tftypes.Value, error) {
+ objType, err := tftypeFromCtyType(in.Type())
+ if err != nil {
+ return nil, err
+ }
+
+ if in.IsNull() {
+ return nullTfValue(objType), nil
+ }
+
+ if !in.IsKnown() {
+ return unknownTfValue(objType), nil
+ }
+
+ vals := make(map[string]tftypes.Value)
+
+ for k, v := range in.AsValueMap() {
+ tfVal, err := ToTfValue(v)
+ if err != nil {
+ return nil, err
+ }
+ vals[k] = *tfVal
+ }
+
+ out := tftypes.NewValue(objType, vals)
+
+ return &out, nil
+}
+
+func tupleTfValue(in cty.Value) (*tftypes.Value, error) {
+ tupleType, err := tftypeFromCtyType(in.Type())
+ if err != nil {
+ return nil, err
+ }
+
+ if in.IsNull() {
+ return nullTfValue(tupleType), nil
+ }
+
+ if !in.IsKnown() {
+ return unknownTfValue(tupleType), nil
+ }
+
+ vals := make([]tftypes.Value, 0)
+
+ for _, v := range in.AsValueSlice() {
+ tfVal, err := ToTfValue(v)
+ if err != nil {
+ return nil, err
+ }
+ vals = append(vals, *tfVal)
+ }
+
+ out := tftypes.NewValue(tupleType, vals)
+
+ return &out, nil
+}
+
+func ToTfValue(in cty.Value) (*tftypes.Value, error) {
+ ty := in.Type()
+ switch {
+ case ty.IsPrimitiveType():
+ return primitiveTfValue(in)
+ case ty.IsListType():
+ return listTfValue(in)
+ case ty.IsObjectType():
+ return objectTfValue(in)
+ case ty.IsMapType():
+ return mapTfValue(in)
+ case ty.IsSetType():
+ return setTfValue(in)
+ case ty.IsTupleType():
+ return tupleTfValue(in)
+ default:
+ return nil, fmt.Errorf("unsupported type %s", ty)
+ }
+}
+
+func nullTfValue(ty tftypes.Type) *tftypes.Value {
+ nullValue := tftypes.NewValue(ty, nil)
+ return &nullValue
+}
+
+func unknownTfValue(ty tftypes.Type) *tftypes.Value {
+ unknownValue := tftypes.NewValue(ty, tftypes.UnknownValue)
+ return &unknownValue
+}
diff --git a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/meta/meta.go b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/meta/meta.go
index 8a3247afb7..1338f98383 100644
--- a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/meta/meta.go
+++ b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/meta/meta.go
@@ -17,7 +17,7 @@ import (
//
// Deprecated: Use Go standard library [runtime/debug] package build information
// instead.
-var SDKVersion = "2.34.0"
+var SDKVersion = "2.38.1"
// A pre-release marker for the version. If this is "" (empty string)
// then it means that it is a final release. Otherwise, this is a pre-release
diff --git a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/terraform/diff.go b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/terraform/diff.go
index 7b988d9f3d..383da828f9 100644
--- a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/terraform/diff.go
+++ b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/terraform/diff.go
@@ -51,6 +51,10 @@ type InstanceDiff struct {
// meant to be used for additional data a resource may want to pass through.
// The value here must only contain Go primitives and collections.
Meta map[string]interface{}
+
+ // Identity is the identity data used to track resource identity
+ // starting in Terraform 1.12+
+ Identity map[string]string
}
func (d *InstanceDiff) Lock() { d.mu.Lock() }
@@ -183,7 +187,7 @@ func (d *InstanceDiff) applyBlockDiff(path []string, attrs map[string]string, sc
// check each set candidate to see if it was removed.
// we need to do this, because when entire sets are removed, they may
- // have the wrong key, and ony show diffs going to ""
+ // have the wrong key, and only show diffs going to ""
if block.Nesting == configschema.NestingSet {
for k := range candidateKeys {
indexPrefix := strings.Join(append(path, n, k), ".") + "."
@@ -359,7 +363,7 @@ func (d *InstanceDiff) applySingleAttrDiff(path []string, attrs map[string]strin
return result, nil
}
- // check for missmatched diff values
+ // check for mismatched diff values
if exists &&
old != diff.Old &&
old != hcl2shim.UnknownVariableValue &&
@@ -663,7 +667,8 @@ func (d *InstanceDiff) Empty() bool {
return !d.Destroy &&
!d.DestroyTainted &&
!d.DestroyDeposed &&
- len(d.Attributes) == 0
+ len(d.Attributes) == 0 &&
+ len(d.Identity) == 0
}
// Equal compares two diffs for exact equality.
@@ -892,7 +897,7 @@ func (d *InstanceDiff) Same(d2 *InstanceDiff) (bool, string) {
continue
}
- // If the last diff was a computed value then the absense of
+ // If the last diff was a computed value then the absence of
// that value is allowed since it may mean the value ended up
// being the same.
if diffOld.NewComputed {
diff --git a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/terraform/state.go b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/terraform/state.go
index 7d2179358a..f905c2a93d 100644
--- a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/terraform/state.go
+++ b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/terraform/state.go
@@ -30,6 +30,13 @@ const (
stateVersion = 3
)
+// ImportBeforeReadMetaKey is an internal private field used to indicate that the current resource state and identity
+// were provided most recently by the ImportResourceState RPC. This indicates that the state is an import stub and identity
+// has not been stored in state yet.
+//
+// When detected, this key should be cleared before returning from the ReadResource RPC.
+var ImportBeforeReadMetaKey = ".import_before_read"
+
// rootModulePath is the path of the root module
var rootModulePath = []string{"root"}
@@ -46,7 +53,7 @@ var rootModulePath = []string{"root"}
// normalizeModulePath takes a raw module path and returns a path that
// has the rootModulePath prepended to it. If I could go back in time I
// would've never had a rootModulePath (empty path would be root). We can
-// still fix this but thats a big refactor that my branch doesn't make sense
+// still fix this but that's a big refactor that my branch doesn't make sense
// for. Instead, this function normalizes paths.
func normalizeModulePath(p []string) addrs.ModuleInstance {
// FIXME: Remove this once everyone is using addrs.ModuleInstance.
@@ -799,7 +806,7 @@ func (s *OutputState) Equal(other *OutputState) bool {
// module.
type ModuleState struct {
// Path is the import path from the root module. Modules imports are
- // always disjoint, so the path represents amodule tree
+ // always disjoint, so the path represents a module tree
Path []string `json:"path"`
// Locals are kept only transiently in-memory, because we can always
@@ -1305,6 +1312,10 @@ type InstanceState struct {
// and collections.
Meta map[string]interface{} `json:"meta"`
+ // Identity is the identity data used to track resource identity
+ // starting in Terraform 1.12+
+ Identity map[string]string `json:"identity"`
+
ProviderMeta cty.Value
RawConfig cty.Value
@@ -1330,6 +1341,9 @@ func (s *InstanceState) init() {
if s.Meta == nil {
s.Meta = make(map[string]interface{})
}
+ if s.Identity == nil {
+ s.Identity = make(map[string]string)
+ }
s.Ephemeral.init()
}
@@ -1391,6 +1405,7 @@ func (s *InstanceState) Set(from *InstanceState) {
s.Ephemeral = from.Ephemeral
s.Meta = from.Meta
s.Tainted = from.Tainted
+ s.Identity = from.Identity
}
func (s *InstanceState) DeepCopy() *InstanceState {
@@ -1470,6 +1485,8 @@ func (s *InstanceState) Equal(other *InstanceState) bool {
return false
}
+ // TODO: compare identity
+
return true
}
@@ -1547,6 +1564,8 @@ func (s *InstanceState) String() string {
buf.WriteString(fmt.Sprintf("%s = %s\n", ak, av))
}
+ // TODO: add identity
+
buf.WriteString(fmt.Sprintf("Tainted = %t\n", s.Tainted))
return buf.String()
diff --git a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/terraform/state_filter.go b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/terraform/state_filter.go
index caf2c79674..3cb5c57e51 100644
--- a/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/terraform/state_filter.go
+++ b/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/terraform/state_filter.go
@@ -263,7 +263,7 @@ func (s stateFilterResultSlice) Less(i, j int) bool {
return addrA.Index < addrB.Index
}
- // If the addresses are different it is just lexographic sorting
+ // If the addresses are different it is just lexicographic sorting
if a.Address != b.Address {
return a.Address < b.Address
}
diff --git a/vendor/github.com/hashicorp/terraform-registry-address/CONTRIBUTING.md b/vendor/github.com/hashicorp/terraform-registry-address/CONTRIBUTING.md
new file mode 100644
index 0000000000..3a59f86bbe
--- /dev/null
+++ b/vendor/github.com/hashicorp/terraform-registry-address/CONTRIBUTING.md
@@ -0,0 +1,22 @@
+# Contributing to terraform-registry-address
+
+## Versioning
+
+The `github.com/hashicorp/terraform-registry-address` Go module in its entirety is versioned according to [Go module versioning](https://golang.org/ref/mod#versions) with Git tags.
+
+There is currently no firm plan for releasing v1.
+
+## Releases
+
+Releases are made on a reasonably regular basis by the Terraform team, using our custom CI workflows. There is currently no set release schedule and no requirement for _contributors_ to write changelog entries.
+
+The following notes are only relevant to maintainers.
+
+[Create new release](https://github.com/hashicorp/terraform-registry-address/releases/new) via GitHub UI to point to the new tag and use GitHub to generate the changelog (`Generate release notes` button).
+
+You can format the generated changelog before publishing - e.g. ensure entries are grouped into categories such as `ENHANCEMENTS`, `BUG FIXES` and `INTERNAL`.
+
+## Security vulnerabilities
+
+Please disclose security vulnerabilities by following the procedure
+described at https://www.hashicorp.com/security#vulnerability-reporting.
diff --git a/vendor/github.com/hashicorp/terraform-registry-address/README.md b/vendor/github.com/hashicorp/terraform-registry-address/README.md
index 27db81f7c1..276bf6f83f 100644
--- a/vendor/github.com/hashicorp/terraform-registry-address/README.md
+++ b/vendor/github.com/hashicorp/terraform-registry-address/README.md
@@ -2,8 +2,9 @@
This module enables parsing, comparison and canonical representation of
[Terraform Registry](https://registry.terraform.io/) **provider** addresses
-(such as `registry.terraform.io/grafana/grafana` or `hashicorp/aws`)
-and **module** addresses (such as `hashicorp/subnets/cidr`).
+(such as `registry.terraform.io/grafana/grafana` or `hashicorp/aws`),
+**module** addresses (such as `hashicorp/subnets/cidr`),
+and **component** addresses (such as `hashicorp/aws` or `example.com/myorg/mycomponent`).
**Provider** addresses can be found in
@@ -18,6 +19,10 @@ and **module** addresses (such as `hashicorp/subnets/cidr`).
of `module` block in Terraform configuration (`*.tf`)
and parts of the address (namespace and name) in the Registry API.
+**Component** addresses can be found within the `source` argument
+of the `component` block in Terraform Stack configuration (`*.tfcomponent.hcl`)
+and parts of the address (namespace and name) in the Registry API.
+
## Compatibility
The module assumes compatibility with Terraform v0.12 and later,
@@ -70,6 +75,24 @@ if err != nil {
// },
```
+### Component
+
+```go
+cAddr, err := ParseComponentSource("hashicorp/aws//modules/vpc")
+if err != nil {
+ // deal with error
+}
+
+// cAddr == Component{
+// Package: ComponentPackage{
+// Host: DefaultModuleRegistryHost,
+// Namespace: "hashicorp",
+// Name: "aws",
+// },
+// Subdir: "modules/vpc",
+// }
+```
+
## Other Module Address Formats
Modules can also be sourced from [other sources](https://www.terraform.io/language/modules/sources)
diff --git a/vendor/github.com/hashicorp/terraform-registry-address/component.go b/vendor/github.com/hashicorp/terraform-registry-address/component.go
new file mode 100644
index 0000000000..171924e076
--- /dev/null
+++ b/vendor/github.com/hashicorp/terraform-registry-address/component.go
@@ -0,0 +1,167 @@
+// Copyright (c) HashiCorp, Inc.
+// SPDX-License-Identifier: MPL-2.0
+
+package tfaddr
+
+import (
+ "fmt"
+ "strings"
+
+ svchost "github.com/hashicorp/terraform-svchost"
+)
+
+// Component represents a component listed in a Terraform component registry.
+// It combines a registry package address with an optional subdirectory path
+// to specify the exact location of a component within a registry package.
+//
+// Components are resolved through a two-step process:
+// 1. The registry package address is used to query the registry API
+// 2. The registry returns a ComponentSourceRemote with the actual source location
+//
+// Example component addresses:
+// - registry.terraform.io/hashicorp/aws
+// - registry.terraform.io/hashicorp/aws//modules/vpc
+// - example.com/myorg/mycomponent//subdir/component
+type Component struct {
+ // Package is the registry package that the target component belongs to.
+ // The component installer must translate this into a ComponentSourceRemote
+ // using the registry API and then take that underlying address's
+ // Package in order to find the actual package location.
+ Package ComponentPackage
+
+ // If Subdir is non-empty then it represents a sub-directory within the
+ // remote package that the registry address eventually resolves to.
+ // This will ultimately become the suffix of the Subdir of the
+ // ComponentSourceRemote that the registry address translates to.
+ //
+ // Subdir uses a normalized forward-slash-based path syntax within the
+ // virtual filesystem represented by the final package. It will never
+ // include `../` or `./` sequences.
+ Subdir string
+}
+
+// ParseComponentSource parses a string representation of a component registry
+// address and returns a Component struct. This function only accepts component
+// registry addresses and will reject any other address type.
+//
+// Supported address formats:
+// - "namespace/name" (uses default registry host)
+// - "hostname/namespace/name" (explicit registry host)
+// - "hostname/namespace/name//subdirectory" (with subdirectory)
+//
+// Examples:
+// - "hashicorp/aws" -> registry.terraform.io/hashicorp/aws
+// - "example.com/myorg/component"
+// - "registry.terraform.io/hashicorp/aws//modules/vpc"
+//
+// The function validates that:
+// - The address has 2 or 3 slash-separated segments
+// - Subdirectories don't escape the package with "../" paths
+// - The hostname (if provided) is not a reserved VCS host
+// - Namespace and component names follow registry naming conventions
+func ParseComponentSource(raw string) (Component, error) {
+ var err error
+
+ // Extract subdirectory path if present (indicated by "//" separator)
+ var subDir string
+ raw, subDir = splitPackageSubdir(raw)
+ if strings.HasPrefix(subDir, "../") {
+ return Component{}, fmt.Errorf("subdirectory path %q leads outside of the component package", subDir)
+ }
+
+ // Split the main address into its components
+ parts := strings.Split(raw, "/")
+ // A valid registry component address has either two or three parts, because the leading hostname part is optional.
+ if len(parts) != 2 && len(parts) != 3 {
+ return Component{}, fmt.Errorf("a component registry source address must have either two or three slash-separated segments")
+ }
+
+ // Default to the standard Terraform registry if no hostname is specified
+ host := DefaultModuleRegistryHost
+ // Check if hostname segment is present
+ if len(parts) == 3 {
+ host, err = svchost.ForComparison(parts[0])
+ if err != nil {
+ // The svchost library doesn't produce very good error messages to
+ // return to an end-user, so we'll use some custom ones here.
+ switch {
+ case strings.Contains(parts[0], "--"):
+ // Looks like possibly punycode, which we don't allow here
+ // to ensure that source addresses are written readably.
+ return Component{}, fmt.Errorf("invalid component registry hostname %q; internationalized domain names must be given as direct unicode characters, not in punycode", parts[0])
+ default:
+ return Component{}, fmt.Errorf("invalid component registry hostname %q", parts[0])
+ }
+ }
+ if !strings.Contains(host.String(), ".") {
+ return Component{}, fmt.Errorf("invalid component registry hostname: must contain at least one dot")
+ }
+ // Discard the hostname prefix now that we've processed it
+ parts = parts[1:]
+ }
+
+ ret := Component{
+ Package: ComponentPackage{
+ Host: host,
+ },
+ Subdir: subDir,
+ }
+
+ // Prevent potential parsing collisions with known VCS hosts
+ // These hostnames are reserved for direct VCS installation
+ if host == svchost.Hostname("github.com") || host == svchost.Hostname("bitbucket.org") || host == svchost.Hostname("gitlab.com") {
+ // NOTE: This may change in the future if we allow VCS installations
+ // from these hosts to be registered in the component registry.
+ // For now, we disallow them to avoid confusion.
+ return ret, fmt.Errorf("can't use %q as a component registry host, because it's reserved for installing directly from version control repositories", host)
+ }
+
+ // Validate and assign the namespace segment
+ if ret.Package.Namespace, err = parseModuleRegistryName(parts[0]); err != nil {
+ if strings.Contains(parts[0], ".") {
+ // Seems like the user omitted one of the latter components in
+ // an address with an explicit hostname.
+ return ret, fmt.Errorf("source address must have two more components after the hostname: the namespace and the name")
+ }
+ return ret, fmt.Errorf("invalid namespace %q: %s", parts[0], err)
+ }
+
+ // Validate and assign the component name segment
+ if ret.Package.Name, err = parseModuleRegistryName(parts[1]); err != nil {
+ if strings.Contains(parts[1], "?") {
+ // The user was trying to include a query string, probably?
+ return ret, fmt.Errorf("component registry addresses may not include a query string portion")
+ }
+ return ret, fmt.Errorf("invalid component name %q: %s", parts[1], err)
+ }
+
+ return ret, nil
+}
+
+// String returns a full representation of the component address, including any
+// additional components that are typically implied by omission in
+// user-written addresses.
+//
+// We typically use this longer representation in error messages, in case
+// the inclusion of normally-omitted components is helpful in debugging
+// unexpected behavior.
+func (c Component) String() string {
+ if c.Subdir != "" {
+ return c.Package.String() + "//" + c.Subdir
+ }
+ return c.Package.String()
+}
+
+// ForDisplay is similar to String but instead returns a representation of
+// the idiomatic way to write the address in configuration, omitting
+// components that are commonly just implied in addresses written by
+// users.
+//
+// We typically use this shorter representation in informational messages,
+// such as the note that we're about to start downloading a package.
+func (c Component) ForDisplay() string {
+ if c.Subdir != "" {
+ return c.Package.ForDisplay() + "//" + c.Subdir
+ }
+ return c.Package.ForDisplay()
+}
diff --git a/vendor/github.com/hashicorp/terraform-registry-address/component_package.go b/vendor/github.com/hashicorp/terraform-registry-address/component_package.go
new file mode 100644
index 0000000000..89f91b72fe
--- /dev/null
+++ b/vendor/github.com/hashicorp/terraform-registry-address/component_package.go
@@ -0,0 +1,82 @@
+// Copyright (c) HashiCorp, Inc.
+// SPDX-License-Identifier: MPL-2.0
+
+package tfaddr
+
+import (
+ "strings"
+
+ svchost "github.com/hashicorp/terraform-svchost"
+)
+
+// ComponentPackage represents a symbolic address for a component in a Terraform
+// component registry. It serves as an indirection layer that allows the component
+// installer to query a registry and translate this symbolic address (along with
+// version constraints provided separately) into a concrete physical source location.
+//
+// ComponentPackage is intentionally distinct from other package address types
+// because they serve different purposes: registry package addresses are exclusively
+// used for registry queries to discover the actual component package location.
+// This separation helps maintainers understand the component installation workflow
+// and enables the type system to enforce proper usage patterns.
+//
+// Example registry addresses:
+// - registry.terraform.io/hashicorp/aws
+// - example.com/myorg/mycomponent
+type ComponentPackage struct {
+ // Host is the hostname of the component registry (e.g., "registry.terraform.io")
+ Host svchost.Hostname
+
+ // Namespace identifies the organization or user that published the component
+ Namespace string
+
+ // Name is the component's name within the namespace
+ Name string
+}
+
+// String returns the full registry address as a human-readable string.
+// This method formats the address for display purposes, using the Unicode
+// representation of hostnames rather than punycode encoding.
+//
+// The returned format is: "hostname/namespace/name"
+// For example: "registry.terraform.io/hashicorp/aws"
+func (s ComponentPackage) String() string {
+ // Note: we're using the "display" form of the hostname here because
+ // for our service hostnames "for display" means something different:
+ // it means to render non-ASCII characters directly as Unicode
+ // characters, rather than using the "punycode" representation we
+ // use for internal processing, and so the "display" representation
+ // is actually what users would write in their configurations.
+ return s.Host.ForDisplay() + "/" + s.ForRegistryProtocol()
+}
+
+// ForDisplay returns a string representation suitable for display to users,
+// omitting the registry hostname when it's the default registry host.
+// This is the format users would typically write in their configurations.
+//
+// For the default registry, returns: "namespace/name"
+// For custom registries, returns: "hostname/namespace/name"
+func (s ComponentPackage) ForDisplay() string {
+ if s.Host == DefaultModuleRegistryHost {
+ return s.ForRegistryProtocol()
+ }
+ return s.Host.ForDisplay() + "/" + s.ForRegistryProtocol()
+}
+
+// ForRegistryProtocol returns a string representation of just the namespace,
+// name, and target system portions of the address, always omitting the
+// registry hostname and the subdirectory portion, if any.
+//
+// This is primarily intended for generating addresses to send to the
+// registry in question via the registry protocol, since the protocol
+// skips sending the registry its own hostname as part of identifiers.
+//
+// The returned format is: "namespace/name"
+// For example: "hashicorp/aws"
+func (s ComponentPackage) ForRegistryProtocol() string {
+ var buf strings.Builder
+ buf.WriteString(s.Namespace)
+ buf.WriteByte('/')
+ buf.WriteString(s.Name)
+ return buf.String()
+}
diff --git a/vendor/github.com/hashicorp/terraform-registry-address/provider.go b/vendor/github.com/hashicorp/terraform-registry-address/provider.go
index 7fb252ea22..e0c0baa7b5 100644
--- a/vendor/github.com/hashicorp/terraform-registry-address/provider.go
+++ b/vendor/github.com/hashicorp/terraform-registry-address/provider.go
@@ -128,6 +128,59 @@ func (pt Provider) IsZero() bool {
return pt == Provider{}
}
+// Validate returns error if the Provider representing "modern"
+// (Terraform 0.14+) address is not valid. Valid address implies
+// both valid namespace and a non-empty hostname.
+//
+// Validation makes assumptions equivalent to [ValidateProviderAddress].
+//
+// If you can guarantee [ValidateProviderAddress] was called
+// on the input and the [Provider] data was not mutated
+// you should not need to call this method.
+func (pt Provider) Validate() error {
+ if pt.IsZero() {
+ return &ParserError{
+ Summary: "Empty provider address",
+ Detail: "Expected address composed of hostname, provider namespace and name",
+ }
+ }
+
+ if pt.Hostname == "" {
+ return &ParserError{
+ Summary: "Unknown hostname",
+ Detail: "Expected hostname in the provider address to be set",
+ }
+ }
+ if pt.Namespace == "" {
+ return &ParserError{
+ Summary: "Unknown provider namespace",
+ Detail: "Expected provider namespace to be set",
+ }
+ }
+ if pt.Type == "" {
+ return &ParserError{
+ Summary: "Unknown provider type",
+ Detail: "Expected provider type to be set",
+ }
+ }
+
+ if !pt.HasKnownNamespace() {
+ return &ParserError{
+ Summary: "Unknown provider namespace",
+ Detail: `Expected FQN in the format "hostname/namespace/name"`,
+ }
+ }
+
+ if pt.IsLegacy() {
+ return &ParserError{
+ Summary: "Invalid legacy provider namespace",
+ Detail: `Expected FQN in the format "hostname/namespace/name"`,
+ }
+ }
+
+ return nil
+}
+
// HasKnownNamespace returns true if the provider namespace is known
// (also if it is legacy namespace)
func (pt Provider) HasKnownNamespace() bool {
@@ -162,6 +215,31 @@ func (pt Provider) LessThan(other Provider) bool {
}
}
+// MarshalText implements encoding.TextMarshaler interface.
+//
+// It encodes the [Provider] into an FQN, equivalent to [String]
+// or returns an error for an invalid [Provider].
+func (pt Provider) MarshalText() ([]byte, error) {
+ err := pt.Validate()
+ if err != nil {
+ return nil, err
+ }
+
+ return []byte(pt.String()), nil
+}
+
+// UnmarshalText implements encoding.TextUnmarshaler interface.
+//
+// It decodes a valid provider address or returns an error
+// using [ParseProviderSource].
+//
+// [Validate] should be called on the decoded [Provider]
+// if modern-style Terraform 0.14+ addresses are expected.
+func (pt *Provider) UnmarshalText(text []byte) (err error) {
+ *pt, err = ParseProviderSource(string(text))
+ return
+}
+
// IsLegacy returns true if the provider is a legacy-style provider
func (pt Provider) IsLegacy() bool {
if pt.IsZero() {
@@ -182,9 +260,10 @@ func (pt Provider) Equals(other Provider) bool {
// terraform-config-inspect.
//
// The following are valid source string formats:
-// name
-// namespace/name
-// hostname/namespace/name
+//
+// name
+// namespace/name
+// hostname/namespace/name
//
// "name"-only format is parsed as -/name (i.e. legacy namespace)
// requiring further identification of the namespace via Registry API
@@ -296,7 +375,7 @@ func ParseProviderSource(str string) (Provider, error) {
// MustParseProviderSource is a wrapper around ParseProviderSource that panics if
// it returns an error.
-func MustParseProviderSource(raw string) (Provider) {
+func MustParseProviderSource(raw string) Provider {
p, err := ParseProviderSource(raw)
if err != nil {
panic(err)
@@ -332,7 +411,7 @@ func ValidateProviderAddress(raw string) error {
}
}
- if !p.IsLegacy() {
+ if p.IsLegacy() {
return &ParserError{
Summary: "Invalid legacy provider namespace",
Detail: `Expected FQN in the format "hostname/namespace/name"`,
diff --git a/vendor/github.com/hashicorp/yamux/LICENSE b/vendor/github.com/hashicorp/yamux/LICENSE
index f0e5c79e18..b7df72ed21 100644
--- a/vendor/github.com/hashicorp/yamux/LICENSE
+++ b/vendor/github.com/hashicorp/yamux/LICENSE
@@ -1,3 +1,5 @@
+Copyright (c) 2014 HashiCorp, Inc.
+
Mozilla Public License, version 2.0
1. Definitions
diff --git a/vendor/github.com/hashicorp/yamux/mux.go b/vendor/github.com/hashicorp/yamux/mux.go
index 0c3e67b022..d3d5b3fe3c 100644
--- a/vendor/github.com/hashicorp/yamux/mux.go
+++ b/vendor/github.com/hashicorp/yamux/mux.go
@@ -3,7 +3,6 @@ package yamux
import (
"fmt"
"io"
- "log"
"os"
"time"
)
@@ -51,7 +50,12 @@ type Config struct {
// Logger is used to pass in the logger to be used. Either Logger or
// LogOutput can be set, not both.
- Logger *log.Logger
+ Logger Logger
+}
+
+func (c *Config) Clone() *Config {
+ c2 := *c
+ return &c2
}
// DefaultConfig is used to return a default configuration
diff --git a/vendor/github.com/hashicorp/yamux/session.go b/vendor/github.com/hashicorp/yamux/session.go
index 38fe3ed1f0..c08c4dac69 100644
--- a/vendor/github.com/hashicorp/yamux/session.go
+++ b/vendor/github.com/hashicorp/yamux/session.go
@@ -3,6 +3,7 @@ package yamux
import (
"bufio"
"bytes"
+ "context"
"fmt"
"io"
"io/ioutil"
@@ -34,7 +35,7 @@ type Session struct {
config *Config
// logger is used for our logs
- logger *log.Logger
+ logger Logger
// conn is the underlying connection
conn io.ReadWriteCloser
@@ -250,6 +251,22 @@ func (s *Session) AcceptStream() (*Stream, error) {
}
}
+// AcceptStream is used to block until the next available stream
+// is ready to be accepted.
+func (s *Session) AcceptStreamWithContext(ctx context.Context) (*Stream, error) {
+ select {
+ case <-ctx.Done():
+ return nil, ctx.Err()
+ case stream := <-s.acceptCh:
+ if err := stream.sendWindowUpdate(); err != nil {
+ return nil, err
+ }
+ return stream, nil
+ case <-s.shutdownCh:
+ return nil, s.shutdownErr
+ }
+}
+
// Close is used to close the session and all streams.
// Attempts to send a GoAway before closing the connection.
func (s *Session) Close() error {
@@ -339,7 +356,7 @@ func (s *Session) Ping() (time.Duration, error) {
}
// Compute the RTT
- return time.Now().Sub(start), nil
+ return time.Since(start), nil
}
// keepalive is a long running goroutine that periodically does
diff --git a/vendor/github.com/hashicorp/yamux/spec.md b/vendor/github.com/hashicorp/yamux/spec.md
index 183d797bde..cb98618bdb 100644
--- a/vendor/github.com/hashicorp/yamux/spec.md
+++ b/vendor/github.com/hashicorp/yamux/spec.md
@@ -100,7 +100,7 @@ fire a request without waiting for the RTT of the ACK.
This does introduce the possibility of a connection being rejected
after data has been sent already. This is a slight semantic difference
-from TCP, where the conection cannot be refused after it is opened.
+from TCP, where the connection cannot be refused after it is opened.
Clients should be prepared to handle this by checking for an error
that indicates a RST was received.
diff --git a/vendor/github.com/hashicorp/yamux/stream.go b/vendor/github.com/hashicorp/yamux/stream.go
index 23d08fcc8d..31168d929c 100644
--- a/vendor/github.com/hashicorp/yamux/stream.go
+++ b/vendor/github.com/hashicorp/yamux/stream.go
@@ -95,10 +95,12 @@ func (s *Stream) StreamID() uint32 {
func (s *Stream) Read(b []byte) (n int, err error) {
defer asyncNotify(s.recvNotifyCh)
START:
+
+ // If the stream is closed and there's no data buffered, return EOF
s.stateLock.Lock()
switch s.state {
case streamLocalClose:
- fallthrough
+ // LocalClose only prohibits further local writes. Handle reads normally.
case streamRemoteClose:
fallthrough
case streamClosed:
@@ -138,19 +140,22 @@ WAIT:
var timer *time.Timer
readDeadline := s.readDeadline.Load().(time.Time)
if !readDeadline.IsZero() {
- delay := readDeadline.Sub(time.Now())
+ delay := time.Until(readDeadline)
timer = time.NewTimer(delay)
timeout = timer.C
}
select {
+ case <-s.session.shutdownCh:
case <-s.recvNotifyCh:
- if timer != nil {
- timer.Stop()
- }
- goto START
case <-timeout:
return 0, ErrTimeout
}
+ if timer != nil {
+ if !timer.Stop() {
+ <-timeout
+ }
+ }
+ goto START
}
// Write is used to write to the stream
@@ -219,18 +224,25 @@ START:
WAIT:
var timeout <-chan time.Time
+ var timer *time.Timer
writeDeadline := s.writeDeadline.Load().(time.Time)
if !writeDeadline.IsZero() {
- delay := writeDeadline.Sub(time.Now())
- timeout = time.After(delay)
+ delay := time.Until(writeDeadline)
+ timer = time.NewTimer(delay)
+ timeout = timer.C
}
select {
+ case <-s.session.shutdownCh:
case <-s.sendNotifyCh:
- goto START
case <-timeout:
return 0, ErrTimeout
}
- return 0, nil
+ if timer != nil {
+ if !timer.Stop() {
+ <-timeout
+ }
+ }
+ goto START
}
// sendFlags determines any flags that are appropriate
@@ -380,7 +392,7 @@ func (s *Stream) closeTimeout() {
defer s.sendLock.Unlock()
hdr := header(make([]byte, headerSize))
hdr.encode(typeWindowUpdate, flagRST, s.id, 0)
- s.session.sendNoWait(hdr)
+ _ = s.session.sendNoWait(hdr)
}
// forceClose is used for when the session is exiting
diff --git a/vendor/github.com/hashicorp/yamux/util.go b/vendor/github.com/hashicorp/yamux/util.go
index 8a73e9249a..4462518a17 100644
--- a/vendor/github.com/hashicorp/yamux/util.go
+++ b/vendor/github.com/hashicorp/yamux/util.go
@@ -5,6 +5,13 @@ import (
"time"
)
+// Logger is a abstract of *log.Logger
+type Logger interface {
+ Print(v ...interface{})
+ Printf(format string, v ...interface{})
+ Println(v ...interface{})
+}
+
var (
timerPool = &sync.Pool{
New: func() interface{} {
diff --git a/vendor/github.com/maratori/testableexamples/pkg/testableexamples/testableexamples.go b/vendor/github.com/maratori/testableexamples/pkg/testableexamples/testableexamples.go
index 26d22c703a..91a8509d2a 100644
--- a/vendor/github.com/maratori/testableexamples/pkg/testableexamples/testableexamples.go
+++ b/vendor/github.com/maratori/testableexamples/pkg/testableexamples/testableexamples.go
@@ -13,7 +13,7 @@ func NewAnalyzer() *analysis.Analyzer {
return &analysis.Analyzer{
Name: "testableexamples",
Doc: "linter checks if examples are testable (have an expected output)",
- Run: func(pass *analysis.Pass) (interface{}, error) {
+ Run: func(pass *analysis.Pass) (any, error) {
testFiles := make([]*ast.File, 0, len(pass.Files))
for _, file := range pass.Files {
fileName := pass.Fset.File(file.Pos()).Name()
diff --git a/vendor/github.com/maratori/testpackage/pkg/testpackage/testpackage.go b/vendor/github.com/maratori/testpackage/pkg/testpackage/testpackage.go
index 2e05729728..6eebabc2db 100644
--- a/vendor/github.com/maratori/testpackage/pkg/testpackage/testpackage.go
+++ b/vendor/github.com/maratori/testpackage/pkg/testpackage/testpackage.go
@@ -2,11 +2,11 @@ package testpackage
import (
"flag"
+ "go/ast"
"regexp"
+ "slices"
"strings"
- "go/ast"
-
"golang.org/x/tools/go/analysis"
)
@@ -25,10 +25,8 @@ const (
func processTestFile(pass *analysis.Pass, f *ast.File, allowedPackages []string) {
packageName := f.Name.Name
- for _, p := range allowedPackages {
- if p == packageName {
- return
- }
+ if slices.Contains(allowedPackages, packageName) {
+ return
}
if !strings.HasSuffix(packageName, "_test") {
@@ -51,7 +49,7 @@ func NewAnalyzer() *analysis.Analyzer {
Name: "testpackage",
Doc: "linter that makes you use a separate _test package",
Flags: fs,
- Run: func(pass *analysis.Pass) (interface{}, error) {
+ Run: func(pass *analysis.Pass) (any, error) {
allowedPackages := strings.Split(allowPackagesStr, ",")
skipFile, err := regexp.Compile(skipFileRegexp)
if err != nil {
diff --git a/vendor/github.com/mitchellh/go-wordwrap/wordwrap.go b/vendor/github.com/mitchellh/go-wordwrap/wordwrap.go
index ac67205bc2..f7bedda388 100644
--- a/vendor/github.com/mitchellh/go-wordwrap/wordwrap.go
+++ b/vendor/github.com/mitchellh/go-wordwrap/wordwrap.go
@@ -5,6 +5,8 @@ import (
"unicode"
)
+const nbsp = 0xA0
+
// WrapString wraps the given string within lim width in characters.
//
// Wrapping is currently naive and only happens at white-space. A future
@@ -18,50 +20,58 @@ func WrapString(s string, lim uint) string {
var current uint
var wordBuf, spaceBuf bytes.Buffer
+ var wordBufLen, spaceBufLen uint
for _, char := range s {
if char == '\n' {
if wordBuf.Len() == 0 {
- if current+uint(spaceBuf.Len()) > lim {
+ if current+spaceBufLen > lim {
current = 0
} else {
- current += uint(spaceBuf.Len())
+ current += spaceBufLen
spaceBuf.WriteTo(buf)
}
spaceBuf.Reset()
+ spaceBufLen = 0
} else {
- current += uint(spaceBuf.Len() + wordBuf.Len())
+ current += spaceBufLen + wordBufLen
spaceBuf.WriteTo(buf)
spaceBuf.Reset()
+ spaceBufLen = 0
wordBuf.WriteTo(buf)
wordBuf.Reset()
+ wordBufLen = 0
}
buf.WriteRune(char)
current = 0
- } else if unicode.IsSpace(char) {
+ } else if unicode.IsSpace(char) && char != nbsp {
if spaceBuf.Len() == 0 || wordBuf.Len() > 0 {
- current += uint(spaceBuf.Len() + wordBuf.Len())
+ current += spaceBufLen + wordBufLen
spaceBuf.WriteTo(buf)
spaceBuf.Reset()
+ spaceBufLen = 0
wordBuf.WriteTo(buf)
wordBuf.Reset()
+ wordBufLen = 0
}
spaceBuf.WriteRune(char)
+ spaceBufLen++
} else {
-
wordBuf.WriteRune(char)
+ wordBufLen++
- if current+uint(spaceBuf.Len()+wordBuf.Len()) > lim && uint(wordBuf.Len()) < lim {
+ if current+wordBufLen+spaceBufLen > lim && wordBufLen < lim {
buf.WriteRune('\n')
current = 0
spaceBuf.Reset()
+ spaceBufLen = 0
}
}
}
if wordBuf.Len() == 0 {
- if current+uint(spaceBuf.Len()) <= lim {
+ if current+spaceBufLen <= lim {
spaceBuf.WriteTo(buf)
}
} else {
diff --git a/vendor/github.com/oklog/run/.travis.yml b/vendor/github.com/oklog/run/.travis.yml
deleted file mode 100644
index 362bdd41c0..0000000000
--- a/vendor/github.com/oklog/run/.travis.yml
+++ /dev/null
@@ -1,12 +0,0 @@
-language: go
-sudo: false
-go:
- - 1.x
- - tip
-install:
- - go get -v github.com/golang/lint/golint
- - go build ./...
-script:
- - go vet ./...
- - $HOME/gopath/bin/golint .
- - go test -v -race ./...
diff --git a/vendor/github.com/oklog/run/README.md b/vendor/github.com/oklog/run/README.md
index a7228cd9a3..eba7d11cf3 100644
--- a/vendor/github.com/oklog/run/README.md
+++ b/vendor/github.com/oklog/run/README.md
@@ -1,7 +1,7 @@
# run
[](https://godoc.org/github.com/oklog/run)
-[](https://travis-ci.org/oklog/run)
+[](https://github.com/oklog/run/actions?query=workflow%3ATest)
[](https://goreportcard.com/report/github.com/oklog/run)
[](https://raw.githubusercontent.com/oklog/run/master/LICENSE)
@@ -10,9 +10,11 @@ run.Group is a universal mechanism to manage goroutine lifecycles.
Create a zero-value run.Group, and then add actors to it. Actors are defined as
a pair of functions: an **execute** function, which should run synchronously;
and an **interrupt** function, which, when invoked, should cause the execute
-function to return. Finally, invoke Run, which blocks until the first actor
-returns. This general-purpose API allows callers to model pretty much any
-runnable task, and achieve well-defined lifecycle semantics for the group.
+function to return. Finally, invoke Run, which concurrently runs all of the
+actors, waits until the first actor exits, invokes the interrupt functions, and
+finally returns control to the caller only once all actors have returned. This
+general-purpose API allows callers to model pretty much any runnable task, and
+achieve well-defined lifecycle semantics for the group.
run.Group was written to manage component lifecycles in func main for
[OK Log](https://github.com/oklog/oklog).
diff --git a/vendor/github.com/oklog/run/actors.go b/vendor/github.com/oklog/run/actors.go
new file mode 100644
index 0000000000..ef93495d3f
--- /dev/null
+++ b/vendor/github.com/oklog/run/actors.go
@@ -0,0 +1,38 @@
+package run
+
+import (
+ "context"
+ "fmt"
+ "os"
+ "os/signal"
+)
+
+// SignalHandler returns an actor, i.e. an execute and interrupt func, that
+// terminates with SignalError when the process receives one of the provided
+// signals, or the parent context is canceled.
+func SignalHandler(ctx context.Context, signals ...os.Signal) (execute func() error, interrupt func(error)) {
+ ctx, cancel := context.WithCancel(ctx)
+ return func() error {
+ c := make(chan os.Signal, 1)
+ signal.Notify(c, signals...)
+ select {
+ case sig := <-c:
+ return SignalError{Signal: sig}
+ case <-ctx.Done():
+ return ctx.Err()
+ }
+ }, func(error) {
+ cancel()
+ }
+}
+
+// SignalError is returned by the signal handler's execute function
+// when it terminates due to a received signal.
+type SignalError struct {
+ Signal os.Signal
+}
+
+// Error implements the error interface.
+func (e SignalError) Error() string {
+ return fmt.Sprintf("received signal %s", e.Signal)
+}
diff --git a/vendor/github.com/quasilyte/go-ruleguard/ruleguard/irconv/irconv.go b/vendor/github.com/quasilyte/go-ruleguard/ruleguard/irconv/irconv.go
index cc40506af6..d970d77225 100644
--- a/vendor/github.com/quasilyte/go-ruleguard/ruleguard/irconv/irconv.go
+++ b/vendor/github.com/quasilyte/go-ruleguard/ruleguard/irconv/irconv.go
@@ -7,6 +7,7 @@ import (
"go/token"
"go/types"
"path"
+ "regexp"
"strconv"
"strings"
@@ -41,10 +42,11 @@ func ConvertFile(ctx *Context, f *ast.File) (result *ir.File, err error) {
}()
conv := &converter{
- types: ctx.Types,
- pkg: ctx.Pkg,
- fset: ctx.Fset,
- src: ctx.Src,
+ types: ctx.Types,
+ pkg: ctx.Pkg,
+ fset: ctx.Fset,
+ src: ctx.Src,
+ versionPathRe: regexp.MustCompile(`^v[0-9]+$`),
}
result = conv.ConvertFile(f)
return result, nil
@@ -66,6 +68,8 @@ type converter struct {
fset *token.FileSet
src []byte
+ versionPathRe *regexp.Regexp
+
group *ir.RuleGroup
groupFuncs []localMacroFunc
@@ -224,6 +228,11 @@ func (conv *converter) convertRuleGroup(decl *ast.FuncDecl) *ir.RuleGroup {
panic(conv.errorf(call, "Import() should be used before any rules definitions"))
}
conv.doMatcherImport(call)
+ case "ImportAs":
+ if seenRules {
+ panic(conv.errorf(call, "ImportAs() should be used before any rules definitions"))
+ }
+ conv.doMatcherImportAs(call)
default:
seenRules = true
conv.convertRuleExpr(call)
@@ -375,7 +384,24 @@ func (conv *converter) localDefine(assign *ast.AssignStmt) {
func (conv *converter) doMatcherImport(call *ast.CallExpr) {
pkgPath := conv.parseStringArg(call.Args[0])
+
+ // Try to be at least somewhat module-aware.
+ // If the last path part is "/v%d", we might want to take
+ // the previous path part as a package name.
pkgName := path.Base(pkgPath)
+ if conv.versionPathRe.MatchString(pkgName) {
+ pkgName = path.Base(path.Dir(pkgPath))
+ }
+
+ conv.group.Imports = append(conv.group.Imports, ir.PackageImport{
+ Path: pkgPath,
+ Name: pkgName,
+ })
+}
+
+func (conv *converter) doMatcherImportAs(call *ast.CallExpr) {
+ pkgPath := conv.parseStringArg(call.Args[0])
+ pkgName := conv.parseStringArg(call.Args[1])
conv.group.Imports = append(conv.group.Imports, ir.PackageImport{
Path: pkgPath,
Name: pkgName,
diff --git a/vendor/github.com/zclconf/go-cty/cty/capsule_ops.go b/vendor/github.com/zclconf/go-cty/cty/capsule_ops.go
index 102d26fa95..f6ee198143 100644
--- a/vendor/github.com/zclconf/go-cty/cty/capsule_ops.go
+++ b/vendor/github.com/zclconf/go-cty/cty/capsule_ops.go
@@ -14,7 +14,7 @@ type CapsuleOps struct {
// corresponding type. Conventionally this should return a string
// representation of an expression that would produce an equivalent
// value.
- GoString func(val interface{}) string
+ GoString func(val any) string
// TypeGoString provides the GoString implementation for the corresponding
// capsule type itself.
@@ -37,7 +37,7 @@ type CapsuleOps struct {
//
// If RawEquals is nil then Equals must also be nil, selecting the default
// pointer-identity comparison instead.
- Equals func(a, b interface{}) Value
+ Equals func(a, b any) Value
// RawEquals provides the implementation of the RawEquals operation.
// This is called only with known, non-null values of the corresponding
@@ -47,7 +47,7 @@ type CapsuleOps struct {
//
// If RawEquals is nil, values of the corresponding type are compared by
// pointer identity of the encapsulated value.
- RawEquals func(a, b interface{}) bool
+ RawEquals func(a, b any) bool
// HashKey provides a hashing function for values of the corresponding
// capsule type. If defined, cty will use the resulting hashes as part
@@ -59,7 +59,7 @@ type CapsuleOps struct {
// RawEquals to return true when given those values. If a given type
// does not uphold that assumption then sets including this type will
// not behave correctly.
- HashKey func(v interface{}) string
+ HashKey func(v any) string
// ConversionFrom can provide conversions from the corresponding type to
// some other type when values of the corresponding type are used with
@@ -68,7 +68,7 @@ type CapsuleOps struct {
// This function itself returns a function, allowing it to switch its
// behavior depending on the given source type. Return nil to indicate
// that no such conversion is available.
- ConversionFrom func(src Type) func(interface{}, Path) (Value, error)
+ ConversionFrom func(src Type) func(any, Path) (Value, error)
// ConversionTo can provide conversions to the corresponding type from
// some other type when values of the corresponding type are used with
@@ -77,7 +77,7 @@ type CapsuleOps struct {
// This function itself returns a function, allowing it to switch its
// behavior depending on the given destination type. Return nil to indicate
// that no such conversion is available.
- ConversionTo func(dst Type) func(Value, Path) (interface{}, error)
+ ConversionTo func(dst Type) func(Value, Path) (any, error)
// ExtensionData is an extension point for applications that wish to
// create their own extension features using capsule types.
@@ -99,7 +99,7 @@ type CapsuleOps struct {
// should do so defensively: if the result of ExtensionData is not valid,
// prefer to ignore it or gracefully produce an error rather than causing
// a panic.
- ExtensionData func(key interface{}) interface{}
+ ExtensionData func(key any) any
}
// noCapsuleOps is a pointer to a CapsuleOps with no functions set, which
@@ -135,7 +135,7 @@ func (ty Type) CapsuleOps() *CapsuleOps {
// on the purpose of and usage of this mechanism.
//
// If CapsuleExtensionData is called on a non-capsule type then it will panic.
-func (ty Type) CapsuleExtensionData(key interface{}) interface{} {
+func (ty Type) CapsuleExtensionData(key any) any {
ops := ty.CapsuleOps()
if ops.ExtensionData == nil {
return nil
diff --git a/vendor/github.com/zclconf/go-cty/cty/convert/conversion.go b/vendor/github.com/zclconf/go-cty/cty/convert/conversion.go
index bc79df8cf3..423b62fc27 100644
--- a/vendor/github.com/zclconf/go-cty/cty/convert/conversion.go
+++ b/vendor/github.com/zclconf/go-cty/cty/convert/conversion.go
@@ -171,12 +171,16 @@ func getConversionKnown(in cty.Type, out cty.Type, unsafe bool) conversion {
}
if out.IsCapsuleType() {
if fn := out.CapsuleOps().ConversionTo; fn != nil {
- return conversionToCapsule(in, out, fn)
+ if conv := conversionToCapsule(in, out, fn); conv != nil {
+ return conv
+ }
}
}
if in.IsCapsuleType() {
if fn := in.CapsuleOps().ConversionFrom; fn != nil {
- return conversionFromCapsule(in, out, fn)
+ if conv := conversionFromCapsule(in, out, fn); conv != nil {
+ return conv
+ }
}
}
// No conversion operation is available, then.
diff --git a/vendor/github.com/zclconf/go-cty/cty/convert/conversion_capsule.go b/vendor/github.com/zclconf/go-cty/cty/convert/conversion_capsule.go
index ded4079d42..411ea3fa6f 100644
--- a/vendor/github.com/zclconf/go-cty/cty/convert/conversion_capsule.go
+++ b/vendor/github.com/zclconf/go-cty/cty/convert/conversion_capsule.go
@@ -4,7 +4,7 @@ import (
"github.com/zclconf/go-cty/cty"
)
-func conversionToCapsule(inTy, outTy cty.Type, fn func(inTy cty.Type) func(cty.Value, cty.Path) (interface{}, error)) conversion {
+func conversionToCapsule(inTy, outTy cty.Type, fn func(inTy cty.Type) func(cty.Value, cty.Path) (any, error)) conversion {
rawConv := fn(inTy)
if rawConv == nil {
return nil
@@ -19,7 +19,7 @@ func conversionToCapsule(inTy, outTy cty.Type, fn func(inTy cty.Type) func(cty.V
}
}
-func conversionFromCapsule(inTy, outTy cty.Type, fn func(outTy cty.Type) func(interface{}, cty.Path) (cty.Value, error)) conversion {
+func conversionFromCapsule(inTy, outTy cty.Type, fn func(outTy cty.Type) func(any, cty.Path) (cty.Value, error)) conversion {
rawConv := fn(outTy)
if rawConv == nil {
return nil
diff --git a/vendor/github.com/zclconf/go-cty/cty/convert/conversion_collection.go b/vendor/github.com/zclconf/go-cty/cty/convert/conversion_collection.go
index 05399c9a67..451367c7d7 100644
--- a/vendor/github.com/zclconf/go-cty/cty/convert/conversion_collection.go
+++ b/vendor/github.com/zclconf/go-cty/cty/convert/conversion_collection.go
@@ -162,7 +162,7 @@ func conversionCollectionToMap(ety cty.Type, conv conversion) conversion {
if ety == cty.DynamicPseudoType {
return cty.MapValEmpty(val.Type().ElementType()), nil
}
- return cty.MapValEmpty(ety), nil
+ return cty.MapValEmpty(ety.WithoutOptionalAttributesDeep()), nil
}
if ety.IsCollectionType() || ety.IsObjectType() {
diff --git a/vendor/github.com/zclconf/go-cty/cty/convert/mismatch_msg.go b/vendor/github.com/zclconf/go-cty/cty/convert/mismatch_msg.go
index 5c1e114d9f..81538b0a47 100644
--- a/vendor/github.com/zclconf/go-cty/cty/convert/mismatch_msg.go
+++ b/vendor/github.com/zclconf/go-cty/cty/convert/mismatch_msg.go
@@ -53,6 +53,9 @@ func MismatchMessage(got, want cty.Type) string {
case got.IsCollectionType() && want.IsCollectionType():
return mismatchMessageCollectionsFromCollections(got, want)
+ case !typesAreLikelyToCauseConfusion(got, want):
+ return fmt.Sprintf("%s required, but have %s", want.FriendlyName(), got.FriendlyName())
+
default:
// If we have nothing better to say, we'll just state what was required.
return want.FriendlyNameForConstraint() + " required"
@@ -224,3 +227,55 @@ func mismatchMessageCollectionsFromCollections(got, want cty.Type) string {
}
return fmt.Sprintf("incorrect %s: %s", noun, MismatchMessage(gotEty, wantEty))
}
+
+func typesAreLikelyToCauseConfusion(got, want cty.Type) bool {
+ // NOTE: This function is intended to be used as the penultemate test
+ // in MismatchMessage, and so it intentionally does not address
+ // combinations that are already addressed by the more specific
+ // earlier tests.
+ if gotP, wantP := got.IsPrimitiveType(), want.IsPrimitiveType(); gotP != wantP {
+ // There's never any situation where a primitive type could successfully
+ // convert to a non-primitive one, so this is very unlikely to be
+ // intended as an automatic type conversion. This case is doing most
+ // of the useful work of this function, allowing us to report such
+ // things as "string required, but got tuple".
+ return false
+ }
+ if want == cty.String {
+ // All of the primitive types can always successfully convert to
+ // string, regardless of value.
+ return false
+ }
+ if (want == cty.Bool && got == cty.Number) || (got == cty.Bool && want == cty.Number) {
+ // There are no automatic conversions between bool and number, so
+ // describing both directions of this is unlikely to cause confusion.
+ return false
+ }
+ if got.IsCollectionType() && want.IsCollectionType() && !got.ElementType().HasDynamicTypes() && want.ElementType().HasDynamicTypes() {
+ // Describing mismatches of collection element types is helpful
+ // when we have specific types to report, but confusing when
+ // there are any inexact types involved because readers tend to
+ // then think the inexactness of the element type is the problem,
+ // when it's far more likely to be the collection type kind that's
+ // causing the problem.
+ return false
+ }
+ if got.IsTupleType() && want.IsObjectType() || got.IsObjectType() && got.IsTupleType() {
+ // The structural type kinds get described just by their bare names,
+ // "tuple" or "object", and so they are not confusing when they
+ // differ. They _are_ potentially confusing when we have matching kinds
+ // but different element types within, but thankfully that's most
+ // often handled by one of the earlier cases in MismatchMessage.
+ return false
+ }
+ // We are intentionally a little more vague for string-to-number and
+ // string-to-bool conversions because the rules for those are a little
+ // too subtle to be described purely as "need X but want Y", and historical
+ // experience shows that describing it that way causes folks to focus
+ // on the wrong problem (their value is wrong, not their type).
+
+ // If we find that we're getting here in additional specific cases where
+ // it would be more helpful than confusing to report both types then
+ // we'll add additional rules here in a future version.
+ return true
+}
diff --git a/vendor/github.com/zclconf/go-cty/cty/ctymarks/doc.go b/vendor/github.com/zclconf/go-cty/cty/ctymarks/doc.go
new file mode 100644
index 0000000000..ff4c6c1a0c
--- /dev/null
+++ b/vendor/github.com/zclconf/go-cty/cty/ctymarks/doc.go
@@ -0,0 +1,3 @@
+// Package ctymarks contains some ancillary types, values, and constants for
+// use with mark-related parts of the main cty package.
+package ctymarks
diff --git a/vendor/github.com/zclconf/go-cty/cty/ctymarks/wrangle.go b/vendor/github.com/zclconf/go-cty/cty/ctymarks/wrangle.go
new file mode 100644
index 0000000000..8b3d6ed328
--- /dev/null
+++ b/vendor/github.com/zclconf/go-cty/cty/ctymarks/wrangle.go
@@ -0,0 +1,58 @@
+package ctymarks
+
+// WrangleAction values each describe an action to be taken for a particular
+// mark at a particular path that has been visited by a [WrangleFunc].
+//
+// A nil value of this type represents taking no action at all, and thereby
+// potentially allowing other later functions to decide an action instead.
+type WrangleAction interface {
+ wrangleAction()
+}
+
+type simpleWrangleAction rune
+
+func (w simpleWrangleAction) wrangleAction() {}
+
+// WrangleKeep is a [WrangleAction] that indicates that the given mark
+// should be retained at the given path and that no subsequent wrangle functions
+// in the same operation should be given an opportunity to visit the same mark.
+const WrangleKeep = simpleWrangleAction('k')
+
+// WrangleDrop is a [WrangleAction] that indicates that the given mark
+// should be dropped at the given path, and that no subsequent wrangle functions
+// in the same operation should be given an opportunity to visit the same mark.
+const WrangleDrop = simpleWrangleAction('d')
+
+// WrangleExpand is a [WrangleAction] that indicates that the given mark
+// should be transferred to the top-level value that the current mark wrangling
+// process is operating on.
+//
+// This effectively means that the mark then applies to all parts of the
+// original top-level value, rather than to only a small part of the nested
+// data structure within it.
+const WrangleExpand = simpleWrangleAction('e')
+
+// WrangleReplace returns a [WrangleAction] that indicates that the given
+// mark should be removed and the given mark inserted in its place.
+//
+// This could be useful when values must cross between systems that use
+// different marks to represent similar concepts, for example.
+func WrangleReplace(newMark any) WrangleAction {
+ if newMark == nil {
+ panic("ctymarks.WrangleReplace with nil mark")
+ }
+ return wrangleReplaceAction{newMark}
+}
+
+// WrangleReplaceMark returns the new mark for the given action if it was
+// created using [WrangleReplace], or nil if it is any other kind of action.
+func WrangleReplaceMark(action WrangleAction) any {
+ replace, _ := action.(wrangleReplaceAction)
+ return replace.newMark
+}
+
+type wrangleReplaceAction struct {
+ newMark any
+}
+
+func (w wrangleReplaceAction) wrangleAction() {}
diff --git a/vendor/github.com/zclconf/go-cty/cty/element_iterator.go b/vendor/github.com/zclconf/go-cty/cty/element_iterator.go
index 62c9ea57cd..2f7ec4bfe1 100644
--- a/vendor/github.com/zclconf/go-cty/cty/element_iterator.go
+++ b/vendor/github.com/zclconf/go-cty/cty/element_iterator.go
@@ -11,11 +11,11 @@ import (
//
// Its usage pattern is as follows:
//
-// it := val.ElementIterator()
-// for it.Next() {
-// key, val := it.Element()
-// // ...
-// }
+// it := val.ElementIterator()
+// for it.Next() {
+// key, val := it.Element()
+// // ...
+// }
type ElementIterator interface {
Next() bool
Element() (key Value, value Value)
@@ -46,13 +46,13 @@ func elementIterator(val Value) ElementIterator {
case val.ty.IsListType():
return &listElementIterator{
ety: val.ty.ElementType(),
- vals: val.v.([]interface{}),
+ vals: val.v.([]any),
idx: -1,
}
case val.ty.IsMapType():
// We iterate the keys in a predictable lexicographical order so
// that results will always be stable given the same input map.
- rawMap := val.v.(map[string]interface{})
+ rawMap := val.v.(map[string]any)
keys := make([]string, 0, len(rawMap))
for key := range rawMap {
keys = append(keys, key)
@@ -66,7 +66,7 @@ func elementIterator(val Value) ElementIterator {
idx: -1,
}
case val.ty.IsSetType():
- rawSet := val.v.(set.Set[interface{}])
+ rawSet := val.v.(set.Set[any])
return &setElementIterator{
ety: val.ty.ElementType(),
setIt: rawSet.Iterator(),
@@ -74,7 +74,7 @@ func elementIterator(val Value) ElementIterator {
case val.ty.IsTupleType():
return &tupleElementIterator{
etys: val.ty.TupleElementTypes(),
- vals: val.v.([]interface{}),
+ vals: val.v.([]any),
idx: -1,
}
case val.ty.IsObjectType():
@@ -89,7 +89,7 @@ func elementIterator(val Value) ElementIterator {
return &objectElementIterator{
atys: atys,
- vals: val.v.(map[string]interface{}),
+ vals: val.v.(map[string]any),
attrNames: keys,
idx: -1,
}
@@ -100,7 +100,7 @@ func elementIterator(val Value) ElementIterator {
type listElementIterator struct {
ety Type
- vals []interface{}
+ vals []any
idx int
}
@@ -119,7 +119,7 @@ func (it *listElementIterator) Next() bool {
type mapElementIterator struct {
ety Type
- vals map[string]interface{}
+ vals map[string]any
keys []string
idx int
}
@@ -139,7 +139,7 @@ func (it *mapElementIterator) Next() bool {
type setElementIterator struct {
ety Type
- setIt *set.Iterator[interface{}]
+ setIt *set.Iterator[any]
}
func (it *setElementIterator) Element() (Value, Value) {
@@ -156,7 +156,7 @@ func (it *setElementIterator) Next() bool {
type tupleElementIterator struct {
etys []Type
- vals []interface{}
+ vals []any
idx int
}
@@ -175,7 +175,7 @@ func (it *tupleElementIterator) Next() bool {
type objectElementIterator struct {
atys map[string]Type
- vals map[string]interface{}
+ vals map[string]any
attrNames []string
idx int
}
diff --git a/vendor/github.com/zclconf/go-cty/cty/error.go b/vendor/github.com/zclconf/go-cty/cty/error.go
index dd139f7249..920084c3c8 100644
--- a/vendor/github.com/zclconf/go-cty/cty/error.go
+++ b/vendor/github.com/zclconf/go-cty/cty/error.go
@@ -11,7 +11,7 @@ type PathError struct {
Path Path
}
-func errorf(path Path, f string, args ...interface{}) error {
+func errorf(path Path, f string, args ...any) error {
// We need to copy the Path because often our caller builds it by
// continually mutating the same underlying buffer.
sPath := make(Path, len(path))
@@ -25,7 +25,7 @@ func errorf(path Path, f string, args ...interface{}) error {
// NewErrorf creates a new PathError for the current path by passing the
// given format and arguments to fmt.Errorf and then wrapping the result
// similarly to NewError.
-func (p Path) NewErrorf(f string, args ...interface{}) error {
+func (p Path) NewErrorf(f string, args ...any) error {
return errorf(p, f, args...)
}
diff --git a/vendor/github.com/zclconf/go-cty/cty/function/error.go b/vendor/github.com/zclconf/go-cty/cty/function/error.go
index 2b56779986..4ed96bde37 100644
--- a/vendor/github.com/zclconf/go-cty/cty/function/error.go
+++ b/vendor/github.com/zclconf/go-cty/cty/function/error.go
@@ -15,7 +15,7 @@ type ArgError struct {
Index int
}
-func NewArgErrorf(i int, f string, args ...interface{}) error {
+func NewArgErrorf(i int, f string, args ...any) error {
return ArgError{
error: fmt.Errorf(f, args...),
Index: i,
@@ -34,11 +34,11 @@ func NewArgError(i int, err error) error {
// into a normal error so that callers (expected to be language runtimes)
// are freed from having to deal with panics in buggy functions.
type PanicError struct {
- Value interface{}
+ Value any
Stack []byte
}
-func errorForPanic(val interface{}) error {
+func errorForPanic(val any) error {
return PanicError{
Value: val,
Stack: debug.Stack(),
diff --git a/vendor/github.com/zclconf/go-cty/cty/function/function.go b/vendor/github.com/zclconf/go-cty/cty/function/function.go
index 6fc968282e..4d7c61d01e 100644
--- a/vendor/github.com/zclconf/go-cty/cty/function/function.go
+++ b/vendor/github.com/zclconf/go-cty/cty/function/function.go
@@ -251,15 +251,25 @@ func (f Function) Call(args []cty.Value) (val cty.Value, err error) {
if err != nil {
return cty.NilVal, err
}
+
+ var resultMarks []cty.ValueMarks
+ // If we are returning an unknown early due to some unknown in the
+ // arguments, we first need to complete the iteration over all the args
+ // to ensure we collect as many marks as possible for resultMarks.
+ returnUnknown := false
+
if dynTypeArgs {
// returnTypeForValues sets this if any argument was inexactly typed
// and the corresponding parameter did not indicate it could deal with
// that. In that case we also avoid calling the implementation function
// because it will also typically not be ready to deal with that case.
- return cty.UnknownVal(expectedType), nil
+ returnUnknown = true
}
- if refineResult := f.spec.RefineResult; refineResult != nil {
+ // If returnUnknown is set already, it means we don't have a refinement
+ // because of dynTypeArgs, but we may still need to collect marks from the
+ // rest of the arguments.
+ if refineResult := f.spec.RefineResult; refineResult != nil && !returnUnknown {
// If this function has a refinement callback then we'll refine
// our result value in the same way regardless of how we return.
// It's the function author's responsibility to ensure that the
@@ -280,15 +290,10 @@ func (f Function) Call(args []cty.Value) (val cty.Value, err error) {
// values and marked values.
posArgs := args[:len(f.spec.Params)]
varArgs := args[len(f.spec.Params):]
- var resultMarks []cty.ValueMarks
for i, spec := range f.spec.Params {
val := posArgs[i]
- if !val.IsKnown() && !spec.AllowUnknown {
- return cty.UnknownVal(expectedType), nil
- }
-
if !spec.AllowMarked {
unwrappedVal, marks := val.UnmarkDeep()
if len(marks) > 0 {
@@ -305,14 +310,15 @@ func (f Function) Call(args []cty.Value) (val cty.Value, err error) {
args = newArgs
}
}
+
+ if !val.IsKnown() && !spec.AllowUnknown {
+ returnUnknown = true
+ }
}
if f.spec.VarParam != nil {
spec := f.spec.VarParam
for i, val := range varArgs {
- if !val.IsKnown() && !spec.AllowUnknown {
- return cty.UnknownVal(expectedType), nil
- }
if !spec.AllowMarked {
unwrappedVal, marks := val.UnmarkDeep()
if len(marks) > 0 {
@@ -323,9 +329,16 @@ func (f Function) Call(args []cty.Value) (val cty.Value, err error) {
args = newArgs
}
}
+ if !val.IsKnown() && !spec.AllowUnknown {
+ returnUnknown = true
+ }
}
}
+ if returnUnknown {
+ return cty.UnknownVal(expectedType).WithMarks(resultMarks...), nil
+ }
+
var retVal cty.Value
{
// Intercept any panics from the function and return them as normal errors,
diff --git a/vendor/github.com/zclconf/go-cty/cty/function/stdlib/collection.go b/vendor/github.com/zclconf/go-cty/cty/function/stdlib/collection.go
index 25df19b0a2..d3df0ea960 100644
--- a/vendor/github.com/zclconf/go-cty/cty/function/stdlib/collection.go
+++ b/vendor/github.com/zclconf/go-cty/cty/function/stdlib/collection.go
@@ -147,12 +147,6 @@ var ElementFunc = function.New(&function.Spec{
},
Type: func(args []cty.Value) (cty.Type, error) {
list := args[0]
- index := args[1]
- if index.IsKnown() {
- if index.LessThan(cty.NumberIntVal(0)).True() {
- return cty.DynamicPseudoType, fmt.Errorf("cannot use element function with a negative index")
- }
- }
listTy := list.Type()
switch {
@@ -176,6 +170,9 @@ var ElementFunc = function.New(&function.Spec{
return cty.DynamicPseudoType, errors.New("cannot use element function with an empty list")
}
index = index % len(etys)
+ if index < 0 {
+ index += len(etys)
+ }
return etys[index], nil
default:
return cty.DynamicPseudoType, fmt.Errorf("cannot read elements from %s", listTy.FriendlyName())
@@ -189,10 +186,6 @@ var ElementFunc = function.New(&function.Spec{
return cty.DynamicVal, fmt.Errorf("invalid index: %s", err)
}
- if args[1].LessThan(cty.NumberIntVal(0)).True() {
- return cty.DynamicVal, fmt.Errorf("cannot use element function with a negative index")
- }
-
input, marks := args[0].Unmark()
if !input.IsKnown() {
return cty.UnknownVal(retType), nil
@@ -203,6 +196,9 @@ var ElementFunc = function.New(&function.Spec{
return cty.DynamicVal, errors.New("cannot use element function with an empty list")
}
index = index % l
+ if index < 0 {
+ index += l
+ }
// We did all the necessary type checks in the type function above,
// so this is guaranteed not to fail.
diff --git a/vendor/github.com/zclconf/go-cty/cty/function/stdlib/format.go b/vendor/github.com/zclconf/go-cty/cty/function/stdlib/format.go
index 2339cc33a7..9da529b187 100644
--- a/vendor/github.com/zclconf/go-cty/cty/function/stdlib/format.go
+++ b/vendor/github.com/zclconf/go-cty/cty/function/stdlib/format.go
@@ -26,10 +26,11 @@ var FormatFunc = function.New(&function.Spec{
},
},
VarParam: &function.Parameter{
- Name: "args",
- Type: cty.DynamicPseudoType,
- AllowNull: true,
- AllowUnknown: true,
+ Name: "args",
+ Type: cty.DynamicPseudoType,
+ AllowNull: true,
+ AllowUnknown: true,
+ AllowDynamicType: true,
},
Type: function.StaticReturnType(cty.String),
RefineResult: refineNonNull,
@@ -64,10 +65,11 @@ var FormatListFunc = function.New(&function.Spec{
},
},
VarParam: &function.Parameter{
- Name: "args",
- Type: cty.DynamicPseudoType,
- AllowNull: true,
- AllowUnknown: true,
+ Name: "args",
+ Type: cty.DynamicPseudoType,
+ AllowNull: true,
+ AllowUnknown: true,
+ AllowDynamicType: true,
},
Type: function.StaticReturnType(cty.List(cty.String)),
RefineResult: refineNonNull,
@@ -199,32 +201,32 @@ var FormatListFunc = function.New(&function.Spec{
//
// It supports the following "verbs":
//
-// %% Literal percent sign, consuming no value
-// %v A default formatting of the value based on type, as described below.
-// %#v JSON serialization of the value
-// %t Converts to boolean and then produces "true" or "false"
-// %b Converts to number, requires integer, produces binary representation
-// %d Converts to number, requires integer, produces decimal representation
-// %o Converts to number, requires integer, produces octal representation
-// %x Converts to number, requires integer, produces hexadecimal representation
-// with lowercase letters
-// %X Like %x but with uppercase letters
-// %e Converts to number, produces scientific notation like -1.234456e+78
-// %E Like %e but with an uppercase "E" representing the exponent
-// %f Converts to number, produces decimal representation with fractional
-// part but no exponent, like 123.456
-// %g %e for large exponents or %f otherwise
-// %G %E for large exponents or %f otherwise
-// %s Converts to string and produces the string's characters
-// %q Converts to string and produces JSON-quoted string representation,
-// like %v.
+// %% Literal percent sign, consuming no value
+// %v A default formatting of the value based on type, as described below.
+// %#v JSON serialization of the value
+// %t Converts to boolean and then produces "true" or "false"
+// %b Converts to number, requires integer, produces binary representation
+// %d Converts to number, requires integer, produces decimal representation
+// %o Converts to number, requires integer, produces octal representation
+// %x Converts to number, requires integer, produces hexadecimal representation
+// with lowercase letters
+// %X Like %x but with uppercase letters
+// %e Converts to number, produces scientific notation like -1.234456e+78
+// %E Like %e but with an uppercase "E" representing the exponent
+// %f Converts to number, produces decimal representation with fractional
+// part but no exponent, like 123.456
+// %g %e for large exponents or %f otherwise
+// %G %E for large exponents or %f otherwise
+// %s Converts to string and produces the string's characters
+// %q Converts to string and produces JSON-quoted string representation,
+// like %v.
//
// The default format selections made by %v are:
//
-// string %s
-// number %g
-// bool %t
-// other %#v
+// string %s
+// number %g
+// bool %t
+// other %#v
//
// Null values produce the literal keyword "null" for %v and %#v, and produce
// an error otherwise.
@@ -236,10 +238,10 @@ var FormatListFunc = function.New(&function.Spec{
// is used. A period with no following number is invalid.
// For examples:
//
-// %f default width, default precision
-// %9f width 9, default precision
-// %.2f default width, precision 2
-// %9.2f width 9, precision 2
+// %f default width, default precision
+// %9f width 9, default precision
+// %.2f default width, precision 2
+// %9.2f width 9, precision 2
//
// Width and precision are measured in unicode characters (grapheme clusters).
//
@@ -256,10 +258,10 @@ var FormatListFunc = function.New(&function.Spec{
// The following additional symbols can be used immediately after the percent
// introducer as flags:
//
-// (a space) leave a space where the sign would be if number is positive
-// + Include a sign for a number even if it is positive (numeric only)
-// - Pad with spaces on the left rather than the right
-// 0 Pad with zeros rather than spaces.
+// (a space) leave a space where the sign would be if number is positive
+// + Include a sign for a number even if it is positive (numeric only)
+// - Pad with spaces on the left rather than the right
+// 0 Pad with zeros rather than spaces.
//
// Flag characters are ignored for verbs that do not support them.
//
diff --git a/vendor/github.com/zclconf/go-cty/cty/gocty/helpers.go b/vendor/github.com/zclconf/go-cty/cty/gocty/helpers.go
index 98e5ba1a2b..c95d92a24d 100644
--- a/vendor/github.com/zclconf/go-cty/cty/gocty/helpers.go
+++ b/vendor/github.com/zclconf/go-cty/cty/gocty/helpers.go
@@ -11,12 +11,12 @@ import (
var valueType = reflect.TypeOf(cty.Value{})
var typeType = reflect.TypeOf(cty.Type{})
-var setType = reflect.TypeOf(set.Set[interface{}]{})
+var setType = reflect.TypeOf(set.Set[any]{})
var bigFloatType = reflect.TypeOf(big.Float{})
var bigIntType = reflect.TypeOf(big.Int{})
-var emptyInterfaceType = reflect.TypeOf(interface{}(nil))
+var emptyInterfaceType = reflect.TypeOf(any(nil))
var stringType = reflect.TypeOf("")
diff --git a/vendor/github.com/zclconf/go-cty/cty/gocty/in.go b/vendor/github.com/zclconf/go-cty/cty/gocty/in.go
index 6cb308b532..72aac4c5a8 100644
--- a/vendor/github.com/zclconf/go-cty/cty/gocty/in.go
+++ b/vendor/github.com/zclconf/go-cty/cty/gocty/in.go
@@ -23,7 +23,7 @@ import (
// presented from Go's perspective. These messages are thus not appropriate
// for display to end-users. An error returned from ToCtyValue represents a
// bug in the calling program, not user error.
-func ToCtyValue(val interface{}, ty cty.Type) (cty.Value, error) {
+func ToCtyValue(val any, ty cty.Type) (cty.Value, error) {
// 'path' starts off as empty but will grow for each level of recursive
// call we make, so by the time toCtyValue returns it is likely to have
// unused capacity on the end of it, depending on how deeply-recursive
@@ -268,7 +268,7 @@ func toCtySet(val reflect.Value, ety cty.Type, path cty.Path) (cty.Value, error)
return cty.NilVal, path.NewErrorf("can't convert Go %s to %#v", val.Type(), cty.Set(ety))
}
- rawSet := val.Interface().(set.Set[interface{}])
+ rawSet := val.Interface().(set.Set[any])
inVals := rawSet.Values()
if len(inVals) == 0 {
@@ -528,10 +528,10 @@ func toCtyPassthrough(wrappedVal reflect.Value, wantTy cty.Type, path cty.Path)
// toCtyUnwrapPointer is a helper for dealing with Go pointers. It has three
// possible outcomes:
//
-// - Given value isn't a pointer, so it's just returned as-is.
-// - Given value is a non-nil pointer, in which case it is dereferenced
-// and the result returned.
-// - Given value is a nil pointer, in which case an invalid value is returned.
+// - Given value isn't a pointer, so it's just returned as-is.
+// - Given value is a non-nil pointer, in which case it is dereferenced
+// and the result returned.
+// - Given value is a nil pointer, in which case an invalid value is returned.
//
// For nested pointer types, like **int, they are all dereferenced in turn
// until a non-pointer value is found, or until a nil pointer is encountered.
diff --git a/vendor/github.com/zclconf/go-cty/cty/gocty/out.go b/vendor/github.com/zclconf/go-cty/cty/gocty/out.go
index e9c2599e6c..b7588ee0c1 100644
--- a/vendor/github.com/zclconf/go-cty/cty/gocty/out.go
+++ b/vendor/github.com/zclconf/go-cty/cty/gocty/out.go
@@ -26,7 +26,7 @@ import (
//
// The function will panic if given a non-pointer as the Go value target,
// since that is considered to be a bug in the calling program.
-func FromCtyValue(val cty.Value, target interface{}) error {
+func FromCtyValue(val cty.Value, target any) error {
tVal := reflect.ValueOf(target)
if tVal.Kind() != reflect.Ptr {
panic("target value is not a pointer")
diff --git a/vendor/github.com/zclconf/go-cty/cty/gocty/type_implied.go b/vendor/github.com/zclconf/go-cty/cty/gocty/type_implied.go
index ce4c8f1e9f..14bbe14303 100644
--- a/vendor/github.com/zclconf/go-cty/cty/gocty/type_implied.go
+++ b/vendor/github.com/zclconf/go-cty/cty/gocty/type_implied.go
@@ -6,7 +6,7 @@ import (
"github.com/zclconf/go-cty/cty"
)
-// ImpliedType takes an arbitrary Go value (as an interface{}) and attempts
+// ImpliedType takes an arbitrary Go value (as an any) and attempts
// to find a suitable cty.Type instance that could be used for a conversion
// with ToCtyValue.
//
@@ -21,7 +21,7 @@ import (
// In particular, ImpliedType will never use capsule types in its returned
// type, because it cannot know the capsule types supported by the calling
// program.
-func ImpliedType(gv interface{}) (cty.Type, error) {
+func ImpliedType(gv any) (cty.Type, error) {
rt := reflect.TypeOf(gv)
var path cty.Path
return impliedType(rt, path)
diff --git a/vendor/github.com/zclconf/go-cty/cty/json/type_implied.go b/vendor/github.com/zclconf/go-cty/cty/json/type_implied.go
index 0fa13f6c53..1c90f342c4 100644
--- a/vendor/github.com/zclconf/go-cty/cty/json/type_implied.go
+++ b/vendor/github.com/zclconf/go-cty/cty/json/type_implied.go
@@ -127,6 +127,29 @@ func impliedObjectType(dec *json.Decoder) (cty.Type, error) {
if atys == nil {
atys = make(map[string]cty.Type)
}
+ if existing, exists := atys[key]; exists {
+ // We didn't originally have any special treatment for multiple properties
+ // of the same name, having the type of the last one "win". But that caused
+ // some confusing error messages when the same input was subsequently used
+ // with [Unmarshal] using the returned object type, since [Unmarshal] would
+ // try to fit all of the property values of that name to whatever type
+ // the last one had, and would likely fail in doing so if the earlier
+ // properties of the same name had different types.
+ //
+ // As a compromise to avoid breaking existing successful use of _consistently-typed_
+ // redundant properties, we return an error here only if the new type
+ // differs from the old type. The error message doesn't mention that subtlety
+ // because the equal type carveout is a compatibility concession rather than
+ // a feature folks should rely on in new code.
+ if !existing.Equals(aty) {
+ // This error message is low-quality because ImpliedType doesn't do
+ // path tracking while it traverses, unlike Unmarshal. However, this
+ // is a rare enough case that we don't want to pay the cost of allocating
+ // another path-tracking buffer that would in most cases be ignored,
+ // so we just accept a low-context error message. :(
+ return cty.NilType, fmt.Errorf("duplicate %q property in JSON object", key)
+ }
+ }
atys[key] = aty
}
diff --git a/vendor/github.com/zclconf/go-cty/cty/marks.go b/vendor/github.com/zclconf/go-cty/cty/marks.go
index e747503ea9..44287f5197 100644
--- a/vendor/github.com/zclconf/go-cty/cty/marks.go
+++ b/vendor/github.com/zclconf/go-cty/cty/marks.go
@@ -2,7 +2,10 @@ package cty
import (
"fmt"
+ "iter"
"strings"
+
+ "github.com/zclconf/go-cty/cty/ctymarks"
)
// marker is an internal wrapper type used to add special "marks" to values.
@@ -18,19 +21,19 @@ import (
// an application that never marks a value does not need to worry about
// encountering marked values.
type marker struct {
- realV interface{}
+ realV any
marks ValueMarks
}
// ValueMarks is a map, representing a set, of "mark" values associated with
// a Value. See Value.Mark for more information on the usage of mark values.
-type ValueMarks map[interface{}]struct{}
+type ValueMarks map[any]struct{}
// NewValueMarks constructs a new ValueMarks set with the given mark values.
//
// If any of the arguments are already ValueMarks values then they'll be merged
// into the result, rather than used directly as individual marks.
-func NewValueMarks(marks ...interface{}) ValueMarks {
+func NewValueMarks(marks ...any) ValueMarks {
if len(marks) == 0 {
return nil
}
@@ -111,7 +114,7 @@ func (val Value) IsMarked() bool {
}
// HasMark returns true if and only if the receiving value has the given mark.
-func (val Value) HasMark(mark interface{}) bool {
+func (val Value) HasMark(mark any) bool {
if mr, ok := val.v.(marker); ok {
_, ok := mr.marks[mark]
return ok
@@ -119,21 +122,68 @@ func (val Value) HasMark(mark interface{}) bool {
return false
}
+// HasMarkDeep is like [HasMark] but also searches any values nested inside
+// the given value.
+func (val Value) HasMarkDeep(mark any) bool {
+ for _, v := range DeepValues(val) {
+ if v.HasMark(mark) {
+ return true
+ }
+ }
+ return false
+}
+
+// ValueMarksOfType returns an iterable sequence of any marks directly
+// associated with the given value that can be type-asserted to the given
+// type.
+func ValueMarksOfType[T any](v Value) iter.Seq[T] {
+ return func(yield func(T) bool) {
+ yieldValueMarksOfType(v, yield)
+ }
+}
+
+// ValueMarksOfTypeDeep is like [ValueMarksOfType] but also visits any values
+// nested inside the given value.
+//
+// The same value may be produced multiple times if multiple nested values are
+// marked with it.
+func ValueMarksOfTypeDeep[T any](v Value) iter.Seq[T] {
+ return func(yield func(T) bool) {
+ for _, v := range DeepValues(v) {
+ if !yieldValueMarksOfType(v, yield) {
+ break
+ }
+ }
+ }
+}
+
+func yieldValueMarksOfType[T any](v Value, yield func(T) bool) bool {
+ mr, ok := v.v.(marker)
+ if !ok {
+ return true
+ }
+ for mark := range mr.marks {
+ if v, ok := mark.(T); ok {
+ if !yield(v) {
+ return false
+ }
+ }
+ }
+ return true
+}
+
// ContainsMarked returns true if the receiving value or any value within it
// is marked.
//
// This operation is relatively expensive. If you only need a shallow result,
// use IsMarked instead.
func (val Value) ContainsMarked() bool {
- ret := false
- Walk(val, func(_ Path, v Value) (bool, error) {
+ for _, v := range DeepValues(val) {
if v.IsMarked() {
- ret = true
- return false, nil
+ return true
}
- return true, nil
- })
- return ret
+ }
+ return false
}
func (val Value) assertUnmarked() {
@@ -189,7 +239,7 @@ func (val Value) HasSameMarks(other Value) bool {
//
// An application that never calls this method does not need to worry about
// handling marked values.
-func (val Value) Mark(mark interface{}) Value {
+func (val Value) Mark(mark any) Value {
if _, ok := mark.(ValueMarks); ok {
panic("cannot call Value.Mark with a ValueMarks value (use WithMarks instead)")
}
@@ -236,6 +286,11 @@ func (t *applyPathValueMarksTransformer) Exit(p Path, v Value) (Value, error) {
// markers to particular paths and returns the marked
// Value.
func (val Value) MarkWithPaths(pvm []PathValueMarks) Value {
+ if len(pvm) == 0 {
+ // If we have no marks to apply then there's nothing to do, so we'll
+ // just return the same value rather than wastefully rebuilding it.
+ return val
+ }
ret, _ := TransformWithTransformer(val, &applyPathValueMarksTransformer{pvm})
return ret
}
@@ -257,24 +312,6 @@ func (val Value) Unmark() (Value, ValueMarks) {
}, marks
}
-type unmarkTransformer struct {
- pvm []PathValueMarks
-}
-
-func (t *unmarkTransformer) Enter(p Path, v Value) (Value, error) {
- unmarkedVal, marks := v.Unmark()
- if len(marks) > 0 {
- path := make(Path, len(p), len(p)+1)
- copy(path, p)
- t.pvm = append(t.pvm, PathValueMarks{path, marks})
- }
- return unmarkedVal, nil
-}
-
-func (t *unmarkTransformer) Exit(p Path, v Value) (Value, error) {
- return v, nil
-}
-
// UnmarkDeep is similar to Unmark, but it works with an entire nested structure
// rather than just the given value directly.
//
@@ -282,17 +319,12 @@ func (t *unmarkTransformer) Exit(p Path, v Value) (Value, error) {
// the returned marks set includes the superset of all of the marks encountered
// during the operation.
func (val Value) UnmarkDeep() (Value, ValueMarks) {
- t := unmarkTransformer{}
- ret, _ := TransformWithTransformer(val, &t)
-
- marks := make(ValueMarks)
- for _, pvm := range t.pvm {
- for m, s := range pvm.Marks {
- marks[m] = s
- }
- }
-
- return ret, marks
+ retMarks := make(ValueMarks)
+ retVal, _ := val.WrangleMarksDeep(func(mark any, path Path) (ctymarks.WrangleAction, error) {
+ retMarks[mark] = struct{}{}
+ return ctymarks.WrangleDrop, nil
+ })
+ return retVal, retMarks
}
// UnmarkDeepWithPaths is like UnmarkDeep, except it returns a slice
@@ -300,9 +332,24 @@ func (val Value) UnmarkDeep() (Value, ValueMarks) {
// a caller to know which marks are associated with which paths
// in the Value.
func (val Value) UnmarkDeepWithPaths() (Value, []PathValueMarks) {
- t := unmarkTransformer{}
- ret, _ := TransformWithTransformer(val, &t)
- return ret, t.pvm
+ var pvm []PathValueMarks
+ retVal, _ := val.WrangleMarksDeep(func(mark any, path Path) (ctymarks.WrangleAction, error) {
+ if len(pvm) != 0 {
+ // We'll try to modify the most recent item instead of adding
+ // a new one, if the path hasn't changed.
+ latest := &pvm[len(pvm)-1]
+ if latest.Path.Equals(path) {
+ latest.Marks[mark] = struct{}{}
+ return ctymarks.WrangleDrop, nil
+ }
+ }
+ pvm = append(pvm, PathValueMarks{
+ Path: path.Copy(),
+ Marks: NewValueMarks(mark),
+ })
+ return ctymarks.WrangleDrop, nil
+ })
+ return retVal, pvm
}
func (val Value) unmarkForce() Value {
diff --git a/vendor/github.com/zclconf/go-cty/cty/marks_wrangle.go b/vendor/github.com/zclconf/go-cty/cty/marks_wrangle.go
new file mode 100644
index 0000000000..123453c3bf
--- /dev/null
+++ b/vendor/github.com/zclconf/go-cty/cty/marks_wrangle.go
@@ -0,0 +1,289 @@
+package cty
+
+import (
+ "errors"
+ "fmt"
+ "iter"
+ "maps"
+
+ "github.com/zclconf/go-cty/cty/ctymarks"
+)
+
+// WrangleMarksDeep is a specialized variant of [Transform] that is focused
+// on interrogating and modifying any marks present throughout a data structure,
+// without modifying anything else about the value.
+//
+// Refer to the [WrangleFunc] documentation for more information. Each of
+// the provided functions is called in turn for each mark at each distinct path,
+// and the first function that returns a non-nil [ctymarks.WrangleAction] "wins"
+// and prevents any later ones from running for a particular mark/path pair.
+//
+// The implementation makes a best effort to avoid constructing new values
+// unless marks have actually changed, to keep this operation relatively cheap
+// in the presumed-common case where no marks are present at all.
+func (v Value) WrangleMarksDeep(wranglers ...WrangleFunc) (Value, error) {
+ // This function is implemented in this package, rather than in the
+ // separate "ctymarks", so that it can intrude into the unexported
+ // internal details of [Value] to minimize overhead when no marks
+ // are present at all.
+ var path Path
+ if v.IsKnown() && !v.Type().IsPrimitiveType() && !v.IsNull() {
+ // If we have a known, non-null, non-primitive-typed value then we
+ // can assume there will be at least a little nesting we need to
+ // represent using our path, and so we'll preallocate some capacity
+ // which we'll be able to share across all calls that are shallower
+ // than this level of nesting.
+ path = make(Path, 0, 4)
+ }
+ topMarks := make(ValueMarks)
+ var errs []error
+ new := wrangleMarksDeep(v, wranglers, path, topMarks, &errs)
+ if new == NilVal {
+ new = v // completely unchanged
+ }
+ var err error
+ switch len(errs) {
+ case 0:
+ // nil err is fine, then
+ case 1:
+ err = errs[0]
+ default:
+ err = errors.Join(errs...)
+ }
+ return new.WithMarks(topMarks), err
+}
+
+// wrangleMarksDeep is the main implementation of [WrangleMarksDeep], which
+// calls itself recursively to handle nested data structures.
+//
+// If the returned value is [NilVal] then that means that no changes were
+// needed to anything at or beneath that nesting level and so the caller should
+// just keep the original value exactly.
+//
+// Modifies topMarks and errs during traversal to collect (respectively) any
+// marks that caused [ctymarks.WrangleExpand] and and errors returned by
+// wrangle functions.
+func wrangleMarksDeep(v Value, wranglers []WrangleFunc, path Path, topMarks ValueMarks, errs *[]error) Value {
+ var givenMarks, newMarks ValueMarks
+ makeNewValue := false
+ // The following is the same idea as [Value.Unmark], but implemented inline
+ // here so that we can skip copying any existing ValueMarks that might
+ // already be present, since we know we're not going to try to mutate it.
+ if marked, ok := v.v.(marker); ok {
+ v = Value{
+ ty: v.ty,
+ v: marked.realV,
+ }
+ givenMarks = marked.marks
+ }
+
+ // We call this whenever we know we're returning a new value, to perform
+ // a one-time copy of the given marks into a new marks map we can modify
+ // and to set a flag to force us to construct a newly-marked value when
+ // we return below.
+ needNewValue := func() {
+ if newMarks == nil && len(givenMarks) != 0 {
+ newMarks = make(ValueMarks, len(givenMarks))
+ maps.Copy(newMarks, givenMarks)
+ }
+ makeNewValue = true
+ }
+
+ for mark := range givenMarks {
+ Wranglers:
+ for _, wrangler := range wranglers {
+ action, err := wrangler(mark, path)
+ if err != nil {
+ if len(path) != 0 {
+ err = path.NewError(err)
+ }
+ *errs = append(*errs, err)
+ }
+ switch action {
+ case nil:
+ continue Wranglers
+ case ctymarks.WrangleKeep:
+ break Wranglers
+ case ctymarks.WrangleExpand:
+ topMarks[mark] = struct{}{}
+ break Wranglers
+ case ctymarks.WrangleDrop:
+ needNewValue()
+ delete(newMarks, mark)
+ break Wranglers
+ default:
+ newMark := ctymarks.WrangleReplaceMark(action)
+ if newMark == nil {
+ // Should not get here because these cases should be
+ // exhaustive for all possible WrangleAction values.
+ panic(fmt.Sprintf("unhandled WrangleAction %#v", action))
+ }
+ needNewValue()
+ delete(newMarks, mark)
+ newMarks[newMark] = struct{}{}
+ break Wranglers
+ }
+ }
+ }
+
+ // We're not going to make any further changes to our _direct_ marks
+ // after this, so if we didn't already make a copy of the given marks
+ // we can now safely alias our original set to reuse when we return.
+ // (We might still construct a new value though, if we recurse into
+ // a nested value that needs its own changes.)
+ if newMarks == nil {
+ newMarks = givenMarks // might still be nil if we didn't have any marks on entry
+ }
+
+ // Now we'll visit nested values recursively, if any.
+ // The cases below intentionally don't cover primitive types, set types,
+ // or capsule types, because none of them can possibly have nested marks
+ // inside. (For set types in particular, any marks on inner values get
+ // aggregated on the top-level set itself during construction.)
+ ty := v.Type()
+ switch {
+ case v.IsNull() || !v.IsKnown():
+ // Can't recurse into null or unknown values, regardless of type,
+ // so nothing to do here.
+
+ case ty.IsListType() || ty.IsTupleType():
+ // These types both have the same internal representation, and we
+ // know we're not going to change anything about the type, so we
+ // can share the same implementation for both.
+ l := v.LengthInt()
+ if l == 0 {
+ break // nothing to do for an empty container
+ }
+
+ // We'll avoid allocating a new slice until we know we're going
+ // to make a change.
+ var newElems []any // as would appear in Value.v for all three of these types
+ for i, innerV := range replaceKWithIdx(v.Elements()) {
+ path := append(path, IndexStep{Key: NumberIntVal(int64(i))})
+ newInnerV := wrangleMarksDeep(innerV, wranglers, path, topMarks, errs)
+ if newInnerV != NilVal {
+ needNewValue()
+ if newElems == nil {
+ // If this is the first change we've found then we need to
+ // allocate our new elems array and retroactively copy
+ // anything we previously skipped because it was unchanged.
+ newElems = make([]any, i, l)
+ copy(newElems, v.v.([]any))
+ }
+ newElems = append(newElems, newInnerV.v)
+ } else if newElems != nil {
+ // Once we've started building a new value we need to append
+ // everything to it whether it's changed or not, but we can
+ // reuse the unchanged element's internal value.
+ newElems = append(newElems, innerV.v)
+ }
+ }
+ if newElems != nil {
+ // if we built a new array of elements then it should replace
+ // the one from our input value.
+ v.v = newElems
+ }
+
+ case ty.IsMapType() || ty.IsObjectType():
+ // These types both have the same internal representation, and we
+ // know we're not going to change anything about the type, so we
+ // can share the same implementation for both.
+ l := v.LengthInt()
+ if l == 0 {
+ break // nothing to do for an empty container
+ }
+
+ // We'll avoid allocating a new map until we know we're going to
+ // make a change.
+ var newElems map[string]any
+ for keyV, innerV := range v.Elements() {
+ var pathStep PathStep
+ if ty.IsObjectType() {
+ pathStep = GetAttrStep{Name: keyV.AsString()}
+ } else {
+ pathStep = IndexStep{Key: keyV}
+ }
+ path := append(path, pathStep)
+ newInnerV := wrangleMarksDeep(innerV, wranglers, path, topMarks, errs)
+ if newInnerV != NilVal {
+ needNewValue()
+ if newElems == nil {
+ // If this is the first change we've found then we need to
+ // allocate our new elems map and retroactively copy
+ // everything from the original map before we overwrite
+ // the elements that need to change.
+ newElems = make(map[string]any, l)
+ maps.Copy(newElems, v.v.(map[string]any))
+ }
+ newElems[keyV.AsString()] = newInnerV.v
+ }
+ }
+ if newElems != nil {
+ // if we built a new map of elements then it should replace
+ // the one from our input value.
+ v.v = newElems
+ }
+ }
+
+ if !makeNewValue {
+ // We didn't make any changes to the marks, so we don't need to
+ // construct a new value.
+ return NilVal
+ }
+ return v.WithMarks(newMarks)
+}
+
+// WrangleFunc is the signature of a callback function used to visit a
+// particular mark associated with a particular path within a value.
+//
+// [Path] values passed to successive calls to a [WrangleFunc] may share a
+// backing array, and so if the function wishes to retain a particular path
+// after it returns it must use [Path.Copy] to produce a copy in an unaliased
+// backing array.
+//
+// A function of this type must decide what change to make, if any, to the
+// presence of this mark at this location. Returning nil means to take no
+// action at all and to potentially allow other later functions of this
+// type to decide what to do instead.
+//
+// If the function returns an error then [Value.WrangleMarksDeep] collects it
+// and any other errors returned during traversal, automatically wraps in a
+// [cty.PathError] if not at the root, and returns an [`errors.Join`] of all
+// of the errors if there are more than one. The indicated action is still taken
+// and continued "wrangling" occurs as normal to visit other marks and other
+// paths.
+//
+// [cty.Value.WrangleMarksDeep], and this callback signature used with it,
+// are together designed with some assumptions that don't always hold but
+// have been common enough to make it seem worth supporting with a first-class
+// feature:
+//
+// - All of the different marks on any specific value are orthogonal to one
+// another, and so it's possible to decide an action for each one in
+// isolation.
+// - Marks within a data structure are orthogonal to the specific values they
+// are associated with, and so it's possible to decide an action without
+// knowning the value it's associated with. (Though it's possible in
+// principle to use the given path to retrieve more information when needed,
+// at the expense of some additional traversal overhead.)
+// - Most values have no marks at all and when marks are present there are
+// relatively few of them, and so it's worth making some extra effort to
+// handle the no-marks case cheaply even if it makes the marks-present case
+// a little more expensive.
+//
+// If any of these assumptions don't apply to your situation then this may not
+// be an appropriate solution. [cty.Transform] or [cty.TransformWithTransformer]
+// might serve as a more general alternative if you need more control.
+type WrangleFunc func(mark any, path Path) (ctymarks.WrangleAction, error)
+
+func replaceKWithIdx[K any, V any](in iter.Seq2[K, V]) iter.Seq2[int, V] {
+ return func(yield func(int, V) bool) {
+ i := 0
+ for _, v := range in {
+ if !yield(i, v) {
+ break
+ }
+ i++
+ }
+ }
+}
diff --git a/vendor/github.com/zclconf/go-cty/cty/object_type.go b/vendor/github.com/zclconf/go-cty/cty/object_type.go
index e6bbab4a89..555ef6c7f2 100644
--- a/vendor/github.com/zclconf/go-cty/cty/object_type.go
+++ b/vendor/github.com/zclconf/go-cty/cty/object_type.go
@@ -134,7 +134,7 @@ func init() {
EmptyObject = Object(map[string]Type{})
EmptyObjectVal = Value{
ty: EmptyObject,
- v: map[string]interface{}{},
+ v: map[string]any{},
}
}
diff --git a/vendor/github.com/zclconf/go-cty/cty/set/rules.go b/vendor/github.com/zclconf/go-cty/cty/set/rules.go
index da4c768473..caffc5e1e9 100644
--- a/vendor/github.com/zclconf/go-cty/cty/set/rules.go
+++ b/vendor/github.com/zclconf/go-cty/cty/set/rules.go
@@ -43,5 +43,5 @@ type OrderedRules[T any] interface {
// Less returns true if and only if the first argument should sort before
// the second argument. If the second argument should sort before the first
// or if there is no defined order for the values, return false.
- Less(interface{}, interface{}) bool
+ Less(any, any) bool
}
diff --git a/vendor/github.com/zclconf/go-cty/cty/set_helper.go b/vendor/github.com/zclconf/go-cty/cty/set_helper.go
index 5d39805ba4..f309081e83 100644
--- a/vendor/github.com/zclconf/go-cty/cty/set_helper.go
+++ b/vendor/github.com/zclconf/go-cty/cty/set_helper.go
@@ -21,7 +21,7 @@ type ValueSet struct {
// ValueSet is just a thin wrapper around a set.Set with our value-oriented
// "rules" applied. We do this so that the caller can work in terms of
// cty.Value objects even though the set internals use the raw values.
- s set.Set[interface{}]
+ s set.Set[any]
}
// NewValueSet creates and returns a new ValueSet with the given element type.
@@ -29,7 +29,7 @@ func NewValueSet(ety Type) ValueSet {
return newValueSet(set.NewSet(newSetRules(ety)))
}
-func newValueSet(s set.Set[interface{}]) ValueSet {
+func newValueSet(s set.Set[any]) ValueSet {
return ValueSet{
s: s,
}
diff --git a/vendor/github.com/zclconf/go-cty/cty/set_internals.go b/vendor/github.com/zclconf/go-cty/cty/set_internals.go
index 7b3d425034..572fc863ff 100644
--- a/vendor/github.com/zclconf/go-cty/cty/set_internals.go
+++ b/vendor/github.com/zclconf/go-cty/cty/set_internals.go
@@ -21,9 +21,9 @@ type setRules struct {
Type Type
}
-var _ set.OrderedRules[interface{}] = setRules{}
+var _ set.OrderedRules[any] = setRules{}
-func newSetRules(ety Type) set.Rules[interface{}] {
+func newSetRules(ety Type) set.Rules[any] {
return setRules{ety}
}
@@ -43,14 +43,14 @@ func (val Value) Hash() int {
return int(crc32.ChecksumIEEE(hashBytes))
}
-func (r setRules) Hash(v interface{}) int {
+func (r setRules) Hash(v any) int {
return Value{
ty: r.Type,
v: v,
}.Hash()
}
-func (r setRules) Equivalent(v1 interface{}, v2 interface{}) bool {
+func (r setRules) Equivalent(v1 any, v2 any) bool {
v1v := Value{
ty: r.Type,
v: v1,
@@ -71,7 +71,7 @@ func (r setRules) Equivalent(v1 interface{}, v2 interface{}) bool {
// SameRules is only true if the other Rules instance is also a setRules struct,
// and the types are considered equal.
-func (r setRules) SameRules(other set.Rules[interface{}]) bool {
+func (r setRules) SameRules(other set.Rules[any]) bool {
rules, ok := other.(setRules)
if !ok {
return false
@@ -82,7 +82,7 @@ func (r setRules) SameRules(other set.Rules[interface{}]) bool {
// Less is an implementation of set.OrderedRules so that we can iterate over
// set elements in a consistent order, where such an order is possible.
-func (r setRules) Less(v1, v2 interface{}) bool {
+func (r setRules) Less(v1, v2 any) bool {
v1v := Value{
ty: r.Type,
v: v1,
diff --git a/vendor/github.com/zclconf/go-cty/cty/tuple_type.go b/vendor/github.com/zclconf/go-cty/cty/tuple_type.go
index 798cacd63a..05a8ebe6d1 100644
--- a/vendor/github.com/zclconf/go-cty/cty/tuple_type.go
+++ b/vendor/github.com/zclconf/go-cty/cty/tuple_type.go
@@ -74,7 +74,7 @@ func init() {
EmptyTuple = Tuple([]Type{})
EmptyTupleVal = Value{
ty: EmptyTuple,
- v: []interface{}{},
+ v: []any{},
}
}
diff --git a/vendor/github.com/zclconf/go-cty/cty/unknown.go b/vendor/github.com/zclconf/go-cty/cty/unknown.go
index b3aefa4503..626772faa0 100644
--- a/vendor/github.com/zclconf/go-cty/cty/unknown.go
+++ b/vendor/github.com/zclconf/go-cty/cty/unknown.go
@@ -15,7 +15,7 @@ type unknownType struct {
// on the unknown value, but all unknown values start as totally unknown
// and we will also typically lose all unknown value refinements when
// round-tripping through serialization formats.
-var totallyUnknown interface{} = &unknownType{}
+var totallyUnknown any = &unknownType{}
// UnknownVal returns an Value that represents an unknown value of the given
// type. Unknown values can be used to represent a value that is
diff --git a/vendor/github.com/zclconf/go-cty/cty/unknown_as_null.go b/vendor/github.com/zclconf/go-cty/cty/unknown_as_null.go
index ba926475ce..73d592d090 100644
--- a/vendor/github.com/zclconf/go-cty/cty/unknown_as_null.go
+++ b/vendor/github.com/zclconf/go-cty/cty/unknown_as_null.go
@@ -8,6 +8,11 @@ package cty
// represent unknowns, such as JSON, as long as the caller does not need to
// retain the unknown value information.
func UnknownAsNull(val Value) Value {
+ if val.IsMarked() {
+ val, valMarks := val.Unmark()
+ return UnknownAsNull(val).WithMarks(valMarks)
+ }
+
ty := val.Type()
switch {
case val.IsNull():
diff --git a/vendor/github.com/zclconf/go-cty/cty/value.go b/vendor/github.com/zclconf/go-cty/cty/value.go
index e5b29b603a..e3d0051bb2 100644
--- a/vendor/github.com/zclconf/go-cty/cty/value.go
+++ b/vendor/github.com/zclconf/go-cty/cty/value.go
@@ -29,7 +29,7 @@ package cty
// rules than are offered by the built-in converter where necessary.
type Value struct {
ty Type
- v interface{}
+ v any
}
// Type returns the type of the value.
diff --git a/vendor/github.com/zclconf/go-cty/cty/value_init.go b/vendor/github.com/zclconf/go-cty/cty/value_init.go
index a1743a09ef..be20043bb7 100644
--- a/vendor/github.com/zclconf/go-cty/cty/value_init.go
+++ b/vendor/github.com/zclconf/go-cty/cty/value_init.go
@@ -113,7 +113,7 @@ func NormalizeString(s string) string {
// by the key names and value types in the given map.
func ObjectVal(attrs map[string]Value) Value {
attrTypes := make(map[string]Type, len(attrs))
- attrVals := make(map[string]interface{}, len(attrs))
+ attrVals := make(map[string]any, len(attrs))
for attr, val := range attrs {
attr = NormalizeString(attr)
@@ -131,7 +131,7 @@ func ObjectVal(attrs map[string]Value) Value {
// defined by the value types in the given slice.
func TupleVal(elems []Value) Value {
elemTypes := make([]Type, len(elems))
- elemVals := make([]interface{}, len(elems))
+ elemVals := make([]any, len(elems))
for i, val := range elems {
elemTypes[i] = val.ty
@@ -156,7 +156,7 @@ func ListVal(vals []Value) Value {
panic("must not call ListVal with empty slice")
}
elementType := DynamicPseudoType
- rawList := make([]interface{}, len(vals))
+ rawList := make([]any, len(vals))
for i, val := range vals {
if elementType == DynamicPseudoType {
@@ -181,7 +181,7 @@ func ListVal(vals []Value) Value {
func ListValEmpty(element Type) Value {
return Value{
ty: List(element),
- v: []interface{}{},
+ v: []any{},
}
}
@@ -211,7 +211,7 @@ func MapVal(vals map[string]Value) Value {
panic("must not call MapVal with empty map")
}
elementType := DynamicPseudoType
- rawMap := make(map[string]interface{}, len(vals))
+ rawMap := make(map[string]any, len(vals))
for key, val := range vals {
if elementType == DynamicPseudoType {
@@ -236,7 +236,7 @@ func MapVal(vals map[string]Value) Value {
func MapValEmpty(element Type) Value {
return Value{
ty: Map(element),
- v: map[string]interface{}{},
+ v: map[string]any{},
}
}
@@ -266,7 +266,7 @@ func SetVal(vals []Value) Value {
panic("must not call SetVal with empty slice")
}
elementType := DynamicPseudoType
- rawList := make([]interface{}, len(vals))
+ rawList := make([]any, len(vals))
var markSets []ValueMarks
for i, val := range vals {
@@ -286,7 +286,7 @@ func SetVal(vals []Value) Value {
rawList[i] = val.v
}
- rawVal := set.NewSetFromSlice(set.Rules[interface{}](setRules{elementType}), rawList)
+ rawVal := set.NewSetFromSlice(set.Rules[any](setRules{elementType}), rawList)
return Value{
ty: Set(elementType),
@@ -333,7 +333,7 @@ func SetValFromValueSet(s ValueSet) Value {
func SetValEmpty(element Type) Value {
return Value{
ty: Set(element),
- v: set.NewSet(set.Rules[interface{}](setRules{element})),
+ v: set.NewSet(set.Rules[any](setRules{element})),
}
}
@@ -344,7 +344,7 @@ func SetValEmpty(element Type) Value {
// This function will panic if the given type is not a capsule type, if
// the given wrapVal is not compatible with the given capsule type, or if
// wrapVal is not a pointer.
-func CapsuleVal(ty Type, wrapVal interface{}) Value {
+func CapsuleVal(ty Type, wrapVal any) Value {
if !ty.IsCapsuleType() {
panic("not a capsule type")
}
diff --git a/vendor/github.com/zclconf/go-cty/cty/value_ops.go b/vendor/github.com/zclconf/go-cty/cty/value_ops.go
index c4584bd936..f2db486f82 100644
--- a/vendor/github.com/zclconf/go-cty/cty/value_ops.go
+++ b/vendor/github.com/zclconf/go-cty/cty/value_ops.go
@@ -2,6 +2,7 @@ package cty
import (
"fmt"
+ "iter"
"math/big"
"github.com/zclconf/go-cty/cty/set"
@@ -13,7 +14,7 @@ func (val Value) GoString() string {
if val.IsMarked() {
unVal, marks := val.Unmark()
if len(marks) == 1 {
- var mark interface{}
+ var mark any
for m := range marks {
mark = m
}
@@ -243,11 +244,11 @@ func (val Value) Equals(other Value) Value {
for attr, aty := range oty.AttrTypes {
lhs := Value{
ty: aty,
- v: val.v.(map[string]interface{})[attr],
+ v: val.v.(map[string]any)[attr],
}
rhs := Value{
ty: aty,
- v: other.v.(map[string]interface{})[attr],
+ v: other.v.(map[string]any)[attr],
}
eq := lhs.Equals(rhs)
if !eq.IsKnown() {
@@ -264,11 +265,11 @@ func (val Value) Equals(other Value) Value {
for i, ety := range tty.ElemTypes {
lhs := Value{
ty: ety,
- v: val.v.([]interface{})[i],
+ v: val.v.([]any)[i],
}
rhs := Value{
ty: ety,
- v: other.v.([]interface{})[i],
+ v: other.v.([]any)[i],
}
eq := lhs.Equals(rhs)
if !eq.IsKnown() {
@@ -281,16 +282,16 @@ func (val Value) Equals(other Value) Value {
}
case ty.IsListType():
ety := ty.typeImpl.(typeList).ElementTypeT
- if len(val.v.([]interface{})) == len(other.v.([]interface{})) {
+ if len(val.v.([]any)) == len(other.v.([]any)) {
result = true
- for i := range val.v.([]interface{}) {
+ for i := range val.v.([]any) {
lhs := Value{
ty: ety,
- v: val.v.([]interface{})[i],
+ v: val.v.([]any)[i],
}
rhs := Value{
ty: ety,
- v: other.v.([]interface{})[i],
+ v: other.v.([]any)[i],
}
eq := lhs.Equals(rhs)
if !eq.IsKnown() {
@@ -303,8 +304,8 @@ func (val Value) Equals(other Value) Value {
}
}
case ty.IsSetType():
- s1 := val.v.(set.Set[interface{}])
- s2 := other.v.(set.Set[interface{}])
+ s1 := val.v.(set.Set[any])
+ s2 := other.v.(set.Set[any])
equal := true
// Two sets are equal if all of their values are known and all values
@@ -331,20 +332,20 @@ func (val Value) Equals(other Value) Value {
result = equal
case ty.IsMapType():
ety := ty.typeImpl.(typeMap).ElementTypeT
- if len(val.v.(map[string]interface{})) == len(other.v.(map[string]interface{})) {
+ if len(val.v.(map[string]any)) == len(other.v.(map[string]any)) {
result = true
- for k := range val.v.(map[string]interface{}) {
- if _, ok := other.v.(map[string]interface{})[k]; !ok {
+ for k := range val.v.(map[string]any) {
+ if _, ok := other.v.(map[string]any)[k]; !ok {
result = false
break
}
lhs := Value{
ty: ety,
- v: val.v.(map[string]interface{})[k],
+ v: val.v.(map[string]any)[k],
}
rhs := Value{
ty: ety,
- v: other.v.(map[string]interface{})[k],
+ v: other.v.(map[string]any)[k],
}
eq := lhs.Equals(rhs)
if !eq.IsKnown() {
@@ -462,11 +463,11 @@ func (val Value) RawEquals(other Value) bool {
for attr, aty := range oty.AttrTypes {
lhs := Value{
ty: aty,
- v: val.v.(map[string]interface{})[attr],
+ v: val.v.(map[string]any)[attr],
}
rhs := Value{
ty: aty,
- v: other.v.(map[string]interface{})[attr],
+ v: other.v.(map[string]any)[attr],
}
eq := lhs.RawEquals(rhs)
if !eq {
@@ -479,11 +480,11 @@ func (val Value) RawEquals(other Value) bool {
for i, ety := range tty.ElemTypes {
lhs := Value{
ty: ety,
- v: val.v.([]interface{})[i],
+ v: val.v.([]any)[i],
}
rhs := Value{
ty: ety,
- v: other.v.([]interface{})[i],
+ v: other.v.([]any)[i],
}
eq := lhs.RawEquals(rhs)
if !eq {
@@ -493,15 +494,15 @@ func (val Value) RawEquals(other Value) bool {
return true
case ty.IsListType():
ety := ty.typeImpl.(typeList).ElementTypeT
- if len(val.v.([]interface{})) == len(other.v.([]interface{})) {
- for i := range val.v.([]interface{}) {
+ if len(val.v.([]any)) == len(other.v.([]any)) {
+ for i := range val.v.([]any) {
lhs := Value{
ty: ety,
- v: val.v.([]interface{})[i],
+ v: val.v.([]any)[i],
}
rhs := Value{
ty: ety,
- v: other.v.([]interface{})[i],
+ v: other.v.([]any)[i],
}
eq := lhs.RawEquals(rhs)
if !eq {
@@ -545,18 +546,18 @@ func (val Value) RawEquals(other Value) bool {
}
valUn, _ := val.Unmark()
otherUn, _ := other.Unmark()
- if len(valUn.v.(map[string]interface{})) == len(otherUn.v.(map[string]interface{})) {
- for k := range valUn.v.(map[string]interface{}) {
- if _, ok := otherUn.v.(map[string]interface{})[k]; !ok {
+ if len(valUn.v.(map[string]any)) == len(otherUn.v.(map[string]any)) {
+ for k := range valUn.v.(map[string]any) {
+ if _, ok := otherUn.v.(map[string]any)[k]; !ok {
return false
}
lhs := Value{
ty: ety,
- v: valUn.v.(map[string]interface{})[k],
+ v: valUn.v.(map[string]any)[k],
}
rhs := Value{
ty: ety,
- v: otherUn.v.(map[string]interface{})[k],
+ v: otherUn.v.(map[string]any)[k],
}
eq := lhs.RawEquals(rhs)
if !eq {
@@ -816,7 +817,7 @@ func (val Value) GetAttr(name string) Value {
return Value{
ty: attrType,
- v: val.v.(map[string]interface{})[name],
+ v: val.v.(map[string]any)[name],
}
}
@@ -872,7 +873,7 @@ func (val Value) Index(key Value) Value {
return Value{
ty: elty,
- v: val.v.([]interface{})[index],
+ v: val.v.([]any)[index],
}
case val.Type().IsMapType():
elty := val.Type().ElementType()
@@ -895,7 +896,7 @@ func (val Value) Index(key Value) Value {
return Value{
ty: elty,
- v: val.v.(map[string]interface{})[keyStr],
+ v: val.v.(map[string]any)[keyStr],
}
case val.Type().IsTupleType():
if key.Type() == DynamicPseudoType {
@@ -922,7 +923,7 @@ func (val Value) Index(key Value) Value {
return Value{
ty: eltys[index],
- v: val.v.([]interface{})[index],
+ v: val.v.([]any)[index],
}
default:
panic("not a list, map, or tuple type")
@@ -969,7 +970,7 @@ func (val Value) HasIndex(key Value) Value {
return False
}
- return BoolVal(int(index) < len(val.v.([]interface{})) && index >= 0)
+ return BoolVal(int(index) < len(val.v.([]any)) && index >= 0)
case val.Type().IsMapType():
if key.Type() == DynamicPseudoType {
return UnknownVal(Bool).RefineNotNull()
@@ -986,7 +987,7 @@ func (val Value) HasIndex(key Value) Value {
}
keyStr := key.v.(string)
- _, exists := val.v.(map[string]interface{})[keyStr]
+ _, exists := val.v.(map[string]any)[keyStr]
return BoolVal(exists)
case val.Type().IsTupleType():
@@ -1028,22 +1029,45 @@ func (val Value) HasElement(elem Value) Value {
}
ty := val.Type()
+ unknownResult := UnknownVal(Bool).RefineNotNull()
+ if val.IsNull() {
+ panic("cannot HasElement on null value")
+ }
+ if !val.IsKnown() {
+ return unknownResult
+ }
+ if elem.Type() != DynamicPseudoType && val.Type().IsSetType() && val.Type().ElementType() != DynamicPseudoType {
+ // If we know the type of the given element and the element type of
+ // the set then they must match for the element to be present, because
+ // a set can't contain elements of any other type than its element type.
+ if !elem.Type().Equals(val.ty.ElementType()) {
+ return False
+ }
+ }
if !ty.IsSetType() {
panic("not a set type")
}
- if !val.IsKnown() || !elem.IsKnown() {
- return UnknownVal(Bool).RefineNotNull()
+ if !elem.IsKnown() {
+ return unknownResult
}
- if val.IsNull() {
- panic("can't call HasElement on a null value")
+ noMatchResult := False
+ if !val.IsWhollyKnown() {
+ // If the set has any unknown elements then a failure to find a
+ // known-value elem in it means that we don't know whether the
+ // element is present, rather than that it definitely isn't.
+ noMatchResult = unknownResult
}
if !ty.ElementType().Equals(elem.Type()) {
+ // A set can only contain an element of its own element type
return False
}
- s := val.v.(set.Set[interface{}])
- return BoolVal(s.Has(elem.v))
+ s := val.v.(set.Set[any])
+ if !s.Has(elem.v) {
+ return noMatchResult
+ }
+ return True
}
// Length returns the length of the receiver, which must be a collection type
@@ -1079,7 +1103,7 @@ func (val Value) Length() Value {
// may or may not be equal to other elements in the set, and thus they
// may or may not coalesce with other elements and produce fewer
// items in the resulting set.
- storeLength := int64(val.v.(set.Set[interface{}]).Length())
+ storeLength := int64(val.v.(set.Set[any]).Length())
if storeLength == 1 || val.IsWhollyKnown() {
// If our set is wholly known then we know its length.
//
@@ -1141,7 +1165,7 @@ func (val Value) LengthInt() int {
switch {
case val.ty.IsListType():
- return len(val.v.([]interface{}))
+ return len(val.v.([]any))
case val.ty.IsSetType():
// NOTE: This is technically not correct in cases where the set
@@ -1153,40 +1177,59 @@ func (val Value) LengthInt() int {
// compatibility with callers that were relying on LengthInt rather
// than calling Length. Instead of panicking when a set contains an
// unknown value, LengthInt returns the largest possible length.
- return val.v.(set.Set[interface{}]).Length()
+ return val.v.(set.Set[any]).Length()
case val.ty.IsMapType():
- return len(val.v.(map[string]interface{}))
+ return len(val.v.(map[string]any))
default:
panic("value is not a collection")
}
}
-// ElementIterator returns an ElementIterator for iterating the elements
-// of the receiver, which must be a collection type, a tuple type, or an object
-// type. If called on a method of any other type, this method will panic.
+// Elements returns an iterable sequence over the elements of the reciever,
+// which must be a collection type, a tuple type, or an object type.
+// If called on a value of any other type, this method will panic.
+// The value must also be known, non-null, and unmarked, or this method will
+// panic.
//
-// The value must be Known and non-Null, or this method will panic.
+// Use [Value.CanIterateElements] to check dynamically if a particular value
+// can support this method without panicking.
//
-// If the receiver is of a list type, the returned keys will be of type Number
-// and the values will be of the list's element type.
+// The two values in each iteration represent a key and a value respectively.
//
-// If the receiver is of a map type, the returned keys will be of type String
-// and the value will be of the map's element type. Elements are passed in
-// ascending lexicographical order by key.
+// If the receiver is of list type then the key is guaranteed to be of type
+// [Number] and the values are of the list's element type.
//
-// If the receiver is of a set type, each element is returned as both the
-// key and the value, since set members are their own identity.
+// The the reciever is of a map type then the key is guaranteed to be of type
+// [String] and the values are of the map's element type. Elements are
+// produced in ascending lexicographical order by key.
//
-// If the receiver is of a tuple type, the returned keys will be of type Number
-// and the value will be of the corresponding element's type.
+// If the receiver is of a set type then each element is returned as both the
+// key and the value, because set member values are their own identity.
//
-// If the receiver is of an object type, the returned keys will be of type
-// String and the value will be of the corresponding attributes's type.
+// If the reciever is of a tuple type then the key is guaranteed to be of type
+// [Number] and the and the value types match the corresponding element types.
//
-// ElementIterator is an integration method, so it cannot handle Unknown
-// values. This method will panic if the receiver is Unknown.
+// If the reciever is of an object type then the key is guaranteed to be of
+// type [String] and the value types match the corresponding attribute types.
+func (val Value) Elements() iter.Seq2[Value, Value] {
+ return func(yield func(Value, Value) bool) {
+ for it := val.ElementIterator(); it.Next(); {
+ if !yield(it.Element()) {
+ break
+ }
+ }
+ }
+}
+
+// ElementIterator returns an ElementIterator for iterating the elements
+// of the receiver, which must be a collection type, a tuple type, or an object
+// type. If called on a method of any other type, this method will panic.
+// The value must be known and non-null, or this method will panic.
+//
+// The element iterator produces keys and values matching what's described
+// for [Value.Elements]. New code should prefer to use [Value.Elements].
func (val Value) ElementIterator() ElementIterator {
val.assertUnmarked()
if !val.IsKnown() {
@@ -1199,7 +1242,7 @@ func (val Value) ElementIterator() ElementIterator {
}
// CanIterateElements returns true if the receiver can support the
-// ElementIterator method (and by extension, ForEachElement) without panic.
+// Elements, ElementIterator, and ForEachElement methods without panic.
func (val Value) CanIterateElements() bool {
return canElementIterator(val)
}
@@ -1209,7 +1252,9 @@ func (val Value) CanIterateElements() bool {
// will panic.
//
// ForEachElement uses ElementIterator internally, and so the values passed
-// to the callback are as described for ElementIterator.
+// to the callback are as described for [Value.Elements]. New code should
+// prefer to use [Value.Elements] in a normal for loop instead of using this
+// method.
//
// Returns true if the iteration exited early due to the callback function
// returning true, or false if the loop ran to completion.
@@ -1492,7 +1537,7 @@ func (val Value) AsValueSet() ValueSet {
// The result is the same pointer that was passed to CapsuleVal to create
// the value. Since cty considers values to be immutable, it is strongly
// recommended to treat the encapsulated value itself as immutable too.
-func (val Value) EncapsulatedValue() interface{} {
+func (val Value) EncapsulatedValue() any {
val.assertUnmarked()
if !val.Type().IsCapsuleType() {
panic("not a capsule-typed value")
diff --git a/vendor/github.com/zclconf/go-cty/cty/walk.go b/vendor/github.com/zclconf/go-cty/cty/walk.go
index 87ba32e796..e7025e487a 100644
--- a/vendor/github.com/zclconf/go-cty/cty/walk.go
+++ b/vendor/github.com/zclconf/go-cty/cty/walk.go
@@ -1,11 +1,19 @@
package cty
+import (
+ "io"
+ "iter"
+)
+
// Walk visits all of the values in a possibly-complex structure, calling
// a given function for each value.
//
// For example, given a list of strings the callback would first be called
// with the whole list and then called once for each element of the list.
//
+// New callers may prefer to use [DeepValues] instead, because that returns
+// a result usable with a normal for loop.
+//
// The callback function may prevent recursive visits to child values by
// returning false. The callback function my halt the walk altogether by
// returning a non-nil error. If the returned error is about the element
@@ -19,6 +27,26 @@ func Walk(val Value, cb func(Path, Value) (bool, error)) error {
return walk(path, val, cb)
}
+// DeepValues returns an iterable sequence containing at least the given
+// value but also, if it is of a collection or structural type, the other values
+// nested within it recursively.
+//
+// The [Path] values in different elements of the sequence may share a backing
+// array to reduce garbage generated during iteration, so if a caller wishes to
+// preserve a path outside of a single loop iteration the caller must copy it to
+// a separate Path value with its own separate backing array, such as by calling
+// [Path.Copy].
+func DeepValues(val Value) iter.Seq2[Path, Value] {
+ return func(yield func(Path, Value) bool) {
+ Walk(val, func(p Path, v Value) (bool, error) {
+ if !yield(p, v) {
+ return false, io.EOF // arbitrary error just to get Walk to stop
+ }
+ return true, nil
+ })
+ }
+}
+
func walk(path Path, val Value, cb func(Path, Value) (bool, error)) error {
deeper, err := cb(path, val)
if err != nil {
@@ -213,7 +241,7 @@ func transform(path Path, val Value, t Transformer) (Value, error) {
atys := ty.AttributeTypes()
newAVs := make(map[string]Value)
for name := range atys {
- av := val.GetAttr(name)
+ av := rawVal.GetAttr(name)
path := append(path, GetAttrStep{
Name: name,
})
diff --git a/vendor/golang.org/x/crypto/argon2/argon2.go b/vendor/golang.org/x/crypto/argon2/argon2.go
index 29f0a2de45..2b65ec91ac 100644
--- a/vendor/golang.org/x/crypto/argon2/argon2.go
+++ b/vendor/golang.org/x/crypto/argon2/argon2.go
@@ -6,7 +6,7 @@
// Argon2 was selected as the winner of the Password Hashing Competition and can
// be used to derive cryptographic keys from passwords.
//
-// For a detailed specification of Argon2 see [1].
+// For a detailed specification of Argon2 see [argon2-specs.pdf].
//
// If you aren't sure which function you need, use Argon2id (IDKey) and
// the parameter recommendations for your scenario.
@@ -17,7 +17,7 @@
// It uses data-independent memory access, which is preferred for password
// hashing and password-based key derivation. Argon2i requires more passes over
// memory than Argon2id to protect from trade-off attacks. The recommended
-// parameters (taken from [2]) for non-interactive operations are time=3 and to
+// parameters (taken from [RFC 9106 Section 7.3]) for non-interactive operations are time=3 and to
// use the maximum available memory.
//
// # Argon2id
@@ -27,11 +27,11 @@
// half of the first iteration over the memory and data-dependent memory access
// for the rest. Argon2id is side-channel resistant and provides better brute-
// force cost savings due to time-memory tradeoffs than Argon2i. The recommended
-// parameters for non-interactive operations (taken from [2]) are time=1 and to
+// parameters for non-interactive operations (taken from [RFC 9106 Section 7.3]) are time=1 and to
// use the maximum available memory.
//
-// [1] https://github.com/P-H-C/phc-winner-argon2/blob/master/argon2-specs.pdf
-// [2] https://tools.ietf.org/html/draft-irtf-cfrg-argon2-03#section-9.3
+// [argon2-specs.pdf]: https://github.com/P-H-C/phc-winner-argon2/blob/master/argon2-specs.pdf
+// [RFC 9106 Section 7.3]: https://www.rfc-editor.org/rfc/rfc9106.html#section-7.3
package argon2
import (
@@ -59,7 +59,7 @@ const (
//
// key := argon2.Key([]byte("some password"), salt, 3, 32*1024, 4, 32)
//
-// The draft RFC recommends[2] time=3, and memory=32*1024 is a sensible number.
+// [RFC 9106 Section 7.3] recommends time=3, and memory=32*1024 as a sensible number.
// If using that amount of memory (32 MB) is not possible in some contexts then
// the time parameter can be increased to compensate.
//
@@ -69,6 +69,8 @@ const (
// adjusted to the number of available CPUs. The cost parameters should be
// increased as memory latency and CPU parallelism increases. Remember to get a
// good random salt.
+//
+// [RFC 9106 Section 7.3]: https://www.rfc-editor.org/rfc/rfc9106.html#section-7.3
func Key(password, salt []byte, time, memory uint32, threads uint8, keyLen uint32) []byte {
return deriveKey(argon2i, password, salt, nil, nil, time, memory, threads, keyLen)
}
@@ -83,7 +85,7 @@ func Key(password, salt []byte, time, memory uint32, threads uint8, keyLen uint3
//
// key := argon2.IDKey([]byte("some password"), salt, 1, 64*1024, 4, 32)
//
-// The draft RFC recommends[2] time=1, and memory=64*1024 is a sensible number.
+// [RFC 9106 Section 7.3] recommends time=1, and memory=64*1024 as a sensible number.
// If using that amount of memory (64 MB) is not possible in some contexts then
// the time parameter can be increased to compensate.
//
@@ -93,6 +95,8 @@ func Key(password, salt []byte, time, memory uint32, threads uint8, keyLen uint3
// adjusted to the numbers of available CPUs. The cost parameters should be
// increased as memory latency and CPU parallelism increases. Remember to get a
// good random salt.
+//
+// [RFC 9106 Section 7.3]: https://www.rfc-editor.org/rfc/rfc9106.html#section-7.3
func IDKey(password, salt []byte, time, memory uint32, threads uint8, keyLen uint32) []byte {
return deriveKey(argon2id, password, salt, nil, nil, time, memory, threads, keyLen)
}
diff --git a/vendor/golang.org/x/crypto/chacha20/chacha_arm64.s b/vendor/golang.org/x/crypto/chacha20/chacha_arm64.s
index 7dd2638e88..769af387e2 100644
--- a/vendor/golang.org/x/crypto/chacha20/chacha_arm64.s
+++ b/vendor/golang.org/x/crypto/chacha20/chacha_arm64.s
@@ -29,7 +29,7 @@ loop:
MOVD $NUM_ROUNDS, R21
VLD1 (R11), [V30.S4, V31.S4]
- // load contants
+ // load constants
// VLD4R (R10), [V0.S4, V1.S4, V2.S4, V3.S4]
WORD $0x4D60E940
diff --git a/vendor/golang.org/x/crypto/cryptobyte/asn1.go b/vendor/golang.org/x/crypto/cryptobyte/asn1.go
new file mode 100644
index 0000000000..d25979d9f5
--- /dev/null
+++ b/vendor/golang.org/x/crypto/cryptobyte/asn1.go
@@ -0,0 +1,825 @@
+// Copyright 2017 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package cryptobyte
+
+import (
+ encoding_asn1 "encoding/asn1"
+ "fmt"
+ "math/big"
+ "reflect"
+ "time"
+
+ "golang.org/x/crypto/cryptobyte/asn1"
+)
+
+// This file contains ASN.1-related methods for String and Builder.
+
+// Builder
+
+// AddASN1Int64 appends a DER-encoded ASN.1 INTEGER.
+func (b *Builder) AddASN1Int64(v int64) {
+ b.addASN1Signed(asn1.INTEGER, v)
+}
+
+// AddASN1Int64WithTag appends a DER-encoded ASN.1 INTEGER with the
+// given tag.
+func (b *Builder) AddASN1Int64WithTag(v int64, tag asn1.Tag) {
+ b.addASN1Signed(tag, v)
+}
+
+// AddASN1Enum appends a DER-encoded ASN.1 ENUMERATION.
+func (b *Builder) AddASN1Enum(v int64) {
+ b.addASN1Signed(asn1.ENUM, v)
+}
+
+func (b *Builder) addASN1Signed(tag asn1.Tag, v int64) {
+ b.AddASN1(tag, func(c *Builder) {
+ length := 1
+ for i := v; i >= 0x80 || i < -0x80; i >>= 8 {
+ length++
+ }
+
+ for ; length > 0; length-- {
+ i := v >> uint((length-1)*8) & 0xff
+ c.AddUint8(uint8(i))
+ }
+ })
+}
+
+// AddASN1Uint64 appends a DER-encoded ASN.1 INTEGER.
+func (b *Builder) AddASN1Uint64(v uint64) {
+ b.AddASN1(asn1.INTEGER, func(c *Builder) {
+ length := 1
+ for i := v; i >= 0x80; i >>= 8 {
+ length++
+ }
+
+ for ; length > 0; length-- {
+ i := v >> uint((length-1)*8) & 0xff
+ c.AddUint8(uint8(i))
+ }
+ })
+}
+
+// AddASN1BigInt appends a DER-encoded ASN.1 INTEGER.
+func (b *Builder) AddASN1BigInt(n *big.Int) {
+ if b.err != nil {
+ return
+ }
+
+ b.AddASN1(asn1.INTEGER, func(c *Builder) {
+ if n.Sign() < 0 {
+ // A negative number has to be converted to two's-complement form. So we
+ // invert and subtract 1. If the most-significant-bit isn't set then
+ // we'll need to pad the beginning with 0xff in order to keep the number
+ // negative.
+ nMinus1 := new(big.Int).Neg(n)
+ nMinus1.Sub(nMinus1, bigOne)
+ bytes := nMinus1.Bytes()
+ for i := range bytes {
+ bytes[i] ^= 0xff
+ }
+ if len(bytes) == 0 || bytes[0]&0x80 == 0 {
+ c.add(0xff)
+ }
+ c.add(bytes...)
+ } else if n.Sign() == 0 {
+ c.add(0)
+ } else {
+ bytes := n.Bytes()
+ if bytes[0]&0x80 != 0 {
+ c.add(0)
+ }
+ c.add(bytes...)
+ }
+ })
+}
+
+// AddASN1OctetString appends a DER-encoded ASN.1 OCTET STRING.
+func (b *Builder) AddASN1OctetString(bytes []byte) {
+ b.AddASN1(asn1.OCTET_STRING, func(c *Builder) {
+ c.AddBytes(bytes)
+ })
+}
+
+const generalizedTimeFormatStr = "20060102150405Z0700"
+
+// AddASN1GeneralizedTime appends a DER-encoded ASN.1 GENERALIZEDTIME.
+func (b *Builder) AddASN1GeneralizedTime(t time.Time) {
+ if t.Year() < 0 || t.Year() > 9999 {
+ b.err = fmt.Errorf("cryptobyte: cannot represent %v as a GeneralizedTime", t)
+ return
+ }
+ b.AddASN1(asn1.GeneralizedTime, func(c *Builder) {
+ c.AddBytes([]byte(t.Format(generalizedTimeFormatStr)))
+ })
+}
+
+// AddASN1UTCTime appends a DER-encoded ASN.1 UTCTime.
+func (b *Builder) AddASN1UTCTime(t time.Time) {
+ b.AddASN1(asn1.UTCTime, func(c *Builder) {
+ // As utilized by the X.509 profile, UTCTime can only
+ // represent the years 1950 through 2049.
+ if t.Year() < 1950 || t.Year() >= 2050 {
+ b.err = fmt.Errorf("cryptobyte: cannot represent %v as a UTCTime", t)
+ return
+ }
+ c.AddBytes([]byte(t.Format(defaultUTCTimeFormatStr)))
+ })
+}
+
+// AddASN1BitString appends a DER-encoded ASN.1 BIT STRING. This does not
+// support BIT STRINGs that are not a whole number of bytes.
+func (b *Builder) AddASN1BitString(data []byte) {
+ b.AddASN1(asn1.BIT_STRING, func(b *Builder) {
+ b.AddUint8(0)
+ b.AddBytes(data)
+ })
+}
+
+func (b *Builder) addBase128Int(n int64) {
+ var length int
+ if n == 0 {
+ length = 1
+ } else {
+ for i := n; i > 0; i >>= 7 {
+ length++
+ }
+ }
+
+ for i := length - 1; i >= 0; i-- {
+ o := byte(n >> uint(i*7))
+ o &= 0x7f
+ if i != 0 {
+ o |= 0x80
+ }
+
+ b.add(o)
+ }
+}
+
+func isValidOID(oid encoding_asn1.ObjectIdentifier) bool {
+ if len(oid) < 2 {
+ return false
+ }
+
+ if oid[0] > 2 || (oid[0] <= 1 && oid[1] >= 40) {
+ return false
+ }
+
+ for _, v := range oid {
+ if v < 0 {
+ return false
+ }
+ }
+
+ return true
+}
+
+func (b *Builder) AddASN1ObjectIdentifier(oid encoding_asn1.ObjectIdentifier) {
+ b.AddASN1(asn1.OBJECT_IDENTIFIER, func(b *Builder) {
+ if !isValidOID(oid) {
+ b.err = fmt.Errorf("cryptobyte: invalid OID: %v", oid)
+ return
+ }
+
+ b.addBase128Int(int64(oid[0])*40 + int64(oid[1]))
+ for _, v := range oid[2:] {
+ b.addBase128Int(int64(v))
+ }
+ })
+}
+
+func (b *Builder) AddASN1Boolean(v bool) {
+ b.AddASN1(asn1.BOOLEAN, func(b *Builder) {
+ if v {
+ b.AddUint8(0xff)
+ } else {
+ b.AddUint8(0)
+ }
+ })
+}
+
+func (b *Builder) AddASN1NULL() {
+ b.add(uint8(asn1.NULL), 0)
+}
+
+// MarshalASN1 calls encoding_asn1.Marshal on its input and appends the result if
+// successful or records an error if one occurred.
+func (b *Builder) MarshalASN1(v interface{}) {
+ // NOTE(martinkr): This is somewhat of a hack to allow propagation of
+ // encoding_asn1.Marshal errors into Builder.err. N.B. if you call MarshalASN1 with a
+ // value embedded into a struct, its tag information is lost.
+ if b.err != nil {
+ return
+ }
+ bytes, err := encoding_asn1.Marshal(v)
+ if err != nil {
+ b.err = err
+ return
+ }
+ b.AddBytes(bytes)
+}
+
+// AddASN1 appends an ASN.1 object. The object is prefixed with the given tag.
+// Tags greater than 30 are not supported and result in an error (i.e.
+// low-tag-number form only). The child builder passed to the
+// BuilderContinuation can be used to build the content of the ASN.1 object.
+func (b *Builder) AddASN1(tag asn1.Tag, f BuilderContinuation) {
+ if b.err != nil {
+ return
+ }
+ // Identifiers with the low five bits set indicate high-tag-number format
+ // (two or more octets), which we don't support.
+ if tag&0x1f == 0x1f {
+ b.err = fmt.Errorf("cryptobyte: high-tag number identifier octets not supported: 0x%x", tag)
+ return
+ }
+ b.AddUint8(uint8(tag))
+ b.addLengthPrefixed(1, true, f)
+}
+
+// String
+
+// ReadASN1Boolean decodes an ASN.1 BOOLEAN and converts it to a boolean
+// representation into out and advances. It reports whether the read
+// was successful.
+func (s *String) ReadASN1Boolean(out *bool) bool {
+ var bytes String
+ if !s.ReadASN1(&bytes, asn1.BOOLEAN) || len(bytes) != 1 {
+ return false
+ }
+
+ switch bytes[0] {
+ case 0:
+ *out = false
+ case 0xff:
+ *out = true
+ default:
+ return false
+ }
+
+ return true
+}
+
+// ReadASN1Integer decodes an ASN.1 INTEGER into out and advances. If out does
+// not point to an integer, to a big.Int, or to a []byte it panics. Only
+// positive and zero values can be decoded into []byte, and they are returned as
+// big-endian binary values that share memory with s. Positive values will have
+// no leading zeroes, and zero will be returned as a single zero byte.
+// ReadASN1Integer reports whether the read was successful.
+func (s *String) ReadASN1Integer(out interface{}) bool {
+ switch out := out.(type) {
+ case *int, *int8, *int16, *int32, *int64:
+ var i int64
+ if !s.readASN1Int64(&i) || reflect.ValueOf(out).Elem().OverflowInt(i) {
+ return false
+ }
+ reflect.ValueOf(out).Elem().SetInt(i)
+ return true
+ case *uint, *uint8, *uint16, *uint32, *uint64:
+ var u uint64
+ if !s.readASN1Uint64(&u) || reflect.ValueOf(out).Elem().OverflowUint(u) {
+ return false
+ }
+ reflect.ValueOf(out).Elem().SetUint(u)
+ return true
+ case *big.Int:
+ return s.readASN1BigInt(out)
+ case *[]byte:
+ return s.readASN1Bytes(out)
+ default:
+ panic("out does not point to an integer type")
+ }
+}
+
+func checkASN1Integer(bytes []byte) bool {
+ if len(bytes) == 0 {
+ // An INTEGER is encoded with at least one octet.
+ return false
+ }
+ if len(bytes) == 1 {
+ return true
+ }
+ if bytes[0] == 0 && bytes[1]&0x80 == 0 || bytes[0] == 0xff && bytes[1]&0x80 == 0x80 {
+ // Value is not minimally encoded.
+ return false
+ }
+ return true
+}
+
+var bigOne = big.NewInt(1)
+
+func (s *String) readASN1BigInt(out *big.Int) bool {
+ var bytes String
+ if !s.ReadASN1(&bytes, asn1.INTEGER) || !checkASN1Integer(bytes) {
+ return false
+ }
+ if bytes[0]&0x80 == 0x80 {
+ // Negative number.
+ neg := make([]byte, len(bytes))
+ for i, b := range bytes {
+ neg[i] = ^b
+ }
+ out.SetBytes(neg)
+ out.Add(out, bigOne)
+ out.Neg(out)
+ } else {
+ out.SetBytes(bytes)
+ }
+ return true
+}
+
+func (s *String) readASN1Bytes(out *[]byte) bool {
+ var bytes String
+ if !s.ReadASN1(&bytes, asn1.INTEGER) || !checkASN1Integer(bytes) {
+ return false
+ }
+ if bytes[0]&0x80 == 0x80 {
+ return false
+ }
+ for len(bytes) > 1 && bytes[0] == 0 {
+ bytes = bytes[1:]
+ }
+ *out = bytes
+ return true
+}
+
+func (s *String) readASN1Int64(out *int64) bool {
+ var bytes String
+ if !s.ReadASN1(&bytes, asn1.INTEGER) || !checkASN1Integer(bytes) || !asn1Signed(out, bytes) {
+ return false
+ }
+ return true
+}
+
+func asn1Signed(out *int64, n []byte) bool {
+ length := len(n)
+ if length > 8 {
+ return false
+ }
+ for i := 0; i < length; i++ {
+ *out <<= 8
+ *out |= int64(n[i])
+ }
+ // Shift up and down in order to sign extend the result.
+ *out <<= 64 - uint8(length)*8
+ *out >>= 64 - uint8(length)*8
+ return true
+}
+
+func (s *String) readASN1Uint64(out *uint64) bool {
+ var bytes String
+ if !s.ReadASN1(&bytes, asn1.INTEGER) || !checkASN1Integer(bytes) || !asn1Unsigned(out, bytes) {
+ return false
+ }
+ return true
+}
+
+func asn1Unsigned(out *uint64, n []byte) bool {
+ length := len(n)
+ if length > 9 || length == 9 && n[0] != 0 {
+ // Too large for uint64.
+ return false
+ }
+ if n[0]&0x80 != 0 {
+ // Negative number.
+ return false
+ }
+ for i := 0; i < length; i++ {
+ *out <<= 8
+ *out |= uint64(n[i])
+ }
+ return true
+}
+
+// ReadASN1Int64WithTag decodes an ASN.1 INTEGER with the given tag into out
+// and advances. It reports whether the read was successful and resulted in a
+// value that can be represented in an int64.
+func (s *String) ReadASN1Int64WithTag(out *int64, tag asn1.Tag) bool {
+ var bytes String
+ return s.ReadASN1(&bytes, tag) && checkASN1Integer(bytes) && asn1Signed(out, bytes)
+}
+
+// ReadASN1Enum decodes an ASN.1 ENUMERATION into out and advances. It reports
+// whether the read was successful.
+func (s *String) ReadASN1Enum(out *int) bool {
+ var bytes String
+ var i int64
+ if !s.ReadASN1(&bytes, asn1.ENUM) || !checkASN1Integer(bytes) || !asn1Signed(&i, bytes) {
+ return false
+ }
+ if int64(int(i)) != i {
+ return false
+ }
+ *out = int(i)
+ return true
+}
+
+func (s *String) readBase128Int(out *int) bool {
+ ret := 0
+ for i := 0; len(*s) > 0; i++ {
+ if i == 5 {
+ return false
+ }
+ // Avoid overflowing int on a 32-bit platform.
+ // We don't want different behavior based on the architecture.
+ if ret >= 1<<(31-7) {
+ return false
+ }
+ ret <<= 7
+ b := s.read(1)[0]
+
+ // ITU-T X.690, section 8.19.2:
+ // The subidentifier shall be encoded in the fewest possible octets,
+ // that is, the leading octet of the subidentifier shall not have the value 0x80.
+ if i == 0 && b == 0x80 {
+ return false
+ }
+
+ ret |= int(b & 0x7f)
+ if b&0x80 == 0 {
+ *out = ret
+ return true
+ }
+ }
+ return false // truncated
+}
+
+// ReadASN1ObjectIdentifier decodes an ASN.1 OBJECT IDENTIFIER into out and
+// advances. It reports whether the read was successful.
+func (s *String) ReadASN1ObjectIdentifier(out *encoding_asn1.ObjectIdentifier) bool {
+ var bytes String
+ if !s.ReadASN1(&bytes, asn1.OBJECT_IDENTIFIER) || len(bytes) == 0 {
+ return false
+ }
+
+ // In the worst case, we get two elements from the first byte (which is
+ // encoded differently) and then every varint is a single byte long.
+ components := make([]int, len(bytes)+1)
+
+ // The first varint is 40*value1 + value2:
+ // According to this packing, value1 can take the values 0, 1 and 2 only.
+ // When value1 = 0 or value1 = 1, then value2 is <= 39. When value1 = 2,
+ // then there are no restrictions on value2.
+ var v int
+ if !bytes.readBase128Int(&v) {
+ return false
+ }
+ if v < 80 {
+ components[0] = v / 40
+ components[1] = v % 40
+ } else {
+ components[0] = 2
+ components[1] = v - 80
+ }
+
+ i := 2
+ for ; len(bytes) > 0; i++ {
+ if !bytes.readBase128Int(&v) {
+ return false
+ }
+ components[i] = v
+ }
+ *out = components[:i]
+ return true
+}
+
+// ReadASN1GeneralizedTime decodes an ASN.1 GENERALIZEDTIME into out and
+// advances. It reports whether the read was successful.
+func (s *String) ReadASN1GeneralizedTime(out *time.Time) bool {
+ var bytes String
+ if !s.ReadASN1(&bytes, asn1.GeneralizedTime) {
+ return false
+ }
+ t := string(bytes)
+ res, err := time.Parse(generalizedTimeFormatStr, t)
+ if err != nil {
+ return false
+ }
+ if serialized := res.Format(generalizedTimeFormatStr); serialized != t {
+ return false
+ }
+ *out = res
+ return true
+}
+
+const defaultUTCTimeFormatStr = "060102150405Z0700"
+
+// ReadASN1UTCTime decodes an ASN.1 UTCTime into out and advances.
+// It reports whether the read was successful.
+func (s *String) ReadASN1UTCTime(out *time.Time) bool {
+ var bytes String
+ if !s.ReadASN1(&bytes, asn1.UTCTime) {
+ return false
+ }
+ t := string(bytes)
+
+ formatStr := defaultUTCTimeFormatStr
+ var err error
+ res, err := time.Parse(formatStr, t)
+ if err != nil {
+ // Fallback to minute precision if we can't parse second
+ // precision. If we are following X.509 or X.690 we shouldn't
+ // support this, but we do.
+ formatStr = "0601021504Z0700"
+ res, err = time.Parse(formatStr, t)
+ }
+ if err != nil {
+ return false
+ }
+
+ if serialized := res.Format(formatStr); serialized != t {
+ return false
+ }
+
+ if res.Year() >= 2050 {
+ // UTCTime interprets the low order digits 50-99 as 1950-99.
+ // This only applies to its use in the X.509 profile.
+ // See https://tools.ietf.org/html/rfc5280#section-4.1.2.5.1
+ res = res.AddDate(-100, 0, 0)
+ }
+ *out = res
+ return true
+}
+
+// ReadASN1BitString decodes an ASN.1 BIT STRING into out and advances.
+// It reports whether the read was successful.
+func (s *String) ReadASN1BitString(out *encoding_asn1.BitString) bool {
+ var bytes String
+ if !s.ReadASN1(&bytes, asn1.BIT_STRING) || len(bytes) == 0 ||
+ len(bytes)*8/8 != len(bytes) {
+ return false
+ }
+
+ paddingBits := bytes[0]
+ bytes = bytes[1:]
+ if paddingBits > 7 ||
+ len(bytes) == 0 && paddingBits != 0 ||
+ len(bytes) > 0 && bytes[len(bytes)-1]&(1< 4 || len(*s) < int(2+lenLen) {
+ return false
+ }
+
+ lenBytes := String((*s)[2 : 2+lenLen])
+ if !lenBytes.readUnsigned(&len32, int(lenLen)) {
+ return false
+ }
+
+ // ITU-T X.690 section 10.1 (DER length forms) requires encoding the length
+ // with the minimum number of octets.
+ if len32 < 128 {
+ // Length should have used short-form encoding.
+ return false
+ }
+ if len32>>((lenLen-1)*8) == 0 {
+ // Leading octet is 0. Length should have been at least one byte shorter.
+ return false
+ }
+
+ headerLen = 2 + uint32(lenLen)
+ if headerLen+len32 < len32 {
+ // Overflow.
+ return false
+ }
+ length = headerLen + len32
+ }
+
+ if int(length) < 0 || !s.ReadBytes((*[]byte)(out), int(length)) {
+ return false
+ }
+ if skipHeader && !out.Skip(int(headerLen)) {
+ panic("cryptobyte: internal error")
+ }
+
+ return true
+}
diff --git a/vendor/golang.org/x/crypto/cryptobyte/asn1/asn1.go b/vendor/golang.org/x/crypto/cryptobyte/asn1/asn1.go
new file mode 100644
index 0000000000..90ef6a241d
--- /dev/null
+++ b/vendor/golang.org/x/crypto/cryptobyte/asn1/asn1.go
@@ -0,0 +1,46 @@
+// Copyright 2017 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Package asn1 contains supporting types for parsing and building ASN.1
+// messages with the cryptobyte package.
+package asn1
+
+// Tag represents an ASN.1 identifier octet, consisting of a tag number
+// (indicating a type) and class (such as context-specific or constructed).
+//
+// Methods in the cryptobyte package only support the low-tag-number form, i.e.
+// a single identifier octet with bits 7-8 encoding the class and bits 1-6
+// encoding the tag number.
+type Tag uint8
+
+const (
+ classConstructed = 0x20
+ classContextSpecific = 0x80
+)
+
+// Constructed returns t with the constructed class bit set.
+func (t Tag) Constructed() Tag { return t | classConstructed }
+
+// ContextSpecific returns t with the context-specific class bit set.
+func (t Tag) ContextSpecific() Tag { return t | classContextSpecific }
+
+// The following is a list of standard tag and class combinations.
+const (
+ BOOLEAN = Tag(1)
+ INTEGER = Tag(2)
+ BIT_STRING = Tag(3)
+ OCTET_STRING = Tag(4)
+ NULL = Tag(5)
+ OBJECT_IDENTIFIER = Tag(6)
+ ENUM = Tag(10)
+ UTF8String = Tag(12)
+ SEQUENCE = Tag(16 | classConstructed)
+ SET = Tag(17 | classConstructed)
+ PrintableString = Tag(19)
+ T61String = Tag(20)
+ IA5String = Tag(22)
+ UTCTime = Tag(23)
+ GeneralizedTime = Tag(24)
+ GeneralString = Tag(27)
+)
diff --git a/vendor/golang.org/x/crypto/cryptobyte/builder.go b/vendor/golang.org/x/crypto/cryptobyte/builder.go
new file mode 100644
index 0000000000..cf254f5f1e
--- /dev/null
+++ b/vendor/golang.org/x/crypto/cryptobyte/builder.go
@@ -0,0 +1,350 @@
+// Copyright 2017 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package cryptobyte
+
+import (
+ "errors"
+ "fmt"
+)
+
+// A Builder builds byte strings from fixed-length and length-prefixed values.
+// Builders either allocate space as needed, or are ‘fixed’, which means that
+// they write into a given buffer and produce an error if it's exhausted.
+//
+// The zero value is a usable Builder that allocates space as needed.
+//
+// Simple values are marshaled and appended to a Builder using methods on the
+// Builder. Length-prefixed values are marshaled by providing a
+// BuilderContinuation, which is a function that writes the inner contents of
+// the value to a given Builder. See the documentation for BuilderContinuation
+// for details.
+type Builder struct {
+ err error
+ result []byte
+ fixedSize bool
+ child *Builder
+ offset int
+ pendingLenLen int
+ pendingIsASN1 bool
+ inContinuation *bool
+}
+
+// NewBuilder creates a Builder that appends its output to the given buffer.
+// Like append(), the slice will be reallocated if its capacity is exceeded.
+// Use Bytes to get the final buffer.
+func NewBuilder(buffer []byte) *Builder {
+ return &Builder{
+ result: buffer,
+ }
+}
+
+// NewFixedBuilder creates a Builder that appends its output into the given
+// buffer. This builder does not reallocate the output buffer. Writes that
+// would exceed the buffer's capacity are treated as an error.
+func NewFixedBuilder(buffer []byte) *Builder {
+ return &Builder{
+ result: buffer,
+ fixedSize: true,
+ }
+}
+
+// SetError sets the value to be returned as the error from Bytes. Writes
+// performed after calling SetError are ignored.
+func (b *Builder) SetError(err error) {
+ b.err = err
+}
+
+// Bytes returns the bytes written by the builder or an error if one has
+// occurred during building.
+func (b *Builder) Bytes() ([]byte, error) {
+ if b.err != nil {
+ return nil, b.err
+ }
+ return b.result[b.offset:], nil
+}
+
+// BytesOrPanic returns the bytes written by the builder or panics if an error
+// has occurred during building.
+func (b *Builder) BytesOrPanic() []byte {
+ if b.err != nil {
+ panic(b.err)
+ }
+ return b.result[b.offset:]
+}
+
+// AddUint8 appends an 8-bit value to the byte string.
+func (b *Builder) AddUint8(v uint8) {
+ b.add(byte(v))
+}
+
+// AddUint16 appends a big-endian, 16-bit value to the byte string.
+func (b *Builder) AddUint16(v uint16) {
+ b.add(byte(v>>8), byte(v))
+}
+
+// AddUint24 appends a big-endian, 24-bit value to the byte string. The highest
+// byte of the 32-bit input value is silently truncated.
+func (b *Builder) AddUint24(v uint32) {
+ b.add(byte(v>>16), byte(v>>8), byte(v))
+}
+
+// AddUint32 appends a big-endian, 32-bit value to the byte string.
+func (b *Builder) AddUint32(v uint32) {
+ b.add(byte(v>>24), byte(v>>16), byte(v>>8), byte(v))
+}
+
+// AddUint48 appends a big-endian, 48-bit value to the byte string.
+func (b *Builder) AddUint48(v uint64) {
+ b.add(byte(v>>40), byte(v>>32), byte(v>>24), byte(v>>16), byte(v>>8), byte(v))
+}
+
+// AddUint64 appends a big-endian, 64-bit value to the byte string.
+func (b *Builder) AddUint64(v uint64) {
+ b.add(byte(v>>56), byte(v>>48), byte(v>>40), byte(v>>32), byte(v>>24), byte(v>>16), byte(v>>8), byte(v))
+}
+
+// AddBytes appends a sequence of bytes to the byte string.
+func (b *Builder) AddBytes(v []byte) {
+ b.add(v...)
+}
+
+// BuilderContinuation is a continuation-passing interface for building
+// length-prefixed byte sequences. Builder methods for length-prefixed
+// sequences (AddUint8LengthPrefixed etc) will invoke the BuilderContinuation
+// supplied to them. The child builder passed to the continuation can be used
+// to build the content of the length-prefixed sequence. For example:
+//
+// parent := cryptobyte.NewBuilder()
+// parent.AddUint8LengthPrefixed(func (child *Builder) {
+// child.AddUint8(42)
+// child.AddUint8LengthPrefixed(func (grandchild *Builder) {
+// grandchild.AddUint8(5)
+// })
+// })
+//
+// It is an error to write more bytes to the child than allowed by the reserved
+// length prefix. After the continuation returns, the child must be considered
+// invalid, i.e. users must not store any copies or references of the child
+// that outlive the continuation.
+//
+// If the continuation panics with a value of type BuildError then the inner
+// error will be returned as the error from Bytes. If the child panics
+// otherwise then Bytes will repanic with the same value.
+type BuilderContinuation func(child *Builder)
+
+// BuildError wraps an error. If a BuilderContinuation panics with this value,
+// the panic will be recovered and the inner error will be returned from
+// Builder.Bytes.
+type BuildError struct {
+ Err error
+}
+
+// AddUint8LengthPrefixed adds a 8-bit length-prefixed byte sequence.
+func (b *Builder) AddUint8LengthPrefixed(f BuilderContinuation) {
+ b.addLengthPrefixed(1, false, f)
+}
+
+// AddUint16LengthPrefixed adds a big-endian, 16-bit length-prefixed byte sequence.
+func (b *Builder) AddUint16LengthPrefixed(f BuilderContinuation) {
+ b.addLengthPrefixed(2, false, f)
+}
+
+// AddUint24LengthPrefixed adds a big-endian, 24-bit length-prefixed byte sequence.
+func (b *Builder) AddUint24LengthPrefixed(f BuilderContinuation) {
+ b.addLengthPrefixed(3, false, f)
+}
+
+// AddUint32LengthPrefixed adds a big-endian, 32-bit length-prefixed byte sequence.
+func (b *Builder) AddUint32LengthPrefixed(f BuilderContinuation) {
+ b.addLengthPrefixed(4, false, f)
+}
+
+func (b *Builder) callContinuation(f BuilderContinuation, arg *Builder) {
+ if !*b.inContinuation {
+ *b.inContinuation = true
+
+ defer func() {
+ *b.inContinuation = false
+
+ r := recover()
+ if r == nil {
+ return
+ }
+
+ if buildError, ok := r.(BuildError); ok {
+ b.err = buildError.Err
+ } else {
+ panic(r)
+ }
+ }()
+ }
+
+ f(arg)
+}
+
+func (b *Builder) addLengthPrefixed(lenLen int, isASN1 bool, f BuilderContinuation) {
+ // Subsequent writes can be ignored if the builder has encountered an error.
+ if b.err != nil {
+ return
+ }
+
+ offset := len(b.result)
+ b.add(make([]byte, lenLen)...)
+
+ if b.inContinuation == nil {
+ b.inContinuation = new(bool)
+ }
+
+ b.child = &Builder{
+ result: b.result,
+ fixedSize: b.fixedSize,
+ offset: offset,
+ pendingLenLen: lenLen,
+ pendingIsASN1: isASN1,
+ inContinuation: b.inContinuation,
+ }
+
+ b.callContinuation(f, b.child)
+ b.flushChild()
+ if b.child != nil {
+ panic("cryptobyte: internal error")
+ }
+}
+
+func (b *Builder) flushChild() {
+ if b.child == nil {
+ return
+ }
+ b.child.flushChild()
+ child := b.child
+ b.child = nil
+
+ if child.err != nil {
+ b.err = child.err
+ return
+ }
+
+ length := len(child.result) - child.pendingLenLen - child.offset
+
+ if length < 0 {
+ panic("cryptobyte: internal error") // result unexpectedly shrunk
+ }
+
+ if child.pendingIsASN1 {
+ // For ASN.1, we reserved a single byte for the length. If that turned out
+ // to be incorrect, we have to move the contents along in order to make
+ // space.
+ if child.pendingLenLen != 1 {
+ panic("cryptobyte: internal error")
+ }
+ var lenLen, lenByte uint8
+ if int64(length) > 0xfffffffe {
+ b.err = errors.New("pending ASN.1 child too long")
+ return
+ } else if length > 0xffffff {
+ lenLen = 5
+ lenByte = 0x80 | 4
+ } else if length > 0xffff {
+ lenLen = 4
+ lenByte = 0x80 | 3
+ } else if length > 0xff {
+ lenLen = 3
+ lenByte = 0x80 | 2
+ } else if length > 0x7f {
+ lenLen = 2
+ lenByte = 0x80 | 1
+ } else {
+ lenLen = 1
+ lenByte = uint8(length)
+ length = 0
+ }
+
+ // Insert the initial length byte, make space for successive length bytes,
+ // and adjust the offset.
+ child.result[child.offset] = lenByte
+ extraBytes := int(lenLen - 1)
+ if extraBytes != 0 {
+ child.add(make([]byte, extraBytes)...)
+ childStart := child.offset + child.pendingLenLen
+ copy(child.result[childStart+extraBytes:], child.result[childStart:])
+ }
+ child.offset++
+ child.pendingLenLen = extraBytes
+ }
+
+ l := length
+ for i := child.pendingLenLen - 1; i >= 0; i-- {
+ child.result[child.offset+i] = uint8(l)
+ l >>= 8
+ }
+ if l != 0 {
+ b.err = fmt.Errorf("cryptobyte: pending child length %d exceeds %d-byte length prefix", length, child.pendingLenLen)
+ return
+ }
+
+ if b.fixedSize && &b.result[0] != &child.result[0] {
+ panic("cryptobyte: BuilderContinuation reallocated a fixed-size buffer")
+ }
+
+ b.result = child.result
+}
+
+func (b *Builder) add(bytes ...byte) {
+ if b.err != nil {
+ return
+ }
+ if b.child != nil {
+ panic("cryptobyte: attempted write while child is pending")
+ }
+ if len(b.result)+len(bytes) < len(bytes) {
+ b.err = errors.New("cryptobyte: length overflow")
+ }
+ if b.fixedSize && len(b.result)+len(bytes) > cap(b.result) {
+ b.err = errors.New("cryptobyte: Builder is exceeding its fixed-size buffer")
+ return
+ }
+ b.result = append(b.result, bytes...)
+}
+
+// Unwrite rolls back non-negative n bytes written directly to the Builder.
+// An attempt by a child builder passed to a continuation to unwrite bytes
+// from its parent will panic.
+func (b *Builder) Unwrite(n int) {
+ if b.err != nil {
+ return
+ }
+ if b.child != nil {
+ panic("cryptobyte: attempted unwrite while child is pending")
+ }
+ length := len(b.result) - b.pendingLenLen - b.offset
+ if length < 0 {
+ panic("cryptobyte: internal error")
+ }
+ if n < 0 {
+ panic("cryptobyte: attempted to unwrite negative number of bytes")
+ }
+ if n > length {
+ panic("cryptobyte: attempted to unwrite more than was written")
+ }
+ b.result = b.result[:len(b.result)-n]
+}
+
+// A MarshalingValue marshals itself into a Builder.
+type MarshalingValue interface {
+ // Marshal is called by Builder.AddValue. It receives a pointer to a builder
+ // to marshal itself into. It may return an error that occurred during
+ // marshaling, such as unset or invalid values.
+ Marshal(b *Builder) error
+}
+
+// AddValue calls Marshal on v, passing a pointer to the builder to append to.
+// If Marshal returns an error, it is set on the Builder so that subsequent
+// appends don't have an effect.
+func (b *Builder) AddValue(v MarshalingValue) {
+ err := v.Marshal(b)
+ if err != nil {
+ b.err = err
+ }
+}
diff --git a/vendor/golang.org/x/crypto/cryptobyte/string.go b/vendor/golang.org/x/crypto/cryptobyte/string.go
new file mode 100644
index 0000000000..4b0f8097f9
--- /dev/null
+++ b/vendor/golang.org/x/crypto/cryptobyte/string.go
@@ -0,0 +1,183 @@
+// Copyright 2017 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Package cryptobyte contains types that help with parsing and constructing
+// length-prefixed, binary messages, including ASN.1 DER. (The asn1 subpackage
+// contains useful ASN.1 constants.)
+//
+// The String type is for parsing. It wraps a []byte slice and provides helper
+// functions for consuming structures, value by value.
+//
+// The Builder type is for constructing messages. It providers helper functions
+// for appending values and also for appending length-prefixed submessages –
+// without having to worry about calculating the length prefix ahead of time.
+//
+// See the documentation and examples for the Builder and String types to get
+// started.
+package cryptobyte
+
+// String represents a string of bytes. It provides methods for parsing
+// fixed-length and length-prefixed values from it.
+type String []byte
+
+// read advances a String by n bytes and returns them. If less than n bytes
+// remain, it returns nil.
+func (s *String) read(n int) []byte {
+ if len(*s) < n || n < 0 {
+ return nil
+ }
+ v := (*s)[:n]
+ *s = (*s)[n:]
+ return v
+}
+
+// Skip advances the String by n byte and reports whether it was successful.
+func (s *String) Skip(n int) bool {
+ return s.read(n) != nil
+}
+
+// ReadUint8 decodes an 8-bit value into out and advances over it.
+// It reports whether the read was successful.
+func (s *String) ReadUint8(out *uint8) bool {
+ v := s.read(1)
+ if v == nil {
+ return false
+ }
+ *out = uint8(v[0])
+ return true
+}
+
+// ReadUint16 decodes a big-endian, 16-bit value into out and advances over it.
+// It reports whether the read was successful.
+func (s *String) ReadUint16(out *uint16) bool {
+ v := s.read(2)
+ if v == nil {
+ return false
+ }
+ *out = uint16(v[0])<<8 | uint16(v[1])
+ return true
+}
+
+// ReadUint24 decodes a big-endian, 24-bit value into out and advances over it.
+// It reports whether the read was successful.
+func (s *String) ReadUint24(out *uint32) bool {
+ v := s.read(3)
+ if v == nil {
+ return false
+ }
+ *out = uint32(v[0])<<16 | uint32(v[1])<<8 | uint32(v[2])
+ return true
+}
+
+// ReadUint32 decodes a big-endian, 32-bit value into out and advances over it.
+// It reports whether the read was successful.
+func (s *String) ReadUint32(out *uint32) bool {
+ v := s.read(4)
+ if v == nil {
+ return false
+ }
+ *out = uint32(v[0])<<24 | uint32(v[1])<<16 | uint32(v[2])<<8 | uint32(v[3])
+ return true
+}
+
+// ReadUint48 decodes a big-endian, 48-bit value into out and advances over it.
+// It reports whether the read was successful.
+func (s *String) ReadUint48(out *uint64) bool {
+ v := s.read(6)
+ if v == nil {
+ return false
+ }
+ *out = uint64(v[0])<<40 | uint64(v[1])<<32 | uint64(v[2])<<24 | uint64(v[3])<<16 | uint64(v[4])<<8 | uint64(v[5])
+ return true
+}
+
+// ReadUint64 decodes a big-endian, 64-bit value into out and advances over it.
+// It reports whether the read was successful.
+func (s *String) ReadUint64(out *uint64) bool {
+ v := s.read(8)
+ if v == nil {
+ return false
+ }
+ *out = uint64(v[0])<<56 | uint64(v[1])<<48 | uint64(v[2])<<40 | uint64(v[3])<<32 | uint64(v[4])<<24 | uint64(v[5])<<16 | uint64(v[6])<<8 | uint64(v[7])
+ return true
+}
+
+func (s *String) readUnsigned(out *uint32, length int) bool {
+ v := s.read(length)
+ if v == nil {
+ return false
+ }
+ var result uint32
+ for i := 0; i < length; i++ {
+ result <<= 8
+ result |= uint32(v[i])
+ }
+ *out = result
+ return true
+}
+
+func (s *String) readLengthPrefixed(lenLen int, outChild *String) bool {
+ lenBytes := s.read(lenLen)
+ if lenBytes == nil {
+ return false
+ }
+ var length uint32
+ for _, b := range lenBytes {
+ length = length << 8
+ length = length | uint32(b)
+ }
+ v := s.read(int(length))
+ if v == nil {
+ return false
+ }
+ *outChild = v
+ return true
+}
+
+// ReadUint8LengthPrefixed reads the content of an 8-bit length-prefixed value
+// into out and advances over it. It reports whether the read was successful.
+func (s *String) ReadUint8LengthPrefixed(out *String) bool {
+ return s.readLengthPrefixed(1, out)
+}
+
+// ReadUint16LengthPrefixed reads the content of a big-endian, 16-bit
+// length-prefixed value into out and advances over it. It reports whether the
+// read was successful.
+func (s *String) ReadUint16LengthPrefixed(out *String) bool {
+ return s.readLengthPrefixed(2, out)
+}
+
+// ReadUint24LengthPrefixed reads the content of a big-endian, 24-bit
+// length-prefixed value into out and advances over it. It reports whether
+// the read was successful.
+func (s *String) ReadUint24LengthPrefixed(out *String) bool {
+ return s.readLengthPrefixed(3, out)
+}
+
+// ReadBytes reads n bytes into out and advances over them. It reports
+// whether the read was successful.
+func (s *String) ReadBytes(out *[]byte, n int) bool {
+ v := s.read(n)
+ if v == nil {
+ return false
+ }
+ *out = v
+ return true
+}
+
+// CopyBytes copies len(out) bytes into out and advances over them. It reports
+// whether the copy operation was successful
+func (s *String) CopyBytes(out []byte) bool {
+ n := len(out)
+ v := s.read(n)
+ if v == nil {
+ return false
+ }
+ return copy(out, v) == n
+}
+
+// Empty reports whether the string does not contain any bytes.
+func (s String) Empty() bool {
+ return len(s) == 0
+}
diff --git a/vendor/golang.org/x/crypto/sha3/doc.go b/vendor/golang.org/x/crypto/sha3/doc.go
deleted file mode 100644
index bbf391fe6e..0000000000
--- a/vendor/golang.org/x/crypto/sha3/doc.go
+++ /dev/null
@@ -1,66 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Package sha3 implements the SHA-3 fixed-output-length hash functions and
-// the SHAKE variable-output-length hash functions defined by FIPS-202.
-//
-// All types in this package also implement [encoding.BinaryMarshaler],
-// [encoding.BinaryAppender] and [encoding.BinaryUnmarshaler] to marshal and
-// unmarshal the internal state of the hash.
-//
-// Both types of hash function use the "sponge" construction and the Keccak
-// permutation. For a detailed specification see http://keccak.noekeon.org/
-//
-// # Guidance
-//
-// If you aren't sure what function you need, use SHAKE256 with at least 64
-// bytes of output. The SHAKE instances are faster than the SHA3 instances;
-// the latter have to allocate memory to conform to the hash.Hash interface.
-//
-// If you need a secret-key MAC (message authentication code), prepend the
-// secret key to the input, hash with SHAKE256 and read at least 32 bytes of
-// output.
-//
-// # Security strengths
-//
-// The SHA3-x (x equals 224, 256, 384, or 512) functions have a security
-// strength against preimage attacks of x bits. Since they only produce "x"
-// bits of output, their collision-resistance is only "x/2" bits.
-//
-// The SHAKE-256 and -128 functions have a generic security strength of 256 and
-// 128 bits against all attacks, provided that at least 2x bits of their output
-// is used. Requesting more than 64 or 32 bytes of output, respectively, does
-// not increase the collision-resistance of the SHAKE functions.
-//
-// # The sponge construction
-//
-// A sponge builds a pseudo-random function from a public pseudo-random
-// permutation, by applying the permutation to a state of "rate + capacity"
-// bytes, but hiding "capacity" of the bytes.
-//
-// A sponge starts out with a zero state. To hash an input using a sponge, up
-// to "rate" bytes of the input are XORed into the sponge's state. The sponge
-// is then "full" and the permutation is applied to "empty" it. This process is
-// repeated until all the input has been "absorbed". The input is then padded.
-// The digest is "squeezed" from the sponge in the same way, except that output
-// is copied out instead of input being XORed in.
-//
-// A sponge is parameterized by its generic security strength, which is equal
-// to half its capacity; capacity + rate is equal to the permutation's width.
-// Since the KeccakF-1600 permutation is 1600 bits (200 bytes) wide, this means
-// that the security strength of a sponge instance is equal to (1600 - bitrate) / 2.
-//
-// # Recommendations
-//
-// The SHAKE functions are recommended for most new uses. They can produce
-// output of arbitrary length. SHAKE256, with an output length of at least
-// 64 bytes, provides 256-bit security against all attacks. The Keccak team
-// recommends it for most applications upgrading from SHA2-512. (NIST chose a
-// much stronger, but much slower, sponge instance for SHA3-512.)
-//
-// The SHA-3 functions are "drop-in" replacements for the SHA-2 functions.
-// They produce output of the same length, with the same security strengths
-// against all attacks. This means, in particular, that SHA3-256 only has
-// 128-bit collision resistance, because its output length is 32 bytes.
-package sha3
diff --git a/vendor/golang.org/x/crypto/sha3/hashes.go b/vendor/golang.org/x/crypto/sha3/hashes.go
index 31fffbe044..a51269d91a 100644
--- a/vendor/golang.org/x/crypto/sha3/hashes.go
+++ b/vendor/golang.org/x/crypto/sha3/hashes.go
@@ -2,127 +2,94 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Package sha3 implements the SHA-3 hash algorithms and the SHAKE extendable
+// output functions defined in FIPS 202.
+//
+// Most of this package is a wrapper around the crypto/sha3 package in the
+// standard library. The only exception is the legacy Keccak hash functions.
package sha3
-// This file provides functions for creating instances of the SHA-3
-// and SHAKE hash functions, as well as utility functions for hashing
-// bytes.
-
import (
- "crypto"
+ "crypto/sha3"
"hash"
)
// New224 creates a new SHA3-224 hash.
// Its generic security strength is 224 bits against preimage attacks,
// and 112 bits against collision attacks.
+//
+// It is a wrapper for the [sha3.New224] function in the standard library.
+//
+//go:fix inline
func New224() hash.Hash {
- return new224()
+ return sha3.New224()
}
// New256 creates a new SHA3-256 hash.
// Its generic security strength is 256 bits against preimage attacks,
// and 128 bits against collision attacks.
+//
+// It is a wrapper for the [sha3.New256] function in the standard library.
+//
+//go:fix inline
func New256() hash.Hash {
- return new256()
+ return sha3.New256()
}
// New384 creates a new SHA3-384 hash.
// Its generic security strength is 384 bits against preimage attacks,
// and 192 bits against collision attacks.
+//
+// It is a wrapper for the [sha3.New384] function in the standard library.
+//
+//go:fix inline
func New384() hash.Hash {
- return new384()
+ return sha3.New384()
}
// New512 creates a new SHA3-512 hash.
// Its generic security strength is 512 bits against preimage attacks,
// and 256 bits against collision attacks.
-func New512() hash.Hash {
- return new512()
-}
-
-func init() {
- crypto.RegisterHash(crypto.SHA3_224, New224)
- crypto.RegisterHash(crypto.SHA3_256, New256)
- crypto.RegisterHash(crypto.SHA3_384, New384)
- crypto.RegisterHash(crypto.SHA3_512, New512)
-}
-
-const (
- dsbyteSHA3 = 0b00000110
- dsbyteKeccak = 0b00000001
- dsbyteShake = 0b00011111
- dsbyteCShake = 0b00000100
-
- // rateK[c] is the rate in bytes for Keccak[c] where c is the capacity in
- // bits. Given the sponge size is 1600 bits, the rate is 1600 - c bits.
- rateK256 = (1600 - 256) / 8
- rateK448 = (1600 - 448) / 8
- rateK512 = (1600 - 512) / 8
- rateK768 = (1600 - 768) / 8
- rateK1024 = (1600 - 1024) / 8
-)
-
-func new224Generic() *state {
- return &state{rate: rateK448, outputLen: 28, dsbyte: dsbyteSHA3}
-}
-
-func new256Generic() *state {
- return &state{rate: rateK512, outputLen: 32, dsbyte: dsbyteSHA3}
-}
-
-func new384Generic() *state {
- return &state{rate: rateK768, outputLen: 48, dsbyte: dsbyteSHA3}
-}
-
-func new512Generic() *state {
- return &state{rate: rateK1024, outputLen: 64, dsbyte: dsbyteSHA3}
-}
-
-// NewLegacyKeccak256 creates a new Keccak-256 hash.
//
-// Only use this function if you require compatibility with an existing cryptosystem
-// that uses non-standard padding. All other users should use New256 instead.
-func NewLegacyKeccak256() hash.Hash {
- return &state{rate: rateK512, outputLen: 32, dsbyte: dsbyteKeccak}
-}
-
-// NewLegacyKeccak512 creates a new Keccak-512 hash.
+// It is a wrapper for the [sha3.New512] function in the standard library.
//
-// Only use this function if you require compatibility with an existing cryptosystem
-// that uses non-standard padding. All other users should use New512 instead.
-func NewLegacyKeccak512() hash.Hash {
- return &state{rate: rateK1024, outputLen: 64, dsbyte: dsbyteKeccak}
+//go:fix inline
+func New512() hash.Hash {
+ return sha3.New512()
}
// Sum224 returns the SHA3-224 digest of the data.
-func Sum224(data []byte) (digest [28]byte) {
- h := New224()
- h.Write(data)
- h.Sum(digest[:0])
- return
+//
+// It is a wrapper for the [sha3.Sum224] function in the standard library.
+//
+//go:fix inline
+func Sum224(data []byte) [28]byte {
+ return sha3.Sum224(data)
}
// Sum256 returns the SHA3-256 digest of the data.
-func Sum256(data []byte) (digest [32]byte) {
- h := New256()
- h.Write(data)
- h.Sum(digest[:0])
- return
+//
+// It is a wrapper for the [sha3.Sum256] function in the standard library.
+//
+//go:fix inline
+func Sum256(data []byte) [32]byte {
+ return sha3.Sum256(data)
}
// Sum384 returns the SHA3-384 digest of the data.
-func Sum384(data []byte) (digest [48]byte) {
- h := New384()
- h.Write(data)
- h.Sum(digest[:0])
- return
+//
+// It is a wrapper for the [sha3.Sum384] function in the standard library.
+//
+//go:fix inline
+func Sum384(data []byte) [48]byte {
+ return sha3.Sum384(data)
}
// Sum512 returns the SHA3-512 digest of the data.
-func Sum512(data []byte) (digest [64]byte) {
- h := New512()
- h.Write(data)
- h.Sum(digest[:0])
- return
+//
+// It is a wrapper for the [sha3.Sum512] function in the standard library.
+//
+//go:fix inline
+func Sum512(data []byte) [64]byte {
+ return sha3.Sum512(data)
}
diff --git a/vendor/golang.org/x/crypto/sha3/hashes_noasm.go b/vendor/golang.org/x/crypto/sha3/hashes_noasm.go
deleted file mode 100644
index 9d85fb6214..0000000000
--- a/vendor/golang.org/x/crypto/sha3/hashes_noasm.go
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright 2023 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-//go:build !gc || purego || !s390x
-
-package sha3
-
-func new224() *state {
- return new224Generic()
-}
-
-func new256() *state {
- return new256Generic()
-}
-
-func new384() *state {
- return new384Generic()
-}
-
-func new512() *state {
- return new512Generic()
-}
diff --git a/vendor/golang.org/x/crypto/sha3/keccakf_amd64.go b/vendor/golang.org/x/crypto/sha3/keccakf_amd64.go
deleted file mode 100644
index b908696be5..0000000000
--- a/vendor/golang.org/x/crypto/sha3/keccakf_amd64.go
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-//go:build amd64 && !purego && gc
-
-package sha3
-
-// This function is implemented in keccakf_amd64.s.
-
-//go:noescape
-
-func keccakF1600(a *[25]uint64)
diff --git a/vendor/golang.org/x/crypto/sha3/keccakf_amd64.s b/vendor/golang.org/x/crypto/sha3/keccakf_amd64.s
deleted file mode 100644
index 99e2f16e97..0000000000
--- a/vendor/golang.org/x/crypto/sha3/keccakf_amd64.s
+++ /dev/null
@@ -1,5419 +0,0 @@
-// Code generated by command: go run keccakf_amd64_asm.go -out ../keccakf_amd64.s -pkg sha3. DO NOT EDIT.
-
-//go:build amd64 && !purego && gc
-
-// func keccakF1600(a *[25]uint64)
-TEXT ·keccakF1600(SB), $200-8
- MOVQ a+0(FP), DI
-
- // Convert the user state into an internal state
- NOTQ 8(DI)
- NOTQ 16(DI)
- NOTQ 64(DI)
- NOTQ 96(DI)
- NOTQ 136(DI)
- NOTQ 160(DI)
-
- // Execute the KeccakF permutation
- MOVQ (DI), SI
- MOVQ 8(DI), BP
- MOVQ 32(DI), R15
- XORQ 40(DI), SI
- XORQ 48(DI), BP
- XORQ 72(DI), R15
- XORQ 80(DI), SI
- XORQ 88(DI), BP
- XORQ 112(DI), R15
- XORQ 120(DI), SI
- XORQ 128(DI), BP
- XORQ 152(DI), R15
- XORQ 160(DI), SI
- XORQ 168(DI), BP
- MOVQ 176(DI), DX
- MOVQ 184(DI), R8
- XORQ 192(DI), R15
-
- // Prepare round
- MOVQ BP, BX
- ROLQ $0x01, BX
- MOVQ 16(DI), R12
- XORQ 56(DI), DX
- XORQ R15, BX
- XORQ 96(DI), R12
- XORQ 136(DI), DX
- XORQ DX, R12
- MOVQ R12, CX
- ROLQ $0x01, CX
- MOVQ 24(DI), R13
- XORQ 64(DI), R8
- XORQ SI, CX
- XORQ 104(DI), R13
- XORQ 144(DI), R8
- XORQ R8, R13
- MOVQ R13, DX
- ROLQ $0x01, DX
- MOVQ R15, R8
- XORQ BP, DX
- ROLQ $0x01, R8
- MOVQ SI, R9
- XORQ R12, R8
- ROLQ $0x01, R9
-
- // Result b
- MOVQ (DI), R10
- MOVQ 48(DI), R11
- XORQ R13, R9
- MOVQ 96(DI), R12
- MOVQ 144(DI), R13
- MOVQ 192(DI), R14
- XORQ CX, R11
- ROLQ $0x2c, R11
- XORQ DX, R12
- XORQ BX, R10
- ROLQ $0x2b, R12
- MOVQ R11, SI
- MOVQ $0x0000000000000001, AX
- ORQ R12, SI
- XORQ R10, AX
- XORQ AX, SI
- MOVQ SI, (SP)
- XORQ R9, R14
- ROLQ $0x0e, R14
- MOVQ R10, R15
- ANDQ R11, R15
- XORQ R14, R15
- MOVQ R15, 32(SP)
- XORQ R8, R13
- ROLQ $0x15, R13
- MOVQ R13, AX
- ANDQ R14, AX
- XORQ R12, AX
- MOVQ AX, 16(SP)
- NOTQ R12
- ORQ R10, R14
- ORQ R13, R12
- XORQ R13, R14
- XORQ R11, R12
- MOVQ R14, 24(SP)
- MOVQ R12, 8(SP)
- MOVQ R12, BP
-
- // Result g
- MOVQ 72(DI), R11
- XORQ R9, R11
- MOVQ 80(DI), R12
- ROLQ $0x14, R11
- XORQ BX, R12
- ROLQ $0x03, R12
- MOVQ 24(DI), R10
- MOVQ R11, AX
- ORQ R12, AX
- XORQ R8, R10
- MOVQ 128(DI), R13
- MOVQ 176(DI), R14
- ROLQ $0x1c, R10
- XORQ R10, AX
- MOVQ AX, 40(SP)
- XORQ AX, SI
- XORQ CX, R13
- ROLQ $0x2d, R13
- MOVQ R12, AX
- ANDQ R13, AX
- XORQ R11, AX
- MOVQ AX, 48(SP)
- XORQ AX, BP
- XORQ DX, R14
- ROLQ $0x3d, R14
- MOVQ R14, AX
- ORQ R10, AX
- XORQ R13, AX
- MOVQ AX, 64(SP)
- ANDQ R11, R10
- XORQ R14, R10
- MOVQ R10, 72(SP)
- NOTQ R14
- XORQ R10, R15
- ORQ R14, R13
- XORQ R12, R13
- MOVQ R13, 56(SP)
-
- // Result k
- MOVQ 8(DI), R10
- MOVQ 56(DI), R11
- MOVQ 104(DI), R12
- MOVQ 152(DI), R13
- MOVQ 160(DI), R14
- XORQ DX, R11
- ROLQ $0x06, R11
- XORQ R8, R12
- ROLQ $0x19, R12
- MOVQ R11, AX
- ORQ R12, AX
- XORQ CX, R10
- ROLQ $0x01, R10
- XORQ R10, AX
- MOVQ AX, 80(SP)
- XORQ AX, SI
- XORQ R9, R13
- ROLQ $0x08, R13
- MOVQ R12, AX
- ANDQ R13, AX
- XORQ R11, AX
- MOVQ AX, 88(SP)
- XORQ AX, BP
- XORQ BX, R14
- ROLQ $0x12, R14
- NOTQ R13
- MOVQ R13, AX
- ANDQ R14, AX
- XORQ R12, AX
- MOVQ AX, 96(SP)
- MOVQ R14, AX
- ORQ R10, AX
- XORQ R13, AX
- MOVQ AX, 104(SP)
- ANDQ R11, R10
- XORQ R14, R10
- MOVQ R10, 112(SP)
- XORQ R10, R15
-
- // Result m
- MOVQ 40(DI), R11
- XORQ BX, R11
- MOVQ 88(DI), R12
- ROLQ $0x24, R11
- XORQ CX, R12
- MOVQ 32(DI), R10
- ROLQ $0x0a, R12
- MOVQ R11, AX
- MOVQ 136(DI), R13
- ANDQ R12, AX
- XORQ R9, R10
- MOVQ 184(DI), R14
- ROLQ $0x1b, R10
- XORQ R10, AX
- MOVQ AX, 120(SP)
- XORQ AX, SI
- XORQ DX, R13
- ROLQ $0x0f, R13
- MOVQ R12, AX
- ORQ R13, AX
- XORQ R11, AX
- MOVQ AX, 128(SP)
- XORQ AX, BP
- XORQ R8, R14
- ROLQ $0x38, R14
- NOTQ R13
- MOVQ R13, AX
- ORQ R14, AX
- XORQ R12, AX
- MOVQ AX, 136(SP)
- ORQ R10, R11
- XORQ R14, R11
- MOVQ R11, 152(SP)
- ANDQ R10, R14
- XORQ R13, R14
- MOVQ R14, 144(SP)
- XORQ R11, R15
-
- // Result s
- MOVQ 16(DI), R10
- MOVQ 64(DI), R11
- MOVQ 112(DI), R12
- XORQ DX, R10
- MOVQ 120(DI), R13
- ROLQ $0x3e, R10
- XORQ R8, R11
- MOVQ 168(DI), R14
- ROLQ $0x37, R11
- XORQ R9, R12
- MOVQ R10, R9
- XORQ CX, R14
- ROLQ $0x02, R14
- ANDQ R11, R9
- XORQ R14, R9
- MOVQ R9, 192(SP)
- ROLQ $0x27, R12
- XORQ R9, R15
- NOTQ R11
- XORQ BX, R13
- MOVQ R11, BX
- ANDQ R12, BX
- XORQ R10, BX
- MOVQ BX, 160(SP)
- XORQ BX, SI
- ROLQ $0x29, R13
- MOVQ R12, CX
- ORQ R13, CX
- XORQ R11, CX
- MOVQ CX, 168(SP)
- XORQ CX, BP
- MOVQ R13, DX
- MOVQ R14, R8
- ANDQ R14, DX
- ORQ R10, R8
- XORQ R12, DX
- XORQ R13, R8
- MOVQ DX, 176(SP)
- MOVQ R8, 184(SP)
-
- // Prepare round
- MOVQ BP, BX
- ROLQ $0x01, BX
- MOVQ 16(SP), R12
- XORQ 56(SP), DX
- XORQ R15, BX
- XORQ 96(SP), R12
- XORQ 136(SP), DX
- XORQ DX, R12
- MOVQ R12, CX
- ROLQ $0x01, CX
- MOVQ 24(SP), R13
- XORQ 64(SP), R8
- XORQ SI, CX
- XORQ 104(SP), R13
- XORQ 144(SP), R8
- XORQ R8, R13
- MOVQ R13, DX
- ROLQ $0x01, DX
- MOVQ R15, R8
- XORQ BP, DX
- ROLQ $0x01, R8
- MOVQ SI, R9
- XORQ R12, R8
- ROLQ $0x01, R9
-
- // Result b
- MOVQ (SP), R10
- MOVQ 48(SP), R11
- XORQ R13, R9
- MOVQ 96(SP), R12
- MOVQ 144(SP), R13
- MOVQ 192(SP), R14
- XORQ CX, R11
- ROLQ $0x2c, R11
- XORQ DX, R12
- XORQ BX, R10
- ROLQ $0x2b, R12
- MOVQ R11, SI
- MOVQ $0x0000000000008082, AX
- ORQ R12, SI
- XORQ R10, AX
- XORQ AX, SI
- MOVQ SI, (DI)
- XORQ R9, R14
- ROLQ $0x0e, R14
- MOVQ R10, R15
- ANDQ R11, R15
- XORQ R14, R15
- MOVQ R15, 32(DI)
- XORQ R8, R13
- ROLQ $0x15, R13
- MOVQ R13, AX
- ANDQ R14, AX
- XORQ R12, AX
- MOVQ AX, 16(DI)
- NOTQ R12
- ORQ R10, R14
- ORQ R13, R12
- XORQ R13, R14
- XORQ R11, R12
- MOVQ R14, 24(DI)
- MOVQ R12, 8(DI)
- MOVQ R12, BP
-
- // Result g
- MOVQ 72(SP), R11
- XORQ R9, R11
- MOVQ 80(SP), R12
- ROLQ $0x14, R11
- XORQ BX, R12
- ROLQ $0x03, R12
- MOVQ 24(SP), R10
- MOVQ R11, AX
- ORQ R12, AX
- XORQ R8, R10
- MOVQ 128(SP), R13
- MOVQ 176(SP), R14
- ROLQ $0x1c, R10
- XORQ R10, AX
- MOVQ AX, 40(DI)
- XORQ AX, SI
- XORQ CX, R13
- ROLQ $0x2d, R13
- MOVQ R12, AX
- ANDQ R13, AX
- XORQ R11, AX
- MOVQ AX, 48(DI)
- XORQ AX, BP
- XORQ DX, R14
- ROLQ $0x3d, R14
- MOVQ R14, AX
- ORQ R10, AX
- XORQ R13, AX
- MOVQ AX, 64(DI)
- ANDQ R11, R10
- XORQ R14, R10
- MOVQ R10, 72(DI)
- NOTQ R14
- XORQ R10, R15
- ORQ R14, R13
- XORQ R12, R13
- MOVQ R13, 56(DI)
-
- // Result k
- MOVQ 8(SP), R10
- MOVQ 56(SP), R11
- MOVQ 104(SP), R12
- MOVQ 152(SP), R13
- MOVQ 160(SP), R14
- XORQ DX, R11
- ROLQ $0x06, R11
- XORQ R8, R12
- ROLQ $0x19, R12
- MOVQ R11, AX
- ORQ R12, AX
- XORQ CX, R10
- ROLQ $0x01, R10
- XORQ R10, AX
- MOVQ AX, 80(DI)
- XORQ AX, SI
- XORQ R9, R13
- ROLQ $0x08, R13
- MOVQ R12, AX
- ANDQ R13, AX
- XORQ R11, AX
- MOVQ AX, 88(DI)
- XORQ AX, BP
- XORQ BX, R14
- ROLQ $0x12, R14
- NOTQ R13
- MOVQ R13, AX
- ANDQ R14, AX
- XORQ R12, AX
- MOVQ AX, 96(DI)
- MOVQ R14, AX
- ORQ R10, AX
- XORQ R13, AX
- MOVQ AX, 104(DI)
- ANDQ R11, R10
- XORQ R14, R10
- MOVQ R10, 112(DI)
- XORQ R10, R15
-
- // Result m
- MOVQ 40(SP), R11
- XORQ BX, R11
- MOVQ 88(SP), R12
- ROLQ $0x24, R11
- XORQ CX, R12
- MOVQ 32(SP), R10
- ROLQ $0x0a, R12
- MOVQ R11, AX
- MOVQ 136(SP), R13
- ANDQ R12, AX
- XORQ R9, R10
- MOVQ 184(SP), R14
- ROLQ $0x1b, R10
- XORQ R10, AX
- MOVQ AX, 120(DI)
- XORQ AX, SI
- XORQ DX, R13
- ROLQ $0x0f, R13
- MOVQ R12, AX
- ORQ R13, AX
- XORQ R11, AX
- MOVQ AX, 128(DI)
- XORQ AX, BP
- XORQ R8, R14
- ROLQ $0x38, R14
- NOTQ R13
- MOVQ R13, AX
- ORQ R14, AX
- XORQ R12, AX
- MOVQ AX, 136(DI)
- ORQ R10, R11
- XORQ R14, R11
- MOVQ R11, 152(DI)
- ANDQ R10, R14
- XORQ R13, R14
- MOVQ R14, 144(DI)
- XORQ R11, R15
-
- // Result s
- MOVQ 16(SP), R10
- MOVQ 64(SP), R11
- MOVQ 112(SP), R12
- XORQ DX, R10
- MOVQ 120(SP), R13
- ROLQ $0x3e, R10
- XORQ R8, R11
- MOVQ 168(SP), R14
- ROLQ $0x37, R11
- XORQ R9, R12
- MOVQ R10, R9
- XORQ CX, R14
- ROLQ $0x02, R14
- ANDQ R11, R9
- XORQ R14, R9
- MOVQ R9, 192(DI)
- ROLQ $0x27, R12
- XORQ R9, R15
- NOTQ R11
- XORQ BX, R13
- MOVQ R11, BX
- ANDQ R12, BX
- XORQ R10, BX
- MOVQ BX, 160(DI)
- XORQ BX, SI
- ROLQ $0x29, R13
- MOVQ R12, CX
- ORQ R13, CX
- XORQ R11, CX
- MOVQ CX, 168(DI)
- XORQ CX, BP
- MOVQ R13, DX
- MOVQ R14, R8
- ANDQ R14, DX
- ORQ R10, R8
- XORQ R12, DX
- XORQ R13, R8
- MOVQ DX, 176(DI)
- MOVQ R8, 184(DI)
-
- // Prepare round
- MOVQ BP, BX
- ROLQ $0x01, BX
- MOVQ 16(DI), R12
- XORQ 56(DI), DX
- XORQ R15, BX
- XORQ 96(DI), R12
- XORQ 136(DI), DX
- XORQ DX, R12
- MOVQ R12, CX
- ROLQ $0x01, CX
- MOVQ 24(DI), R13
- XORQ 64(DI), R8
- XORQ SI, CX
- XORQ 104(DI), R13
- XORQ 144(DI), R8
- XORQ R8, R13
- MOVQ R13, DX
- ROLQ $0x01, DX
- MOVQ R15, R8
- XORQ BP, DX
- ROLQ $0x01, R8
- MOVQ SI, R9
- XORQ R12, R8
- ROLQ $0x01, R9
-
- // Result b
- MOVQ (DI), R10
- MOVQ 48(DI), R11
- XORQ R13, R9
- MOVQ 96(DI), R12
- MOVQ 144(DI), R13
- MOVQ 192(DI), R14
- XORQ CX, R11
- ROLQ $0x2c, R11
- XORQ DX, R12
- XORQ BX, R10
- ROLQ $0x2b, R12
- MOVQ R11, SI
- MOVQ $0x800000000000808a, AX
- ORQ R12, SI
- XORQ R10, AX
- XORQ AX, SI
- MOVQ SI, (SP)
- XORQ R9, R14
- ROLQ $0x0e, R14
- MOVQ R10, R15
- ANDQ R11, R15
- XORQ R14, R15
- MOVQ R15, 32(SP)
- XORQ R8, R13
- ROLQ $0x15, R13
- MOVQ R13, AX
- ANDQ R14, AX
- XORQ R12, AX
- MOVQ AX, 16(SP)
- NOTQ R12
- ORQ R10, R14
- ORQ R13, R12
- XORQ R13, R14
- XORQ R11, R12
- MOVQ R14, 24(SP)
- MOVQ R12, 8(SP)
- MOVQ R12, BP
-
- // Result g
- MOVQ 72(DI), R11
- XORQ R9, R11
- MOVQ 80(DI), R12
- ROLQ $0x14, R11
- XORQ BX, R12
- ROLQ $0x03, R12
- MOVQ 24(DI), R10
- MOVQ R11, AX
- ORQ R12, AX
- XORQ R8, R10
- MOVQ 128(DI), R13
- MOVQ 176(DI), R14
- ROLQ $0x1c, R10
- XORQ R10, AX
- MOVQ AX, 40(SP)
- XORQ AX, SI
- XORQ CX, R13
- ROLQ $0x2d, R13
- MOVQ R12, AX
- ANDQ R13, AX
- XORQ R11, AX
- MOVQ AX, 48(SP)
- XORQ AX, BP
- XORQ DX, R14
- ROLQ $0x3d, R14
- MOVQ R14, AX
- ORQ R10, AX
- XORQ R13, AX
- MOVQ AX, 64(SP)
- ANDQ R11, R10
- XORQ R14, R10
- MOVQ R10, 72(SP)
- NOTQ R14
- XORQ R10, R15
- ORQ R14, R13
- XORQ R12, R13
- MOVQ R13, 56(SP)
-
- // Result k
- MOVQ 8(DI), R10
- MOVQ 56(DI), R11
- MOVQ 104(DI), R12
- MOVQ 152(DI), R13
- MOVQ 160(DI), R14
- XORQ DX, R11
- ROLQ $0x06, R11
- XORQ R8, R12
- ROLQ $0x19, R12
- MOVQ R11, AX
- ORQ R12, AX
- XORQ CX, R10
- ROLQ $0x01, R10
- XORQ R10, AX
- MOVQ AX, 80(SP)
- XORQ AX, SI
- XORQ R9, R13
- ROLQ $0x08, R13
- MOVQ R12, AX
- ANDQ R13, AX
- XORQ R11, AX
- MOVQ AX, 88(SP)
- XORQ AX, BP
- XORQ BX, R14
- ROLQ $0x12, R14
- NOTQ R13
- MOVQ R13, AX
- ANDQ R14, AX
- XORQ R12, AX
- MOVQ AX, 96(SP)
- MOVQ R14, AX
- ORQ R10, AX
- XORQ R13, AX
- MOVQ AX, 104(SP)
- ANDQ R11, R10
- XORQ R14, R10
- MOVQ R10, 112(SP)
- XORQ R10, R15
-
- // Result m
- MOVQ 40(DI), R11
- XORQ BX, R11
- MOVQ 88(DI), R12
- ROLQ $0x24, R11
- XORQ CX, R12
- MOVQ 32(DI), R10
- ROLQ $0x0a, R12
- MOVQ R11, AX
- MOVQ 136(DI), R13
- ANDQ R12, AX
- XORQ R9, R10
- MOVQ 184(DI), R14
- ROLQ $0x1b, R10
- XORQ R10, AX
- MOVQ AX, 120(SP)
- XORQ AX, SI
- XORQ DX, R13
- ROLQ $0x0f, R13
- MOVQ R12, AX
- ORQ R13, AX
- XORQ R11, AX
- MOVQ AX, 128(SP)
- XORQ AX, BP
- XORQ R8, R14
- ROLQ $0x38, R14
- NOTQ R13
- MOVQ R13, AX
- ORQ R14, AX
- XORQ R12, AX
- MOVQ AX, 136(SP)
- ORQ R10, R11
- XORQ R14, R11
- MOVQ R11, 152(SP)
- ANDQ R10, R14
- XORQ R13, R14
- MOVQ R14, 144(SP)
- XORQ R11, R15
-
- // Result s
- MOVQ 16(DI), R10
- MOVQ 64(DI), R11
- MOVQ 112(DI), R12
- XORQ DX, R10
- MOVQ 120(DI), R13
- ROLQ $0x3e, R10
- XORQ R8, R11
- MOVQ 168(DI), R14
- ROLQ $0x37, R11
- XORQ R9, R12
- MOVQ R10, R9
- XORQ CX, R14
- ROLQ $0x02, R14
- ANDQ R11, R9
- XORQ R14, R9
- MOVQ R9, 192(SP)
- ROLQ $0x27, R12
- XORQ R9, R15
- NOTQ R11
- XORQ BX, R13
- MOVQ R11, BX
- ANDQ R12, BX
- XORQ R10, BX
- MOVQ BX, 160(SP)
- XORQ BX, SI
- ROLQ $0x29, R13
- MOVQ R12, CX
- ORQ R13, CX
- XORQ R11, CX
- MOVQ CX, 168(SP)
- XORQ CX, BP
- MOVQ R13, DX
- MOVQ R14, R8
- ANDQ R14, DX
- ORQ R10, R8
- XORQ R12, DX
- XORQ R13, R8
- MOVQ DX, 176(SP)
- MOVQ R8, 184(SP)
-
- // Prepare round
- MOVQ BP, BX
- ROLQ $0x01, BX
- MOVQ 16(SP), R12
- XORQ 56(SP), DX
- XORQ R15, BX
- XORQ 96(SP), R12
- XORQ 136(SP), DX
- XORQ DX, R12
- MOVQ R12, CX
- ROLQ $0x01, CX
- MOVQ 24(SP), R13
- XORQ 64(SP), R8
- XORQ SI, CX
- XORQ 104(SP), R13
- XORQ 144(SP), R8
- XORQ R8, R13
- MOVQ R13, DX
- ROLQ $0x01, DX
- MOVQ R15, R8
- XORQ BP, DX
- ROLQ $0x01, R8
- MOVQ SI, R9
- XORQ R12, R8
- ROLQ $0x01, R9
-
- // Result b
- MOVQ (SP), R10
- MOVQ 48(SP), R11
- XORQ R13, R9
- MOVQ 96(SP), R12
- MOVQ 144(SP), R13
- MOVQ 192(SP), R14
- XORQ CX, R11
- ROLQ $0x2c, R11
- XORQ DX, R12
- XORQ BX, R10
- ROLQ $0x2b, R12
- MOVQ R11, SI
- MOVQ $0x8000000080008000, AX
- ORQ R12, SI
- XORQ R10, AX
- XORQ AX, SI
- MOVQ SI, (DI)
- XORQ R9, R14
- ROLQ $0x0e, R14
- MOVQ R10, R15
- ANDQ R11, R15
- XORQ R14, R15
- MOVQ R15, 32(DI)
- XORQ R8, R13
- ROLQ $0x15, R13
- MOVQ R13, AX
- ANDQ R14, AX
- XORQ R12, AX
- MOVQ AX, 16(DI)
- NOTQ R12
- ORQ R10, R14
- ORQ R13, R12
- XORQ R13, R14
- XORQ R11, R12
- MOVQ R14, 24(DI)
- MOVQ R12, 8(DI)
- MOVQ R12, BP
-
- // Result g
- MOVQ 72(SP), R11
- XORQ R9, R11
- MOVQ 80(SP), R12
- ROLQ $0x14, R11
- XORQ BX, R12
- ROLQ $0x03, R12
- MOVQ 24(SP), R10
- MOVQ R11, AX
- ORQ R12, AX
- XORQ R8, R10
- MOVQ 128(SP), R13
- MOVQ 176(SP), R14
- ROLQ $0x1c, R10
- XORQ R10, AX
- MOVQ AX, 40(DI)
- XORQ AX, SI
- XORQ CX, R13
- ROLQ $0x2d, R13
- MOVQ R12, AX
- ANDQ R13, AX
- XORQ R11, AX
- MOVQ AX, 48(DI)
- XORQ AX, BP
- XORQ DX, R14
- ROLQ $0x3d, R14
- MOVQ R14, AX
- ORQ R10, AX
- XORQ R13, AX
- MOVQ AX, 64(DI)
- ANDQ R11, R10
- XORQ R14, R10
- MOVQ R10, 72(DI)
- NOTQ R14
- XORQ R10, R15
- ORQ R14, R13
- XORQ R12, R13
- MOVQ R13, 56(DI)
-
- // Result k
- MOVQ 8(SP), R10
- MOVQ 56(SP), R11
- MOVQ 104(SP), R12
- MOVQ 152(SP), R13
- MOVQ 160(SP), R14
- XORQ DX, R11
- ROLQ $0x06, R11
- XORQ R8, R12
- ROLQ $0x19, R12
- MOVQ R11, AX
- ORQ R12, AX
- XORQ CX, R10
- ROLQ $0x01, R10
- XORQ R10, AX
- MOVQ AX, 80(DI)
- XORQ AX, SI
- XORQ R9, R13
- ROLQ $0x08, R13
- MOVQ R12, AX
- ANDQ R13, AX
- XORQ R11, AX
- MOVQ AX, 88(DI)
- XORQ AX, BP
- XORQ BX, R14
- ROLQ $0x12, R14
- NOTQ R13
- MOVQ R13, AX
- ANDQ R14, AX
- XORQ R12, AX
- MOVQ AX, 96(DI)
- MOVQ R14, AX
- ORQ R10, AX
- XORQ R13, AX
- MOVQ AX, 104(DI)
- ANDQ R11, R10
- XORQ R14, R10
- MOVQ R10, 112(DI)
- XORQ R10, R15
-
- // Result m
- MOVQ 40(SP), R11
- XORQ BX, R11
- MOVQ 88(SP), R12
- ROLQ $0x24, R11
- XORQ CX, R12
- MOVQ 32(SP), R10
- ROLQ $0x0a, R12
- MOVQ R11, AX
- MOVQ 136(SP), R13
- ANDQ R12, AX
- XORQ R9, R10
- MOVQ 184(SP), R14
- ROLQ $0x1b, R10
- XORQ R10, AX
- MOVQ AX, 120(DI)
- XORQ AX, SI
- XORQ DX, R13
- ROLQ $0x0f, R13
- MOVQ R12, AX
- ORQ R13, AX
- XORQ R11, AX
- MOVQ AX, 128(DI)
- XORQ AX, BP
- XORQ R8, R14
- ROLQ $0x38, R14
- NOTQ R13
- MOVQ R13, AX
- ORQ R14, AX
- XORQ R12, AX
- MOVQ AX, 136(DI)
- ORQ R10, R11
- XORQ R14, R11
- MOVQ R11, 152(DI)
- ANDQ R10, R14
- XORQ R13, R14
- MOVQ R14, 144(DI)
- XORQ R11, R15
-
- // Result s
- MOVQ 16(SP), R10
- MOVQ 64(SP), R11
- MOVQ 112(SP), R12
- XORQ DX, R10
- MOVQ 120(SP), R13
- ROLQ $0x3e, R10
- XORQ R8, R11
- MOVQ 168(SP), R14
- ROLQ $0x37, R11
- XORQ R9, R12
- MOVQ R10, R9
- XORQ CX, R14
- ROLQ $0x02, R14
- ANDQ R11, R9
- XORQ R14, R9
- MOVQ R9, 192(DI)
- ROLQ $0x27, R12
- XORQ R9, R15
- NOTQ R11
- XORQ BX, R13
- MOVQ R11, BX
- ANDQ R12, BX
- XORQ R10, BX
- MOVQ BX, 160(DI)
- XORQ BX, SI
- ROLQ $0x29, R13
- MOVQ R12, CX
- ORQ R13, CX
- XORQ R11, CX
- MOVQ CX, 168(DI)
- XORQ CX, BP
- MOVQ R13, DX
- MOVQ R14, R8
- ANDQ R14, DX
- ORQ R10, R8
- XORQ R12, DX
- XORQ R13, R8
- MOVQ DX, 176(DI)
- MOVQ R8, 184(DI)
-
- // Prepare round
- MOVQ BP, BX
- ROLQ $0x01, BX
- MOVQ 16(DI), R12
- XORQ 56(DI), DX
- XORQ R15, BX
- XORQ 96(DI), R12
- XORQ 136(DI), DX
- XORQ DX, R12
- MOVQ R12, CX
- ROLQ $0x01, CX
- MOVQ 24(DI), R13
- XORQ 64(DI), R8
- XORQ SI, CX
- XORQ 104(DI), R13
- XORQ 144(DI), R8
- XORQ R8, R13
- MOVQ R13, DX
- ROLQ $0x01, DX
- MOVQ R15, R8
- XORQ BP, DX
- ROLQ $0x01, R8
- MOVQ SI, R9
- XORQ R12, R8
- ROLQ $0x01, R9
-
- // Result b
- MOVQ (DI), R10
- MOVQ 48(DI), R11
- XORQ R13, R9
- MOVQ 96(DI), R12
- MOVQ 144(DI), R13
- MOVQ 192(DI), R14
- XORQ CX, R11
- ROLQ $0x2c, R11
- XORQ DX, R12
- XORQ BX, R10
- ROLQ $0x2b, R12
- MOVQ R11, SI
- MOVQ $0x000000000000808b, AX
- ORQ R12, SI
- XORQ R10, AX
- XORQ AX, SI
- MOVQ SI, (SP)
- XORQ R9, R14
- ROLQ $0x0e, R14
- MOVQ R10, R15
- ANDQ R11, R15
- XORQ R14, R15
- MOVQ R15, 32(SP)
- XORQ R8, R13
- ROLQ $0x15, R13
- MOVQ R13, AX
- ANDQ R14, AX
- XORQ R12, AX
- MOVQ AX, 16(SP)
- NOTQ R12
- ORQ R10, R14
- ORQ R13, R12
- XORQ R13, R14
- XORQ R11, R12
- MOVQ R14, 24(SP)
- MOVQ R12, 8(SP)
- MOVQ R12, BP
-
- // Result g
- MOVQ 72(DI), R11
- XORQ R9, R11
- MOVQ 80(DI), R12
- ROLQ $0x14, R11
- XORQ BX, R12
- ROLQ $0x03, R12
- MOVQ 24(DI), R10
- MOVQ R11, AX
- ORQ R12, AX
- XORQ R8, R10
- MOVQ 128(DI), R13
- MOVQ 176(DI), R14
- ROLQ $0x1c, R10
- XORQ R10, AX
- MOVQ AX, 40(SP)
- XORQ AX, SI
- XORQ CX, R13
- ROLQ $0x2d, R13
- MOVQ R12, AX
- ANDQ R13, AX
- XORQ R11, AX
- MOVQ AX, 48(SP)
- XORQ AX, BP
- XORQ DX, R14
- ROLQ $0x3d, R14
- MOVQ R14, AX
- ORQ R10, AX
- XORQ R13, AX
- MOVQ AX, 64(SP)
- ANDQ R11, R10
- XORQ R14, R10
- MOVQ R10, 72(SP)
- NOTQ R14
- XORQ R10, R15
- ORQ R14, R13
- XORQ R12, R13
- MOVQ R13, 56(SP)
-
- // Result k
- MOVQ 8(DI), R10
- MOVQ 56(DI), R11
- MOVQ 104(DI), R12
- MOVQ 152(DI), R13
- MOVQ 160(DI), R14
- XORQ DX, R11
- ROLQ $0x06, R11
- XORQ R8, R12
- ROLQ $0x19, R12
- MOVQ R11, AX
- ORQ R12, AX
- XORQ CX, R10
- ROLQ $0x01, R10
- XORQ R10, AX
- MOVQ AX, 80(SP)
- XORQ AX, SI
- XORQ R9, R13
- ROLQ $0x08, R13
- MOVQ R12, AX
- ANDQ R13, AX
- XORQ R11, AX
- MOVQ AX, 88(SP)
- XORQ AX, BP
- XORQ BX, R14
- ROLQ $0x12, R14
- NOTQ R13
- MOVQ R13, AX
- ANDQ R14, AX
- XORQ R12, AX
- MOVQ AX, 96(SP)
- MOVQ R14, AX
- ORQ R10, AX
- XORQ R13, AX
- MOVQ AX, 104(SP)
- ANDQ R11, R10
- XORQ R14, R10
- MOVQ R10, 112(SP)
- XORQ R10, R15
-
- // Result m
- MOVQ 40(DI), R11
- XORQ BX, R11
- MOVQ 88(DI), R12
- ROLQ $0x24, R11
- XORQ CX, R12
- MOVQ 32(DI), R10
- ROLQ $0x0a, R12
- MOVQ R11, AX
- MOVQ 136(DI), R13
- ANDQ R12, AX
- XORQ R9, R10
- MOVQ 184(DI), R14
- ROLQ $0x1b, R10
- XORQ R10, AX
- MOVQ AX, 120(SP)
- XORQ AX, SI
- XORQ DX, R13
- ROLQ $0x0f, R13
- MOVQ R12, AX
- ORQ R13, AX
- XORQ R11, AX
- MOVQ AX, 128(SP)
- XORQ AX, BP
- XORQ R8, R14
- ROLQ $0x38, R14
- NOTQ R13
- MOVQ R13, AX
- ORQ R14, AX
- XORQ R12, AX
- MOVQ AX, 136(SP)
- ORQ R10, R11
- XORQ R14, R11
- MOVQ R11, 152(SP)
- ANDQ R10, R14
- XORQ R13, R14
- MOVQ R14, 144(SP)
- XORQ R11, R15
-
- // Result s
- MOVQ 16(DI), R10
- MOVQ 64(DI), R11
- MOVQ 112(DI), R12
- XORQ DX, R10
- MOVQ 120(DI), R13
- ROLQ $0x3e, R10
- XORQ R8, R11
- MOVQ 168(DI), R14
- ROLQ $0x37, R11
- XORQ R9, R12
- MOVQ R10, R9
- XORQ CX, R14
- ROLQ $0x02, R14
- ANDQ R11, R9
- XORQ R14, R9
- MOVQ R9, 192(SP)
- ROLQ $0x27, R12
- XORQ R9, R15
- NOTQ R11
- XORQ BX, R13
- MOVQ R11, BX
- ANDQ R12, BX
- XORQ R10, BX
- MOVQ BX, 160(SP)
- XORQ BX, SI
- ROLQ $0x29, R13
- MOVQ R12, CX
- ORQ R13, CX
- XORQ R11, CX
- MOVQ CX, 168(SP)
- XORQ CX, BP
- MOVQ R13, DX
- MOVQ R14, R8
- ANDQ R14, DX
- ORQ R10, R8
- XORQ R12, DX
- XORQ R13, R8
- MOVQ DX, 176(SP)
- MOVQ R8, 184(SP)
-
- // Prepare round
- MOVQ BP, BX
- ROLQ $0x01, BX
- MOVQ 16(SP), R12
- XORQ 56(SP), DX
- XORQ R15, BX
- XORQ 96(SP), R12
- XORQ 136(SP), DX
- XORQ DX, R12
- MOVQ R12, CX
- ROLQ $0x01, CX
- MOVQ 24(SP), R13
- XORQ 64(SP), R8
- XORQ SI, CX
- XORQ 104(SP), R13
- XORQ 144(SP), R8
- XORQ R8, R13
- MOVQ R13, DX
- ROLQ $0x01, DX
- MOVQ R15, R8
- XORQ BP, DX
- ROLQ $0x01, R8
- MOVQ SI, R9
- XORQ R12, R8
- ROLQ $0x01, R9
-
- // Result b
- MOVQ (SP), R10
- MOVQ 48(SP), R11
- XORQ R13, R9
- MOVQ 96(SP), R12
- MOVQ 144(SP), R13
- MOVQ 192(SP), R14
- XORQ CX, R11
- ROLQ $0x2c, R11
- XORQ DX, R12
- XORQ BX, R10
- ROLQ $0x2b, R12
- MOVQ R11, SI
- MOVQ $0x0000000080000001, AX
- ORQ R12, SI
- XORQ R10, AX
- XORQ AX, SI
- MOVQ SI, (DI)
- XORQ R9, R14
- ROLQ $0x0e, R14
- MOVQ R10, R15
- ANDQ R11, R15
- XORQ R14, R15
- MOVQ R15, 32(DI)
- XORQ R8, R13
- ROLQ $0x15, R13
- MOVQ R13, AX
- ANDQ R14, AX
- XORQ R12, AX
- MOVQ AX, 16(DI)
- NOTQ R12
- ORQ R10, R14
- ORQ R13, R12
- XORQ R13, R14
- XORQ R11, R12
- MOVQ R14, 24(DI)
- MOVQ R12, 8(DI)
- MOVQ R12, BP
-
- // Result g
- MOVQ 72(SP), R11
- XORQ R9, R11
- MOVQ 80(SP), R12
- ROLQ $0x14, R11
- XORQ BX, R12
- ROLQ $0x03, R12
- MOVQ 24(SP), R10
- MOVQ R11, AX
- ORQ R12, AX
- XORQ R8, R10
- MOVQ 128(SP), R13
- MOVQ 176(SP), R14
- ROLQ $0x1c, R10
- XORQ R10, AX
- MOVQ AX, 40(DI)
- XORQ AX, SI
- XORQ CX, R13
- ROLQ $0x2d, R13
- MOVQ R12, AX
- ANDQ R13, AX
- XORQ R11, AX
- MOVQ AX, 48(DI)
- XORQ AX, BP
- XORQ DX, R14
- ROLQ $0x3d, R14
- MOVQ R14, AX
- ORQ R10, AX
- XORQ R13, AX
- MOVQ AX, 64(DI)
- ANDQ R11, R10
- XORQ R14, R10
- MOVQ R10, 72(DI)
- NOTQ R14
- XORQ R10, R15
- ORQ R14, R13
- XORQ R12, R13
- MOVQ R13, 56(DI)
-
- // Result k
- MOVQ 8(SP), R10
- MOVQ 56(SP), R11
- MOVQ 104(SP), R12
- MOVQ 152(SP), R13
- MOVQ 160(SP), R14
- XORQ DX, R11
- ROLQ $0x06, R11
- XORQ R8, R12
- ROLQ $0x19, R12
- MOVQ R11, AX
- ORQ R12, AX
- XORQ CX, R10
- ROLQ $0x01, R10
- XORQ R10, AX
- MOVQ AX, 80(DI)
- XORQ AX, SI
- XORQ R9, R13
- ROLQ $0x08, R13
- MOVQ R12, AX
- ANDQ R13, AX
- XORQ R11, AX
- MOVQ AX, 88(DI)
- XORQ AX, BP
- XORQ BX, R14
- ROLQ $0x12, R14
- NOTQ R13
- MOVQ R13, AX
- ANDQ R14, AX
- XORQ R12, AX
- MOVQ AX, 96(DI)
- MOVQ R14, AX
- ORQ R10, AX
- XORQ R13, AX
- MOVQ AX, 104(DI)
- ANDQ R11, R10
- XORQ R14, R10
- MOVQ R10, 112(DI)
- XORQ R10, R15
-
- // Result m
- MOVQ 40(SP), R11
- XORQ BX, R11
- MOVQ 88(SP), R12
- ROLQ $0x24, R11
- XORQ CX, R12
- MOVQ 32(SP), R10
- ROLQ $0x0a, R12
- MOVQ R11, AX
- MOVQ 136(SP), R13
- ANDQ R12, AX
- XORQ R9, R10
- MOVQ 184(SP), R14
- ROLQ $0x1b, R10
- XORQ R10, AX
- MOVQ AX, 120(DI)
- XORQ AX, SI
- XORQ DX, R13
- ROLQ $0x0f, R13
- MOVQ R12, AX
- ORQ R13, AX
- XORQ R11, AX
- MOVQ AX, 128(DI)
- XORQ AX, BP
- XORQ R8, R14
- ROLQ $0x38, R14
- NOTQ R13
- MOVQ R13, AX
- ORQ R14, AX
- XORQ R12, AX
- MOVQ AX, 136(DI)
- ORQ R10, R11
- XORQ R14, R11
- MOVQ R11, 152(DI)
- ANDQ R10, R14
- XORQ R13, R14
- MOVQ R14, 144(DI)
- XORQ R11, R15
-
- // Result s
- MOVQ 16(SP), R10
- MOVQ 64(SP), R11
- MOVQ 112(SP), R12
- XORQ DX, R10
- MOVQ 120(SP), R13
- ROLQ $0x3e, R10
- XORQ R8, R11
- MOVQ 168(SP), R14
- ROLQ $0x37, R11
- XORQ R9, R12
- MOVQ R10, R9
- XORQ CX, R14
- ROLQ $0x02, R14
- ANDQ R11, R9
- XORQ R14, R9
- MOVQ R9, 192(DI)
- ROLQ $0x27, R12
- XORQ R9, R15
- NOTQ R11
- XORQ BX, R13
- MOVQ R11, BX
- ANDQ R12, BX
- XORQ R10, BX
- MOVQ BX, 160(DI)
- XORQ BX, SI
- ROLQ $0x29, R13
- MOVQ R12, CX
- ORQ R13, CX
- XORQ R11, CX
- MOVQ CX, 168(DI)
- XORQ CX, BP
- MOVQ R13, DX
- MOVQ R14, R8
- ANDQ R14, DX
- ORQ R10, R8
- XORQ R12, DX
- XORQ R13, R8
- MOVQ DX, 176(DI)
- MOVQ R8, 184(DI)
-
- // Prepare round
- MOVQ BP, BX
- ROLQ $0x01, BX
- MOVQ 16(DI), R12
- XORQ 56(DI), DX
- XORQ R15, BX
- XORQ 96(DI), R12
- XORQ 136(DI), DX
- XORQ DX, R12
- MOVQ R12, CX
- ROLQ $0x01, CX
- MOVQ 24(DI), R13
- XORQ 64(DI), R8
- XORQ SI, CX
- XORQ 104(DI), R13
- XORQ 144(DI), R8
- XORQ R8, R13
- MOVQ R13, DX
- ROLQ $0x01, DX
- MOVQ R15, R8
- XORQ BP, DX
- ROLQ $0x01, R8
- MOVQ SI, R9
- XORQ R12, R8
- ROLQ $0x01, R9
-
- // Result b
- MOVQ (DI), R10
- MOVQ 48(DI), R11
- XORQ R13, R9
- MOVQ 96(DI), R12
- MOVQ 144(DI), R13
- MOVQ 192(DI), R14
- XORQ CX, R11
- ROLQ $0x2c, R11
- XORQ DX, R12
- XORQ BX, R10
- ROLQ $0x2b, R12
- MOVQ R11, SI
- MOVQ $0x8000000080008081, AX
- ORQ R12, SI
- XORQ R10, AX
- XORQ AX, SI
- MOVQ SI, (SP)
- XORQ R9, R14
- ROLQ $0x0e, R14
- MOVQ R10, R15
- ANDQ R11, R15
- XORQ R14, R15
- MOVQ R15, 32(SP)
- XORQ R8, R13
- ROLQ $0x15, R13
- MOVQ R13, AX
- ANDQ R14, AX
- XORQ R12, AX
- MOVQ AX, 16(SP)
- NOTQ R12
- ORQ R10, R14
- ORQ R13, R12
- XORQ R13, R14
- XORQ R11, R12
- MOVQ R14, 24(SP)
- MOVQ R12, 8(SP)
- MOVQ R12, BP
-
- // Result g
- MOVQ 72(DI), R11
- XORQ R9, R11
- MOVQ 80(DI), R12
- ROLQ $0x14, R11
- XORQ BX, R12
- ROLQ $0x03, R12
- MOVQ 24(DI), R10
- MOVQ R11, AX
- ORQ R12, AX
- XORQ R8, R10
- MOVQ 128(DI), R13
- MOVQ 176(DI), R14
- ROLQ $0x1c, R10
- XORQ R10, AX
- MOVQ AX, 40(SP)
- XORQ AX, SI
- XORQ CX, R13
- ROLQ $0x2d, R13
- MOVQ R12, AX
- ANDQ R13, AX
- XORQ R11, AX
- MOVQ AX, 48(SP)
- XORQ AX, BP
- XORQ DX, R14
- ROLQ $0x3d, R14
- MOVQ R14, AX
- ORQ R10, AX
- XORQ R13, AX
- MOVQ AX, 64(SP)
- ANDQ R11, R10
- XORQ R14, R10
- MOVQ R10, 72(SP)
- NOTQ R14
- XORQ R10, R15
- ORQ R14, R13
- XORQ R12, R13
- MOVQ R13, 56(SP)
-
- // Result k
- MOVQ 8(DI), R10
- MOVQ 56(DI), R11
- MOVQ 104(DI), R12
- MOVQ 152(DI), R13
- MOVQ 160(DI), R14
- XORQ DX, R11
- ROLQ $0x06, R11
- XORQ R8, R12
- ROLQ $0x19, R12
- MOVQ R11, AX
- ORQ R12, AX
- XORQ CX, R10
- ROLQ $0x01, R10
- XORQ R10, AX
- MOVQ AX, 80(SP)
- XORQ AX, SI
- XORQ R9, R13
- ROLQ $0x08, R13
- MOVQ R12, AX
- ANDQ R13, AX
- XORQ R11, AX
- MOVQ AX, 88(SP)
- XORQ AX, BP
- XORQ BX, R14
- ROLQ $0x12, R14
- NOTQ R13
- MOVQ R13, AX
- ANDQ R14, AX
- XORQ R12, AX
- MOVQ AX, 96(SP)
- MOVQ R14, AX
- ORQ R10, AX
- XORQ R13, AX
- MOVQ AX, 104(SP)
- ANDQ R11, R10
- XORQ R14, R10
- MOVQ R10, 112(SP)
- XORQ R10, R15
-
- // Result m
- MOVQ 40(DI), R11
- XORQ BX, R11
- MOVQ 88(DI), R12
- ROLQ $0x24, R11
- XORQ CX, R12
- MOVQ 32(DI), R10
- ROLQ $0x0a, R12
- MOVQ R11, AX
- MOVQ 136(DI), R13
- ANDQ R12, AX
- XORQ R9, R10
- MOVQ 184(DI), R14
- ROLQ $0x1b, R10
- XORQ R10, AX
- MOVQ AX, 120(SP)
- XORQ AX, SI
- XORQ DX, R13
- ROLQ $0x0f, R13
- MOVQ R12, AX
- ORQ R13, AX
- XORQ R11, AX
- MOVQ AX, 128(SP)
- XORQ AX, BP
- XORQ R8, R14
- ROLQ $0x38, R14
- NOTQ R13
- MOVQ R13, AX
- ORQ R14, AX
- XORQ R12, AX
- MOVQ AX, 136(SP)
- ORQ R10, R11
- XORQ R14, R11
- MOVQ R11, 152(SP)
- ANDQ R10, R14
- XORQ R13, R14
- MOVQ R14, 144(SP)
- XORQ R11, R15
-
- // Result s
- MOVQ 16(DI), R10
- MOVQ 64(DI), R11
- MOVQ 112(DI), R12
- XORQ DX, R10
- MOVQ 120(DI), R13
- ROLQ $0x3e, R10
- XORQ R8, R11
- MOVQ 168(DI), R14
- ROLQ $0x37, R11
- XORQ R9, R12
- MOVQ R10, R9
- XORQ CX, R14
- ROLQ $0x02, R14
- ANDQ R11, R9
- XORQ R14, R9
- MOVQ R9, 192(SP)
- ROLQ $0x27, R12
- XORQ R9, R15
- NOTQ R11
- XORQ BX, R13
- MOVQ R11, BX
- ANDQ R12, BX
- XORQ R10, BX
- MOVQ BX, 160(SP)
- XORQ BX, SI
- ROLQ $0x29, R13
- MOVQ R12, CX
- ORQ R13, CX
- XORQ R11, CX
- MOVQ CX, 168(SP)
- XORQ CX, BP
- MOVQ R13, DX
- MOVQ R14, R8
- ANDQ R14, DX
- ORQ R10, R8
- XORQ R12, DX
- XORQ R13, R8
- MOVQ DX, 176(SP)
- MOVQ R8, 184(SP)
-
- // Prepare round
- MOVQ BP, BX
- ROLQ $0x01, BX
- MOVQ 16(SP), R12
- XORQ 56(SP), DX
- XORQ R15, BX
- XORQ 96(SP), R12
- XORQ 136(SP), DX
- XORQ DX, R12
- MOVQ R12, CX
- ROLQ $0x01, CX
- MOVQ 24(SP), R13
- XORQ 64(SP), R8
- XORQ SI, CX
- XORQ 104(SP), R13
- XORQ 144(SP), R8
- XORQ R8, R13
- MOVQ R13, DX
- ROLQ $0x01, DX
- MOVQ R15, R8
- XORQ BP, DX
- ROLQ $0x01, R8
- MOVQ SI, R9
- XORQ R12, R8
- ROLQ $0x01, R9
-
- // Result b
- MOVQ (SP), R10
- MOVQ 48(SP), R11
- XORQ R13, R9
- MOVQ 96(SP), R12
- MOVQ 144(SP), R13
- MOVQ 192(SP), R14
- XORQ CX, R11
- ROLQ $0x2c, R11
- XORQ DX, R12
- XORQ BX, R10
- ROLQ $0x2b, R12
- MOVQ R11, SI
- MOVQ $0x8000000000008009, AX
- ORQ R12, SI
- XORQ R10, AX
- XORQ AX, SI
- MOVQ SI, (DI)
- XORQ R9, R14
- ROLQ $0x0e, R14
- MOVQ R10, R15
- ANDQ R11, R15
- XORQ R14, R15
- MOVQ R15, 32(DI)
- XORQ R8, R13
- ROLQ $0x15, R13
- MOVQ R13, AX
- ANDQ R14, AX
- XORQ R12, AX
- MOVQ AX, 16(DI)
- NOTQ R12
- ORQ R10, R14
- ORQ R13, R12
- XORQ R13, R14
- XORQ R11, R12
- MOVQ R14, 24(DI)
- MOVQ R12, 8(DI)
- MOVQ R12, BP
-
- // Result g
- MOVQ 72(SP), R11
- XORQ R9, R11
- MOVQ 80(SP), R12
- ROLQ $0x14, R11
- XORQ BX, R12
- ROLQ $0x03, R12
- MOVQ 24(SP), R10
- MOVQ R11, AX
- ORQ R12, AX
- XORQ R8, R10
- MOVQ 128(SP), R13
- MOVQ 176(SP), R14
- ROLQ $0x1c, R10
- XORQ R10, AX
- MOVQ AX, 40(DI)
- XORQ AX, SI
- XORQ CX, R13
- ROLQ $0x2d, R13
- MOVQ R12, AX
- ANDQ R13, AX
- XORQ R11, AX
- MOVQ AX, 48(DI)
- XORQ AX, BP
- XORQ DX, R14
- ROLQ $0x3d, R14
- MOVQ R14, AX
- ORQ R10, AX
- XORQ R13, AX
- MOVQ AX, 64(DI)
- ANDQ R11, R10
- XORQ R14, R10
- MOVQ R10, 72(DI)
- NOTQ R14
- XORQ R10, R15
- ORQ R14, R13
- XORQ R12, R13
- MOVQ R13, 56(DI)
-
- // Result k
- MOVQ 8(SP), R10
- MOVQ 56(SP), R11
- MOVQ 104(SP), R12
- MOVQ 152(SP), R13
- MOVQ 160(SP), R14
- XORQ DX, R11
- ROLQ $0x06, R11
- XORQ R8, R12
- ROLQ $0x19, R12
- MOVQ R11, AX
- ORQ R12, AX
- XORQ CX, R10
- ROLQ $0x01, R10
- XORQ R10, AX
- MOVQ AX, 80(DI)
- XORQ AX, SI
- XORQ R9, R13
- ROLQ $0x08, R13
- MOVQ R12, AX
- ANDQ R13, AX
- XORQ R11, AX
- MOVQ AX, 88(DI)
- XORQ AX, BP
- XORQ BX, R14
- ROLQ $0x12, R14
- NOTQ R13
- MOVQ R13, AX
- ANDQ R14, AX
- XORQ R12, AX
- MOVQ AX, 96(DI)
- MOVQ R14, AX
- ORQ R10, AX
- XORQ R13, AX
- MOVQ AX, 104(DI)
- ANDQ R11, R10
- XORQ R14, R10
- MOVQ R10, 112(DI)
- XORQ R10, R15
-
- // Result m
- MOVQ 40(SP), R11
- XORQ BX, R11
- MOVQ 88(SP), R12
- ROLQ $0x24, R11
- XORQ CX, R12
- MOVQ 32(SP), R10
- ROLQ $0x0a, R12
- MOVQ R11, AX
- MOVQ 136(SP), R13
- ANDQ R12, AX
- XORQ R9, R10
- MOVQ 184(SP), R14
- ROLQ $0x1b, R10
- XORQ R10, AX
- MOVQ AX, 120(DI)
- XORQ AX, SI
- XORQ DX, R13
- ROLQ $0x0f, R13
- MOVQ R12, AX
- ORQ R13, AX
- XORQ R11, AX
- MOVQ AX, 128(DI)
- XORQ AX, BP
- XORQ R8, R14
- ROLQ $0x38, R14
- NOTQ R13
- MOVQ R13, AX
- ORQ R14, AX
- XORQ R12, AX
- MOVQ AX, 136(DI)
- ORQ R10, R11
- XORQ R14, R11
- MOVQ R11, 152(DI)
- ANDQ R10, R14
- XORQ R13, R14
- MOVQ R14, 144(DI)
- XORQ R11, R15
-
- // Result s
- MOVQ 16(SP), R10
- MOVQ 64(SP), R11
- MOVQ 112(SP), R12
- XORQ DX, R10
- MOVQ 120(SP), R13
- ROLQ $0x3e, R10
- XORQ R8, R11
- MOVQ 168(SP), R14
- ROLQ $0x37, R11
- XORQ R9, R12
- MOVQ R10, R9
- XORQ CX, R14
- ROLQ $0x02, R14
- ANDQ R11, R9
- XORQ R14, R9
- MOVQ R9, 192(DI)
- ROLQ $0x27, R12
- XORQ R9, R15
- NOTQ R11
- XORQ BX, R13
- MOVQ R11, BX
- ANDQ R12, BX
- XORQ R10, BX
- MOVQ BX, 160(DI)
- XORQ BX, SI
- ROLQ $0x29, R13
- MOVQ R12, CX
- ORQ R13, CX
- XORQ R11, CX
- MOVQ CX, 168(DI)
- XORQ CX, BP
- MOVQ R13, DX
- MOVQ R14, R8
- ANDQ R14, DX
- ORQ R10, R8
- XORQ R12, DX
- XORQ R13, R8
- MOVQ DX, 176(DI)
- MOVQ R8, 184(DI)
-
- // Prepare round
- MOVQ BP, BX
- ROLQ $0x01, BX
- MOVQ 16(DI), R12
- XORQ 56(DI), DX
- XORQ R15, BX
- XORQ 96(DI), R12
- XORQ 136(DI), DX
- XORQ DX, R12
- MOVQ R12, CX
- ROLQ $0x01, CX
- MOVQ 24(DI), R13
- XORQ 64(DI), R8
- XORQ SI, CX
- XORQ 104(DI), R13
- XORQ 144(DI), R8
- XORQ R8, R13
- MOVQ R13, DX
- ROLQ $0x01, DX
- MOVQ R15, R8
- XORQ BP, DX
- ROLQ $0x01, R8
- MOVQ SI, R9
- XORQ R12, R8
- ROLQ $0x01, R9
-
- // Result b
- MOVQ (DI), R10
- MOVQ 48(DI), R11
- XORQ R13, R9
- MOVQ 96(DI), R12
- MOVQ 144(DI), R13
- MOVQ 192(DI), R14
- XORQ CX, R11
- ROLQ $0x2c, R11
- XORQ DX, R12
- XORQ BX, R10
- ROLQ $0x2b, R12
- MOVQ R11, SI
- MOVQ $0x000000000000008a, AX
- ORQ R12, SI
- XORQ R10, AX
- XORQ AX, SI
- MOVQ SI, (SP)
- XORQ R9, R14
- ROLQ $0x0e, R14
- MOVQ R10, R15
- ANDQ R11, R15
- XORQ R14, R15
- MOVQ R15, 32(SP)
- XORQ R8, R13
- ROLQ $0x15, R13
- MOVQ R13, AX
- ANDQ R14, AX
- XORQ R12, AX
- MOVQ AX, 16(SP)
- NOTQ R12
- ORQ R10, R14
- ORQ R13, R12
- XORQ R13, R14
- XORQ R11, R12
- MOVQ R14, 24(SP)
- MOVQ R12, 8(SP)
- MOVQ R12, BP
-
- // Result g
- MOVQ 72(DI), R11
- XORQ R9, R11
- MOVQ 80(DI), R12
- ROLQ $0x14, R11
- XORQ BX, R12
- ROLQ $0x03, R12
- MOVQ 24(DI), R10
- MOVQ R11, AX
- ORQ R12, AX
- XORQ R8, R10
- MOVQ 128(DI), R13
- MOVQ 176(DI), R14
- ROLQ $0x1c, R10
- XORQ R10, AX
- MOVQ AX, 40(SP)
- XORQ AX, SI
- XORQ CX, R13
- ROLQ $0x2d, R13
- MOVQ R12, AX
- ANDQ R13, AX
- XORQ R11, AX
- MOVQ AX, 48(SP)
- XORQ AX, BP
- XORQ DX, R14
- ROLQ $0x3d, R14
- MOVQ R14, AX
- ORQ R10, AX
- XORQ R13, AX
- MOVQ AX, 64(SP)
- ANDQ R11, R10
- XORQ R14, R10
- MOVQ R10, 72(SP)
- NOTQ R14
- XORQ R10, R15
- ORQ R14, R13
- XORQ R12, R13
- MOVQ R13, 56(SP)
-
- // Result k
- MOVQ 8(DI), R10
- MOVQ 56(DI), R11
- MOVQ 104(DI), R12
- MOVQ 152(DI), R13
- MOVQ 160(DI), R14
- XORQ DX, R11
- ROLQ $0x06, R11
- XORQ R8, R12
- ROLQ $0x19, R12
- MOVQ R11, AX
- ORQ R12, AX
- XORQ CX, R10
- ROLQ $0x01, R10
- XORQ R10, AX
- MOVQ AX, 80(SP)
- XORQ AX, SI
- XORQ R9, R13
- ROLQ $0x08, R13
- MOVQ R12, AX
- ANDQ R13, AX
- XORQ R11, AX
- MOVQ AX, 88(SP)
- XORQ AX, BP
- XORQ BX, R14
- ROLQ $0x12, R14
- NOTQ R13
- MOVQ R13, AX
- ANDQ R14, AX
- XORQ R12, AX
- MOVQ AX, 96(SP)
- MOVQ R14, AX
- ORQ R10, AX
- XORQ R13, AX
- MOVQ AX, 104(SP)
- ANDQ R11, R10
- XORQ R14, R10
- MOVQ R10, 112(SP)
- XORQ R10, R15
-
- // Result m
- MOVQ 40(DI), R11
- XORQ BX, R11
- MOVQ 88(DI), R12
- ROLQ $0x24, R11
- XORQ CX, R12
- MOVQ 32(DI), R10
- ROLQ $0x0a, R12
- MOVQ R11, AX
- MOVQ 136(DI), R13
- ANDQ R12, AX
- XORQ R9, R10
- MOVQ 184(DI), R14
- ROLQ $0x1b, R10
- XORQ R10, AX
- MOVQ AX, 120(SP)
- XORQ AX, SI
- XORQ DX, R13
- ROLQ $0x0f, R13
- MOVQ R12, AX
- ORQ R13, AX
- XORQ R11, AX
- MOVQ AX, 128(SP)
- XORQ AX, BP
- XORQ R8, R14
- ROLQ $0x38, R14
- NOTQ R13
- MOVQ R13, AX
- ORQ R14, AX
- XORQ R12, AX
- MOVQ AX, 136(SP)
- ORQ R10, R11
- XORQ R14, R11
- MOVQ R11, 152(SP)
- ANDQ R10, R14
- XORQ R13, R14
- MOVQ R14, 144(SP)
- XORQ R11, R15
-
- // Result s
- MOVQ 16(DI), R10
- MOVQ 64(DI), R11
- MOVQ 112(DI), R12
- XORQ DX, R10
- MOVQ 120(DI), R13
- ROLQ $0x3e, R10
- XORQ R8, R11
- MOVQ 168(DI), R14
- ROLQ $0x37, R11
- XORQ R9, R12
- MOVQ R10, R9
- XORQ CX, R14
- ROLQ $0x02, R14
- ANDQ R11, R9
- XORQ R14, R9
- MOVQ R9, 192(SP)
- ROLQ $0x27, R12
- XORQ R9, R15
- NOTQ R11
- XORQ BX, R13
- MOVQ R11, BX
- ANDQ R12, BX
- XORQ R10, BX
- MOVQ BX, 160(SP)
- XORQ BX, SI
- ROLQ $0x29, R13
- MOVQ R12, CX
- ORQ R13, CX
- XORQ R11, CX
- MOVQ CX, 168(SP)
- XORQ CX, BP
- MOVQ R13, DX
- MOVQ R14, R8
- ANDQ R14, DX
- ORQ R10, R8
- XORQ R12, DX
- XORQ R13, R8
- MOVQ DX, 176(SP)
- MOVQ R8, 184(SP)
-
- // Prepare round
- MOVQ BP, BX
- ROLQ $0x01, BX
- MOVQ 16(SP), R12
- XORQ 56(SP), DX
- XORQ R15, BX
- XORQ 96(SP), R12
- XORQ 136(SP), DX
- XORQ DX, R12
- MOVQ R12, CX
- ROLQ $0x01, CX
- MOVQ 24(SP), R13
- XORQ 64(SP), R8
- XORQ SI, CX
- XORQ 104(SP), R13
- XORQ 144(SP), R8
- XORQ R8, R13
- MOVQ R13, DX
- ROLQ $0x01, DX
- MOVQ R15, R8
- XORQ BP, DX
- ROLQ $0x01, R8
- MOVQ SI, R9
- XORQ R12, R8
- ROLQ $0x01, R9
-
- // Result b
- MOVQ (SP), R10
- MOVQ 48(SP), R11
- XORQ R13, R9
- MOVQ 96(SP), R12
- MOVQ 144(SP), R13
- MOVQ 192(SP), R14
- XORQ CX, R11
- ROLQ $0x2c, R11
- XORQ DX, R12
- XORQ BX, R10
- ROLQ $0x2b, R12
- MOVQ R11, SI
- MOVQ $0x0000000000000088, AX
- ORQ R12, SI
- XORQ R10, AX
- XORQ AX, SI
- MOVQ SI, (DI)
- XORQ R9, R14
- ROLQ $0x0e, R14
- MOVQ R10, R15
- ANDQ R11, R15
- XORQ R14, R15
- MOVQ R15, 32(DI)
- XORQ R8, R13
- ROLQ $0x15, R13
- MOVQ R13, AX
- ANDQ R14, AX
- XORQ R12, AX
- MOVQ AX, 16(DI)
- NOTQ R12
- ORQ R10, R14
- ORQ R13, R12
- XORQ R13, R14
- XORQ R11, R12
- MOVQ R14, 24(DI)
- MOVQ R12, 8(DI)
- MOVQ R12, BP
-
- // Result g
- MOVQ 72(SP), R11
- XORQ R9, R11
- MOVQ 80(SP), R12
- ROLQ $0x14, R11
- XORQ BX, R12
- ROLQ $0x03, R12
- MOVQ 24(SP), R10
- MOVQ R11, AX
- ORQ R12, AX
- XORQ R8, R10
- MOVQ 128(SP), R13
- MOVQ 176(SP), R14
- ROLQ $0x1c, R10
- XORQ R10, AX
- MOVQ AX, 40(DI)
- XORQ AX, SI
- XORQ CX, R13
- ROLQ $0x2d, R13
- MOVQ R12, AX
- ANDQ R13, AX
- XORQ R11, AX
- MOVQ AX, 48(DI)
- XORQ AX, BP
- XORQ DX, R14
- ROLQ $0x3d, R14
- MOVQ R14, AX
- ORQ R10, AX
- XORQ R13, AX
- MOVQ AX, 64(DI)
- ANDQ R11, R10
- XORQ R14, R10
- MOVQ R10, 72(DI)
- NOTQ R14
- XORQ R10, R15
- ORQ R14, R13
- XORQ R12, R13
- MOVQ R13, 56(DI)
-
- // Result k
- MOVQ 8(SP), R10
- MOVQ 56(SP), R11
- MOVQ 104(SP), R12
- MOVQ 152(SP), R13
- MOVQ 160(SP), R14
- XORQ DX, R11
- ROLQ $0x06, R11
- XORQ R8, R12
- ROLQ $0x19, R12
- MOVQ R11, AX
- ORQ R12, AX
- XORQ CX, R10
- ROLQ $0x01, R10
- XORQ R10, AX
- MOVQ AX, 80(DI)
- XORQ AX, SI
- XORQ R9, R13
- ROLQ $0x08, R13
- MOVQ R12, AX
- ANDQ R13, AX
- XORQ R11, AX
- MOVQ AX, 88(DI)
- XORQ AX, BP
- XORQ BX, R14
- ROLQ $0x12, R14
- NOTQ R13
- MOVQ R13, AX
- ANDQ R14, AX
- XORQ R12, AX
- MOVQ AX, 96(DI)
- MOVQ R14, AX
- ORQ R10, AX
- XORQ R13, AX
- MOVQ AX, 104(DI)
- ANDQ R11, R10
- XORQ R14, R10
- MOVQ R10, 112(DI)
- XORQ R10, R15
-
- // Result m
- MOVQ 40(SP), R11
- XORQ BX, R11
- MOVQ 88(SP), R12
- ROLQ $0x24, R11
- XORQ CX, R12
- MOVQ 32(SP), R10
- ROLQ $0x0a, R12
- MOVQ R11, AX
- MOVQ 136(SP), R13
- ANDQ R12, AX
- XORQ R9, R10
- MOVQ 184(SP), R14
- ROLQ $0x1b, R10
- XORQ R10, AX
- MOVQ AX, 120(DI)
- XORQ AX, SI
- XORQ DX, R13
- ROLQ $0x0f, R13
- MOVQ R12, AX
- ORQ R13, AX
- XORQ R11, AX
- MOVQ AX, 128(DI)
- XORQ AX, BP
- XORQ R8, R14
- ROLQ $0x38, R14
- NOTQ R13
- MOVQ R13, AX
- ORQ R14, AX
- XORQ R12, AX
- MOVQ AX, 136(DI)
- ORQ R10, R11
- XORQ R14, R11
- MOVQ R11, 152(DI)
- ANDQ R10, R14
- XORQ R13, R14
- MOVQ R14, 144(DI)
- XORQ R11, R15
-
- // Result s
- MOVQ 16(SP), R10
- MOVQ 64(SP), R11
- MOVQ 112(SP), R12
- XORQ DX, R10
- MOVQ 120(SP), R13
- ROLQ $0x3e, R10
- XORQ R8, R11
- MOVQ 168(SP), R14
- ROLQ $0x37, R11
- XORQ R9, R12
- MOVQ R10, R9
- XORQ CX, R14
- ROLQ $0x02, R14
- ANDQ R11, R9
- XORQ R14, R9
- MOVQ R9, 192(DI)
- ROLQ $0x27, R12
- XORQ R9, R15
- NOTQ R11
- XORQ BX, R13
- MOVQ R11, BX
- ANDQ R12, BX
- XORQ R10, BX
- MOVQ BX, 160(DI)
- XORQ BX, SI
- ROLQ $0x29, R13
- MOVQ R12, CX
- ORQ R13, CX
- XORQ R11, CX
- MOVQ CX, 168(DI)
- XORQ CX, BP
- MOVQ R13, DX
- MOVQ R14, R8
- ANDQ R14, DX
- ORQ R10, R8
- XORQ R12, DX
- XORQ R13, R8
- MOVQ DX, 176(DI)
- MOVQ R8, 184(DI)
-
- // Prepare round
- MOVQ BP, BX
- ROLQ $0x01, BX
- MOVQ 16(DI), R12
- XORQ 56(DI), DX
- XORQ R15, BX
- XORQ 96(DI), R12
- XORQ 136(DI), DX
- XORQ DX, R12
- MOVQ R12, CX
- ROLQ $0x01, CX
- MOVQ 24(DI), R13
- XORQ 64(DI), R8
- XORQ SI, CX
- XORQ 104(DI), R13
- XORQ 144(DI), R8
- XORQ R8, R13
- MOVQ R13, DX
- ROLQ $0x01, DX
- MOVQ R15, R8
- XORQ BP, DX
- ROLQ $0x01, R8
- MOVQ SI, R9
- XORQ R12, R8
- ROLQ $0x01, R9
-
- // Result b
- MOVQ (DI), R10
- MOVQ 48(DI), R11
- XORQ R13, R9
- MOVQ 96(DI), R12
- MOVQ 144(DI), R13
- MOVQ 192(DI), R14
- XORQ CX, R11
- ROLQ $0x2c, R11
- XORQ DX, R12
- XORQ BX, R10
- ROLQ $0x2b, R12
- MOVQ R11, SI
- MOVQ $0x0000000080008009, AX
- ORQ R12, SI
- XORQ R10, AX
- XORQ AX, SI
- MOVQ SI, (SP)
- XORQ R9, R14
- ROLQ $0x0e, R14
- MOVQ R10, R15
- ANDQ R11, R15
- XORQ R14, R15
- MOVQ R15, 32(SP)
- XORQ R8, R13
- ROLQ $0x15, R13
- MOVQ R13, AX
- ANDQ R14, AX
- XORQ R12, AX
- MOVQ AX, 16(SP)
- NOTQ R12
- ORQ R10, R14
- ORQ R13, R12
- XORQ R13, R14
- XORQ R11, R12
- MOVQ R14, 24(SP)
- MOVQ R12, 8(SP)
- MOVQ R12, BP
-
- // Result g
- MOVQ 72(DI), R11
- XORQ R9, R11
- MOVQ 80(DI), R12
- ROLQ $0x14, R11
- XORQ BX, R12
- ROLQ $0x03, R12
- MOVQ 24(DI), R10
- MOVQ R11, AX
- ORQ R12, AX
- XORQ R8, R10
- MOVQ 128(DI), R13
- MOVQ 176(DI), R14
- ROLQ $0x1c, R10
- XORQ R10, AX
- MOVQ AX, 40(SP)
- XORQ AX, SI
- XORQ CX, R13
- ROLQ $0x2d, R13
- MOVQ R12, AX
- ANDQ R13, AX
- XORQ R11, AX
- MOVQ AX, 48(SP)
- XORQ AX, BP
- XORQ DX, R14
- ROLQ $0x3d, R14
- MOVQ R14, AX
- ORQ R10, AX
- XORQ R13, AX
- MOVQ AX, 64(SP)
- ANDQ R11, R10
- XORQ R14, R10
- MOVQ R10, 72(SP)
- NOTQ R14
- XORQ R10, R15
- ORQ R14, R13
- XORQ R12, R13
- MOVQ R13, 56(SP)
-
- // Result k
- MOVQ 8(DI), R10
- MOVQ 56(DI), R11
- MOVQ 104(DI), R12
- MOVQ 152(DI), R13
- MOVQ 160(DI), R14
- XORQ DX, R11
- ROLQ $0x06, R11
- XORQ R8, R12
- ROLQ $0x19, R12
- MOVQ R11, AX
- ORQ R12, AX
- XORQ CX, R10
- ROLQ $0x01, R10
- XORQ R10, AX
- MOVQ AX, 80(SP)
- XORQ AX, SI
- XORQ R9, R13
- ROLQ $0x08, R13
- MOVQ R12, AX
- ANDQ R13, AX
- XORQ R11, AX
- MOVQ AX, 88(SP)
- XORQ AX, BP
- XORQ BX, R14
- ROLQ $0x12, R14
- NOTQ R13
- MOVQ R13, AX
- ANDQ R14, AX
- XORQ R12, AX
- MOVQ AX, 96(SP)
- MOVQ R14, AX
- ORQ R10, AX
- XORQ R13, AX
- MOVQ AX, 104(SP)
- ANDQ R11, R10
- XORQ R14, R10
- MOVQ R10, 112(SP)
- XORQ R10, R15
-
- // Result m
- MOVQ 40(DI), R11
- XORQ BX, R11
- MOVQ 88(DI), R12
- ROLQ $0x24, R11
- XORQ CX, R12
- MOVQ 32(DI), R10
- ROLQ $0x0a, R12
- MOVQ R11, AX
- MOVQ 136(DI), R13
- ANDQ R12, AX
- XORQ R9, R10
- MOVQ 184(DI), R14
- ROLQ $0x1b, R10
- XORQ R10, AX
- MOVQ AX, 120(SP)
- XORQ AX, SI
- XORQ DX, R13
- ROLQ $0x0f, R13
- MOVQ R12, AX
- ORQ R13, AX
- XORQ R11, AX
- MOVQ AX, 128(SP)
- XORQ AX, BP
- XORQ R8, R14
- ROLQ $0x38, R14
- NOTQ R13
- MOVQ R13, AX
- ORQ R14, AX
- XORQ R12, AX
- MOVQ AX, 136(SP)
- ORQ R10, R11
- XORQ R14, R11
- MOVQ R11, 152(SP)
- ANDQ R10, R14
- XORQ R13, R14
- MOVQ R14, 144(SP)
- XORQ R11, R15
-
- // Result s
- MOVQ 16(DI), R10
- MOVQ 64(DI), R11
- MOVQ 112(DI), R12
- XORQ DX, R10
- MOVQ 120(DI), R13
- ROLQ $0x3e, R10
- XORQ R8, R11
- MOVQ 168(DI), R14
- ROLQ $0x37, R11
- XORQ R9, R12
- MOVQ R10, R9
- XORQ CX, R14
- ROLQ $0x02, R14
- ANDQ R11, R9
- XORQ R14, R9
- MOVQ R9, 192(SP)
- ROLQ $0x27, R12
- XORQ R9, R15
- NOTQ R11
- XORQ BX, R13
- MOVQ R11, BX
- ANDQ R12, BX
- XORQ R10, BX
- MOVQ BX, 160(SP)
- XORQ BX, SI
- ROLQ $0x29, R13
- MOVQ R12, CX
- ORQ R13, CX
- XORQ R11, CX
- MOVQ CX, 168(SP)
- XORQ CX, BP
- MOVQ R13, DX
- MOVQ R14, R8
- ANDQ R14, DX
- ORQ R10, R8
- XORQ R12, DX
- XORQ R13, R8
- MOVQ DX, 176(SP)
- MOVQ R8, 184(SP)
-
- // Prepare round
- MOVQ BP, BX
- ROLQ $0x01, BX
- MOVQ 16(SP), R12
- XORQ 56(SP), DX
- XORQ R15, BX
- XORQ 96(SP), R12
- XORQ 136(SP), DX
- XORQ DX, R12
- MOVQ R12, CX
- ROLQ $0x01, CX
- MOVQ 24(SP), R13
- XORQ 64(SP), R8
- XORQ SI, CX
- XORQ 104(SP), R13
- XORQ 144(SP), R8
- XORQ R8, R13
- MOVQ R13, DX
- ROLQ $0x01, DX
- MOVQ R15, R8
- XORQ BP, DX
- ROLQ $0x01, R8
- MOVQ SI, R9
- XORQ R12, R8
- ROLQ $0x01, R9
-
- // Result b
- MOVQ (SP), R10
- MOVQ 48(SP), R11
- XORQ R13, R9
- MOVQ 96(SP), R12
- MOVQ 144(SP), R13
- MOVQ 192(SP), R14
- XORQ CX, R11
- ROLQ $0x2c, R11
- XORQ DX, R12
- XORQ BX, R10
- ROLQ $0x2b, R12
- MOVQ R11, SI
- MOVQ $0x000000008000000a, AX
- ORQ R12, SI
- XORQ R10, AX
- XORQ AX, SI
- MOVQ SI, (DI)
- XORQ R9, R14
- ROLQ $0x0e, R14
- MOVQ R10, R15
- ANDQ R11, R15
- XORQ R14, R15
- MOVQ R15, 32(DI)
- XORQ R8, R13
- ROLQ $0x15, R13
- MOVQ R13, AX
- ANDQ R14, AX
- XORQ R12, AX
- MOVQ AX, 16(DI)
- NOTQ R12
- ORQ R10, R14
- ORQ R13, R12
- XORQ R13, R14
- XORQ R11, R12
- MOVQ R14, 24(DI)
- MOVQ R12, 8(DI)
- MOVQ R12, BP
-
- // Result g
- MOVQ 72(SP), R11
- XORQ R9, R11
- MOVQ 80(SP), R12
- ROLQ $0x14, R11
- XORQ BX, R12
- ROLQ $0x03, R12
- MOVQ 24(SP), R10
- MOVQ R11, AX
- ORQ R12, AX
- XORQ R8, R10
- MOVQ 128(SP), R13
- MOVQ 176(SP), R14
- ROLQ $0x1c, R10
- XORQ R10, AX
- MOVQ AX, 40(DI)
- XORQ AX, SI
- XORQ CX, R13
- ROLQ $0x2d, R13
- MOVQ R12, AX
- ANDQ R13, AX
- XORQ R11, AX
- MOVQ AX, 48(DI)
- XORQ AX, BP
- XORQ DX, R14
- ROLQ $0x3d, R14
- MOVQ R14, AX
- ORQ R10, AX
- XORQ R13, AX
- MOVQ AX, 64(DI)
- ANDQ R11, R10
- XORQ R14, R10
- MOVQ R10, 72(DI)
- NOTQ R14
- XORQ R10, R15
- ORQ R14, R13
- XORQ R12, R13
- MOVQ R13, 56(DI)
-
- // Result k
- MOVQ 8(SP), R10
- MOVQ 56(SP), R11
- MOVQ 104(SP), R12
- MOVQ 152(SP), R13
- MOVQ 160(SP), R14
- XORQ DX, R11
- ROLQ $0x06, R11
- XORQ R8, R12
- ROLQ $0x19, R12
- MOVQ R11, AX
- ORQ R12, AX
- XORQ CX, R10
- ROLQ $0x01, R10
- XORQ R10, AX
- MOVQ AX, 80(DI)
- XORQ AX, SI
- XORQ R9, R13
- ROLQ $0x08, R13
- MOVQ R12, AX
- ANDQ R13, AX
- XORQ R11, AX
- MOVQ AX, 88(DI)
- XORQ AX, BP
- XORQ BX, R14
- ROLQ $0x12, R14
- NOTQ R13
- MOVQ R13, AX
- ANDQ R14, AX
- XORQ R12, AX
- MOVQ AX, 96(DI)
- MOVQ R14, AX
- ORQ R10, AX
- XORQ R13, AX
- MOVQ AX, 104(DI)
- ANDQ R11, R10
- XORQ R14, R10
- MOVQ R10, 112(DI)
- XORQ R10, R15
-
- // Result m
- MOVQ 40(SP), R11
- XORQ BX, R11
- MOVQ 88(SP), R12
- ROLQ $0x24, R11
- XORQ CX, R12
- MOVQ 32(SP), R10
- ROLQ $0x0a, R12
- MOVQ R11, AX
- MOVQ 136(SP), R13
- ANDQ R12, AX
- XORQ R9, R10
- MOVQ 184(SP), R14
- ROLQ $0x1b, R10
- XORQ R10, AX
- MOVQ AX, 120(DI)
- XORQ AX, SI
- XORQ DX, R13
- ROLQ $0x0f, R13
- MOVQ R12, AX
- ORQ R13, AX
- XORQ R11, AX
- MOVQ AX, 128(DI)
- XORQ AX, BP
- XORQ R8, R14
- ROLQ $0x38, R14
- NOTQ R13
- MOVQ R13, AX
- ORQ R14, AX
- XORQ R12, AX
- MOVQ AX, 136(DI)
- ORQ R10, R11
- XORQ R14, R11
- MOVQ R11, 152(DI)
- ANDQ R10, R14
- XORQ R13, R14
- MOVQ R14, 144(DI)
- XORQ R11, R15
-
- // Result s
- MOVQ 16(SP), R10
- MOVQ 64(SP), R11
- MOVQ 112(SP), R12
- XORQ DX, R10
- MOVQ 120(SP), R13
- ROLQ $0x3e, R10
- XORQ R8, R11
- MOVQ 168(SP), R14
- ROLQ $0x37, R11
- XORQ R9, R12
- MOVQ R10, R9
- XORQ CX, R14
- ROLQ $0x02, R14
- ANDQ R11, R9
- XORQ R14, R9
- MOVQ R9, 192(DI)
- ROLQ $0x27, R12
- XORQ R9, R15
- NOTQ R11
- XORQ BX, R13
- MOVQ R11, BX
- ANDQ R12, BX
- XORQ R10, BX
- MOVQ BX, 160(DI)
- XORQ BX, SI
- ROLQ $0x29, R13
- MOVQ R12, CX
- ORQ R13, CX
- XORQ R11, CX
- MOVQ CX, 168(DI)
- XORQ CX, BP
- MOVQ R13, DX
- MOVQ R14, R8
- ANDQ R14, DX
- ORQ R10, R8
- XORQ R12, DX
- XORQ R13, R8
- MOVQ DX, 176(DI)
- MOVQ R8, 184(DI)
-
- // Prepare round
- MOVQ BP, BX
- ROLQ $0x01, BX
- MOVQ 16(DI), R12
- XORQ 56(DI), DX
- XORQ R15, BX
- XORQ 96(DI), R12
- XORQ 136(DI), DX
- XORQ DX, R12
- MOVQ R12, CX
- ROLQ $0x01, CX
- MOVQ 24(DI), R13
- XORQ 64(DI), R8
- XORQ SI, CX
- XORQ 104(DI), R13
- XORQ 144(DI), R8
- XORQ R8, R13
- MOVQ R13, DX
- ROLQ $0x01, DX
- MOVQ R15, R8
- XORQ BP, DX
- ROLQ $0x01, R8
- MOVQ SI, R9
- XORQ R12, R8
- ROLQ $0x01, R9
-
- // Result b
- MOVQ (DI), R10
- MOVQ 48(DI), R11
- XORQ R13, R9
- MOVQ 96(DI), R12
- MOVQ 144(DI), R13
- MOVQ 192(DI), R14
- XORQ CX, R11
- ROLQ $0x2c, R11
- XORQ DX, R12
- XORQ BX, R10
- ROLQ $0x2b, R12
- MOVQ R11, SI
- MOVQ $0x000000008000808b, AX
- ORQ R12, SI
- XORQ R10, AX
- XORQ AX, SI
- MOVQ SI, (SP)
- XORQ R9, R14
- ROLQ $0x0e, R14
- MOVQ R10, R15
- ANDQ R11, R15
- XORQ R14, R15
- MOVQ R15, 32(SP)
- XORQ R8, R13
- ROLQ $0x15, R13
- MOVQ R13, AX
- ANDQ R14, AX
- XORQ R12, AX
- MOVQ AX, 16(SP)
- NOTQ R12
- ORQ R10, R14
- ORQ R13, R12
- XORQ R13, R14
- XORQ R11, R12
- MOVQ R14, 24(SP)
- MOVQ R12, 8(SP)
- MOVQ R12, BP
-
- // Result g
- MOVQ 72(DI), R11
- XORQ R9, R11
- MOVQ 80(DI), R12
- ROLQ $0x14, R11
- XORQ BX, R12
- ROLQ $0x03, R12
- MOVQ 24(DI), R10
- MOVQ R11, AX
- ORQ R12, AX
- XORQ R8, R10
- MOVQ 128(DI), R13
- MOVQ 176(DI), R14
- ROLQ $0x1c, R10
- XORQ R10, AX
- MOVQ AX, 40(SP)
- XORQ AX, SI
- XORQ CX, R13
- ROLQ $0x2d, R13
- MOVQ R12, AX
- ANDQ R13, AX
- XORQ R11, AX
- MOVQ AX, 48(SP)
- XORQ AX, BP
- XORQ DX, R14
- ROLQ $0x3d, R14
- MOVQ R14, AX
- ORQ R10, AX
- XORQ R13, AX
- MOVQ AX, 64(SP)
- ANDQ R11, R10
- XORQ R14, R10
- MOVQ R10, 72(SP)
- NOTQ R14
- XORQ R10, R15
- ORQ R14, R13
- XORQ R12, R13
- MOVQ R13, 56(SP)
-
- // Result k
- MOVQ 8(DI), R10
- MOVQ 56(DI), R11
- MOVQ 104(DI), R12
- MOVQ 152(DI), R13
- MOVQ 160(DI), R14
- XORQ DX, R11
- ROLQ $0x06, R11
- XORQ R8, R12
- ROLQ $0x19, R12
- MOVQ R11, AX
- ORQ R12, AX
- XORQ CX, R10
- ROLQ $0x01, R10
- XORQ R10, AX
- MOVQ AX, 80(SP)
- XORQ AX, SI
- XORQ R9, R13
- ROLQ $0x08, R13
- MOVQ R12, AX
- ANDQ R13, AX
- XORQ R11, AX
- MOVQ AX, 88(SP)
- XORQ AX, BP
- XORQ BX, R14
- ROLQ $0x12, R14
- NOTQ R13
- MOVQ R13, AX
- ANDQ R14, AX
- XORQ R12, AX
- MOVQ AX, 96(SP)
- MOVQ R14, AX
- ORQ R10, AX
- XORQ R13, AX
- MOVQ AX, 104(SP)
- ANDQ R11, R10
- XORQ R14, R10
- MOVQ R10, 112(SP)
- XORQ R10, R15
-
- // Result m
- MOVQ 40(DI), R11
- XORQ BX, R11
- MOVQ 88(DI), R12
- ROLQ $0x24, R11
- XORQ CX, R12
- MOVQ 32(DI), R10
- ROLQ $0x0a, R12
- MOVQ R11, AX
- MOVQ 136(DI), R13
- ANDQ R12, AX
- XORQ R9, R10
- MOVQ 184(DI), R14
- ROLQ $0x1b, R10
- XORQ R10, AX
- MOVQ AX, 120(SP)
- XORQ AX, SI
- XORQ DX, R13
- ROLQ $0x0f, R13
- MOVQ R12, AX
- ORQ R13, AX
- XORQ R11, AX
- MOVQ AX, 128(SP)
- XORQ AX, BP
- XORQ R8, R14
- ROLQ $0x38, R14
- NOTQ R13
- MOVQ R13, AX
- ORQ R14, AX
- XORQ R12, AX
- MOVQ AX, 136(SP)
- ORQ R10, R11
- XORQ R14, R11
- MOVQ R11, 152(SP)
- ANDQ R10, R14
- XORQ R13, R14
- MOVQ R14, 144(SP)
- XORQ R11, R15
-
- // Result s
- MOVQ 16(DI), R10
- MOVQ 64(DI), R11
- MOVQ 112(DI), R12
- XORQ DX, R10
- MOVQ 120(DI), R13
- ROLQ $0x3e, R10
- XORQ R8, R11
- MOVQ 168(DI), R14
- ROLQ $0x37, R11
- XORQ R9, R12
- MOVQ R10, R9
- XORQ CX, R14
- ROLQ $0x02, R14
- ANDQ R11, R9
- XORQ R14, R9
- MOVQ R9, 192(SP)
- ROLQ $0x27, R12
- XORQ R9, R15
- NOTQ R11
- XORQ BX, R13
- MOVQ R11, BX
- ANDQ R12, BX
- XORQ R10, BX
- MOVQ BX, 160(SP)
- XORQ BX, SI
- ROLQ $0x29, R13
- MOVQ R12, CX
- ORQ R13, CX
- XORQ R11, CX
- MOVQ CX, 168(SP)
- XORQ CX, BP
- MOVQ R13, DX
- MOVQ R14, R8
- ANDQ R14, DX
- ORQ R10, R8
- XORQ R12, DX
- XORQ R13, R8
- MOVQ DX, 176(SP)
- MOVQ R8, 184(SP)
-
- // Prepare round
- MOVQ BP, BX
- ROLQ $0x01, BX
- MOVQ 16(SP), R12
- XORQ 56(SP), DX
- XORQ R15, BX
- XORQ 96(SP), R12
- XORQ 136(SP), DX
- XORQ DX, R12
- MOVQ R12, CX
- ROLQ $0x01, CX
- MOVQ 24(SP), R13
- XORQ 64(SP), R8
- XORQ SI, CX
- XORQ 104(SP), R13
- XORQ 144(SP), R8
- XORQ R8, R13
- MOVQ R13, DX
- ROLQ $0x01, DX
- MOVQ R15, R8
- XORQ BP, DX
- ROLQ $0x01, R8
- MOVQ SI, R9
- XORQ R12, R8
- ROLQ $0x01, R9
-
- // Result b
- MOVQ (SP), R10
- MOVQ 48(SP), R11
- XORQ R13, R9
- MOVQ 96(SP), R12
- MOVQ 144(SP), R13
- MOVQ 192(SP), R14
- XORQ CX, R11
- ROLQ $0x2c, R11
- XORQ DX, R12
- XORQ BX, R10
- ROLQ $0x2b, R12
- MOVQ R11, SI
- MOVQ $0x800000000000008b, AX
- ORQ R12, SI
- XORQ R10, AX
- XORQ AX, SI
- MOVQ SI, (DI)
- XORQ R9, R14
- ROLQ $0x0e, R14
- MOVQ R10, R15
- ANDQ R11, R15
- XORQ R14, R15
- MOVQ R15, 32(DI)
- XORQ R8, R13
- ROLQ $0x15, R13
- MOVQ R13, AX
- ANDQ R14, AX
- XORQ R12, AX
- MOVQ AX, 16(DI)
- NOTQ R12
- ORQ R10, R14
- ORQ R13, R12
- XORQ R13, R14
- XORQ R11, R12
- MOVQ R14, 24(DI)
- MOVQ R12, 8(DI)
- MOVQ R12, BP
-
- // Result g
- MOVQ 72(SP), R11
- XORQ R9, R11
- MOVQ 80(SP), R12
- ROLQ $0x14, R11
- XORQ BX, R12
- ROLQ $0x03, R12
- MOVQ 24(SP), R10
- MOVQ R11, AX
- ORQ R12, AX
- XORQ R8, R10
- MOVQ 128(SP), R13
- MOVQ 176(SP), R14
- ROLQ $0x1c, R10
- XORQ R10, AX
- MOVQ AX, 40(DI)
- XORQ AX, SI
- XORQ CX, R13
- ROLQ $0x2d, R13
- MOVQ R12, AX
- ANDQ R13, AX
- XORQ R11, AX
- MOVQ AX, 48(DI)
- XORQ AX, BP
- XORQ DX, R14
- ROLQ $0x3d, R14
- MOVQ R14, AX
- ORQ R10, AX
- XORQ R13, AX
- MOVQ AX, 64(DI)
- ANDQ R11, R10
- XORQ R14, R10
- MOVQ R10, 72(DI)
- NOTQ R14
- XORQ R10, R15
- ORQ R14, R13
- XORQ R12, R13
- MOVQ R13, 56(DI)
-
- // Result k
- MOVQ 8(SP), R10
- MOVQ 56(SP), R11
- MOVQ 104(SP), R12
- MOVQ 152(SP), R13
- MOVQ 160(SP), R14
- XORQ DX, R11
- ROLQ $0x06, R11
- XORQ R8, R12
- ROLQ $0x19, R12
- MOVQ R11, AX
- ORQ R12, AX
- XORQ CX, R10
- ROLQ $0x01, R10
- XORQ R10, AX
- MOVQ AX, 80(DI)
- XORQ AX, SI
- XORQ R9, R13
- ROLQ $0x08, R13
- MOVQ R12, AX
- ANDQ R13, AX
- XORQ R11, AX
- MOVQ AX, 88(DI)
- XORQ AX, BP
- XORQ BX, R14
- ROLQ $0x12, R14
- NOTQ R13
- MOVQ R13, AX
- ANDQ R14, AX
- XORQ R12, AX
- MOVQ AX, 96(DI)
- MOVQ R14, AX
- ORQ R10, AX
- XORQ R13, AX
- MOVQ AX, 104(DI)
- ANDQ R11, R10
- XORQ R14, R10
- MOVQ R10, 112(DI)
- XORQ R10, R15
-
- // Result m
- MOVQ 40(SP), R11
- XORQ BX, R11
- MOVQ 88(SP), R12
- ROLQ $0x24, R11
- XORQ CX, R12
- MOVQ 32(SP), R10
- ROLQ $0x0a, R12
- MOVQ R11, AX
- MOVQ 136(SP), R13
- ANDQ R12, AX
- XORQ R9, R10
- MOVQ 184(SP), R14
- ROLQ $0x1b, R10
- XORQ R10, AX
- MOVQ AX, 120(DI)
- XORQ AX, SI
- XORQ DX, R13
- ROLQ $0x0f, R13
- MOVQ R12, AX
- ORQ R13, AX
- XORQ R11, AX
- MOVQ AX, 128(DI)
- XORQ AX, BP
- XORQ R8, R14
- ROLQ $0x38, R14
- NOTQ R13
- MOVQ R13, AX
- ORQ R14, AX
- XORQ R12, AX
- MOVQ AX, 136(DI)
- ORQ R10, R11
- XORQ R14, R11
- MOVQ R11, 152(DI)
- ANDQ R10, R14
- XORQ R13, R14
- MOVQ R14, 144(DI)
- XORQ R11, R15
-
- // Result s
- MOVQ 16(SP), R10
- MOVQ 64(SP), R11
- MOVQ 112(SP), R12
- XORQ DX, R10
- MOVQ 120(SP), R13
- ROLQ $0x3e, R10
- XORQ R8, R11
- MOVQ 168(SP), R14
- ROLQ $0x37, R11
- XORQ R9, R12
- MOVQ R10, R9
- XORQ CX, R14
- ROLQ $0x02, R14
- ANDQ R11, R9
- XORQ R14, R9
- MOVQ R9, 192(DI)
- ROLQ $0x27, R12
- XORQ R9, R15
- NOTQ R11
- XORQ BX, R13
- MOVQ R11, BX
- ANDQ R12, BX
- XORQ R10, BX
- MOVQ BX, 160(DI)
- XORQ BX, SI
- ROLQ $0x29, R13
- MOVQ R12, CX
- ORQ R13, CX
- XORQ R11, CX
- MOVQ CX, 168(DI)
- XORQ CX, BP
- MOVQ R13, DX
- MOVQ R14, R8
- ANDQ R14, DX
- ORQ R10, R8
- XORQ R12, DX
- XORQ R13, R8
- MOVQ DX, 176(DI)
- MOVQ R8, 184(DI)
-
- // Prepare round
- MOVQ BP, BX
- ROLQ $0x01, BX
- MOVQ 16(DI), R12
- XORQ 56(DI), DX
- XORQ R15, BX
- XORQ 96(DI), R12
- XORQ 136(DI), DX
- XORQ DX, R12
- MOVQ R12, CX
- ROLQ $0x01, CX
- MOVQ 24(DI), R13
- XORQ 64(DI), R8
- XORQ SI, CX
- XORQ 104(DI), R13
- XORQ 144(DI), R8
- XORQ R8, R13
- MOVQ R13, DX
- ROLQ $0x01, DX
- MOVQ R15, R8
- XORQ BP, DX
- ROLQ $0x01, R8
- MOVQ SI, R9
- XORQ R12, R8
- ROLQ $0x01, R9
-
- // Result b
- MOVQ (DI), R10
- MOVQ 48(DI), R11
- XORQ R13, R9
- MOVQ 96(DI), R12
- MOVQ 144(DI), R13
- MOVQ 192(DI), R14
- XORQ CX, R11
- ROLQ $0x2c, R11
- XORQ DX, R12
- XORQ BX, R10
- ROLQ $0x2b, R12
- MOVQ R11, SI
- MOVQ $0x8000000000008089, AX
- ORQ R12, SI
- XORQ R10, AX
- XORQ AX, SI
- MOVQ SI, (SP)
- XORQ R9, R14
- ROLQ $0x0e, R14
- MOVQ R10, R15
- ANDQ R11, R15
- XORQ R14, R15
- MOVQ R15, 32(SP)
- XORQ R8, R13
- ROLQ $0x15, R13
- MOVQ R13, AX
- ANDQ R14, AX
- XORQ R12, AX
- MOVQ AX, 16(SP)
- NOTQ R12
- ORQ R10, R14
- ORQ R13, R12
- XORQ R13, R14
- XORQ R11, R12
- MOVQ R14, 24(SP)
- MOVQ R12, 8(SP)
- MOVQ R12, BP
-
- // Result g
- MOVQ 72(DI), R11
- XORQ R9, R11
- MOVQ 80(DI), R12
- ROLQ $0x14, R11
- XORQ BX, R12
- ROLQ $0x03, R12
- MOVQ 24(DI), R10
- MOVQ R11, AX
- ORQ R12, AX
- XORQ R8, R10
- MOVQ 128(DI), R13
- MOVQ 176(DI), R14
- ROLQ $0x1c, R10
- XORQ R10, AX
- MOVQ AX, 40(SP)
- XORQ AX, SI
- XORQ CX, R13
- ROLQ $0x2d, R13
- MOVQ R12, AX
- ANDQ R13, AX
- XORQ R11, AX
- MOVQ AX, 48(SP)
- XORQ AX, BP
- XORQ DX, R14
- ROLQ $0x3d, R14
- MOVQ R14, AX
- ORQ R10, AX
- XORQ R13, AX
- MOVQ AX, 64(SP)
- ANDQ R11, R10
- XORQ R14, R10
- MOVQ R10, 72(SP)
- NOTQ R14
- XORQ R10, R15
- ORQ R14, R13
- XORQ R12, R13
- MOVQ R13, 56(SP)
-
- // Result k
- MOVQ 8(DI), R10
- MOVQ 56(DI), R11
- MOVQ 104(DI), R12
- MOVQ 152(DI), R13
- MOVQ 160(DI), R14
- XORQ DX, R11
- ROLQ $0x06, R11
- XORQ R8, R12
- ROLQ $0x19, R12
- MOVQ R11, AX
- ORQ R12, AX
- XORQ CX, R10
- ROLQ $0x01, R10
- XORQ R10, AX
- MOVQ AX, 80(SP)
- XORQ AX, SI
- XORQ R9, R13
- ROLQ $0x08, R13
- MOVQ R12, AX
- ANDQ R13, AX
- XORQ R11, AX
- MOVQ AX, 88(SP)
- XORQ AX, BP
- XORQ BX, R14
- ROLQ $0x12, R14
- NOTQ R13
- MOVQ R13, AX
- ANDQ R14, AX
- XORQ R12, AX
- MOVQ AX, 96(SP)
- MOVQ R14, AX
- ORQ R10, AX
- XORQ R13, AX
- MOVQ AX, 104(SP)
- ANDQ R11, R10
- XORQ R14, R10
- MOVQ R10, 112(SP)
- XORQ R10, R15
-
- // Result m
- MOVQ 40(DI), R11
- XORQ BX, R11
- MOVQ 88(DI), R12
- ROLQ $0x24, R11
- XORQ CX, R12
- MOVQ 32(DI), R10
- ROLQ $0x0a, R12
- MOVQ R11, AX
- MOVQ 136(DI), R13
- ANDQ R12, AX
- XORQ R9, R10
- MOVQ 184(DI), R14
- ROLQ $0x1b, R10
- XORQ R10, AX
- MOVQ AX, 120(SP)
- XORQ AX, SI
- XORQ DX, R13
- ROLQ $0x0f, R13
- MOVQ R12, AX
- ORQ R13, AX
- XORQ R11, AX
- MOVQ AX, 128(SP)
- XORQ AX, BP
- XORQ R8, R14
- ROLQ $0x38, R14
- NOTQ R13
- MOVQ R13, AX
- ORQ R14, AX
- XORQ R12, AX
- MOVQ AX, 136(SP)
- ORQ R10, R11
- XORQ R14, R11
- MOVQ R11, 152(SP)
- ANDQ R10, R14
- XORQ R13, R14
- MOVQ R14, 144(SP)
- XORQ R11, R15
-
- // Result s
- MOVQ 16(DI), R10
- MOVQ 64(DI), R11
- MOVQ 112(DI), R12
- XORQ DX, R10
- MOVQ 120(DI), R13
- ROLQ $0x3e, R10
- XORQ R8, R11
- MOVQ 168(DI), R14
- ROLQ $0x37, R11
- XORQ R9, R12
- MOVQ R10, R9
- XORQ CX, R14
- ROLQ $0x02, R14
- ANDQ R11, R9
- XORQ R14, R9
- MOVQ R9, 192(SP)
- ROLQ $0x27, R12
- XORQ R9, R15
- NOTQ R11
- XORQ BX, R13
- MOVQ R11, BX
- ANDQ R12, BX
- XORQ R10, BX
- MOVQ BX, 160(SP)
- XORQ BX, SI
- ROLQ $0x29, R13
- MOVQ R12, CX
- ORQ R13, CX
- XORQ R11, CX
- MOVQ CX, 168(SP)
- XORQ CX, BP
- MOVQ R13, DX
- MOVQ R14, R8
- ANDQ R14, DX
- ORQ R10, R8
- XORQ R12, DX
- XORQ R13, R8
- MOVQ DX, 176(SP)
- MOVQ R8, 184(SP)
-
- // Prepare round
- MOVQ BP, BX
- ROLQ $0x01, BX
- MOVQ 16(SP), R12
- XORQ 56(SP), DX
- XORQ R15, BX
- XORQ 96(SP), R12
- XORQ 136(SP), DX
- XORQ DX, R12
- MOVQ R12, CX
- ROLQ $0x01, CX
- MOVQ 24(SP), R13
- XORQ 64(SP), R8
- XORQ SI, CX
- XORQ 104(SP), R13
- XORQ 144(SP), R8
- XORQ R8, R13
- MOVQ R13, DX
- ROLQ $0x01, DX
- MOVQ R15, R8
- XORQ BP, DX
- ROLQ $0x01, R8
- MOVQ SI, R9
- XORQ R12, R8
- ROLQ $0x01, R9
-
- // Result b
- MOVQ (SP), R10
- MOVQ 48(SP), R11
- XORQ R13, R9
- MOVQ 96(SP), R12
- MOVQ 144(SP), R13
- MOVQ 192(SP), R14
- XORQ CX, R11
- ROLQ $0x2c, R11
- XORQ DX, R12
- XORQ BX, R10
- ROLQ $0x2b, R12
- MOVQ R11, SI
- MOVQ $0x8000000000008003, AX
- ORQ R12, SI
- XORQ R10, AX
- XORQ AX, SI
- MOVQ SI, (DI)
- XORQ R9, R14
- ROLQ $0x0e, R14
- MOVQ R10, R15
- ANDQ R11, R15
- XORQ R14, R15
- MOVQ R15, 32(DI)
- XORQ R8, R13
- ROLQ $0x15, R13
- MOVQ R13, AX
- ANDQ R14, AX
- XORQ R12, AX
- MOVQ AX, 16(DI)
- NOTQ R12
- ORQ R10, R14
- ORQ R13, R12
- XORQ R13, R14
- XORQ R11, R12
- MOVQ R14, 24(DI)
- MOVQ R12, 8(DI)
- MOVQ R12, BP
-
- // Result g
- MOVQ 72(SP), R11
- XORQ R9, R11
- MOVQ 80(SP), R12
- ROLQ $0x14, R11
- XORQ BX, R12
- ROLQ $0x03, R12
- MOVQ 24(SP), R10
- MOVQ R11, AX
- ORQ R12, AX
- XORQ R8, R10
- MOVQ 128(SP), R13
- MOVQ 176(SP), R14
- ROLQ $0x1c, R10
- XORQ R10, AX
- MOVQ AX, 40(DI)
- XORQ AX, SI
- XORQ CX, R13
- ROLQ $0x2d, R13
- MOVQ R12, AX
- ANDQ R13, AX
- XORQ R11, AX
- MOVQ AX, 48(DI)
- XORQ AX, BP
- XORQ DX, R14
- ROLQ $0x3d, R14
- MOVQ R14, AX
- ORQ R10, AX
- XORQ R13, AX
- MOVQ AX, 64(DI)
- ANDQ R11, R10
- XORQ R14, R10
- MOVQ R10, 72(DI)
- NOTQ R14
- XORQ R10, R15
- ORQ R14, R13
- XORQ R12, R13
- MOVQ R13, 56(DI)
-
- // Result k
- MOVQ 8(SP), R10
- MOVQ 56(SP), R11
- MOVQ 104(SP), R12
- MOVQ 152(SP), R13
- MOVQ 160(SP), R14
- XORQ DX, R11
- ROLQ $0x06, R11
- XORQ R8, R12
- ROLQ $0x19, R12
- MOVQ R11, AX
- ORQ R12, AX
- XORQ CX, R10
- ROLQ $0x01, R10
- XORQ R10, AX
- MOVQ AX, 80(DI)
- XORQ AX, SI
- XORQ R9, R13
- ROLQ $0x08, R13
- MOVQ R12, AX
- ANDQ R13, AX
- XORQ R11, AX
- MOVQ AX, 88(DI)
- XORQ AX, BP
- XORQ BX, R14
- ROLQ $0x12, R14
- NOTQ R13
- MOVQ R13, AX
- ANDQ R14, AX
- XORQ R12, AX
- MOVQ AX, 96(DI)
- MOVQ R14, AX
- ORQ R10, AX
- XORQ R13, AX
- MOVQ AX, 104(DI)
- ANDQ R11, R10
- XORQ R14, R10
- MOVQ R10, 112(DI)
- XORQ R10, R15
-
- // Result m
- MOVQ 40(SP), R11
- XORQ BX, R11
- MOVQ 88(SP), R12
- ROLQ $0x24, R11
- XORQ CX, R12
- MOVQ 32(SP), R10
- ROLQ $0x0a, R12
- MOVQ R11, AX
- MOVQ 136(SP), R13
- ANDQ R12, AX
- XORQ R9, R10
- MOVQ 184(SP), R14
- ROLQ $0x1b, R10
- XORQ R10, AX
- MOVQ AX, 120(DI)
- XORQ AX, SI
- XORQ DX, R13
- ROLQ $0x0f, R13
- MOVQ R12, AX
- ORQ R13, AX
- XORQ R11, AX
- MOVQ AX, 128(DI)
- XORQ AX, BP
- XORQ R8, R14
- ROLQ $0x38, R14
- NOTQ R13
- MOVQ R13, AX
- ORQ R14, AX
- XORQ R12, AX
- MOVQ AX, 136(DI)
- ORQ R10, R11
- XORQ R14, R11
- MOVQ R11, 152(DI)
- ANDQ R10, R14
- XORQ R13, R14
- MOVQ R14, 144(DI)
- XORQ R11, R15
-
- // Result s
- MOVQ 16(SP), R10
- MOVQ 64(SP), R11
- MOVQ 112(SP), R12
- XORQ DX, R10
- MOVQ 120(SP), R13
- ROLQ $0x3e, R10
- XORQ R8, R11
- MOVQ 168(SP), R14
- ROLQ $0x37, R11
- XORQ R9, R12
- MOVQ R10, R9
- XORQ CX, R14
- ROLQ $0x02, R14
- ANDQ R11, R9
- XORQ R14, R9
- MOVQ R9, 192(DI)
- ROLQ $0x27, R12
- XORQ R9, R15
- NOTQ R11
- XORQ BX, R13
- MOVQ R11, BX
- ANDQ R12, BX
- XORQ R10, BX
- MOVQ BX, 160(DI)
- XORQ BX, SI
- ROLQ $0x29, R13
- MOVQ R12, CX
- ORQ R13, CX
- XORQ R11, CX
- MOVQ CX, 168(DI)
- XORQ CX, BP
- MOVQ R13, DX
- MOVQ R14, R8
- ANDQ R14, DX
- ORQ R10, R8
- XORQ R12, DX
- XORQ R13, R8
- MOVQ DX, 176(DI)
- MOVQ R8, 184(DI)
-
- // Prepare round
- MOVQ BP, BX
- ROLQ $0x01, BX
- MOVQ 16(DI), R12
- XORQ 56(DI), DX
- XORQ R15, BX
- XORQ 96(DI), R12
- XORQ 136(DI), DX
- XORQ DX, R12
- MOVQ R12, CX
- ROLQ $0x01, CX
- MOVQ 24(DI), R13
- XORQ 64(DI), R8
- XORQ SI, CX
- XORQ 104(DI), R13
- XORQ 144(DI), R8
- XORQ R8, R13
- MOVQ R13, DX
- ROLQ $0x01, DX
- MOVQ R15, R8
- XORQ BP, DX
- ROLQ $0x01, R8
- MOVQ SI, R9
- XORQ R12, R8
- ROLQ $0x01, R9
-
- // Result b
- MOVQ (DI), R10
- MOVQ 48(DI), R11
- XORQ R13, R9
- MOVQ 96(DI), R12
- MOVQ 144(DI), R13
- MOVQ 192(DI), R14
- XORQ CX, R11
- ROLQ $0x2c, R11
- XORQ DX, R12
- XORQ BX, R10
- ROLQ $0x2b, R12
- MOVQ R11, SI
- MOVQ $0x8000000000008002, AX
- ORQ R12, SI
- XORQ R10, AX
- XORQ AX, SI
- MOVQ SI, (SP)
- XORQ R9, R14
- ROLQ $0x0e, R14
- MOVQ R10, R15
- ANDQ R11, R15
- XORQ R14, R15
- MOVQ R15, 32(SP)
- XORQ R8, R13
- ROLQ $0x15, R13
- MOVQ R13, AX
- ANDQ R14, AX
- XORQ R12, AX
- MOVQ AX, 16(SP)
- NOTQ R12
- ORQ R10, R14
- ORQ R13, R12
- XORQ R13, R14
- XORQ R11, R12
- MOVQ R14, 24(SP)
- MOVQ R12, 8(SP)
- MOVQ R12, BP
-
- // Result g
- MOVQ 72(DI), R11
- XORQ R9, R11
- MOVQ 80(DI), R12
- ROLQ $0x14, R11
- XORQ BX, R12
- ROLQ $0x03, R12
- MOVQ 24(DI), R10
- MOVQ R11, AX
- ORQ R12, AX
- XORQ R8, R10
- MOVQ 128(DI), R13
- MOVQ 176(DI), R14
- ROLQ $0x1c, R10
- XORQ R10, AX
- MOVQ AX, 40(SP)
- XORQ AX, SI
- XORQ CX, R13
- ROLQ $0x2d, R13
- MOVQ R12, AX
- ANDQ R13, AX
- XORQ R11, AX
- MOVQ AX, 48(SP)
- XORQ AX, BP
- XORQ DX, R14
- ROLQ $0x3d, R14
- MOVQ R14, AX
- ORQ R10, AX
- XORQ R13, AX
- MOVQ AX, 64(SP)
- ANDQ R11, R10
- XORQ R14, R10
- MOVQ R10, 72(SP)
- NOTQ R14
- XORQ R10, R15
- ORQ R14, R13
- XORQ R12, R13
- MOVQ R13, 56(SP)
-
- // Result k
- MOVQ 8(DI), R10
- MOVQ 56(DI), R11
- MOVQ 104(DI), R12
- MOVQ 152(DI), R13
- MOVQ 160(DI), R14
- XORQ DX, R11
- ROLQ $0x06, R11
- XORQ R8, R12
- ROLQ $0x19, R12
- MOVQ R11, AX
- ORQ R12, AX
- XORQ CX, R10
- ROLQ $0x01, R10
- XORQ R10, AX
- MOVQ AX, 80(SP)
- XORQ AX, SI
- XORQ R9, R13
- ROLQ $0x08, R13
- MOVQ R12, AX
- ANDQ R13, AX
- XORQ R11, AX
- MOVQ AX, 88(SP)
- XORQ AX, BP
- XORQ BX, R14
- ROLQ $0x12, R14
- NOTQ R13
- MOVQ R13, AX
- ANDQ R14, AX
- XORQ R12, AX
- MOVQ AX, 96(SP)
- MOVQ R14, AX
- ORQ R10, AX
- XORQ R13, AX
- MOVQ AX, 104(SP)
- ANDQ R11, R10
- XORQ R14, R10
- MOVQ R10, 112(SP)
- XORQ R10, R15
-
- // Result m
- MOVQ 40(DI), R11
- XORQ BX, R11
- MOVQ 88(DI), R12
- ROLQ $0x24, R11
- XORQ CX, R12
- MOVQ 32(DI), R10
- ROLQ $0x0a, R12
- MOVQ R11, AX
- MOVQ 136(DI), R13
- ANDQ R12, AX
- XORQ R9, R10
- MOVQ 184(DI), R14
- ROLQ $0x1b, R10
- XORQ R10, AX
- MOVQ AX, 120(SP)
- XORQ AX, SI
- XORQ DX, R13
- ROLQ $0x0f, R13
- MOVQ R12, AX
- ORQ R13, AX
- XORQ R11, AX
- MOVQ AX, 128(SP)
- XORQ AX, BP
- XORQ R8, R14
- ROLQ $0x38, R14
- NOTQ R13
- MOVQ R13, AX
- ORQ R14, AX
- XORQ R12, AX
- MOVQ AX, 136(SP)
- ORQ R10, R11
- XORQ R14, R11
- MOVQ R11, 152(SP)
- ANDQ R10, R14
- XORQ R13, R14
- MOVQ R14, 144(SP)
- XORQ R11, R15
-
- // Result s
- MOVQ 16(DI), R10
- MOVQ 64(DI), R11
- MOVQ 112(DI), R12
- XORQ DX, R10
- MOVQ 120(DI), R13
- ROLQ $0x3e, R10
- XORQ R8, R11
- MOVQ 168(DI), R14
- ROLQ $0x37, R11
- XORQ R9, R12
- MOVQ R10, R9
- XORQ CX, R14
- ROLQ $0x02, R14
- ANDQ R11, R9
- XORQ R14, R9
- MOVQ R9, 192(SP)
- ROLQ $0x27, R12
- XORQ R9, R15
- NOTQ R11
- XORQ BX, R13
- MOVQ R11, BX
- ANDQ R12, BX
- XORQ R10, BX
- MOVQ BX, 160(SP)
- XORQ BX, SI
- ROLQ $0x29, R13
- MOVQ R12, CX
- ORQ R13, CX
- XORQ R11, CX
- MOVQ CX, 168(SP)
- XORQ CX, BP
- MOVQ R13, DX
- MOVQ R14, R8
- ANDQ R14, DX
- ORQ R10, R8
- XORQ R12, DX
- XORQ R13, R8
- MOVQ DX, 176(SP)
- MOVQ R8, 184(SP)
-
- // Prepare round
- MOVQ BP, BX
- ROLQ $0x01, BX
- MOVQ 16(SP), R12
- XORQ 56(SP), DX
- XORQ R15, BX
- XORQ 96(SP), R12
- XORQ 136(SP), DX
- XORQ DX, R12
- MOVQ R12, CX
- ROLQ $0x01, CX
- MOVQ 24(SP), R13
- XORQ 64(SP), R8
- XORQ SI, CX
- XORQ 104(SP), R13
- XORQ 144(SP), R8
- XORQ R8, R13
- MOVQ R13, DX
- ROLQ $0x01, DX
- MOVQ R15, R8
- XORQ BP, DX
- ROLQ $0x01, R8
- MOVQ SI, R9
- XORQ R12, R8
- ROLQ $0x01, R9
-
- // Result b
- MOVQ (SP), R10
- MOVQ 48(SP), R11
- XORQ R13, R9
- MOVQ 96(SP), R12
- MOVQ 144(SP), R13
- MOVQ 192(SP), R14
- XORQ CX, R11
- ROLQ $0x2c, R11
- XORQ DX, R12
- XORQ BX, R10
- ROLQ $0x2b, R12
- MOVQ R11, SI
- MOVQ $0x8000000000000080, AX
- ORQ R12, SI
- XORQ R10, AX
- XORQ AX, SI
- MOVQ SI, (DI)
- XORQ R9, R14
- ROLQ $0x0e, R14
- MOVQ R10, R15
- ANDQ R11, R15
- XORQ R14, R15
- MOVQ R15, 32(DI)
- XORQ R8, R13
- ROLQ $0x15, R13
- MOVQ R13, AX
- ANDQ R14, AX
- XORQ R12, AX
- MOVQ AX, 16(DI)
- NOTQ R12
- ORQ R10, R14
- ORQ R13, R12
- XORQ R13, R14
- XORQ R11, R12
- MOVQ R14, 24(DI)
- MOVQ R12, 8(DI)
- MOVQ R12, BP
-
- // Result g
- MOVQ 72(SP), R11
- XORQ R9, R11
- MOVQ 80(SP), R12
- ROLQ $0x14, R11
- XORQ BX, R12
- ROLQ $0x03, R12
- MOVQ 24(SP), R10
- MOVQ R11, AX
- ORQ R12, AX
- XORQ R8, R10
- MOVQ 128(SP), R13
- MOVQ 176(SP), R14
- ROLQ $0x1c, R10
- XORQ R10, AX
- MOVQ AX, 40(DI)
- XORQ AX, SI
- XORQ CX, R13
- ROLQ $0x2d, R13
- MOVQ R12, AX
- ANDQ R13, AX
- XORQ R11, AX
- MOVQ AX, 48(DI)
- XORQ AX, BP
- XORQ DX, R14
- ROLQ $0x3d, R14
- MOVQ R14, AX
- ORQ R10, AX
- XORQ R13, AX
- MOVQ AX, 64(DI)
- ANDQ R11, R10
- XORQ R14, R10
- MOVQ R10, 72(DI)
- NOTQ R14
- XORQ R10, R15
- ORQ R14, R13
- XORQ R12, R13
- MOVQ R13, 56(DI)
-
- // Result k
- MOVQ 8(SP), R10
- MOVQ 56(SP), R11
- MOVQ 104(SP), R12
- MOVQ 152(SP), R13
- MOVQ 160(SP), R14
- XORQ DX, R11
- ROLQ $0x06, R11
- XORQ R8, R12
- ROLQ $0x19, R12
- MOVQ R11, AX
- ORQ R12, AX
- XORQ CX, R10
- ROLQ $0x01, R10
- XORQ R10, AX
- MOVQ AX, 80(DI)
- XORQ AX, SI
- XORQ R9, R13
- ROLQ $0x08, R13
- MOVQ R12, AX
- ANDQ R13, AX
- XORQ R11, AX
- MOVQ AX, 88(DI)
- XORQ AX, BP
- XORQ BX, R14
- ROLQ $0x12, R14
- NOTQ R13
- MOVQ R13, AX
- ANDQ R14, AX
- XORQ R12, AX
- MOVQ AX, 96(DI)
- MOVQ R14, AX
- ORQ R10, AX
- XORQ R13, AX
- MOVQ AX, 104(DI)
- ANDQ R11, R10
- XORQ R14, R10
- MOVQ R10, 112(DI)
- XORQ R10, R15
-
- // Result m
- MOVQ 40(SP), R11
- XORQ BX, R11
- MOVQ 88(SP), R12
- ROLQ $0x24, R11
- XORQ CX, R12
- MOVQ 32(SP), R10
- ROLQ $0x0a, R12
- MOVQ R11, AX
- MOVQ 136(SP), R13
- ANDQ R12, AX
- XORQ R9, R10
- MOVQ 184(SP), R14
- ROLQ $0x1b, R10
- XORQ R10, AX
- MOVQ AX, 120(DI)
- XORQ AX, SI
- XORQ DX, R13
- ROLQ $0x0f, R13
- MOVQ R12, AX
- ORQ R13, AX
- XORQ R11, AX
- MOVQ AX, 128(DI)
- XORQ AX, BP
- XORQ R8, R14
- ROLQ $0x38, R14
- NOTQ R13
- MOVQ R13, AX
- ORQ R14, AX
- XORQ R12, AX
- MOVQ AX, 136(DI)
- ORQ R10, R11
- XORQ R14, R11
- MOVQ R11, 152(DI)
- ANDQ R10, R14
- XORQ R13, R14
- MOVQ R14, 144(DI)
- XORQ R11, R15
-
- // Result s
- MOVQ 16(SP), R10
- MOVQ 64(SP), R11
- MOVQ 112(SP), R12
- XORQ DX, R10
- MOVQ 120(SP), R13
- ROLQ $0x3e, R10
- XORQ R8, R11
- MOVQ 168(SP), R14
- ROLQ $0x37, R11
- XORQ R9, R12
- MOVQ R10, R9
- XORQ CX, R14
- ROLQ $0x02, R14
- ANDQ R11, R9
- XORQ R14, R9
- MOVQ R9, 192(DI)
- ROLQ $0x27, R12
- XORQ R9, R15
- NOTQ R11
- XORQ BX, R13
- MOVQ R11, BX
- ANDQ R12, BX
- XORQ R10, BX
- MOVQ BX, 160(DI)
- XORQ BX, SI
- ROLQ $0x29, R13
- MOVQ R12, CX
- ORQ R13, CX
- XORQ R11, CX
- MOVQ CX, 168(DI)
- XORQ CX, BP
- MOVQ R13, DX
- MOVQ R14, R8
- ANDQ R14, DX
- ORQ R10, R8
- XORQ R12, DX
- XORQ R13, R8
- MOVQ DX, 176(DI)
- MOVQ R8, 184(DI)
-
- // Prepare round
- MOVQ BP, BX
- ROLQ $0x01, BX
- MOVQ 16(DI), R12
- XORQ 56(DI), DX
- XORQ R15, BX
- XORQ 96(DI), R12
- XORQ 136(DI), DX
- XORQ DX, R12
- MOVQ R12, CX
- ROLQ $0x01, CX
- MOVQ 24(DI), R13
- XORQ 64(DI), R8
- XORQ SI, CX
- XORQ 104(DI), R13
- XORQ 144(DI), R8
- XORQ R8, R13
- MOVQ R13, DX
- ROLQ $0x01, DX
- MOVQ R15, R8
- XORQ BP, DX
- ROLQ $0x01, R8
- MOVQ SI, R9
- XORQ R12, R8
- ROLQ $0x01, R9
-
- // Result b
- MOVQ (DI), R10
- MOVQ 48(DI), R11
- XORQ R13, R9
- MOVQ 96(DI), R12
- MOVQ 144(DI), R13
- MOVQ 192(DI), R14
- XORQ CX, R11
- ROLQ $0x2c, R11
- XORQ DX, R12
- XORQ BX, R10
- ROLQ $0x2b, R12
- MOVQ R11, SI
- MOVQ $0x000000000000800a, AX
- ORQ R12, SI
- XORQ R10, AX
- XORQ AX, SI
- MOVQ SI, (SP)
- XORQ R9, R14
- ROLQ $0x0e, R14
- MOVQ R10, R15
- ANDQ R11, R15
- XORQ R14, R15
- MOVQ R15, 32(SP)
- XORQ R8, R13
- ROLQ $0x15, R13
- MOVQ R13, AX
- ANDQ R14, AX
- XORQ R12, AX
- MOVQ AX, 16(SP)
- NOTQ R12
- ORQ R10, R14
- ORQ R13, R12
- XORQ R13, R14
- XORQ R11, R12
- MOVQ R14, 24(SP)
- MOVQ R12, 8(SP)
- MOVQ R12, BP
-
- // Result g
- MOVQ 72(DI), R11
- XORQ R9, R11
- MOVQ 80(DI), R12
- ROLQ $0x14, R11
- XORQ BX, R12
- ROLQ $0x03, R12
- MOVQ 24(DI), R10
- MOVQ R11, AX
- ORQ R12, AX
- XORQ R8, R10
- MOVQ 128(DI), R13
- MOVQ 176(DI), R14
- ROLQ $0x1c, R10
- XORQ R10, AX
- MOVQ AX, 40(SP)
- XORQ AX, SI
- XORQ CX, R13
- ROLQ $0x2d, R13
- MOVQ R12, AX
- ANDQ R13, AX
- XORQ R11, AX
- MOVQ AX, 48(SP)
- XORQ AX, BP
- XORQ DX, R14
- ROLQ $0x3d, R14
- MOVQ R14, AX
- ORQ R10, AX
- XORQ R13, AX
- MOVQ AX, 64(SP)
- ANDQ R11, R10
- XORQ R14, R10
- MOVQ R10, 72(SP)
- NOTQ R14
- XORQ R10, R15
- ORQ R14, R13
- XORQ R12, R13
- MOVQ R13, 56(SP)
-
- // Result k
- MOVQ 8(DI), R10
- MOVQ 56(DI), R11
- MOVQ 104(DI), R12
- MOVQ 152(DI), R13
- MOVQ 160(DI), R14
- XORQ DX, R11
- ROLQ $0x06, R11
- XORQ R8, R12
- ROLQ $0x19, R12
- MOVQ R11, AX
- ORQ R12, AX
- XORQ CX, R10
- ROLQ $0x01, R10
- XORQ R10, AX
- MOVQ AX, 80(SP)
- XORQ AX, SI
- XORQ R9, R13
- ROLQ $0x08, R13
- MOVQ R12, AX
- ANDQ R13, AX
- XORQ R11, AX
- MOVQ AX, 88(SP)
- XORQ AX, BP
- XORQ BX, R14
- ROLQ $0x12, R14
- NOTQ R13
- MOVQ R13, AX
- ANDQ R14, AX
- XORQ R12, AX
- MOVQ AX, 96(SP)
- MOVQ R14, AX
- ORQ R10, AX
- XORQ R13, AX
- MOVQ AX, 104(SP)
- ANDQ R11, R10
- XORQ R14, R10
- MOVQ R10, 112(SP)
- XORQ R10, R15
-
- // Result m
- MOVQ 40(DI), R11
- XORQ BX, R11
- MOVQ 88(DI), R12
- ROLQ $0x24, R11
- XORQ CX, R12
- MOVQ 32(DI), R10
- ROLQ $0x0a, R12
- MOVQ R11, AX
- MOVQ 136(DI), R13
- ANDQ R12, AX
- XORQ R9, R10
- MOVQ 184(DI), R14
- ROLQ $0x1b, R10
- XORQ R10, AX
- MOVQ AX, 120(SP)
- XORQ AX, SI
- XORQ DX, R13
- ROLQ $0x0f, R13
- MOVQ R12, AX
- ORQ R13, AX
- XORQ R11, AX
- MOVQ AX, 128(SP)
- XORQ AX, BP
- XORQ R8, R14
- ROLQ $0x38, R14
- NOTQ R13
- MOVQ R13, AX
- ORQ R14, AX
- XORQ R12, AX
- MOVQ AX, 136(SP)
- ORQ R10, R11
- XORQ R14, R11
- MOVQ R11, 152(SP)
- ANDQ R10, R14
- XORQ R13, R14
- MOVQ R14, 144(SP)
- XORQ R11, R15
-
- // Result s
- MOVQ 16(DI), R10
- MOVQ 64(DI), R11
- MOVQ 112(DI), R12
- XORQ DX, R10
- MOVQ 120(DI), R13
- ROLQ $0x3e, R10
- XORQ R8, R11
- MOVQ 168(DI), R14
- ROLQ $0x37, R11
- XORQ R9, R12
- MOVQ R10, R9
- XORQ CX, R14
- ROLQ $0x02, R14
- ANDQ R11, R9
- XORQ R14, R9
- MOVQ R9, 192(SP)
- ROLQ $0x27, R12
- XORQ R9, R15
- NOTQ R11
- XORQ BX, R13
- MOVQ R11, BX
- ANDQ R12, BX
- XORQ R10, BX
- MOVQ BX, 160(SP)
- XORQ BX, SI
- ROLQ $0x29, R13
- MOVQ R12, CX
- ORQ R13, CX
- XORQ R11, CX
- MOVQ CX, 168(SP)
- XORQ CX, BP
- MOVQ R13, DX
- MOVQ R14, R8
- ANDQ R14, DX
- ORQ R10, R8
- XORQ R12, DX
- XORQ R13, R8
- MOVQ DX, 176(SP)
- MOVQ R8, 184(SP)
-
- // Prepare round
- MOVQ BP, BX
- ROLQ $0x01, BX
- MOVQ 16(SP), R12
- XORQ 56(SP), DX
- XORQ R15, BX
- XORQ 96(SP), R12
- XORQ 136(SP), DX
- XORQ DX, R12
- MOVQ R12, CX
- ROLQ $0x01, CX
- MOVQ 24(SP), R13
- XORQ 64(SP), R8
- XORQ SI, CX
- XORQ 104(SP), R13
- XORQ 144(SP), R8
- XORQ R8, R13
- MOVQ R13, DX
- ROLQ $0x01, DX
- MOVQ R15, R8
- XORQ BP, DX
- ROLQ $0x01, R8
- MOVQ SI, R9
- XORQ R12, R8
- ROLQ $0x01, R9
-
- // Result b
- MOVQ (SP), R10
- MOVQ 48(SP), R11
- XORQ R13, R9
- MOVQ 96(SP), R12
- MOVQ 144(SP), R13
- MOVQ 192(SP), R14
- XORQ CX, R11
- ROLQ $0x2c, R11
- XORQ DX, R12
- XORQ BX, R10
- ROLQ $0x2b, R12
- MOVQ R11, SI
- MOVQ $0x800000008000000a, AX
- ORQ R12, SI
- XORQ R10, AX
- XORQ AX, SI
- MOVQ SI, (DI)
- XORQ R9, R14
- ROLQ $0x0e, R14
- MOVQ R10, R15
- ANDQ R11, R15
- XORQ R14, R15
- MOVQ R15, 32(DI)
- XORQ R8, R13
- ROLQ $0x15, R13
- MOVQ R13, AX
- ANDQ R14, AX
- XORQ R12, AX
- MOVQ AX, 16(DI)
- NOTQ R12
- ORQ R10, R14
- ORQ R13, R12
- XORQ R13, R14
- XORQ R11, R12
- MOVQ R14, 24(DI)
- MOVQ R12, 8(DI)
- MOVQ R12, BP
-
- // Result g
- MOVQ 72(SP), R11
- XORQ R9, R11
- MOVQ 80(SP), R12
- ROLQ $0x14, R11
- XORQ BX, R12
- ROLQ $0x03, R12
- MOVQ 24(SP), R10
- MOVQ R11, AX
- ORQ R12, AX
- XORQ R8, R10
- MOVQ 128(SP), R13
- MOVQ 176(SP), R14
- ROLQ $0x1c, R10
- XORQ R10, AX
- MOVQ AX, 40(DI)
- XORQ AX, SI
- XORQ CX, R13
- ROLQ $0x2d, R13
- MOVQ R12, AX
- ANDQ R13, AX
- XORQ R11, AX
- MOVQ AX, 48(DI)
- XORQ AX, BP
- XORQ DX, R14
- ROLQ $0x3d, R14
- MOVQ R14, AX
- ORQ R10, AX
- XORQ R13, AX
- MOVQ AX, 64(DI)
- ANDQ R11, R10
- XORQ R14, R10
- MOVQ R10, 72(DI)
- NOTQ R14
- XORQ R10, R15
- ORQ R14, R13
- XORQ R12, R13
- MOVQ R13, 56(DI)
-
- // Result k
- MOVQ 8(SP), R10
- MOVQ 56(SP), R11
- MOVQ 104(SP), R12
- MOVQ 152(SP), R13
- MOVQ 160(SP), R14
- XORQ DX, R11
- ROLQ $0x06, R11
- XORQ R8, R12
- ROLQ $0x19, R12
- MOVQ R11, AX
- ORQ R12, AX
- XORQ CX, R10
- ROLQ $0x01, R10
- XORQ R10, AX
- MOVQ AX, 80(DI)
- XORQ AX, SI
- XORQ R9, R13
- ROLQ $0x08, R13
- MOVQ R12, AX
- ANDQ R13, AX
- XORQ R11, AX
- MOVQ AX, 88(DI)
- XORQ AX, BP
- XORQ BX, R14
- ROLQ $0x12, R14
- NOTQ R13
- MOVQ R13, AX
- ANDQ R14, AX
- XORQ R12, AX
- MOVQ AX, 96(DI)
- MOVQ R14, AX
- ORQ R10, AX
- XORQ R13, AX
- MOVQ AX, 104(DI)
- ANDQ R11, R10
- XORQ R14, R10
- MOVQ R10, 112(DI)
- XORQ R10, R15
-
- // Result m
- MOVQ 40(SP), R11
- XORQ BX, R11
- MOVQ 88(SP), R12
- ROLQ $0x24, R11
- XORQ CX, R12
- MOVQ 32(SP), R10
- ROLQ $0x0a, R12
- MOVQ R11, AX
- MOVQ 136(SP), R13
- ANDQ R12, AX
- XORQ R9, R10
- MOVQ 184(SP), R14
- ROLQ $0x1b, R10
- XORQ R10, AX
- MOVQ AX, 120(DI)
- XORQ AX, SI
- XORQ DX, R13
- ROLQ $0x0f, R13
- MOVQ R12, AX
- ORQ R13, AX
- XORQ R11, AX
- MOVQ AX, 128(DI)
- XORQ AX, BP
- XORQ R8, R14
- ROLQ $0x38, R14
- NOTQ R13
- MOVQ R13, AX
- ORQ R14, AX
- XORQ R12, AX
- MOVQ AX, 136(DI)
- ORQ R10, R11
- XORQ R14, R11
- MOVQ R11, 152(DI)
- ANDQ R10, R14
- XORQ R13, R14
- MOVQ R14, 144(DI)
- XORQ R11, R15
-
- // Result s
- MOVQ 16(SP), R10
- MOVQ 64(SP), R11
- MOVQ 112(SP), R12
- XORQ DX, R10
- MOVQ 120(SP), R13
- ROLQ $0x3e, R10
- XORQ R8, R11
- MOVQ 168(SP), R14
- ROLQ $0x37, R11
- XORQ R9, R12
- MOVQ R10, R9
- XORQ CX, R14
- ROLQ $0x02, R14
- ANDQ R11, R9
- XORQ R14, R9
- MOVQ R9, 192(DI)
- ROLQ $0x27, R12
- XORQ R9, R15
- NOTQ R11
- XORQ BX, R13
- MOVQ R11, BX
- ANDQ R12, BX
- XORQ R10, BX
- MOVQ BX, 160(DI)
- XORQ BX, SI
- ROLQ $0x29, R13
- MOVQ R12, CX
- ORQ R13, CX
- XORQ R11, CX
- MOVQ CX, 168(DI)
- XORQ CX, BP
- MOVQ R13, DX
- MOVQ R14, R8
- ANDQ R14, DX
- ORQ R10, R8
- XORQ R12, DX
- XORQ R13, R8
- MOVQ DX, 176(DI)
- MOVQ R8, 184(DI)
-
- // Prepare round
- MOVQ BP, BX
- ROLQ $0x01, BX
- MOVQ 16(DI), R12
- XORQ 56(DI), DX
- XORQ R15, BX
- XORQ 96(DI), R12
- XORQ 136(DI), DX
- XORQ DX, R12
- MOVQ R12, CX
- ROLQ $0x01, CX
- MOVQ 24(DI), R13
- XORQ 64(DI), R8
- XORQ SI, CX
- XORQ 104(DI), R13
- XORQ 144(DI), R8
- XORQ R8, R13
- MOVQ R13, DX
- ROLQ $0x01, DX
- MOVQ R15, R8
- XORQ BP, DX
- ROLQ $0x01, R8
- MOVQ SI, R9
- XORQ R12, R8
- ROLQ $0x01, R9
-
- // Result b
- MOVQ (DI), R10
- MOVQ 48(DI), R11
- XORQ R13, R9
- MOVQ 96(DI), R12
- MOVQ 144(DI), R13
- MOVQ 192(DI), R14
- XORQ CX, R11
- ROLQ $0x2c, R11
- XORQ DX, R12
- XORQ BX, R10
- ROLQ $0x2b, R12
- MOVQ R11, SI
- MOVQ $0x8000000080008081, AX
- ORQ R12, SI
- XORQ R10, AX
- XORQ AX, SI
- MOVQ SI, (SP)
- XORQ R9, R14
- ROLQ $0x0e, R14
- MOVQ R10, R15
- ANDQ R11, R15
- XORQ R14, R15
- MOVQ R15, 32(SP)
- XORQ R8, R13
- ROLQ $0x15, R13
- MOVQ R13, AX
- ANDQ R14, AX
- XORQ R12, AX
- MOVQ AX, 16(SP)
- NOTQ R12
- ORQ R10, R14
- ORQ R13, R12
- XORQ R13, R14
- XORQ R11, R12
- MOVQ R14, 24(SP)
- MOVQ R12, 8(SP)
- MOVQ R12, BP
-
- // Result g
- MOVQ 72(DI), R11
- XORQ R9, R11
- MOVQ 80(DI), R12
- ROLQ $0x14, R11
- XORQ BX, R12
- ROLQ $0x03, R12
- MOVQ 24(DI), R10
- MOVQ R11, AX
- ORQ R12, AX
- XORQ R8, R10
- MOVQ 128(DI), R13
- MOVQ 176(DI), R14
- ROLQ $0x1c, R10
- XORQ R10, AX
- MOVQ AX, 40(SP)
- XORQ AX, SI
- XORQ CX, R13
- ROLQ $0x2d, R13
- MOVQ R12, AX
- ANDQ R13, AX
- XORQ R11, AX
- MOVQ AX, 48(SP)
- XORQ AX, BP
- XORQ DX, R14
- ROLQ $0x3d, R14
- MOVQ R14, AX
- ORQ R10, AX
- XORQ R13, AX
- MOVQ AX, 64(SP)
- ANDQ R11, R10
- XORQ R14, R10
- MOVQ R10, 72(SP)
- NOTQ R14
- XORQ R10, R15
- ORQ R14, R13
- XORQ R12, R13
- MOVQ R13, 56(SP)
-
- // Result k
- MOVQ 8(DI), R10
- MOVQ 56(DI), R11
- MOVQ 104(DI), R12
- MOVQ 152(DI), R13
- MOVQ 160(DI), R14
- XORQ DX, R11
- ROLQ $0x06, R11
- XORQ R8, R12
- ROLQ $0x19, R12
- MOVQ R11, AX
- ORQ R12, AX
- XORQ CX, R10
- ROLQ $0x01, R10
- XORQ R10, AX
- MOVQ AX, 80(SP)
- XORQ AX, SI
- XORQ R9, R13
- ROLQ $0x08, R13
- MOVQ R12, AX
- ANDQ R13, AX
- XORQ R11, AX
- MOVQ AX, 88(SP)
- XORQ AX, BP
- XORQ BX, R14
- ROLQ $0x12, R14
- NOTQ R13
- MOVQ R13, AX
- ANDQ R14, AX
- XORQ R12, AX
- MOVQ AX, 96(SP)
- MOVQ R14, AX
- ORQ R10, AX
- XORQ R13, AX
- MOVQ AX, 104(SP)
- ANDQ R11, R10
- XORQ R14, R10
- MOVQ R10, 112(SP)
- XORQ R10, R15
-
- // Result m
- MOVQ 40(DI), R11
- XORQ BX, R11
- MOVQ 88(DI), R12
- ROLQ $0x24, R11
- XORQ CX, R12
- MOVQ 32(DI), R10
- ROLQ $0x0a, R12
- MOVQ R11, AX
- MOVQ 136(DI), R13
- ANDQ R12, AX
- XORQ R9, R10
- MOVQ 184(DI), R14
- ROLQ $0x1b, R10
- XORQ R10, AX
- MOVQ AX, 120(SP)
- XORQ AX, SI
- XORQ DX, R13
- ROLQ $0x0f, R13
- MOVQ R12, AX
- ORQ R13, AX
- XORQ R11, AX
- MOVQ AX, 128(SP)
- XORQ AX, BP
- XORQ R8, R14
- ROLQ $0x38, R14
- NOTQ R13
- MOVQ R13, AX
- ORQ R14, AX
- XORQ R12, AX
- MOVQ AX, 136(SP)
- ORQ R10, R11
- XORQ R14, R11
- MOVQ R11, 152(SP)
- ANDQ R10, R14
- XORQ R13, R14
- MOVQ R14, 144(SP)
- XORQ R11, R15
-
- // Result s
- MOVQ 16(DI), R10
- MOVQ 64(DI), R11
- MOVQ 112(DI), R12
- XORQ DX, R10
- MOVQ 120(DI), R13
- ROLQ $0x3e, R10
- XORQ R8, R11
- MOVQ 168(DI), R14
- ROLQ $0x37, R11
- XORQ R9, R12
- MOVQ R10, R9
- XORQ CX, R14
- ROLQ $0x02, R14
- ANDQ R11, R9
- XORQ R14, R9
- MOVQ R9, 192(SP)
- ROLQ $0x27, R12
- XORQ R9, R15
- NOTQ R11
- XORQ BX, R13
- MOVQ R11, BX
- ANDQ R12, BX
- XORQ R10, BX
- MOVQ BX, 160(SP)
- XORQ BX, SI
- ROLQ $0x29, R13
- MOVQ R12, CX
- ORQ R13, CX
- XORQ R11, CX
- MOVQ CX, 168(SP)
- XORQ CX, BP
- MOVQ R13, DX
- MOVQ R14, R8
- ANDQ R14, DX
- ORQ R10, R8
- XORQ R12, DX
- XORQ R13, R8
- MOVQ DX, 176(SP)
- MOVQ R8, 184(SP)
-
- // Prepare round
- MOVQ BP, BX
- ROLQ $0x01, BX
- MOVQ 16(SP), R12
- XORQ 56(SP), DX
- XORQ R15, BX
- XORQ 96(SP), R12
- XORQ 136(SP), DX
- XORQ DX, R12
- MOVQ R12, CX
- ROLQ $0x01, CX
- MOVQ 24(SP), R13
- XORQ 64(SP), R8
- XORQ SI, CX
- XORQ 104(SP), R13
- XORQ 144(SP), R8
- XORQ R8, R13
- MOVQ R13, DX
- ROLQ $0x01, DX
- MOVQ R15, R8
- XORQ BP, DX
- ROLQ $0x01, R8
- MOVQ SI, R9
- XORQ R12, R8
- ROLQ $0x01, R9
-
- // Result b
- MOVQ (SP), R10
- MOVQ 48(SP), R11
- XORQ R13, R9
- MOVQ 96(SP), R12
- MOVQ 144(SP), R13
- MOVQ 192(SP), R14
- XORQ CX, R11
- ROLQ $0x2c, R11
- XORQ DX, R12
- XORQ BX, R10
- ROLQ $0x2b, R12
- MOVQ R11, SI
- MOVQ $0x8000000000008080, AX
- ORQ R12, SI
- XORQ R10, AX
- XORQ AX, SI
- MOVQ SI, (DI)
- XORQ R9, R14
- ROLQ $0x0e, R14
- MOVQ R10, R15
- ANDQ R11, R15
- XORQ R14, R15
- MOVQ R15, 32(DI)
- XORQ R8, R13
- ROLQ $0x15, R13
- MOVQ R13, AX
- ANDQ R14, AX
- XORQ R12, AX
- MOVQ AX, 16(DI)
- NOTQ R12
- ORQ R10, R14
- ORQ R13, R12
- XORQ R13, R14
- XORQ R11, R12
- MOVQ R14, 24(DI)
- MOVQ R12, 8(DI)
- MOVQ R12, BP
-
- // Result g
- MOVQ 72(SP), R11
- XORQ R9, R11
- MOVQ 80(SP), R12
- ROLQ $0x14, R11
- XORQ BX, R12
- ROLQ $0x03, R12
- MOVQ 24(SP), R10
- MOVQ R11, AX
- ORQ R12, AX
- XORQ R8, R10
- MOVQ 128(SP), R13
- MOVQ 176(SP), R14
- ROLQ $0x1c, R10
- XORQ R10, AX
- MOVQ AX, 40(DI)
- XORQ AX, SI
- XORQ CX, R13
- ROLQ $0x2d, R13
- MOVQ R12, AX
- ANDQ R13, AX
- XORQ R11, AX
- MOVQ AX, 48(DI)
- XORQ AX, BP
- XORQ DX, R14
- ROLQ $0x3d, R14
- MOVQ R14, AX
- ORQ R10, AX
- XORQ R13, AX
- MOVQ AX, 64(DI)
- ANDQ R11, R10
- XORQ R14, R10
- MOVQ R10, 72(DI)
- NOTQ R14
- XORQ R10, R15
- ORQ R14, R13
- XORQ R12, R13
- MOVQ R13, 56(DI)
-
- // Result k
- MOVQ 8(SP), R10
- MOVQ 56(SP), R11
- MOVQ 104(SP), R12
- MOVQ 152(SP), R13
- MOVQ 160(SP), R14
- XORQ DX, R11
- ROLQ $0x06, R11
- XORQ R8, R12
- ROLQ $0x19, R12
- MOVQ R11, AX
- ORQ R12, AX
- XORQ CX, R10
- ROLQ $0x01, R10
- XORQ R10, AX
- MOVQ AX, 80(DI)
- XORQ AX, SI
- XORQ R9, R13
- ROLQ $0x08, R13
- MOVQ R12, AX
- ANDQ R13, AX
- XORQ R11, AX
- MOVQ AX, 88(DI)
- XORQ AX, BP
- XORQ BX, R14
- ROLQ $0x12, R14
- NOTQ R13
- MOVQ R13, AX
- ANDQ R14, AX
- XORQ R12, AX
- MOVQ AX, 96(DI)
- MOVQ R14, AX
- ORQ R10, AX
- XORQ R13, AX
- MOVQ AX, 104(DI)
- ANDQ R11, R10
- XORQ R14, R10
- MOVQ R10, 112(DI)
- XORQ R10, R15
-
- // Result m
- MOVQ 40(SP), R11
- XORQ BX, R11
- MOVQ 88(SP), R12
- ROLQ $0x24, R11
- XORQ CX, R12
- MOVQ 32(SP), R10
- ROLQ $0x0a, R12
- MOVQ R11, AX
- MOVQ 136(SP), R13
- ANDQ R12, AX
- XORQ R9, R10
- MOVQ 184(SP), R14
- ROLQ $0x1b, R10
- XORQ R10, AX
- MOVQ AX, 120(DI)
- XORQ AX, SI
- XORQ DX, R13
- ROLQ $0x0f, R13
- MOVQ R12, AX
- ORQ R13, AX
- XORQ R11, AX
- MOVQ AX, 128(DI)
- XORQ AX, BP
- XORQ R8, R14
- ROLQ $0x38, R14
- NOTQ R13
- MOVQ R13, AX
- ORQ R14, AX
- XORQ R12, AX
- MOVQ AX, 136(DI)
- ORQ R10, R11
- XORQ R14, R11
- MOVQ R11, 152(DI)
- ANDQ R10, R14
- XORQ R13, R14
- MOVQ R14, 144(DI)
- XORQ R11, R15
-
- // Result s
- MOVQ 16(SP), R10
- MOVQ 64(SP), R11
- MOVQ 112(SP), R12
- XORQ DX, R10
- MOVQ 120(SP), R13
- ROLQ $0x3e, R10
- XORQ R8, R11
- MOVQ 168(SP), R14
- ROLQ $0x37, R11
- XORQ R9, R12
- MOVQ R10, R9
- XORQ CX, R14
- ROLQ $0x02, R14
- ANDQ R11, R9
- XORQ R14, R9
- MOVQ R9, 192(DI)
- ROLQ $0x27, R12
- XORQ R9, R15
- NOTQ R11
- XORQ BX, R13
- MOVQ R11, BX
- ANDQ R12, BX
- XORQ R10, BX
- MOVQ BX, 160(DI)
- XORQ BX, SI
- ROLQ $0x29, R13
- MOVQ R12, CX
- ORQ R13, CX
- XORQ R11, CX
- MOVQ CX, 168(DI)
- XORQ CX, BP
- MOVQ R13, DX
- MOVQ R14, R8
- ANDQ R14, DX
- ORQ R10, R8
- XORQ R12, DX
- XORQ R13, R8
- MOVQ DX, 176(DI)
- MOVQ R8, 184(DI)
-
- // Prepare round
- MOVQ BP, BX
- ROLQ $0x01, BX
- MOVQ 16(DI), R12
- XORQ 56(DI), DX
- XORQ R15, BX
- XORQ 96(DI), R12
- XORQ 136(DI), DX
- XORQ DX, R12
- MOVQ R12, CX
- ROLQ $0x01, CX
- MOVQ 24(DI), R13
- XORQ 64(DI), R8
- XORQ SI, CX
- XORQ 104(DI), R13
- XORQ 144(DI), R8
- XORQ R8, R13
- MOVQ R13, DX
- ROLQ $0x01, DX
- MOVQ R15, R8
- XORQ BP, DX
- ROLQ $0x01, R8
- MOVQ SI, R9
- XORQ R12, R8
- ROLQ $0x01, R9
-
- // Result b
- MOVQ (DI), R10
- MOVQ 48(DI), R11
- XORQ R13, R9
- MOVQ 96(DI), R12
- MOVQ 144(DI), R13
- MOVQ 192(DI), R14
- XORQ CX, R11
- ROLQ $0x2c, R11
- XORQ DX, R12
- XORQ BX, R10
- ROLQ $0x2b, R12
- MOVQ R11, SI
- MOVQ $0x0000000080000001, AX
- ORQ R12, SI
- XORQ R10, AX
- XORQ AX, SI
- MOVQ SI, (SP)
- XORQ R9, R14
- ROLQ $0x0e, R14
- MOVQ R10, R15
- ANDQ R11, R15
- XORQ R14, R15
- MOVQ R15, 32(SP)
- XORQ R8, R13
- ROLQ $0x15, R13
- MOVQ R13, AX
- ANDQ R14, AX
- XORQ R12, AX
- MOVQ AX, 16(SP)
- NOTQ R12
- ORQ R10, R14
- ORQ R13, R12
- XORQ R13, R14
- XORQ R11, R12
- MOVQ R14, 24(SP)
- MOVQ R12, 8(SP)
- MOVQ R12, BP
-
- // Result g
- MOVQ 72(DI), R11
- XORQ R9, R11
- MOVQ 80(DI), R12
- ROLQ $0x14, R11
- XORQ BX, R12
- ROLQ $0x03, R12
- MOVQ 24(DI), R10
- MOVQ R11, AX
- ORQ R12, AX
- XORQ R8, R10
- MOVQ 128(DI), R13
- MOVQ 176(DI), R14
- ROLQ $0x1c, R10
- XORQ R10, AX
- MOVQ AX, 40(SP)
- XORQ AX, SI
- XORQ CX, R13
- ROLQ $0x2d, R13
- MOVQ R12, AX
- ANDQ R13, AX
- XORQ R11, AX
- MOVQ AX, 48(SP)
- XORQ AX, BP
- XORQ DX, R14
- ROLQ $0x3d, R14
- MOVQ R14, AX
- ORQ R10, AX
- XORQ R13, AX
- MOVQ AX, 64(SP)
- ANDQ R11, R10
- XORQ R14, R10
- MOVQ R10, 72(SP)
- NOTQ R14
- XORQ R10, R15
- ORQ R14, R13
- XORQ R12, R13
- MOVQ R13, 56(SP)
-
- // Result k
- MOVQ 8(DI), R10
- MOVQ 56(DI), R11
- MOVQ 104(DI), R12
- MOVQ 152(DI), R13
- MOVQ 160(DI), R14
- XORQ DX, R11
- ROLQ $0x06, R11
- XORQ R8, R12
- ROLQ $0x19, R12
- MOVQ R11, AX
- ORQ R12, AX
- XORQ CX, R10
- ROLQ $0x01, R10
- XORQ R10, AX
- MOVQ AX, 80(SP)
- XORQ AX, SI
- XORQ R9, R13
- ROLQ $0x08, R13
- MOVQ R12, AX
- ANDQ R13, AX
- XORQ R11, AX
- MOVQ AX, 88(SP)
- XORQ AX, BP
- XORQ BX, R14
- ROLQ $0x12, R14
- NOTQ R13
- MOVQ R13, AX
- ANDQ R14, AX
- XORQ R12, AX
- MOVQ AX, 96(SP)
- MOVQ R14, AX
- ORQ R10, AX
- XORQ R13, AX
- MOVQ AX, 104(SP)
- ANDQ R11, R10
- XORQ R14, R10
- MOVQ R10, 112(SP)
- XORQ R10, R15
-
- // Result m
- MOVQ 40(DI), R11
- XORQ BX, R11
- MOVQ 88(DI), R12
- ROLQ $0x24, R11
- XORQ CX, R12
- MOVQ 32(DI), R10
- ROLQ $0x0a, R12
- MOVQ R11, AX
- MOVQ 136(DI), R13
- ANDQ R12, AX
- XORQ R9, R10
- MOVQ 184(DI), R14
- ROLQ $0x1b, R10
- XORQ R10, AX
- MOVQ AX, 120(SP)
- XORQ AX, SI
- XORQ DX, R13
- ROLQ $0x0f, R13
- MOVQ R12, AX
- ORQ R13, AX
- XORQ R11, AX
- MOVQ AX, 128(SP)
- XORQ AX, BP
- XORQ R8, R14
- ROLQ $0x38, R14
- NOTQ R13
- MOVQ R13, AX
- ORQ R14, AX
- XORQ R12, AX
- MOVQ AX, 136(SP)
- ORQ R10, R11
- XORQ R14, R11
- MOVQ R11, 152(SP)
- ANDQ R10, R14
- XORQ R13, R14
- MOVQ R14, 144(SP)
- XORQ R11, R15
-
- // Result s
- MOVQ 16(DI), R10
- MOVQ 64(DI), R11
- MOVQ 112(DI), R12
- XORQ DX, R10
- MOVQ 120(DI), R13
- ROLQ $0x3e, R10
- XORQ R8, R11
- MOVQ 168(DI), R14
- ROLQ $0x37, R11
- XORQ R9, R12
- MOVQ R10, R9
- XORQ CX, R14
- ROLQ $0x02, R14
- ANDQ R11, R9
- XORQ R14, R9
- MOVQ R9, 192(SP)
- ROLQ $0x27, R12
- XORQ R9, R15
- NOTQ R11
- XORQ BX, R13
- MOVQ R11, BX
- ANDQ R12, BX
- XORQ R10, BX
- MOVQ BX, 160(SP)
- XORQ BX, SI
- ROLQ $0x29, R13
- MOVQ R12, CX
- ORQ R13, CX
- XORQ R11, CX
- MOVQ CX, 168(SP)
- XORQ CX, BP
- MOVQ R13, DX
- MOVQ R14, R8
- ANDQ R14, DX
- ORQ R10, R8
- XORQ R12, DX
- XORQ R13, R8
- MOVQ DX, 176(SP)
- MOVQ R8, 184(SP)
-
- // Prepare round
- MOVQ BP, BX
- ROLQ $0x01, BX
- MOVQ 16(SP), R12
- XORQ 56(SP), DX
- XORQ R15, BX
- XORQ 96(SP), R12
- XORQ 136(SP), DX
- XORQ DX, R12
- MOVQ R12, CX
- ROLQ $0x01, CX
- MOVQ 24(SP), R13
- XORQ 64(SP), R8
- XORQ SI, CX
- XORQ 104(SP), R13
- XORQ 144(SP), R8
- XORQ R8, R13
- MOVQ R13, DX
- ROLQ $0x01, DX
- MOVQ R15, R8
- XORQ BP, DX
- ROLQ $0x01, R8
- MOVQ SI, R9
- XORQ R12, R8
- ROLQ $0x01, R9
-
- // Result b
- MOVQ (SP), R10
- MOVQ 48(SP), R11
- XORQ R13, R9
- MOVQ 96(SP), R12
- MOVQ 144(SP), R13
- MOVQ 192(SP), R14
- XORQ CX, R11
- ROLQ $0x2c, R11
- XORQ DX, R12
- XORQ BX, R10
- ROLQ $0x2b, R12
- MOVQ R11, SI
- MOVQ $0x8000000080008008, AX
- ORQ R12, SI
- XORQ R10, AX
- XORQ AX, SI
- MOVQ SI, (DI)
- XORQ R9, R14
- ROLQ $0x0e, R14
- MOVQ R10, R15
- ANDQ R11, R15
- XORQ R14, R15
- MOVQ R15, 32(DI)
- XORQ R8, R13
- ROLQ $0x15, R13
- MOVQ R13, AX
- ANDQ R14, AX
- XORQ R12, AX
- MOVQ AX, 16(DI)
- NOTQ R12
- ORQ R10, R14
- ORQ R13, R12
- XORQ R13, R14
- XORQ R11, R12
- MOVQ R14, 24(DI)
- MOVQ R12, 8(DI)
- NOP
-
- // Result g
- MOVQ 72(SP), R11
- XORQ R9, R11
- MOVQ 80(SP), R12
- ROLQ $0x14, R11
- XORQ BX, R12
- ROLQ $0x03, R12
- MOVQ 24(SP), R10
- MOVQ R11, AX
- ORQ R12, AX
- XORQ R8, R10
- MOVQ 128(SP), R13
- MOVQ 176(SP), R14
- ROLQ $0x1c, R10
- XORQ R10, AX
- MOVQ AX, 40(DI)
- NOP
- XORQ CX, R13
- ROLQ $0x2d, R13
- MOVQ R12, AX
- ANDQ R13, AX
- XORQ R11, AX
- MOVQ AX, 48(DI)
- NOP
- XORQ DX, R14
- ROLQ $0x3d, R14
- MOVQ R14, AX
- ORQ R10, AX
- XORQ R13, AX
- MOVQ AX, 64(DI)
- ANDQ R11, R10
- XORQ R14, R10
- MOVQ R10, 72(DI)
- NOTQ R14
- NOP
- ORQ R14, R13
- XORQ R12, R13
- MOVQ R13, 56(DI)
-
- // Result k
- MOVQ 8(SP), R10
- MOVQ 56(SP), R11
- MOVQ 104(SP), R12
- MOVQ 152(SP), R13
- MOVQ 160(SP), R14
- XORQ DX, R11
- ROLQ $0x06, R11
- XORQ R8, R12
- ROLQ $0x19, R12
- MOVQ R11, AX
- ORQ R12, AX
- XORQ CX, R10
- ROLQ $0x01, R10
- XORQ R10, AX
- MOVQ AX, 80(DI)
- NOP
- XORQ R9, R13
- ROLQ $0x08, R13
- MOVQ R12, AX
- ANDQ R13, AX
- XORQ R11, AX
- MOVQ AX, 88(DI)
- NOP
- XORQ BX, R14
- ROLQ $0x12, R14
- NOTQ R13
- MOVQ R13, AX
- ANDQ R14, AX
- XORQ R12, AX
- MOVQ AX, 96(DI)
- MOVQ R14, AX
- ORQ R10, AX
- XORQ R13, AX
- MOVQ AX, 104(DI)
- ANDQ R11, R10
- XORQ R14, R10
- MOVQ R10, 112(DI)
- NOP
-
- // Result m
- MOVQ 40(SP), R11
- XORQ BX, R11
- MOVQ 88(SP), R12
- ROLQ $0x24, R11
- XORQ CX, R12
- MOVQ 32(SP), R10
- ROLQ $0x0a, R12
- MOVQ R11, AX
- MOVQ 136(SP), R13
- ANDQ R12, AX
- XORQ R9, R10
- MOVQ 184(SP), R14
- ROLQ $0x1b, R10
- XORQ R10, AX
- MOVQ AX, 120(DI)
- NOP
- XORQ DX, R13
- ROLQ $0x0f, R13
- MOVQ R12, AX
- ORQ R13, AX
- XORQ R11, AX
- MOVQ AX, 128(DI)
- NOP
- XORQ R8, R14
- ROLQ $0x38, R14
- NOTQ R13
- MOVQ R13, AX
- ORQ R14, AX
- XORQ R12, AX
- MOVQ AX, 136(DI)
- ORQ R10, R11
- XORQ R14, R11
- MOVQ R11, 152(DI)
- ANDQ R10, R14
- XORQ R13, R14
- MOVQ R14, 144(DI)
- NOP
-
- // Result s
- MOVQ 16(SP), R10
- MOVQ 64(SP), R11
- MOVQ 112(SP), R12
- XORQ DX, R10
- MOVQ 120(SP), R13
- ROLQ $0x3e, R10
- XORQ R8, R11
- MOVQ 168(SP), R14
- ROLQ $0x37, R11
- XORQ R9, R12
- MOVQ R10, R9
- XORQ CX, R14
- ROLQ $0x02, R14
- ANDQ R11, R9
- XORQ R14, R9
- MOVQ R9, 192(DI)
- ROLQ $0x27, R12
- NOP
- NOTQ R11
- XORQ BX, R13
- MOVQ R11, BX
- ANDQ R12, BX
- XORQ R10, BX
- MOVQ BX, 160(DI)
- NOP
- ROLQ $0x29, R13
- MOVQ R12, CX
- ORQ R13, CX
- XORQ R11, CX
- MOVQ CX, 168(DI)
- NOP
- MOVQ R13, DX
- MOVQ R14, R8
- ANDQ R14, DX
- ORQ R10, R8
- XORQ R12, DX
- XORQ R13, R8
- MOVQ DX, 176(DI)
- MOVQ R8, 184(DI)
-
- // Revert the internal state to the user state
- NOTQ 8(DI)
- NOTQ 16(DI)
- NOTQ 64(DI)
- NOTQ 96(DI)
- NOTQ 136(DI)
- NOTQ 160(DI)
- RET
diff --git a/vendor/golang.org/x/crypto/sha3/sha3.go b/vendor/golang.org/x/crypto/sha3/legacy_hash.go
similarity index 83%
rename from vendor/golang.org/x/crypto/sha3/sha3.go
rename to vendor/golang.org/x/crypto/sha3/legacy_hash.go
index 6658c44479..b8784536e0 100644
--- a/vendor/golang.org/x/crypto/sha3/sha3.go
+++ b/vendor/golang.org/x/crypto/sha3/legacy_hash.go
@@ -4,15 +4,46 @@
package sha3
+// This implementation is only used for NewLegacyKeccak256 and
+// NewLegacyKeccak512, which are not implemented by crypto/sha3.
+// All other functions in this package are wrappers around crypto/sha3.
+
import (
"crypto/subtle"
"encoding/binary"
"errors"
+ "hash"
"unsafe"
"golang.org/x/sys/cpu"
)
+const (
+ dsbyteKeccak = 0b00000001
+
+ // rateK[c] is the rate in bytes for Keccak[c] where c is the capacity in
+ // bits. Given the sponge size is 1600 bits, the rate is 1600 - c bits.
+ rateK256 = (1600 - 256) / 8
+ rateK512 = (1600 - 512) / 8
+ rateK1024 = (1600 - 1024) / 8
+)
+
+// NewLegacyKeccak256 creates a new Keccak-256 hash.
+//
+// Only use this function if you require compatibility with an existing cryptosystem
+// that uses non-standard padding. All other users should use New256 instead.
+func NewLegacyKeccak256() hash.Hash {
+ return &state{rate: rateK512, outputLen: 32, dsbyte: dsbyteKeccak}
+}
+
+// NewLegacyKeccak512 creates a new Keccak-512 hash.
+//
+// Only use this function if you require compatibility with an existing cryptosystem
+// that uses non-standard padding. All other users should use New512 instead.
+func NewLegacyKeccak512() hash.Hash {
+ return &state{rate: rateK1024, outputLen: 64, dsbyte: dsbyteKeccak}
+}
+
// spongeDirection indicates the direction bytes are flowing through the sponge.
type spongeDirection int
@@ -173,12 +204,9 @@ func (d *state) Sum(in []byte) []byte {
}
const (
- magicSHA3 = "sha\x08"
- magicShake = "sha\x09"
- magicCShake = "sha\x0a"
magicKeccak = "sha\x0b"
// magic || rate || main state || n || sponge direction
- marshaledSize = len(magicSHA3) + 1 + 200 + 1 + 1
+ marshaledSize = len(magicKeccak) + 1 + 200 + 1 + 1
)
func (d *state) MarshalBinary() ([]byte, error) {
@@ -187,12 +215,6 @@ func (d *state) MarshalBinary() ([]byte, error) {
func (d *state) AppendBinary(b []byte) ([]byte, error) {
switch d.dsbyte {
- case dsbyteSHA3:
- b = append(b, magicSHA3...)
- case dsbyteShake:
- b = append(b, magicShake...)
- case dsbyteCShake:
- b = append(b, magicCShake...)
case dsbyteKeccak:
b = append(b, magicKeccak...)
default:
@@ -210,12 +232,9 @@ func (d *state) UnmarshalBinary(b []byte) error {
return errors.New("sha3: invalid hash state")
}
- magic := string(b[:len(magicSHA3)])
- b = b[len(magicSHA3):]
+ magic := string(b[:len(magicKeccak)])
+ b = b[len(magicKeccak):]
switch {
- case magic == magicSHA3 && d.dsbyte == dsbyteSHA3:
- case magic == magicShake && d.dsbyte == dsbyteShake:
- case magic == magicCShake && d.dsbyte == dsbyteCShake:
case magic == magicKeccak && d.dsbyte == dsbyteKeccak:
default:
return errors.New("sha3: invalid hash state identifier")
diff --git a/vendor/golang.org/x/crypto/sha3/keccakf.go b/vendor/golang.org/x/crypto/sha3/legacy_keccakf.go
similarity index 98%
rename from vendor/golang.org/x/crypto/sha3/keccakf.go
rename to vendor/golang.org/x/crypto/sha3/legacy_keccakf.go
index ce48b1dd3e..101588c16c 100644
--- a/vendor/golang.org/x/crypto/sha3/keccakf.go
+++ b/vendor/golang.org/x/crypto/sha3/legacy_keccakf.go
@@ -2,10 +2,12 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-//go:build !amd64 || purego || !gc
-
package sha3
+// This implementation is only used for NewLegacyKeccak256 and
+// NewLegacyKeccak512, which are not implemented by crypto/sha3.
+// All other functions in this package are wrappers around crypto/sha3.
+
import "math/bits"
// rc stores the round constants for use in the ι step.
diff --git a/vendor/golang.org/x/crypto/sha3/sha3_s390x.go b/vendor/golang.org/x/crypto/sha3/sha3_s390x.go
deleted file mode 100644
index 00d8034ae6..0000000000
--- a/vendor/golang.org/x/crypto/sha3/sha3_s390x.go
+++ /dev/null
@@ -1,303 +0,0 @@
-// Copyright 2017 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-//go:build gc && !purego
-
-package sha3
-
-// This file contains code for using the 'compute intermediate
-// message digest' (KIMD) and 'compute last message digest' (KLMD)
-// instructions to compute SHA-3 and SHAKE hashes on IBM Z.
-
-import (
- "hash"
-
- "golang.org/x/sys/cpu"
-)
-
-// codes represent 7-bit KIMD/KLMD function codes as defined in
-// the Principles of Operation.
-type code uint64
-
-const (
- // function codes for KIMD/KLMD
- sha3_224 code = 32
- sha3_256 = 33
- sha3_384 = 34
- sha3_512 = 35
- shake_128 = 36
- shake_256 = 37
- nopad = 0x100
-)
-
-// kimd is a wrapper for the 'compute intermediate message digest' instruction.
-// src must be a multiple of the rate for the given function code.
-//
-//go:noescape
-func kimd(function code, chain *[200]byte, src []byte)
-
-// klmd is a wrapper for the 'compute last message digest' instruction.
-// src padding is handled by the instruction.
-//
-//go:noescape
-func klmd(function code, chain *[200]byte, dst, src []byte)
-
-type asmState struct {
- a [200]byte // 1600 bit state
- buf []byte // care must be taken to ensure cap(buf) is a multiple of rate
- rate int // equivalent to block size
- storage [3072]byte // underlying storage for buf
- outputLen int // output length for full security
- function code // KIMD/KLMD function code
- state spongeDirection // whether the sponge is absorbing or squeezing
-}
-
-func newAsmState(function code) *asmState {
- var s asmState
- s.function = function
- switch function {
- case sha3_224:
- s.rate = 144
- s.outputLen = 28
- case sha3_256:
- s.rate = 136
- s.outputLen = 32
- case sha3_384:
- s.rate = 104
- s.outputLen = 48
- case sha3_512:
- s.rate = 72
- s.outputLen = 64
- case shake_128:
- s.rate = 168
- s.outputLen = 32
- case shake_256:
- s.rate = 136
- s.outputLen = 64
- default:
- panic("sha3: unrecognized function code")
- }
-
- // limit s.buf size to a multiple of s.rate
- s.resetBuf()
- return &s
-}
-
-func (s *asmState) clone() *asmState {
- c := *s
- c.buf = c.storage[:len(s.buf):cap(s.buf)]
- return &c
-}
-
-// copyIntoBuf copies b into buf. It will panic if there is not enough space to
-// store all of b.
-func (s *asmState) copyIntoBuf(b []byte) {
- bufLen := len(s.buf)
- s.buf = s.buf[:len(s.buf)+len(b)]
- copy(s.buf[bufLen:], b)
-}
-
-// resetBuf points buf at storage, sets the length to 0 and sets cap to be a
-// multiple of the rate.
-func (s *asmState) resetBuf() {
- max := (cap(s.storage) / s.rate) * s.rate
- s.buf = s.storage[:0:max]
-}
-
-// Write (via the embedded io.Writer interface) adds more data to the running hash.
-// It never returns an error.
-func (s *asmState) Write(b []byte) (int, error) {
- if s.state != spongeAbsorbing {
- panic("sha3: Write after Read")
- }
- length := len(b)
- for len(b) > 0 {
- if len(s.buf) == 0 && len(b) >= cap(s.buf) {
- // Hash the data directly and push any remaining bytes
- // into the buffer.
- remainder := len(b) % s.rate
- kimd(s.function, &s.a, b[:len(b)-remainder])
- if remainder != 0 {
- s.copyIntoBuf(b[len(b)-remainder:])
- }
- return length, nil
- }
-
- if len(s.buf) == cap(s.buf) {
- // flush the buffer
- kimd(s.function, &s.a, s.buf)
- s.buf = s.buf[:0]
- }
-
- // copy as much as we can into the buffer
- n := len(b)
- if len(b) > cap(s.buf)-len(s.buf) {
- n = cap(s.buf) - len(s.buf)
- }
- s.copyIntoBuf(b[:n])
- b = b[n:]
- }
- return length, nil
-}
-
-// Read squeezes an arbitrary number of bytes from the sponge.
-func (s *asmState) Read(out []byte) (n int, err error) {
- // The 'compute last message digest' instruction only stores the digest
- // at the first operand (dst) for SHAKE functions.
- if s.function != shake_128 && s.function != shake_256 {
- panic("sha3: can only call Read for SHAKE functions")
- }
-
- n = len(out)
-
- // need to pad if we were absorbing
- if s.state == spongeAbsorbing {
- s.state = spongeSqueezing
-
- // write hash directly into out if possible
- if len(out)%s.rate == 0 {
- klmd(s.function, &s.a, out, s.buf) // len(out) may be 0
- s.buf = s.buf[:0]
- return
- }
-
- // write hash into buffer
- max := cap(s.buf)
- if max > len(out) {
- max = (len(out)/s.rate)*s.rate + s.rate
- }
- klmd(s.function, &s.a, s.buf[:max], s.buf)
- s.buf = s.buf[:max]
- }
-
- for len(out) > 0 {
- // flush the buffer
- if len(s.buf) != 0 {
- c := copy(out, s.buf)
- out = out[c:]
- s.buf = s.buf[c:]
- continue
- }
-
- // write hash directly into out if possible
- if len(out)%s.rate == 0 {
- klmd(s.function|nopad, &s.a, out, nil)
- return
- }
-
- // write hash into buffer
- s.resetBuf()
- if cap(s.buf) > len(out) {
- s.buf = s.buf[:(len(out)/s.rate)*s.rate+s.rate]
- }
- klmd(s.function|nopad, &s.a, s.buf, nil)
- }
- return
-}
-
-// Sum appends the current hash to b and returns the resulting slice.
-// It does not change the underlying hash state.
-func (s *asmState) Sum(b []byte) []byte {
- if s.state != spongeAbsorbing {
- panic("sha3: Sum after Read")
- }
-
- // Copy the state to preserve the original.
- a := s.a
-
- // Hash the buffer. Note that we don't clear it because we
- // aren't updating the state.
- switch s.function {
- case sha3_224, sha3_256, sha3_384, sha3_512:
- klmd(s.function, &a, nil, s.buf)
- return append(b, a[:s.outputLen]...)
- case shake_128, shake_256:
- d := make([]byte, s.outputLen, 64)
- klmd(s.function, &a, d, s.buf)
- return append(b, d[:s.outputLen]...)
- default:
- panic("sha3: unknown function")
- }
-}
-
-// Reset resets the Hash to its initial state.
-func (s *asmState) Reset() {
- for i := range s.a {
- s.a[i] = 0
- }
- s.resetBuf()
- s.state = spongeAbsorbing
-}
-
-// Size returns the number of bytes Sum will return.
-func (s *asmState) Size() int {
- return s.outputLen
-}
-
-// BlockSize returns the hash's underlying block size.
-// The Write method must be able to accept any amount
-// of data, but it may operate more efficiently if all writes
-// are a multiple of the block size.
-func (s *asmState) BlockSize() int {
- return s.rate
-}
-
-// Clone returns a copy of the ShakeHash in its current state.
-func (s *asmState) Clone() ShakeHash {
- return s.clone()
-}
-
-// new224 returns an assembly implementation of SHA3-224 if available,
-// otherwise it returns a generic implementation.
-func new224() hash.Hash {
- if cpu.S390X.HasSHA3 {
- return newAsmState(sha3_224)
- }
- return new224Generic()
-}
-
-// new256 returns an assembly implementation of SHA3-256 if available,
-// otherwise it returns a generic implementation.
-func new256() hash.Hash {
- if cpu.S390X.HasSHA3 {
- return newAsmState(sha3_256)
- }
- return new256Generic()
-}
-
-// new384 returns an assembly implementation of SHA3-384 if available,
-// otherwise it returns a generic implementation.
-func new384() hash.Hash {
- if cpu.S390X.HasSHA3 {
- return newAsmState(sha3_384)
- }
- return new384Generic()
-}
-
-// new512 returns an assembly implementation of SHA3-512 if available,
-// otherwise it returns a generic implementation.
-func new512() hash.Hash {
- if cpu.S390X.HasSHA3 {
- return newAsmState(sha3_512)
- }
- return new512Generic()
-}
-
-// newShake128 returns an assembly implementation of SHAKE-128 if available,
-// otherwise it returns a generic implementation.
-func newShake128() ShakeHash {
- if cpu.S390X.HasSHA3 {
- return newAsmState(shake_128)
- }
- return newShake128Generic()
-}
-
-// newShake256 returns an assembly implementation of SHAKE-256 if available,
-// otherwise it returns a generic implementation.
-func newShake256() ShakeHash {
- if cpu.S390X.HasSHA3 {
- return newAsmState(shake_256)
- }
- return newShake256Generic()
-}
diff --git a/vendor/golang.org/x/crypto/sha3/sha3_s390x.s b/vendor/golang.org/x/crypto/sha3/sha3_s390x.s
deleted file mode 100644
index 826b862c77..0000000000
--- a/vendor/golang.org/x/crypto/sha3/sha3_s390x.s
+++ /dev/null
@@ -1,33 +0,0 @@
-// Copyright 2017 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-//go:build gc && !purego
-
-#include "textflag.h"
-
-// func kimd(function code, chain *[200]byte, src []byte)
-TEXT ·kimd(SB), NOFRAME|NOSPLIT, $0-40
- MOVD function+0(FP), R0
- MOVD chain+8(FP), R1
- LMG src+16(FP), R2, R3 // R2=base, R3=len
-
-continue:
- WORD $0xB93E0002 // KIMD --, R2
- BVS continue // continue if interrupted
- MOVD $0, R0 // reset R0 for pre-go1.8 compilers
- RET
-
-// func klmd(function code, chain *[200]byte, dst, src []byte)
-TEXT ·klmd(SB), NOFRAME|NOSPLIT, $0-64
- // TODO: SHAKE support
- MOVD function+0(FP), R0
- MOVD chain+8(FP), R1
- LMG dst+16(FP), R2, R3 // R2=base, R3=len
- LMG src+40(FP), R4, R5 // R4=base, R5=len
-
-continue:
- WORD $0xB93F0024 // KLMD R2, R4
- BVS continue // continue if interrupted
- MOVD $0, R0 // reset R0 for pre-go1.8 compilers
- RET
diff --git a/vendor/golang.org/x/crypto/sha3/shake.go b/vendor/golang.org/x/crypto/sha3/shake.go
index a6b3a4281f..6f3f70c265 100644
--- a/vendor/golang.org/x/crypto/sha3/shake.go
+++ b/vendor/golang.org/x/crypto/sha3/shake.go
@@ -4,24 +4,10 @@
package sha3
-// This file defines the ShakeHash interface, and provides
-// functions for creating SHAKE and cSHAKE instances, as well as utility
-// functions for hashing bytes to arbitrary-length output.
-//
-//
-// SHAKE implementation is based on FIPS PUB 202 [1]
-// cSHAKE implementations is based on NIST SP 800-185 [2]
-//
-// [1] https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.202.pdf
-// [2] https://doi.org/10.6028/NIST.SP.800-185
-
import (
- "bytes"
- "encoding/binary"
- "errors"
+ "crypto/sha3"
"hash"
"io"
- "math/bits"
)
// ShakeHash defines the interface to hash functions that support
@@ -32,7 +18,7 @@ type ShakeHash interface {
hash.Hash
// Read reads more output from the hash; reading affects the hash's
- // state. (ShakeHash.Read is thus very different from Hash.Sum)
+ // state. (ShakeHash.Read is thus very different from Hash.Sum.)
// It never returns an error, but subsequent calls to Write or Sum
// will panic.
io.Reader
@@ -41,115 +27,18 @@ type ShakeHash interface {
Clone() ShakeHash
}
-// cSHAKE specific context
-type cshakeState struct {
- *state // SHA-3 state context and Read/Write operations
-
- // initBlock is the cSHAKE specific initialization set of bytes. It is initialized
- // by newCShake function and stores concatenation of N followed by S, encoded
- // by the method specified in 3.3 of [1].
- // It is stored here in order for Reset() to be able to put context into
- // initial state.
- initBlock []byte
-}
-
-func bytepad(data []byte, rate int) []byte {
- out := make([]byte, 0, 9+len(data)+rate-1)
- out = append(out, leftEncode(uint64(rate))...)
- out = append(out, data...)
- if padlen := rate - len(out)%rate; padlen < rate {
- out = append(out, make([]byte, padlen)...)
- }
- return out
-}
-
-func leftEncode(x uint64) []byte {
- // Let n be the smallest positive integer for which 2^(8n) > x.
- n := (bits.Len64(x) + 7) / 8
- if n == 0 {
- n = 1
- }
- // Return n || x with n as a byte and x an n bytes in big-endian order.
- b := make([]byte, 9)
- binary.BigEndian.PutUint64(b[1:], x)
- b = b[9-n-1:]
- b[0] = byte(n)
- return b
-}
-
-func newCShake(N, S []byte, rate, outputLen int, dsbyte byte) ShakeHash {
- c := cshakeState{state: &state{rate: rate, outputLen: outputLen, dsbyte: dsbyte}}
- c.initBlock = make([]byte, 0, 9+len(N)+9+len(S)) // leftEncode returns max 9 bytes
- c.initBlock = append(c.initBlock, leftEncode(uint64(len(N))*8)...)
- c.initBlock = append(c.initBlock, N...)
- c.initBlock = append(c.initBlock, leftEncode(uint64(len(S))*8)...)
- c.initBlock = append(c.initBlock, S...)
- c.Write(bytepad(c.initBlock, c.rate))
- return &c
-}
-
-// Reset resets the hash to initial state.
-func (c *cshakeState) Reset() {
- c.state.Reset()
- c.Write(bytepad(c.initBlock, c.rate))
-}
-
-// Clone returns copy of a cSHAKE context within its current state.
-func (c *cshakeState) Clone() ShakeHash {
- b := make([]byte, len(c.initBlock))
- copy(b, c.initBlock)
- return &cshakeState{state: c.clone(), initBlock: b}
-}
-
-// Clone returns copy of SHAKE context within its current state.
-func (c *state) Clone() ShakeHash {
- return c.clone()
-}
-
-func (c *cshakeState) MarshalBinary() ([]byte, error) {
- return c.AppendBinary(make([]byte, 0, marshaledSize+len(c.initBlock)))
-}
-
-func (c *cshakeState) AppendBinary(b []byte) ([]byte, error) {
- b, err := c.state.AppendBinary(b)
- if err != nil {
- return nil, err
- }
- b = append(b, c.initBlock...)
- return b, nil
-}
-
-func (c *cshakeState) UnmarshalBinary(b []byte) error {
- if len(b) <= marshaledSize {
- return errors.New("sha3: invalid hash state")
- }
- if err := c.state.UnmarshalBinary(b[:marshaledSize]); err != nil {
- return err
- }
- c.initBlock = bytes.Clone(b[marshaledSize:])
- return nil
-}
-
// NewShake128 creates a new SHAKE128 variable-output-length ShakeHash.
// Its generic security strength is 128 bits against all attacks if at
// least 32 bytes of its output are used.
func NewShake128() ShakeHash {
- return newShake128()
+ return &shakeWrapper{sha3.NewSHAKE128(), 32, false, sha3.NewSHAKE128}
}
// NewShake256 creates a new SHAKE256 variable-output-length ShakeHash.
// Its generic security strength is 256 bits against all attacks if
// at least 64 bytes of its output are used.
func NewShake256() ShakeHash {
- return newShake256()
-}
-
-func newShake128Generic() *state {
- return &state{rate: rateK256, outputLen: 32, dsbyte: dsbyteShake}
-}
-
-func newShake256Generic() *state {
- return &state{rate: rateK512, outputLen: 64, dsbyte: dsbyteShake}
+ return &shakeWrapper{sha3.NewSHAKE256(), 64, false, sha3.NewSHAKE256}
}
// NewCShake128 creates a new instance of cSHAKE128 variable-output-length ShakeHash,
@@ -159,10 +48,9 @@ func newShake256Generic() *state {
// computations on same input with different S yield unrelated outputs.
// When N and S are both empty, this is equivalent to NewShake128.
func NewCShake128(N, S []byte) ShakeHash {
- if len(N) == 0 && len(S) == 0 {
- return NewShake128()
- }
- return newCShake(N, S, rateK256, 32, dsbyteCShake)
+ return &shakeWrapper{sha3.NewCSHAKE128(N, S), 32, false, func() *sha3.SHAKE {
+ return sha3.NewCSHAKE128(N, S)
+ }}
}
// NewCShake256 creates a new instance of cSHAKE256 variable-output-length ShakeHash,
@@ -172,10 +60,9 @@ func NewCShake128(N, S []byte) ShakeHash {
// computations on same input with different S yield unrelated outputs.
// When N and S are both empty, this is equivalent to NewShake256.
func NewCShake256(N, S []byte) ShakeHash {
- if len(N) == 0 && len(S) == 0 {
- return NewShake256()
- }
- return newCShake(N, S, rateK512, 64, dsbyteCShake)
+ return &shakeWrapper{sha3.NewCSHAKE256(N, S), 64, false, func() *sha3.SHAKE {
+ return sha3.NewCSHAKE256(N, S)
+ }}
}
// ShakeSum128 writes an arbitrary-length digest of data into hash.
@@ -191,3 +78,42 @@ func ShakeSum256(hash, data []byte) {
h.Write(data)
h.Read(hash)
}
+
+// shakeWrapper adds the Size, Sum, and Clone methods to a sha3.SHAKE
+// to implement the ShakeHash interface.
+type shakeWrapper struct {
+ *sha3.SHAKE
+ outputLen int
+ squeezing bool
+ newSHAKE func() *sha3.SHAKE
+}
+
+func (w *shakeWrapper) Read(p []byte) (n int, err error) {
+ w.squeezing = true
+ return w.SHAKE.Read(p)
+}
+
+func (w *shakeWrapper) Clone() ShakeHash {
+ s := w.newSHAKE()
+ b, err := w.MarshalBinary()
+ if err != nil {
+ panic(err) // unreachable
+ }
+ if err := s.UnmarshalBinary(b); err != nil {
+ panic(err) // unreachable
+ }
+ return &shakeWrapper{s, w.outputLen, w.squeezing, w.newSHAKE}
+}
+
+func (w *shakeWrapper) Size() int { return w.outputLen }
+
+func (w *shakeWrapper) Sum(b []byte) []byte {
+ if w.squeezing {
+ panic("sha3: Sum after Read")
+ }
+ out := make([]byte, w.outputLen)
+ // Clone the state so that we don't affect future Write calls.
+ s := w.Clone()
+ s.Read(out)
+ return append(b, out...)
+}
diff --git a/vendor/golang.org/x/crypto/sha3/shake_noasm.go b/vendor/golang.org/x/crypto/sha3/shake_noasm.go
deleted file mode 100644
index 4276ba4ab2..0000000000
--- a/vendor/golang.org/x/crypto/sha3/shake_noasm.go
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2023 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-//go:build !gc || purego || !s390x
-
-package sha3
-
-func newShake128() *state {
- return newShake128Generic()
-}
-
-func newShake256() *state {
- return newShake256Generic()
-}
diff --git a/vendor/golang.org/x/crypto/ssh/keys.go b/vendor/golang.org/x/crypto/ssh/keys.go
index a035956fcc..47a07539d9 100644
--- a/vendor/golang.org/x/crypto/ssh/keys.go
+++ b/vendor/golang.org/x/crypto/ssh/keys.go
@@ -1490,6 +1490,7 @@ type openSSHEncryptedPrivateKey struct {
NumKeys uint32
PubKey []byte
PrivKeyBlock []byte
+ Rest []byte `ssh:"rest"`
}
type openSSHPrivateKey struct {
diff --git a/vendor/golang.org/x/crypto/ssh/messages.go b/vendor/golang.org/x/crypto/ssh/messages.go
index 251b9d06a3..ab22c3d38d 100644
--- a/vendor/golang.org/x/crypto/ssh/messages.go
+++ b/vendor/golang.org/x/crypto/ssh/messages.go
@@ -792,7 +792,7 @@ func marshalString(to []byte, s []byte) []byte {
return to[len(s):]
}
-var bigIntType = reflect.TypeOf((*big.Int)(nil))
+var bigIntType = reflect.TypeFor[*big.Int]()
// Decode a packet into its corresponding message.
func decode(packet []byte) (interface{}, error) {
diff --git a/vendor/golang.org/x/crypto/ssh/ssh_gss.go b/vendor/golang.org/x/crypto/ssh/ssh_gss.go
index 24bd7c8e83..a6249a1227 100644
--- a/vendor/golang.org/x/crypto/ssh/ssh_gss.go
+++ b/vendor/golang.org/x/crypto/ssh/ssh_gss.go
@@ -106,6 +106,13 @@ func parseGSSAPIPayload(payload []byte) (*userAuthRequestGSSAPI, error) {
if !ok {
return nil, errors.New("parse uint32 failed")
}
+ // Each ASN.1 encoded OID must have a minimum
+ // of 2 bytes; 64 maximum mechanisms is an
+ // arbitrary, but reasonable ceiling.
+ const maxMechs = 64
+ if n > maxMechs || int(n)*2 > len(rest) {
+ return nil, errors.New("invalid mechanism count")
+ }
s := &userAuthRequestGSSAPI{
N: n,
OIDS: make([]asn1.ObjectIdentifier, n),
@@ -122,7 +129,6 @@ func parseGSSAPIPayload(payload []byte) (*userAuthRequestGSSAPI, error) {
if rest, err = asn1.Unmarshal(desiredMech, &s.OIDS[i]); err != nil {
return nil, err
}
-
}
return s, nil
}
diff --git a/vendor/golang.org/x/crypto/ssh/streamlocal.go b/vendor/golang.org/x/crypto/ssh/streamlocal.go
index b171b330bc..152470fcb7 100644
--- a/vendor/golang.org/x/crypto/ssh/streamlocal.go
+++ b/vendor/golang.org/x/crypto/ssh/streamlocal.go
@@ -44,7 +44,7 @@ func (c *Client) ListenUnix(socketPath string) (net.Listener, error) {
if !ok {
return nil, errors.New("ssh: streamlocal-forward@openssh.com request denied by peer")
}
- ch := c.forwards.add(&net.UnixAddr{Name: socketPath, Net: "unix"})
+ ch := c.forwards.add("unix", socketPath)
return &unixListener{socketPath, c, ch}, nil
}
@@ -96,7 +96,7 @@ func (l *unixListener) Accept() (net.Conn, error) {
// Close closes the listener.
func (l *unixListener) Close() error {
// this also closes the listener.
- l.conn.forwards.remove(&net.UnixAddr{Name: l.socketPath, Net: "unix"})
+ l.conn.forwards.remove("unix", l.socketPath)
m := streamLocalChannelForwardMsg{
l.socketPath,
}
diff --git a/vendor/golang.org/x/crypto/ssh/tcpip.go b/vendor/golang.org/x/crypto/ssh/tcpip.go
index 93d844f035..78c41fe5a1 100644
--- a/vendor/golang.org/x/crypto/ssh/tcpip.go
+++ b/vendor/golang.org/x/crypto/ssh/tcpip.go
@@ -11,6 +11,7 @@ import (
"io"
"math/rand"
"net"
+ "net/netip"
"strconv"
"strings"
"sync"
@@ -22,14 +23,21 @@ import (
// the returned net.Listener. The listener must be serviced, or the
// SSH connection may hang.
// N must be "tcp", "tcp4", "tcp6", or "unix".
+//
+// If the address is a hostname, it is sent to the remote peer as-is, without
+// being resolved locally, and the Listener Addr method will return a zero IP.
func (c *Client) Listen(n, addr string) (net.Listener, error) {
switch n {
case "tcp", "tcp4", "tcp6":
- laddr, err := net.ResolveTCPAddr(n, addr)
+ host, portStr, err := net.SplitHostPort(addr)
+ if err != nil {
+ return nil, err
+ }
+ port, err := strconv.ParseInt(portStr, 10, 32)
if err != nil {
return nil, err
}
- return c.ListenTCP(laddr)
+ return c.listenTCPInternal(host, int(port))
case "unix":
return c.ListenUnix(addr)
default:
@@ -102,15 +110,24 @@ func (c *Client) handleForwards() {
// ListenTCP requests the remote peer open a listening socket
// on laddr. Incoming connections will be available by calling
// Accept on the returned net.Listener.
+//
+// ListenTCP accepts an IP address, to provide a hostname use [Client.Listen]
+// with "tcp", "tcp4", or "tcp6" network instead.
func (c *Client) ListenTCP(laddr *net.TCPAddr) (net.Listener, error) {
c.handleForwardsOnce.Do(c.handleForwards)
if laddr.Port == 0 && isBrokenOpenSSHVersion(string(c.ServerVersion())) {
return c.autoPortListenWorkaround(laddr)
}
+ return c.listenTCPInternal(laddr.IP.String(), laddr.Port)
+}
+
+func (c *Client) listenTCPInternal(host string, port int) (net.Listener, error) {
+ c.handleForwardsOnce.Do(c.handleForwards)
+
m := channelForwardMsg{
- laddr.IP.String(),
- uint32(laddr.Port),
+ host,
+ uint32(port),
}
// send message
ok, resp, err := c.SendRequest("tcpip-forward", true, Marshal(&m))
@@ -123,20 +140,33 @@ func (c *Client) ListenTCP(laddr *net.TCPAddr) (net.Listener, error) {
// If the original port was 0, then the remote side will
// supply a real port number in the response.
- if laddr.Port == 0 {
+ if port == 0 {
var p struct {
Port uint32
}
if err := Unmarshal(resp, &p); err != nil {
return nil, err
}
- laddr.Port = int(p.Port)
+ port = int(p.Port)
}
+ // Construct a local address placeholder for the remote listener. If the
+ // original host is an IP address, preserve it so that Listener.Addr()
+ // reports the same IP. If the host is a hostname or cannot be parsed as an
+ // IP, fall back to IPv4zero. The port field is always set, even if the
+ // original port was 0, because in that case the remote server will assign
+ // one, allowing callers to determine which port was selected.
+ ip := net.IPv4zero
+ if parsed, err := netip.ParseAddr(host); err == nil {
+ ip = net.IP(parsed.AsSlice())
+ }
+ laddr := &net.TCPAddr{
+ IP: ip,
+ Port: port,
+ }
+ addr := net.JoinHostPort(host, strconv.FormatInt(int64(port), 10))
+ ch := c.forwards.add("tcp", addr)
- // Register this forward, using the port number we obtained.
- ch := c.forwards.add(laddr)
-
- return &tcpListener{laddr, c, ch}, nil
+ return &tcpListener{laddr, addr, c, ch}, nil
}
// forwardList stores a mapping between remote
@@ -149,8 +179,9 @@ type forwardList struct {
// forwardEntry represents an established mapping of a laddr on a
// remote ssh server to a channel connected to a tcpListener.
type forwardEntry struct {
- laddr net.Addr
- c chan forward
+ addr string // host:port or socket path
+ network string // tcp or unix
+ c chan forward
}
// forward represents an incoming forwarded tcpip connection. The
@@ -161,12 +192,13 @@ type forward struct {
raddr net.Addr // the raddr of the incoming connection
}
-func (l *forwardList) add(addr net.Addr) chan forward {
+func (l *forwardList) add(n, addr string) chan forward {
l.Lock()
defer l.Unlock()
f := forwardEntry{
- laddr: addr,
- c: make(chan forward, 1),
+ addr: addr,
+ network: n,
+ c: make(chan forward, 1),
}
l.entries = append(l.entries, f)
return f.c
@@ -185,19 +217,20 @@ func parseTCPAddr(addr string, port uint32) (*net.TCPAddr, error) {
if port == 0 || port > 65535 {
return nil, fmt.Errorf("ssh: port number out of range: %d", port)
}
- ip := net.ParseIP(string(addr))
- if ip == nil {
+ ip, err := netip.ParseAddr(addr)
+ if err != nil {
return nil, fmt.Errorf("ssh: cannot parse IP address %q", addr)
}
- return &net.TCPAddr{IP: ip, Port: int(port)}, nil
+ return &net.TCPAddr{IP: net.IP(ip.AsSlice()), Port: int(port)}, nil
}
func (l *forwardList) handleChannels(in <-chan NewChannel) {
for ch := range in {
var (
- laddr net.Addr
- raddr net.Addr
- err error
+ addr string
+ network string
+ raddr net.Addr
+ err error
)
switch channelType := ch.ChannelType(); channelType {
case "forwarded-tcpip":
@@ -207,40 +240,34 @@ func (l *forwardList) handleChannels(in <-chan NewChannel) {
continue
}
- // RFC 4254 section 7.2 specifies that incoming
- // addresses should list the address, in string
- // format. It is implied that this should be an IP
- // address, as it would be impossible to connect to it
- // otherwise.
- laddr, err = parseTCPAddr(payload.Addr, payload.Port)
- if err != nil {
- ch.Reject(ConnectionFailed, err.Error())
- continue
- }
+ // RFC 4254 section 7.2 specifies that incoming addresses should
+ // list the address that was connected, in string format. It is the
+ // same address used in the tcpip-forward request. The originator
+ // address is an IP address instead.
+ addr = net.JoinHostPort(payload.Addr, strconv.FormatUint(uint64(payload.Port), 10))
+
raddr, err = parseTCPAddr(payload.OriginAddr, payload.OriginPort)
if err != nil {
ch.Reject(ConnectionFailed, err.Error())
continue
}
-
+ network = "tcp"
case "forwarded-streamlocal@openssh.com":
var payload forwardedStreamLocalPayload
if err = Unmarshal(ch.ExtraData(), &payload); err != nil {
ch.Reject(ConnectionFailed, "could not parse forwarded-streamlocal@openssh.com payload: "+err.Error())
continue
}
- laddr = &net.UnixAddr{
- Name: payload.SocketPath,
- Net: "unix",
- }
+ addr = payload.SocketPath
raddr = &net.UnixAddr{
Name: "@",
Net: "unix",
}
+ network = "unix"
default:
panic(fmt.Errorf("ssh: unknown channel type %s", channelType))
}
- if ok := l.forward(laddr, raddr, ch); !ok {
+ if ok := l.forward(network, addr, raddr, ch); !ok {
// Section 7.2, implementations MUST reject spurious incoming
// connections.
ch.Reject(Prohibited, "no forward for address")
@@ -252,11 +279,11 @@ func (l *forwardList) handleChannels(in <-chan NewChannel) {
// remove removes the forward entry, and the channel feeding its
// listener.
-func (l *forwardList) remove(addr net.Addr) {
+func (l *forwardList) remove(n, addr string) {
l.Lock()
defer l.Unlock()
for i, f := range l.entries {
- if addr.Network() == f.laddr.Network() && addr.String() == f.laddr.String() {
+ if n == f.network && addr == f.addr {
l.entries = append(l.entries[:i], l.entries[i+1:]...)
close(f.c)
return
@@ -274,11 +301,11 @@ func (l *forwardList) closeAll() {
l.entries = nil
}
-func (l *forwardList) forward(laddr, raddr net.Addr, ch NewChannel) bool {
+func (l *forwardList) forward(n, addr string, raddr net.Addr, ch NewChannel) bool {
l.Lock()
defer l.Unlock()
for _, f := range l.entries {
- if laddr.Network() == f.laddr.Network() && laddr.String() == f.laddr.String() {
+ if n == f.network && addr == f.addr {
f.c <- forward{newCh: ch, raddr: raddr}
return true
}
@@ -288,6 +315,7 @@ func (l *forwardList) forward(laddr, raddr net.Addr, ch NewChannel) bool {
type tcpListener struct {
laddr *net.TCPAddr
+ addr string
conn *Client
in <-chan forward
@@ -314,13 +342,21 @@ func (l *tcpListener) Accept() (net.Conn, error) {
// Close closes the listener.
func (l *tcpListener) Close() error {
+ host, port, err := net.SplitHostPort(l.addr)
+ if err != nil {
+ return err
+ }
+ rport, err := strconv.ParseUint(port, 10, 32)
+ if err != nil {
+ return err
+ }
m := channelForwardMsg{
- l.laddr.IP.String(),
- uint32(l.laddr.Port),
+ host,
+ uint32(rport),
}
// this also closes the listener.
- l.conn.forwards.remove(l.laddr)
+ l.conn.forwards.remove("tcp", l.addr)
ok, _, err := l.conn.SendRequest("cancel-tcpip-forward", true, Marshal(&m))
if err == nil && !ok {
err = errors.New("ssh: cancel-tcpip-forward failed")
diff --git a/vendor/golang.org/x/exp/typeparams/common.go b/vendor/golang.org/x/exp/typeparams/common.go
index 7f867cf8f1..820ca7bde9 100644
--- a/vendor/golang.org/x/exp/typeparams/common.go
+++ b/vendor/golang.org/x/exp/typeparams/common.go
@@ -116,7 +116,7 @@ func OriginMethod(fn *types.Func) *types.Func {
// implements the following rule for uninstantiated generic types:
//
// If V and T are generic named types, then V is considered assignable to T if,
-// for every possible instantation of V[A_1, ..., A_N], the instantiation
+// for every possible instantiation of V[A_1, ..., A_N], the instantiation
// T[A_1, ..., A_N] is valid and V[A_1, ..., A_N] implements T[A_1, ..., A_N].
//
// If T has structural constraints, they must be satisfied by V.
diff --git a/vendor/golang.org/x/net/http2/frame.go b/vendor/golang.org/x/net/http2/frame.go
index 93bcaab03a..9a4bd123c9 100644
--- a/vendor/golang.org/x/net/http2/frame.go
+++ b/vendor/golang.org/x/net/http2/frame.go
@@ -280,6 +280,8 @@ type Framer struct {
// lastHeaderStream is non-zero if the last frame was an
// unfinished HEADERS/CONTINUATION.
lastHeaderStream uint32
+ // lastFrameType holds the type of the last frame for verifying frame order.
+ lastFrameType FrameType
maxReadSize uint32
headerBuf [frameHeaderLen]byte
@@ -488,30 +490,41 @@ func terminalReadFrameError(err error) bool {
return err != nil
}
-// ReadFrame reads a single frame. The returned Frame is only valid
-// until the next call to ReadFrame.
+// ReadFrameHeader reads the header of the next frame.
+// It reads the 9-byte fixed frame header, and does not read any portion of the
+// frame payload. The caller is responsible for consuming the payload, either
+// with ReadFrameForHeader or directly from the Framer's io.Reader.
//
-// If the frame is larger than previously set with SetMaxReadFrameSize, the
-// returned error is ErrFrameTooLarge. Other errors may be of type
-// ConnectionError, StreamError, or anything else from the underlying
-// reader.
+// If the frame is larger than previously set with SetMaxReadFrameSize, it
+// returns the frame header and ErrFrameTooLarge.
//
-// If ReadFrame returns an error and a non-nil Frame, the Frame's StreamID
-// indicates the stream responsible for the error.
-func (fr *Framer) ReadFrame() (Frame, error) {
+// If the returned FrameHeader.StreamID is non-zero, it indicates the stream
+// responsible for the error.
+func (fr *Framer) ReadFrameHeader() (FrameHeader, error) {
fr.errDetail = nil
- if fr.lastFrame != nil {
- fr.lastFrame.invalidate()
- }
fh, err := readFrameHeader(fr.headerBuf[:], fr.r)
if err != nil {
- return nil, err
+ return fh, err
}
if fh.Length > fr.maxReadSize {
if fh == invalidHTTP1LookingFrameHeader() {
- return nil, fmt.Errorf("http2: failed reading the frame payload: %w, note that the frame header looked like an HTTP/1.1 header", ErrFrameTooLarge)
+ return fh, fmt.Errorf("http2: failed reading the frame payload: %w, note that the frame header looked like an HTTP/1.1 header", ErrFrameTooLarge)
}
- return nil, ErrFrameTooLarge
+ return fh, ErrFrameTooLarge
+ }
+ if err := fr.checkFrameOrder(fh); err != nil {
+ return fh, err
+ }
+ return fh, nil
+}
+
+// ReadFrameForHeader reads the payload for the frame with the given FrameHeader.
+//
+// It behaves identically to ReadFrame, other than not checking the maximum
+// frame size.
+func (fr *Framer) ReadFrameForHeader(fh FrameHeader) (Frame, error) {
+ if fr.lastFrame != nil {
+ fr.lastFrame.invalidate()
}
payload := fr.getReadBuf(fh.Length)
if _, err := io.ReadFull(fr.r, payload); err != nil {
@@ -527,9 +540,7 @@ func (fr *Framer) ReadFrame() (Frame, error) {
}
return nil, err
}
- if err := fr.checkFrameOrder(f); err != nil {
- return nil, err
- }
+ fr.lastFrame = f
if fr.logReads {
fr.debugReadLoggerf("http2: Framer %p: read %v", fr, summarizeFrame(f))
}
@@ -539,6 +550,24 @@ func (fr *Framer) ReadFrame() (Frame, error) {
return f, nil
}
+// ReadFrame reads a single frame. The returned Frame is only valid
+// until the next call to ReadFrame or ReadFrameBodyForHeader.
+//
+// If the frame is larger than previously set with SetMaxReadFrameSize, the
+// returned error is ErrFrameTooLarge. Other errors may be of type
+// ConnectionError, StreamError, or anything else from the underlying
+// reader.
+//
+// If ReadFrame returns an error and a non-nil Frame, the Frame's StreamID
+// indicates the stream responsible for the error.
+func (fr *Framer) ReadFrame() (Frame, error) {
+ fh, err := fr.ReadFrameHeader()
+ if err != nil {
+ return nil, err
+ }
+ return fr.ReadFrameForHeader(fh)
+}
+
// connError returns ConnectionError(code) but first
// stashes away a public reason to the caller can optionally relay it
// to the peer before hanging up on them. This might help others debug
@@ -551,20 +580,19 @@ func (fr *Framer) connError(code ErrCode, reason string) error {
// checkFrameOrder reports an error if f is an invalid frame to return
// next from ReadFrame. Mostly it checks whether HEADERS and
// CONTINUATION frames are contiguous.
-func (fr *Framer) checkFrameOrder(f Frame) error {
- last := fr.lastFrame
- fr.lastFrame = f
+func (fr *Framer) checkFrameOrder(fh FrameHeader) error {
+ lastType := fr.lastFrameType
+ fr.lastFrameType = fh.Type
if fr.AllowIllegalReads {
return nil
}
- fh := f.Header()
if fr.lastHeaderStream != 0 {
if fh.Type != FrameContinuation {
return fr.connError(ErrCodeProtocol,
fmt.Sprintf("got %s for stream %d; expected CONTINUATION following %s for stream %d",
fh.Type, fh.StreamID,
- last.Header().Type, fr.lastHeaderStream))
+ lastType, fr.lastHeaderStream))
}
if fh.StreamID != fr.lastHeaderStream {
return fr.connError(ErrCodeProtocol,
@@ -1161,7 +1189,7 @@ var defaultRFC9218Priority = PriorityParam{
// PriorityParam struct below is a superset of both schemes. The exported
// symbols are from RFC 7540 and the non-exported ones are from RFC 9218.
-// PriorityParam are the stream prioritzation parameters.
+// PriorityParam are the stream prioritization parameters.
type PriorityParam struct {
// StreamDep is a 31-bit stream identifier for the
// stream that this stream depends on. Zero means no
diff --git a/vendor/golang.org/x/net/http2/transport.go b/vendor/golang.org/x/net/http2/transport.go
index be759b6065..1965913e54 100644
--- a/vendor/golang.org/x/net/http2/transport.go
+++ b/vendor/golang.org/x/net/http2/transport.go
@@ -9,6 +9,7 @@ package http2
import (
"bufio"
"bytes"
+ "compress/flate"
"compress/gzip"
"context"
"crypto/rand"
@@ -3076,35 +3077,102 @@ type erringRoundTripper struct{ err error }
func (rt erringRoundTripper) RoundTripErr() error { return rt.err }
func (rt erringRoundTripper) RoundTrip(*http.Request) (*http.Response, error) { return nil, rt.err }
+var errConcurrentReadOnResBody = errors.New("http2: concurrent read on response body")
+
// gzipReader wraps a response body so it can lazily
-// call gzip.NewReader on the first call to Read
+// get gzip.Reader from the pool on the first call to Read.
+// After Close is called it puts gzip.Reader to the pool immediately
+// if there is no Read in progress or later when Read completes.
type gzipReader struct {
_ incomparable
body io.ReadCloser // underlying Response.Body
- zr *gzip.Reader // lazily-initialized gzip reader
- zerr error // sticky error
+ mu sync.Mutex // guards zr and zerr
+ zr *gzip.Reader // stores gzip reader from the pool between reads
+ zerr error // sticky gzip reader init error or sentinel value to detect concurrent read and read after close
}
-func (gz *gzipReader) Read(p []byte) (n int, err error) {
+type eofReader struct{}
+
+func (eofReader) Read([]byte) (int, error) { return 0, io.EOF }
+func (eofReader) ReadByte() (byte, error) { return 0, io.EOF }
+
+var gzipPool = sync.Pool{New: func() any { return new(gzip.Reader) }}
+
+// gzipPoolGet gets a gzip.Reader from the pool and resets it to read from r.
+func gzipPoolGet(r io.Reader) (*gzip.Reader, error) {
+ zr := gzipPool.Get().(*gzip.Reader)
+ if err := zr.Reset(r); err != nil {
+ gzipPoolPut(zr)
+ return nil, err
+ }
+ return zr, nil
+}
+
+// gzipPoolPut puts a gzip.Reader back into the pool.
+func gzipPoolPut(zr *gzip.Reader) {
+ // Reset will allocate bufio.Reader if we pass it anything
+ // other than a flate.Reader, so ensure that it's getting one.
+ var r flate.Reader = eofReader{}
+ zr.Reset(r)
+ gzipPool.Put(zr)
+}
+
+// acquire returns a gzip.Reader for reading response body.
+// The reader must be released after use.
+func (gz *gzipReader) acquire() (*gzip.Reader, error) {
+ gz.mu.Lock()
+ defer gz.mu.Unlock()
if gz.zerr != nil {
- return 0, gz.zerr
+ return nil, gz.zerr
}
if gz.zr == nil {
- gz.zr, err = gzip.NewReader(gz.body)
- if err != nil {
- gz.zerr = err
- return 0, err
+ gz.zr, gz.zerr = gzipPoolGet(gz.body)
+ if gz.zerr != nil {
+ return nil, gz.zerr
}
}
- return gz.zr.Read(p)
+ ret := gz.zr
+ gz.zr, gz.zerr = nil, errConcurrentReadOnResBody
+ return ret, nil
}
-func (gz *gzipReader) Close() error {
- if err := gz.body.Close(); err != nil {
- return err
+// release returns the gzip.Reader to the pool if Close was called during Read.
+func (gz *gzipReader) release(zr *gzip.Reader) {
+ gz.mu.Lock()
+ defer gz.mu.Unlock()
+ if gz.zerr == errConcurrentReadOnResBody {
+ gz.zr, gz.zerr = zr, nil
+ } else { // fs.ErrClosed
+ gzipPoolPut(zr)
+ }
+}
+
+// close returns the gzip.Reader to the pool immediately or
+// signals release to do so after Read completes.
+func (gz *gzipReader) close() {
+ gz.mu.Lock()
+ defer gz.mu.Unlock()
+ if gz.zerr == nil && gz.zr != nil {
+ gzipPoolPut(gz.zr)
+ gz.zr = nil
}
gz.zerr = fs.ErrClosed
- return nil
+}
+
+func (gz *gzipReader) Read(p []byte) (n int, err error) {
+ zr, err := gz.acquire()
+ if err != nil {
+ return 0, err
+ }
+ defer gz.release(zr)
+
+ return zr.Read(p)
+}
+
+func (gz *gzipReader) Close() error {
+ gz.close()
+
+ return gz.body.Close()
}
type errorReader struct{ err error }
diff --git a/vendor/golang.org/x/net/http2/writesched.go b/vendor/golang.org/x/net/http2/writesched.go
index 4d3890f99a..7de27be525 100644
--- a/vendor/golang.org/x/net/http2/writesched.go
+++ b/vendor/golang.org/x/net/http2/writesched.go
@@ -185,45 +185,75 @@ func (wr *FrameWriteRequest) replyToWriter(err error) {
}
// writeQueue is used by implementations of WriteScheduler.
+//
+// Each writeQueue contains a queue of FrameWriteRequests, meant to store all
+// FrameWriteRequests associated with a given stream. This is implemented as a
+// two-stage queue: currQueue[currPos:] and nextQueue. Removing an item is done
+// by incrementing currPos of currQueue. Adding an item is done by appending it
+// to the nextQueue. If currQueue is empty when trying to remove an item, we
+// can swap currQueue and nextQueue to remedy the situation.
+// This two-stage queue is analogous to the use of two lists in Okasaki's
+// purely functional queue but without the overhead of reversing the list when
+// swapping stages.
+//
+// writeQueue also contains prev and next, this can be used by implementations
+// of WriteScheduler to construct data structures that represent the order of
+// writing between different streams (e.g. circular linked list).
type writeQueue struct {
- s []FrameWriteRequest
+ currQueue []FrameWriteRequest
+ nextQueue []FrameWriteRequest
+ currPos int
+
prev, next *writeQueue
}
-func (q *writeQueue) empty() bool { return len(q.s) == 0 }
+func (q *writeQueue) empty() bool {
+ return (len(q.currQueue) - q.currPos + len(q.nextQueue)) == 0
+}
func (q *writeQueue) push(wr FrameWriteRequest) {
- q.s = append(q.s, wr)
+ q.nextQueue = append(q.nextQueue, wr)
}
func (q *writeQueue) shift() FrameWriteRequest {
- if len(q.s) == 0 {
+ if q.empty() {
panic("invalid use of queue")
}
- wr := q.s[0]
- // TODO: less copy-happy queue.
- copy(q.s, q.s[1:])
- q.s[len(q.s)-1] = FrameWriteRequest{}
- q.s = q.s[:len(q.s)-1]
+ if q.currPos >= len(q.currQueue) {
+ q.currQueue, q.currPos, q.nextQueue = q.nextQueue, 0, q.currQueue[:0]
+ }
+ wr := q.currQueue[q.currPos]
+ q.currQueue[q.currPos] = FrameWriteRequest{}
+ q.currPos++
return wr
}
+func (q *writeQueue) peek() *FrameWriteRequest {
+ if q.currPos < len(q.currQueue) {
+ return &q.currQueue[q.currPos]
+ }
+ if len(q.nextQueue) > 0 {
+ return &q.nextQueue[0]
+ }
+ return nil
+}
+
// consume consumes up to n bytes from q.s[0]. If the frame is
// entirely consumed, it is removed from the queue. If the frame
// is partially consumed, the frame is kept with the consumed
// bytes removed. Returns true iff any bytes were consumed.
func (q *writeQueue) consume(n int32) (FrameWriteRequest, bool) {
- if len(q.s) == 0 {
+ if q.empty() {
return FrameWriteRequest{}, false
}
- consumed, rest, numresult := q.s[0].Consume(n)
+ consumed, rest, numresult := q.peek().Consume(n)
switch numresult {
case 0:
return FrameWriteRequest{}, false
case 1:
q.shift()
case 2:
- q.s[0] = rest
+ *q.peek() = rest
}
return consumed, true
}
@@ -232,10 +262,15 @@ type writeQueuePool []*writeQueue
// put inserts an unused writeQueue into the pool.
func (p *writeQueuePool) put(q *writeQueue) {
- for i := range q.s {
- q.s[i] = FrameWriteRequest{}
+ for i := range q.currQueue {
+ q.currQueue[i] = FrameWriteRequest{}
+ }
+ for i := range q.nextQueue {
+ q.nextQueue[i] = FrameWriteRequest{}
}
- q.s = q.s[:0]
+ q.currQueue = q.currQueue[:0]
+ q.nextQueue = q.nextQueue[:0]
+ q.currPos = 0
*p = append(*p, q)
}
diff --git a/vendor/golang.org/x/net/http2/writesched_priority_rfc7540.go b/vendor/golang.org/x/net/http2/writesched_priority_rfc7540.go
index 6d24d6a1b9..4e33c29a24 100644
--- a/vendor/golang.org/x/net/http2/writesched_priority_rfc7540.go
+++ b/vendor/golang.org/x/net/http2/writesched_priority_rfc7540.go
@@ -214,8 +214,8 @@ func (z sortPriorityNodeSiblingsRFC7540) Swap(i, k int) { z[i], z[k] = z[k], z[i
func (z sortPriorityNodeSiblingsRFC7540) Less(i, k int) bool {
// Prefer the subtree that has sent fewer bytes relative to its weight.
// See sections 5.3.2 and 5.3.4.
- wi, bi := float64(z[i].weight+1), float64(z[i].subtreeBytes)
- wk, bk := float64(z[k].weight+1), float64(z[k].subtreeBytes)
+ wi, bi := float64(z[i].weight)+1, float64(z[i].subtreeBytes)
+ wk, bk := float64(z[k].weight)+1, float64(z[k].subtreeBytes)
if bi == 0 && bk == 0 {
return wi >= wk
}
@@ -302,7 +302,6 @@ func (ws *priorityWriteSchedulerRFC7540) CloseStream(streamID uint32) {
q := n.q
ws.queuePool.put(&q)
- n.q.s = nil
if ws.maxClosedNodesInTree > 0 {
ws.addClosedOrIdleNode(&ws.closedNodes, ws.maxClosedNodesInTree, n)
} else {
diff --git a/vendor/golang.org/x/net/http2/writesched_priority_rfc9128.go b/vendor/golang.org/x/net/http2/writesched_priority_rfc9218.go
similarity index 99%
rename from vendor/golang.org/x/net/http2/writesched_priority_rfc9128.go
rename to vendor/golang.org/x/net/http2/writesched_priority_rfc9218.go
index 9b5b8808eb..cb4cadc32d 100644
--- a/vendor/golang.org/x/net/http2/writesched_priority_rfc9128.go
+++ b/vendor/golang.org/x/net/http2/writesched_priority_rfc9218.go
@@ -39,7 +39,7 @@ type priorityWriteSchedulerRFC9218 struct {
prioritizeIncremental bool
}
-func newPriorityWriteSchedulerRFC9128() WriteScheduler {
+func newPriorityWriteSchedulerRFC9218() WriteScheduler {
ws := &priorityWriteSchedulerRFC9218{
streams: make(map[uint32]streamMetadata),
}
diff --git a/vendor/golang.org/x/oauth2/deviceauth.go b/vendor/golang.org/x/oauth2/deviceauth.go
index e99c92f39c..e783a94374 100644
--- a/vendor/golang.org/x/oauth2/deviceauth.go
+++ b/vendor/golang.org/x/oauth2/deviceauth.go
@@ -6,6 +6,7 @@ import (
"errors"
"fmt"
"io"
+ "mime"
"net/http"
"net/url"
"strings"
@@ -116,10 +117,38 @@ func retrieveDeviceAuth(ctx context.Context, c *Config, v url.Values) (*DeviceAu
return nil, fmt.Errorf("oauth2: cannot auth device: %v", err)
}
if code := r.StatusCode; code < 200 || code > 299 {
- return nil, &RetrieveError{
+ retrieveError := &RetrieveError{
Response: r,
Body: body,
}
+
+ content, _, _ := mime.ParseMediaType(r.Header.Get("Content-Type"))
+ switch content {
+ case "application/x-www-form-urlencoded", "text/plain":
+ // some endpoints return a query string
+ vals, err := url.ParseQuery(string(body))
+ if err != nil {
+ return nil, retrieveError
+ }
+ retrieveError.ErrorCode = vals.Get("error")
+ retrieveError.ErrorDescription = vals.Get("error_description")
+ retrieveError.ErrorURI = vals.Get("error_uri")
+ default:
+ var tj struct {
+ // https://datatracker.ietf.org/doc/html/rfc6749#section-5.2
+ ErrorCode string `json:"error"`
+ ErrorDescription string `json:"error_description"`
+ ErrorURI string `json:"error_uri"`
+ }
+ if json.Unmarshal(body, &tj) != nil {
+ return nil, retrieveError
+ }
+ retrieveError.ErrorCode = tj.ErrorCode
+ retrieveError.ErrorDescription = tj.ErrorDescription
+ retrieveError.ErrorURI = tj.ErrorURI
+ }
+
+ return nil, retrieveError
}
da := &DeviceAuthResponse{}
diff --git a/vendor/golang.org/x/oauth2/oauth2.go b/vendor/golang.org/x/oauth2/oauth2.go
index de34feb844..5c527d31fd 100644
--- a/vendor/golang.org/x/oauth2/oauth2.go
+++ b/vendor/golang.org/x/oauth2/oauth2.go
@@ -9,7 +9,6 @@
package oauth2 // import "golang.org/x/oauth2"
import (
- "bytes"
"context"
"errors"
"net/http"
@@ -99,7 +98,7 @@ const (
// in the POST body as application/x-www-form-urlencoded parameters.
AuthStyleInParams AuthStyle = 1
- // AuthStyleInHeader sends the client_id and client_password
+ // AuthStyleInHeader sends the client_id and client_secret
// using HTTP Basic Authorization. This is an optional style
// described in the OAuth2 RFC 6749 section 2.3.1.
AuthStyleInHeader AuthStyle = 2
@@ -158,7 +157,7 @@ func SetAuthURLParam(key, value string) AuthCodeOption {
// PKCE), https://www.oauth.com/oauth2-servers/pkce/ and
// https://www.ietf.org/archive/id/draft-ietf-oauth-v2-1-09.html#name-cross-site-request-forgery (describing both approaches)
func (c *Config) AuthCodeURL(state string, opts ...AuthCodeOption) string {
- var buf bytes.Buffer
+ var buf strings.Builder
buf.WriteString(c.Endpoint.AuthURL)
v := url.Values{
"response_type": {"code"},
diff --git a/vendor/golang.org/x/oauth2/pkce.go b/vendor/golang.org/x/oauth2/pkce.go
index cea8374d51..f99384f0f5 100644
--- a/vendor/golang.org/x/oauth2/pkce.go
+++ b/vendor/golang.org/x/oauth2/pkce.go
@@ -51,7 +51,7 @@ func S256ChallengeFromVerifier(verifier string) string {
return base64.RawURLEncoding.EncodeToString(sha[:])
}
-// S256ChallengeOption derives a PKCE code challenge derived from verifier with
+// S256ChallengeOption derives a PKCE code challenge from the verifier with
// method S256. It should be passed to [Config.AuthCodeURL] or [Config.DeviceAuth]
// only.
func S256ChallengeOption(verifier string) AuthCodeOption {
diff --git a/vendor/golang.org/x/oauth2/token.go b/vendor/golang.org/x/oauth2/token.go
index 239ec32962..e995eebb5e 100644
--- a/vendor/golang.org/x/oauth2/token.go
+++ b/vendor/golang.org/x/oauth2/token.go
@@ -103,7 +103,7 @@ func (t *Token) WithExtra(extra any) *Token {
}
// Extra returns an extra field.
-// Extra fields are key-value pairs returned by the server as a
+// Extra fields are key-value pairs returned by the server as
// part of the token retrieval response.
func (t *Token) Extra(key string) any {
if raw, ok := t.raw.(map[string]any); ok {
diff --git a/vendor/golang.org/x/oauth2/transport.go b/vendor/golang.org/x/oauth2/transport.go
index 8bbebbac9e..9922ec3316 100644
--- a/vendor/golang.org/x/oauth2/transport.go
+++ b/vendor/golang.org/x/oauth2/transport.go
@@ -58,7 +58,7 @@ func (t *Transport) RoundTrip(req *http.Request) (*http.Response, error) {
var cancelOnce sync.Once
// CancelRequest does nothing. It used to be a legacy cancellation mechanism
-// but now only it only logs on first use to warn that it's deprecated.
+// but now only logs on first use to warn that it's deprecated.
//
// Deprecated: use contexts for cancellation instead.
func (t *Transport) CancelRequest(req *http.Request) {
diff --git a/vendor/golang.org/x/sync/errgroup/errgroup.go b/vendor/golang.org/x/sync/errgroup/errgroup.go
index 1d8cffae8c..2f45dbc86e 100644
--- a/vendor/golang.org/x/sync/errgroup/errgroup.go
+++ b/vendor/golang.org/x/sync/errgroup/errgroup.go
@@ -3,7 +3,7 @@
// license that can be found in the LICENSE file.
// Package errgroup provides synchronization, error propagation, and Context
-// cancelation for groups of goroutines working on subtasks of a common task.
+// cancellation for groups of goroutines working on subtasks of a common task.
//
// [errgroup.Group] is related to [sync.WaitGroup] but adds handling of tasks
// returning errors.
diff --git a/vendor/golang.org/x/sys/cpu/cpu.go b/vendor/golang.org/x/sys/cpu/cpu.go
index 63541994ef..34c9ae76ef 100644
--- a/vendor/golang.org/x/sys/cpu/cpu.go
+++ b/vendor/golang.org/x/sys/cpu/cpu.go
@@ -92,6 +92,9 @@ var ARM64 struct {
HasSHA2 bool // SHA2 hardware implementation
HasCRC32 bool // CRC32 hardware implementation
HasATOMICS bool // Atomic memory operation instruction set
+ HasHPDS bool // Hierarchical permission disables in translations tables
+ HasLOR bool // Limited ordering regions
+ HasPAN bool // Privileged access never
HasFPHP bool // Half precision floating-point instruction set
HasASIMDHP bool // Advanced SIMD half precision instruction set
HasCPUID bool // CPUID identification scheme registers
diff --git a/vendor/golang.org/x/sys/cpu/cpu_arm64.go b/vendor/golang.org/x/sys/cpu/cpu_arm64.go
index af2aa99f9f..f449c679fe 100644
--- a/vendor/golang.org/x/sys/cpu/cpu_arm64.go
+++ b/vendor/golang.org/x/sys/cpu/cpu_arm64.go
@@ -65,10 +65,10 @@ func setMinimalFeatures() {
func readARM64Registers() {
Initialized = true
- parseARM64SystemRegisters(getisar0(), getisar1(), getpfr0())
+ parseARM64SystemRegisters(getisar0(), getisar1(), getmmfr1(), getpfr0())
}
-func parseARM64SystemRegisters(isar0, isar1, pfr0 uint64) {
+func parseARM64SystemRegisters(isar0, isar1, mmfr1, pfr0 uint64) {
// ID_AA64ISAR0_EL1
switch extractBits(isar0, 4, 7) {
case 1:
@@ -152,6 +152,22 @@ func parseARM64SystemRegisters(isar0, isar1, pfr0 uint64) {
ARM64.HasI8MM = true
}
+ // ID_AA64MMFR1_EL1
+ switch extractBits(mmfr1, 12, 15) {
+ case 1, 2:
+ ARM64.HasHPDS = true
+ }
+
+ switch extractBits(mmfr1, 16, 19) {
+ case 1:
+ ARM64.HasLOR = true
+ }
+
+ switch extractBits(mmfr1, 20, 23) {
+ case 1, 2, 3:
+ ARM64.HasPAN = true
+ }
+
// ID_AA64PFR0_EL1
switch extractBits(pfr0, 16, 19) {
case 0:
diff --git a/vendor/golang.org/x/sys/cpu/cpu_arm64.s b/vendor/golang.org/x/sys/cpu/cpu_arm64.s
index 22cc99844a..a4f24b3b0c 100644
--- a/vendor/golang.org/x/sys/cpu/cpu_arm64.s
+++ b/vendor/golang.org/x/sys/cpu/cpu_arm64.s
@@ -9,31 +9,34 @@
// func getisar0() uint64
TEXT ·getisar0(SB),NOSPLIT,$0-8
// get Instruction Set Attributes 0 into x0
- // mrs x0, ID_AA64ISAR0_EL1 = d5380600
- WORD $0xd5380600
+ MRS ID_AA64ISAR0_EL1, R0
MOVD R0, ret+0(FP)
RET
// func getisar1() uint64
TEXT ·getisar1(SB),NOSPLIT,$0-8
// get Instruction Set Attributes 1 into x0
- // mrs x0, ID_AA64ISAR1_EL1 = d5380620
- WORD $0xd5380620
+ MRS ID_AA64ISAR1_EL1, R0
+ MOVD R0, ret+0(FP)
+ RET
+
+// func getmmfr1() uint64
+TEXT ·getmmfr1(SB),NOSPLIT,$0-8
+ // get Memory Model Feature Register 1 into x0
+ MRS ID_AA64MMFR1_EL1, R0
MOVD R0, ret+0(FP)
RET
// func getpfr0() uint64
TEXT ·getpfr0(SB),NOSPLIT,$0-8
// get Processor Feature Register 0 into x0
- // mrs x0, ID_AA64PFR0_EL1 = d5380400
- WORD $0xd5380400
+ MRS ID_AA64PFR0_EL1, R0
MOVD R0, ret+0(FP)
RET
// func getzfr0() uint64
TEXT ·getzfr0(SB),NOSPLIT,$0-8
// get SVE Feature Register 0 into x0
- // mrs x0, ID_AA64ZFR0_EL1 = d5380480
- WORD $0xd5380480
+ MRS ID_AA64ZFR0_EL1, R0
MOVD R0, ret+0(FP)
RET
diff --git a/vendor/golang.org/x/sys/cpu/cpu_gc_arm64.go b/vendor/golang.org/x/sys/cpu/cpu_gc_arm64.go
index 6ac6e1efb2..e3fc5a8d31 100644
--- a/vendor/golang.org/x/sys/cpu/cpu_gc_arm64.go
+++ b/vendor/golang.org/x/sys/cpu/cpu_gc_arm64.go
@@ -8,5 +8,6 @@ package cpu
func getisar0() uint64
func getisar1() uint64
+func getmmfr1() uint64
func getpfr0() uint64
func getzfr0() uint64
diff --git a/vendor/golang.org/x/sys/cpu/cpu_gccgo_arm64.go b/vendor/golang.org/x/sys/cpu/cpu_gccgo_arm64.go
index 7f1946780b..8df2079e15 100644
--- a/vendor/golang.org/x/sys/cpu/cpu_gccgo_arm64.go
+++ b/vendor/golang.org/x/sys/cpu/cpu_gccgo_arm64.go
@@ -8,4 +8,5 @@ package cpu
func getisar0() uint64 { return 0 }
func getisar1() uint64 { return 0 }
+func getmmfr1() uint64 { return 0 }
func getpfr0() uint64 { return 0 }
diff --git a/vendor/golang.org/x/sys/cpu/cpu_netbsd_arm64.go b/vendor/golang.org/x/sys/cpu/cpu_netbsd_arm64.go
index ebfb3fc8e7..19aea0633e 100644
--- a/vendor/golang.org/x/sys/cpu/cpu_netbsd_arm64.go
+++ b/vendor/golang.org/x/sys/cpu/cpu_netbsd_arm64.go
@@ -167,7 +167,7 @@ func doinit() {
setMinimalFeatures()
return
}
- parseARM64SystemRegisters(cpuid.aa64isar0, cpuid.aa64isar1, cpuid.aa64pfr0)
+ parseARM64SystemRegisters(cpuid.aa64isar0, cpuid.aa64isar1, cpuid.aa64mmfr1, cpuid.aa64pfr0)
Initialized = true
}
diff --git a/vendor/golang.org/x/sys/cpu/cpu_openbsd_arm64.go b/vendor/golang.org/x/sys/cpu/cpu_openbsd_arm64.go
index 85b64d5ccb..87fd3a7780 100644
--- a/vendor/golang.org/x/sys/cpu/cpu_openbsd_arm64.go
+++ b/vendor/golang.org/x/sys/cpu/cpu_openbsd_arm64.go
@@ -59,7 +59,7 @@ func doinit() {
if !ok {
return
}
- parseARM64SystemRegisters(isar0, isar1, 0)
+ parseARM64SystemRegisters(isar0, isar1, 0, 0)
Initialized = true
}
diff --git a/vendor/golang.org/x/sys/unix/mkerrors.sh b/vendor/golang.org/x/sys/unix/mkerrors.sh
index d1c8b2640e..42517077c4 100644
--- a/vendor/golang.org/x/sys/unix/mkerrors.sh
+++ b/vendor/golang.org/x/sys/unix/mkerrors.sh
@@ -226,6 +226,7 @@ struct ltchars {
#include
#include
#include
+#include
#include
#include
#include
@@ -529,6 +530,7 @@ ccflags="$@"
$2 ~ /^O[CNPFPL][A-Z]+[^_][A-Z]+$/ ||
$2 ~ /^(NL|CR|TAB|BS|VT|FF)DLY$/ ||
$2 ~ /^(NL|CR|TAB|BS|VT|FF)[0-9]$/ ||
+ $2 ~ /^(DT|EI|ELF|EV|NN|NT|PF|SHF|SHN|SHT|STB|STT|VER)_/ ||
$2 ~ /^O?XTABS$/ ||
$2 ~ /^TC[IO](ON|OFF)$/ ||
$2 ~ /^IN_/ ||
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux.go b/vendor/golang.org/x/sys/unix/syscall_linux.go
index 9439af961d..06c0eea6fb 100644
--- a/vendor/golang.org/x/sys/unix/syscall_linux.go
+++ b/vendor/golang.org/x/sys/unix/syscall_linux.go
@@ -2643,3 +2643,9 @@ func SchedGetAttr(pid int, flags uint) (*SchedAttr, error) {
//sys Cachestat(fd uint, crange *CachestatRange, cstat *Cachestat_t, flags uint) (err error)
//sys Mseal(b []byte, flags uint) (err error)
+
+//sys setMemPolicy(mode int, mask *CPUSet, size int) (err error) = SYS_SET_MEMPOLICY
+
+func SetMemPolicy(mode int, mask *CPUSet) error {
+ return setMemPolicy(mode, mask, _CPU_SETSIZE)
+}
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux.go b/vendor/golang.org/x/sys/unix/zerrors_linux.go
index b6db27d937..d0a75da572 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux.go
@@ -853,20 +853,86 @@ const (
DM_VERSION_MAJOR = 0x4
DM_VERSION_MINOR = 0x32
DM_VERSION_PATCHLEVEL = 0x0
+ DT_ADDRRNGHI = 0x6ffffeff
+ DT_ADDRRNGLO = 0x6ffffe00
DT_BLK = 0x6
DT_CHR = 0x2
+ DT_DEBUG = 0x15
DT_DIR = 0x4
+ DT_ENCODING = 0x20
DT_FIFO = 0x1
+ DT_FINI = 0xd
+ DT_FLAGS_1 = 0x6ffffffb
+ DT_GNU_HASH = 0x6ffffef5
+ DT_HASH = 0x4
+ DT_HIOS = 0x6ffff000
+ DT_HIPROC = 0x7fffffff
+ DT_INIT = 0xc
+ DT_JMPREL = 0x17
DT_LNK = 0xa
+ DT_LOOS = 0x6000000d
+ DT_LOPROC = 0x70000000
+ DT_NEEDED = 0x1
+ DT_NULL = 0x0
+ DT_PLTGOT = 0x3
+ DT_PLTREL = 0x14
+ DT_PLTRELSZ = 0x2
DT_REG = 0x8
+ DT_REL = 0x11
+ DT_RELA = 0x7
+ DT_RELACOUNT = 0x6ffffff9
+ DT_RELAENT = 0x9
+ DT_RELASZ = 0x8
+ DT_RELCOUNT = 0x6ffffffa
+ DT_RELENT = 0x13
+ DT_RELSZ = 0x12
+ DT_RPATH = 0xf
DT_SOCK = 0xc
+ DT_SONAME = 0xe
+ DT_STRSZ = 0xa
+ DT_STRTAB = 0x5
+ DT_SYMBOLIC = 0x10
+ DT_SYMENT = 0xb
+ DT_SYMTAB = 0x6
+ DT_TEXTREL = 0x16
DT_UNKNOWN = 0x0
+ DT_VALRNGHI = 0x6ffffdff
+ DT_VALRNGLO = 0x6ffffd00
+ DT_VERDEF = 0x6ffffffc
+ DT_VERDEFNUM = 0x6ffffffd
+ DT_VERNEED = 0x6ffffffe
+ DT_VERNEEDNUM = 0x6fffffff
+ DT_VERSYM = 0x6ffffff0
DT_WHT = 0xe
ECHO = 0x8
ECRYPTFS_SUPER_MAGIC = 0xf15f
EFD_SEMAPHORE = 0x1
EFIVARFS_MAGIC = 0xde5e81e4
EFS_SUPER_MAGIC = 0x414a53
+ EI_CLASS = 0x4
+ EI_DATA = 0x5
+ EI_MAG0 = 0x0
+ EI_MAG1 = 0x1
+ EI_MAG2 = 0x2
+ EI_MAG3 = 0x3
+ EI_NIDENT = 0x10
+ EI_OSABI = 0x7
+ EI_PAD = 0x8
+ EI_VERSION = 0x6
+ ELFCLASS32 = 0x1
+ ELFCLASS64 = 0x2
+ ELFCLASSNONE = 0x0
+ ELFCLASSNUM = 0x3
+ ELFDATA2LSB = 0x1
+ ELFDATA2MSB = 0x2
+ ELFDATANONE = 0x0
+ ELFMAG = "\177ELF"
+ ELFMAG0 = 0x7f
+ ELFMAG1 = 'E'
+ ELFMAG2 = 'L'
+ ELFMAG3 = 'F'
+ ELFOSABI_LINUX = 0x3
+ ELFOSABI_NONE = 0x0
EM_386 = 0x3
EM_486 = 0x6
EM_68K = 0x4
@@ -1152,14 +1218,24 @@ const (
ETH_P_WCCP = 0x883e
ETH_P_X25 = 0x805
ETH_P_XDSA = 0xf8
+ ET_CORE = 0x4
+ ET_DYN = 0x3
+ ET_EXEC = 0x2
+ ET_HIPROC = 0xffff
+ ET_LOPROC = 0xff00
+ ET_NONE = 0x0
+ ET_REL = 0x1
EV_ABS = 0x3
EV_CNT = 0x20
+ EV_CURRENT = 0x1
EV_FF = 0x15
EV_FF_STATUS = 0x17
EV_KEY = 0x1
EV_LED = 0x11
EV_MAX = 0x1f
EV_MSC = 0x4
+ EV_NONE = 0x0
+ EV_NUM = 0x2
EV_PWR = 0x16
EV_REL = 0x2
EV_REP = 0x14
@@ -2276,7 +2352,167 @@ const (
NLM_F_REPLACE = 0x100
NLM_F_REQUEST = 0x1
NLM_F_ROOT = 0x100
+ NN_386_IOPERM = "LINUX"
+ NN_386_TLS = "LINUX"
+ NN_ARC_V2 = "LINUX"
+ NN_ARM_FPMR = "LINUX"
+ NN_ARM_GCS = "LINUX"
+ NN_ARM_HW_BREAK = "LINUX"
+ NN_ARM_HW_WATCH = "LINUX"
+ NN_ARM_PACA_KEYS = "LINUX"
+ NN_ARM_PACG_KEYS = "LINUX"
+ NN_ARM_PAC_ENABLED_KEYS = "LINUX"
+ NN_ARM_PAC_MASK = "LINUX"
+ NN_ARM_POE = "LINUX"
+ NN_ARM_SSVE = "LINUX"
+ NN_ARM_SVE = "LINUX"
+ NN_ARM_SYSTEM_CALL = "LINUX"
+ NN_ARM_TAGGED_ADDR_CTRL = "LINUX"
+ NN_ARM_TLS = "LINUX"
+ NN_ARM_VFP = "LINUX"
+ NN_ARM_ZA = "LINUX"
+ NN_ARM_ZT = "LINUX"
+ NN_AUXV = "CORE"
+ NN_FILE = "CORE"
+ NN_GNU_PROPERTY_TYPE_0 = "GNU"
+ NN_LOONGARCH_CPUCFG = "LINUX"
+ NN_LOONGARCH_CSR = "LINUX"
+ NN_LOONGARCH_HW_BREAK = "LINUX"
+ NN_LOONGARCH_HW_WATCH = "LINUX"
+ NN_LOONGARCH_LASX = "LINUX"
+ NN_LOONGARCH_LBT = "LINUX"
+ NN_LOONGARCH_LSX = "LINUX"
+ NN_MIPS_DSP = "LINUX"
+ NN_MIPS_FP_MODE = "LINUX"
+ NN_MIPS_MSA = "LINUX"
+ NN_PPC_DEXCR = "LINUX"
+ NN_PPC_DSCR = "LINUX"
+ NN_PPC_EBB = "LINUX"
+ NN_PPC_HASHKEYR = "LINUX"
+ NN_PPC_PKEY = "LINUX"
+ NN_PPC_PMU = "LINUX"
+ NN_PPC_PPR = "LINUX"
+ NN_PPC_SPE = "LINUX"
+ NN_PPC_TAR = "LINUX"
+ NN_PPC_TM_CDSCR = "LINUX"
+ NN_PPC_TM_CFPR = "LINUX"
+ NN_PPC_TM_CGPR = "LINUX"
+ NN_PPC_TM_CPPR = "LINUX"
+ NN_PPC_TM_CTAR = "LINUX"
+ NN_PPC_TM_CVMX = "LINUX"
+ NN_PPC_TM_CVSX = "LINUX"
+ NN_PPC_TM_SPR = "LINUX"
+ NN_PPC_VMX = "LINUX"
+ NN_PPC_VSX = "LINUX"
+ NN_PRFPREG = "CORE"
+ NN_PRPSINFO = "CORE"
+ NN_PRSTATUS = "CORE"
+ NN_PRXFPREG = "LINUX"
+ NN_RISCV_CSR = "LINUX"
+ NN_RISCV_TAGGED_ADDR_CTRL = "LINUX"
+ NN_RISCV_VECTOR = "LINUX"
+ NN_S390_CTRS = "LINUX"
+ NN_S390_GS_BC = "LINUX"
+ NN_S390_GS_CB = "LINUX"
+ NN_S390_HIGH_GPRS = "LINUX"
+ NN_S390_LAST_BREAK = "LINUX"
+ NN_S390_PREFIX = "LINUX"
+ NN_S390_PV_CPU_DATA = "LINUX"
+ NN_S390_RI_CB = "LINUX"
+ NN_S390_SYSTEM_CALL = "LINUX"
+ NN_S390_TDB = "LINUX"
+ NN_S390_TIMER = "LINUX"
+ NN_S390_TODCMP = "LINUX"
+ NN_S390_TODPREG = "LINUX"
+ NN_S390_VXRS_HIGH = "LINUX"
+ NN_S390_VXRS_LOW = "LINUX"
+ NN_SIGINFO = "CORE"
+ NN_TASKSTRUCT = "CORE"
+ NN_VMCOREDD = "LINUX"
+ NN_X86_SHSTK = "LINUX"
+ NN_X86_XSAVE_LAYOUT = "LINUX"
+ NN_X86_XSTATE = "LINUX"
NSFS_MAGIC = 0x6e736673
+ NT_386_IOPERM = 0x201
+ NT_386_TLS = 0x200
+ NT_ARC_V2 = 0x600
+ NT_ARM_FPMR = 0x40e
+ NT_ARM_GCS = 0x410
+ NT_ARM_HW_BREAK = 0x402
+ NT_ARM_HW_WATCH = 0x403
+ NT_ARM_PACA_KEYS = 0x407
+ NT_ARM_PACG_KEYS = 0x408
+ NT_ARM_PAC_ENABLED_KEYS = 0x40a
+ NT_ARM_PAC_MASK = 0x406
+ NT_ARM_POE = 0x40f
+ NT_ARM_SSVE = 0x40b
+ NT_ARM_SVE = 0x405
+ NT_ARM_SYSTEM_CALL = 0x404
+ NT_ARM_TAGGED_ADDR_CTRL = 0x409
+ NT_ARM_TLS = 0x401
+ NT_ARM_VFP = 0x400
+ NT_ARM_ZA = 0x40c
+ NT_ARM_ZT = 0x40d
+ NT_AUXV = 0x6
+ NT_FILE = 0x46494c45
+ NT_GNU_PROPERTY_TYPE_0 = 0x5
+ NT_LOONGARCH_CPUCFG = 0xa00
+ NT_LOONGARCH_CSR = 0xa01
+ NT_LOONGARCH_HW_BREAK = 0xa05
+ NT_LOONGARCH_HW_WATCH = 0xa06
+ NT_LOONGARCH_LASX = 0xa03
+ NT_LOONGARCH_LBT = 0xa04
+ NT_LOONGARCH_LSX = 0xa02
+ NT_MIPS_DSP = 0x800
+ NT_MIPS_FP_MODE = 0x801
+ NT_MIPS_MSA = 0x802
+ NT_PPC_DEXCR = 0x111
+ NT_PPC_DSCR = 0x105
+ NT_PPC_EBB = 0x106
+ NT_PPC_HASHKEYR = 0x112
+ NT_PPC_PKEY = 0x110
+ NT_PPC_PMU = 0x107
+ NT_PPC_PPR = 0x104
+ NT_PPC_SPE = 0x101
+ NT_PPC_TAR = 0x103
+ NT_PPC_TM_CDSCR = 0x10f
+ NT_PPC_TM_CFPR = 0x109
+ NT_PPC_TM_CGPR = 0x108
+ NT_PPC_TM_CPPR = 0x10e
+ NT_PPC_TM_CTAR = 0x10d
+ NT_PPC_TM_CVMX = 0x10a
+ NT_PPC_TM_CVSX = 0x10b
+ NT_PPC_TM_SPR = 0x10c
+ NT_PPC_VMX = 0x100
+ NT_PPC_VSX = 0x102
+ NT_PRFPREG = 0x2
+ NT_PRPSINFO = 0x3
+ NT_PRSTATUS = 0x1
+ NT_PRXFPREG = 0x46e62b7f
+ NT_RISCV_CSR = 0x900
+ NT_RISCV_TAGGED_ADDR_CTRL = 0x902
+ NT_RISCV_VECTOR = 0x901
+ NT_S390_CTRS = 0x304
+ NT_S390_GS_BC = 0x30c
+ NT_S390_GS_CB = 0x30b
+ NT_S390_HIGH_GPRS = 0x300
+ NT_S390_LAST_BREAK = 0x306
+ NT_S390_PREFIX = 0x305
+ NT_S390_PV_CPU_DATA = 0x30e
+ NT_S390_RI_CB = 0x30d
+ NT_S390_SYSTEM_CALL = 0x307
+ NT_S390_TDB = 0x308
+ NT_S390_TIMER = 0x301
+ NT_S390_TODCMP = 0x302
+ NT_S390_TODPREG = 0x303
+ NT_S390_VXRS_HIGH = 0x30a
+ NT_S390_VXRS_LOW = 0x309
+ NT_SIGINFO = 0x53494749
+ NT_TASKSTRUCT = 0x4
+ NT_VMCOREDD = 0x700
+ NT_X86_SHSTK = 0x204
+ NT_X86_XSAVE_LAYOUT = 0x205
+ NT_X86_XSTATE = 0x202
OCFS2_SUPER_MAGIC = 0x7461636f
OCRNL = 0x8
OFDEL = 0x80
@@ -2463,6 +2699,59 @@ const (
PERF_RECORD_MISC_USER = 0x2
PERF_SAMPLE_BRANCH_PLM_ALL = 0x7
PERF_SAMPLE_WEIGHT_TYPE = 0x1004000
+ PF_ALG = 0x26
+ PF_APPLETALK = 0x5
+ PF_ASH = 0x12
+ PF_ATMPVC = 0x8
+ PF_ATMSVC = 0x14
+ PF_AX25 = 0x3
+ PF_BLUETOOTH = 0x1f
+ PF_BRIDGE = 0x7
+ PF_CAIF = 0x25
+ PF_CAN = 0x1d
+ PF_DECnet = 0xc
+ PF_ECONET = 0x13
+ PF_FILE = 0x1
+ PF_IB = 0x1b
+ PF_IEEE802154 = 0x24
+ PF_INET = 0x2
+ PF_INET6 = 0xa
+ PF_IPX = 0x4
+ PF_IRDA = 0x17
+ PF_ISDN = 0x22
+ PF_IUCV = 0x20
+ PF_KCM = 0x29
+ PF_KEY = 0xf
+ PF_LLC = 0x1a
+ PF_LOCAL = 0x1
+ PF_MAX = 0x2e
+ PF_MCTP = 0x2d
+ PF_MPLS = 0x1c
+ PF_NETBEUI = 0xd
+ PF_NETLINK = 0x10
+ PF_NETROM = 0x6
+ PF_NFC = 0x27
+ PF_PACKET = 0x11
+ PF_PHONET = 0x23
+ PF_PPPOX = 0x18
+ PF_QIPCRTR = 0x2a
+ PF_R = 0x4
+ PF_RDS = 0x15
+ PF_ROSE = 0xb
+ PF_ROUTE = 0x10
+ PF_RXRPC = 0x21
+ PF_SECURITY = 0xe
+ PF_SMC = 0x2b
+ PF_SNA = 0x16
+ PF_TIPC = 0x1e
+ PF_UNIX = 0x1
+ PF_UNSPEC = 0x0
+ PF_VSOCK = 0x28
+ PF_W = 0x2
+ PF_WANPIPE = 0x19
+ PF_X = 0x1
+ PF_X25 = 0x9
+ PF_XDP = 0x2c
PID_FS_MAGIC = 0x50494446
PIPEFS_MAGIC = 0x50495045
PPPIOCGNPMODE = 0xc008744c
@@ -2758,6 +3047,23 @@ const (
PTRACE_SYSCALL_INFO_NONE = 0x0
PTRACE_SYSCALL_INFO_SECCOMP = 0x3
PTRACE_TRACEME = 0x0
+ PT_AARCH64_MEMTAG_MTE = 0x70000002
+ PT_DYNAMIC = 0x2
+ PT_GNU_EH_FRAME = 0x6474e550
+ PT_GNU_PROPERTY = 0x6474e553
+ PT_GNU_RELRO = 0x6474e552
+ PT_GNU_STACK = 0x6474e551
+ PT_HIOS = 0x6fffffff
+ PT_HIPROC = 0x7fffffff
+ PT_INTERP = 0x3
+ PT_LOAD = 0x1
+ PT_LOOS = 0x60000000
+ PT_LOPROC = 0x70000000
+ PT_NOTE = 0x4
+ PT_NULL = 0x0
+ PT_PHDR = 0x6
+ PT_SHLIB = 0x5
+ PT_TLS = 0x7
P_ALL = 0x0
P_PGID = 0x2
P_PID = 0x1
@@ -3091,6 +3397,47 @@ const (
SEEK_MAX = 0x4
SEEK_SET = 0x0
SELINUX_MAGIC = 0xf97cff8c
+ SHF_ALLOC = 0x2
+ SHF_EXCLUDE = 0x8000000
+ SHF_EXECINSTR = 0x4
+ SHF_GROUP = 0x200
+ SHF_INFO_LINK = 0x40
+ SHF_LINK_ORDER = 0x80
+ SHF_MASKOS = 0xff00000
+ SHF_MASKPROC = 0xf0000000
+ SHF_MERGE = 0x10
+ SHF_ORDERED = 0x4000000
+ SHF_OS_NONCONFORMING = 0x100
+ SHF_RELA_LIVEPATCH = 0x100000
+ SHF_RO_AFTER_INIT = 0x200000
+ SHF_STRINGS = 0x20
+ SHF_TLS = 0x400
+ SHF_WRITE = 0x1
+ SHN_ABS = 0xfff1
+ SHN_COMMON = 0xfff2
+ SHN_HIPROC = 0xff1f
+ SHN_HIRESERVE = 0xffff
+ SHN_LIVEPATCH = 0xff20
+ SHN_LOPROC = 0xff00
+ SHN_LORESERVE = 0xff00
+ SHN_UNDEF = 0x0
+ SHT_DYNAMIC = 0x6
+ SHT_DYNSYM = 0xb
+ SHT_HASH = 0x5
+ SHT_HIPROC = 0x7fffffff
+ SHT_HIUSER = 0xffffffff
+ SHT_LOPROC = 0x70000000
+ SHT_LOUSER = 0x80000000
+ SHT_NOBITS = 0x8
+ SHT_NOTE = 0x7
+ SHT_NULL = 0x0
+ SHT_NUM = 0xc
+ SHT_PROGBITS = 0x1
+ SHT_REL = 0x9
+ SHT_RELA = 0x4
+ SHT_SHLIB = 0xa
+ SHT_STRTAB = 0x3
+ SHT_SYMTAB = 0x2
SHUT_RD = 0x0
SHUT_RDWR = 0x2
SHUT_WR = 0x1
@@ -3317,6 +3664,16 @@ const (
STATX_UID = 0x8
STATX_WRITE_ATOMIC = 0x10000
STATX__RESERVED = 0x80000000
+ STB_GLOBAL = 0x1
+ STB_LOCAL = 0x0
+ STB_WEAK = 0x2
+ STT_COMMON = 0x5
+ STT_FILE = 0x4
+ STT_FUNC = 0x2
+ STT_NOTYPE = 0x0
+ STT_OBJECT = 0x1
+ STT_SECTION = 0x3
+ STT_TLS = 0x6
SYNC_FILE_RANGE_WAIT_AFTER = 0x4
SYNC_FILE_RANGE_WAIT_BEFORE = 0x1
SYNC_FILE_RANGE_WRITE = 0x2
@@ -3553,6 +3910,8 @@ const (
UTIME_OMIT = 0x3ffffffe
V9FS_MAGIC = 0x1021997
VERASE = 0x2
+ VER_FLG_BASE = 0x1
+ VER_FLG_WEAK = 0x2
VINTR = 0x0
VKILL = 0x3
VLNEXT = 0xf
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux.go b/vendor/golang.org/x/sys/unix/zsyscall_linux.go
index 5cc1e8eb2f..8935d10a31 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_linux.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux.go
@@ -2238,3 +2238,13 @@ func Mseal(b []byte, flags uint) (err error) {
}
return
}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func setMemPolicy(mode int, mask *CPUSet, size int) (err error) {
+ _, _, e1 := Syscall(SYS_SET_MEMPOLICY, uintptr(mode), uintptr(unsafe.Pointer(mask)), uintptr(size))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux.go b/vendor/golang.org/x/sys/unix/ztypes_linux.go
index 944e75a11c..c1a4670171 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux.go
@@ -3590,6 +3590,8 @@ type Nhmsg struct {
Flags uint32
}
+const SizeofNhmsg = 0x8
+
type NexthopGrp struct {
Id uint32
Weight uint8
@@ -3597,6 +3599,8 @@ type NexthopGrp struct {
Resvd2 uint16
}
+const SizeofNexthopGrp = 0x8
+
const (
NHA_UNSPEC = 0x0
NHA_ID = 0x1
@@ -6332,3 +6336,30 @@ type SockDiagReq struct {
}
const RTM_NEWNVLAN = 0x70
+
+const (
+ MPOL_BIND = 0x2
+ MPOL_DEFAULT = 0x0
+ MPOL_F_ADDR = 0x2
+ MPOL_F_MEMS_ALLOWED = 0x4
+ MPOL_F_MOF = 0x8
+ MPOL_F_MORON = 0x10
+ MPOL_F_NODE = 0x1
+ MPOL_F_NUMA_BALANCING = 0x2000
+ MPOL_F_RELATIVE_NODES = 0x4000
+ MPOL_F_SHARED = 0x1
+ MPOL_F_STATIC_NODES = 0x8000
+ MPOL_INTERLEAVE = 0x3
+ MPOL_LOCAL = 0x4
+ MPOL_MAX = 0x7
+ MPOL_MF_INTERNAL = 0x10
+ MPOL_MF_LAZY = 0x8
+ MPOL_MF_MOVE_ALL = 0x4
+ MPOL_MF_MOVE = 0x2
+ MPOL_MF_STRICT = 0x1
+ MPOL_MF_VALID = 0x7
+ MPOL_MODE_FLAGS = 0xe000
+ MPOL_PREFERRED = 0x1
+ MPOL_PREFERRED_MANY = 0x5
+ MPOL_WEIGHTED_INTERLEAVE = 0x6
+)
diff --git a/vendor/golang.org/x/sys/windows/syscall_windows.go b/vendor/golang.org/x/sys/windows/syscall_windows.go
index bd51337306..69439df2a4 100644
--- a/vendor/golang.org/x/sys/windows/syscall_windows.go
+++ b/vendor/golang.org/x/sys/windows/syscall_windows.go
@@ -892,8 +892,12 @@ const socket_error = uintptr(^uint32(0))
//sys MultiByteToWideChar(codePage uint32, dwFlags uint32, str *byte, nstr int32, wchar *uint16, nwchar int32) (nwrite int32, err error) = kernel32.MultiByteToWideChar
//sys getBestInterfaceEx(sockaddr unsafe.Pointer, pdwBestIfIndex *uint32) (errcode error) = iphlpapi.GetBestInterfaceEx
//sys GetIfEntry2Ex(level uint32, row *MibIfRow2) (errcode error) = iphlpapi.GetIfEntry2Ex
+//sys GetIpForwardEntry2(row *MibIpForwardRow2) (errcode error) = iphlpapi.GetIpForwardEntry2
+//sys GetIpForwardTable2(family uint16, table **MibIpForwardTable2) (errcode error) = iphlpapi.GetIpForwardTable2
//sys GetUnicastIpAddressEntry(row *MibUnicastIpAddressRow) (errcode error) = iphlpapi.GetUnicastIpAddressEntry
+//sys FreeMibTable(memory unsafe.Pointer) = iphlpapi.FreeMibTable
//sys NotifyIpInterfaceChange(family uint16, callback uintptr, callerContext unsafe.Pointer, initialNotification bool, notificationHandle *Handle) (errcode error) = iphlpapi.NotifyIpInterfaceChange
+//sys NotifyRouteChange2(family uint16, callback uintptr, callerContext unsafe.Pointer, initialNotification bool, notificationHandle *Handle) (errcode error) = iphlpapi.NotifyRouteChange2
//sys NotifyUnicastIpAddressChange(family uint16, callback uintptr, callerContext unsafe.Pointer, initialNotification bool, notificationHandle *Handle) (errcode error) = iphlpapi.NotifyUnicastIpAddressChange
//sys CancelMibChangeNotify2(notificationHandle Handle) (errcode error) = iphlpapi.CancelMibChangeNotify2
@@ -916,6 +920,17 @@ type RawSockaddrInet6 struct {
Scope_id uint32
}
+// RawSockaddrInet is a union that contains an IPv4, an IPv6 address, or an address family. See
+// https://learn.microsoft.com/en-us/windows/win32/api/ws2ipdef/ns-ws2ipdef-sockaddr_inet.
+//
+// A [*RawSockaddrInet] may be converted to a [*RawSockaddrInet4] or [*RawSockaddrInet6] using
+// unsafe, depending on the address family.
+type RawSockaddrInet struct {
+ Family uint16
+ Port uint16
+ Data [6]uint32
+}
+
type RawSockaddr struct {
Family uint16
Data [14]int8
diff --git a/vendor/golang.org/x/sys/windows/types_windows.go b/vendor/golang.org/x/sys/windows/types_windows.go
index 358be3c7f5..6e4f50eb48 100644
--- a/vendor/golang.org/x/sys/windows/types_windows.go
+++ b/vendor/golang.org/x/sys/windows/types_windows.go
@@ -2320,6 +2320,82 @@ type MibIfRow2 struct {
OutQLen uint64
}
+// IP_ADDRESS_PREFIX stores an IP address prefix. See
+// https://learn.microsoft.com/en-us/windows/win32/api/netioapi/ns-netioapi-ip_address_prefix.
+type IpAddressPrefix struct {
+ Prefix RawSockaddrInet
+ PrefixLength uint8
+}
+
+// NL_ROUTE_ORIGIN enumeration from nldef.h or
+// https://learn.microsoft.com/en-us/windows/win32/api/nldef/ne-nldef-nl_route_origin.
+const (
+ NlroManual = 0
+ NlroWellKnown = 1
+ NlroDHCP = 2
+ NlroRouterAdvertisement = 3
+ Nlro6to4 = 4
+)
+
+// NL_ROUTE_ORIGIN enumeration from nldef.h or
+// https://learn.microsoft.com/en-us/windows/win32/api/nldef/ne-nldef-nl_route_protocol.
+const (
+ MIB_IPPROTO_OTHER = 1
+ MIB_IPPROTO_LOCAL = 2
+ MIB_IPPROTO_NETMGMT = 3
+ MIB_IPPROTO_ICMP = 4
+ MIB_IPPROTO_EGP = 5
+ MIB_IPPROTO_GGP = 6
+ MIB_IPPROTO_HELLO = 7
+ MIB_IPPROTO_RIP = 8
+ MIB_IPPROTO_IS_IS = 9
+ MIB_IPPROTO_ES_IS = 10
+ MIB_IPPROTO_CISCO = 11
+ MIB_IPPROTO_BBN = 12
+ MIB_IPPROTO_OSPF = 13
+ MIB_IPPROTO_BGP = 14
+ MIB_IPPROTO_IDPR = 15
+ MIB_IPPROTO_EIGRP = 16
+ MIB_IPPROTO_DVMRP = 17
+ MIB_IPPROTO_RPL = 18
+ MIB_IPPROTO_DHCP = 19
+ MIB_IPPROTO_NT_AUTOSTATIC = 10002
+ MIB_IPPROTO_NT_STATIC = 10006
+ MIB_IPPROTO_NT_STATIC_NON_DOD = 10007
+)
+
+// MIB_IPFORWARD_ROW2 stores information about an IP route entry. See
+// https://learn.microsoft.com/en-us/windows/win32/api/netioapi/ns-netioapi-mib_ipforward_row2.
+type MibIpForwardRow2 struct {
+ InterfaceLuid uint64
+ InterfaceIndex uint32
+ DestinationPrefix IpAddressPrefix
+ NextHop RawSockaddrInet
+ SitePrefixLength uint8
+ ValidLifetime uint32
+ PreferredLifetime uint32
+ Metric uint32
+ Protocol uint32
+ Loopback uint8
+ AutoconfigureAddress uint8
+ Publish uint8
+ Immortal uint8
+ Age uint32
+ Origin uint32
+}
+
+// MIB_IPFORWARD_TABLE2 contains a table of IP route entries. See
+// https://learn.microsoft.com/en-us/windows/win32/api/netioapi/ns-netioapi-mib_ipforward_table2.
+type MibIpForwardTable2 struct {
+ NumEntries uint32
+ Table [1]MibIpForwardRow2
+}
+
+// Rows returns the IP route entries in the table.
+func (t *MibIpForwardTable2) Rows() []MibIpForwardRow2 {
+ return unsafe.Slice(&t.Table[0], t.NumEntries)
+}
+
// MIB_UNICASTIPADDRESS_ROW stores information about a unicast IP address. See
// https://learn.microsoft.com/en-us/windows/win32/api/netioapi/ns-netioapi-mib_unicastipaddress_row.
type MibUnicastIpAddressRow struct {
diff --git a/vendor/golang.org/x/sys/windows/zsyscall_windows.go b/vendor/golang.org/x/sys/windows/zsyscall_windows.go
index 426151a019..f25b7308a1 100644
--- a/vendor/golang.org/x/sys/windows/zsyscall_windows.go
+++ b/vendor/golang.org/x/sys/windows/zsyscall_windows.go
@@ -182,13 +182,17 @@ var (
procDwmGetWindowAttribute = moddwmapi.NewProc("DwmGetWindowAttribute")
procDwmSetWindowAttribute = moddwmapi.NewProc("DwmSetWindowAttribute")
procCancelMibChangeNotify2 = modiphlpapi.NewProc("CancelMibChangeNotify2")
+ procFreeMibTable = modiphlpapi.NewProc("FreeMibTable")
procGetAdaptersAddresses = modiphlpapi.NewProc("GetAdaptersAddresses")
procGetAdaptersInfo = modiphlpapi.NewProc("GetAdaptersInfo")
procGetBestInterfaceEx = modiphlpapi.NewProc("GetBestInterfaceEx")
procGetIfEntry = modiphlpapi.NewProc("GetIfEntry")
procGetIfEntry2Ex = modiphlpapi.NewProc("GetIfEntry2Ex")
+ procGetIpForwardEntry2 = modiphlpapi.NewProc("GetIpForwardEntry2")
+ procGetIpForwardTable2 = modiphlpapi.NewProc("GetIpForwardTable2")
procGetUnicastIpAddressEntry = modiphlpapi.NewProc("GetUnicastIpAddressEntry")
procNotifyIpInterfaceChange = modiphlpapi.NewProc("NotifyIpInterfaceChange")
+ procNotifyRouteChange2 = modiphlpapi.NewProc("NotifyRouteChange2")
procNotifyUnicastIpAddressChange = modiphlpapi.NewProc("NotifyUnicastIpAddressChange")
procAddDllDirectory = modkernel32.NewProc("AddDllDirectory")
procAssignProcessToJobObject = modkernel32.NewProc("AssignProcessToJobObject")
@@ -1624,6 +1628,11 @@ func CancelMibChangeNotify2(notificationHandle Handle) (errcode error) {
return
}
+func FreeMibTable(memory unsafe.Pointer) {
+ syscall.SyscallN(procFreeMibTable.Addr(), uintptr(memory))
+ return
+}
+
func GetAdaptersAddresses(family uint32, flags uint32, reserved uintptr, adapterAddresses *IpAdapterAddresses, sizePointer *uint32) (errcode error) {
r0, _, _ := syscall.SyscallN(procGetAdaptersAddresses.Addr(), uintptr(family), uintptr(flags), uintptr(reserved), uintptr(unsafe.Pointer(adapterAddresses)), uintptr(unsafe.Pointer(sizePointer)))
if r0 != 0 {
@@ -1664,6 +1673,22 @@ func GetIfEntry2Ex(level uint32, row *MibIfRow2) (errcode error) {
return
}
+func GetIpForwardEntry2(row *MibIpForwardRow2) (errcode error) {
+ r0, _, _ := syscall.SyscallN(procGetIpForwardEntry2.Addr(), uintptr(unsafe.Pointer(row)))
+ if r0 != 0 {
+ errcode = syscall.Errno(r0)
+ }
+ return
+}
+
+func GetIpForwardTable2(family uint16, table **MibIpForwardTable2) (errcode error) {
+ r0, _, _ := syscall.SyscallN(procGetIpForwardTable2.Addr(), uintptr(family), uintptr(unsafe.Pointer(table)))
+ if r0 != 0 {
+ errcode = syscall.Errno(r0)
+ }
+ return
+}
+
func GetUnicastIpAddressEntry(row *MibUnicastIpAddressRow) (errcode error) {
r0, _, _ := syscall.SyscallN(procGetUnicastIpAddressEntry.Addr(), uintptr(unsafe.Pointer(row)))
if r0 != 0 {
@@ -1684,6 +1709,18 @@ func NotifyIpInterfaceChange(family uint16, callback uintptr, callerContext unsa
return
}
+func NotifyRouteChange2(family uint16, callback uintptr, callerContext unsafe.Pointer, initialNotification bool, notificationHandle *Handle) (errcode error) {
+ var _p0 uint32
+ if initialNotification {
+ _p0 = 1
+ }
+ r0, _, _ := syscall.SyscallN(procNotifyRouteChange2.Addr(), uintptr(family), uintptr(callback), uintptr(callerContext), uintptr(_p0), uintptr(unsafe.Pointer(notificationHandle)))
+ if r0 != 0 {
+ errcode = syscall.Errno(r0)
+ }
+ return
+}
+
func NotifyUnicastIpAddressChange(family uint16, callback uintptr, callerContext unsafe.Pointer, initialNotification bool, notificationHandle *Handle) (errcode error) {
var _p0 uint32
if initialNotification {
diff --git a/vendor/google.golang.org/grpc/internal/transport/handler_server.go b/vendor/google.golang.org/grpc/internal/transport/handler_server.go
index 3dea235735..d954a64c38 100644
--- a/vendor/google.golang.org/grpc/internal/transport/handler_server.go
+++ b/vendor/google.golang.org/grpc/internal/transport/handler_server.go
@@ -277,11 +277,13 @@ func (ht *serverHandlerTransport) writeStatus(s *ServerStream, st *status.Status
if err == nil { // transport has not been closed
// Note: The trailer fields are compressed with hpack after this call returns.
// No WireLength field is set here.
+ s.hdrMu.Lock()
for _, sh := range ht.stats {
sh.HandleRPC(s.Context(), &stats.OutTrailer{
Trailer: s.trailer.Copy(),
})
}
+ s.hdrMu.Unlock()
}
ht.Close(errors.New("finished writing status"))
return err
diff --git a/vendor/google.golang.org/grpc/internal/transport/http2_server.go b/vendor/google.golang.org/grpc/internal/transport/http2_server.go
index 9f725e15a8..83cee314c8 100644
--- a/vendor/google.golang.org/grpc/internal/transport/http2_server.go
+++ b/vendor/google.golang.org/grpc/internal/transport/http2_server.go
@@ -1353,10 +1353,10 @@ func (t *http2Server) closeStream(s *ServerStream, rst bool, rstCode http2.ErrCo
// called to interrupt the potential blocking on other goroutines.
s.cancel()
- oldState := s.swapState(streamDone)
- if oldState == streamDone {
- return
- }
+ // We can't return early even if the stream's state is "done" as the state
+ // might have been set by the `finishStream` method. Deleting the stream via
+ // `finishStream` can get blocked on flow control.
+ s.swapState(streamDone)
t.deleteStream(s, eosReceived)
t.controlBuf.put(&cleanupStream{
diff --git a/vendor/google.golang.org/grpc/version.go b/vendor/google.golang.org/grpc/version.go
index bc1eb290f6..468f110658 100644
--- a/vendor/google.golang.org/grpc/version.go
+++ b/vendor/google.golang.org/grpc/version.go
@@ -19,4 +19,4 @@
package grpc
// Version is the current grpc version.
-const Version = "1.75.0"
+const Version = "1.75.1"
diff --git a/vendor/google.golang.org/protobuf/internal/editionssupport/editions.go b/vendor/google.golang.org/protobuf/internal/editionssupport/editions.go
index bf1aba0e85..7b9f01afb0 100644
--- a/vendor/google.golang.org/protobuf/internal/editionssupport/editions.go
+++ b/vendor/google.golang.org/protobuf/internal/editionssupport/editions.go
@@ -9,7 +9,7 @@ import "google.golang.org/protobuf/types/descriptorpb"
const (
Minimum = descriptorpb.Edition_EDITION_PROTO2
- Maximum = descriptorpb.Edition_EDITION_2023
+ Maximum = descriptorpb.Edition_EDITION_2024
// MaximumKnown is the maximum edition that is known to Go Protobuf, but not
// declared as supported. In other words: end users cannot use it, but
diff --git a/vendor/google.golang.org/protobuf/internal/filedesc/editions.go b/vendor/google.golang.org/protobuf/internal/filedesc/editions.go
index a0aad2777f..66ba906806 100644
--- a/vendor/google.golang.org/protobuf/internal/filedesc/editions.go
+++ b/vendor/google.golang.org/protobuf/internal/filedesc/editions.go
@@ -13,8 +13,10 @@ import (
"google.golang.org/protobuf/reflect/protoreflect"
)
-var defaultsCache = make(map[Edition]EditionFeatures)
-var defaultsKeys = []Edition{}
+var (
+ defaultsCache = make(map[Edition]EditionFeatures)
+ defaultsKeys = []Edition{}
+)
func init() {
unmarshalEditionDefaults(editiondefaults.Defaults)
@@ -41,7 +43,7 @@ func unmarshalGoFeature(b []byte, parent EditionFeatures) EditionFeatures {
b = b[m:]
parent.StripEnumPrefix = int(v)
default:
- panic(fmt.Sprintf("unkown field number %d while unmarshalling GoFeatures", num))
+ panic(fmt.Sprintf("unknown field number %d while unmarshalling GoFeatures", num))
}
}
return parent
@@ -76,7 +78,7 @@ func unmarshalFeatureSet(b []byte, parent EditionFeatures) EditionFeatures {
// DefaultSymbolVisibility is enforced in protoc, runtimes should not
// inspect this value.
default:
- panic(fmt.Sprintf("unkown field number %d while unmarshalling FeatureSet", num))
+ panic(fmt.Sprintf("unknown field number %d while unmarshalling FeatureSet", num))
}
case protowire.BytesType:
v, m := protowire.ConsumeBytes(b)
@@ -150,7 +152,7 @@ func unmarshalEditionDefaults(b []byte) {
_, m := protowire.ConsumeVarint(b)
b = b[m:]
default:
- panic(fmt.Sprintf("unkown field number %d while unmarshalling EditionDefault", num))
+ panic(fmt.Sprintf("unknown field number %d while unmarshalling EditionDefault", num))
}
}
}
diff --git a/vendor/google.golang.org/protobuf/internal/version/version.go b/vendor/google.golang.org/protobuf/internal/version/version.go
index 697d1c14f3..31e79a6535 100644
--- a/vendor/google.golang.org/protobuf/internal/version/version.go
+++ b/vendor/google.golang.org/protobuf/internal/version/version.go
@@ -52,7 +52,7 @@ import (
const (
Major = 1
Minor = 36
- Patch = 8
+ Patch = 9
PreRelease = ""
)
diff --git a/vendor/modules.txt b/vendor/modules.txt
index ac4bfd8d79..25fe595288 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -63,7 +63,7 @@ github.com/MirrexOne/unqueryvet/pkg/config
## explicit; go 1.23.0
github.com/OpenPeeDeeP/depguard/v2
github.com/OpenPeeDeeP/depguard/v2/internal/utils
-# github.com/ProtonMail/go-crypto v1.1.0-alpha.2
+# github.com/ProtonMail/go-crypto v1.1.6
## explicit; go 1.17
github.com/ProtonMail/go-crypto/bitcurves
github.com/ProtonMail/go-crypto/brainpool
@@ -204,8 +204,8 @@ github.com/ckaznocha/intrange
## explicit
github.com/client9/misspell
github.com/client9/misspell/cmd/misspell
-# github.com/cloudflare/circl v1.3.7
-## explicit; go 1.19
+# github.com/cloudflare/circl v1.6.1
+## explicit; go 1.22.0
github.com/cloudflare/circl/dh/x25519
github.com/cloudflare/circl/dh/x448
github.com/cloudflare/circl/ecc/goldilocks
@@ -241,7 +241,7 @@ github.com/dave/dst/decorator/resolver
github.com/dave/dst/decorator/resolver/gopackages
github.com/dave/dst/decorator/resolver/gotypes
github.com/dave/dst/dstutil
-# github.com/davecgh/go-spew v1.1.1
+# github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc
## explicit
github.com/davecgh/go-spew/spew
# github.com/denis-tingaikin/go-header v0.5.0
@@ -272,8 +272,8 @@ github.com/fzipp/gocyclo
# github.com/ghostiam/protogetter v0.3.17
## explicit; go 1.24.0
github.com/ghostiam/protogetter
-# github.com/go-critic/go-critic v0.14.0
-## explicit; go 1.23.0
+# github.com/go-critic/go-critic v0.14.2
+## explicit; go 1.24.0
github.com/go-critic/go-critic/checkers
github.com/go-critic/go-critic/checkers/internal/astwalk
github.com/go-critic/go-critic/checkers/internal/lintutil
@@ -367,7 +367,7 @@ github.com/golangci/go-printf-func-name/pkg/analyzer
# github.com/golangci/gofmt v0.0.0-20250106114630-d62b90e6713d
## explicit; go 1.22.0
github.com/golangci/gofmt/gofmt
-# github.com/golangci/golangci-lint/v2 v2.6.0
+# github.com/golangci/golangci-lint/v2 v2.6.2
## explicit; go 1.24.0
github.com/golangci/golangci-lint/v2/cmd/golangci-lint
github.com/golangci/golangci-lint/v2/internal/cache
@@ -595,7 +595,7 @@ github.com/hashicorp/go-checkpoint
# github.com/hashicorp/go-cleanhttp v0.5.2
## explicit; go 1.13
github.com/hashicorp/go-cleanhttp
-# github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320
+# github.com/hashicorp/go-cty v1.5.0
## explicit; go 1.12
github.com/hashicorp/go-cty/cty
github.com/hashicorp/go-cty/cty/convert
@@ -603,7 +603,7 @@ github.com/hashicorp/go-cty/cty/gocty
github.com/hashicorp/go-cty/cty/json
github.com/hashicorp/go-cty/cty/msgpack
github.com/hashicorp/go-cty/cty/set
-# github.com/hashicorp/go-hclog v1.5.0
+# github.com/hashicorp/go-hclog v1.6.3
## explicit; go 1.13
github.com/hashicorp/go-hclog
# github.com/hashicorp/go-immutable-radix/v2 v2.1.0
@@ -612,13 +612,16 @@ github.com/hashicorp/go-immutable-radix/v2
# github.com/hashicorp/go-multierror v1.1.1
## explicit; go 1.13
github.com/hashicorp/go-multierror
-# github.com/hashicorp/go-plugin v1.6.0
-## explicit; go 1.17
+# github.com/hashicorp/go-plugin v1.7.0
+## explicit; go 1.24
github.com/hashicorp/go-plugin
github.com/hashicorp/go-plugin/internal/cmdrunner
github.com/hashicorp/go-plugin/internal/grpcmux
github.com/hashicorp/go-plugin/internal/plugin
github.com/hashicorp/go-plugin/runner
+# github.com/hashicorp/go-retryablehttp v0.7.7
+## explicit; go 1.19
+github.com/hashicorp/go-retryablehttp
# github.com/hashicorp/go-uuid v1.0.3
## explicit
github.com/hashicorp/go-uuid
@@ -629,8 +632,8 @@ github.com/hashicorp/go-version
## explicit; go 1.18
github.com/hashicorp/golang-lru/v2/internal
github.com/hashicorp/golang-lru/v2/simplelru
-# github.com/hashicorp/hc-install v0.6.4
-## explicit; go 1.18
+# github.com/hashicorp/hc-install v0.9.2
+## explicit; go 1.23.0
github.com/hashicorp/hc-install
github.com/hashicorp/hc-install/checkpoint
github.com/hashicorp/hc-install/errors
@@ -657,23 +660,23 @@ github.com/hashicorp/hcl/hcl/token
github.com/hashicorp/hcl/json/parser
github.com/hashicorp/hcl/json/scanner
github.com/hashicorp/hcl/json/token
-# github.com/hashicorp/hcl/v2 v2.20.1
-## explicit; go 1.18
+# github.com/hashicorp/hcl/v2 v2.24.0
+## explicit; go 1.23.0
github.com/hashicorp/hcl/v2
github.com/hashicorp/hcl/v2/ext/customdecode
github.com/hashicorp/hcl/v2/hclsyntax
# github.com/hashicorp/logutils v1.0.0
## explicit
github.com/hashicorp/logutils
-# github.com/hashicorp/terraform-exec v0.21.0
-## explicit; go 1.18
+# github.com/hashicorp/terraform-exec v0.23.1
+## explicit; go 1.23.0
github.com/hashicorp/terraform-exec/internal/version
github.com/hashicorp/terraform-exec/tfexec
-# github.com/hashicorp/terraform-json v0.22.1
-## explicit; go 1.18
-github.com/hashicorp/terraform-json
-# github.com/hashicorp/terraform-plugin-go v0.23.0
+# github.com/hashicorp/terraform-json v0.27.1
## explicit; go 1.21
+github.com/hashicorp/terraform-json
+# github.com/hashicorp/terraform-plugin-go v0.29.0
+## explicit; go 1.24.0
github.com/hashicorp/terraform-plugin-go/internal/logging
github.com/hashicorp/terraform-plugin-go/tfprotov5
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/diag
@@ -699,8 +702,8 @@ github.com/hashicorp/terraform-plugin-log/internal/hclogutils
github.com/hashicorp/terraform-plugin-log/internal/logging
github.com/hashicorp/terraform-plugin-log/tflog
github.com/hashicorp/terraform-plugin-log/tfsdklog
-# github.com/hashicorp/terraform-plugin-sdk/v2 v2.34.0
-## explicit; go 1.21
+# github.com/hashicorp/terraform-plugin-sdk/v2 v2.38.1
+## explicit; go 1.24.0
github.com/hashicorp/terraform-plugin-sdk/v2/diag
github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest
github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff
@@ -723,14 +726,14 @@ github.com/hashicorp/terraform-plugin-sdk/v2/internal/tfdiags
github.com/hashicorp/terraform-plugin-sdk/v2/meta
github.com/hashicorp/terraform-plugin-sdk/v2/plugin
github.com/hashicorp/terraform-plugin-sdk/v2/terraform
-# github.com/hashicorp/terraform-registry-address v0.2.3
-## explicit; go 1.19
+# github.com/hashicorp/terraform-registry-address v0.4.0
+## explicit; go 1.23.0
github.com/hashicorp/terraform-registry-address
# github.com/hashicorp/terraform-svchost v0.1.1
## explicit; go 1.19
github.com/hashicorp/terraform-svchost
-# github.com/hashicorp/yamux v0.1.1
-## explicit; go 1.15
+# github.com/hashicorp/yamux v0.1.2
+## explicit; go 1.20
github.com/hashicorp/yamux
# github.com/hexops/gotextdiff v1.0.3
## explicit; go 1.16
@@ -752,8 +755,8 @@ github.com/jjti/go-spancheck
# github.com/julz/importas v0.2.0
## explicit; go 1.20
github.com/julz/importas
-# github.com/karamaru-alpha/copyloopvar v1.2.1
-## explicit; go 1.21
+# github.com/karamaru-alpha/copyloopvar v1.2.2
+## explicit; go 1.24.0
github.com/karamaru-alpha/copyloopvar
# github.com/kisielk/errcheck v1.9.0
## explicit; go 1.22.0
@@ -811,11 +814,11 @@ github.com/manuelarte/embeddedstructfieldcheck/internal
## explicit; go 1.23.0
github.com/manuelarte/funcorder/analyzer
github.com/manuelarte/funcorder/internal
-# github.com/maratori/testableexamples v1.0.0
-## explicit; go 1.19
+# github.com/maratori/testableexamples v1.0.1
+## explicit; go 1.22.0
github.com/maratori/testableexamples/pkg/testableexamples
-# github.com/maratori/testpackage v1.1.1
-## explicit; go 1.20
+# github.com/maratori/testpackage v1.1.2
+## explicit; go 1.22.0
github.com/maratori/testpackage/pkg/testpackage
# github.com/matoous/godox v1.1.0
## explicit; go 1.18
@@ -852,8 +855,8 @@ github.com/mitchellh/go-homedir
# github.com/mitchellh/go-testing-interface v1.14.1
## explicit; go 1.14
github.com/mitchellh/go-testing-interface
-# github.com/mitchellh/go-wordwrap v1.0.0
-## explicit
+# github.com/mitchellh/go-wordwrap v1.0.1
+## explicit; go 1.14
github.com/mitchellh/go-wordwrap
# github.com/mitchellh/mapstructure v1.5.0
## explicit; go 1.14
@@ -898,8 +901,8 @@ github.com/nunnatsa/ginkgolinter/internal/rules
github.com/nunnatsa/ginkgolinter/internal/typecheck
github.com/nunnatsa/ginkgolinter/linter
github.com/nunnatsa/ginkgolinter/version
-# github.com/oklog/run v1.0.0
-## explicit
+# github.com/oklog/run v1.1.0
+## explicit; go 1.13
github.com/oklog/run
# github.com/pelletier/go-toml v1.9.5
## explicit; go 1.12
@@ -911,7 +914,7 @@ github.com/pelletier/go-toml/v2/internal/characters
github.com/pelletier/go-toml/v2/internal/danger
github.com/pelletier/go-toml/v2/internal/tracker
github.com/pelletier/go-toml/v2/unstable
-# github.com/pmezard/go-difflib v1.0.0
+# github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2
## explicit
github.com/pmezard/go-difflib/difflib
# github.com/polyfloyd/go-errorlint v1.8.0
@@ -935,7 +938,7 @@ github.com/prometheus/common/model
github.com/prometheus/procfs
github.com/prometheus/procfs/internal/fs
github.com/prometheus/procfs/internal/util
-# github.com/quasilyte/go-ruleguard v0.4.4
+# github.com/quasilyte/go-ruleguard v0.4.5
## explicit; go 1.22.0
github.com/quasilyte/go-ruleguard/internal/goenv
github.com/quasilyte/go-ruleguard/internal/golist
@@ -1141,10 +1144,11 @@ github.com/yeya24/promlinter
# github.com/ykadowak/zerologlint v0.1.5
## explicit; go 1.19
github.com/ykadowak/zerologlint
-# github.com/zclconf/go-cty v1.14.4
-## explicit; go 1.18
+# github.com/zclconf/go-cty v1.17.0
+## explicit; go 1.23
github.com/zclconf/go-cty/cty
github.com/zclconf/go-cty/cty/convert
+github.com/zclconf/go-cty/cty/ctymarks
github.com/zclconf/go-cty/cty/ctystrings
github.com/zclconf/go-cty/cty/function
github.com/zclconf/go-cty/cty/function/stdlib
@@ -1185,13 +1189,15 @@ go.uber.org/zap/internal/exit
go.uber.org/zap/internal/pool
go.uber.org/zap/internal/stacktrace
go.uber.org/zap/zapcore
-# golang.org/x/crypto v0.43.0
+# golang.org/x/crypto v0.45.0
## explicit; go 1.24.0
golang.org/x/crypto/argon2
golang.org/x/crypto/blake2b
golang.org/x/crypto/blowfish
golang.org/x/crypto/cast5
golang.org/x/crypto/chacha20
+golang.org/x/crypto/cryptobyte
+golang.org/x/crypto/cryptobyte/asn1
golang.org/x/crypto/curve25519
golang.org/x/crypto/hkdf
golang.org/x/crypto/internal/alias
@@ -1203,7 +1209,7 @@ golang.org/x/crypto/salsa20/salsa
golang.org/x/crypto/sha3
golang.org/x/crypto/ssh
golang.org/x/crypto/ssh/internal/bcrypt_pbkdf
-# golang.org/x/exp/typeparams v0.0.0-20251002181428-27f1f14c8bb9
+# golang.org/x/exp/typeparams v0.0.0-20251023183803-a4bb9ffd2546
## explicit; go 1.24.0
golang.org/x/exp/typeparams
# golang.org/x/mod v0.29.0
@@ -1213,7 +1219,7 @@ golang.org/x/mod/modfile
golang.org/x/mod/module
golang.org/x/mod/semver
golang.org/x/mod/sumdb/dirhash
-# golang.org/x/net v0.46.0
+# golang.org/x/net v0.47.0
## explicit; go 1.24.0
golang.org/x/net/context/ctxhttp
golang.org/x/net/http/httpguts
@@ -1223,20 +1229,20 @@ golang.org/x/net/idna
golang.org/x/net/internal/httpcommon
golang.org/x/net/internal/timeseries
golang.org/x/net/trace
-# golang.org/x/oauth2 v0.30.0
-## explicit; go 1.23.0
+# golang.org/x/oauth2 v0.33.0
+## explicit; go 1.24.0
golang.org/x/oauth2
golang.org/x/oauth2/internal
-# golang.org/x/sync v0.17.0
+# golang.org/x/sync v0.18.0
## explicit; go 1.24.0
golang.org/x/sync/errgroup
golang.org/x/sync/semaphore
-# golang.org/x/sys v0.37.0
+# golang.org/x/sys v0.38.0
## explicit; go 1.24.0
golang.org/x/sys/cpu
golang.org/x/sys/unix
golang.org/x/sys/windows
-# golang.org/x/text v0.30.0
+# golang.org/x/text v0.31.0
## explicit; go 1.24.0
golang.org/x/text/feature/plural
golang.org/x/text/internal
@@ -1366,7 +1372,7 @@ google.golang.org/appengine/internal/remote_api
# google.golang.org/genproto/googleapis/rpc v0.0.0-20250818200422-3122310a409c
## explicit; go 1.23.0
google.golang.org/genproto/googleapis/rpc/status
-# google.golang.org/grpc v1.75.0
+# google.golang.org/grpc v1.75.1
## explicit; go 1.23.0
google.golang.org/grpc
google.golang.org/grpc/attributes
@@ -1434,7 +1440,7 @@ google.golang.org/grpc/serviceconfig
google.golang.org/grpc/stats
google.golang.org/grpc/status
google.golang.org/grpc/tap
-# google.golang.org/protobuf v1.36.8
+# google.golang.org/protobuf v1.36.9
## explicit; go 1.23
google.golang.org/protobuf/encoding/protojson
google.golang.org/protobuf/encoding/prototext