aboutsummaryrefslogtreecommitdiffhomepage
path: root/vendor/github.com/hashicorp
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/hashicorp')
-rw-r--r--vendor/github.com/hashicorp/go-getter/checksum.go30
-rw-r--r--vendor/github.com/hashicorp/go-getter/detect_bitbucket.go2
-rw-r--r--vendor/github.com/hashicorp/go-plugin/client.go20
-rw-r--r--vendor/github.com/hashicorp/go-plugin/server.go32
-rw-r--r--vendor/github.com/hashicorp/hcl2/ext/dynblock/README.md2
-rw-r--r--vendor/github.com/hashicorp/hcl2/hcl/hclsyntax/expression.go31
-rw-r--r--vendor/github.com/hashicorp/hcl2/hcl/hclsyntax/expression_template.go20
-rw-r--r--vendor/github.com/hashicorp/hcl2/hcl/hclsyntax/parser.go8
-rw-r--r--vendor/github.com/hashicorp/hcl2/hcl/hclsyntax/spec.md2
-rw-r--r--vendor/github.com/hashicorp/hcl2/hcl/json/structure.go6
-rw-r--r--vendor/github.com/hashicorp/hcl2/hcl/spec.md4
-rw-r--r--vendor/github.com/hashicorp/hcl2/hcl/structure.go4
-rw-r--r--vendor/github.com/hashicorp/hcl2/hcl/traversal_for_expr.go2
-rw-r--r--vendor/github.com/hashicorp/hcl2/hclwrite/format.go35
-rw-r--r--vendor/github.com/hashicorp/terraform/addrs/for_each_attr.go12
-rw-r--r--vendor/github.com/hashicorp/terraform/addrs/parse_ref.go8
-rw-r--r--vendor/github.com/hashicorp/terraform/command/format/plan.go4
-rw-r--r--vendor/github.com/hashicorp/terraform/command/format/state.go160
-rw-r--r--vendor/github.com/hashicorp/terraform/config/config.go29
-rw-r--r--vendor/github.com/hashicorp/terraform/config/interpolate_walk.go7
-rw-r--r--vendor/github.com/hashicorp/terraform/config/loader.go15
-rw-r--r--vendor/github.com/hashicorp/terraform/config/module/versions.go34
-rw-r--r--vendor/github.com/hashicorp/terraform/config/providers.go42
-rw-r--r--vendor/github.com/hashicorp/terraform/config/raw_config.go6
-rw-r--r--vendor/github.com/hashicorp/terraform/configs/config_build.go1
-rw-r--r--vendor/github.com/hashicorp/terraform/configs/configload/getter.go2
-rw-r--r--vendor/github.com/hashicorp/terraform/configs/configload/loader_load.go10
-rw-r--r--vendor/github.com/hashicorp/terraform/configs/configschema/coerce_value.go10
-rw-r--r--vendor/github.com/hashicorp/terraform/configs/configschema/decoder_spec.go14
-rw-r--r--vendor/github.com/hashicorp/terraform/configs/parser_config_dir.go21
-rw-r--r--vendor/github.com/hashicorp/terraform/configs/resource.go32
-rw-r--r--vendor/github.com/hashicorp/terraform/configs/version_constraint.go7
-rw-r--r--vendor/github.com/hashicorp/terraform/helper/plugin/grpc_provider.go78
-rw-r--r--vendor/github.com/hashicorp/terraform/helper/resource/state_shim.go78
-rw-r--r--vendor/github.com/hashicorp/terraform/helper/resource/testing_config.go3
-rw-r--r--vendor/github.com/hashicorp/terraform/helper/schema/field_reader_config.go3
-rw-r--r--vendor/github.com/hashicorp/terraform/helper/schema/field_reader_diff.go4
-rw-r--r--vendor/github.com/hashicorp/terraform/helper/schema/resource.go22
-rw-r--r--vendor/github.com/hashicorp/terraform/helper/schema/resource_timeout.go4
-rw-r--r--vendor/github.com/hashicorp/terraform/helper/schema/schema.go75
-rw-r--r--vendor/github.com/hashicorp/terraform/helper/schema/shims.go4
-rw-r--r--vendor/github.com/hashicorp/terraform/internal/initwd/getter.go2
-rw-r--r--vendor/github.com/hashicorp/terraform/internal/tfplugin5/tfplugin5.pb.go668
-rw-r--r--vendor/github.com/hashicorp/terraform/internal/tfplugin5/tfplugin5.proto351
-rw-r--r--vendor/github.com/hashicorp/terraform/lang/blocktoattr/schema.go9
-rw-r--r--vendor/github.com/hashicorp/terraform/lang/blocktoattr/variables.go2
-rw-r--r--vendor/github.com/hashicorp/terraform/lang/data.go1
-rw-r--r--vendor/github.com/hashicorp/terraform/lang/eval.go10
-rw-r--r--vendor/github.com/hashicorp/terraform/lang/funcs/collection.go30
-rw-r--r--vendor/github.com/hashicorp/terraform/lang/funcs/crypto.go40
-rw-r--r--vendor/github.com/hashicorp/terraform/lang/funcs/filesystem.go15
-rw-r--r--vendor/github.com/hashicorp/terraform/lang/functions.go6
-rw-r--r--vendor/github.com/hashicorp/terraform/plans/objchange/compatible.go12
-rw-r--r--vendor/github.com/hashicorp/terraform/plugin/discovery/get.go3
-rw-r--r--vendor/github.com/hashicorp/terraform/plugin/grpc_provider.go2
-rw-r--r--vendor/github.com/hashicorp/terraform/providers/provider.go8
-rw-r--r--vendor/github.com/hashicorp/terraform/states/state_deepcopy.go13
-rw-r--r--vendor/github.com/hashicorp/terraform/states/statefile/version2.go2
-rw-r--r--vendor/github.com/hashicorp/terraform/states/statefile/version3_upgrade.go27
-rw-r--r--vendor/github.com/hashicorp/terraform/terraform/diff.go13
-rw-r--r--vendor/github.com/hashicorp/terraform/terraform/eval_apply.go6
-rw-r--r--vendor/github.com/hashicorp/terraform/terraform/eval_diff.go26
-rw-r--r--vendor/github.com/hashicorp/terraform/terraform/eval_for_each.go85
-rw-r--r--vendor/github.com/hashicorp/terraform/terraform/eval_read_data.go14
-rw-r--r--vendor/github.com/hashicorp/terraform/terraform/eval_refresh.go2
-rw-r--r--vendor/github.com/hashicorp/terraform/terraform/eval_state.go14
-rw-r--r--vendor/github.com/hashicorp/terraform/terraform/eval_validate.go52
-rw-r--r--vendor/github.com/hashicorp/terraform/terraform/eval_variable.go3
-rw-r--r--vendor/github.com/hashicorp/terraform/terraform/evaluate.go53
-rw-r--r--vendor/github.com/hashicorp/terraform/terraform/interpolate.go13
-rw-r--r--vendor/github.com/hashicorp/terraform/terraform/node_data_refresh.go12
-rw-r--r--vendor/github.com/hashicorp/terraform/terraform/node_resource_abstract.go40
-rw-r--r--vendor/github.com/hashicorp/terraform/terraform/node_resource_apply_instance.go15
-rw-r--r--vendor/github.com/hashicorp/terraform/terraform/node_resource_plan.go11
-rw-r--r--vendor/github.com/hashicorp/terraform/terraform/node_resource_plan_instance.go15
-rw-r--r--vendor/github.com/hashicorp/terraform/terraform/node_resource_refresh.go7
-rw-r--r--vendor/github.com/hashicorp/terraform/terraform/node_resource_validate.go12
-rw-r--r--vendor/github.com/hashicorp/terraform/terraform/provider_mock.go3
-rw-r--r--vendor/github.com/hashicorp/terraform/terraform/resource_address.go2
-rw-r--r--vendor/github.com/hashicorp/terraform/terraform/state.go4
-rw-r--r--vendor/github.com/hashicorp/terraform/terraform/transform_orphan_count.go31
-rw-r--r--vendor/github.com/hashicorp/terraform/terraform/transform_resource_count.go21
-rw-r--r--vendor/github.com/hashicorp/terraform/terraform/util.go6
-rw-r--r--vendor/github.com/hashicorp/terraform/version/version.go2
84 files changed, 1453 insertions, 1093 deletions
diff --git a/vendor/github.com/hashicorp/go-getter/checksum.go b/vendor/github.com/hashicorp/go-getter/checksum.go
index bea7ed1..eeccfea 100644
--- a/vendor/github.com/hashicorp/go-getter/checksum.go
+++ b/vendor/github.com/hashicorp/go-getter/checksum.go
@@ -19,8 +19,8 @@ import (
19 urlhelper "github.com/hashicorp/go-getter/helper/url" 19 urlhelper "github.com/hashicorp/go-getter/helper/url"
20) 20)
21 21
22// fileChecksum helps verifying the checksum for a file. 22// FileChecksum helps verifying the checksum for a file.
23type fileChecksum struct { 23type FileChecksum struct {
24 Type string 24 Type string
25 Hash hash.Hash 25 Hash hash.Hash
26 Value []byte 26 Value []byte
@@ -50,7 +50,7 @@ func (cerr *ChecksumError) Error() string {
50 50
51// checksum is a simple method to compute the checksum of a source file 51// checksum is a simple method to compute the checksum of a source file
52// and compare it to the given expected value. 52// and compare it to the given expected value.
53func (c *fileChecksum) checksum(source string) error { 53func (c *FileChecksum) checksum(source string) error {
54 f, err := os.Open(source) 54 f, err := os.Open(source)
55 if err != nil { 55 if err != nil {
56 return fmt.Errorf("Failed to open file for checksum: %s", err) 56 return fmt.Errorf("Failed to open file for checksum: %s", err)
@@ -74,7 +74,7 @@ func (c *fileChecksum) checksum(source string) error {
74 return nil 74 return nil
75} 75}
76 76
77// extractChecksum will return a fileChecksum based on the 'checksum' 77// extractChecksum will return a FileChecksum based on the 'checksum'
78// parameter of u. 78// parameter of u.
79// ex: 79// ex:
80// http://hashicorp.com/terraform?checksum=<checksumValue> 80// http://hashicorp.com/terraform?checksum=<checksumValue>
@@ -93,7 +93,7 @@ func (c *fileChecksum) checksum(source string) error {
93// <checksum> *file2 93// <checksum> *file2
94// 94//
95// see parseChecksumLine for more detail on checksum file parsing 95// see parseChecksumLine for more detail on checksum file parsing
96func (c *Client) extractChecksum(u *url.URL) (*fileChecksum, error) { 96func (c *Client) extractChecksum(u *url.URL) (*FileChecksum, error) {
97 q := u.Query() 97 q := u.Query()
98 v := q.Get("checksum") 98 v := q.Get("checksum")
99 99
@@ -115,14 +115,14 @@ func (c *Client) extractChecksum(u *url.URL) (*fileChecksum, error) {
115 115
116 switch checksumType { 116 switch checksumType {
117 case "file": 117 case "file":
118 return c.checksumFromFile(checksumValue, u) 118 return c.ChecksumFromFile(checksumValue, u)
119 default: 119 default:
120 return newChecksumFromType(checksumType, checksumValue, filepath.Base(u.EscapedPath())) 120 return newChecksumFromType(checksumType, checksumValue, filepath.Base(u.EscapedPath()))
121 } 121 }
122} 122}
123 123
124func newChecksum(checksumValue, filename string) (*fileChecksum, error) { 124func newChecksum(checksumValue, filename string) (*FileChecksum, error) {
125 c := &fileChecksum{ 125 c := &FileChecksum{
126 Filename: filename, 126 Filename: filename,
127 } 127 }
128 var err error 128 var err error
@@ -133,7 +133,7 @@ func newChecksum(checksumValue, filename string) (*fileChecksum, error) {
133 return c, nil 133 return c, nil
134} 134}
135 135
136func newChecksumFromType(checksumType, checksumValue, filename string) (*fileChecksum, error) { 136func newChecksumFromType(checksumType, checksumValue, filename string) (*FileChecksum, error) {
137 c, err := newChecksum(checksumValue, filename) 137 c, err := newChecksum(checksumValue, filename)
138 if err != nil { 138 if err != nil {
139 return nil, err 139 return nil, err
@@ -157,7 +157,7 @@ func newChecksumFromType(checksumType, checksumValue, filename string) (*fileChe
157 return c, nil 157 return c, nil
158} 158}
159 159
160func newChecksumFromValue(checksumValue, filename string) (*fileChecksum, error) { 160func newChecksumFromValue(checksumValue, filename string) (*FileChecksum, error) {
161 c, err := newChecksum(checksumValue, filename) 161 c, err := newChecksum(checksumValue, filename)
162 if err != nil { 162 if err != nil {
163 return nil, err 163 return nil, err
@@ -183,14 +183,14 @@ func newChecksumFromValue(checksumValue, filename string) (*fileChecksum, error)
183 return c, nil 183 return c, nil
184} 184}
185 185
186// checksumsFromFile will return all the fileChecksums found in file 186// ChecksumFromFile will return all the FileChecksums found in file
187// 187//
188// checksumsFromFile will try to guess the hashing algorithm based on content 188// ChecksumFromFile will try to guess the hashing algorithm based on content
189// of checksum file 189// of checksum file
190// 190//
191// checksumsFromFile will only return checksums for files that match file 191// ChecksumFromFile will only return checksums for files that match file
192// behind src 192// behind src
193func (c *Client) checksumFromFile(checksumFile string, src *url.URL) (*fileChecksum, error) { 193func (c *Client) ChecksumFromFile(checksumFile string, src *url.URL) (*FileChecksum, error) {
194 checksumFileURL, err := urlhelper.Parse(checksumFile) 194 checksumFileURL, err := urlhelper.Parse(checksumFile)
195 if err != nil { 195 if err != nil {
196 return nil, err 196 return nil, err
@@ -286,7 +286,7 @@ func (c *Client) checksumFromFile(checksumFile string, src *url.URL) (*fileCheck
286// of a line. 286// of a line.
287// for BSD type sums parseChecksumLine guesses the hashing algorithm 287// for BSD type sums parseChecksumLine guesses the hashing algorithm
288// by checking the length of the checksum. 288// by checking the length of the checksum.
289func parseChecksumLine(line string) (*fileChecksum, error) { 289func parseChecksumLine(line string) (*FileChecksum, error) {
290 parts := strings.Fields(line) 290 parts := strings.Fields(line)
291 291
292 switch len(parts) { 292 switch len(parts) {
diff --git a/vendor/github.com/hashicorp/go-getter/detect_bitbucket.go b/vendor/github.com/hashicorp/go-getter/detect_bitbucket.go
index a183a17..19047eb 100644
--- a/vendor/github.com/hashicorp/go-getter/detect_bitbucket.go
+++ b/vendor/github.com/hashicorp/go-getter/detect_bitbucket.go
@@ -35,7 +35,7 @@ func (d *BitBucketDetector) detectHTTP(src string) (string, bool, error) {
35 var info struct { 35 var info struct {
36 SCM string `json:"scm"` 36 SCM string `json:"scm"`
37 } 37 }
38 infoUrl := "https://api.bitbucket.org/1.0/repositories" + u.Path 38 infoUrl := "https://api.bitbucket.org/2.0/repositories" + u.Path
39 resp, err := http.Get(infoUrl) 39 resp, err := http.Get(infoUrl)
40 if err != nil { 40 if err != nil {
41 return "", true, fmt.Errorf("error looking up BitBucket URL: %s", err) 41 return "", true, fmt.Errorf("error looking up BitBucket URL: %s", err)
diff --git a/vendor/github.com/hashicorp/go-plugin/client.go b/vendor/github.com/hashicorp/go-plugin/client.go
index 679e10a..bc56559 100644
--- a/vendor/github.com/hashicorp/go-plugin/client.go
+++ b/vendor/github.com/hashicorp/go-plugin/client.go
@@ -87,6 +87,10 @@ type Client struct {
87 // goroutines. 87 // goroutines.
88 clientWaitGroup sync.WaitGroup 88 clientWaitGroup sync.WaitGroup
89 89
90 // stderrWaitGroup is used to prevent the command's Wait() function from
91 // being called before we've finished reading from the stderr pipe.
92 stderrWaitGroup sync.WaitGroup
93
90 // processKilled is used for testing only, to flag when the process was 94 // processKilled is used for testing only, to flag when the process was
91 // forcefully killed. 95 // forcefully killed.
92 processKilled bool 96 processKilled bool
@@ -590,6 +594,12 @@ func (c *Client) Start() (addr net.Addr, err error) {
590 // Create a context for when we kill 594 // Create a context for when we kill
591 c.doneCtx, c.ctxCancel = context.WithCancel(context.Background()) 595 c.doneCtx, c.ctxCancel = context.WithCancel(context.Background())
592 596
597 // Start goroutine that logs the stderr
598 c.clientWaitGroup.Add(1)
599 c.stderrWaitGroup.Add(1)
600 // logStderr calls Done()
601 go c.logStderr(cmdStderr)
602
593 c.clientWaitGroup.Add(1) 603 c.clientWaitGroup.Add(1)
594 go func() { 604 go func() {
595 // ensure the context is cancelled when we're done 605 // ensure the context is cancelled when we're done
@@ -602,6 +612,10 @@ func (c *Client) Start() (addr net.Addr, err error) {
602 pid := c.process.Pid 612 pid := c.process.Pid
603 path := cmd.Path 613 path := cmd.Path
604 614
615 // wait to finish reading from stderr since the stderr pipe reader
616 // will be closed by the subsequent call to cmd.Wait().
617 c.stderrWaitGroup.Wait()
618
605 // Wait for the command to end. 619 // Wait for the command to end.
606 err := cmd.Wait() 620 err := cmd.Wait()
607 621
@@ -624,11 +638,6 @@ func (c *Client) Start() (addr net.Addr, err error) {
624 c.exited = true 638 c.exited = true
625 }() 639 }()
626 640
627 // Start goroutine that logs the stderr
628 c.clientWaitGroup.Add(1)
629 // logStderr calls Done()
630 go c.logStderr(cmdStderr)
631
632 // Start a goroutine that is going to be reading the lines 641 // Start a goroutine that is going to be reading the lines
633 // out of stdout 642 // out of stdout
634 linesCh := make(chan string) 643 linesCh := make(chan string)
@@ -936,6 +945,7 @@ var stdErrBufferSize = 64 * 1024
936 945
937func (c *Client) logStderr(r io.Reader) { 946func (c *Client) logStderr(r io.Reader) {
938 defer c.clientWaitGroup.Done() 947 defer c.clientWaitGroup.Done()
948 defer c.stderrWaitGroup.Done()
939 l := c.logger.Named(filepath.Base(c.config.Cmd.Path)) 949 l := c.logger.Named(filepath.Base(c.config.Cmd.Path))
940 950
941 reader := bufio.NewReaderSize(r, stdErrBufferSize) 951 reader := bufio.NewReaderSize(r, stdErrBufferSize)
diff --git a/vendor/github.com/hashicorp/go-plugin/server.go b/vendor/github.com/hashicorp/go-plugin/server.go
index fc9f05a..4c230e3 100644
--- a/vendor/github.com/hashicorp/go-plugin/server.go
+++ b/vendor/github.com/hashicorp/go-plugin/server.go
@@ -363,14 +363,34 @@ func serverListener() (net.Listener, error) {
363} 363}
364 364
365func serverListener_tcp() (net.Listener, error) { 365func serverListener_tcp() (net.Listener, error) {
366 minPort, err := strconv.ParseInt(os.Getenv("PLUGIN_MIN_PORT"), 10, 32) 366 envMinPort := os.Getenv("PLUGIN_MIN_PORT")
367 if err != nil { 367 envMaxPort := os.Getenv("PLUGIN_MAX_PORT")
368 return nil, err 368
369 var minPort, maxPort int64
370 var err error
371
372 switch {
373 case len(envMinPort) == 0:
374 minPort = 0
375 default:
376 minPort, err = strconv.ParseInt(envMinPort, 10, 32)
377 if err != nil {
378 return nil, fmt.Errorf("Couldn't get value from PLUGIN_MIN_PORT: %v", err)
379 }
369 } 380 }
370 381
371 maxPort, err := strconv.ParseInt(os.Getenv("PLUGIN_MAX_PORT"), 10, 32) 382 switch {
372 if err != nil { 383 case len(envMaxPort) == 0:
373 return nil, err 384 maxPort = 0
385 default:
386 maxPort, err = strconv.ParseInt(envMaxPort, 10, 32)
387 if err != nil {
388 return nil, fmt.Errorf("Couldn't get value from PLUGIN_MAX_PORT: %v", err)
389 }
390 }
391
392 if minPort > maxPort {
393 return nil, fmt.Errorf("ENV_MIN_PORT value of %d is greater than PLUGIN_MAX_PORT value of %d", minPort, maxPort)
374 } 394 }
375 395
376 for port := minPort; port <= maxPort; port++ { 396 for port := minPort; port <= maxPort; port++ {
diff --git a/vendor/github.com/hashicorp/hcl2/ext/dynblock/README.md b/vendor/github.com/hashicorp/hcl2/ext/dynblock/README.md
index 2b24fdb..f59ce92 100644
--- a/vendor/github.com/hashicorp/hcl2/ext/dynblock/README.md
+++ b/vendor/github.com/hashicorp/hcl2/ext/dynblock/README.md
@@ -95,7 +95,7 @@ schema model provides a description of only one level of nested blocks at
95a time, and thus a new schema must be provided for each additional level of 95a time, and thus a new schema must be provided for each additional level of
96nesting. 96nesting.
97 97
98To make this arduous process as convenient as possbile, this package provides 98To make this arduous process as convenient as possible, this package provides
99a helper function `WalkForEachVariables`, which returns a `WalkVariablesNode` 99a helper function `WalkForEachVariables`, which returns a `WalkVariablesNode`
100instance that can be used to find variables directly in a given body and also 100instance that can be used to find variables directly in a given body and also
101determine which nested blocks require recursive calls. Using this mechanism 101determine which nested blocks require recursive calls. Using this mechanism
diff --git a/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax/expression.go b/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax/expression.go
index 26819a2..d3f7a74 100644
--- a/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax/expression.go
+++ b/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax/expression.go
@@ -473,8 +473,35 @@ func (e *ConditionalExpr) Value(ctx *hcl.EvalContext) (cty.Value, hcl.Diagnostic
473 falseResult, falseDiags := e.FalseResult.Value(ctx) 473 falseResult, falseDiags := e.FalseResult.Value(ctx)
474 var diags hcl.Diagnostics 474 var diags hcl.Diagnostics
475 475
476 // Try to find a type that both results can be converted to. 476 resultType := cty.DynamicPseudoType
477 resultType, convs := convert.UnifyUnsafe([]cty.Type{trueResult.Type(), falseResult.Type()}) 477 convs := make([]convert.Conversion, 2)
478
479 switch {
480 // If either case is a dynamic null value (which would result from a
481 // literal null in the config), we know that it can convert to the expected
482 // type of the opposite case, and we don't need to speculatively reduce the
483 // final result type to DynamicPseudoType.
484
485 // If we know that either Type is a DynamicPseudoType, we can be certain
486 // that the other value can convert since it's a pass-through, and we don't
487 // need to unify the types. If the final evaluation results in the dynamic
488 // value being returned, there's no conversion we can do, so we return the
489 // value directly.
490 case trueResult.RawEquals(cty.NullVal(cty.DynamicPseudoType)):
491 resultType = falseResult.Type()
492 convs[0] = convert.GetConversionUnsafe(cty.DynamicPseudoType, resultType)
493 case falseResult.RawEquals(cty.NullVal(cty.DynamicPseudoType)):
494 resultType = trueResult.Type()
495 convs[1] = convert.GetConversionUnsafe(cty.DynamicPseudoType, resultType)
496 case trueResult.Type() == cty.DynamicPseudoType, falseResult.Type() == cty.DynamicPseudoType:
497 // the final resultType type is still unknown
498 // we don't need to get the conversion, because both are a noop.
499
500 default:
501 // Try to find a type that both results can be converted to.
502 resultType, convs = convert.UnifyUnsafe([]cty.Type{trueResult.Type(), falseResult.Type()})
503 }
504
478 if resultType == cty.NilType { 505 if resultType == cty.NilType {
479 return cty.DynamicVal, hcl.Diagnostics{ 506 return cty.DynamicVal, hcl.Diagnostics{
480 { 507 {
diff --git a/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax/expression_template.go b/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax/expression_template.go
index fa79e3d..ca3dae1 100644
--- a/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax/expression_template.go
+++ b/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax/expression_template.go
@@ -89,6 +89,26 @@ func (e *TemplateExpr) StartRange() hcl.Range {
89 return e.Parts[0].StartRange() 89 return e.Parts[0].StartRange()
90} 90}
91 91
92// IsStringLiteral returns true if and only if the template consists only of
93// single string literal, as would be created for a simple quoted string like
94// "foo".
95//
96// If this function returns true, then calling Value on the same expression
97// with a nil EvalContext will return the literal value.
98//
99// Note that "${"foo"}", "${1}", etc aren't considered literal values for the
100// purposes of this method, because the intent of this method is to identify
101// situations where the user seems to be explicitly intending literal string
102// interpretation, not situations that result in literals as a technicality
103// of the template expression unwrapping behavior.
104func (e *TemplateExpr) IsStringLiteral() bool {
105 if len(e.Parts) != 1 {
106 return false
107 }
108 _, ok := e.Parts[0].(*LiteralValueExpr)
109 return ok
110}
111
92// TemplateJoinExpr is used to convert tuples of strings produced by template 112// TemplateJoinExpr is used to convert tuples of strings produced by template
93// constructs (i.e. for loops) into flat strings, by converting the values 113// constructs (i.e. for loops) into flat strings, by converting the values
94// tos strings and joining them. This AST node is not used directly; it's 114// tos strings and joining them. This AST node is not used directly; it's
diff --git a/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax/parser.go b/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax/parser.go
index 253ad50..772ebae 100644
--- a/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax/parser.go
+++ b/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax/parser.go
@@ -853,6 +853,14 @@ Traversal:
853 SrcRange: rng, 853 SrcRange: rng,
854 } 854 }
855 ret = makeRelativeTraversal(ret, step, rng) 855 ret = makeRelativeTraversal(ret, step, rng)
856 } else if tmpl, isTmpl := keyExpr.(*TemplateExpr); isTmpl && tmpl.IsStringLiteral() {
857 litKey, _ := tmpl.Value(nil)
858 rng := hcl.RangeBetween(open.Range, close.Range)
859 step := hcl.TraverseIndex{
860 Key: litKey,
861 SrcRange: rng,
862 }
863 ret = makeRelativeTraversal(ret, step, rng)
856 } else { 864 } else {
857 rng := hcl.RangeBetween(open.Range, close.Range) 865 rng := hcl.RangeBetween(open.Range, close.Range)
858 ret = &IndexExpr{ 866 ret = &IndexExpr{
diff --git a/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax/spec.md b/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax/spec.md
index 091c1c2..d7faeed 100644
--- a/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax/spec.md
+++ b/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax/spec.md
@@ -187,7 +187,7 @@ for later evaluation by the calling application.
187### Blocks 187### Blocks
188 188
189A _block_ creates a child body that is annotated with a block _type_ and 189A _block_ creates a child body that is annotated with a block _type_ and
190zero or more block _labels_. Blocks create a structural hierachy which can be 190zero or more block _labels_. Blocks create a structural hierarchy which can be
191interpreted by the calling application. 191interpreted by the calling application.
192 192
193Block labels can either be quoted literal strings or naked identifiers. 193Block labels can either be quoted literal strings or naked identifiers.
diff --git a/vendor/github.com/hashicorp/hcl2/hcl/json/structure.go b/vendor/github.com/hashicorp/hcl2/hcl/json/structure.go
index bdc0e98..74847c7 100644
--- a/vendor/github.com/hashicorp/hcl2/hcl/json/structure.go
+++ b/vendor/github.com/hashicorp/hcl2/hcl/json/structure.go
@@ -416,12 +416,14 @@ func (e *expression) Value(ctx *hcl.EvalContext) (cty.Value, hcl.Diagnostics) {
416 case *booleanVal: 416 case *booleanVal:
417 return cty.BoolVal(v.Value), nil 417 return cty.BoolVal(v.Value), nil
418 case *arrayVal: 418 case *arrayVal:
419 var diags hcl.Diagnostics
419 vals := []cty.Value{} 420 vals := []cty.Value{}
420 for _, jsonVal := range v.Values { 421 for _, jsonVal := range v.Values {
421 val, _ := (&expression{src: jsonVal}).Value(ctx) 422 val, valDiags := (&expression{src: jsonVal}).Value(ctx)
422 vals = append(vals, val) 423 vals = append(vals, val)
424 diags = append(diags, valDiags...)
423 } 425 }
424 return cty.TupleVal(vals), nil 426 return cty.TupleVal(vals), diags
425 case *objectVal: 427 case *objectVal:
426 var diags hcl.Diagnostics 428 var diags hcl.Diagnostics
427 attrs := map[string]cty.Value{} 429 attrs := map[string]cty.Value{}
diff --git a/vendor/github.com/hashicorp/hcl2/hcl/spec.md b/vendor/github.com/hashicorp/hcl2/hcl/spec.md
index 8bbaff8..97ef613 100644
--- a/vendor/github.com/hashicorp/hcl2/hcl/spec.md
+++ b/vendor/github.com/hashicorp/hcl2/hcl/spec.md
@@ -66,7 +66,7 @@ _block header schemata_:
66Within a schema, it is an error to request the same attribute name twice or 66Within a schema, it is an error to request the same attribute name twice or
67to request a block type whose name is also an attribute name. While this can 67to request a block type whose name is also an attribute name. While this can
68in principle be supported in some syntaxes, in other syntaxes the attribute 68in principle be supported in some syntaxes, in other syntaxes the attribute
69and block namespaces are combined and so an an attribute cannot coexist with 69and block namespaces are combined and so an attribute cannot coexist with
70a block whose type name is identical to the attribute name. 70a block whose type name is identical to the attribute name.
71 71
72The result of applying a body schema to a body is _body content_, which 72The result of applying a body schema to a body is _body content_, which
@@ -497,7 +497,7 @@ producing an unknown value of the target type.
497 497
498Conversion of any value _to_ the dynamic pseudo-type is a no-op. The result 498Conversion of any value _to_ the dynamic pseudo-type is a no-op. The result
499is the input value, verbatim. This is the only situation where the conversion 499is the input value, verbatim. This is the only situation where the conversion
500result value is not of the the given target type. 500result value is not of the given target type.
501 501
502### Primitive Type Conversions 502### Primitive Type Conversions
503 503
diff --git a/vendor/github.com/hashicorp/hcl2/hcl/structure.go b/vendor/github.com/hashicorp/hcl2/hcl/structure.go
index b336f30..aab0945 100644
--- a/vendor/github.com/hashicorp/hcl2/hcl/structure.go
+++ b/vendor/github.com/hashicorp/hcl2/hcl/structure.go
@@ -33,9 +33,9 @@ type Blocks []*Block
33type Attributes map[string]*Attribute 33type Attributes map[string]*Attribute
34 34
35// Body is a container for attributes and blocks. It serves as the primary 35// Body is a container for attributes and blocks. It serves as the primary
36// unit of heirarchical structure within configuration. 36// unit of hierarchical structure within configuration.
37// 37//
38// The content of a body cannot be meaningfully intepreted without a schema, 38// The content of a body cannot be meaningfully interpreted without a schema,
39// so Body represents the raw body content and has methods that allow the 39// so Body represents the raw body content and has methods that allow the
40// content to be extracted in terms of a given schema. 40// content to be extracted in terms of a given schema.
41type Body interface { 41type Body interface {
diff --git a/vendor/github.com/hashicorp/hcl2/hcl/traversal_for_expr.go b/vendor/github.com/hashicorp/hcl2/hcl/traversal_for_expr.go
index d4a565a..f69d5fe 100644
--- a/vendor/github.com/hashicorp/hcl2/hcl/traversal_for_expr.go
+++ b/vendor/github.com/hashicorp/hcl2/hcl/traversal_for_expr.go
@@ -36,7 +36,7 @@ func AbsTraversalForExpr(expr Expression) (Traversal, Diagnostics) {
36 &Diagnostic{ 36 &Diagnostic{
37 Severity: DiagError, 37 Severity: DiagError,
38 Summary: "Invalid expression", 38 Summary: "Invalid expression",
39 Detail: "A static variable reference is required.", 39 Detail: "A single static variable reference is required: only attribute access and indexing with constant keys. No calculations, function calls, template expressions, etc are allowed here.",
40 Subject: expr.Range().Ptr(), 40 Subject: expr.Range().Ptr(),
41 }, 41 },
42 } 42 }
diff --git a/vendor/github.com/hashicorp/hcl2/hclwrite/format.go b/vendor/github.com/hashicorp/hcl2/hclwrite/format.go
index f20ae23..ded7fb4 100644
--- a/vendor/github.com/hashicorp/hcl2/hclwrite/format.go
+++ b/vendor/github.com/hashicorp/hcl2/hclwrite/format.go
@@ -54,22 +54,12 @@ func formatIndent(lines []formatLine) {
54 // which should be more than enough for reasonable HCL uses. 54 // which should be more than enough for reasonable HCL uses.
55 indents := make([]int, 0, 10) 55 indents := make([]int, 0, 10)
56 56
57 inHeredoc := false
58 for i := range lines { 57 for i := range lines {
59 line := &lines[i] 58 line := &lines[i]
60 if len(line.lead) == 0 { 59 if len(line.lead) == 0 {
61 continue 60 continue
62 } 61 }
63 62
64 if inHeredoc {
65 for _, token := range line.lead {
66 if token.Type == hclsyntax.TokenCHeredoc {
67 inHeredoc = false
68 }
69 }
70 continue // don't touch indentation inside heredocs
71 }
72
73 if line.lead[0].Type == hclsyntax.TokenNewline { 63 if line.lead[0].Type == hclsyntax.TokenNewline {
74 // Never place spaces before a newline 64 // Never place spaces before a newline
75 line.lead[0].SpacesBefore = 0 65 line.lead[0].SpacesBefore = 0
@@ -80,9 +70,10 @@ func formatIndent(lines []formatLine) {
80 for _, token := range line.lead { 70 for _, token := range line.lead {
81 netBrackets += tokenBracketChange(token) 71 netBrackets += tokenBracketChange(token)
82 if token.Type == hclsyntax.TokenOHeredoc { 72 if token.Type == hclsyntax.TokenOHeredoc {
83 inHeredoc = true 73 break
84 } 74 }
85 } 75 }
76
86 for _, token := range line.assign { 77 for _, token := range line.assign {
87 netBrackets += tokenBracketChange(token) 78 netBrackets += tokenBracketChange(token)
88 } 79 }
@@ -391,9 +382,9 @@ func linesForFormat(tokens Tokens) []formatLine {
391 382
392 // Now we'll pick off any trailing comments and attribute assignments 383 // Now we'll pick off any trailing comments and attribute assignments
393 // to shuffle off into the "comment" and "assign" cells. 384 // to shuffle off into the "comment" and "assign" cells.
394 inHeredoc := false
395 for i := range lines { 385 for i := range lines {
396 line := &lines[i] 386 line := &lines[i]
387
397 if len(line.lead) == 0 { 388 if len(line.lead) == 0 {
398 // if the line is empty then there's nothing for us to do 389 // if the line is empty then there's nothing for us to do
399 // (this should happen only for the final line, because all other 390 // (this should happen only for the final line, because all other
@@ -401,26 +392,6 @@ func linesForFormat(tokens Tokens) []formatLine {
401 continue 392 continue
402 } 393 }
403 394
404 if inHeredoc {
405 for _, tok := range line.lead {
406 if tok.Type == hclsyntax.TokenCHeredoc {
407 inHeredoc = false
408 break
409 }
410 }
411 // Inside a heredoc everything is "lead", even if there's a
412 // template interpolation embedded in there that might otherwise
413 // confuse our logic below.
414 continue
415 }
416
417 for _, tok := range line.lead {
418 if tok.Type == hclsyntax.TokenOHeredoc {
419 inHeredoc = true
420 break
421 }
422 }
423
424 if len(line.lead) > 1 && line.lead[len(line.lead)-1].Type == hclsyntax.TokenComment { 395 if len(line.lead) > 1 && line.lead[len(line.lead)-1].Type == hclsyntax.TokenComment {
425 line.comment = line.lead[len(line.lead)-1:] 396 line.comment = line.lead[len(line.lead)-1:]
426 line.lead = line.lead[:len(line.lead)-1] 397 line.lead = line.lead[:len(line.lead)-1]
diff --git a/vendor/github.com/hashicorp/terraform/addrs/for_each_attr.go b/vendor/github.com/hashicorp/terraform/addrs/for_each_attr.go
new file mode 100644
index 0000000..7a63850
--- /dev/null
+++ b/vendor/github.com/hashicorp/terraform/addrs/for_each_attr.go
@@ -0,0 +1,12 @@
1package addrs
2
3// ForEachAttr is the address of an attribute referencing the current "for_each" object in
4// the interpolation scope, addressed using the "each" keyword, ex. "each.key" and "each.value"
5type ForEachAttr struct {
6 referenceable
7 Name string
8}
9
10func (f ForEachAttr) String() string {
11 return "each." + f.Name
12}
diff --git a/vendor/github.com/hashicorp/terraform/addrs/parse_ref.go b/vendor/github.com/hashicorp/terraform/addrs/parse_ref.go
index 84fe8a0..a230d0c 100644
--- a/vendor/github.com/hashicorp/terraform/addrs/parse_ref.go
+++ b/vendor/github.com/hashicorp/terraform/addrs/parse_ref.go
@@ -85,6 +85,14 @@ func parseRef(traversal hcl.Traversal) (*Reference, tfdiags.Diagnostics) {
85 Remaining: remain, 85 Remaining: remain,
86 }, diags 86 }, diags
87 87
88 case "each":
89 name, rng, remain, diags := parseSingleAttrRef(traversal)
90 return &Reference{
91 Subject: ForEachAttr{Name: name},
92 SourceRange: tfdiags.SourceRangeFromHCL(rng),
93 Remaining: remain,
94 }, diags
95
88 case "data": 96 case "data":
89 if len(traversal) < 3 { 97 if len(traversal) < 3 {
90 diags = diags.Append(&hcl.Diagnostic{ 98 diags = diags.Append(&hcl.Diagnostic{
diff --git a/vendor/github.com/hashicorp/terraform/command/format/plan.go b/vendor/github.com/hashicorp/terraform/command/format/plan.go
index 098653f..ef129a9 100644
--- a/vendor/github.com/hashicorp/terraform/command/format/plan.go
+++ b/vendor/github.com/hashicorp/terraform/command/format/plan.go
@@ -83,6 +83,10 @@ func NewPlan(changes *plans.Changes) *Plan {
83 continue 83 continue
84 } 84 }
85 85
86 if rc.Action == plans.NoOp {
87 continue
88 }
89
86 // For now we'll shim this to work with our old types. 90 // For now we'll shim this to work with our old types.
87 // TODO: Update for the new plan types, ideally also switching over to 91 // TODO: Update for the new plan types, ideally also switching over to
88 // a structural diff renderer instead of a flat renderer. 92 // a structural diff renderer instead of a flat renderer.
diff --git a/vendor/github.com/hashicorp/terraform/command/format/state.go b/vendor/github.com/hashicorp/terraform/command/format/state.go
index f411ef9..be1ea24 100644
--- a/vendor/github.com/hashicorp/terraform/command/format/state.go
+++ b/vendor/github.com/hashicorp/terraform/command/format/state.go
@@ -75,11 +75,14 @@ func State(opts *StateOpts) string {
75 v := m.OutputValues[k] 75 v := m.OutputValues[k]
76 p.buf.WriteString(fmt.Sprintf("%s = ", k)) 76 p.buf.WriteString(fmt.Sprintf("%s = ", k))
77 p.writeValue(v.Value, plans.NoOp, 0) 77 p.writeValue(v.Value, plans.NoOp, 0)
78 p.buf.WriteString("\n\n") 78 p.buf.WriteString("\n")
79 } 79 }
80 } 80 }
81 81
82 return opts.Color.Color(strings.TrimSpace(p.buf.String())) 82 trimmedOutput := strings.TrimSpace(p.buf.String())
83 trimmedOutput += "[reset]"
84
85 return opts.Color.Color(trimmedOutput)
83 86
84} 87}
85 88
@@ -95,81 +98,114 @@ func formatStateModule(p blockBodyDiffPrinter, m *states.Module, schemas *terraf
95 // Go through each resource and begin building up the output. 98 // Go through each resource and begin building up the output.
96 for _, key := range names { 99 for _, key := range names {
97 for k, v := range m.Resources[key].Instances { 100 for k, v := range m.Resources[key].Instances {
101 // keep these in order to keep the current object first, and
102 // provide deterministic output for the deposed objects
103 type obj struct {
104 header string
105 instance *states.ResourceInstanceObjectSrc
106 }
107 instances := []obj{}
108
98 addr := m.Resources[key].Addr 109 addr := m.Resources[key].Addr
99 110
100 taintStr := "" 111 taintStr := ""
101 if v.Current.Status == 'T' { 112 if v.Current != nil && v.Current.Status == 'T' {
102 taintStr = "(tainted)" 113 taintStr = " (tainted)"
103 } 114 }
104 p.buf.WriteString(fmt.Sprintf("# %s: %s\n", addr.Absolute(m.Addr).Instance(k), taintStr)) 115
105 116 instances = append(instances,
106 var schema *configschema.Block 117 obj{fmt.Sprintf("# %s:%s\n", addr.Absolute(m.Addr).Instance(k), taintStr), v.Current})
107 provider := m.Resources[key].ProviderConfig.ProviderConfig.StringCompact() 118
108 if _, exists := schemas.Providers[provider]; !exists { 119 for dk, v := range v.Deposed {
109 // This should never happen in normal use because we should've 120 instances = append(instances,
110 // loaded all of the schemas and checked things prior to this 121 obj{fmt.Sprintf("# %s: (deposed object %s)\n", addr.Absolute(m.Addr).Instance(k), dk), v})
111 // point. We can't return errors here, but since this is UI code
112 // we will try to do _something_ reasonable.
113 p.buf.WriteString(fmt.Sprintf("# missing schema for provider %q\n\n", provider))
114 continue
115 } 122 }
116 123
117 switch addr.Mode { 124 // Sort the instances for consistent output.
118 case addrs.ManagedResourceMode: 125 // Starting the sort from the second index, so the current instance
119 schema, _ = schemas.ResourceTypeConfig( 126 // is always first.
120 provider, 127 sort.Slice(instances[1:], func(i, j int) bool {
121 addr.Mode, 128 return instances[i+1].header < instances[j+1].header
122 addr.Type, 129 })
123 ) 130
124 if schema == nil { 131 for _, obj := range instances {
125 p.buf.WriteString(fmt.Sprintf( 132 header := obj.header
126 "# missing schema for provider %q resource type %s\n\n", provider, addr.Type)) 133 instance := obj.instance
134 p.buf.WriteString(header)
135 if instance == nil {
136 // this shouldn't happen, but there's nothing to do here so
137 // don't panic below.
127 continue 138 continue
128 } 139 }
129 140
130 p.buf.WriteString(fmt.Sprintf( 141 var schema *configschema.Block
131 "resource %q %q {", 142 provider := m.Resources[key].ProviderConfig.ProviderConfig.StringCompact()
132 addr.Type, 143 if _, exists := schemas.Providers[provider]; !exists {
133 addr.Name, 144 // This should never happen in normal use because we should've
134 )) 145 // loaded all of the schemas and checked things prior to this
135 case addrs.DataResourceMode: 146 // point. We can't return errors here, but since this is UI code
136 schema, _ = schemas.ResourceTypeConfig( 147 // we will try to do _something_ reasonable.
137 provider, 148 p.buf.WriteString(fmt.Sprintf("# missing schema for provider %q\n\n", provider))
138 addr.Mode,
139 addr.Type,
140 )
141 if schema == nil {
142 p.buf.WriteString(fmt.Sprintf(
143 "# missing schema for provider %q data source %s\n\n", provider, addr.Type))
144 continue 149 continue
145 } 150 }
146 151
147 p.buf.WriteString(fmt.Sprintf( 152 switch addr.Mode {
148 "data %q %q {", 153 case addrs.ManagedResourceMode:
149 addr.Type, 154 schema, _ = schemas.ResourceTypeConfig(
150 addr.Name, 155 provider,
151 )) 156 addr.Mode,
152 default: 157 addr.Type,
153 // should never happen, since the above is exhaustive 158 )
154 p.buf.WriteString(addr.String()) 159 if schema == nil {
155 } 160 p.buf.WriteString(fmt.Sprintf(
161 "# missing schema for provider %q resource type %s\n\n", provider, addr.Type))
162 continue
163 }
156 164
157 val, err := v.Current.Decode(schema.ImpliedType()) 165 p.buf.WriteString(fmt.Sprintf(
158 if err != nil { 166 "resource %q %q {",
159 fmt.Println(err.Error()) 167 addr.Type,
160 break 168 addr.Name,
161 } 169 ))
170 case addrs.DataResourceMode:
171 schema, _ = schemas.ResourceTypeConfig(
172 provider,
173 addr.Mode,
174 addr.Type,
175 )
176 if schema == nil {
177 p.buf.WriteString(fmt.Sprintf(
178 "# missing schema for provider %q data source %s\n\n", provider, addr.Type))
179 continue
180 }
162 181
163 path := make(cty.Path, 0, 3) 182 p.buf.WriteString(fmt.Sprintf(
164 bodyWritten := p.writeBlockBodyDiff(schema, val.Value, val.Value, 2, path) 183 "data %q %q {",
165 if bodyWritten { 184 addr.Type,
166 p.buf.WriteString("\n") 185 addr.Name,
167 } 186 ))
187 default:
188 // should never happen, since the above is exhaustive
189 p.buf.WriteString(addr.String())
190 }
168 191
169 p.buf.WriteString("}\n\n") 192 val, err := instance.Decode(schema.ImpliedType())
193 if err != nil {
194 fmt.Println(err.Error())
195 break
196 }
197
198 path := make(cty.Path, 0, 3)
199 bodyWritten := p.writeBlockBodyDiff(schema, val.Value, val.Value, 2, path)
200 if bodyWritten {
201 p.buf.WriteString("\n")
202 }
203
204 p.buf.WriteString("}\n\n")
205 }
170 } 206 }
171 } 207 }
172 p.buf.WriteString("[reset]\n") 208 p.buf.WriteString("\n")
173} 209}
174 210
175func formatNestedList(indent string, outputList []interface{}) string { 211func formatNestedList(indent string, outputList []interface{}) string {
@@ -231,7 +267,7 @@ func formatListOutput(indent, outputName string, outputList []interface{}) strin
231 267
232func formatNestedMap(indent string, outputMap map[string]interface{}) string { 268func formatNestedMap(indent string, outputMap map[string]interface{}) string {
233 ks := make([]string, 0, len(outputMap)) 269 ks := make([]string, 0, len(outputMap))
234 for k, _ := range outputMap { 270 for k := range outputMap {
235 ks = append(ks, k) 271 ks = append(ks, k)
236 } 272 }
237 sort.Strings(ks) 273 sort.Strings(ks)
@@ -256,7 +292,7 @@ func formatNestedMap(indent string, outputMap map[string]interface{}) string {
256 292
257func formatMapOutput(indent, outputName string, outputMap map[string]interface{}) string { 293func formatMapOutput(indent, outputName string, outputMap map[string]interface{}) string {
258 ks := make([]string, 0, len(outputMap)) 294 ks := make([]string, 0, len(outputMap))
259 for k, _ := range outputMap { 295 for k := range outputMap {
260 ks = append(ks, k) 296 ks = append(ks, k)
261 } 297 }
262 sort.Strings(ks) 298 sort.Strings(ks)
diff --git a/vendor/github.com/hashicorp/terraform/config/config.go b/vendor/github.com/hashicorp/terraform/config/config.go
index 1772fd7..f13a046 100644
--- a/vendor/github.com/hashicorp/terraform/config/config.go
+++ b/vendor/github.com/hashicorp/terraform/config/config.go
@@ -252,35 +252,6 @@ func (r *Resource) Id() string {
252 } 252 }
253} 253}
254 254
255// ProviderFullName returns the full name of the provider for this resource,
256// which may either be specified explicitly using the "provider" meta-argument
257// or implied by the prefix on the resource type name.
258func (r *Resource) ProviderFullName() string {
259 return ResourceProviderFullName(r.Type, r.Provider)
260}
261
262// ResourceProviderFullName returns the full (dependable) name of the
263// provider for a hypothetical resource with the given resource type and
264// explicit provider string. If the explicit provider string is empty then
265// the provider name is inferred from the resource type name.
266func ResourceProviderFullName(resourceType, explicitProvider string) string {
267 if explicitProvider != "" {
268 // check for an explicit provider name, or return the original
269 parts := strings.SplitAfter(explicitProvider, "provider.")
270 return parts[len(parts)-1]
271 }
272
273 idx := strings.IndexRune(resourceType, '_')
274 if idx == -1 {
275 // If no underscores, the resource name is assumed to be
276 // also the provider name, e.g. if the provider exposes
277 // only a single resource of each type.
278 return resourceType
279 }
280
281 return resourceType[:idx]
282}
283
284// Validate does some basic semantic checking of the configuration. 255// Validate does some basic semantic checking of the configuration.
285func (c *Config) Validate() tfdiags.Diagnostics { 256func (c *Config) Validate() tfdiags.Diagnostics {
286 if c == nil { 257 if c == nil {
diff --git a/vendor/github.com/hashicorp/terraform/config/interpolate_walk.go b/vendor/github.com/hashicorp/terraform/config/interpolate_walk.go
index 66a677d..ce33ab1 100644
--- a/vendor/github.com/hashicorp/terraform/config/interpolate_walk.go
+++ b/vendor/github.com/hashicorp/terraform/config/interpolate_walk.go
@@ -7,6 +7,7 @@ import (
7 7
8 "github.com/hashicorp/hil" 8 "github.com/hashicorp/hil"
9 "github.com/hashicorp/hil/ast" 9 "github.com/hashicorp/hil/ast"
10 "github.com/hashicorp/terraform/config/hcl2shim"
10 "github.com/mitchellh/reflectwalk" 11 "github.com/mitchellh/reflectwalk"
11) 12)
12 13
@@ -160,7 +161,7 @@ func (w *interpolationWalker) Primitive(v reflect.Value) error {
160 if w.loc == reflectwalk.SliceElem { 161 if w.loc == reflectwalk.SliceElem {
161 switch typedReplaceVal := replaceVal.(type) { 162 switch typedReplaceVal := replaceVal.(type) {
162 case string: 163 case string:
163 if typedReplaceVal == UnknownVariableValue { 164 if typedReplaceVal == hcl2shim.UnknownVariableValue {
164 remove = true 165 remove = true
165 } 166 }
166 case []interface{}: 167 case []interface{}:
@@ -168,7 +169,7 @@ func (w *interpolationWalker) Primitive(v reflect.Value) error {
168 remove = true 169 remove = true
169 } 170 }
170 } 171 }
171 } else if replaceVal == UnknownVariableValue { 172 } else if replaceVal == hcl2shim.UnknownVariableValue {
172 remove = true 173 remove = true
173 } 174 }
174 175
@@ -224,7 +225,7 @@ func (w *interpolationWalker) replaceCurrent(v reflect.Value) {
224func hasUnknownValue(variable []interface{}) bool { 225func hasUnknownValue(variable []interface{}) bool {
225 for _, value := range variable { 226 for _, value := range variable {
226 if strVal, ok := value.(string); ok { 227 if strVal, ok := value.(string); ok {
227 if strVal == UnknownVariableValue { 228 if strVal == hcl2shim.UnknownVariableValue {
228 return true 229 return true
229 } 230 }
230 } 231 }
diff --git a/vendor/github.com/hashicorp/terraform/config/loader.go b/vendor/github.com/hashicorp/terraform/config/loader.go
index 6e34781..612e25b 100644
--- a/vendor/github.com/hashicorp/terraform/config/loader.go
+++ b/vendor/github.com/hashicorp/terraform/config/loader.go
@@ -135,21 +135,6 @@ func LoadDir(root string) (*Config, error) {
135 return result, nil 135 return result, nil
136} 136}
137 137
138// IsEmptyDir returns true if the directory given has no Terraform
139// configuration files.
140func IsEmptyDir(root string) (bool, error) {
141 if _, err := os.Stat(root); err != nil && os.IsNotExist(err) {
142 return true, nil
143 }
144
145 fs, os, err := dirFiles(root)
146 if err != nil {
147 return false, err
148 }
149
150 return len(fs) == 0 && len(os) == 0, nil
151}
152
153// Ext returns the Terraform configuration extension of the given 138// Ext returns the Terraform configuration extension of the given
154// path, or a blank string if it is an invalid function. 139// path, or a blank string if it is an invalid function.
155func ext(path string) string { 140func ext(path string) string {
diff --git a/vendor/github.com/hashicorp/terraform/config/module/versions.go b/vendor/github.com/hashicorp/terraform/config/module/versions.go
index 8348d4b..29701b9 100644
--- a/vendor/github.com/hashicorp/terraform/config/module/versions.go
+++ b/vendor/github.com/hashicorp/terraform/config/module/versions.go
@@ -3,7 +3,9 @@ package module
3import ( 3import (
4 "errors" 4 "errors"
5 "fmt" 5 "fmt"
6 "regexp"
6 "sort" 7 "sort"
8 "strings"
7 9
8 version "github.com/hashicorp/go-version" 10 version "github.com/hashicorp/go-version"
9 "github.com/hashicorp/terraform/registry/response" 11 "github.com/hashicorp/terraform/registry/response"
@@ -11,6 +13,8 @@ import (
11 13
12const anyVersion = ">=0.0.0" 14const anyVersion = ">=0.0.0"
13 15
16var explicitEqualityConstraint = regexp.MustCompile("^=[0-9]")
17
14// return the newest version that satisfies the provided constraint 18// return the newest version that satisfies the provided constraint
15func newest(versions []string, constraint string) (string, error) { 19func newest(versions []string, constraint string) (string, error) {
16 if constraint == "" { 20 if constraint == "" {
@@ -21,6 +25,30 @@ func newest(versions []string, constraint string) (string, error) {
21 return "", err 25 return "", err
22 } 26 }
23 27
28 // Find any build metadata in the constraints, and
29 // store whether the constraint is an explicit equality that
30 // contains a build metadata requirement, so we can return a specific,
31 // if requested, build metadata version
32 var constraintMetas []string
33 var equalsConstraint bool
34 for i := range cs {
35 constraintMeta := strings.SplitAfterN(cs[i].String(), "+", 2)
36 if len(constraintMeta) > 1 {
37 constraintMetas = append(constraintMetas, constraintMeta[1])
38 }
39 }
40
41 if len(cs) == 1 {
42 equalsConstraint = explicitEqualityConstraint.MatchString(cs.String())
43 }
44
45 // If the version string includes metadata, this is valid in go-version,
46 // However, it's confusing as to what expected behavior should be,
47 // so give an error so the user can do something more logical
48 if (len(cs) > 1 || !equalsConstraint) && len(constraintMetas) > 0 {
49 return "", fmt.Errorf("Constraints including build metadata must have explicit equality, or are otherwise too ambiguous: %s", cs.String())
50 }
51
24 switch len(versions) { 52 switch len(versions) {
25 case 0: 53 case 0:
26 return "", errors.New("no versions found") 54 return "", errors.New("no versions found")
@@ -58,6 +86,12 @@ func newest(versions []string, constraint string) (string, error) {
58 continue 86 continue
59 } 87 }
60 if cs.Check(v) { 88 if cs.Check(v) {
89 // Constraint has metadata and is explicit equality
90 if equalsConstraint && len(constraintMetas) > 0 {
91 if constraintMetas[0] != v.Metadata() {
92 continue
93 }
94 }
61 return versions[i], nil 95 return versions[i], nil
62 } 96 }
63 } 97 }
diff --git a/vendor/github.com/hashicorp/terraform/config/providers.go b/vendor/github.com/hashicorp/terraform/config/providers.go
index 7a50782..eeddabc 100644
--- a/vendor/github.com/hashicorp/terraform/config/providers.go
+++ b/vendor/github.com/hashicorp/terraform/config/providers.go
@@ -13,48 +13,6 @@ type ProviderVersionConstraint struct {
13// ProviderVersionConstraint, as produced by Config.RequiredProviders. 13// ProviderVersionConstraint, as produced by Config.RequiredProviders.
14type ProviderVersionConstraints map[string]ProviderVersionConstraint 14type ProviderVersionConstraints map[string]ProviderVersionConstraint
15 15
16// RequiredProviders returns the ProviderVersionConstraints for this
17// module.
18//
19// This includes both providers that are explicitly requested by provider
20// blocks and those that are used implicitly by instantiating one of their
21// resource types. In the latter case, the returned semver Range will
22// accept any version of the provider.
23func (c *Config) RequiredProviders() ProviderVersionConstraints {
24 ret := make(ProviderVersionConstraints, len(c.ProviderConfigs))
25
26 configs := c.ProviderConfigsByFullName()
27
28 // In order to find the *implied* dependencies (those without explicit
29 // "provider" blocks) we need to walk over all of the resources and
30 // cross-reference with the provider configs.
31 for _, rc := range c.Resources {
32 providerName := rc.ProviderFullName()
33 var providerType string
34
35 // Default to (effectively) no constraint whatsoever, but we might
36 // override if there's an explicit constraint in config.
37 constraint := ">=0.0.0"
38
39 config, ok := configs[providerName]
40 if ok {
41 if config.Version != "" {
42 constraint = config.Version
43 }
44 providerType = config.Name
45 } else {
46 providerType = providerName
47 }
48
49 ret[providerName] = ProviderVersionConstraint{
50 ProviderType: providerType,
51 Constraint: constraint,
52 }
53 }
54
55 return ret
56}
57
58// RequiredRanges returns a semver.Range for each distinct provider type in 16// RequiredRanges returns a semver.Range for each distinct provider type in
59// the constraint map. If the same provider type appears more than once 17// the constraint map. If the same provider type appears more than once
60// (e.g. because aliases are in use) then their respective constraints are 18// (e.g. because aliases are in use) then their respective constraints are
diff --git a/vendor/github.com/hashicorp/terraform/config/raw_config.go b/vendor/github.com/hashicorp/terraform/config/raw_config.go
index 1854a8b..c5ac86d 100644
--- a/vendor/github.com/hashicorp/terraform/config/raw_config.go
+++ b/vendor/github.com/hashicorp/terraform/config/raw_config.go
@@ -17,12 +17,6 @@ import (
17 "github.com/mitchellh/reflectwalk" 17 "github.com/mitchellh/reflectwalk"
18) 18)
19 19
20// UnknownVariableValue is a sentinel value that can be used
21// to denote that the value of a variable is unknown at this time.
22// RawConfig uses this information to build up data about
23// unknown keys.
24const UnknownVariableValue = "74D93920-ED26-11E3-AC10-0800200C9A66"
25
26// RawConfig is a structure that holds a piece of configuration 20// RawConfig is a structure that holds a piece of configuration
27// where the overall structure is unknown since it will be used 21// where the overall structure is unknown since it will be used
28// to configure a plugin or some other similar external component. 22// to configure a plugin or some other similar external component.
diff --git a/vendor/github.com/hashicorp/terraform/configs/config_build.go b/vendor/github.com/hashicorp/terraform/configs/config_build.go
index 948b2c8..1ca1d77 100644
--- a/vendor/github.com/hashicorp/terraform/configs/config_build.go
+++ b/vendor/github.com/hashicorp/terraform/configs/config_build.go
@@ -76,6 +76,7 @@ func buildChildModules(parent *Config, walker ModuleWalker) (map[string]*Config,
76 } 76 }
77 77
78 child.Children, modDiags = buildChildModules(child, walker) 78 child.Children, modDiags = buildChildModules(child, walker)
79 diags = append(diags, modDiags...)
79 80
80 ret[call.Name] = child 81 ret[call.Name] = child
81 } 82 }
diff --git a/vendor/github.com/hashicorp/terraform/configs/configload/getter.go b/vendor/github.com/hashicorp/terraform/configs/configload/getter.go
index 4a3dace..75c7ef1 100644
--- a/vendor/github.com/hashicorp/terraform/configs/configload/getter.go
+++ b/vendor/github.com/hashicorp/terraform/configs/configload/getter.go
@@ -20,6 +20,7 @@ import (
20var goGetterDetectors = []getter.Detector{ 20var goGetterDetectors = []getter.Detector{
21 new(getter.GitHubDetector), 21 new(getter.GitHubDetector),
22 new(getter.BitBucketDetector), 22 new(getter.BitBucketDetector),
23 new(getter.GCSDetector),
23 new(getter.S3Detector), 24 new(getter.S3Detector),
24 new(getter.FileDetector), 25 new(getter.FileDetector),
25} 26}
@@ -44,6 +45,7 @@ var goGetterDecompressors = map[string]getter.Decompressor{
44 45
45var goGetterGetters = map[string]getter.Getter{ 46var goGetterGetters = map[string]getter.Getter{
46 "file": new(getter.FileGetter), 47 "file": new(getter.FileGetter),
48 "gcs": new(getter.GCSGetter),
47 "git": new(getter.GitGetter), 49 "git": new(getter.GitGetter),
48 "hg": new(getter.HgGetter), 50 "hg": new(getter.HgGetter),
49 "s3": new(getter.S3Getter), 51 "s3": new(getter.S3Getter),
diff --git a/vendor/github.com/hashicorp/terraform/configs/configload/loader_load.go b/vendor/github.com/hashicorp/terraform/configs/configload/loader_load.go
index 93a9420..0e6cba9 100644
--- a/vendor/github.com/hashicorp/terraform/configs/configload/loader_load.go
+++ b/vendor/github.com/hashicorp/terraform/configs/configload/loader_load.go
@@ -64,7 +64,15 @@ func (l *Loader) moduleWalkerLoad(req *configs.ModuleRequest) (*configs.Module,
64 Subject: &req.SourceAddrRange, 64 Subject: &req.SourceAddrRange,
65 }) 65 })
66 } 66 }
67 if !req.VersionConstraint.Required.Check(record.Version) { 67 if len(req.VersionConstraint.Required) > 0 && record.Version == nil {
68 diags = append(diags, &hcl.Diagnostic{
69 Severity: hcl.DiagError,
70 Summary: "Module version requirements have changed",
71 Detail: "The version requirements have changed since this module was installed and the installed version is no longer acceptable. Run \"terraform init\" to install all modules required by this configuration.",
72 Subject: &req.SourceAddrRange,
73 })
74 }
75 if record.Version != nil && !req.VersionConstraint.Required.Check(record.Version) {
68 diags = append(diags, &hcl.Diagnostic{ 76 diags = append(diags, &hcl.Diagnostic{
69 Severity: hcl.DiagError, 77 Severity: hcl.DiagError,
70 Summary: "Module version requirements have changed", 78 Summary: "Module version requirements have changed",
diff --git a/vendor/github.com/hashicorp/terraform/configs/configschema/coerce_value.go b/vendor/github.com/hashicorp/terraform/configs/configschema/coerce_value.go
index e59f58d..7996c38 100644
--- a/vendor/github.com/hashicorp/terraform/configs/configschema/coerce_value.go
+++ b/vendor/github.com/hashicorp/terraform/configs/configschema/coerce_value.go
@@ -113,7 +113,10 @@ func (b *Block) coerceValue(in cty.Value, path cty.Path) (cty.Value, error) {
113 return cty.UnknownVal(b.ImpliedType()), path.NewErrorf("must be a list") 113 return cty.UnknownVal(b.ImpliedType()), path.NewErrorf("must be a list")
114 } 114 }
115 l := coll.LengthInt() 115 l := coll.LengthInt()
116 if l < blockS.MinItems { 116
117 // Assume that if there are unknowns this could have come from
118 // a dynamic block, and we can't validate MinItems yet.
119 if l < blockS.MinItems && coll.IsWhollyKnown() {
117 return cty.UnknownVal(b.ImpliedType()), path.NewErrorf("insufficient items for attribute %q; must have at least %d", typeName, blockS.MinItems) 120 return cty.UnknownVal(b.ImpliedType()), path.NewErrorf("insufficient items for attribute %q; must have at least %d", typeName, blockS.MinItems)
118 } 121 }
119 if l > blockS.MaxItems && blockS.MaxItems > 0 { 122 if l > blockS.MaxItems && blockS.MaxItems > 0 {
@@ -161,7 +164,10 @@ func (b *Block) coerceValue(in cty.Value, path cty.Path) (cty.Value, error) {
161 return cty.UnknownVal(b.ImpliedType()), path.NewErrorf("must be a set") 164 return cty.UnknownVal(b.ImpliedType()), path.NewErrorf("must be a set")
162 } 165 }
163 l := coll.LengthInt() 166 l := coll.LengthInt()
164 if l < blockS.MinItems { 167
168 // Assume that if there are unknowns this could have come from
169 // a dynamic block, and we can't validate MinItems yet.
170 if l < blockS.MinItems && coll.IsWhollyKnown() {
165 return cty.UnknownVal(b.ImpliedType()), path.NewErrorf("insufficient items for attribute %q; must have at least %d", typeName, blockS.MinItems) 171 return cty.UnknownVal(b.ImpliedType()), path.NewErrorf("insufficient items for attribute %q; must have at least %d", typeName, blockS.MinItems)
166 } 172 }
167 if l > blockS.MaxItems && blockS.MaxItems > 0 { 173 if l > blockS.MaxItems && blockS.MaxItems > 0 {
diff --git a/vendor/github.com/hashicorp/terraform/configs/configschema/decoder_spec.go b/vendor/github.com/hashicorp/terraform/configs/configschema/decoder_spec.go
index d8f41ea..e748dd2 100644
--- a/vendor/github.com/hashicorp/terraform/configs/configschema/decoder_spec.go
+++ b/vendor/github.com/hashicorp/terraform/configs/configschema/decoder_spec.go
@@ -33,6 +33,14 @@ func (b *Block) DecoderSpec() hcldec.Spec {
33 33
34 childSpec := blockS.Block.DecoderSpec() 34 childSpec := blockS.Block.DecoderSpec()
35 35
36 // We can only validate 0 or 1 for MinItems, because a dynamic block
37 // may satisfy any number of min items while only having a single
38 // block in the config.
39 minItems := 0
40 if blockS.MinItems > 1 {
41 minItems = 1
42 }
43
36 switch blockS.Nesting { 44 switch blockS.Nesting {
37 case NestingSingle, NestingGroup: 45 case NestingSingle, NestingGroup:
38 ret[name] = &hcldec.BlockSpec{ 46 ret[name] = &hcldec.BlockSpec{
@@ -57,14 +65,14 @@ func (b *Block) DecoderSpec() hcldec.Spec {
57 ret[name] = &hcldec.BlockTupleSpec{ 65 ret[name] = &hcldec.BlockTupleSpec{
58 TypeName: name, 66 TypeName: name,
59 Nested: childSpec, 67 Nested: childSpec,
60 MinItems: blockS.MinItems, 68 MinItems: minItems,
61 MaxItems: blockS.MaxItems, 69 MaxItems: blockS.MaxItems,
62 } 70 }
63 } else { 71 } else {
64 ret[name] = &hcldec.BlockListSpec{ 72 ret[name] = &hcldec.BlockListSpec{
65 TypeName: name, 73 TypeName: name,
66 Nested: childSpec, 74 Nested: childSpec,
67 MinItems: blockS.MinItems, 75 MinItems: minItems,
68 MaxItems: blockS.MaxItems, 76 MaxItems: blockS.MaxItems,
69 } 77 }
70 } 78 }
@@ -77,7 +85,7 @@ func (b *Block) DecoderSpec() hcldec.Spec {
77 ret[name] = &hcldec.BlockSetSpec{ 85 ret[name] = &hcldec.BlockSetSpec{
78 TypeName: name, 86 TypeName: name,
79 Nested: childSpec, 87 Nested: childSpec,
80 MinItems: blockS.MinItems, 88 MinItems: minItems,
81 MaxItems: blockS.MaxItems, 89 MaxItems: blockS.MaxItems,
82 } 90 }
83 case NestingMap: 91 case NestingMap:
diff --git a/vendor/github.com/hashicorp/terraform/configs/parser_config_dir.go b/vendor/github.com/hashicorp/terraform/configs/parser_config_dir.go
index 3014cb4..752d6d9 100644
--- a/vendor/github.com/hashicorp/terraform/configs/parser_config_dir.go
+++ b/vendor/github.com/hashicorp/terraform/configs/parser_config_dir.go
@@ -2,6 +2,7 @@ package configs
2 2
3import ( 3import (
4 "fmt" 4 "fmt"
5 "os"
5 "path/filepath" 6 "path/filepath"
6 "strings" 7 "strings"
7 8
@@ -140,3 +141,23 @@ func IsIgnoredFile(name string) bool {
140 strings.HasSuffix(name, "~") || // vim 141 strings.HasSuffix(name, "~") || // vim
141 strings.HasPrefix(name, "#") && strings.HasSuffix(name, "#") // emacs 142 strings.HasPrefix(name, "#") && strings.HasSuffix(name, "#") // emacs
142} 143}
144
145// IsEmptyDir returns true if the given filesystem path contains no Terraform
146// configuration files.
147//
148// Unlike the methods of the Parser type, this function always consults the
149// real filesystem, and thus it isn't appropriate to use when working with
150// configuration loaded from a plan file.
151func IsEmptyDir(path string) (bool, error) {
152 if _, err := os.Stat(path); err != nil && os.IsNotExist(err) {
153 return true, nil
154 }
155
156 p := NewParser(nil)
157 fs, os, err := p.dirFiles(path)
158 if err != nil {
159 return false, err
160 }
161
162 return len(fs) == 0 && len(os) == 0, nil
163}
diff --git a/vendor/github.com/hashicorp/terraform/configs/resource.go b/vendor/github.com/hashicorp/terraform/configs/resource.go
index de1a343..edf822c 100644
--- a/vendor/github.com/hashicorp/terraform/configs/resource.go
+++ b/vendor/github.com/hashicorp/terraform/configs/resource.go
@@ -111,13 +111,15 @@ func decodeResourceBlock(block *hcl.Block) (*Resource, hcl.Diagnostics) {
111 111
112 if attr, exists := content.Attributes["for_each"]; exists { 112 if attr, exists := content.Attributes["for_each"]; exists {
113 r.ForEach = attr.Expr 113 r.ForEach = attr.Expr
114 // We currently parse this, but don't yet do anything with it. 114 // Cannot have count and for_each on the same resource block
115 diags = append(diags, &hcl.Diagnostic{ 115 if r.Count != nil {
116 Severity: hcl.DiagError, 116 diags = append(diags, &hcl.Diagnostic{
117 Summary: "Reserved argument name in resource block", 117 Severity: hcl.DiagError,
118 Detail: fmt.Sprintf("The name %q is reserved for use in a future version of Terraform.", attr.Name), 118 Summary: `Invalid combination of "count" and "for_each"`,
119 Subject: &attr.NameRange, 119 Detail: `The "count" and "for_each" meta-arguments are mutually-exclusive, only one should be used to be explicit about the number of resources to be created.`,
120 }) 120 Subject: &attr.NameRange,
121 })
122 }
121 } 123 }
122 124
123 if attr, exists := content.Attributes["provider"]; exists { 125 if attr, exists := content.Attributes["provider"]; exists {
@@ -300,13 +302,15 @@ func decodeDataBlock(block *hcl.Block) (*Resource, hcl.Diagnostics) {
300 302
301 if attr, exists := content.Attributes["for_each"]; exists { 303 if attr, exists := content.Attributes["for_each"]; exists {
302 r.ForEach = attr.Expr 304 r.ForEach = attr.Expr
303 // We currently parse this, but don't yet do anything with it. 305 // Cannot have count and for_each on the same data block
304 diags = append(diags, &hcl.Diagnostic{ 306 if r.Count != nil {
305 Severity: hcl.DiagError, 307 diags = append(diags, &hcl.Diagnostic{
306 Summary: "Reserved argument name in module block", 308 Severity: hcl.DiagError,
307 Detail: fmt.Sprintf("The name %q is reserved for use in a future version of Terraform.", attr.Name), 309 Summary: `Invalid combination of "count" and "for_each"`,
308 Subject: &attr.NameRange, 310 Detail: `The "count" and "for_each" meta-arguments are mutually-exclusive, only one should be used to be explicit about the number of resources to be created.`,
309 }) 311 Subject: &attr.NameRange,
312 })
313 }
310 } 314 }
311 315
312 if attr, exists := content.Attributes["provider"]; exists { 316 if attr, exists := content.Attributes["provider"]; exists {
diff --git a/vendor/github.com/hashicorp/terraform/configs/version_constraint.go b/vendor/github.com/hashicorp/terraform/configs/version_constraint.go
index 7aa19ef..e40ce16 100644
--- a/vendor/github.com/hashicorp/terraform/configs/version_constraint.go
+++ b/vendor/github.com/hashicorp/terraform/configs/version_constraint.go
@@ -45,6 +45,13 @@ func decodeVersionConstraint(attr *hcl.Attribute) (VersionConstraint, hcl.Diagno
45 return ret, diags 45 return ret, diags
46 } 46 }
47 47
48 if !val.IsWhollyKnown() {
49 // If there is a syntax error, HCL sets the value of the given attribute
50 // to cty.DynamicVal. A diagnostic for the syntax error will already
51 // bubble up, so we will move forward gracefully here.
52 return ret, diags
53 }
54
48 constraintStr := val.AsString() 55 constraintStr := val.AsString()
49 constraints, err := version.NewConstraint(constraintStr) 56 constraints, err := version.NewConstraint(constraintStr)
50 if err != nil { 57 if err != nil {
diff --git a/vendor/github.com/hashicorp/terraform/helper/plugin/grpc_provider.go b/vendor/github.com/hashicorp/terraform/helper/plugin/grpc_provider.go
index 510f47f..104c8f5 100644
--- a/vendor/github.com/hashicorp/terraform/helper/plugin/grpc_provider.go
+++ b/vendor/github.com/hashicorp/terraform/helper/plugin/grpc_provider.go
@@ -2,7 +2,6 @@ package plugin
2 2
3import ( 3import (
4 "encoding/json" 4 "encoding/json"
5 "errors"
6 "fmt" 5 "fmt"
7 "log" 6 "log"
8 "strconv" 7 "strconv"
@@ -16,6 +15,7 @@ import (
16 "github.com/hashicorp/terraform/configs/configschema" 15 "github.com/hashicorp/terraform/configs/configschema"
17 "github.com/hashicorp/terraform/helper/schema" 16 "github.com/hashicorp/terraform/helper/schema"
18 proto "github.com/hashicorp/terraform/internal/tfplugin5" 17 proto "github.com/hashicorp/terraform/internal/tfplugin5"
18 "github.com/hashicorp/terraform/plans/objchange"
19 "github.com/hashicorp/terraform/plugin/convert" 19 "github.com/hashicorp/terraform/plugin/convert"
20 "github.com/hashicorp/terraform/terraform" 20 "github.com/hashicorp/terraform/terraform"
21) 21)
@@ -284,6 +284,17 @@ func (s *GRPCProviderServer) UpgradeResourceState(_ context.Context, req *proto.
284 return resp, nil 284 return resp, nil
285 } 285 }
286 286
287 // Now we need to make sure blocks are represented correctly, which means
288 // that missing blocks are empty collections, rather than null.
289 // First we need to CoerceValue to ensure that all object types match.
290 val, err = schemaBlock.CoerceValue(val)
291 if err != nil {
292 resp.Diagnostics = convert.AppendProtoDiag(resp.Diagnostics, err)
293 return resp, nil
294 }
295 // Normalize the value and fill in any missing blocks.
296 val = objchange.NormalizeObjectFromLegacySDK(val, schemaBlock)
297
287 // encode the final state to the expected msgpack format 298 // encode the final state to the expected msgpack format
288 newStateMP, err := msgpack.Marshal(val, schemaBlock.ImpliedType()) 299 newStateMP, err := msgpack.Marshal(val, schemaBlock.ImpliedType())
289 if err != nil { 300 if err != nil {
@@ -316,11 +327,15 @@ func (s *GRPCProviderServer) upgradeFlatmapState(version int, m map[string]strin
316 requiresMigrate = version < res.StateUpgraders[0].Version 327 requiresMigrate = version < res.StateUpgraders[0].Version
317 } 328 }
318 329
319 if requiresMigrate { 330 if requiresMigrate && res.MigrateState == nil {
320 if res.MigrateState == nil { 331 // Providers were previously allowed to bump the version
321 return nil, 0, errors.New("cannot upgrade state, missing MigrateState function") 332 // without declaring MigrateState.
333 // If there are further upgraders, then we've only updated that far.
334 if len(res.StateUpgraders) > 0 {
335 schemaType = res.StateUpgraders[0].Type
336 upgradedVersion = res.StateUpgraders[0].Version
322 } 337 }
323 338 } else if requiresMigrate {
324 is := &terraform.InstanceState{ 339 is := &terraform.InstanceState{
325 ID: m["id"], 340 ID: m["id"],
326 Attributes: m, 341 Attributes: m,
@@ -476,7 +491,12 @@ func (s *GRPCProviderServer) Configure(_ context.Context, req *proto.Configure_R
476} 491}
477 492
478func (s *GRPCProviderServer) ReadResource(_ context.Context, req *proto.ReadResource_Request) (*proto.ReadResource_Response, error) { 493func (s *GRPCProviderServer) ReadResource(_ context.Context, req *proto.ReadResource_Request) (*proto.ReadResource_Response, error) {
479 resp := &proto.ReadResource_Response{} 494 resp := &proto.ReadResource_Response{
495 // helper/schema did previously handle private data during refresh, but
496 // core is now going to expect this to be maintained in order to
497 // persist it in the state.
498 Private: req.Private,
499 }
480 500
481 res := s.provider.ResourcesMap[req.TypeName] 501 res := s.provider.ResourcesMap[req.TypeName]
482 schemaBlock := s.getResourceSchemaBlock(req.TypeName) 502 schemaBlock := s.getResourceSchemaBlock(req.TypeName)
@@ -493,6 +513,15 @@ func (s *GRPCProviderServer) ReadResource(_ context.Context, req *proto.ReadReso
493 return resp, nil 513 return resp, nil
494 } 514 }
495 515
516 private := make(map[string]interface{})
517 if len(req.Private) > 0 {
518 if err := json.Unmarshal(req.Private, &private); err != nil {
519 resp.Diagnostics = convert.AppendProtoDiag(resp.Diagnostics, err)
520 return resp, nil
521 }
522 }
523 instanceState.Meta = private
524
496 newInstanceState, err := res.RefreshWithoutUpgrade(instanceState, s.provider.Meta()) 525 newInstanceState, err := res.RefreshWithoutUpgrade(instanceState, s.provider.Meta())
497 if err != nil { 526 if err != nil {
498 resp.Diagnostics = convert.AppendProtoDiag(resp.Diagnostics, err) 527 resp.Diagnostics = convert.AppendProtoDiag(resp.Diagnostics, err)
@@ -569,6 +598,7 @@ func (s *GRPCProviderServer) PlanResourceChange(_ context.Context, req *proto.Pl
569 // We don't usually plan destroys, but this can return early in any case. 598 // We don't usually plan destroys, but this can return early in any case.
570 if proposedNewStateVal.IsNull() { 599 if proposedNewStateVal.IsNull() {
571 resp.PlannedState = req.ProposedNewState 600 resp.PlannedState = req.ProposedNewState
601 resp.PlannedPrivate = req.PriorPrivate
572 return resp, nil 602 return resp, nil
573 } 603 }
574 604
@@ -623,6 +653,7 @@ func (s *GRPCProviderServer) PlanResourceChange(_ context.Context, req *proto.Pl
623 // description that _shows_ there are no changes. This is always the 653 // description that _shows_ there are no changes. This is always the
624 // prior state, because we force a diff above if this is a new instance. 654 // prior state, because we force a diff above if this is a new instance.
625 resp.PlannedState = req.PriorState 655 resp.PlannedState = req.PriorState
656 resp.PlannedPrivate = req.PriorPrivate
626 return resp, nil 657 return resp, nil
627 } 658 }
628 659
@@ -683,6 +714,18 @@ func (s *GRPCProviderServer) PlanResourceChange(_ context.Context, req *proto.Pl
683 Msgpack: plannedMP, 714 Msgpack: plannedMP,
684 } 715 }
685 716
717 // encode any timeouts into the diff Meta
718 t := &schema.ResourceTimeout{}
719 if err := t.ConfigDecode(res, cfg); err != nil {
720 resp.Diagnostics = convert.AppendProtoDiag(resp.Diagnostics, err)
721 return resp, nil
722 }
723
724 if err := t.DiffEncode(diff); err != nil {
725 resp.Diagnostics = convert.AppendProtoDiag(resp.Diagnostics, err)
726 return resp, nil
727 }
728
686 // Now we need to store any NewExtra values, which are where any actual 729 // Now we need to store any NewExtra values, which are where any actual
687 // StateFunc modified config fields are hidden. 730 // StateFunc modified config fields are hidden.
688 privateMap := diff.Meta 731 privateMap := diff.Meta
@@ -929,6 +972,9 @@ func (s *GRPCProviderServer) ImportResourceState(_ context.Context, req *proto.I
929 return resp, nil 972 return resp, nil
930 } 973 }
931 974
975 // Normalize the value and fill in any missing blocks.
976 newStateVal = objchange.NormalizeObjectFromLegacySDK(newStateVal, schemaBlock)
977
932 newStateMP, err := msgpack.Marshal(newStateVal, schemaBlock.ImpliedType()) 978 newStateMP, err := msgpack.Marshal(newStateVal, schemaBlock.ImpliedType())
933 if err != nil { 979 if err != nil {
934 resp.Diagnostics = convert.AppendProtoDiag(resp.Diagnostics, err) 980 resp.Diagnostics = convert.AppendProtoDiag(resp.Diagnostics, err)
@@ -1160,6 +1206,8 @@ func normalizeNullValues(dst, src cty.Value, apply bool) cty.Value {
1160 } 1206 }
1161 } 1207 }
1162 1208
1209 // check the invariants that we need below, to ensure we are working with
1210 // non-null and known values.
1163 if src.IsNull() || !src.IsKnown() || !dst.IsKnown() { 1211 if src.IsNull() || !src.IsKnown() || !dst.IsKnown() {
1164 return dst 1212 return dst
1165 } 1213 }
@@ -1278,8 +1326,12 @@ func normalizeNullValues(dst, src cty.Value, apply bool) cty.Value {
1278 return cty.ListVal(dsts) 1326 return cty.ListVal(dsts)
1279 } 1327 }
1280 1328
1281 case ty.IsPrimitiveType(): 1329 case ty == cty.String:
1282 if dst.IsNull() && src.IsWhollyKnown() && apply { 1330 // The legacy SDK should not be able to remove a value during plan or
1331 // apply, however we are only going to overwrite this if the source was
1332 // an empty string, since that is what is often equated with unset and
1333 // lost in the diff process.
1334 if dst.IsNull() && src.AsString() == "" {
1283 return src 1335 return src
1284 } 1336 }
1285 } 1337 }
@@ -1305,11 +1357,19 @@ func validateConfigNulls(v cty.Value, path cty.Path) []*proto.Diagnostic {
1305 for it.Next() { 1357 for it.Next() {
1306 kv, ev := it.Element() 1358 kv, ev := it.Element()
1307 if ev.IsNull() { 1359 if ev.IsNull() {
1360 // if this is a set, the kv is also going to be null which
1361 // isn't a valid path element, so we can't append it to the
1362 // diagnostic.
1363 p := path
1364 if !kv.IsNull() {
1365 p = append(p, cty.IndexStep{Key: kv})
1366 }
1367
1308 diags = append(diags, &proto.Diagnostic{ 1368 diags = append(diags, &proto.Diagnostic{
1309 Severity: proto.Diagnostic_ERROR, 1369 Severity: proto.Diagnostic_ERROR,
1310 Summary: "Null value found in list", 1370 Summary: "Null value found in list",
1311 Detail: "Null values are not allowed for this attribute value.", 1371 Detail: "Null values are not allowed for this attribute value.",
1312 Attribute: convert.PathToAttributePath(append(path, cty.IndexStep{Key: kv})), 1372 Attribute: convert.PathToAttributePath(p),
1313 }) 1373 })
1314 continue 1374 continue
1315 } 1375 }
diff --git a/vendor/github.com/hashicorp/terraform/helper/resource/state_shim.go b/vendor/github.com/hashicorp/terraform/helper/resource/state_shim.go
index b2aff99..f488207 100644
--- a/vendor/github.com/hashicorp/terraform/helper/resource/state_shim.go
+++ b/vendor/github.com/hashicorp/terraform/helper/resource/state_shim.go
@@ -1,6 +1,7 @@
1package resource 1package resource
2 2
3import ( 3import (
4 "encoding/json"
4 "fmt" 5 "fmt"
5 6
6 "github.com/hashicorp/terraform/addrs" 7 "github.com/hashicorp/terraform/addrs"
@@ -52,43 +53,57 @@ func shimNewState(newState *states.State, providers map[string]terraform.Resourc
52 resource := getResource(providers, providerType, res.Addr) 53 resource := getResource(providers, providerType, res.Addr)
53 54
54 for key, i := range res.Instances { 55 for key, i := range res.Instances {
55 flatmap, err := shimmedAttributes(i.Current, resource) 56 resState := &terraform.ResourceState{
56 if err != nil { 57 Type: resType,
57 return nil, fmt.Errorf("error decoding state for %q: %s", resType, err) 58 Provider: res.ProviderConfig.String(),
58 } 59 }
59 60
60 resState := &terraform.ResourceState{ 61 // We should always have a Current instance here, but be safe about checking.
61 Type: resType, 62 if i.Current != nil {
62 Primary: &terraform.InstanceState{ 63 flatmap, err := shimmedAttributes(i.Current, resource)
64 if err != nil {
65 return nil, fmt.Errorf("error decoding state for %q: %s", resType, err)
66 }
67
68 var meta map[string]interface{}
69 if i.Current.Private != nil {
70 err := json.Unmarshal(i.Current.Private, &meta)
71 if err != nil {
72 return nil, err
73 }
74 }
75
76 resState.Primary = &terraform.InstanceState{
63 ID: flatmap["id"], 77 ID: flatmap["id"],
64 Attributes: flatmap, 78 Attributes: flatmap,
65 Tainted: i.Current.Status == states.ObjectTainted, 79 Tainted: i.Current.Status == states.ObjectTainted,
66 }, 80 Meta: meta,
67 Provider: res.ProviderConfig.String(),
68 }
69 if i.Current.SchemaVersion != 0 {
70 resState.Primary.Meta = map[string]interface{}{
71 "schema_version": i.Current.SchemaVersion,
72 } 81 }
73 }
74 82
75 for _, dep := range i.Current.Dependencies { 83 if i.Current.SchemaVersion != 0 {
76 resState.Dependencies = append(resState.Dependencies, dep.String()) 84 resState.Primary.Meta = map[string]interface{}{
77 } 85 "schema_version": i.Current.SchemaVersion,
86 }
87 }
78 88
79 // convert the indexes to the old style flapmap indexes 89 for _, dep := range i.Current.Dependencies {
80 idx := "" 90 resState.Dependencies = append(resState.Dependencies, dep.String())
81 switch key.(type) {
82 case addrs.IntKey:
83 // don't add numeric index values to resources with a count of 0
84 if len(res.Instances) > 1 {
85 idx = fmt.Sprintf(".%d", key)
86 } 91 }
87 case addrs.StringKey:
88 idx = "." + key.String()
89 }
90 92
91 mod.Resources[res.Addr.String()+idx] = resState 93 // convert the indexes to the old style flapmap indexes
94 idx := ""
95 switch key.(type) {
96 case addrs.IntKey:
97 // don't add numeric index values to resources with a count of 0
98 if len(res.Instances) > 1 {
99 idx = fmt.Sprintf(".%d", key)
100 }
101 case addrs.StringKey:
102 idx = "." + key.String()
103 }
104
105 mod.Resources[res.Addr.String()+idx] = resState
106 }
92 107
93 // add any deposed instances 108 // add any deposed instances
94 for _, dep := range i.Deposed { 109 for _, dep := range i.Deposed {
@@ -97,10 +112,19 @@ func shimNewState(newState *states.State, providers map[string]terraform.Resourc
97 return nil, fmt.Errorf("error decoding deposed state for %q: %s", resType, err) 112 return nil, fmt.Errorf("error decoding deposed state for %q: %s", resType, err)
98 } 113 }
99 114
115 var meta map[string]interface{}
116 if dep.Private != nil {
117 err := json.Unmarshal(dep.Private, &meta)
118 if err != nil {
119 return nil, err
120 }
121 }
122
100 deposed := &terraform.InstanceState{ 123 deposed := &terraform.InstanceState{
101 ID: flatmap["id"], 124 ID: flatmap["id"],
102 Attributes: flatmap, 125 Attributes: flatmap,
103 Tainted: dep.Status == states.ObjectTainted, 126 Tainted: dep.Status == states.ObjectTainted,
127 Meta: meta,
104 } 128 }
105 if dep.SchemaVersion != 0 { 129 if dep.SchemaVersion != 0 {
106 deposed.Meta = map[string]interface{}{ 130 deposed.Meta = map[string]interface{}{
diff --git a/vendor/github.com/hashicorp/terraform/helper/resource/testing_config.go b/vendor/github.com/hashicorp/terraform/helper/resource/testing_config.go
index 311fdb6..f34e17a 100644
--- a/vendor/github.com/hashicorp/terraform/helper/resource/testing_config.go
+++ b/vendor/github.com/hashicorp/terraform/helper/resource/testing_config.go
@@ -10,7 +10,6 @@ import (
10 "strings" 10 "strings"
11 11
12 "github.com/hashicorp/terraform/addrs" 12 "github.com/hashicorp/terraform/addrs"
13 "github.com/hashicorp/terraform/config"
14 "github.com/hashicorp/terraform/config/hcl2shim" 13 "github.com/hashicorp/terraform/config/hcl2shim"
15 "github.com/hashicorp/terraform/states" 14 "github.com/hashicorp/terraform/states"
16 15
@@ -341,7 +340,7 @@ func legacyDiffComparisonString(changes *plans.Changes) string {
341 v := newAttrs[attrK] 340 v := newAttrs[attrK]
342 u := oldAttrs[attrK] 341 u := oldAttrs[attrK]
343 342
344 if v == config.UnknownVariableValue { 343 if v == hcl2shim.UnknownVariableValue {
345 v = "<computed>" 344 v = "<computed>"
346 } 345 }
347 // NOTE: we don't support <sensitive> here because we would 346 // NOTE: we don't support <sensitive> here because we would
diff --git a/vendor/github.com/hashicorp/terraform/helper/schema/field_reader_config.go b/vendor/github.com/hashicorp/terraform/helper/schema/field_reader_config.go
index 808375c..6ad3f13 100644
--- a/vendor/github.com/hashicorp/terraform/helper/schema/field_reader_config.go
+++ b/vendor/github.com/hashicorp/terraform/helper/schema/field_reader_config.go
@@ -219,6 +219,9 @@ func (r *ConfigFieldReader) readMap(k string, schema *Schema) (FieldReadResult,
219 v, _ := r.Config.Get(key) 219 v, _ := r.Config.Get(key)
220 result[ik] = v 220 result[ik] = v
221 } 221 }
222 case nil:
223 // the map may have been empty on the configuration, so we leave the
224 // empty result
222 default: 225 default:
223 panic(fmt.Sprintf("unknown type: %#v", mraw)) 226 panic(fmt.Sprintf("unknown type: %#v", mraw))
224 } 227 }
diff --git a/vendor/github.com/hashicorp/terraform/helper/schema/field_reader_diff.go b/vendor/github.com/hashicorp/terraform/helper/schema/field_reader_diff.go
index ae35b4a..3e70acf 100644
--- a/vendor/github.com/hashicorp/terraform/helper/schema/field_reader_diff.go
+++ b/vendor/github.com/hashicorp/terraform/helper/schema/field_reader_diff.go
@@ -95,7 +95,9 @@ func (r *DiffFieldReader) readMap(
95 return FieldReadResult{}, err 95 return FieldReadResult{}, err
96 } 96 }
97 if source.Exists { 97 if source.Exists {
98 result = source.Value.(map[string]interface{}) 98 // readMap may return a nil value, or an unknown value placeholder in
99 // some cases, causing the type assertion to panic if we don't assign the ok value
100 result, _ = source.Value.(map[string]interface{})
99 resultSet = true 101 resultSet = true
100 } 102 }
101 103
diff --git a/vendor/github.com/hashicorp/terraform/helper/schema/resource.go b/vendor/github.com/hashicorp/terraform/helper/schema/resource.go
index b5e3065..b59e4e8 100644
--- a/vendor/github.com/hashicorp/terraform/helper/schema/resource.go
+++ b/vendor/github.com/hashicorp/terraform/helper/schema/resource.go
@@ -95,9 +95,10 @@ type Resource struct {
95 // 95 //
96 // Exists is a function that is called to check if a resource still 96 // Exists is a function that is called to check if a resource still
97 // exists. If this returns false, then this will affect the diff 97 // exists. If this returns false, then this will affect the diff
98 // accordingly. If this function isn't set, it will not be called. It 98 // accordingly. If this function isn't set, it will not be called. You
99 // is highly recommended to set it. The *ResourceData passed to Exists 99 // can also signal existence in the Read method by calling d.SetId("")
100 // should _not_ be modified. 100 // if the Resource is no longer present and should be removed from state.
101 // The *ResourceData passed to Exists should _not_ be modified.
101 Create CreateFunc 102 Create CreateFunc
102 Read ReadFunc 103 Read ReadFunc
103 Update UpdateFunc 104 Update UpdateFunc
@@ -329,21 +330,13 @@ func (r *Resource) simpleDiff(
329 c *terraform.ResourceConfig, 330 c *terraform.ResourceConfig,
330 meta interface{}) (*terraform.InstanceDiff, error) { 331 meta interface{}) (*terraform.InstanceDiff, error) {
331 332
332 t := &ResourceTimeout{}
333 err := t.ConfigDecode(r, c)
334
335 if err != nil {
336 return nil, fmt.Errorf("[ERR] Error decoding timeout: %s", err)
337 }
338
339 instanceDiff, err := schemaMap(r.Schema).Diff(s, c, r.CustomizeDiff, meta, false) 333 instanceDiff, err := schemaMap(r.Schema).Diff(s, c, r.CustomizeDiff, meta, false)
340 if err != nil { 334 if err != nil {
341 return instanceDiff, err 335 return instanceDiff, err
342 } 336 }
343 337
344 if instanceDiff == nil { 338 if instanceDiff == nil {
345 log.Printf("[DEBUG] Instance Diff is nil in SimpleDiff()") 339 instanceDiff = terraform.NewInstanceDiff()
346 return nil, err
347 } 340 }
348 341
349 // Make sure the old value is set in each of the instance diffs. 342 // Make sure the old value is set in each of the instance diffs.
@@ -357,10 +350,7 @@ func (r *Resource) simpleDiff(
357 } 350 }
358 } 351 }
359 352
360 if err := t.DiffEncode(instanceDiff); err != nil { 353 return instanceDiff, nil
361 log.Printf("[ERR] Error encoding timeout to instance diff: %s", err)
362 }
363 return instanceDiff, err
364} 354}
365 355
366// Validate validates the resource configuration against the schema. 356// Validate validates the resource configuration against the schema.
diff --git a/vendor/github.com/hashicorp/terraform/helper/schema/resource_timeout.go b/vendor/github.com/hashicorp/terraform/helper/schema/resource_timeout.go
index 9e422c1..222b2cc 100644
--- a/vendor/github.com/hashicorp/terraform/helper/schema/resource_timeout.go
+++ b/vendor/github.com/hashicorp/terraform/helper/schema/resource_timeout.go
@@ -5,7 +5,7 @@ import (
5 "log" 5 "log"
6 "time" 6 "time"
7 7
8 "github.com/hashicorp/terraform/config" 8 "github.com/hashicorp/terraform/config/hcl2shim"
9 "github.com/hashicorp/terraform/terraform" 9 "github.com/hashicorp/terraform/terraform"
10 "github.com/mitchellh/copystructure" 10 "github.com/mitchellh/copystructure"
11) 11)
@@ -70,7 +70,7 @@ func (t *ResourceTimeout) ConfigDecode(s *Resource, c *terraform.ResourceConfig)
70 case []map[string]interface{}: 70 case []map[string]interface{}:
71 rawTimeouts = raw 71 rawTimeouts = raw
72 case string: 72 case string:
73 if raw == config.UnknownVariableValue { 73 if raw == hcl2shim.UnknownVariableValue {
74 // Timeout is not defined in the config 74 // Timeout is not defined in the config
75 // Defaults will be used instead 75 // Defaults will be used instead
76 return nil 76 return nil
diff --git a/vendor/github.com/hashicorp/terraform/helper/schema/schema.go b/vendor/github.com/hashicorp/terraform/helper/schema/schema.go
index 6a3c15a..bcc8e4b 100644
--- a/vendor/github.com/hashicorp/terraform/helper/schema/schema.go
+++ b/vendor/github.com/hashicorp/terraform/helper/schema/schema.go
@@ -22,7 +22,7 @@ import (
22 "strings" 22 "strings"
23 "sync" 23 "sync"
24 24
25 "github.com/hashicorp/terraform/config" 25 "github.com/hashicorp/terraform/config/hcl2shim"
26 "github.com/hashicorp/terraform/terraform" 26 "github.com/hashicorp/terraform/terraform"
27 "github.com/mitchellh/copystructure" 27 "github.com/mitchellh/copystructure"
28 "github.com/mitchellh/mapstructure" 28 "github.com/mitchellh/mapstructure"
@@ -1365,10 +1365,15 @@ func (m schemaMap) validate(
1365 "%q: this field cannot be set", k)} 1365 "%q: this field cannot be set", k)}
1366 } 1366 }
1367 1367
1368 if raw == config.UnknownVariableValue { 1368 // If the value is unknown then we can't validate it yet.
1369 // If the value is unknown then we can't validate it yet. 1369 // In particular, this avoids spurious type errors where downstream
1370 // In particular, this avoids spurious type errors where downstream 1370 // validation code sees UnknownVariableValue as being just a string.
1371 // validation code sees UnknownVariableValue as being just a string. 1371 // The SDK has to allow the unknown value through initially, so that
1372 // Required fields set via an interpolated value are accepted.
1373 if !isWhollyKnown(raw) {
1374 if schema.Deprecated != "" {
1375 return []string{fmt.Sprintf("%q: [DEPRECATED] %s", k, schema.Deprecated)}, nil
1376 }
1372 return nil, nil 1377 return nil, nil
1373 } 1378 }
1374 1379
@@ -1380,6 +1385,28 @@ func (m schemaMap) validate(
1380 return m.validateType(k, raw, schema, c) 1385 return m.validateType(k, raw, schema, c)
1381} 1386}
1382 1387
1388// isWhollyKnown returns false if the argument contains an UnknownVariableValue
1389func isWhollyKnown(raw interface{}) bool {
1390 switch raw := raw.(type) {
1391 case string:
1392 if raw == hcl2shim.UnknownVariableValue {
1393 return false
1394 }
1395 case []interface{}:
1396 for _, v := range raw {
1397 if !isWhollyKnown(v) {
1398 return false
1399 }
1400 }
1401 case map[string]interface{}:
1402 for _, v := range raw {
1403 if !isWhollyKnown(v) {
1404 return false
1405 }
1406 }
1407 }
1408 return true
1409}
1383func (m schemaMap) validateConflictingAttributes( 1410func (m schemaMap) validateConflictingAttributes(
1384 k string, 1411 k string,
1385 schema *Schema, 1412 schema *Schema,
@@ -1391,7 +1418,7 @@ func (m schemaMap) validateConflictingAttributes(
1391 1418
1392 for _, conflictingKey := range schema.ConflictsWith { 1419 for _, conflictingKey := range schema.ConflictsWith {
1393 if raw, ok := c.Get(conflictingKey); ok { 1420 if raw, ok := c.Get(conflictingKey); ok {
1394 if raw == config.UnknownVariableValue { 1421 if raw == hcl2shim.UnknownVariableValue {
1395 // An unknown value might become unset (null) once known, so 1422 // An unknown value might become unset (null) once known, so
1396 // we must defer validation until it's known. 1423 // we must defer validation until it's known.
1397 continue 1424 continue
@@ -1411,11 +1438,16 @@ func (m schemaMap) validateList(
1411 c *terraform.ResourceConfig) ([]string, []error) { 1438 c *terraform.ResourceConfig) ([]string, []error) {
1412 // first check if the list is wholly unknown 1439 // first check if the list is wholly unknown
1413 if s, ok := raw.(string); ok { 1440 if s, ok := raw.(string); ok {
1414 if s == config.UnknownVariableValue { 1441 if s == hcl2shim.UnknownVariableValue {
1415 return nil, nil 1442 return nil, nil
1416 } 1443 }
1417 } 1444 }
1418 1445
1446 // schemaMap can't validate nil
1447 if raw == nil {
1448 return nil, nil
1449 }
1450
1419 // We use reflection to verify the slice because you can't 1451 // We use reflection to verify the slice because you can't
1420 // case to []interface{} unless the slice is exactly that type. 1452 // case to []interface{} unless the slice is exactly that type.
1421 rawV := reflect.ValueOf(raw) 1453 rawV := reflect.ValueOf(raw)
@@ -1432,6 +1464,15 @@ func (m schemaMap) validateList(
1432 "%s: should be a list", k)} 1464 "%s: should be a list", k)}
1433 } 1465 }
1434 1466
1467 // We can't validate list length if this came from a dynamic block.
1468 // Since there's no way to determine if something was from a dynamic block
1469 // at this point, we're going to skip validation in the new protocol if
1470 // there are any unknowns. Validate will eventually be called again once
1471 // all values are known.
1472 if isProto5() && !isWhollyKnown(raw) {
1473 return nil, nil
1474 }
1475
1435 // Validate length 1476 // Validate length
1436 if schema.MaxItems > 0 && rawV.Len() > schema.MaxItems { 1477 if schema.MaxItems > 0 && rawV.Len() > schema.MaxItems {
1437 return nil, []error{fmt.Errorf( 1478 return nil, []error{fmt.Errorf(
@@ -1489,11 +1530,15 @@ func (m schemaMap) validateMap(
1489 c *terraform.ResourceConfig) ([]string, []error) { 1530 c *terraform.ResourceConfig) ([]string, []error) {
1490 // first check if the list is wholly unknown 1531 // first check if the list is wholly unknown
1491 if s, ok := raw.(string); ok { 1532 if s, ok := raw.(string); ok {
1492 if s == config.UnknownVariableValue { 1533 if s == hcl2shim.UnknownVariableValue {
1493 return nil, nil 1534 return nil, nil
1494 } 1535 }
1495 } 1536 }
1496 1537
1538 // schemaMap can't validate nil
1539 if raw == nil {
1540 return nil, nil
1541 }
1497 // We use reflection to verify the slice because you can't 1542 // We use reflection to verify the slice because you can't
1498 // case to []interface{} unless the slice is exactly that type. 1543 // case to []interface{} unless the slice is exactly that type.
1499 rawV := reflect.ValueOf(raw) 1544 rawV := reflect.ValueOf(raw)
@@ -1620,6 +1665,12 @@ func (m schemaMap) validateObject(
1620 schema map[string]*Schema, 1665 schema map[string]*Schema,
1621 c *terraform.ResourceConfig) ([]string, []error) { 1666 c *terraform.ResourceConfig) ([]string, []error) {
1622 raw, _ := c.Get(k) 1667 raw, _ := c.Get(k)
1668
1669 // schemaMap can't validate nil
1670 if raw == nil {
1671 return nil, nil
1672 }
1673
1623 if _, ok := raw.(map[string]interface{}); !ok && !c.IsComputed(k) { 1674 if _, ok := raw.(map[string]interface{}); !ok && !c.IsComputed(k) {
1624 return nil, []error{fmt.Errorf( 1675 return nil, []error{fmt.Errorf(
1625 "%s: expected object, got %s", 1676 "%s: expected object, got %s",
@@ -1664,6 +1715,14 @@ func (m schemaMap) validatePrimitive(
1664 raw interface{}, 1715 raw interface{},
1665 schema *Schema, 1716 schema *Schema,
1666 c *terraform.ResourceConfig) ([]string, []error) { 1717 c *terraform.ResourceConfig) ([]string, []error) {
1718
1719 // a nil value shouldn't happen in the old protocol, and in the new
1720 // protocol the types have already been validated. Either way, we can't
1721 // reflect on nil, so don't panic.
1722 if raw == nil {
1723 return nil, nil
1724 }
1725
1667 // Catch if the user gave a complex type where a primitive was 1726 // Catch if the user gave a complex type where a primitive was
1668 // expected, so we can return a friendly error message that 1727 // expected, so we can return a friendly error message that
1669 // doesn't contain Go type system terminology. 1728 // doesn't contain Go type system terminology.
diff --git a/vendor/github.com/hashicorp/terraform/helper/schema/shims.go b/vendor/github.com/hashicorp/terraform/helper/schema/shims.go
index 203d017..988573e 100644
--- a/vendor/github.com/hashicorp/terraform/helper/schema/shims.go
+++ b/vendor/github.com/hashicorp/terraform/helper/schema/shims.go
@@ -6,7 +6,7 @@ import (
6 "github.com/zclconf/go-cty/cty" 6 "github.com/zclconf/go-cty/cty"
7 ctyjson "github.com/zclconf/go-cty/cty/json" 7 ctyjson "github.com/zclconf/go-cty/cty/json"
8 8
9 "github.com/hashicorp/terraform/config" 9 "github.com/hashicorp/terraform/config/hcl2shim"
10 "github.com/hashicorp/terraform/configs/configschema" 10 "github.com/hashicorp/terraform/configs/configschema"
11 "github.com/hashicorp/terraform/terraform" 11 "github.com/hashicorp/terraform/terraform"
12) 12)
@@ -50,7 +50,7 @@ func removeConfigUnknowns(cfg map[string]interface{}) {
50 for k, v := range cfg { 50 for k, v := range cfg {
51 switch v := v.(type) { 51 switch v := v.(type) {
52 case string: 52 case string:
53 if v == config.UnknownVariableValue { 53 if v == hcl2shim.UnknownVariableValue {
54 delete(cfg, k) 54 delete(cfg, k)
55 } 55 }
56 case []interface{}: 56 case []interface{}:
diff --git a/vendor/github.com/hashicorp/terraform/internal/initwd/getter.go b/vendor/github.com/hashicorp/terraform/internal/initwd/getter.go
index 50e2572..2f306be 100644
--- a/vendor/github.com/hashicorp/terraform/internal/initwd/getter.go
+++ b/vendor/github.com/hashicorp/terraform/internal/initwd/getter.go
@@ -22,6 +22,7 @@ import (
22var goGetterDetectors = []getter.Detector{ 22var goGetterDetectors = []getter.Detector{
23 new(getter.GitHubDetector), 23 new(getter.GitHubDetector),
24 new(getter.BitBucketDetector), 24 new(getter.BitBucketDetector),
25 new(getter.GCSDetector),
25 new(getter.S3Detector), 26 new(getter.S3Detector),
26 new(getter.FileDetector), 27 new(getter.FileDetector),
27} 28}
@@ -46,6 +47,7 @@ var goGetterDecompressors = map[string]getter.Decompressor{
46 47
47var goGetterGetters = map[string]getter.Getter{ 48var goGetterGetters = map[string]getter.Getter{
48 "file": new(getter.FileGetter), 49 "file": new(getter.FileGetter),
50 "gcs": new(getter.GCSGetter),
49 "git": new(getter.GitGetter), 51 "git": new(getter.GitGetter),
50 "hg": new(getter.HgGetter), 52 "hg": new(getter.HgGetter),
51 "s3": new(getter.S3Getter), 53 "s3": new(getter.S3Getter),
diff --git a/vendor/github.com/hashicorp/terraform/internal/tfplugin5/tfplugin5.pb.go b/vendor/github.com/hashicorp/terraform/internal/tfplugin5/tfplugin5.pb.go
index 87a6bec..b2bdf88 100644
--- a/vendor/github.com/hashicorp/terraform/internal/tfplugin5/tfplugin5.pb.go
+++ b/vendor/github.com/hashicorp/terraform/internal/tfplugin5/tfplugin5.pb.go
@@ -3,13 +3,12 @@
3 3
4package tfplugin5 4package tfplugin5
5 5
6import proto "github.com/golang/protobuf/proto"
7import fmt "fmt"
8import math "math"
9
10import ( 6import (
7 fmt "fmt"
8 proto "github.com/golang/protobuf/proto"
11 context "golang.org/x/net/context" 9 context "golang.org/x/net/context"
12 grpc "google.golang.org/grpc" 10 grpc "google.golang.org/grpc"
11 math "math"
13) 12)
14 13
15// Reference imports to suppress errors if they are not otherwise used. 14// Reference imports to suppress errors if they are not otherwise used.
@@ -36,6 +35,7 @@ var Diagnostic_Severity_name = map[int32]string{
36 1: "ERROR", 35 1: "ERROR",
37 2: "WARNING", 36 2: "WARNING",
38} 37}
38
39var Diagnostic_Severity_value = map[string]int32{ 39var Diagnostic_Severity_value = map[string]int32{
40 "INVALID": 0, 40 "INVALID": 0,
41 "ERROR": 1, 41 "ERROR": 1,
@@ -45,8 +45,9 @@ var Diagnostic_Severity_value = map[string]int32{
45func (x Diagnostic_Severity) String() string { 45func (x Diagnostic_Severity) String() string {
46 return proto.EnumName(Diagnostic_Severity_name, int32(x)) 46 return proto.EnumName(Diagnostic_Severity_name, int32(x))
47} 47}
48
48func (Diagnostic_Severity) EnumDescriptor() ([]byte, []int) { 49func (Diagnostic_Severity) EnumDescriptor() ([]byte, []int) {
49 return fileDescriptor_tfplugin5_56820f4fb67360c5, []int{1, 0} 50 return fileDescriptor_17ae6090ff270234, []int{1, 0}
50} 51}
51 52
52type Schema_NestedBlock_NestingMode int32 53type Schema_NestedBlock_NestingMode int32
@@ -68,6 +69,7 @@ var Schema_NestedBlock_NestingMode_name = map[int32]string{
68 4: "MAP", 69 4: "MAP",
69 5: "GROUP", 70 5: "GROUP",
70} 71}
72
71var Schema_NestedBlock_NestingMode_value = map[string]int32{ 73var Schema_NestedBlock_NestingMode_value = map[string]int32{
72 "INVALID": 0, 74 "INVALID": 0,
73 "SINGLE": 1, 75 "SINGLE": 1,
@@ -80,8 +82,9 @@ var Schema_NestedBlock_NestingMode_value = map[string]int32{
80func (x Schema_NestedBlock_NestingMode) String() string { 82func (x Schema_NestedBlock_NestingMode) String() string {
81 return proto.EnumName(Schema_NestedBlock_NestingMode_name, int32(x)) 83 return proto.EnumName(Schema_NestedBlock_NestingMode_name, int32(x))
82} 84}
85
83func (Schema_NestedBlock_NestingMode) EnumDescriptor() ([]byte, []int) { 86func (Schema_NestedBlock_NestingMode) EnumDescriptor() ([]byte, []int) {
84 return fileDescriptor_tfplugin5_56820f4fb67360c5, []int{5, 2, 0} 87 return fileDescriptor_17ae6090ff270234, []int{5, 2, 0}
85} 88}
86 89
87// DynamicValue is an opaque encoding of terraform data, with the field name 90// DynamicValue is an opaque encoding of terraform data, with the field name
@@ -98,16 +101,17 @@ func (m *DynamicValue) Reset() { *m = DynamicValue{} }
98func (m *DynamicValue) String() string { return proto.CompactTextString(m) } 101func (m *DynamicValue) String() string { return proto.CompactTextString(m) }
99func (*DynamicValue) ProtoMessage() {} 102func (*DynamicValue) ProtoMessage() {}
100func (*DynamicValue) Descriptor() ([]byte, []int) { 103func (*DynamicValue) Descriptor() ([]byte, []int) {
101 return fileDescriptor_tfplugin5_56820f4fb67360c5, []int{0} 104 return fileDescriptor_17ae6090ff270234, []int{0}
102} 105}
106
103func (m *DynamicValue) XXX_Unmarshal(b []byte) error { 107func (m *DynamicValue) XXX_Unmarshal(b []byte) error {
104 return xxx_messageInfo_DynamicValue.Unmarshal(m, b) 108 return xxx_messageInfo_DynamicValue.Unmarshal(m, b)
105} 109}
106func (m *DynamicValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 110func (m *DynamicValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
107 return xxx_messageInfo_DynamicValue.Marshal(b, m, deterministic) 111 return xxx_messageInfo_DynamicValue.Marshal(b, m, deterministic)
108} 112}
109func (dst *DynamicValue) XXX_Merge(src proto.Message) { 113func (m *DynamicValue) XXX_Merge(src proto.Message) {
110 xxx_messageInfo_DynamicValue.Merge(dst, src) 114 xxx_messageInfo_DynamicValue.Merge(m, src)
111} 115}
112func (m *DynamicValue) XXX_Size() int { 116func (m *DynamicValue) XXX_Size() int {
113 return xxx_messageInfo_DynamicValue.Size(m) 117 return xxx_messageInfo_DynamicValue.Size(m)
@@ -146,16 +150,17 @@ func (m *Diagnostic) Reset() { *m = Diagnostic{} }
146func (m *Diagnostic) String() string { return proto.CompactTextString(m) } 150func (m *Diagnostic) String() string { return proto.CompactTextString(m) }
147func (*Diagnostic) ProtoMessage() {} 151func (*Diagnostic) ProtoMessage() {}
148func (*Diagnostic) Descriptor() ([]byte, []int) { 152func (*Diagnostic) Descriptor() ([]byte, []int) {
149 return fileDescriptor_tfplugin5_56820f4fb67360c5, []int{1} 153 return fileDescriptor_17ae6090ff270234, []int{1}
150} 154}
155
151func (m *Diagnostic) XXX_Unmarshal(b []byte) error { 156func (m *Diagnostic) XXX_Unmarshal(b []byte) error {
152 return xxx_messageInfo_Diagnostic.Unmarshal(m, b) 157 return xxx_messageInfo_Diagnostic.Unmarshal(m, b)
153} 158}
154func (m *Diagnostic) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 159func (m *Diagnostic) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
155 return xxx_messageInfo_Diagnostic.Marshal(b, m, deterministic) 160 return xxx_messageInfo_Diagnostic.Marshal(b, m, deterministic)
156} 161}
157func (dst *Diagnostic) XXX_Merge(src proto.Message) { 162func (m *Diagnostic) XXX_Merge(src proto.Message) {
158 xxx_messageInfo_Diagnostic.Merge(dst, src) 163 xxx_messageInfo_Diagnostic.Merge(m, src)
159} 164}
160func (m *Diagnostic) XXX_Size() int { 165func (m *Diagnostic) XXX_Size() int {
161 return xxx_messageInfo_Diagnostic.Size(m) 166 return xxx_messageInfo_Diagnostic.Size(m)
@@ -205,16 +210,17 @@ func (m *AttributePath) Reset() { *m = AttributePath{} }
205func (m *AttributePath) String() string { return proto.CompactTextString(m) } 210func (m *AttributePath) String() string { return proto.CompactTextString(m) }
206func (*AttributePath) ProtoMessage() {} 211func (*AttributePath) ProtoMessage() {}
207func (*AttributePath) Descriptor() ([]byte, []int) { 212func (*AttributePath) Descriptor() ([]byte, []int) {
208 return fileDescriptor_tfplugin5_56820f4fb67360c5, []int{2} 213 return fileDescriptor_17ae6090ff270234, []int{2}
209} 214}
215
210func (m *AttributePath) XXX_Unmarshal(b []byte) error { 216func (m *AttributePath) XXX_Unmarshal(b []byte) error {
211 return xxx_messageInfo_AttributePath.Unmarshal(m, b) 217 return xxx_messageInfo_AttributePath.Unmarshal(m, b)
212} 218}
213func (m *AttributePath) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 219func (m *AttributePath) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
214 return xxx_messageInfo_AttributePath.Marshal(b, m, deterministic) 220 return xxx_messageInfo_AttributePath.Marshal(b, m, deterministic)
215} 221}
216func (dst *AttributePath) XXX_Merge(src proto.Message) { 222func (m *AttributePath) XXX_Merge(src proto.Message) {
217 xxx_messageInfo_AttributePath.Merge(dst, src) 223 xxx_messageInfo_AttributePath.Merge(m, src)
218} 224}
219func (m *AttributePath) XXX_Size() int { 225func (m *AttributePath) XXX_Size() int {
220 return xxx_messageInfo_AttributePath.Size(m) 226 return xxx_messageInfo_AttributePath.Size(m)
@@ -247,16 +253,17 @@ func (m *AttributePath_Step) Reset() { *m = AttributePath_Step{} }
247func (m *AttributePath_Step) String() string { return proto.CompactTextString(m) } 253func (m *AttributePath_Step) String() string { return proto.CompactTextString(m) }
248func (*AttributePath_Step) ProtoMessage() {} 254func (*AttributePath_Step) ProtoMessage() {}
249func (*AttributePath_Step) Descriptor() ([]byte, []int) { 255func (*AttributePath_Step) Descriptor() ([]byte, []int) {
250 return fileDescriptor_tfplugin5_56820f4fb67360c5, []int{2, 0} 256 return fileDescriptor_17ae6090ff270234, []int{2, 0}
251} 257}
258
252func (m *AttributePath_Step) XXX_Unmarshal(b []byte) error { 259func (m *AttributePath_Step) XXX_Unmarshal(b []byte) error {
253 return xxx_messageInfo_AttributePath_Step.Unmarshal(m, b) 260 return xxx_messageInfo_AttributePath_Step.Unmarshal(m, b)
254} 261}
255func (m *AttributePath_Step) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 262func (m *AttributePath_Step) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
256 return xxx_messageInfo_AttributePath_Step.Marshal(b, m, deterministic) 263 return xxx_messageInfo_AttributePath_Step.Marshal(b, m, deterministic)
257} 264}
258func (dst *AttributePath_Step) XXX_Merge(src proto.Message) { 265func (m *AttributePath_Step) XXX_Merge(src proto.Message) {
259 xxx_messageInfo_AttributePath_Step.Merge(dst, src) 266 xxx_messageInfo_AttributePath_Step.Merge(m, src)
260} 267}
261func (m *AttributePath_Step) XXX_Size() int { 268func (m *AttributePath_Step) XXX_Size() int {
262 return xxx_messageInfo_AttributePath_Step.Size(m) 269 return xxx_messageInfo_AttributePath_Step.Size(m)
@@ -407,16 +414,17 @@ func (m *Stop) Reset() { *m = Stop{} }
407func (m *Stop) String() string { return proto.CompactTextString(m) } 414func (m *Stop) String() string { return proto.CompactTextString(m) }
408func (*Stop) ProtoMessage() {} 415func (*Stop) ProtoMessage() {}
409func (*Stop) Descriptor() ([]byte, []int) { 416func (*Stop) Descriptor() ([]byte, []int) {
410 return fileDescriptor_tfplugin5_56820f4fb67360c5, []int{3} 417 return fileDescriptor_17ae6090ff270234, []int{3}
411} 418}
419
412func (m *Stop) XXX_Unmarshal(b []byte) error { 420func (m *Stop) XXX_Unmarshal(b []byte) error {
413 return xxx_messageInfo_Stop.Unmarshal(m, b) 421 return xxx_messageInfo_Stop.Unmarshal(m, b)
414} 422}
415func (m *Stop) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 423func (m *Stop) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
416 return xxx_messageInfo_Stop.Marshal(b, m, deterministic) 424 return xxx_messageInfo_Stop.Marshal(b, m, deterministic)
417} 425}
418func (dst *Stop) XXX_Merge(src proto.Message) { 426func (m *Stop) XXX_Merge(src proto.Message) {
419 xxx_messageInfo_Stop.Merge(dst, src) 427 xxx_messageInfo_Stop.Merge(m, src)
420} 428}
421func (m *Stop) XXX_Size() int { 429func (m *Stop) XXX_Size() int {
422 return xxx_messageInfo_Stop.Size(m) 430 return xxx_messageInfo_Stop.Size(m)
@@ -437,16 +445,17 @@ func (m *Stop_Request) Reset() { *m = Stop_Request{} }
437func (m *Stop_Request) String() string { return proto.CompactTextString(m) } 445func (m *Stop_Request) String() string { return proto.CompactTextString(m) }
438func (*Stop_Request) ProtoMessage() {} 446func (*Stop_Request) ProtoMessage() {}
439func (*Stop_Request) Descriptor() ([]byte, []int) { 447func (*Stop_Request) Descriptor() ([]byte, []int) {
440 return fileDescriptor_tfplugin5_56820f4fb67360c5, []int{3, 0} 448 return fileDescriptor_17ae6090ff270234, []int{3, 0}
441} 449}
450
442func (m *Stop_Request) XXX_Unmarshal(b []byte) error { 451func (m *Stop_Request) XXX_Unmarshal(b []byte) error {
443 return xxx_messageInfo_Stop_Request.Unmarshal(m, b) 452 return xxx_messageInfo_Stop_Request.Unmarshal(m, b)
444} 453}
445func (m *Stop_Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 454func (m *Stop_Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
446 return xxx_messageInfo_Stop_Request.Marshal(b, m, deterministic) 455 return xxx_messageInfo_Stop_Request.Marshal(b, m, deterministic)
447} 456}
448func (dst *Stop_Request) XXX_Merge(src proto.Message) { 457func (m *Stop_Request) XXX_Merge(src proto.Message) {
449 xxx_messageInfo_Stop_Request.Merge(dst, src) 458 xxx_messageInfo_Stop_Request.Merge(m, src)
450} 459}
451func (m *Stop_Request) XXX_Size() int { 460func (m *Stop_Request) XXX_Size() int {
452 return xxx_messageInfo_Stop_Request.Size(m) 461 return xxx_messageInfo_Stop_Request.Size(m)
@@ -468,16 +477,17 @@ func (m *Stop_Response) Reset() { *m = Stop_Response{} }
468func (m *Stop_Response) String() string { return proto.CompactTextString(m) } 477func (m *Stop_Response) String() string { return proto.CompactTextString(m) }
469func (*Stop_Response) ProtoMessage() {} 478func (*Stop_Response) ProtoMessage() {}
470func (*Stop_Response) Descriptor() ([]byte, []int) { 479func (*Stop_Response) Descriptor() ([]byte, []int) {
471 return fileDescriptor_tfplugin5_56820f4fb67360c5, []int{3, 1} 480 return fileDescriptor_17ae6090ff270234, []int{3, 1}
472} 481}
482
473func (m *Stop_Response) XXX_Unmarshal(b []byte) error { 483func (m *Stop_Response) XXX_Unmarshal(b []byte) error {
474 return xxx_messageInfo_Stop_Response.Unmarshal(m, b) 484 return xxx_messageInfo_Stop_Response.Unmarshal(m, b)
475} 485}
476func (m *Stop_Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 486func (m *Stop_Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
477 return xxx_messageInfo_Stop_Response.Marshal(b, m, deterministic) 487 return xxx_messageInfo_Stop_Response.Marshal(b, m, deterministic)
478} 488}
479func (dst *Stop_Response) XXX_Merge(src proto.Message) { 489func (m *Stop_Response) XXX_Merge(src proto.Message) {
480 xxx_messageInfo_Stop_Response.Merge(dst, src) 490 xxx_messageInfo_Stop_Response.Merge(m, src)
481} 491}
482func (m *Stop_Response) XXX_Size() int { 492func (m *Stop_Response) XXX_Size() int {
483 return xxx_messageInfo_Stop_Response.Size(m) 493 return xxx_messageInfo_Stop_Response.Size(m)
@@ -510,16 +520,17 @@ func (m *RawState) Reset() { *m = RawState{} }
510func (m *RawState) String() string { return proto.CompactTextString(m) } 520func (m *RawState) String() string { return proto.CompactTextString(m) }
511func (*RawState) ProtoMessage() {} 521func (*RawState) ProtoMessage() {}
512func (*RawState) Descriptor() ([]byte, []int) { 522func (*RawState) Descriptor() ([]byte, []int) {
513 return fileDescriptor_tfplugin5_56820f4fb67360c5, []int{4} 523 return fileDescriptor_17ae6090ff270234, []int{4}
514} 524}
525
515func (m *RawState) XXX_Unmarshal(b []byte) error { 526func (m *RawState) XXX_Unmarshal(b []byte) error {
516 return xxx_messageInfo_RawState.Unmarshal(m, b) 527 return xxx_messageInfo_RawState.Unmarshal(m, b)
517} 528}
518func (m *RawState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 529func (m *RawState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
519 return xxx_messageInfo_RawState.Marshal(b, m, deterministic) 530 return xxx_messageInfo_RawState.Marshal(b, m, deterministic)
520} 531}
521func (dst *RawState) XXX_Merge(src proto.Message) { 532func (m *RawState) XXX_Merge(src proto.Message) {
522 xxx_messageInfo_RawState.Merge(dst, src) 533 xxx_messageInfo_RawState.Merge(m, src)
523} 534}
524func (m *RawState) XXX_Size() int { 535func (m *RawState) XXX_Size() int {
525 return xxx_messageInfo_RawState.Size(m) 536 return xxx_messageInfo_RawState.Size(m)
@@ -561,16 +572,17 @@ func (m *Schema) Reset() { *m = Schema{} }
561func (m *Schema) String() string { return proto.CompactTextString(m) } 572func (m *Schema) String() string { return proto.CompactTextString(m) }
562func (*Schema) ProtoMessage() {} 573func (*Schema) ProtoMessage() {}
563func (*Schema) Descriptor() ([]byte, []int) { 574func (*Schema) Descriptor() ([]byte, []int) {
564 return fileDescriptor_tfplugin5_56820f4fb67360c5, []int{5} 575 return fileDescriptor_17ae6090ff270234, []int{5}
565} 576}
577
566func (m *Schema) XXX_Unmarshal(b []byte) error { 578func (m *Schema) XXX_Unmarshal(b []byte) error {
567 return xxx_messageInfo_Schema.Unmarshal(m, b) 579 return xxx_messageInfo_Schema.Unmarshal(m, b)
568} 580}
569func (m *Schema) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 581func (m *Schema) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
570 return xxx_messageInfo_Schema.Marshal(b, m, deterministic) 582 return xxx_messageInfo_Schema.Marshal(b, m, deterministic)
571} 583}
572func (dst *Schema) XXX_Merge(src proto.Message) { 584func (m *Schema) XXX_Merge(src proto.Message) {
573 xxx_messageInfo_Schema.Merge(dst, src) 585 xxx_messageInfo_Schema.Merge(m, src)
574} 586}
575func (m *Schema) XXX_Size() int { 587func (m *Schema) XXX_Size() int {
576 return xxx_messageInfo_Schema.Size(m) 588 return xxx_messageInfo_Schema.Size(m)
@@ -608,16 +620,17 @@ func (m *Schema_Block) Reset() { *m = Schema_Block{} }
608func (m *Schema_Block) String() string { return proto.CompactTextString(m) } 620func (m *Schema_Block) String() string { return proto.CompactTextString(m) }
609func (*Schema_Block) ProtoMessage() {} 621func (*Schema_Block) ProtoMessage() {}
610func (*Schema_Block) Descriptor() ([]byte, []int) { 622func (*Schema_Block) Descriptor() ([]byte, []int) {
611 return fileDescriptor_tfplugin5_56820f4fb67360c5, []int{5, 0} 623 return fileDescriptor_17ae6090ff270234, []int{5, 0}
612} 624}
625
613func (m *Schema_Block) XXX_Unmarshal(b []byte) error { 626func (m *Schema_Block) XXX_Unmarshal(b []byte) error {
614 return xxx_messageInfo_Schema_Block.Unmarshal(m, b) 627 return xxx_messageInfo_Schema_Block.Unmarshal(m, b)
615} 628}
616func (m *Schema_Block) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 629func (m *Schema_Block) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
617 return xxx_messageInfo_Schema_Block.Marshal(b, m, deterministic) 630 return xxx_messageInfo_Schema_Block.Marshal(b, m, deterministic)
618} 631}
619func (dst *Schema_Block) XXX_Merge(src proto.Message) { 632func (m *Schema_Block) XXX_Merge(src proto.Message) {
620 xxx_messageInfo_Schema_Block.Merge(dst, src) 633 xxx_messageInfo_Schema_Block.Merge(m, src)
621} 634}
622func (m *Schema_Block) XXX_Size() int { 635func (m *Schema_Block) XXX_Size() int {
623 return xxx_messageInfo_Schema_Block.Size(m) 636 return xxx_messageInfo_Schema_Block.Size(m)
@@ -666,16 +679,17 @@ func (m *Schema_Attribute) Reset() { *m = Schema_Attribute{} }
666func (m *Schema_Attribute) String() string { return proto.CompactTextString(m) } 679func (m *Schema_Attribute) String() string { return proto.CompactTextString(m) }
667func (*Schema_Attribute) ProtoMessage() {} 680func (*Schema_Attribute) ProtoMessage() {}
668func (*Schema_Attribute) Descriptor() ([]byte, []int) { 681func (*Schema_Attribute) Descriptor() ([]byte, []int) {
669 return fileDescriptor_tfplugin5_56820f4fb67360c5, []int{5, 1} 682 return fileDescriptor_17ae6090ff270234, []int{5, 1}
670} 683}
684
671func (m *Schema_Attribute) XXX_Unmarshal(b []byte) error { 685func (m *Schema_Attribute) XXX_Unmarshal(b []byte) error {
672 return xxx_messageInfo_Schema_Attribute.Unmarshal(m, b) 686 return xxx_messageInfo_Schema_Attribute.Unmarshal(m, b)
673} 687}
674func (m *Schema_Attribute) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 688func (m *Schema_Attribute) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
675 return xxx_messageInfo_Schema_Attribute.Marshal(b, m, deterministic) 689 return xxx_messageInfo_Schema_Attribute.Marshal(b, m, deterministic)
676} 690}
677func (dst *Schema_Attribute) XXX_Merge(src proto.Message) { 691func (m *Schema_Attribute) XXX_Merge(src proto.Message) {
678 xxx_messageInfo_Schema_Attribute.Merge(dst, src) 692 xxx_messageInfo_Schema_Attribute.Merge(m, src)
679} 693}
680func (m *Schema_Attribute) XXX_Size() int { 694func (m *Schema_Attribute) XXX_Size() int {
681 return xxx_messageInfo_Schema_Attribute.Size(m) 695 return xxx_messageInfo_Schema_Attribute.Size(m)
@@ -750,16 +764,17 @@ func (m *Schema_NestedBlock) Reset() { *m = Schema_NestedBlock{} }
750func (m *Schema_NestedBlock) String() string { return proto.CompactTextString(m) } 764func (m *Schema_NestedBlock) String() string { return proto.CompactTextString(m) }
751func (*Schema_NestedBlock) ProtoMessage() {} 765func (*Schema_NestedBlock) ProtoMessage() {}
752func (*Schema_NestedBlock) Descriptor() ([]byte, []int) { 766func (*Schema_NestedBlock) Descriptor() ([]byte, []int) {
753 return fileDescriptor_tfplugin5_56820f4fb67360c5, []int{5, 2} 767 return fileDescriptor_17ae6090ff270234, []int{5, 2}
754} 768}
769
755func (m *Schema_NestedBlock) XXX_Unmarshal(b []byte) error { 770func (m *Schema_NestedBlock) XXX_Unmarshal(b []byte) error {
756 return xxx_messageInfo_Schema_NestedBlock.Unmarshal(m, b) 771 return xxx_messageInfo_Schema_NestedBlock.Unmarshal(m, b)
757} 772}
758func (m *Schema_NestedBlock) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 773func (m *Schema_NestedBlock) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
759 return xxx_messageInfo_Schema_NestedBlock.Marshal(b, m, deterministic) 774 return xxx_messageInfo_Schema_NestedBlock.Marshal(b, m, deterministic)
760} 775}
761func (dst *Schema_NestedBlock) XXX_Merge(src proto.Message) { 776func (m *Schema_NestedBlock) XXX_Merge(src proto.Message) {
762 xxx_messageInfo_Schema_NestedBlock.Merge(dst, src) 777 xxx_messageInfo_Schema_NestedBlock.Merge(m, src)
763} 778}
764func (m *Schema_NestedBlock) XXX_Size() int { 779func (m *Schema_NestedBlock) XXX_Size() int {
765 return xxx_messageInfo_Schema_NestedBlock.Size(m) 780 return xxx_messageInfo_Schema_NestedBlock.Size(m)
@@ -815,16 +830,17 @@ func (m *GetProviderSchema) Reset() { *m = GetProviderSchema{} }
815func (m *GetProviderSchema) String() string { return proto.CompactTextString(m) } 830func (m *GetProviderSchema) String() string { return proto.CompactTextString(m) }
816func (*GetProviderSchema) ProtoMessage() {} 831func (*GetProviderSchema) ProtoMessage() {}
817func (*GetProviderSchema) Descriptor() ([]byte, []int) { 832func (*GetProviderSchema) Descriptor() ([]byte, []int) {
818 return fileDescriptor_tfplugin5_56820f4fb67360c5, []int{6} 833 return fileDescriptor_17ae6090ff270234, []int{6}
819} 834}
835
820func (m *GetProviderSchema) XXX_Unmarshal(b []byte) error { 836func (m *GetProviderSchema) XXX_Unmarshal(b []byte) error {
821 return xxx_messageInfo_GetProviderSchema.Unmarshal(m, b) 837 return xxx_messageInfo_GetProviderSchema.Unmarshal(m, b)
822} 838}
823func (m *GetProviderSchema) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 839func (m *GetProviderSchema) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
824 return xxx_messageInfo_GetProviderSchema.Marshal(b, m, deterministic) 840 return xxx_messageInfo_GetProviderSchema.Marshal(b, m, deterministic)
825} 841}
826func (dst *GetProviderSchema) XXX_Merge(src proto.Message) { 842func (m *GetProviderSchema) XXX_Merge(src proto.Message) {
827 xxx_messageInfo_GetProviderSchema.Merge(dst, src) 843 xxx_messageInfo_GetProviderSchema.Merge(m, src)
828} 844}
829func (m *GetProviderSchema) XXX_Size() int { 845func (m *GetProviderSchema) XXX_Size() int {
830 return xxx_messageInfo_GetProviderSchema.Size(m) 846 return xxx_messageInfo_GetProviderSchema.Size(m)
@@ -845,16 +861,17 @@ func (m *GetProviderSchema_Request) Reset() { *m = GetProviderSchema_Req
845func (m *GetProviderSchema_Request) String() string { return proto.CompactTextString(m) } 861func (m *GetProviderSchema_Request) String() string { return proto.CompactTextString(m) }
846func (*GetProviderSchema_Request) ProtoMessage() {} 862func (*GetProviderSchema_Request) ProtoMessage() {}
847func (*GetProviderSchema_Request) Descriptor() ([]byte, []int) { 863func (*GetProviderSchema_Request) Descriptor() ([]byte, []int) {
848 return fileDescriptor_tfplugin5_56820f4fb67360c5, []int{6, 0} 864 return fileDescriptor_17ae6090ff270234, []int{6, 0}
849} 865}
866
850func (m *GetProviderSchema_Request) XXX_Unmarshal(b []byte) error { 867func (m *GetProviderSchema_Request) XXX_Unmarshal(b []byte) error {
851 return xxx_messageInfo_GetProviderSchema_Request.Unmarshal(m, b) 868 return xxx_messageInfo_GetProviderSchema_Request.Unmarshal(m, b)
852} 869}
853func (m *GetProviderSchema_Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 870func (m *GetProviderSchema_Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
854 return xxx_messageInfo_GetProviderSchema_Request.Marshal(b, m, deterministic) 871 return xxx_messageInfo_GetProviderSchema_Request.Marshal(b, m, deterministic)
855} 872}
856func (dst *GetProviderSchema_Request) XXX_Merge(src proto.Message) { 873func (m *GetProviderSchema_Request) XXX_Merge(src proto.Message) {
857 xxx_messageInfo_GetProviderSchema_Request.Merge(dst, src) 874 xxx_messageInfo_GetProviderSchema_Request.Merge(m, src)
858} 875}
859func (m *GetProviderSchema_Request) XXX_Size() int { 876func (m *GetProviderSchema_Request) XXX_Size() int {
860 return xxx_messageInfo_GetProviderSchema_Request.Size(m) 877 return xxx_messageInfo_GetProviderSchema_Request.Size(m)
@@ -879,16 +896,17 @@ func (m *GetProviderSchema_Response) Reset() { *m = GetProviderSchema_Re
879func (m *GetProviderSchema_Response) String() string { return proto.CompactTextString(m) } 896func (m *GetProviderSchema_Response) String() string { return proto.CompactTextString(m) }
880func (*GetProviderSchema_Response) ProtoMessage() {} 897func (*GetProviderSchema_Response) ProtoMessage() {}
881func (*GetProviderSchema_Response) Descriptor() ([]byte, []int) { 898func (*GetProviderSchema_Response) Descriptor() ([]byte, []int) {
882 return fileDescriptor_tfplugin5_56820f4fb67360c5, []int{6, 1} 899 return fileDescriptor_17ae6090ff270234, []int{6, 1}
883} 900}
901
884func (m *GetProviderSchema_Response) XXX_Unmarshal(b []byte) error { 902func (m *GetProviderSchema_Response) XXX_Unmarshal(b []byte) error {
885 return xxx_messageInfo_GetProviderSchema_Response.Unmarshal(m, b) 903 return xxx_messageInfo_GetProviderSchema_Response.Unmarshal(m, b)
886} 904}
887func (m *GetProviderSchema_Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 905func (m *GetProviderSchema_Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
888 return xxx_messageInfo_GetProviderSchema_Response.Marshal(b, m, deterministic) 906 return xxx_messageInfo_GetProviderSchema_Response.Marshal(b, m, deterministic)
889} 907}
890func (dst *GetProviderSchema_Response) XXX_Merge(src proto.Message) { 908func (m *GetProviderSchema_Response) XXX_Merge(src proto.Message) {
891 xxx_messageInfo_GetProviderSchema_Response.Merge(dst, src) 909 xxx_messageInfo_GetProviderSchema_Response.Merge(m, src)
892} 910}
893func (m *GetProviderSchema_Response) XXX_Size() int { 911func (m *GetProviderSchema_Response) XXX_Size() int {
894 return xxx_messageInfo_GetProviderSchema_Response.Size(m) 912 return xxx_messageInfo_GetProviderSchema_Response.Size(m)
@@ -937,16 +955,17 @@ func (m *PrepareProviderConfig) Reset() { *m = PrepareProviderConfig{} }
937func (m *PrepareProviderConfig) String() string { return proto.CompactTextString(m) } 955func (m *PrepareProviderConfig) String() string { return proto.CompactTextString(m) }
938func (*PrepareProviderConfig) ProtoMessage() {} 956func (*PrepareProviderConfig) ProtoMessage() {}
939func (*PrepareProviderConfig) Descriptor() ([]byte, []int) { 957func (*PrepareProviderConfig) Descriptor() ([]byte, []int) {
940 return fileDescriptor_tfplugin5_56820f4fb67360c5, []int{7} 958 return fileDescriptor_17ae6090ff270234, []int{7}
941} 959}
960
942func (m *PrepareProviderConfig) XXX_Unmarshal(b []byte) error { 961func (m *PrepareProviderConfig) XXX_Unmarshal(b []byte) error {
943 return xxx_messageInfo_PrepareProviderConfig.Unmarshal(m, b) 962 return xxx_messageInfo_PrepareProviderConfig.Unmarshal(m, b)
944} 963}
945func (m *PrepareProviderConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 964func (m *PrepareProviderConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
946 return xxx_messageInfo_PrepareProviderConfig.Marshal(b, m, deterministic) 965 return xxx_messageInfo_PrepareProviderConfig.Marshal(b, m, deterministic)
947} 966}
948func (dst *PrepareProviderConfig) XXX_Merge(src proto.Message) { 967func (m *PrepareProviderConfig) XXX_Merge(src proto.Message) {
949 xxx_messageInfo_PrepareProviderConfig.Merge(dst, src) 968 xxx_messageInfo_PrepareProviderConfig.Merge(m, src)
950} 969}
951func (m *PrepareProviderConfig) XXX_Size() int { 970func (m *PrepareProviderConfig) XXX_Size() int {
952 return xxx_messageInfo_PrepareProviderConfig.Size(m) 971 return xxx_messageInfo_PrepareProviderConfig.Size(m)
@@ -968,16 +987,17 @@ func (m *PrepareProviderConfig_Request) Reset() { *m = PrepareProviderCo
968func (m *PrepareProviderConfig_Request) String() string { return proto.CompactTextString(m) } 987func (m *PrepareProviderConfig_Request) String() string { return proto.CompactTextString(m) }
969func (*PrepareProviderConfig_Request) ProtoMessage() {} 988func (*PrepareProviderConfig_Request) ProtoMessage() {}
970func (*PrepareProviderConfig_Request) Descriptor() ([]byte, []int) { 989func (*PrepareProviderConfig_Request) Descriptor() ([]byte, []int) {
971 return fileDescriptor_tfplugin5_56820f4fb67360c5, []int{7, 0} 990 return fileDescriptor_17ae6090ff270234, []int{7, 0}
972} 991}
992
973func (m *PrepareProviderConfig_Request) XXX_Unmarshal(b []byte) error { 993func (m *PrepareProviderConfig_Request) XXX_Unmarshal(b []byte) error {
974 return xxx_messageInfo_PrepareProviderConfig_Request.Unmarshal(m, b) 994 return xxx_messageInfo_PrepareProviderConfig_Request.Unmarshal(m, b)
975} 995}
976func (m *PrepareProviderConfig_Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 996func (m *PrepareProviderConfig_Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
977 return xxx_messageInfo_PrepareProviderConfig_Request.Marshal(b, m, deterministic) 997 return xxx_messageInfo_PrepareProviderConfig_Request.Marshal(b, m, deterministic)
978} 998}
979func (dst *PrepareProviderConfig_Request) XXX_Merge(src proto.Message) { 999func (m *PrepareProviderConfig_Request) XXX_Merge(src proto.Message) {
980 xxx_messageInfo_PrepareProviderConfig_Request.Merge(dst, src) 1000 xxx_messageInfo_PrepareProviderConfig_Request.Merge(m, src)
981} 1001}
982func (m *PrepareProviderConfig_Request) XXX_Size() int { 1002func (m *PrepareProviderConfig_Request) XXX_Size() int {
983 return xxx_messageInfo_PrepareProviderConfig_Request.Size(m) 1003 return xxx_messageInfo_PrepareProviderConfig_Request.Size(m)
@@ -1007,16 +1027,17 @@ func (m *PrepareProviderConfig_Response) Reset() { *m = PrepareProviderC
1007func (m *PrepareProviderConfig_Response) String() string { return proto.CompactTextString(m) } 1027func (m *PrepareProviderConfig_Response) String() string { return proto.CompactTextString(m) }
1008func (*PrepareProviderConfig_Response) ProtoMessage() {} 1028func (*PrepareProviderConfig_Response) ProtoMessage() {}
1009func (*PrepareProviderConfig_Response) Descriptor() ([]byte, []int) { 1029func (*PrepareProviderConfig_Response) Descriptor() ([]byte, []int) {
1010 return fileDescriptor_tfplugin5_56820f4fb67360c5, []int{7, 1} 1030 return fileDescriptor_17ae6090ff270234, []int{7, 1}
1011} 1031}
1032
1012func (m *PrepareProviderConfig_Response) XXX_Unmarshal(b []byte) error { 1033func (m *PrepareProviderConfig_Response) XXX_Unmarshal(b []byte) error {
1013 return xxx_messageInfo_PrepareProviderConfig_Response.Unmarshal(m, b) 1034 return xxx_messageInfo_PrepareProviderConfig_Response.Unmarshal(m, b)
1014} 1035}
1015func (m *PrepareProviderConfig_Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 1036func (m *PrepareProviderConfig_Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
1016 return xxx_messageInfo_PrepareProviderConfig_Response.Marshal(b, m, deterministic) 1037 return xxx_messageInfo_PrepareProviderConfig_Response.Marshal(b, m, deterministic)
1017} 1038}
1018func (dst *PrepareProviderConfig_Response) XXX_Merge(src proto.Message) { 1039func (m *PrepareProviderConfig_Response) XXX_Merge(src proto.Message) {
1019 xxx_messageInfo_PrepareProviderConfig_Response.Merge(dst, src) 1040 xxx_messageInfo_PrepareProviderConfig_Response.Merge(m, src)
1020} 1041}
1021func (m *PrepareProviderConfig_Response) XXX_Size() int { 1042func (m *PrepareProviderConfig_Response) XXX_Size() int {
1022 return xxx_messageInfo_PrepareProviderConfig_Response.Size(m) 1043 return xxx_messageInfo_PrepareProviderConfig_Response.Size(m)
@@ -1051,16 +1072,17 @@ func (m *UpgradeResourceState) Reset() { *m = UpgradeResourceState{} }
1051func (m *UpgradeResourceState) String() string { return proto.CompactTextString(m) } 1072func (m *UpgradeResourceState) String() string { return proto.CompactTextString(m) }
1052func (*UpgradeResourceState) ProtoMessage() {} 1073func (*UpgradeResourceState) ProtoMessage() {}
1053func (*UpgradeResourceState) Descriptor() ([]byte, []int) { 1074func (*UpgradeResourceState) Descriptor() ([]byte, []int) {
1054 return fileDescriptor_tfplugin5_56820f4fb67360c5, []int{8} 1075 return fileDescriptor_17ae6090ff270234, []int{8}
1055} 1076}
1077
1056func (m *UpgradeResourceState) XXX_Unmarshal(b []byte) error { 1078func (m *UpgradeResourceState) XXX_Unmarshal(b []byte) error {
1057 return xxx_messageInfo_UpgradeResourceState.Unmarshal(m, b) 1079 return xxx_messageInfo_UpgradeResourceState.Unmarshal(m, b)
1058} 1080}
1059func (m *UpgradeResourceState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 1081func (m *UpgradeResourceState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
1060 return xxx_messageInfo_UpgradeResourceState.Marshal(b, m, deterministic) 1082 return xxx_messageInfo_UpgradeResourceState.Marshal(b, m, deterministic)
1061} 1083}
1062func (dst *UpgradeResourceState) XXX_Merge(src proto.Message) { 1084func (m *UpgradeResourceState) XXX_Merge(src proto.Message) {
1063 xxx_messageInfo_UpgradeResourceState.Merge(dst, src) 1085 xxx_messageInfo_UpgradeResourceState.Merge(m, src)
1064} 1086}
1065func (m *UpgradeResourceState) XXX_Size() int { 1087func (m *UpgradeResourceState) XXX_Size() int {
1066 return xxx_messageInfo_UpgradeResourceState.Size(m) 1088 return xxx_messageInfo_UpgradeResourceState.Size(m)
@@ -1090,16 +1112,17 @@ func (m *UpgradeResourceState_Request) Reset() { *m = UpgradeResourceSta
1090func (m *UpgradeResourceState_Request) String() string { return proto.CompactTextString(m) } 1112func (m *UpgradeResourceState_Request) String() string { return proto.CompactTextString(m) }
1091func (*UpgradeResourceState_Request) ProtoMessage() {} 1113func (*UpgradeResourceState_Request) ProtoMessage() {}
1092func (*UpgradeResourceState_Request) Descriptor() ([]byte, []int) { 1114func (*UpgradeResourceState_Request) Descriptor() ([]byte, []int) {
1093 return fileDescriptor_tfplugin5_56820f4fb67360c5, []int{8, 0} 1115 return fileDescriptor_17ae6090ff270234, []int{8, 0}
1094} 1116}
1117
1095func (m *UpgradeResourceState_Request) XXX_Unmarshal(b []byte) error { 1118func (m *UpgradeResourceState_Request) XXX_Unmarshal(b []byte) error {
1096 return xxx_messageInfo_UpgradeResourceState_Request.Unmarshal(m, b) 1119 return xxx_messageInfo_UpgradeResourceState_Request.Unmarshal(m, b)
1097} 1120}
1098func (m *UpgradeResourceState_Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 1121func (m *UpgradeResourceState_Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
1099 return xxx_messageInfo_UpgradeResourceState_Request.Marshal(b, m, deterministic) 1122 return xxx_messageInfo_UpgradeResourceState_Request.Marshal(b, m, deterministic)
1100} 1123}
1101func (dst *UpgradeResourceState_Request) XXX_Merge(src proto.Message) { 1124func (m *UpgradeResourceState_Request) XXX_Merge(src proto.Message) {
1102 xxx_messageInfo_UpgradeResourceState_Request.Merge(dst, src) 1125 xxx_messageInfo_UpgradeResourceState_Request.Merge(m, src)
1103} 1126}
1104func (m *UpgradeResourceState_Request) XXX_Size() int { 1127func (m *UpgradeResourceState_Request) XXX_Size() int {
1105 return xxx_messageInfo_UpgradeResourceState_Request.Size(m) 1128 return xxx_messageInfo_UpgradeResourceState_Request.Size(m)
@@ -1149,16 +1172,17 @@ func (m *UpgradeResourceState_Response) Reset() { *m = UpgradeResourceSt
1149func (m *UpgradeResourceState_Response) String() string { return proto.CompactTextString(m) } 1172func (m *UpgradeResourceState_Response) String() string { return proto.CompactTextString(m) }
1150func (*UpgradeResourceState_Response) ProtoMessage() {} 1173func (*UpgradeResourceState_Response) ProtoMessage() {}
1151func (*UpgradeResourceState_Response) Descriptor() ([]byte, []int) { 1174func (*UpgradeResourceState_Response) Descriptor() ([]byte, []int) {
1152 return fileDescriptor_tfplugin5_56820f4fb67360c5, []int{8, 1} 1175 return fileDescriptor_17ae6090ff270234, []int{8, 1}
1153} 1176}
1177
1154func (m *UpgradeResourceState_Response) XXX_Unmarshal(b []byte) error { 1178func (m *UpgradeResourceState_Response) XXX_Unmarshal(b []byte) error {
1155 return xxx_messageInfo_UpgradeResourceState_Response.Unmarshal(m, b) 1179 return xxx_messageInfo_UpgradeResourceState_Response.Unmarshal(m, b)
1156} 1180}
1157func (m *UpgradeResourceState_Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 1181func (m *UpgradeResourceState_Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
1158 return xxx_messageInfo_UpgradeResourceState_Response.Marshal(b, m, deterministic) 1182 return xxx_messageInfo_UpgradeResourceState_Response.Marshal(b, m, deterministic)
1159} 1183}
1160func (dst *UpgradeResourceState_Response) XXX_Merge(src proto.Message) { 1184func (m *UpgradeResourceState_Response) XXX_Merge(src proto.Message) {
1161 xxx_messageInfo_UpgradeResourceState_Response.Merge(dst, src) 1185 xxx_messageInfo_UpgradeResourceState_Response.Merge(m, src)
1162} 1186}
1163func (m *UpgradeResourceState_Response) XXX_Size() int { 1187func (m *UpgradeResourceState_Response) XXX_Size() int {
1164 return xxx_messageInfo_UpgradeResourceState_Response.Size(m) 1188 return xxx_messageInfo_UpgradeResourceState_Response.Size(m)
@@ -1193,16 +1217,17 @@ func (m *ValidateResourceTypeConfig) Reset() { *m = ValidateResourceType
1193func (m *ValidateResourceTypeConfig) String() string { return proto.CompactTextString(m) } 1217func (m *ValidateResourceTypeConfig) String() string { return proto.CompactTextString(m) }
1194func (*ValidateResourceTypeConfig) ProtoMessage() {} 1218func (*ValidateResourceTypeConfig) ProtoMessage() {}
1195func (*ValidateResourceTypeConfig) Descriptor() ([]byte, []int) { 1219func (*ValidateResourceTypeConfig) Descriptor() ([]byte, []int) {
1196 return fileDescriptor_tfplugin5_56820f4fb67360c5, []int{9} 1220 return fileDescriptor_17ae6090ff270234, []int{9}
1197} 1221}
1222
1198func (m *ValidateResourceTypeConfig) XXX_Unmarshal(b []byte) error { 1223func (m *ValidateResourceTypeConfig) XXX_Unmarshal(b []byte) error {
1199 return xxx_messageInfo_ValidateResourceTypeConfig.Unmarshal(m, b) 1224 return xxx_messageInfo_ValidateResourceTypeConfig.Unmarshal(m, b)
1200} 1225}
1201func (m *ValidateResourceTypeConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 1226func (m *ValidateResourceTypeConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
1202 return xxx_messageInfo_ValidateResourceTypeConfig.Marshal(b, m, deterministic) 1227 return xxx_messageInfo_ValidateResourceTypeConfig.Marshal(b, m, deterministic)
1203} 1228}
1204func (dst *ValidateResourceTypeConfig) XXX_Merge(src proto.Message) { 1229func (m *ValidateResourceTypeConfig) XXX_Merge(src proto.Message) {
1205 xxx_messageInfo_ValidateResourceTypeConfig.Merge(dst, src) 1230 xxx_messageInfo_ValidateResourceTypeConfig.Merge(m, src)
1206} 1231}
1207func (m *ValidateResourceTypeConfig) XXX_Size() int { 1232func (m *ValidateResourceTypeConfig) XXX_Size() int {
1208 return xxx_messageInfo_ValidateResourceTypeConfig.Size(m) 1233 return xxx_messageInfo_ValidateResourceTypeConfig.Size(m)
@@ -1225,16 +1250,17 @@ func (m *ValidateResourceTypeConfig_Request) Reset() { *m = ValidateReso
1225func (m *ValidateResourceTypeConfig_Request) String() string { return proto.CompactTextString(m) } 1250func (m *ValidateResourceTypeConfig_Request) String() string { return proto.CompactTextString(m) }
1226func (*ValidateResourceTypeConfig_Request) ProtoMessage() {} 1251func (*ValidateResourceTypeConfig_Request) ProtoMessage() {}
1227func (*ValidateResourceTypeConfig_Request) Descriptor() ([]byte, []int) { 1252func (*ValidateResourceTypeConfig_Request) Descriptor() ([]byte, []int) {
1228 return fileDescriptor_tfplugin5_56820f4fb67360c5, []int{9, 0} 1253 return fileDescriptor_17ae6090ff270234, []int{9, 0}
1229} 1254}
1255
1230func (m *ValidateResourceTypeConfig_Request) XXX_Unmarshal(b []byte) error { 1256func (m *ValidateResourceTypeConfig_Request) XXX_Unmarshal(b []byte) error {
1231 return xxx_messageInfo_ValidateResourceTypeConfig_Request.Unmarshal(m, b) 1257 return xxx_messageInfo_ValidateResourceTypeConfig_Request.Unmarshal(m, b)
1232} 1258}
1233func (m *ValidateResourceTypeConfig_Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 1259func (m *ValidateResourceTypeConfig_Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
1234 return xxx_messageInfo_ValidateResourceTypeConfig_Request.Marshal(b, m, deterministic) 1260 return xxx_messageInfo_ValidateResourceTypeConfig_Request.Marshal(b, m, deterministic)
1235} 1261}
1236func (dst *ValidateResourceTypeConfig_Request) XXX_Merge(src proto.Message) { 1262func (m *ValidateResourceTypeConfig_Request) XXX_Merge(src proto.Message) {
1237 xxx_messageInfo_ValidateResourceTypeConfig_Request.Merge(dst, src) 1263 xxx_messageInfo_ValidateResourceTypeConfig_Request.Merge(m, src)
1238} 1264}
1239func (m *ValidateResourceTypeConfig_Request) XXX_Size() int { 1265func (m *ValidateResourceTypeConfig_Request) XXX_Size() int {
1240 return xxx_messageInfo_ValidateResourceTypeConfig_Request.Size(m) 1266 return xxx_messageInfo_ValidateResourceTypeConfig_Request.Size(m)
@@ -1270,16 +1296,17 @@ func (m *ValidateResourceTypeConfig_Response) Reset() { *m = ValidateRes
1270func (m *ValidateResourceTypeConfig_Response) String() string { return proto.CompactTextString(m) } 1296func (m *ValidateResourceTypeConfig_Response) String() string { return proto.CompactTextString(m) }
1271func (*ValidateResourceTypeConfig_Response) ProtoMessage() {} 1297func (*ValidateResourceTypeConfig_Response) ProtoMessage() {}
1272func (*ValidateResourceTypeConfig_Response) Descriptor() ([]byte, []int) { 1298func (*ValidateResourceTypeConfig_Response) Descriptor() ([]byte, []int) {
1273 return fileDescriptor_tfplugin5_56820f4fb67360c5, []int{9, 1} 1299 return fileDescriptor_17ae6090ff270234, []int{9, 1}
1274} 1300}
1301
1275func (m *ValidateResourceTypeConfig_Response) XXX_Unmarshal(b []byte) error { 1302func (m *ValidateResourceTypeConfig_Response) XXX_Unmarshal(b []byte) error {
1276 return xxx_messageInfo_ValidateResourceTypeConfig_Response.Unmarshal(m, b) 1303 return xxx_messageInfo_ValidateResourceTypeConfig_Response.Unmarshal(m, b)
1277} 1304}
1278func (m *ValidateResourceTypeConfig_Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 1305func (m *ValidateResourceTypeConfig_Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
1279 return xxx_messageInfo_ValidateResourceTypeConfig_Response.Marshal(b, m, deterministic) 1306 return xxx_messageInfo_ValidateResourceTypeConfig_Response.Marshal(b, m, deterministic)
1280} 1307}
1281func (dst *ValidateResourceTypeConfig_Response) XXX_Merge(src proto.Message) { 1308func (m *ValidateResourceTypeConfig_Response) XXX_Merge(src proto.Message) {
1282 xxx_messageInfo_ValidateResourceTypeConfig_Response.Merge(dst, src) 1309 xxx_messageInfo_ValidateResourceTypeConfig_Response.Merge(m, src)
1283} 1310}
1284func (m *ValidateResourceTypeConfig_Response) XXX_Size() int { 1311func (m *ValidateResourceTypeConfig_Response) XXX_Size() int {
1285 return xxx_messageInfo_ValidateResourceTypeConfig_Response.Size(m) 1312 return xxx_messageInfo_ValidateResourceTypeConfig_Response.Size(m)
@@ -1307,16 +1334,17 @@ func (m *ValidateDataSourceConfig) Reset() { *m = ValidateDataSourceConf
1307func (m *ValidateDataSourceConfig) String() string { return proto.CompactTextString(m) } 1334func (m *ValidateDataSourceConfig) String() string { return proto.CompactTextString(m) }
1308func (*ValidateDataSourceConfig) ProtoMessage() {} 1335func (*ValidateDataSourceConfig) ProtoMessage() {}
1309func (*ValidateDataSourceConfig) Descriptor() ([]byte, []int) { 1336func (*ValidateDataSourceConfig) Descriptor() ([]byte, []int) {
1310 return fileDescriptor_tfplugin5_56820f4fb67360c5, []int{10} 1337 return fileDescriptor_17ae6090ff270234, []int{10}
1311} 1338}
1339
1312func (m *ValidateDataSourceConfig) XXX_Unmarshal(b []byte) error { 1340func (m *ValidateDataSourceConfig) XXX_Unmarshal(b []byte) error {
1313 return xxx_messageInfo_ValidateDataSourceConfig.Unmarshal(m, b) 1341 return xxx_messageInfo_ValidateDataSourceConfig.Unmarshal(m, b)
1314} 1342}
1315func (m *ValidateDataSourceConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 1343func (m *ValidateDataSourceConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
1316 return xxx_messageInfo_ValidateDataSourceConfig.Marshal(b, m, deterministic) 1344 return xxx_messageInfo_ValidateDataSourceConfig.Marshal(b, m, deterministic)
1317} 1345}
1318func (dst *ValidateDataSourceConfig) XXX_Merge(src proto.Message) { 1346func (m *ValidateDataSourceConfig) XXX_Merge(src proto.Message) {
1319 xxx_messageInfo_ValidateDataSourceConfig.Merge(dst, src) 1347 xxx_messageInfo_ValidateDataSourceConfig.Merge(m, src)
1320} 1348}
1321func (m *ValidateDataSourceConfig) XXX_Size() int { 1349func (m *ValidateDataSourceConfig) XXX_Size() int {
1322 return xxx_messageInfo_ValidateDataSourceConfig.Size(m) 1350 return xxx_messageInfo_ValidateDataSourceConfig.Size(m)
@@ -1339,16 +1367,17 @@ func (m *ValidateDataSourceConfig_Request) Reset() { *m = ValidateDataSo
1339func (m *ValidateDataSourceConfig_Request) String() string { return proto.CompactTextString(m) } 1367func (m *ValidateDataSourceConfig_Request) String() string { return proto.CompactTextString(m) }
1340func (*ValidateDataSourceConfig_Request) ProtoMessage() {} 1368func (*ValidateDataSourceConfig_Request) ProtoMessage() {}
1341func (*ValidateDataSourceConfig_Request) Descriptor() ([]byte, []int) { 1369func (*ValidateDataSourceConfig_Request) Descriptor() ([]byte, []int) {
1342 return fileDescriptor_tfplugin5_56820f4fb67360c5, []int{10, 0} 1370 return fileDescriptor_17ae6090ff270234, []int{10, 0}
1343} 1371}
1372
1344func (m *ValidateDataSourceConfig_Request) XXX_Unmarshal(b []byte) error { 1373func (m *ValidateDataSourceConfig_Request) XXX_Unmarshal(b []byte) error {
1345 return xxx_messageInfo_ValidateDataSourceConfig_Request.Unmarshal(m, b) 1374 return xxx_messageInfo_ValidateDataSourceConfig_Request.Unmarshal(m, b)
1346} 1375}
1347func (m *ValidateDataSourceConfig_Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 1376func (m *ValidateDataSourceConfig_Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
1348 return xxx_messageInfo_ValidateDataSourceConfig_Request.Marshal(b, m, deterministic) 1377 return xxx_messageInfo_ValidateDataSourceConfig_Request.Marshal(b, m, deterministic)
1349} 1378}
1350func (dst *ValidateDataSourceConfig_Request) XXX_Merge(src proto.Message) { 1379func (m *ValidateDataSourceConfig_Request) XXX_Merge(src proto.Message) {
1351 xxx_messageInfo_ValidateDataSourceConfig_Request.Merge(dst, src) 1380 xxx_messageInfo_ValidateDataSourceConfig_Request.Merge(m, src)
1352} 1381}
1353func (m *ValidateDataSourceConfig_Request) XXX_Size() int { 1382func (m *ValidateDataSourceConfig_Request) XXX_Size() int {
1354 return xxx_messageInfo_ValidateDataSourceConfig_Request.Size(m) 1383 return xxx_messageInfo_ValidateDataSourceConfig_Request.Size(m)
@@ -1384,16 +1413,17 @@ func (m *ValidateDataSourceConfig_Response) Reset() { *m = ValidateDataS
1384func (m *ValidateDataSourceConfig_Response) String() string { return proto.CompactTextString(m) } 1413func (m *ValidateDataSourceConfig_Response) String() string { return proto.CompactTextString(m) }
1385func (*ValidateDataSourceConfig_Response) ProtoMessage() {} 1414func (*ValidateDataSourceConfig_Response) ProtoMessage() {}
1386func (*ValidateDataSourceConfig_Response) Descriptor() ([]byte, []int) { 1415func (*ValidateDataSourceConfig_Response) Descriptor() ([]byte, []int) {
1387 return fileDescriptor_tfplugin5_56820f4fb67360c5, []int{10, 1} 1416 return fileDescriptor_17ae6090ff270234, []int{10, 1}
1388} 1417}
1418
1389func (m *ValidateDataSourceConfig_Response) XXX_Unmarshal(b []byte) error { 1419func (m *ValidateDataSourceConfig_Response) XXX_Unmarshal(b []byte) error {
1390 return xxx_messageInfo_ValidateDataSourceConfig_Response.Unmarshal(m, b) 1420 return xxx_messageInfo_ValidateDataSourceConfig_Response.Unmarshal(m, b)
1391} 1421}
1392func (m *ValidateDataSourceConfig_Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 1422func (m *ValidateDataSourceConfig_Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
1393 return xxx_messageInfo_ValidateDataSourceConfig_Response.Marshal(b, m, deterministic) 1423 return xxx_messageInfo_ValidateDataSourceConfig_Response.Marshal(b, m, deterministic)
1394} 1424}
1395func (dst *ValidateDataSourceConfig_Response) XXX_Merge(src proto.Message) { 1425func (m *ValidateDataSourceConfig_Response) XXX_Merge(src proto.Message) {
1396 xxx_messageInfo_ValidateDataSourceConfig_Response.Merge(dst, src) 1426 xxx_messageInfo_ValidateDataSourceConfig_Response.Merge(m, src)
1397} 1427}
1398func (m *ValidateDataSourceConfig_Response) XXX_Size() int { 1428func (m *ValidateDataSourceConfig_Response) XXX_Size() int {
1399 return xxx_messageInfo_ValidateDataSourceConfig_Response.Size(m) 1429 return xxx_messageInfo_ValidateDataSourceConfig_Response.Size(m)
@@ -1421,16 +1451,17 @@ func (m *Configure) Reset() { *m = Configure{} }
1421func (m *Configure) String() string { return proto.CompactTextString(m) } 1451func (m *Configure) String() string { return proto.CompactTextString(m) }
1422func (*Configure) ProtoMessage() {} 1452func (*Configure) ProtoMessage() {}
1423func (*Configure) Descriptor() ([]byte, []int) { 1453func (*Configure) Descriptor() ([]byte, []int) {
1424 return fileDescriptor_tfplugin5_56820f4fb67360c5, []int{11} 1454 return fileDescriptor_17ae6090ff270234, []int{11}
1425} 1455}
1456
1426func (m *Configure) XXX_Unmarshal(b []byte) error { 1457func (m *Configure) XXX_Unmarshal(b []byte) error {
1427 return xxx_messageInfo_Configure.Unmarshal(m, b) 1458 return xxx_messageInfo_Configure.Unmarshal(m, b)
1428} 1459}
1429func (m *Configure) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 1460func (m *Configure) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
1430 return xxx_messageInfo_Configure.Marshal(b, m, deterministic) 1461 return xxx_messageInfo_Configure.Marshal(b, m, deterministic)
1431} 1462}
1432func (dst *Configure) XXX_Merge(src proto.Message) { 1463func (m *Configure) XXX_Merge(src proto.Message) {
1433 xxx_messageInfo_Configure.Merge(dst, src) 1464 xxx_messageInfo_Configure.Merge(m, src)
1434} 1465}
1435func (m *Configure) XXX_Size() int { 1466func (m *Configure) XXX_Size() int {
1436 return xxx_messageInfo_Configure.Size(m) 1467 return xxx_messageInfo_Configure.Size(m)
@@ -1453,16 +1484,17 @@ func (m *Configure_Request) Reset() { *m = Configure_Request{} }
1453func (m *Configure_Request) String() string { return proto.CompactTextString(m) } 1484func (m *Configure_Request) String() string { return proto.CompactTextString(m) }
1454func (*Configure_Request) ProtoMessage() {} 1485func (*Configure_Request) ProtoMessage() {}
1455func (*Configure_Request) Descriptor() ([]byte, []int) { 1486func (*Configure_Request) Descriptor() ([]byte, []int) {
1456 return fileDescriptor_tfplugin5_56820f4fb67360c5, []int{11, 0} 1487 return fileDescriptor_17ae6090ff270234, []int{11, 0}
1457} 1488}
1489
1458func (m *Configure_Request) XXX_Unmarshal(b []byte) error { 1490func (m *Configure_Request) XXX_Unmarshal(b []byte) error {
1459 return xxx_messageInfo_Configure_Request.Unmarshal(m, b) 1491 return xxx_messageInfo_Configure_Request.Unmarshal(m, b)
1460} 1492}
1461func (m *Configure_Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 1493func (m *Configure_Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
1462 return xxx_messageInfo_Configure_Request.Marshal(b, m, deterministic) 1494 return xxx_messageInfo_Configure_Request.Marshal(b, m, deterministic)
1463} 1495}
1464func (dst *Configure_Request) XXX_Merge(src proto.Message) { 1496func (m *Configure_Request) XXX_Merge(src proto.Message) {
1465 xxx_messageInfo_Configure_Request.Merge(dst, src) 1497 xxx_messageInfo_Configure_Request.Merge(m, src)
1466} 1498}
1467func (m *Configure_Request) XXX_Size() int { 1499func (m *Configure_Request) XXX_Size() int {
1468 return xxx_messageInfo_Configure_Request.Size(m) 1500 return xxx_messageInfo_Configure_Request.Size(m)
@@ -1498,16 +1530,17 @@ func (m *Configure_Response) Reset() { *m = Configure_Response{} }
1498func (m *Configure_Response) String() string { return proto.CompactTextString(m) } 1530func (m *Configure_Response) String() string { return proto.CompactTextString(m) }
1499func (*Configure_Response) ProtoMessage() {} 1531func (*Configure_Response) ProtoMessage() {}
1500func (*Configure_Response) Descriptor() ([]byte, []int) { 1532func (*Configure_Response) Descriptor() ([]byte, []int) {
1501 return fileDescriptor_tfplugin5_56820f4fb67360c5, []int{11, 1} 1533 return fileDescriptor_17ae6090ff270234, []int{11, 1}
1502} 1534}
1535
1503func (m *Configure_Response) XXX_Unmarshal(b []byte) error { 1536func (m *Configure_Response) XXX_Unmarshal(b []byte) error {
1504 return xxx_messageInfo_Configure_Response.Unmarshal(m, b) 1537 return xxx_messageInfo_Configure_Response.Unmarshal(m, b)
1505} 1538}
1506func (m *Configure_Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 1539func (m *Configure_Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
1507 return xxx_messageInfo_Configure_Response.Marshal(b, m, deterministic) 1540 return xxx_messageInfo_Configure_Response.Marshal(b, m, deterministic)
1508} 1541}
1509func (dst *Configure_Response) XXX_Merge(src proto.Message) { 1542func (m *Configure_Response) XXX_Merge(src proto.Message) {
1510 xxx_messageInfo_Configure_Response.Merge(dst, src) 1543 xxx_messageInfo_Configure_Response.Merge(m, src)
1511} 1544}
1512func (m *Configure_Response) XXX_Size() int { 1545func (m *Configure_Response) XXX_Size() int {
1513 return xxx_messageInfo_Configure_Response.Size(m) 1546 return xxx_messageInfo_Configure_Response.Size(m)
@@ -1535,16 +1568,17 @@ func (m *ReadResource) Reset() { *m = ReadResource{} }
1535func (m *ReadResource) String() string { return proto.CompactTextString(m) } 1568func (m *ReadResource) String() string { return proto.CompactTextString(m) }
1536func (*ReadResource) ProtoMessage() {} 1569func (*ReadResource) ProtoMessage() {}
1537func (*ReadResource) Descriptor() ([]byte, []int) { 1570func (*ReadResource) Descriptor() ([]byte, []int) {
1538 return fileDescriptor_tfplugin5_56820f4fb67360c5, []int{12} 1571 return fileDescriptor_17ae6090ff270234, []int{12}
1539} 1572}
1573
1540func (m *ReadResource) XXX_Unmarshal(b []byte) error { 1574func (m *ReadResource) XXX_Unmarshal(b []byte) error {
1541 return xxx_messageInfo_ReadResource.Unmarshal(m, b) 1575 return xxx_messageInfo_ReadResource.Unmarshal(m, b)
1542} 1576}
1543func (m *ReadResource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 1577func (m *ReadResource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
1544 return xxx_messageInfo_ReadResource.Marshal(b, m, deterministic) 1578 return xxx_messageInfo_ReadResource.Marshal(b, m, deterministic)
1545} 1579}
1546func (dst *ReadResource) XXX_Merge(src proto.Message) { 1580func (m *ReadResource) XXX_Merge(src proto.Message) {
1547 xxx_messageInfo_ReadResource.Merge(dst, src) 1581 xxx_messageInfo_ReadResource.Merge(m, src)
1548} 1582}
1549func (m *ReadResource) XXX_Size() int { 1583func (m *ReadResource) XXX_Size() int {
1550 return xxx_messageInfo_ReadResource.Size(m) 1584 return xxx_messageInfo_ReadResource.Size(m)
@@ -1558,6 +1592,7 @@ var xxx_messageInfo_ReadResource proto.InternalMessageInfo
1558type ReadResource_Request struct { 1592type ReadResource_Request struct {
1559 TypeName string `protobuf:"bytes,1,opt,name=type_name,json=typeName,proto3" json:"type_name,omitempty"` 1593 TypeName string `protobuf:"bytes,1,opt,name=type_name,json=typeName,proto3" json:"type_name,omitempty"`
1560 CurrentState *DynamicValue `protobuf:"bytes,2,opt,name=current_state,json=currentState,proto3" json:"current_state,omitempty"` 1594 CurrentState *DynamicValue `protobuf:"bytes,2,opt,name=current_state,json=currentState,proto3" json:"current_state,omitempty"`
1595 Private []byte `protobuf:"bytes,3,opt,name=private,proto3" json:"private,omitempty"`
1561 XXX_NoUnkeyedLiteral struct{} `json:"-"` 1596 XXX_NoUnkeyedLiteral struct{} `json:"-"`
1562 XXX_unrecognized []byte `json:"-"` 1597 XXX_unrecognized []byte `json:"-"`
1563 XXX_sizecache int32 `json:"-"` 1598 XXX_sizecache int32 `json:"-"`
@@ -1567,16 +1602,17 @@ func (m *ReadResource_Request) Reset() { *m = ReadResource_Request{} }
1567func (m *ReadResource_Request) String() string { return proto.CompactTextString(m) } 1602func (m *ReadResource_Request) String() string { return proto.CompactTextString(m) }
1568func (*ReadResource_Request) ProtoMessage() {} 1603func (*ReadResource_Request) ProtoMessage() {}
1569func (*ReadResource_Request) Descriptor() ([]byte, []int) { 1604func (*ReadResource_Request) Descriptor() ([]byte, []int) {
1570 return fileDescriptor_tfplugin5_56820f4fb67360c5, []int{12, 0} 1605 return fileDescriptor_17ae6090ff270234, []int{12, 0}
1571} 1606}
1607
1572func (m *ReadResource_Request) XXX_Unmarshal(b []byte) error { 1608func (m *ReadResource_Request) XXX_Unmarshal(b []byte) error {
1573 return xxx_messageInfo_ReadResource_Request.Unmarshal(m, b) 1609 return xxx_messageInfo_ReadResource_Request.Unmarshal(m, b)
1574} 1610}
1575func (m *ReadResource_Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 1611func (m *ReadResource_Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
1576 return xxx_messageInfo_ReadResource_Request.Marshal(b, m, deterministic) 1612 return xxx_messageInfo_ReadResource_Request.Marshal(b, m, deterministic)
1577} 1613}
1578func (dst *ReadResource_Request) XXX_Merge(src proto.Message) { 1614func (m *ReadResource_Request) XXX_Merge(src proto.Message) {
1579 xxx_messageInfo_ReadResource_Request.Merge(dst, src) 1615 xxx_messageInfo_ReadResource_Request.Merge(m, src)
1580} 1616}
1581func (m *ReadResource_Request) XXX_Size() int { 1617func (m *ReadResource_Request) XXX_Size() int {
1582 return xxx_messageInfo_ReadResource_Request.Size(m) 1618 return xxx_messageInfo_ReadResource_Request.Size(m)
@@ -1601,9 +1637,17 @@ func (m *ReadResource_Request) GetCurrentState() *DynamicValue {
1601 return nil 1637 return nil
1602} 1638}
1603 1639
1640func (m *ReadResource_Request) GetPrivate() []byte {
1641 if m != nil {
1642 return m.Private
1643 }
1644 return nil
1645}
1646
1604type ReadResource_Response struct { 1647type ReadResource_Response struct {
1605 NewState *DynamicValue `protobuf:"bytes,1,opt,name=new_state,json=newState,proto3" json:"new_state,omitempty"` 1648 NewState *DynamicValue `protobuf:"bytes,1,opt,name=new_state,json=newState,proto3" json:"new_state,omitempty"`
1606 Diagnostics []*Diagnostic `protobuf:"bytes,2,rep,name=diagnostics,proto3" json:"diagnostics,omitempty"` 1649 Diagnostics []*Diagnostic `protobuf:"bytes,2,rep,name=diagnostics,proto3" json:"diagnostics,omitempty"`
1650 Private []byte `protobuf:"bytes,3,opt,name=private,proto3" json:"private,omitempty"`
1607 XXX_NoUnkeyedLiteral struct{} `json:"-"` 1651 XXX_NoUnkeyedLiteral struct{} `json:"-"`
1608 XXX_unrecognized []byte `json:"-"` 1652 XXX_unrecognized []byte `json:"-"`
1609 XXX_sizecache int32 `json:"-"` 1653 XXX_sizecache int32 `json:"-"`
@@ -1613,16 +1657,17 @@ func (m *ReadResource_Response) Reset() { *m = ReadResource_Response{} }
1613func (m *ReadResource_Response) String() string { return proto.CompactTextString(m) } 1657func (m *ReadResource_Response) String() string { return proto.CompactTextString(m) }
1614func (*ReadResource_Response) ProtoMessage() {} 1658func (*ReadResource_Response) ProtoMessage() {}
1615func (*ReadResource_Response) Descriptor() ([]byte, []int) { 1659func (*ReadResource_Response) Descriptor() ([]byte, []int) {
1616 return fileDescriptor_tfplugin5_56820f4fb67360c5, []int{12, 1} 1660 return fileDescriptor_17ae6090ff270234, []int{12, 1}
1617} 1661}
1662
1618func (m *ReadResource_Response) XXX_Unmarshal(b []byte) error { 1663func (m *ReadResource_Response) XXX_Unmarshal(b []byte) error {
1619 return xxx_messageInfo_ReadResource_Response.Unmarshal(m, b) 1664 return xxx_messageInfo_ReadResource_Response.Unmarshal(m, b)
1620} 1665}
1621func (m *ReadResource_Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 1666func (m *ReadResource_Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
1622 return xxx_messageInfo_ReadResource_Response.Marshal(b, m, deterministic) 1667 return xxx_messageInfo_ReadResource_Response.Marshal(b, m, deterministic)
1623} 1668}
1624func (dst *ReadResource_Response) XXX_Merge(src proto.Message) { 1669func (m *ReadResource_Response) XXX_Merge(src proto.Message) {
1625 xxx_messageInfo_ReadResource_Response.Merge(dst, src) 1670 xxx_messageInfo_ReadResource_Response.Merge(m, src)
1626} 1671}
1627func (m *ReadResource_Response) XXX_Size() int { 1672func (m *ReadResource_Response) XXX_Size() int {
1628 return xxx_messageInfo_ReadResource_Response.Size(m) 1673 return xxx_messageInfo_ReadResource_Response.Size(m)
@@ -1647,6 +1692,13 @@ func (m *ReadResource_Response) GetDiagnostics() []*Diagnostic {
1647 return nil 1692 return nil
1648} 1693}
1649 1694
1695func (m *ReadResource_Response) GetPrivate() []byte {
1696 if m != nil {
1697 return m.Private
1698 }
1699 return nil
1700}
1701
1650type PlanResourceChange struct { 1702type PlanResourceChange struct {
1651 XXX_NoUnkeyedLiteral struct{} `json:"-"` 1703 XXX_NoUnkeyedLiteral struct{} `json:"-"`
1652 XXX_unrecognized []byte `json:"-"` 1704 XXX_unrecognized []byte `json:"-"`
@@ -1657,16 +1709,17 @@ func (m *PlanResourceChange) Reset() { *m = PlanResourceChange{} }
1657func (m *PlanResourceChange) String() string { return proto.CompactTextString(m) } 1709func (m *PlanResourceChange) String() string { return proto.CompactTextString(m) }
1658func (*PlanResourceChange) ProtoMessage() {} 1710func (*PlanResourceChange) ProtoMessage() {}
1659func (*PlanResourceChange) Descriptor() ([]byte, []int) { 1711func (*PlanResourceChange) Descriptor() ([]byte, []int) {
1660 return fileDescriptor_tfplugin5_56820f4fb67360c5, []int{13} 1712 return fileDescriptor_17ae6090ff270234, []int{13}
1661} 1713}
1714
1662func (m *PlanResourceChange) XXX_Unmarshal(b []byte) error { 1715func (m *PlanResourceChange) XXX_Unmarshal(b []byte) error {
1663 return xxx_messageInfo_PlanResourceChange.Unmarshal(m, b) 1716 return xxx_messageInfo_PlanResourceChange.Unmarshal(m, b)
1664} 1717}
1665func (m *PlanResourceChange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 1718func (m *PlanResourceChange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
1666 return xxx_messageInfo_PlanResourceChange.Marshal(b, m, deterministic) 1719 return xxx_messageInfo_PlanResourceChange.Marshal(b, m, deterministic)
1667} 1720}
1668func (dst *PlanResourceChange) XXX_Merge(src proto.Message) { 1721func (m *PlanResourceChange) XXX_Merge(src proto.Message) {
1669 xxx_messageInfo_PlanResourceChange.Merge(dst, src) 1722 xxx_messageInfo_PlanResourceChange.Merge(m, src)
1670} 1723}
1671func (m *PlanResourceChange) XXX_Size() int { 1724func (m *PlanResourceChange) XXX_Size() int {
1672 return xxx_messageInfo_PlanResourceChange.Size(m) 1725 return xxx_messageInfo_PlanResourceChange.Size(m)
@@ -1692,16 +1745,17 @@ func (m *PlanResourceChange_Request) Reset() { *m = PlanResourceChange_R
1692func (m *PlanResourceChange_Request) String() string { return proto.CompactTextString(m) } 1745func (m *PlanResourceChange_Request) String() string { return proto.CompactTextString(m) }
1693func (*PlanResourceChange_Request) ProtoMessage() {} 1746func (*PlanResourceChange_Request) ProtoMessage() {}
1694func (*PlanResourceChange_Request) Descriptor() ([]byte, []int) { 1747func (*PlanResourceChange_Request) Descriptor() ([]byte, []int) {
1695 return fileDescriptor_tfplugin5_56820f4fb67360c5, []int{13, 0} 1748 return fileDescriptor_17ae6090ff270234, []int{13, 0}
1696} 1749}
1750
1697func (m *PlanResourceChange_Request) XXX_Unmarshal(b []byte) error { 1751func (m *PlanResourceChange_Request) XXX_Unmarshal(b []byte) error {
1698 return xxx_messageInfo_PlanResourceChange_Request.Unmarshal(m, b) 1752 return xxx_messageInfo_PlanResourceChange_Request.Unmarshal(m, b)
1699} 1753}
1700func (m *PlanResourceChange_Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 1754func (m *PlanResourceChange_Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
1701 return xxx_messageInfo_PlanResourceChange_Request.Marshal(b, m, deterministic) 1755 return xxx_messageInfo_PlanResourceChange_Request.Marshal(b, m, deterministic)
1702} 1756}
1703func (dst *PlanResourceChange_Request) XXX_Merge(src proto.Message) { 1757func (m *PlanResourceChange_Request) XXX_Merge(src proto.Message) {
1704 xxx_messageInfo_PlanResourceChange_Request.Merge(dst, src) 1758 xxx_messageInfo_PlanResourceChange_Request.Merge(m, src)
1705} 1759}
1706func (m *PlanResourceChange_Request) XXX_Size() int { 1760func (m *PlanResourceChange_Request) XXX_Size() int {
1707 return xxx_messageInfo_PlanResourceChange_Request.Size(m) 1761 return xxx_messageInfo_PlanResourceChange_Request.Size(m)
@@ -1773,16 +1827,17 @@ func (m *PlanResourceChange_Response) Reset() { *m = PlanResourceChange_
1773func (m *PlanResourceChange_Response) String() string { return proto.CompactTextString(m) } 1827func (m *PlanResourceChange_Response) String() string { return proto.CompactTextString(m) }
1774func (*PlanResourceChange_Response) ProtoMessage() {} 1828func (*PlanResourceChange_Response) ProtoMessage() {}
1775func (*PlanResourceChange_Response) Descriptor() ([]byte, []int) { 1829func (*PlanResourceChange_Response) Descriptor() ([]byte, []int) {
1776 return fileDescriptor_tfplugin5_56820f4fb67360c5, []int{13, 1} 1830 return fileDescriptor_17ae6090ff270234, []int{13, 1}
1777} 1831}
1832
1778func (m *PlanResourceChange_Response) XXX_Unmarshal(b []byte) error { 1833func (m *PlanResourceChange_Response) XXX_Unmarshal(b []byte) error {
1779 return xxx_messageInfo_PlanResourceChange_Response.Unmarshal(m, b) 1834 return xxx_messageInfo_PlanResourceChange_Response.Unmarshal(m, b)
1780} 1835}
1781func (m *PlanResourceChange_Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 1836func (m *PlanResourceChange_Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
1782 return xxx_messageInfo_PlanResourceChange_Response.Marshal(b, m, deterministic) 1837 return xxx_messageInfo_PlanResourceChange_Response.Marshal(b, m, deterministic)
1783} 1838}
1784func (dst *PlanResourceChange_Response) XXX_Merge(src proto.Message) { 1839func (m *PlanResourceChange_Response) XXX_Merge(src proto.Message) {
1785 xxx_messageInfo_PlanResourceChange_Response.Merge(dst, src) 1840 xxx_messageInfo_PlanResourceChange_Response.Merge(m, src)
1786} 1841}
1787func (m *PlanResourceChange_Response) XXX_Size() int { 1842func (m *PlanResourceChange_Response) XXX_Size() int {
1788 return xxx_messageInfo_PlanResourceChange_Response.Size(m) 1843 return xxx_messageInfo_PlanResourceChange_Response.Size(m)
@@ -1838,16 +1893,17 @@ func (m *ApplyResourceChange) Reset() { *m = ApplyResourceChange{} }
1838func (m *ApplyResourceChange) String() string { return proto.CompactTextString(m) } 1893func (m *ApplyResourceChange) String() string { return proto.CompactTextString(m) }
1839func (*ApplyResourceChange) ProtoMessage() {} 1894func (*ApplyResourceChange) ProtoMessage() {}
1840func (*ApplyResourceChange) Descriptor() ([]byte, []int) { 1895func (*ApplyResourceChange) Descriptor() ([]byte, []int) {
1841 return fileDescriptor_tfplugin5_56820f4fb67360c5, []int{14} 1896 return fileDescriptor_17ae6090ff270234, []int{14}
1842} 1897}
1898
1843func (m *ApplyResourceChange) XXX_Unmarshal(b []byte) error { 1899func (m *ApplyResourceChange) XXX_Unmarshal(b []byte) error {
1844 return xxx_messageInfo_ApplyResourceChange.Unmarshal(m, b) 1900 return xxx_messageInfo_ApplyResourceChange.Unmarshal(m, b)
1845} 1901}
1846func (m *ApplyResourceChange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 1902func (m *ApplyResourceChange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
1847 return xxx_messageInfo_ApplyResourceChange.Marshal(b, m, deterministic) 1903 return xxx_messageInfo_ApplyResourceChange.Marshal(b, m, deterministic)
1848} 1904}
1849func (dst *ApplyResourceChange) XXX_Merge(src proto.Message) { 1905func (m *ApplyResourceChange) XXX_Merge(src proto.Message) {
1850 xxx_messageInfo_ApplyResourceChange.Merge(dst, src) 1906 xxx_messageInfo_ApplyResourceChange.Merge(m, src)
1851} 1907}
1852func (m *ApplyResourceChange) XXX_Size() int { 1908func (m *ApplyResourceChange) XXX_Size() int {
1853 return xxx_messageInfo_ApplyResourceChange.Size(m) 1909 return xxx_messageInfo_ApplyResourceChange.Size(m)
@@ -1873,16 +1929,17 @@ func (m *ApplyResourceChange_Request) Reset() { *m = ApplyResourceChange
1873func (m *ApplyResourceChange_Request) String() string { return proto.CompactTextString(m) } 1929func (m *ApplyResourceChange_Request) String() string { return proto.CompactTextString(m) }
1874func (*ApplyResourceChange_Request) ProtoMessage() {} 1930func (*ApplyResourceChange_Request) ProtoMessage() {}
1875func (*ApplyResourceChange_Request) Descriptor() ([]byte, []int) { 1931func (*ApplyResourceChange_Request) Descriptor() ([]byte, []int) {
1876 return fileDescriptor_tfplugin5_56820f4fb67360c5, []int{14, 0} 1932 return fileDescriptor_17ae6090ff270234, []int{14, 0}
1877} 1933}
1934
1878func (m *ApplyResourceChange_Request) XXX_Unmarshal(b []byte) error { 1935func (m *ApplyResourceChange_Request) XXX_Unmarshal(b []byte) error {
1879 return xxx_messageInfo_ApplyResourceChange_Request.Unmarshal(m, b) 1936 return xxx_messageInfo_ApplyResourceChange_Request.Unmarshal(m, b)
1880} 1937}
1881func (m *ApplyResourceChange_Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 1938func (m *ApplyResourceChange_Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
1882 return xxx_messageInfo_ApplyResourceChange_Request.Marshal(b, m, deterministic) 1939 return xxx_messageInfo_ApplyResourceChange_Request.Marshal(b, m, deterministic)
1883} 1940}
1884func (dst *ApplyResourceChange_Request) XXX_Merge(src proto.Message) { 1941func (m *ApplyResourceChange_Request) XXX_Merge(src proto.Message) {
1885 xxx_messageInfo_ApplyResourceChange_Request.Merge(dst, src) 1942 xxx_messageInfo_ApplyResourceChange_Request.Merge(m, src)
1886} 1943}
1887func (m *ApplyResourceChange_Request) XXX_Size() int { 1944func (m *ApplyResourceChange_Request) XXX_Size() int {
1888 return xxx_messageInfo_ApplyResourceChange_Request.Size(m) 1945 return xxx_messageInfo_ApplyResourceChange_Request.Size(m)
@@ -1953,16 +2010,17 @@ func (m *ApplyResourceChange_Response) Reset() { *m = ApplyResourceChang
1953func (m *ApplyResourceChange_Response) String() string { return proto.CompactTextString(m) } 2010func (m *ApplyResourceChange_Response) String() string { return proto.CompactTextString(m) }
1954func (*ApplyResourceChange_Response) ProtoMessage() {} 2011func (*ApplyResourceChange_Response) ProtoMessage() {}
1955func (*ApplyResourceChange_Response) Descriptor() ([]byte, []int) { 2012func (*ApplyResourceChange_Response) Descriptor() ([]byte, []int) {
1956 return fileDescriptor_tfplugin5_56820f4fb67360c5, []int{14, 1} 2013 return fileDescriptor_17ae6090ff270234, []int{14, 1}
1957} 2014}
2015
1958func (m *ApplyResourceChange_Response) XXX_Unmarshal(b []byte) error { 2016func (m *ApplyResourceChange_Response) XXX_Unmarshal(b []byte) error {
1959 return xxx_messageInfo_ApplyResourceChange_Response.Unmarshal(m, b) 2017 return xxx_messageInfo_ApplyResourceChange_Response.Unmarshal(m, b)
1960} 2018}
1961func (m *ApplyResourceChange_Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 2019func (m *ApplyResourceChange_Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
1962 return xxx_messageInfo_ApplyResourceChange_Response.Marshal(b, m, deterministic) 2020 return xxx_messageInfo_ApplyResourceChange_Response.Marshal(b, m, deterministic)
1963} 2021}
1964func (dst *ApplyResourceChange_Response) XXX_Merge(src proto.Message) { 2022func (m *ApplyResourceChange_Response) XXX_Merge(src proto.Message) {
1965 xxx_messageInfo_ApplyResourceChange_Response.Merge(dst, src) 2023 xxx_messageInfo_ApplyResourceChange_Response.Merge(m, src)
1966} 2024}
1967func (m *ApplyResourceChange_Response) XXX_Size() int { 2025func (m *ApplyResourceChange_Response) XXX_Size() int {
1968 return xxx_messageInfo_ApplyResourceChange_Response.Size(m) 2026 return xxx_messageInfo_ApplyResourceChange_Response.Size(m)
@@ -2011,16 +2069,17 @@ func (m *ImportResourceState) Reset() { *m = ImportResourceState{} }
2011func (m *ImportResourceState) String() string { return proto.CompactTextString(m) } 2069func (m *ImportResourceState) String() string { return proto.CompactTextString(m) }
2012func (*ImportResourceState) ProtoMessage() {} 2070func (*ImportResourceState) ProtoMessage() {}
2013func (*ImportResourceState) Descriptor() ([]byte, []int) { 2071func (*ImportResourceState) Descriptor() ([]byte, []int) {
2014 return fileDescriptor_tfplugin5_56820f4fb67360c5, []int{15} 2072 return fileDescriptor_17ae6090ff270234, []int{15}
2015} 2073}
2074
2016func (m *ImportResourceState) XXX_Unmarshal(b []byte) error { 2075func (m *ImportResourceState) XXX_Unmarshal(b []byte) error {
2017 return xxx_messageInfo_ImportResourceState.Unmarshal(m, b) 2076 return xxx_messageInfo_ImportResourceState.Unmarshal(m, b)
2018} 2077}
2019func (m *ImportResourceState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 2078func (m *ImportResourceState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
2020 return xxx_messageInfo_ImportResourceState.Marshal(b, m, deterministic) 2079 return xxx_messageInfo_ImportResourceState.Marshal(b, m, deterministic)
2021} 2080}
2022func (dst *ImportResourceState) XXX_Merge(src proto.Message) { 2081func (m *ImportResourceState) XXX_Merge(src proto.Message) {
2023 xxx_messageInfo_ImportResourceState.Merge(dst, src) 2082 xxx_messageInfo_ImportResourceState.Merge(m, src)
2024} 2083}
2025func (m *ImportResourceState) XXX_Size() int { 2084func (m *ImportResourceState) XXX_Size() int {
2026 return xxx_messageInfo_ImportResourceState.Size(m) 2085 return xxx_messageInfo_ImportResourceState.Size(m)
@@ -2043,16 +2102,17 @@ func (m *ImportResourceState_Request) Reset() { *m = ImportResourceState
2043func (m *ImportResourceState_Request) String() string { return proto.CompactTextString(m) } 2102func (m *ImportResourceState_Request) String() string { return proto.CompactTextString(m) }
2044func (*ImportResourceState_Request) ProtoMessage() {} 2103func (*ImportResourceState_Request) ProtoMessage() {}
2045func (*ImportResourceState_Request) Descriptor() ([]byte, []int) { 2104func (*ImportResourceState_Request) Descriptor() ([]byte, []int) {
2046 return fileDescriptor_tfplugin5_56820f4fb67360c5, []int{15, 0} 2105 return fileDescriptor_17ae6090ff270234, []int{15, 0}
2047} 2106}
2107
2048func (m *ImportResourceState_Request) XXX_Unmarshal(b []byte) error { 2108func (m *ImportResourceState_Request) XXX_Unmarshal(b []byte) error {
2049 return xxx_messageInfo_ImportResourceState_Request.Unmarshal(m, b) 2109 return xxx_messageInfo_ImportResourceState_Request.Unmarshal(m, b)
2050} 2110}
2051func (m *ImportResourceState_Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 2111func (m *ImportResourceState_Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
2052 return xxx_messageInfo_ImportResourceState_Request.Marshal(b, m, deterministic) 2112 return xxx_messageInfo_ImportResourceState_Request.Marshal(b, m, deterministic)
2053} 2113}
2054func (dst *ImportResourceState_Request) XXX_Merge(src proto.Message) { 2114func (m *ImportResourceState_Request) XXX_Merge(src proto.Message) {
2055 xxx_messageInfo_ImportResourceState_Request.Merge(dst, src) 2115 xxx_messageInfo_ImportResourceState_Request.Merge(m, src)
2056} 2116}
2057func (m *ImportResourceState_Request) XXX_Size() int { 2117func (m *ImportResourceState_Request) XXX_Size() int {
2058 return xxx_messageInfo_ImportResourceState_Request.Size(m) 2118 return xxx_messageInfo_ImportResourceState_Request.Size(m)
@@ -2090,16 +2150,17 @@ func (m *ImportResourceState_ImportedResource) Reset() { *m = ImportReso
2090func (m *ImportResourceState_ImportedResource) String() string { return proto.CompactTextString(m) } 2150func (m *ImportResourceState_ImportedResource) String() string { return proto.CompactTextString(m) }
2091func (*ImportResourceState_ImportedResource) ProtoMessage() {} 2151func (*ImportResourceState_ImportedResource) ProtoMessage() {}
2092func (*ImportResourceState_ImportedResource) Descriptor() ([]byte, []int) { 2152func (*ImportResourceState_ImportedResource) Descriptor() ([]byte, []int) {
2093 return fileDescriptor_tfplugin5_56820f4fb67360c5, []int{15, 1} 2153 return fileDescriptor_17ae6090ff270234, []int{15, 1}
2094} 2154}
2155
2095func (m *ImportResourceState_ImportedResource) XXX_Unmarshal(b []byte) error { 2156func (m *ImportResourceState_ImportedResource) XXX_Unmarshal(b []byte) error {
2096 return xxx_messageInfo_ImportResourceState_ImportedResource.Unmarshal(m, b) 2157 return xxx_messageInfo_ImportResourceState_ImportedResource.Unmarshal(m, b)
2097} 2158}
2098func (m *ImportResourceState_ImportedResource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 2159func (m *ImportResourceState_ImportedResource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
2099 return xxx_messageInfo_ImportResourceState_ImportedResource.Marshal(b, m, deterministic) 2160 return xxx_messageInfo_ImportResourceState_ImportedResource.Marshal(b, m, deterministic)
2100} 2161}
2101func (dst *ImportResourceState_ImportedResource) XXX_Merge(src proto.Message) { 2162func (m *ImportResourceState_ImportedResource) XXX_Merge(src proto.Message) {
2102 xxx_messageInfo_ImportResourceState_ImportedResource.Merge(dst, src) 2163 xxx_messageInfo_ImportResourceState_ImportedResource.Merge(m, src)
2103} 2164}
2104func (m *ImportResourceState_ImportedResource) XXX_Size() int { 2165func (m *ImportResourceState_ImportedResource) XXX_Size() int {
2105 return xxx_messageInfo_ImportResourceState_ImportedResource.Size(m) 2166 return xxx_messageInfo_ImportResourceState_ImportedResource.Size(m)
@@ -2143,16 +2204,17 @@ func (m *ImportResourceState_Response) Reset() { *m = ImportResourceStat
2143func (m *ImportResourceState_Response) String() string { return proto.CompactTextString(m) } 2204func (m *ImportResourceState_Response) String() string { return proto.CompactTextString(m) }
2144func (*ImportResourceState_Response) ProtoMessage() {} 2205func (*ImportResourceState_Response) ProtoMessage() {}
2145func (*ImportResourceState_Response) Descriptor() ([]byte, []int) { 2206func (*ImportResourceState_Response) Descriptor() ([]byte, []int) {
2146 return fileDescriptor_tfplugin5_56820f4fb67360c5, []int{15, 2} 2207 return fileDescriptor_17ae6090ff270234, []int{15, 2}
2147} 2208}
2209
2148func (m *ImportResourceState_Response) XXX_Unmarshal(b []byte) error { 2210func (m *ImportResourceState_Response) XXX_Unmarshal(b []byte) error {
2149 return xxx_messageInfo_ImportResourceState_Response.Unmarshal(m, b) 2211 return xxx_messageInfo_ImportResourceState_Response.Unmarshal(m, b)
2150} 2212}
2151func (m *ImportResourceState_Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 2213func (m *ImportResourceState_Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
2152 return xxx_messageInfo_ImportResourceState_Response.Marshal(b, m, deterministic) 2214 return xxx_messageInfo_ImportResourceState_Response.Marshal(b, m, deterministic)
2153} 2215}
2154func (dst *ImportResourceState_Response) XXX_Merge(src proto.Message) { 2216func (m *ImportResourceState_Response) XXX_Merge(src proto.Message) {
2155 xxx_messageInfo_ImportResourceState_Response.Merge(dst, src) 2217 xxx_messageInfo_ImportResourceState_Response.Merge(m, src)
2156} 2218}
2157func (m *ImportResourceState_Response) XXX_Size() int { 2219func (m *ImportResourceState_Response) XXX_Size() int {
2158 return xxx_messageInfo_ImportResourceState_Response.Size(m) 2220 return xxx_messageInfo_ImportResourceState_Response.Size(m)
@@ -2187,16 +2249,17 @@ func (m *ReadDataSource) Reset() { *m = ReadDataSource{} }
2187func (m *ReadDataSource) String() string { return proto.CompactTextString(m) } 2249func (m *ReadDataSource) String() string { return proto.CompactTextString(m) }
2188func (*ReadDataSource) ProtoMessage() {} 2250func (*ReadDataSource) ProtoMessage() {}
2189func (*ReadDataSource) Descriptor() ([]byte, []int) { 2251func (*ReadDataSource) Descriptor() ([]byte, []int) {
2190 return fileDescriptor_tfplugin5_56820f4fb67360c5, []int{16} 2252 return fileDescriptor_17ae6090ff270234, []int{16}
2191} 2253}
2254
2192func (m *ReadDataSource) XXX_Unmarshal(b []byte) error { 2255func (m *ReadDataSource) XXX_Unmarshal(b []byte) error {
2193 return xxx_messageInfo_ReadDataSource.Unmarshal(m, b) 2256 return xxx_messageInfo_ReadDataSource.Unmarshal(m, b)
2194} 2257}
2195func (m *ReadDataSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 2258func (m *ReadDataSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
2196 return xxx_messageInfo_ReadDataSource.Marshal(b, m, deterministic) 2259 return xxx_messageInfo_ReadDataSource.Marshal(b, m, deterministic)
2197} 2260}
2198func (dst *ReadDataSource) XXX_Merge(src proto.Message) { 2261func (m *ReadDataSource) XXX_Merge(src proto.Message) {
2199 xxx_messageInfo_ReadDataSource.Merge(dst, src) 2262 xxx_messageInfo_ReadDataSource.Merge(m, src)
2200} 2263}
2201func (m *ReadDataSource) XXX_Size() int { 2264func (m *ReadDataSource) XXX_Size() int {
2202 return xxx_messageInfo_ReadDataSource.Size(m) 2265 return xxx_messageInfo_ReadDataSource.Size(m)
@@ -2219,16 +2282,17 @@ func (m *ReadDataSource_Request) Reset() { *m = ReadDataSource_Request{}
2219func (m *ReadDataSource_Request) String() string { return proto.CompactTextString(m) } 2282func (m *ReadDataSource_Request) String() string { return proto.CompactTextString(m) }
2220func (*ReadDataSource_Request) ProtoMessage() {} 2283func (*ReadDataSource_Request) ProtoMessage() {}
2221func (*ReadDataSource_Request) Descriptor() ([]byte, []int) { 2284func (*ReadDataSource_Request) Descriptor() ([]byte, []int) {
2222 return fileDescriptor_tfplugin5_56820f4fb67360c5, []int{16, 0} 2285 return fileDescriptor_17ae6090ff270234, []int{16, 0}
2223} 2286}
2287
2224func (m *ReadDataSource_Request) XXX_Unmarshal(b []byte) error { 2288func (m *ReadDataSource_Request) XXX_Unmarshal(b []byte) error {
2225 return xxx_messageInfo_ReadDataSource_Request.Unmarshal(m, b) 2289 return xxx_messageInfo_ReadDataSource_Request.Unmarshal(m, b)
2226} 2290}
2227func (m *ReadDataSource_Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 2291func (m *ReadDataSource_Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
2228 return xxx_messageInfo_ReadDataSource_Request.Marshal(b, m, deterministic) 2292 return xxx_messageInfo_ReadDataSource_Request.Marshal(b, m, deterministic)
2229} 2293}
2230func (dst *ReadDataSource_Request) XXX_Merge(src proto.Message) { 2294func (m *ReadDataSource_Request) XXX_Merge(src proto.Message) {
2231 xxx_messageInfo_ReadDataSource_Request.Merge(dst, src) 2295 xxx_messageInfo_ReadDataSource_Request.Merge(m, src)
2232} 2296}
2233func (m *ReadDataSource_Request) XXX_Size() int { 2297func (m *ReadDataSource_Request) XXX_Size() int {
2234 return xxx_messageInfo_ReadDataSource_Request.Size(m) 2298 return xxx_messageInfo_ReadDataSource_Request.Size(m)
@@ -2265,16 +2329,17 @@ func (m *ReadDataSource_Response) Reset() { *m = ReadDataSource_Response
2265func (m *ReadDataSource_Response) String() string { return proto.CompactTextString(m) } 2329func (m *ReadDataSource_Response) String() string { return proto.CompactTextString(m) }
2266func (*ReadDataSource_Response) ProtoMessage() {} 2330func (*ReadDataSource_Response) ProtoMessage() {}
2267func (*ReadDataSource_Response) Descriptor() ([]byte, []int) { 2331func (*ReadDataSource_Response) Descriptor() ([]byte, []int) {
2268 return fileDescriptor_tfplugin5_56820f4fb67360c5, []int{16, 1} 2332 return fileDescriptor_17ae6090ff270234, []int{16, 1}
2269} 2333}
2334
2270func (m *ReadDataSource_Response) XXX_Unmarshal(b []byte) error { 2335func (m *ReadDataSource_Response) XXX_Unmarshal(b []byte) error {
2271 return xxx_messageInfo_ReadDataSource_Response.Unmarshal(m, b) 2336 return xxx_messageInfo_ReadDataSource_Response.Unmarshal(m, b)
2272} 2337}
2273func (m *ReadDataSource_Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 2338func (m *ReadDataSource_Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
2274 return xxx_messageInfo_ReadDataSource_Response.Marshal(b, m, deterministic) 2339 return xxx_messageInfo_ReadDataSource_Response.Marshal(b, m, deterministic)
2275} 2340}
2276func (dst *ReadDataSource_Response) XXX_Merge(src proto.Message) { 2341func (m *ReadDataSource_Response) XXX_Merge(src proto.Message) {
2277 xxx_messageInfo_ReadDataSource_Response.Merge(dst, src) 2342 xxx_messageInfo_ReadDataSource_Response.Merge(m, src)
2278} 2343}
2279func (m *ReadDataSource_Response) XXX_Size() int { 2344func (m *ReadDataSource_Response) XXX_Size() int {
2280 return xxx_messageInfo_ReadDataSource_Response.Size(m) 2345 return xxx_messageInfo_ReadDataSource_Response.Size(m)
@@ -2309,16 +2374,17 @@ func (m *GetProvisionerSchema) Reset() { *m = GetProvisionerSchema{} }
2309func (m *GetProvisionerSchema) String() string { return proto.CompactTextString(m) } 2374func (m *GetProvisionerSchema) String() string { return proto.CompactTextString(m) }
2310func (*GetProvisionerSchema) ProtoMessage() {} 2375func (*GetProvisionerSchema) ProtoMessage() {}
2311func (*GetProvisionerSchema) Descriptor() ([]byte, []int) { 2376func (*GetProvisionerSchema) Descriptor() ([]byte, []int) {
2312 return fileDescriptor_tfplugin5_56820f4fb67360c5, []int{17} 2377 return fileDescriptor_17ae6090ff270234, []int{17}
2313} 2378}
2379
2314func (m *GetProvisionerSchema) XXX_Unmarshal(b []byte) error { 2380func (m *GetProvisionerSchema) XXX_Unmarshal(b []byte) error {
2315 return xxx_messageInfo_GetProvisionerSchema.Unmarshal(m, b) 2381 return xxx_messageInfo_GetProvisionerSchema.Unmarshal(m, b)
2316} 2382}
2317func (m *GetProvisionerSchema) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 2383func (m *GetProvisionerSchema) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
2318 return xxx_messageInfo_GetProvisionerSchema.Marshal(b, m, deterministic) 2384 return xxx_messageInfo_GetProvisionerSchema.Marshal(b, m, deterministic)
2319} 2385}
2320func (dst *GetProvisionerSchema) XXX_Merge(src proto.Message) { 2386func (m *GetProvisionerSchema) XXX_Merge(src proto.Message) {
2321 xxx_messageInfo_GetProvisionerSchema.Merge(dst, src) 2387 xxx_messageInfo_GetProvisionerSchema.Merge(m, src)
2322} 2388}
2323func (m *GetProvisionerSchema) XXX_Size() int { 2389func (m *GetProvisionerSchema) XXX_Size() int {
2324 return xxx_messageInfo_GetProvisionerSchema.Size(m) 2390 return xxx_messageInfo_GetProvisionerSchema.Size(m)
@@ -2339,16 +2405,17 @@ func (m *GetProvisionerSchema_Request) Reset() { *m = GetProvisionerSche
2339func (m *GetProvisionerSchema_Request) String() string { return proto.CompactTextString(m) } 2405func (m *GetProvisionerSchema_Request) String() string { return proto.CompactTextString(m) }
2340func (*GetProvisionerSchema_Request) ProtoMessage() {} 2406func (*GetProvisionerSchema_Request) ProtoMessage() {}
2341func (*GetProvisionerSchema_Request) Descriptor() ([]byte, []int) { 2407func (*GetProvisionerSchema_Request) Descriptor() ([]byte, []int) {
2342 return fileDescriptor_tfplugin5_56820f4fb67360c5, []int{17, 0} 2408 return fileDescriptor_17ae6090ff270234, []int{17, 0}
2343} 2409}
2410
2344func (m *GetProvisionerSchema_Request) XXX_Unmarshal(b []byte) error { 2411func (m *GetProvisionerSchema_Request) XXX_Unmarshal(b []byte) error {
2345 return xxx_messageInfo_GetProvisionerSchema_Request.Unmarshal(m, b) 2412 return xxx_messageInfo_GetProvisionerSchema_Request.Unmarshal(m, b)
2346} 2413}
2347func (m *GetProvisionerSchema_Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 2414func (m *GetProvisionerSchema_Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
2348 return xxx_messageInfo_GetProvisionerSchema_Request.Marshal(b, m, deterministic) 2415 return xxx_messageInfo_GetProvisionerSchema_Request.Marshal(b, m, deterministic)
2349} 2416}
2350func (dst *GetProvisionerSchema_Request) XXX_Merge(src proto.Message) { 2417func (m *GetProvisionerSchema_Request) XXX_Merge(src proto.Message) {
2351 xxx_messageInfo_GetProvisionerSchema_Request.Merge(dst, src) 2418 xxx_messageInfo_GetProvisionerSchema_Request.Merge(m, src)
2352} 2419}
2353func (m *GetProvisionerSchema_Request) XXX_Size() int { 2420func (m *GetProvisionerSchema_Request) XXX_Size() int {
2354 return xxx_messageInfo_GetProvisionerSchema_Request.Size(m) 2421 return xxx_messageInfo_GetProvisionerSchema_Request.Size(m)
@@ -2371,16 +2438,17 @@ func (m *GetProvisionerSchema_Response) Reset() { *m = GetProvisionerSch
2371func (m *GetProvisionerSchema_Response) String() string { return proto.CompactTextString(m) } 2438func (m *GetProvisionerSchema_Response) String() string { return proto.CompactTextString(m) }
2372func (*GetProvisionerSchema_Response) ProtoMessage() {} 2439func (*GetProvisionerSchema_Response) ProtoMessage() {}
2373func (*GetProvisionerSchema_Response) Descriptor() ([]byte, []int) { 2440func (*GetProvisionerSchema_Response) Descriptor() ([]byte, []int) {
2374 return fileDescriptor_tfplugin5_56820f4fb67360c5, []int{17, 1} 2441 return fileDescriptor_17ae6090ff270234, []int{17, 1}
2375} 2442}
2443
2376func (m *GetProvisionerSchema_Response) XXX_Unmarshal(b []byte) error { 2444func (m *GetProvisionerSchema_Response) XXX_Unmarshal(b []byte) error {
2377 return xxx_messageInfo_GetProvisionerSchema_Response.Unmarshal(m, b) 2445 return xxx_messageInfo_GetProvisionerSchema_Response.Unmarshal(m, b)
2378} 2446}
2379func (m *GetProvisionerSchema_Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 2447func (m *GetProvisionerSchema_Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
2380 return xxx_messageInfo_GetProvisionerSchema_Response.Marshal(b, m, deterministic) 2448 return xxx_messageInfo_GetProvisionerSchema_Response.Marshal(b, m, deterministic)
2381} 2449}
2382func (dst *GetProvisionerSchema_Response) XXX_Merge(src proto.Message) { 2450func (m *GetProvisionerSchema_Response) XXX_Merge(src proto.Message) {
2383 xxx_messageInfo_GetProvisionerSchema_Response.Merge(dst, src) 2451 xxx_messageInfo_GetProvisionerSchema_Response.Merge(m, src)
2384} 2452}
2385func (m *GetProvisionerSchema_Response) XXX_Size() int { 2453func (m *GetProvisionerSchema_Response) XXX_Size() int {
2386 return xxx_messageInfo_GetProvisionerSchema_Response.Size(m) 2454 return xxx_messageInfo_GetProvisionerSchema_Response.Size(m)
@@ -2415,16 +2483,17 @@ func (m *ValidateProvisionerConfig) Reset() { *m = ValidateProvisionerCo
2415func (m *ValidateProvisionerConfig) String() string { return proto.CompactTextString(m) } 2483func (m *ValidateProvisionerConfig) String() string { return proto.CompactTextString(m) }
2416func (*ValidateProvisionerConfig) ProtoMessage() {} 2484func (*ValidateProvisionerConfig) ProtoMessage() {}
2417func (*ValidateProvisionerConfig) Descriptor() ([]byte, []int) { 2485func (*ValidateProvisionerConfig) Descriptor() ([]byte, []int) {
2418 return fileDescriptor_tfplugin5_56820f4fb67360c5, []int{18} 2486 return fileDescriptor_17ae6090ff270234, []int{18}
2419} 2487}
2488
2420func (m *ValidateProvisionerConfig) XXX_Unmarshal(b []byte) error { 2489func (m *ValidateProvisionerConfig) XXX_Unmarshal(b []byte) error {
2421 return xxx_messageInfo_ValidateProvisionerConfig.Unmarshal(m, b) 2490 return xxx_messageInfo_ValidateProvisionerConfig.Unmarshal(m, b)
2422} 2491}
2423func (m *ValidateProvisionerConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 2492func (m *ValidateProvisionerConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
2424 return xxx_messageInfo_ValidateProvisionerConfig.Marshal(b, m, deterministic) 2493 return xxx_messageInfo_ValidateProvisionerConfig.Marshal(b, m, deterministic)
2425} 2494}
2426func (dst *ValidateProvisionerConfig) XXX_Merge(src proto.Message) { 2495func (m *ValidateProvisionerConfig) XXX_Merge(src proto.Message) {
2427 xxx_messageInfo_ValidateProvisionerConfig.Merge(dst, src) 2496 xxx_messageInfo_ValidateProvisionerConfig.Merge(m, src)
2428} 2497}
2429func (m *ValidateProvisionerConfig) XXX_Size() int { 2498func (m *ValidateProvisionerConfig) XXX_Size() int {
2430 return xxx_messageInfo_ValidateProvisionerConfig.Size(m) 2499 return xxx_messageInfo_ValidateProvisionerConfig.Size(m)
@@ -2446,16 +2515,17 @@ func (m *ValidateProvisionerConfig_Request) Reset() { *m = ValidateProvi
2446func (m *ValidateProvisionerConfig_Request) String() string { return proto.CompactTextString(m) } 2515func (m *ValidateProvisionerConfig_Request) String() string { return proto.CompactTextString(m) }
2447func (*ValidateProvisionerConfig_Request) ProtoMessage() {} 2516func (*ValidateProvisionerConfig_Request) ProtoMessage() {}
2448func (*ValidateProvisionerConfig_Request) Descriptor() ([]byte, []int) { 2517func (*ValidateProvisionerConfig_Request) Descriptor() ([]byte, []int) {
2449 return fileDescriptor_tfplugin5_56820f4fb67360c5, []int{18, 0} 2518 return fileDescriptor_17ae6090ff270234, []int{18, 0}
2450} 2519}
2520
2451func (m *ValidateProvisionerConfig_Request) XXX_Unmarshal(b []byte) error { 2521func (m *ValidateProvisionerConfig_Request) XXX_Unmarshal(b []byte) error {
2452 return xxx_messageInfo_ValidateProvisionerConfig_Request.Unmarshal(m, b) 2522 return xxx_messageInfo_ValidateProvisionerConfig_Request.Unmarshal(m, b)
2453} 2523}
2454func (m *ValidateProvisionerConfig_Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 2524func (m *ValidateProvisionerConfig_Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
2455 return xxx_messageInfo_ValidateProvisionerConfig_Request.Marshal(b, m, deterministic) 2525 return xxx_messageInfo_ValidateProvisionerConfig_Request.Marshal(b, m, deterministic)
2456} 2526}
2457func (dst *ValidateProvisionerConfig_Request) XXX_Merge(src proto.Message) { 2527func (m *ValidateProvisionerConfig_Request) XXX_Merge(src proto.Message) {
2458 xxx_messageInfo_ValidateProvisionerConfig_Request.Merge(dst, src) 2528 xxx_messageInfo_ValidateProvisionerConfig_Request.Merge(m, src)
2459} 2529}
2460func (m *ValidateProvisionerConfig_Request) XXX_Size() int { 2530func (m *ValidateProvisionerConfig_Request) XXX_Size() int {
2461 return xxx_messageInfo_ValidateProvisionerConfig_Request.Size(m) 2531 return xxx_messageInfo_ValidateProvisionerConfig_Request.Size(m)
@@ -2484,16 +2554,17 @@ func (m *ValidateProvisionerConfig_Response) Reset() { *m = ValidateProv
2484func (m *ValidateProvisionerConfig_Response) String() string { return proto.CompactTextString(m) } 2554func (m *ValidateProvisionerConfig_Response) String() string { return proto.CompactTextString(m) }
2485func (*ValidateProvisionerConfig_Response) ProtoMessage() {} 2555func (*ValidateProvisionerConfig_Response) ProtoMessage() {}
2486func (*ValidateProvisionerConfig_Response) Descriptor() ([]byte, []int) { 2556func (*ValidateProvisionerConfig_Response) Descriptor() ([]byte, []int) {
2487 return fileDescriptor_tfplugin5_56820f4fb67360c5, []int{18, 1} 2557 return fileDescriptor_17ae6090ff270234, []int{18, 1}
2488} 2558}
2559
2489func (m *ValidateProvisionerConfig_Response) XXX_Unmarshal(b []byte) error { 2560func (m *ValidateProvisionerConfig_Response) XXX_Unmarshal(b []byte) error {
2490 return xxx_messageInfo_ValidateProvisionerConfig_Response.Unmarshal(m, b) 2561 return xxx_messageInfo_ValidateProvisionerConfig_Response.Unmarshal(m, b)
2491} 2562}
2492func (m *ValidateProvisionerConfig_Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 2563func (m *ValidateProvisionerConfig_Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
2493 return xxx_messageInfo_ValidateProvisionerConfig_Response.Marshal(b, m, deterministic) 2564 return xxx_messageInfo_ValidateProvisionerConfig_Response.Marshal(b, m, deterministic)
2494} 2565}
2495func (dst *ValidateProvisionerConfig_Response) XXX_Merge(src proto.Message) { 2566func (m *ValidateProvisionerConfig_Response) XXX_Merge(src proto.Message) {
2496 xxx_messageInfo_ValidateProvisionerConfig_Response.Merge(dst, src) 2567 xxx_messageInfo_ValidateProvisionerConfig_Response.Merge(m, src)
2497} 2568}
2498func (m *ValidateProvisionerConfig_Response) XXX_Size() int { 2569func (m *ValidateProvisionerConfig_Response) XXX_Size() int {
2499 return xxx_messageInfo_ValidateProvisionerConfig_Response.Size(m) 2570 return xxx_messageInfo_ValidateProvisionerConfig_Response.Size(m)
@@ -2521,16 +2592,17 @@ func (m *ProvisionResource) Reset() { *m = ProvisionResource{} }
2521func (m *ProvisionResource) String() string { return proto.CompactTextString(m) } 2592func (m *ProvisionResource) String() string { return proto.CompactTextString(m) }
2522func (*ProvisionResource) ProtoMessage() {} 2593func (*ProvisionResource) ProtoMessage() {}
2523func (*ProvisionResource) Descriptor() ([]byte, []int) { 2594func (*ProvisionResource) Descriptor() ([]byte, []int) {
2524 return fileDescriptor_tfplugin5_56820f4fb67360c5, []int{19} 2595 return fileDescriptor_17ae6090ff270234, []int{19}
2525} 2596}
2597
2526func (m *ProvisionResource) XXX_Unmarshal(b []byte) error { 2598func (m *ProvisionResource) XXX_Unmarshal(b []byte) error {
2527 return xxx_messageInfo_ProvisionResource.Unmarshal(m, b) 2599 return xxx_messageInfo_ProvisionResource.Unmarshal(m, b)
2528} 2600}
2529func (m *ProvisionResource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 2601func (m *ProvisionResource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
2530 return xxx_messageInfo_ProvisionResource.Marshal(b, m, deterministic) 2602 return xxx_messageInfo_ProvisionResource.Marshal(b, m, deterministic)
2531} 2603}
2532func (dst *ProvisionResource) XXX_Merge(src proto.Message) { 2604func (m *ProvisionResource) XXX_Merge(src proto.Message) {
2533 xxx_messageInfo_ProvisionResource.Merge(dst, src) 2605 xxx_messageInfo_ProvisionResource.Merge(m, src)
2534} 2606}
2535func (m *ProvisionResource) XXX_Size() int { 2607func (m *ProvisionResource) XXX_Size() int {
2536 return xxx_messageInfo_ProvisionResource.Size(m) 2608 return xxx_messageInfo_ProvisionResource.Size(m)
@@ -2553,16 +2625,17 @@ func (m *ProvisionResource_Request) Reset() { *m = ProvisionResource_Req
2553func (m *ProvisionResource_Request) String() string { return proto.CompactTextString(m) } 2625func (m *ProvisionResource_Request) String() string { return proto.CompactTextString(m) }
2554func (*ProvisionResource_Request) ProtoMessage() {} 2626func (*ProvisionResource_Request) ProtoMessage() {}
2555func (*ProvisionResource_Request) Descriptor() ([]byte, []int) { 2627func (*ProvisionResource_Request) Descriptor() ([]byte, []int) {
2556 return fileDescriptor_tfplugin5_56820f4fb67360c5, []int{19, 0} 2628 return fileDescriptor_17ae6090ff270234, []int{19, 0}
2557} 2629}
2630
2558func (m *ProvisionResource_Request) XXX_Unmarshal(b []byte) error { 2631func (m *ProvisionResource_Request) XXX_Unmarshal(b []byte) error {
2559 return xxx_messageInfo_ProvisionResource_Request.Unmarshal(m, b) 2632 return xxx_messageInfo_ProvisionResource_Request.Unmarshal(m, b)
2560} 2633}
2561func (m *ProvisionResource_Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 2634func (m *ProvisionResource_Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
2562 return xxx_messageInfo_ProvisionResource_Request.Marshal(b, m, deterministic) 2635 return xxx_messageInfo_ProvisionResource_Request.Marshal(b, m, deterministic)
2563} 2636}
2564func (dst *ProvisionResource_Request) XXX_Merge(src proto.Message) { 2637func (m *ProvisionResource_Request) XXX_Merge(src proto.Message) {
2565 xxx_messageInfo_ProvisionResource_Request.Merge(dst, src) 2638 xxx_messageInfo_ProvisionResource_Request.Merge(m, src)
2566} 2639}
2567func (m *ProvisionResource_Request) XXX_Size() int { 2640func (m *ProvisionResource_Request) XXX_Size() int {
2568 return xxx_messageInfo_ProvisionResource_Request.Size(m) 2641 return xxx_messageInfo_ProvisionResource_Request.Size(m)
@@ -2599,16 +2672,17 @@ func (m *ProvisionResource_Response) Reset() { *m = ProvisionResource_Re
2599func (m *ProvisionResource_Response) String() string { return proto.CompactTextString(m) } 2672func (m *ProvisionResource_Response) String() string { return proto.CompactTextString(m) }
2600func (*ProvisionResource_Response) ProtoMessage() {} 2673func (*ProvisionResource_Response) ProtoMessage() {}
2601func (*ProvisionResource_Response) Descriptor() ([]byte, []int) { 2674func (*ProvisionResource_Response) Descriptor() ([]byte, []int) {
2602 return fileDescriptor_tfplugin5_56820f4fb67360c5, []int{19, 1} 2675 return fileDescriptor_17ae6090ff270234, []int{19, 1}
2603} 2676}
2677
2604func (m *ProvisionResource_Response) XXX_Unmarshal(b []byte) error { 2678func (m *ProvisionResource_Response) XXX_Unmarshal(b []byte) error {
2605 return xxx_messageInfo_ProvisionResource_Response.Unmarshal(m, b) 2679 return xxx_messageInfo_ProvisionResource_Response.Unmarshal(m, b)
2606} 2680}
2607func (m *ProvisionResource_Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 2681func (m *ProvisionResource_Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
2608 return xxx_messageInfo_ProvisionResource_Response.Marshal(b, m, deterministic) 2682 return xxx_messageInfo_ProvisionResource_Response.Marshal(b, m, deterministic)
2609} 2683}
2610func (dst *ProvisionResource_Response) XXX_Merge(src proto.Message) { 2684func (m *ProvisionResource_Response) XXX_Merge(src proto.Message) {
2611 xxx_messageInfo_ProvisionResource_Response.Merge(dst, src) 2685 xxx_messageInfo_ProvisionResource_Response.Merge(m, src)
2612} 2686}
2613func (m *ProvisionResource_Response) XXX_Size() int { 2687func (m *ProvisionResource_Response) XXX_Size() int {
2614 return xxx_messageInfo_ProvisionResource_Response.Size(m) 2688 return xxx_messageInfo_ProvisionResource_Response.Size(m)
@@ -2634,6 +2708,8 @@ func (m *ProvisionResource_Response) GetDiagnostics() []*Diagnostic {
2634} 2708}
2635 2709
2636func init() { 2710func init() {
2711 proto.RegisterEnum("tfplugin5.Diagnostic_Severity", Diagnostic_Severity_name, Diagnostic_Severity_value)
2712 proto.RegisterEnum("tfplugin5.Schema_NestedBlock_NestingMode", Schema_NestedBlock_NestingMode_name, Schema_NestedBlock_NestingMode_value)
2637 proto.RegisterType((*DynamicValue)(nil), "tfplugin5.DynamicValue") 2713 proto.RegisterType((*DynamicValue)(nil), "tfplugin5.DynamicValue")
2638 proto.RegisterType((*Diagnostic)(nil), "tfplugin5.Diagnostic") 2714 proto.RegisterType((*Diagnostic)(nil), "tfplugin5.Diagnostic")
2639 proto.RegisterType((*AttributePath)(nil), "tfplugin5.AttributePath") 2715 proto.RegisterType((*AttributePath)(nil), "tfplugin5.AttributePath")
@@ -2692,8 +2768,130 @@ func init() {
2692 proto.RegisterType((*ProvisionResource)(nil), "tfplugin5.ProvisionResource") 2768 proto.RegisterType((*ProvisionResource)(nil), "tfplugin5.ProvisionResource")
2693 proto.RegisterType((*ProvisionResource_Request)(nil), "tfplugin5.ProvisionResource.Request") 2769 proto.RegisterType((*ProvisionResource_Request)(nil), "tfplugin5.ProvisionResource.Request")
2694 proto.RegisterType((*ProvisionResource_Response)(nil), "tfplugin5.ProvisionResource.Response") 2770 proto.RegisterType((*ProvisionResource_Response)(nil), "tfplugin5.ProvisionResource.Response")
2695 proto.RegisterEnum("tfplugin5.Diagnostic_Severity", Diagnostic_Severity_name, Diagnostic_Severity_value) 2771}
2696 proto.RegisterEnum("tfplugin5.Schema_NestedBlock_NestingMode", Schema_NestedBlock_NestingMode_name, Schema_NestedBlock_NestingMode_value) 2772
2773func init() { proto.RegisterFile("tfplugin5.proto", fileDescriptor_17ae6090ff270234) }
2774
2775var fileDescriptor_17ae6090ff270234 = []byte{
2776 // 1880 bytes of a gzipped FileDescriptorProto
2777 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x59, 0xcb, 0x6f, 0x23, 0x49,
2778 0x19, 0x9f, 0xf6, 0x23, 0xb1, 0x3f, 0xe7, 0xe1, 0xd4, 0xcc, 0x0e, 0xa6, 0x77, 0x17, 0x82, 0x79,
2779 0x24, 0xab, 0xdd, 0xf1, 0xac, 0x32, 0xb0, 0xbb, 0x84, 0xd1, 0x8a, 0x6c, 0x26, 0x64, 0x22, 0x66,
2780 0xb2, 0xa1, 0x3c, 0x0f, 0x24, 0xa4, 0xb5, 0x6a, 0xdc, 0x15, 0x4f, 0x33, 0x76, 0x77, 0x6f, 0x75,
2781 0x39, 0x89, 0x85, 0xc4, 0x05, 0xc1, 0x19, 0x09, 0xf1, 0x90, 0x78, 0x5c, 0x40, 0xe2, 0x1f, 0xe0,
2782 0x00, 0xdc, 0x38, 0xf1, 0x0f, 0x70, 0x03, 0x4e, 0x08, 0x6e, 0x9c, 0xe1, 0x82, 0x84, 0xea, 0xd5,
2783 0x5d, 0xb6, 0xdb, 0x4e, 0x4f, 0xb2, 0x23, 0xc4, 0xad, 0xab, 0xbe, 0x5f, 0x7d, 0xdf, 0x57, 0xdf,
2784 0xab, 0xbe, 0xcf, 0x86, 0x55, 0x7e, 0x1c, 0xf5, 0x87, 0x3d, 0x3f, 0xf8, 0x42, 0x2b, 0x62, 0x21,
2785 0x0f, 0x51, 0x35, 0xd9, 0x68, 0xde, 0x86, 0xa5, 0x3b, 0xa3, 0x80, 0x0c, 0xfc, 0xee, 0x23, 0xd2,
2786 0x1f, 0x52, 0xd4, 0x80, 0xc5, 0x41, 0xdc, 0x8b, 0x48, 0xf7, 0x59, 0xc3, 0x59, 0x77, 0x36, 0x97,
2787 0xb0, 0x59, 0x22, 0x04, 0xa5, 0x6f, 0xc6, 0x61, 0xd0, 0x28, 0xc8, 0x6d, 0xf9, 0xdd, 0xfc, 0x9b,
2788 0x03, 0x70, 0xc7, 0x27, 0xbd, 0x20, 0x8c, 0xb9, 0xdf, 0x45, 0xdb, 0x50, 0x89, 0xe9, 0x09, 0x65,
2789 0x3e, 0x1f, 0xc9, 0xd3, 0x2b, 0x5b, 0x9f, 0x68, 0xa5, 0xb2, 0x53, 0x60, 0xab, 0xad, 0x51, 0x38,
2790 0xc1, 0x0b, 0xc1, 0xf1, 0x70, 0x30, 0x20, 0x6c, 0x24, 0x25, 0x54, 0xb1, 0x59, 0xa2, 0xeb, 0xb0,
2791 0xe0, 0x51, 0x4e, 0xfc, 0x7e, 0xa3, 0x28, 0x09, 0x7a, 0x85, 0xde, 0x82, 0x2a, 0xe1, 0x9c, 0xf9,
2792 0x4f, 0x86, 0x9c, 0x36, 0x4a, 0xeb, 0xce, 0x66, 0x6d, 0xab, 0x61, 0x89, 0xdb, 0x31, 0xb4, 0x23,
2793 0xc2, 0x9f, 0xe2, 0x14, 0xda, 0xbc, 0x09, 0x15, 0x23, 0x1f, 0xd5, 0x60, 0xf1, 0xe0, 0xf0, 0xd1,
2794 0xce, 0xbd, 0x83, 0x3b, 0xf5, 0x2b, 0xa8, 0x0a, 0xe5, 0x3d, 0x8c, 0xdf, 0xc7, 0x75, 0x47, 0xec,
2795 0x3f, 0xde, 0xc1, 0x87, 0x07, 0x87, 0xfb, 0xf5, 0x42, 0xf3, 0x2f, 0x0e, 0x2c, 0x8f, 0x71, 0x43,
2796 0xb7, 0xa0, 0x1c, 0x73, 0x1a, 0xc5, 0x0d, 0x67, 0xbd, 0xb8, 0x59, 0xdb, 0x7a, 0x75, 0x96, 0xd8,
2797 0x56, 0x9b, 0xd3, 0x08, 0x2b, 0xac, 0xfb, 0x43, 0x07, 0x4a, 0x62, 0x8d, 0x36, 0x60, 0x25, 0xd1,
2798 0xa6, 0x13, 0x90, 0x01, 0x95, 0xc6, 0xaa, 0xde, 0xbd, 0x82, 0x97, 0x93, 0xfd, 0x43, 0x32, 0xa0,
2799 0xa8, 0x05, 0x88, 0xf6, 0xe9, 0x80, 0x06, 0xbc, 0xf3, 0x8c, 0x8e, 0x3a, 0x31, 0x67, 0x7e, 0xd0,
2800 0x53, 0xe6, 0xb9, 0x7b, 0x05, 0xd7, 0x35, 0xed, 0xab, 0x74, 0xd4, 0x96, 0x14, 0xb4, 0x09, 0xab,
2801 0x36, 0xde, 0x0f, 0xb8, 0x34, 0x59, 0x51, 0x70, 0x4e, 0xc1, 0x07, 0x01, 0x7f, 0x0f, 0x84, 0xa7,
2802 0xfa, 0xb4, 0xcb, 0x43, 0xd6, 0xbc, 0x25, 0xd4, 0x0a, 0x23, 0xb7, 0x0a, 0x8b, 0x98, 0x7e, 0x38,
2803 0xa4, 0x31, 0x77, 0xd7, 0xa1, 0x82, 0x69, 0x1c, 0x85, 0x41, 0x4c, 0xd1, 0x35, 0x28, 0xef, 0x31,
2804 0x16, 0x32, 0xa5, 0x24, 0x56, 0x8b, 0xe6, 0x8f, 0x1c, 0xa8, 0x60, 0x72, 0xda, 0xe6, 0x84, 0xd3,
2805 0x24, 0x34, 0x9c, 0x34, 0x34, 0xd0, 0x36, 0x2c, 0x1e, 0xf7, 0x09, 0x1f, 0x90, 0xa8, 0x51, 0x90,
2806 0x46, 0x5a, 0xb7, 0x8c, 0x64, 0x4e, 0xb6, 0xbe, 0xa2, 0x20, 0x7b, 0x01, 0x67, 0x23, 0x6c, 0x0e,
2807 0xb8, 0xdb, 0xb0, 0x64, 0x13, 0x50, 0x1d, 0x8a, 0xcf, 0xe8, 0x48, 0x2b, 0x20, 0x3e, 0x85, 0x52,
2808 0x27, 0x22, 0x5e, 0x75, 0xac, 0xa8, 0xc5, 0x76, 0xe1, 0x1d, 0xa7, 0xf9, 0x8f, 0x32, 0x2c, 0xb4,
2809 0xbb, 0x4f, 0xe9, 0x80, 0x88, 0x90, 0x3a, 0xa1, 0x2c, 0xf6, 0xb5, 0x66, 0x45, 0x6c, 0x96, 0xe8,
2810 0x06, 0x94, 0x9f, 0xf4, 0xc3, 0xee, 0x33, 0x79, 0xbc, 0xb6, 0xf5, 0x31, 0x4b, 0x35, 0x75, 0xb6,
2811 0xf5, 0x9e, 0x20, 0x63, 0x85, 0x72, 0x7f, 0xe1, 0x40, 0x59, 0x6e, 0xcc, 0x61, 0xf9, 0x25, 0x80,
2812 0xc4, 0x79, 0xb1, 0xbe, 0xf2, 0xcb, 0xd3, 0x7c, 0x93, 0xf0, 0xc0, 0x16, 0x1c, 0xbd, 0x0b, 0x35,
2813 0x29, 0xa9, 0xc3, 0x47, 0x11, 0x8d, 0x1b, 0xc5, 0xa9, 0xa8, 0xd2, 0xa7, 0x0f, 0x69, 0xcc, 0xa9,
2814 0xa7, 0x74, 0x03, 0x79, 0xe2, 0x81, 0x38, 0xe0, 0xfe, 0xd1, 0x81, 0x6a, 0xc2, 0x59, 0xb8, 0x23,
2815 0x8d, 0x2a, 0x2c, 0xbf, 0xc5, 0x9e, 0xe0, 0x6d, 0xb2, 0x57, 0x7c, 0xa3, 0x75, 0xa8, 0x79, 0x34,
2816 0xee, 0x32, 0x3f, 0xe2, 0xe2, 0x42, 0x2a, 0xbb, 0xec, 0x2d, 0xe4, 0x42, 0x85, 0xd1, 0x0f, 0x87,
2817 0x3e, 0xa3, 0x9e, 0xcc, 0xb0, 0x0a, 0x4e, 0xd6, 0x82, 0x16, 0x4a, 0x14, 0xe9, 0x37, 0xca, 0x8a,
2818 0x66, 0xd6, 0x82, 0xd6, 0x0d, 0x07, 0xd1, 0x90, 0x53, 0xaf, 0xb1, 0xa0, 0x68, 0x66, 0x8d, 0x5e,
2819 0x81, 0x6a, 0x4c, 0x83, 0xd8, 0xe7, 0xfe, 0x09, 0x6d, 0x2c, 0x4a, 0x62, 0xba, 0xe1, 0xfe, 0xba,
2820 0x00, 0x35, 0xeb, 0x96, 0xe8, 0x65, 0xa8, 0x0a, 0x5d, 0xad, 0x34, 0xc1, 0x15, 0xb1, 0x21, 0xf3,
2821 0xe3, 0xf9, 0xdc, 0x88, 0x76, 0x61, 0x31, 0xa0, 0x31, 0x17, 0x39, 0x54, 0x94, 0xd5, 0xe9, 0xb5,
2822 0xb9, 0x16, 0x96, 0xdf, 0x7e, 0xd0, 0xbb, 0x1f, 0x7a, 0x14, 0x9b, 0x93, 0x42, 0xa1, 0x81, 0x1f,
2823 0x74, 0x7c, 0x4e, 0x07, 0xb1, 0xb4, 0x49, 0x11, 0x57, 0x06, 0x7e, 0x70, 0x20, 0xd6, 0x92, 0x48,
2824 0xce, 0x34, 0xb1, 0xac, 0x89, 0xe4, 0x4c, 0x12, 0x9b, 0xf7, 0xd5, 0xcd, 0x34, 0xc7, 0xf1, 0xd2,
2825 0x03, 0xb0, 0xd0, 0x3e, 0x38, 0xdc, 0xbf, 0xb7, 0x57, 0x77, 0x50, 0x05, 0x4a, 0xf7, 0x0e, 0xda,
2826 0x0f, 0xea, 0x05, 0xb4, 0x08, 0xc5, 0xf6, 0xde, 0x83, 0x7a, 0x51, 0x7c, 0xdc, 0xdf, 0x39, 0xaa,
2827 0x97, 0x44, 0x89, 0xda, 0xc7, 0xef, 0x3f, 0x3c, 0xaa, 0x97, 0x9b, 0x3f, 0x29, 0xc1, 0xda, 0x3e,
2828 0xe5, 0x47, 0x2c, 0x3c, 0xf1, 0x3d, 0xca, 0x94, 0xfe, 0x76, 0x12, 0xff, 0xab, 0x68, 0x65, 0xf1,
2829 0x0d, 0xa8, 0x44, 0x1a, 0x29, 0xcd, 0x58, 0xdb, 0x5a, 0x9b, 0xba, 0x3c, 0x4e, 0x20, 0x88, 0x42,
2830 0x9d, 0xd1, 0x38, 0x1c, 0xb2, 0x2e, 0xed, 0xc4, 0x92, 0x68, 0x62, 0x7a, 0xdb, 0x3a, 0x36, 0x25,
2831 0xbe, 0x65, 0xe4, 0x89, 0x0f, 0x79, 0x5a, 0xed, 0xc7, 0x2a, 0xc1, 0x57, 0xd9, 0xf8, 0x2e, 0xea,
2832 0xc3, 0x55, 0x8f, 0x70, 0xd2, 0x99, 0x90, 0xa4, 0xe2, 0xff, 0x76, 0x3e, 0x49, 0x77, 0x08, 0x27,
2833 0xed, 0x69, 0x59, 0x6b, 0xde, 0xe4, 0x3e, 0x7a, 0x1b, 0x6a, 0x5e, 0xf2, 0x06, 0x09, 0xe7, 0x09,
2834 0x29, 0x2f, 0x65, 0xbe, 0x50, 0xd8, 0x46, 0xba, 0x0f, 0xe1, 0x5a, 0xd6, 0x7d, 0x32, 0xea, 0xd2,
2835 0x86, 0x5d, 0x97, 0x32, 0x6d, 0x9c, 0x96, 0x2a, 0xf7, 0x31, 0x5c, 0xcf, 0x56, 0xfe, 0x92, 0x8c,
2836 0x9b, 0x7f, 0x76, 0xe0, 0xa5, 0x23, 0x46, 0x23, 0xc2, 0xa8, 0xb1, 0xda, 0x6e, 0x18, 0x1c, 0xfb,
2837 0x3d, 0x77, 0x3b, 0x09, 0x0f, 0x74, 0x13, 0x16, 0xba, 0x72, 0x53, 0xc7, 0x83, 0x9d, 0x3d, 0x76,
2838 0x4b, 0x80, 0x35, 0xcc, 0xfd, 0xae, 0x63, 0xc5, 0xd3, 0x97, 0x61, 0x35, 0x52, 0x12, 0xbc, 0x4e,
2839 0x3e, 0x36, 0x2b, 0x06, 0xaf, 0x54, 0x99, 0xf4, 0x46, 0x21, 0xaf, 0x37, 0x9a, 0xdf, 0x2f, 0xc0,
2840 0xb5, 0x87, 0x51, 0x8f, 0x11, 0x8f, 0x26, 0x5e, 0x11, 0x8f, 0x89, 0xcb, 0xd2, 0xcb, 0xcd, 0x2d,
2841 0x1b, 0x56, 0x11, 0x2f, 0x8c, 0x17, 0xf1, 0x37, 0xa1, 0xca, 0xc8, 0x69, 0x27, 0x16, 0xec, 0x64,
2842 0x8d, 0xa8, 0x6d, 0x5d, 0xcd, 0x78, 0xb6, 0x70, 0x85, 0xe9, 0x2f, 0xf7, 0x3b, 0xb6, 0x51, 0xde,
2843 0x85, 0x95, 0xa1, 0x52, 0xcc, 0xd3, 0x3c, 0xce, 0xb1, 0xc9, 0xb2, 0x81, 0xab, 0x77, 0xf4, 0xc2,
2844 0x26, 0xf9, 0xbd, 0x03, 0xee, 0x23, 0xd2, 0xf7, 0x3d, 0xa1, 0x9c, 0xb6, 0x89, 0x78, 0x19, 0xb4,
2845 0xd7, 0x1f, 0xe7, 0x34, 0x4c, 0x1a, 0x12, 0x85, 0x7c, 0x21, 0xb1, 0x6b, 0x5d, 0x7e, 0x42, 0x79,
2846 0x27, 0xb7, 0xf2, 0xbf, 0x75, 0xa0, 0x61, 0x94, 0x4f, 0xf3, 0xe1, 0xff, 0x42, 0xf5, 0xdf, 0x39,
2847 0x50, 0x55, 0x8a, 0x0e, 0x19, 0x75, 0x7b, 0xa9, 0xae, 0xaf, 0xc3, 0x1a, 0xa7, 0x8c, 0x91, 0xe3,
2848 0x90, 0x0d, 0x3a, 0x76, 0xc7, 0x50, 0xc5, 0xf5, 0x84, 0xf0, 0x48, 0x47, 0xdd, 0xff, 0x46, 0xf7,
2849 0x5f, 0x15, 0x60, 0x09, 0x53, 0xe2, 0x99, 0x78, 0x71, 0xbf, 0x9d, 0xd3, 0xd4, 0xb7, 0x61, 0xb9,
2850 0x3b, 0x64, 0x4c, 0x74, 0x99, 0x2a, 0xc8, 0xcf, 0xd1, 0x7a, 0x49, 0xa3, 0x55, 0x8c, 0x37, 0x60,
2851 0x31, 0x62, 0xfe, 0x89, 0x49, 0xb0, 0x25, 0x6c, 0x96, 0xee, 0x0f, 0xec, 0x54, 0xfa, 0x3c, 0x54,
2852 0x03, 0x7a, 0x9a, 0x2f, 0x8b, 0x2a, 0x01, 0x3d, 0xbd, 0x5c, 0x02, 0xcd, 0xd6, 0xaa, 0xf9, 0x9b,
2853 0x12, 0xa0, 0xa3, 0x3e, 0x09, 0x8c, 0x99, 0x76, 0x9f, 0x92, 0xa0, 0x47, 0xdd, 0xff, 0x38, 0x39,
2854 0xad, 0xf5, 0x0e, 0xd4, 0x22, 0xe6, 0x87, 0x2c, 0x9f, 0xad, 0x40, 0x62, 0xd5, 0x65, 0xf6, 0x00,
2855 0x45, 0x2c, 0x8c, 0xc2, 0x98, 0x7a, 0x9d, 0xd4, 0x16, 0xc5, 0xf9, 0x0c, 0xea, 0xe6, 0xc8, 0xa1,
2856 0xb1, 0x49, 0x1a, 0x5d, 0xa5, 0x5c, 0xd1, 0x85, 0x3e, 0x0d, 0xcb, 0x4a, 0x63, 0x63, 0x91, 0xb2,
2857 0xb4, 0xc8, 0x92, 0xdc, 0x3c, 0xd2, 0xce, 0xfa, 0x79, 0xc1, 0x72, 0xd6, 0x6d, 0x58, 0x8e, 0xfa,
2858 0x24, 0x08, 0xf2, 0x96, 0xbd, 0x25, 0x8d, 0x56, 0x0a, 0xee, 0x8a, 0x5e, 0x43, 0x36, 0x95, 0x71,
2859 0x87, 0xd1, 0xa8, 0x4f, 0xba, 0x54, 0x7b, 0x6e, 0xf6, 0x38, 0xb7, 0x6a, 0x4e, 0x60, 0x75, 0x00,
2860 0x6d, 0xc0, 0xaa, 0x51, 0x61, 0xdc, 0x91, 0x2b, 0x7a, 0x5b, 0x2b, 0x7e, 0xe1, 0x26, 0x00, 0xbd,
2861 0x01, 0xa8, 0x4f, 0x7b, 0xa4, 0x3b, 0x92, 0x4d, 0x7a, 0x27, 0x1e, 0xc5, 0x9c, 0x0e, 0x74, 0xe7,
2862 0x5b, 0x57, 0x14, 0x51, 0x72, 0xdb, 0x72, 0xbf, 0xf9, 0xa7, 0x22, 0x5c, 0xdd, 0x89, 0xa2, 0xfe,
2863 0x68, 0x22, 0x6e, 0xfe, 0xfd, 0xe2, 0xe3, 0x66, 0xca, 0x1b, 0xc5, 0xe7, 0xf1, 0xc6, 0x73, 0x87,
2864 0x4b, 0x86, 0xe5, 0xcb, 0x59, 0x96, 0x77, 0xff, 0x70, 0xf9, 0xfc, 0xb6, 0xd2, 0xb4, 0x30, 0x96,
2865 0xa6, 0x93, 0x6e, 0x2d, 0x5e, 0xd2, 0xad, 0xa5, 0x19, 0x6e, 0xfd, 0x67, 0x01, 0xae, 0x1e, 0x0c,
2866 0xa2, 0x90, 0xf1, 0xf1, 0xd6, 0xe3, 0xad, 0x9c, 0x5e, 0x5d, 0x81, 0x82, 0xef, 0xe9, 0xa1, 0xb5,
2867 0xe0, 0x7b, 0xee, 0x19, 0xd4, 0x15, 0x3b, 0x9a, 0xd4, 0xe1, 0x73, 0x47, 0x9e, 0x5c, 0x01, 0xa1,
2868 0x50, 0x73, 0xaa, 0xed, 0x2f, 0x6d, 0x6f, 0x7c, 0x00, 0xc8, 0xd7, 0x6a, 0x74, 0x4c, 0x8f, 0x6e,
2869 0xde, 0x92, 0x9b, 0x96, 0x88, 0x8c, 0xab, 0xb7, 0x26, 0xf5, 0xc7, 0x6b, 0xfe, 0xc4, 0x4e, 0x7c,
2870 0xf1, 0xc6, 0xe6, 0xaf, 0x0e, 0xac, 0x88, 0x47, 0x2a, 0xed, 0x0b, 0x5e, 0x5c, 0x47, 0xc0, 0xc6,
2871 0xc6, 0xa5, 0x72, 0xae, 0xd0, 0xd4, 0x66, 0xbe, 0xf0, 0xfd, 0x7e, 0xea, 0xc0, 0x35, 0x33, 0xdb,
2872 0x88, 0x5e, 0x20, 0x6b, 0x8e, 0x3b, 0xb3, 0xf4, 0xba, 0x25, 0xaa, 0x42, 0x82, 0x9d, 0x3d, 0xc9,
2873 0xd9, 0xa8, 0x8b, 0x6b, 0xf7, 0x33, 0x07, 0x3e, 0x6e, 0x3a, 0x33, 0x4b, 0xc5, 0x8f, 0x60, 0x96,
2874 0xf8, 0x48, 0x3a, 0x98, 0xbf, 0x3b, 0xb0, 0x96, 0xa8, 0x95, 0xb4, 0x31, 0xf1, 0xc5, 0xd5, 0x42,
2875 0x6f, 0x03, 0x74, 0xc3, 0x20, 0xa0, 0x5d, 0x6e, 0x86, 0x83, 0x79, 0x35, 0x37, 0x85, 0xba, 0xdf,
2876 0xb0, 0xee, 0x73, 0x1d, 0x16, 0xc2, 0x21, 0x8f, 0x86, 0x5c, 0x87, 0xa4, 0x5e, 0x5d, 0xd8, 0x0d,
2877 0x5b, 0x3f, 0xae, 0x42, 0xc5, 0xcc, 0x71, 0xe8, 0xeb, 0x50, 0xdd, 0xa7, 0x5c, 0xff, 0xc2, 0xf5,
2878 0x99, 0x73, 0x46, 0x64, 0x15, 0x40, 0x9f, 0xcd, 0x35, 0x48, 0xa3, 0xfe, 0x8c, 0xa1, 0x11, 0x6d,
2879 0x5a, 0xe7, 0x33, 0x11, 0x89, 0xa4, 0xd7, 0x72, 0x20, 0xb5, 0xb4, 0x6f, 0xcd, 0x9b, 0x58, 0xd0,
2880 0x0d, 0x8b, 0xd1, 0x6c, 0x58, 0x22, 0xb7, 0x95, 0x17, 0xae, 0x85, 0x0f, 0x67, 0x4f, 0x1c, 0xe8,
2881 0xf5, 0x0c, 0x5e, 0x93, 0xa0, 0x44, 0xf0, 0x1b, 0xf9, 0xc0, 0x5a, 0xac, 0x9f, 0x3d, 0xb8, 0xa2,
2882 0x0d, 0x8b, 0x4b, 0x16, 0x20, 0x11, 0xb7, 0x79, 0x3e, 0x50, 0x8b, 0xba, 0x6b, 0x0d, 0x26, 0xe8,
2883 0x15, 0xeb, 0x58, 0xb2, 0x9b, 0x30, 0x7d, 0x75, 0x06, 0x55, 0x73, 0xfa, 0xda, 0xf8, 0x98, 0x80,
2884 0x3e, 0x69, 0x0f, 0xc4, 0x16, 0x21, 0xe1, 0xb7, 0x3e, 0x1b, 0xa0, 0x59, 0x76, 0xb3, 0x5a, 0x6a,
2885 0x64, 0x87, 0xe9, 0x34, 0x39, 0x61, 0xff, 0xb9, 0xf3, 0x60, 0x5a, 0xc8, 0x71, 0x66, 0x03, 0x86,
2886 0xec, 0xe3, 0x19, 0xf4, 0x44, 0xcc, 0xc6, 0xb9, 0xb8, 0x54, 0x4e, 0xc6, 0xb3, 0x38, 0x26, 0x27,
2887 0xeb, 0xd9, 0xcc, 0x92, 0x93, 0x8d, 0xd3, 0x72, 0x1e, 0x4f, 0xbe, 0x84, 0xe8, 0x53, 0x13, 0x86,
2888 0x4e, 0x49, 0x09, 0xf7, 0xe6, 0x3c, 0x88, 0x66, 0xfc, 0x45, 0xf5, 0xfb, 0x3f, 0x1a, 0xfb, 0xf9,
2889 0x94, 0x87, 0x51, 0xc2, 0xa4, 0x31, 0x4d, 0x50, 0x47, 0xb7, 0xbe, 0x57, 0x84, 0x9a, 0xf5, 0x30,
2890 0xa0, 0x0f, 0xec, 0xe2, 0xb4, 0x91, 0x51, 0x76, 0xec, 0x37, 0x2e, 0x33, 0xaa, 0x67, 0x00, 0xb5,
2891 0xaa, 0x67, 0x73, 0xde, 0x23, 0x94, 0x95, 0x8b, 0x53, 0xa8, 0x44, 0xe8, 0x8d, 0x9c, 0x68, 0x2d,
2892 0xf9, 0x49, 0xc6, 0x53, 0x33, 0x56, 0x7e, 0xa7, 0xa8, 0x99, 0xe5, 0x37, 0x0b, 0xa5, 0x24, 0xbc,
2893 0xe9, 0x5c, 0xc2, 0x11, 0x4f, 0x16, 0xe4, 0x1f, 0x7b, 0xb7, 0xfe, 0x1b, 0x00, 0x00, 0xff, 0xff,
2894 0x8a, 0x61, 0xfa, 0xcc, 0xeb, 0x1b, 0x00, 0x00,
2697} 2895}
2698 2896
2699// Reference imports to suppress errors if they are not otherwise used. 2897// Reference imports to suppress errors if they are not otherwise used.
@@ -3329,127 +3527,3 @@ var _Provisioner_serviceDesc = grpc.ServiceDesc{
3329 }, 3527 },
3330 Metadata: "tfplugin5.proto", 3528 Metadata: "tfplugin5.proto",
3331} 3529}
3332
3333func init() { proto.RegisterFile("tfplugin5.proto", fileDescriptor_tfplugin5_56820f4fb67360c5) }
3334
3335var fileDescriptor_tfplugin5_56820f4fb67360c5 = []byte{
3336 // 1876 bytes of a gzipped FileDescriptorProto
3337 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x59, 0xcd, 0x6f, 0x23, 0x49,
3338 0x15, 0x9f, 0x76, 0xdb, 0x89, 0xfd, 0x9c, 0x0f, 0xa7, 0x66, 0x76, 0x30, 0xbd, 0xbb, 0x10, 0xcc,
3339 0x47, 0xb2, 0xda, 0x1d, 0xcf, 0x2a, 0x03, 0xbb, 0x4b, 0x18, 0xad, 0xc8, 0x66, 0x42, 0x26, 0x62,
3340 0x26, 0x1b, 0xca, 0xf3, 0x81, 0x84, 0xb4, 0x56, 0x8d, 0xbb, 0xe2, 0x69, 0xc6, 0xee, 0xee, 0xad,
3341 0x2e, 0x67, 0x62, 0x71, 0x44, 0x70, 0xe6, 0xc2, 0x87, 0xc4, 0xc7, 0x85, 0x03, 0xff, 0x00, 0x07,
3342 0xe0, 0xc6, 0x89, 0x7f, 0x80, 0x1b, 0x70, 0x42, 0x70, 0x43, 0x1c, 0xe1, 0x82, 0x84, 0xea, 0xab,
3343 0xbb, 0x6c, 0xb7, 0x93, 0x9e, 0x64, 0x57, 0x88, 0x5b, 0x57, 0xbd, 0x5f, 0xbd, 0xf7, 0xab, 0xf7,
3344 0x5e, 0xbd, 0x57, 0x65, 0xc3, 0x2a, 0x3f, 0x8e, 0x07, 0xa3, 0x7e, 0x10, 0x7e, 0xa9, 0x1d, 0xb3,
3345 0x88, 0x47, 0xa8, 0x96, 0x4e, 0xb4, 0x6e, 0xc3, 0xd2, 0x9d, 0x71, 0x48, 0x86, 0x41, 0xef, 0x11,
3346 0x19, 0x8c, 0x28, 0x6a, 0xc2, 0xe2, 0x30, 0xe9, 0xc7, 0xa4, 0xf7, 0xac, 0xe9, 0xac, 0x3b, 0x9b,
3347 0x4b, 0xd8, 0x0c, 0x11, 0x82, 0xf2, 0xb7, 0x93, 0x28, 0x6c, 0x96, 0xe4, 0xb4, 0xfc, 0x6e, 0xfd,
3348 0xd5, 0x01, 0xb8, 0x13, 0x90, 0x7e, 0x18, 0x25, 0x3c, 0xe8, 0xa1, 0x6d, 0xa8, 0x26, 0xf4, 0x84,
3349 0xb2, 0x80, 0x8f, 0xe5, 0xea, 0x95, 0xad, 0x4f, 0xb5, 0x33, 0xdb, 0x19, 0xb0, 0xdd, 0xd1, 0x28,
3350 0x9c, 0xe2, 0x85, 0xe1, 0x64, 0x34, 0x1c, 0x12, 0x36, 0x96, 0x16, 0x6a, 0xd8, 0x0c, 0xd1, 0x75,
3351 0x58, 0xf0, 0x29, 0x27, 0xc1, 0xa0, 0xe9, 0x4a, 0x81, 0x1e, 0xa1, 0xb7, 0xa0, 0x46, 0x38, 0x67,
3352 0xc1, 0x93, 0x11, 0xa7, 0xcd, 0xf2, 0xba, 0xb3, 0x59, 0xdf, 0x6a, 0x5a, 0xe6, 0x76, 0x8c, 0xec,
3353 0x88, 0xf0, 0xa7, 0x38, 0x83, 0xb6, 0x6e, 0x42, 0xd5, 0xd8, 0x47, 0x75, 0x58, 0x3c, 0x38, 0x7c,
3354 0xb4, 0x73, 0xef, 0xe0, 0x4e, 0xe3, 0x0a, 0xaa, 0x41, 0x65, 0x0f, 0xe3, 0xf7, 0x71, 0xc3, 0x11,
3355 0xf3, 0x8f, 0x77, 0xf0, 0xe1, 0xc1, 0xe1, 0x7e, 0xa3, 0xd4, 0xfa, 0xb3, 0x03, 0xcb, 0x13, 0xda,
3356 0xd0, 0x2d, 0xa8, 0x24, 0x9c, 0xc6, 0x49, 0xd3, 0x59, 0x77, 0x37, 0xeb, 0x5b, 0xaf, 0xce, 0x33,
3357 0xdb, 0xee, 0x70, 0x1a, 0x63, 0x85, 0xf5, 0x7e, 0xe8, 0x40, 0x59, 0x8c, 0xd1, 0x06, 0xac, 0xa4,
3358 0x6c, 0xba, 0x21, 0x19, 0x52, 0xe9, 0xac, 0xda, 0xdd, 0x2b, 0x78, 0x39, 0x9d, 0x3f, 0x24, 0x43,
3359 0x8a, 0xda, 0x80, 0xe8, 0x80, 0x0e, 0x69, 0xc8, 0xbb, 0xcf, 0xe8, 0xb8, 0x9b, 0x70, 0x16, 0x84,
3360 0x7d, 0xe5, 0x9e, 0xbb, 0x57, 0x70, 0x43, 0xcb, 0xbe, 0x4e, 0xc7, 0x1d, 0x29, 0x41, 0x9b, 0xb0,
3361 0x6a, 0xe3, 0x83, 0x90, 0x4b, 0x97, 0xb9, 0x42, 0x73, 0x06, 0x3e, 0x08, 0xf9, 0x7b, 0x20, 0x22,
3362 0x35, 0xa0, 0x3d, 0x1e, 0xb1, 0xd6, 0x2d, 0x41, 0x2b, 0x8a, 0xbd, 0x1a, 0x2c, 0x62, 0xfa, 0xe1,
3363 0x88, 0x26, 0xdc, 0x5b, 0x87, 0x2a, 0xa6, 0x49, 0x1c, 0x85, 0x09, 0x45, 0xd7, 0xa0, 0xb2, 0xc7,
3364 0x58, 0xc4, 0x14, 0x49, 0xac, 0x06, 0xad, 0x1f, 0x39, 0x50, 0xc5, 0xe4, 0x79, 0x87, 0x13, 0x4e,
3365 0xd3, 0xd4, 0x70, 0xb2, 0xd4, 0x40, 0xdb, 0xb0, 0x78, 0x3c, 0x20, 0x7c, 0x48, 0xe2, 0x66, 0x49,
3366 0x3a, 0x69, 0xdd, 0x72, 0x92, 0x59, 0xd9, 0xfe, 0x9a, 0x82, 0xec, 0x85, 0x9c, 0x8d, 0xb1, 0x59,
3367 0xe0, 0x6d, 0xc3, 0x92, 0x2d, 0x40, 0x0d, 0x70, 0x9f, 0xd1, 0xb1, 0x26, 0x20, 0x3e, 0x05, 0xa9,
3368 0x13, 0x91, 0xaf, 0x3a, 0x57, 0xd4, 0x60, 0xbb, 0xf4, 0x8e, 0xd3, 0xfa, 0x7b, 0x05, 0x16, 0x3a,
3369 0xbd, 0xa7, 0x74, 0x48, 0x44, 0x4a, 0x9d, 0x50, 0x96, 0x04, 0x9a, 0x99, 0x8b, 0xcd, 0x10, 0xdd,
3370 0x80, 0xca, 0x93, 0x41, 0xd4, 0x7b, 0x26, 0x97, 0xd7, 0xb7, 0x3e, 0x61, 0x51, 0x53, 0x6b, 0xdb,
3371 0xef, 0x09, 0x31, 0x56, 0x28, 0xef, 0x17, 0x0e, 0x54, 0xe4, 0xc4, 0x19, 0x2a, 0xbf, 0x02, 0x90,
3372 0x06, 0x2f, 0xd1, 0x5b, 0x7e, 0x79, 0x56, 0x6f, 0x9a, 0x1e, 0xd8, 0x82, 0xa3, 0x77, 0xa1, 0x2e,
3373 0x2d, 0x75, 0xf9, 0x38, 0xa6, 0x49, 0xd3, 0x9d, 0xc9, 0x2a, 0xbd, 0xfa, 0x90, 0x26, 0x9c, 0xfa,
3374 0x8a, 0x1b, 0xc8, 0x15, 0x0f, 0xc4, 0x02, 0xef, 0x0f, 0x0e, 0xd4, 0x52, 0xcd, 0x22, 0x1c, 0x59,
3375 0x56, 0x61, 0xf9, 0x2d, 0xe6, 0x84, 0x6e, 0x73, 0x7a, 0xc5, 0x37, 0x5a, 0x87, 0xba, 0x4f, 0x93,
3376 0x1e, 0x0b, 0x62, 0x2e, 0x36, 0xa4, 0x4e, 0x97, 0x3d, 0x85, 0x3c, 0xa8, 0x32, 0xfa, 0xe1, 0x28,
3377 0x60, 0xd4, 0x97, 0x27, 0xac, 0x8a, 0xd3, 0xb1, 0x90, 0x45, 0x12, 0x45, 0x06, 0xcd, 0x8a, 0x92,
3378 0x99, 0xb1, 0x90, 0xf5, 0xa2, 0x61, 0x3c, 0xe2, 0xd4, 0x6f, 0x2e, 0x28, 0x99, 0x19, 0xa3, 0x57,
3379 0xa0, 0x96, 0xd0, 0x30, 0x09, 0x78, 0x70, 0x42, 0x9b, 0x8b, 0x52, 0x98, 0x4d, 0x78, 0xbf, 0x2a,
3380 0x41, 0xdd, 0xda, 0x25, 0x7a, 0x19, 0x6a, 0x82, 0xab, 0x75, 0x4c, 0x70, 0x55, 0x4c, 0xc8, 0xf3,
3381 0xf1, 0x62, 0x61, 0x44, 0xbb, 0xb0, 0x18, 0xd2, 0x84, 0x8b, 0x33, 0xe4, 0xca, 0xea, 0xf4, 0xda,
3382 0x99, 0x1e, 0x96, 0xdf, 0x41, 0xd8, 0xbf, 0x1f, 0xf9, 0x14, 0x9b, 0x95, 0x82, 0xd0, 0x30, 0x08,
3383 0xbb, 0x01, 0xa7, 0xc3, 0x44, 0xfa, 0xc4, 0xc5, 0xd5, 0x61, 0x10, 0x1e, 0x88, 0xb1, 0x14, 0x92,
3384 0x53, 0x2d, 0xac, 0x68, 0x21, 0x39, 0x95, 0xc2, 0xd6, 0x7d, 0xb5, 0x33, 0xad, 0x71, 0xb2, 0xf4,
3385 0x00, 0x2c, 0x74, 0x0e, 0x0e, 0xf7, 0xef, 0xed, 0x35, 0x1c, 0x54, 0x85, 0xf2, 0xbd, 0x83, 0xce,
3386 0x83, 0x46, 0x09, 0x2d, 0x82, 0xdb, 0xd9, 0x7b, 0xd0, 0x70, 0xc5, 0xc7, 0xfd, 0x9d, 0xa3, 0x46,
3387 0x59, 0x94, 0xa8, 0x7d, 0xfc, 0xfe, 0xc3, 0xa3, 0x46, 0xa5, 0xf5, 0x93, 0x32, 0xac, 0xed, 0x53,
3388 0x7e, 0xc4, 0xa2, 0x93, 0xc0, 0xa7, 0x4c, 0xf1, 0xb7, 0x0f, 0xf1, 0xbf, 0x5c, 0xeb, 0x14, 0xdf,
3389 0x80, 0x6a, 0xac, 0x91, 0xd2, 0x8d, 0xf5, 0xad, 0xb5, 0x99, 0xcd, 0xe3, 0x14, 0x82, 0x28, 0x34,
3390 0x18, 0x4d, 0xa2, 0x11, 0xeb, 0xd1, 0x6e, 0x22, 0x85, 0x26, 0xa7, 0xb7, 0xad, 0x65, 0x33, 0xe6,
3391 0xdb, 0xc6, 0x9e, 0xf8, 0x90, 0xab, 0xd5, 0x7c, 0xa2, 0x0e, 0xf8, 0x2a, 0x9b, 0x9c, 0x45, 0x03,
3392 0xb8, 0xea, 0x13, 0x4e, 0xba, 0x53, 0x96, 0x54, 0xfe, 0xdf, 0x2e, 0x66, 0xe9, 0x0e, 0xe1, 0xa4,
3393 0x33, 0x6b, 0x6b, 0xcd, 0x9f, 0x9e, 0x47, 0x6f, 0x43, 0xdd, 0x4f, 0x7b, 0x90, 0x08, 0x9e, 0xb0,
3394 0xf2, 0x52, 0x6e, 0x87, 0xc2, 0x36, 0xd2, 0x7b, 0x08, 0xd7, 0xf2, 0xf6, 0x93, 0x53, 0x97, 0x36,
3395 0xec, 0xba, 0x94, 0xeb, 0xe3, 0xac, 0x54, 0x79, 0x8f, 0xe1, 0x7a, 0x3e, 0xf9, 0x4b, 0x2a, 0x6e,
3396 0xfd, 0xc9, 0x81, 0x97, 0x8e, 0x18, 0x8d, 0x09, 0xa3, 0xc6, 0x6b, 0xbb, 0x51, 0x78, 0x1c, 0xf4,
3397 0xbd, 0xed, 0x34, 0x3d, 0xd0, 0x4d, 0x58, 0xe8, 0xc9, 0x49, 0x9d, 0x0f, 0xf6, 0xe9, 0xb1, 0xaf,
3398 0x04, 0x58, 0xc3, 0xbc, 0xef, 0x39, 0x56, 0x3e, 0x7d, 0x15, 0x56, 0x63, 0x65, 0xc1, 0xef, 0x16,
3399 0x53, 0xb3, 0x62, 0xf0, 0x8a, 0xca, 0x74, 0x34, 0x4a, 0x45, 0xa3, 0xd1, 0xfa, 0x41, 0x09, 0xae,
3400 0x3d, 0x8c, 0xfb, 0x8c, 0xf8, 0x34, 0x8d, 0x8a, 0x68, 0x26, 0x1e, 0xcb, 0x36, 0x77, 0x66, 0xd9,
3401 0xb0, 0x8a, 0x78, 0x69, 0xb2, 0x88, 0xbf, 0x09, 0x35, 0x46, 0x9e, 0x77, 0x13, 0xa1, 0x4e, 0xd6,
3402 0x88, 0xfa, 0xd6, 0xd5, 0x9c, 0xb6, 0x85, 0xab, 0x4c, 0x7f, 0x79, 0xdf, 0xb5, 0x9d, 0xf2, 0x2e,
3403 0xac, 0x8c, 0x14, 0x31, 0x5f, 0xeb, 0x38, 0xc7, 0x27, 0xcb, 0x06, 0xae, 0xfa, 0xe8, 0x85, 0x5d,
3404 0xf2, 0x3b, 0x07, 0xbc, 0x47, 0x64, 0x10, 0xf8, 0x82, 0x9c, 0xf6, 0x89, 0xe8, 0x0c, 0x3a, 0xea,
3405 0x8f, 0x0b, 0x3a, 0x26, 0x4b, 0x89, 0x52, 0xb1, 0x94, 0xd8, 0xb5, 0x36, 0x3f, 0x45, 0xde, 0x29,
3406 0x4c, 0xfe, 0x37, 0x0e, 0x34, 0x0d, 0xf9, 0xec, 0x3c, 0xfc, 0x5f, 0x50, 0xff, 0xad, 0x03, 0x35,
3407 0x45, 0x74, 0xc4, 0xa8, 0xd7, 0xcf, 0xb8, 0xbe, 0x0e, 0x6b, 0x9c, 0x32, 0x46, 0x8e, 0x23, 0x36,
3408 0xec, 0xda, 0x37, 0x86, 0x1a, 0x6e, 0xa4, 0x82, 0x47, 0x3a, 0xeb, 0xfe, 0x37, 0xdc, 0xff, 0xe9,
3409 0xc0, 0x12, 0xa6, 0xc4, 0x37, 0xf9, 0xe2, 0xf9, 0x05, 0x5d, 0x7d, 0x1b, 0x96, 0x7b, 0x23, 0xc6,
3410 0xc4, 0x2d, 0x53, 0x25, 0xf9, 0x39, 0xac, 0x97, 0x34, 0x5a, 0x1d, 0x98, 0xb1, 0xc5, 0xfd, 0x8b,
3411 0x50, 0x0b, 0xe9, 0xf3, 0x62, 0x47, 0xa5, 0x1a, 0xd2, 0xe7, 0x97, 0x3c, 0x25, 0xbf, 0x2e, 0x03,
3412 0x3a, 0x1a, 0x90, 0xd0, 0xec, 0x78, 0xf7, 0x29, 0x09, 0xfb, 0xd4, 0xfb, 0x8f, 0x53, 0x70, 0xe3,
3413 0xef, 0x40, 0x3d, 0x66, 0x41, 0xc4, 0x8a, 0x6d, 0x1b, 0x24, 0x56, 0x51, 0xde, 0x03, 0x14, 0xb3,
3414 0x28, 0x8e, 0x12, 0xea, 0x77, 0xb3, 0x1d, 0xbb, 0x67, 0x2b, 0x68, 0x98, 0x25, 0x87, 0x66, 0xe7,
3415 0x59, 0xa2, 0x94, 0x0b, 0x25, 0x0a, 0xfa, 0x2c, 0x2c, 0x2b, 0xc6, 0x31, 0x0b, 0x4e, 0x84, 0xc9,
3416 0x8a, 0xbc, 0xfe, 0x2d, 0xc9, 0xc9, 0x23, 0x35, 0xe7, 0xfd, 0xbc, 0x64, 0x85, 0xe4, 0x36, 0x2c,
3417 0xc7, 0x03, 0x12, 0x86, 0x45, 0x2b, 0xd8, 0x92, 0x46, 0x2b, 0x82, 0xbb, 0xe2, 0xda, 0x20, 0xef,
3418 0x87, 0x49, 0x97, 0xd1, 0x78, 0x40, 0x7a, 0x54, 0xc7, 0x67, 0xfe, 0xcb, 0x6c, 0xd5, 0xac, 0xc0,
3419 0x6a, 0x01, 0xda, 0x80, 0x55, 0x43, 0xc1, 0xd0, 0x76, 0x25, 0xed, 0x15, 0x3d, 0xad, 0x89, 0x5f,
3420 0xb8, 0x9f, 0xa3, 0x37, 0x00, 0x0d, 0x68, 0x9f, 0xf4, 0xc6, 0xf2, 0xbe, 0xdd, 0x4d, 0xc6, 0x09,
3421 0xa7, 0x43, 0x7d, 0x89, 0x6d, 0x28, 0x89, 0xa8, 0x9e, 0x1d, 0x39, 0xdf, 0xfa, 0xa3, 0x0b, 0x57,
3422 0x77, 0xe2, 0x78, 0x30, 0x9e, 0xca, 0x9b, 0x7f, 0x7f, 0xfc, 0x79, 0x33, 0x13, 0x0d, 0xf7, 0x45,
3423 0xa2, 0xf1, 0xc2, 0xe9, 0x92, 0xe3, 0xf9, 0x4a, 0x9e, 0xe7, 0xbd, 0xdf, 0x3b, 0x97, 0x3e, 0xc5,
3424 0x4d, 0x58, 0x34, 0x36, 0xd4, 0x9b, 0xc4, 0x0c, 0xa7, 0xc3, 0xea, 0x5e, 0x32, 0xac, 0xe5, 0x39,
3425 0x61, 0xfd, 0x47, 0x09, 0xae, 0x1e, 0x0c, 0xe3, 0x88, 0xf1, 0xc9, 0x5b, 0xc4, 0x5b, 0x05, 0xa3,
3426 0xba, 0x02, 0xa5, 0xc0, 0xd7, 0xef, 0xcf, 0x52, 0xe0, 0x7b, 0xa7, 0xd0, 0x50, 0xea, 0x68, 0x5a,
3427 0x52, 0xcf, 0x7d, 0xbd, 0x14, 0x4a, 0x08, 0x85, 0xb2, 0x1d, 0xe6, 0x4e, 0x38, 0xcc, 0xfb, 0xa5,
3428 0x1d, 0x8d, 0x0f, 0x00, 0x05, 0x9a, 0x46, 0xd7, 0x5c, 0xb7, 0x4d, 0x5b, 0xb8, 0x69, 0x99, 0xc8,
3429 0xd9, 0x7a, 0x7b, 0x9a, 0x3f, 0x5e, 0x0b, 0xa6, 0x66, 0x92, 0x8b, 0x57, 0xdf, 0xbf, 0x38, 0xb0,
3430 0x22, 0xfa, 0x4d, 0xd6, 0xe2, 0x3f, 0xbe, 0xe6, 0xce, 0x26, 0x5e, 0x3e, 0x95, 0x42, 0xa9, 0xa9,
3431 0xdd, 0x7c, 0xe1, 0xfd, 0xfd, 0xd4, 0x81, 0x6b, 0xe6, 0x99, 0x22, 0xda, 0x7a, 0xde, 0x93, 0xec,
3432 0xd4, 0xe2, 0x75, 0x4b, 0x54, 0x85, 0x14, 0x3b, 0xff, 0x51, 0x66, 0xa3, 0x2e, 0xce, 0xee, 0x67,
3433 0x0e, 0x7c, 0xd2, 0x5c, 0xb2, 0x2c, 0x8a, 0x1f, 0xc1, 0xb3, 0xe0, 0x23, 0xb9, 0x8c, 0xfc, 0xcd,
3434 0x81, 0xb5, 0x94, 0x56, 0x7a, 0x23, 0x49, 0x2e, 0x4e, 0x0b, 0xbd, 0x0d, 0xd0, 0x8b, 0xc2, 0x90,
3435 0xf6, 0xb8, 0xb9, 0xe7, 0x9f, 0x55, 0x73, 0x33, 0xa8, 0xf7, 0x2d, 0x6b, 0x3f, 0xd7, 0x61, 0x21,
3436 0x1a, 0xf1, 0x78, 0xc4, 0x75, 0x4a, 0xea, 0xd1, 0x85, 0xc3, 0xb0, 0xf5, 0xe3, 0x1a, 0x54, 0xcd,
3437 0x93, 0x0c, 0x7d, 0x13, 0x6a, 0xfb, 0x94, 0xeb, 0x1f, 0xab, 0x3e, 0x77, 0xce, 0x6b, 0x57, 0x25,
3438 0xd0, 0xe7, 0x0b, 0xbd, 0x89, 0xd1, 0x60, 0xce, 0xfb, 0x0f, 0x6d, 0x5a, 0xeb, 0x73, 0x11, 0xa9,
3439 0xa5, 0xd7, 0x0a, 0x20, 0xb5, 0xb5, 0xef, 0x9c, 0xf5, 0xf8, 0x40, 0x37, 0x2c, 0x45, 0xf3, 0x61,
3440 0xa9, 0xdd, 0x76, 0x51, 0xb8, 0x36, 0x3e, 0x9a, 0xff, 0x78, 0x40, 0xaf, 0xe7, 0xe8, 0x9a, 0x06,
3441 0xa5, 0x86, 0xdf, 0x28, 0x06, 0xd6, 0x66, 0x83, 0xfc, 0x37, 0x28, 0xda, 0xb0, 0xb4, 0xe4, 0x01,
3442 0x52, 0x73, 0x9b, 0xe7, 0x03, 0xb5, 0xa9, 0xbb, 0xd6, 0x1b, 0x03, 0xbd, 0x62, 0x2d, 0x4b, 0x67,
3443 0x53, 0xa5, 0xaf, 0xce, 0x91, 0x6a, 0x4d, 0xdf, 0x98, 0xbc, 0xf1, 0xa3, 0x4f, 0xdb, 0x6f, 0x5b,
3444 0x4b, 0x90, 0xea, 0x5b, 0x9f, 0x0f, 0xd0, 0x2a, 0x7b, 0x79, 0x57, 0x6a, 0x64, 0xa7, 0xe9, 0xac,
3445 0x38, 0x55, 0xff, 0x85, 0xf3, 0x60, 0xda, 0xc8, 0x71, 0xee, 0x05, 0x0c, 0xd9, 0xcb, 0x73, 0xe4,
3446 0xa9, 0x99, 0x8d, 0x73, 0x71, 0x99, 0x9d, 0x9c, 0xb6, 0x38, 0x61, 0x27, 0xaf, 0x6d, 0xe6, 0xd9,
3447 0xc9, 0xc7, 0x69, 0x3b, 0x8f, 0xa7, 0x3b, 0x21, 0xfa, 0xcc, 0x94, 0xa3, 0x33, 0x51, 0xaa, 0xbd,
3448 0x75, 0x16, 0x44, 0x2b, 0xfe, 0xb2, 0xfa, 0x29, 0x1f, 0x4d, 0xfc, 0x12, 0xca, 0xa3, 0x38, 0x55,
3449 0xd2, 0x9c, 0x15, 0xa8, 0xa5, 0x5b, 0xdf, 0x77, 0xa1, 0x6e, 0x35, 0x06, 0xf4, 0x81, 0x5d, 0x9c,
3450 0x36, 0x72, 0xca, 0x8e, 0xdd, 0xe3, 0x72, 0xb3, 0x7a, 0x0e, 0x50, 0x53, 0x3d, 0x3d, 0xa3, 0x1f,
3451 0xa1, 0xbc, 0xb3, 0x38, 0x83, 0x4a, 0x8d, 0xde, 0x28, 0x88, 0xd6, 0x96, 0x9f, 0xe4, 0xb4, 0x9a,
3452 0x89, 0xf2, 0x3b, 0x23, 0xcd, 0x2d, 0xbf, 0x79, 0x28, 0x65, 0xe1, 0x4d, 0xe7, 0x12, 0x81, 0x78,
3453 0xb2, 0x20, 0xff, 0xa3, 0xbb, 0xf5, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xc8, 0x16, 0x0b, 0x32,
3454 0xb6, 0x1b, 0x00, 0x00,
3455}
diff --git a/vendor/github.com/hashicorp/terraform/internal/tfplugin5/tfplugin5.proto b/vendor/github.com/hashicorp/terraform/internal/tfplugin5/tfplugin5.proto
deleted file mode 100644
index 370faf7..0000000
--- a/vendor/github.com/hashicorp/terraform/internal/tfplugin5/tfplugin5.proto
+++ /dev/null
@@ -1,351 +0,0 @@
1// Terraform Plugin RPC protocol version 5.0
2//
3// This file defines version 5.0 of the RPC protocol. To implement a plugin
4// against this protocol, copy this definition into your own codebase and
5// use protoc to generate stubs for your target language.
6//
7// This file will be updated in-place in the source Terraform repository for
8// any minor versions of protocol 5, but later minor versions will always be
9// backwards compatible. Breaking changes, if any are required, will come
10// in a subsequent major version with its own separate proto definition.
11//
12// Note that only the proto files included in a release tag of Terraform are
13// official protocol releases. Proto files taken from other commits may include
14// incomplete changes or features that did not make it into a final release.
15// In all reasonable cases, plugin developers should take the proto file from
16// the tag of the most recent release of Terraform, and not from the master
17// branch or any other development branch.
18//
19syntax = "proto3";
20
21package tfplugin5;
22
23// DynamicValue is an opaque encoding of terraform data, with the field name
24// indicating the encoding scheme used.
25message DynamicValue {
26 bytes msgpack = 1;
27 bytes json = 2;
28}
29
30message Diagnostic {
31 enum Severity {
32 INVALID = 0;
33 ERROR = 1;
34 WARNING = 2;
35 }
36 Severity severity = 1;
37 string summary = 2;
38 string detail = 3;
39 AttributePath attribute = 4;
40}
41
42message AttributePath {
43 message Step {
44 oneof selector {
45 // Set "attribute_name" to represent looking up an attribute
46 // in the current object value.
47 string attribute_name = 1;
48 // Set "element_key_*" to represent looking up an element in
49 // an indexable collection type.
50 string element_key_string = 2;
51 int64 element_key_int = 3;
52 }
53 }
54 repeated Step steps = 1;
55}
56
57message Stop {
58 message Request {
59 }
60 message Response {
61 string Error = 1;
62 }
63}
64
65// RawState holds the stored state for a resource to be upgraded by the
66// provider. It can be in one of two formats, the current json encoded format
67// in bytes, or the legacy flatmap format as a map of strings.
68message RawState {
69 bytes json = 1;
70 map<string, string> flatmap = 2;
71}
72
73// Schema is the configuration schema for a Resource, Provider, or Provisioner.
74message Schema {
75 message Block {
76 int64 version = 1;
77 repeated Attribute attributes = 2;
78 repeated NestedBlock block_types = 3;
79 }
80
81 message Attribute {
82 string name = 1;
83 bytes type = 2;
84 string description = 3;
85 bool required = 4;
86 bool optional = 5;
87 bool computed = 6;
88 bool sensitive = 7;
89 }
90
91 message NestedBlock {
92 enum NestingMode {
93 INVALID = 0;
94 SINGLE = 1;
95 LIST = 2;
96 SET = 3;
97 MAP = 4;
98 GROUP = 5;
99 }
100
101 string type_name = 1;
102 Block block = 2;
103 NestingMode nesting = 3;
104 int64 min_items = 4;
105 int64 max_items = 5;
106 }
107
108 // The version of the schema.
109 // Schemas are versioned, so that providers can upgrade a saved resource
110 // state when the schema is changed.
111 int64 version = 1;
112
113 // Block is the top level configuration block for this schema.
114 Block block = 2;
115}
116
117service Provider {
118 //////// Information about what a provider supports/expects
119 rpc GetSchema(GetProviderSchema.Request) returns (GetProviderSchema.Response);
120 rpc PrepareProviderConfig(PrepareProviderConfig.Request) returns (PrepareProviderConfig.Response);
121 rpc ValidateResourceTypeConfig(ValidateResourceTypeConfig.Request) returns (ValidateResourceTypeConfig.Response);
122 rpc ValidateDataSourceConfig(ValidateDataSourceConfig.Request) returns (ValidateDataSourceConfig.Response);
123 rpc UpgradeResourceState(UpgradeResourceState.Request) returns (UpgradeResourceState.Response);
124
125 //////// One-time initialization, called before other functions below
126 rpc Configure(Configure.Request) returns (Configure.Response);
127
128 //////// Managed Resource Lifecycle
129 rpc ReadResource(ReadResource.Request) returns (ReadResource.Response);
130 rpc PlanResourceChange(PlanResourceChange.Request) returns (PlanResourceChange.Response);
131 rpc ApplyResourceChange(ApplyResourceChange.Request) returns (ApplyResourceChange.Response);
132 rpc ImportResourceState(ImportResourceState.Request) returns (ImportResourceState.Response);
133
134 rpc ReadDataSource(ReadDataSource.Request) returns (ReadDataSource.Response);
135
136 //////// Graceful Shutdown
137 rpc Stop(Stop.Request) returns (Stop.Response);
138}
139
140message GetProviderSchema {
141 message Request {
142 }
143 message Response {
144 Schema provider = 1;
145 map<string, Schema> resource_schemas = 2;
146 map<string, Schema> data_source_schemas = 3;
147 repeated Diagnostic diagnostics = 4;
148 }
149}
150
151message PrepareProviderConfig {
152 message Request {
153 DynamicValue config = 1;
154 }
155 message Response {
156 DynamicValue prepared_config = 1;
157 repeated Diagnostic diagnostics = 2;
158 }
159}
160
161message UpgradeResourceState {
162 message Request {
163 string type_name = 1;
164
165 // version is the schema_version number recorded in the state file
166 int64 version = 2;
167
168 // raw_state is the raw states as stored for the resource. Core does
169 // not have access to the schema of prior_version, so it's the
170 // provider's responsibility to interpret this value using the
171 // appropriate older schema. The raw_state will be the json encoded
172 // state, or a legacy flat-mapped format.
173 RawState raw_state = 3;
174 }
175 message Response {
176 // new_state is a msgpack-encoded data structure that, when interpreted with
177 // the _current_ schema for this resource type, is functionally equivalent to
178 // that which was given in prior_state_raw.
179 DynamicValue upgraded_state = 1;
180
181 // diagnostics describes any errors encountered during migration that could not
182 // be safely resolved, and warnings about any possibly-risky assumptions made
183 // in the upgrade process.
184 repeated Diagnostic diagnostics = 2;
185 }
186}
187
188message ValidateResourceTypeConfig {
189 message Request {
190 string type_name = 1;
191 DynamicValue config = 2;
192 }
193 message Response {
194 repeated Diagnostic diagnostics = 1;
195 }
196}
197
198message ValidateDataSourceConfig {
199 message Request {
200 string type_name = 1;
201 DynamicValue config = 2;
202 }
203 message Response {
204 repeated Diagnostic diagnostics = 1;
205 }
206}
207
208message Configure {
209 message Request {
210 string terraform_version = 1;
211 DynamicValue config = 2;
212 }
213 message Response {
214 repeated Diagnostic diagnostics = 1;
215 }
216}
217
218message ReadResource {
219 message Request {
220 string type_name = 1;
221 DynamicValue current_state = 2;
222 }
223 message Response {
224 DynamicValue new_state = 1;
225 repeated Diagnostic diagnostics = 2;
226 }
227}
228
229message PlanResourceChange {
230 message Request {
231 string type_name = 1;
232 DynamicValue prior_state = 2;
233 DynamicValue proposed_new_state = 3;
234 DynamicValue config = 4;
235 bytes prior_private = 5;
236 }
237
238 message Response {
239 DynamicValue planned_state = 1;
240 repeated AttributePath requires_replace = 2;
241 bytes planned_private = 3;
242 repeated Diagnostic diagnostics = 4;
243
244
245 // This may be set only by the helper/schema "SDK" in the main Terraform
246 // repository, to request that Terraform Core >=0.12 permit additional
247 // inconsistencies that can result from the legacy SDK type system
248 // and its imprecise mapping to the >=0.12 type system.
249 // The change in behavior implied by this flag makes sense only for the
250 // specific details of the legacy SDK type system, and are not a general
251 // mechanism to avoid proper type handling in providers.
252 //
253 // ==== DO NOT USE THIS ====
254 // ==== THIS MUST BE LEFT UNSET IN ALL OTHER SDKS ====
255 // ==== DO NOT USE THIS ====
256 bool legacy_type_system = 5;
257 }
258}
259
260message ApplyResourceChange {
261 message Request {
262 string type_name = 1;
263 DynamicValue prior_state = 2;
264 DynamicValue planned_state = 3;
265 DynamicValue config = 4;
266 bytes planned_private = 5;
267 }
268 message Response {
269 DynamicValue new_state = 1;
270 bytes private = 2;
271 repeated Diagnostic diagnostics = 3;
272
273 // This may be set only by the helper/schema "SDK" in the main Terraform
274 // repository, to request that Terraform Core >=0.12 permit additional
275 // inconsistencies that can result from the legacy SDK type system
276 // and its imprecise mapping to the >=0.12 type system.
277 // The change in behavior implied by this flag makes sense only for the
278 // specific details of the legacy SDK type system, and are not a general
279 // mechanism to avoid proper type handling in providers.
280 //
281 // ==== DO NOT USE THIS ====
282 // ==== THIS MUST BE LEFT UNSET IN ALL OTHER SDKS ====
283 // ==== DO NOT USE THIS ====
284 bool legacy_type_system = 4;
285 }
286}
287
288message ImportResourceState {
289 message Request {
290 string type_name = 1;
291 string id = 2;
292 }
293
294 message ImportedResource {
295 string type_name = 1;
296 DynamicValue state = 2;
297 bytes private = 3;
298 }
299
300 message Response {
301 repeated ImportedResource imported_resources = 1;
302 repeated Diagnostic diagnostics = 2;
303 }
304}
305
306message ReadDataSource {
307 message Request {
308 string type_name = 1;
309 DynamicValue config = 2;
310 }
311 message Response {
312 DynamicValue state = 1;
313 repeated Diagnostic diagnostics = 2;
314 }
315}
316
317service Provisioner {
318 rpc GetSchema(GetProvisionerSchema.Request) returns (GetProvisionerSchema.Response);
319 rpc ValidateProvisionerConfig(ValidateProvisionerConfig.Request) returns (ValidateProvisionerConfig.Response);
320 rpc ProvisionResource(ProvisionResource.Request) returns (stream ProvisionResource.Response);
321 rpc Stop(Stop.Request) returns (Stop.Response);
322}
323
324message GetProvisionerSchema {
325 message Request {
326 }
327 message Response {
328 Schema provisioner = 1;
329 repeated Diagnostic diagnostics = 2;
330 }
331}
332
333message ValidateProvisionerConfig {
334 message Request {
335 DynamicValue config = 1;
336 }
337 message Response {
338 repeated Diagnostic diagnostics = 1;
339 }
340}
341
342message ProvisionResource {
343 message Request {
344 DynamicValue config = 1;
345 DynamicValue connection = 2;
346 }
347 message Response {
348 string output = 1;
349 repeated Diagnostic diagnostics = 2;
350 }
351}
diff --git a/vendor/github.com/hashicorp/terraform/lang/blocktoattr/schema.go b/vendor/github.com/hashicorp/terraform/lang/blocktoattr/schema.go
index 2f2463a..47a0256 100644
--- a/vendor/github.com/hashicorp/terraform/lang/blocktoattr/schema.go
+++ b/vendor/github.com/hashicorp/terraform/lang/blocktoattr/schema.go
@@ -55,10 +55,11 @@ func effectiveSchema(given *hcl.BodySchema, body hcl.Body, ambiguousNames map[st
55 }, 55 },
56 } 56 }
57 content, _, _ = body.PartialContent(&probeSchema) 57 content, _, _ = body.PartialContent(&probeSchema)
58 if len(content.Blocks) > 0 { 58 if len(content.Blocks) > 0 || dynamicExpanded {
59 // No attribute present and at least one block present, so 59 // A dynamic block with an empty iterator returns nothing.
60 // we'll need to rewrite this one as a block for a successful 60 // If there's no attribute and we have either a block or a
61 // result. 61 // dynamic expansion, we need to rewrite this one as a
62 // block for a successful result.
62 appearsAsBlock[name] = struct{}{} 63 appearsAsBlock[name] = struct{}{}
63 } 64 }
64 } 65 }
diff --git a/vendor/github.com/hashicorp/terraform/lang/blocktoattr/variables.go b/vendor/github.com/hashicorp/terraform/lang/blocktoattr/variables.go
index e123b8a..b172805 100644
--- a/vendor/github.com/hashicorp/terraform/lang/blocktoattr/variables.go
+++ b/vendor/github.com/hashicorp/terraform/lang/blocktoattr/variables.go
@@ -33,7 +33,7 @@ func walkVariables(node dynblock.WalkVariablesNode, body hcl.Body, schema *confi
33 for _, child := range children { 33 for _, child := range children {
34 if blockS, exists := schema.BlockTypes[child.BlockTypeName]; exists { 34 if blockS, exists := schema.BlockTypes[child.BlockTypeName]; exists {
35 vars = append(vars, walkVariables(child.Node, child.Body(), &blockS.Block)...) 35 vars = append(vars, walkVariables(child.Node, child.Body(), &blockS.Block)...)
36 } else if attrS, exists := schema.Attributes[child.BlockTypeName]; exists { 36 } else if attrS, exists := schema.Attributes[child.BlockTypeName]; exists && attrS.Type.ElementType().IsObjectType() {
37 synthSchema := SchemaForCtyElementType(attrS.Type.ElementType()) 37 synthSchema := SchemaForCtyElementType(attrS.Type.ElementType())
38 vars = append(vars, walkVariables(child.Node, child.Body(), synthSchema)...) 38 vars = append(vars, walkVariables(child.Node, child.Body(), synthSchema)...)
39 } 39 }
diff --git a/vendor/github.com/hashicorp/terraform/lang/data.go b/vendor/github.com/hashicorp/terraform/lang/data.go
index 80313d6..eca588e 100644
--- a/vendor/github.com/hashicorp/terraform/lang/data.go
+++ b/vendor/github.com/hashicorp/terraform/lang/data.go
@@ -23,6 +23,7 @@ type Data interface {
23 StaticValidateReferences(refs []*addrs.Reference, self addrs.Referenceable) tfdiags.Diagnostics 23 StaticValidateReferences(refs []*addrs.Reference, self addrs.Referenceable) tfdiags.Diagnostics
24 24
25 GetCountAttr(addrs.CountAttr, tfdiags.SourceRange) (cty.Value, tfdiags.Diagnostics) 25 GetCountAttr(addrs.CountAttr, tfdiags.SourceRange) (cty.Value, tfdiags.Diagnostics)
26 GetForEachAttr(addrs.ForEachAttr, tfdiags.SourceRange) (cty.Value, tfdiags.Diagnostics)
26 GetResourceInstance(addrs.ResourceInstance, tfdiags.SourceRange) (cty.Value, tfdiags.Diagnostics) 27 GetResourceInstance(addrs.ResourceInstance, tfdiags.SourceRange) (cty.Value, tfdiags.Diagnostics)
27 GetLocalValue(addrs.LocalValue, tfdiags.SourceRange) (cty.Value, tfdiags.Diagnostics) 28 GetLocalValue(addrs.LocalValue, tfdiags.SourceRange) (cty.Value, tfdiags.Diagnostics)
28 GetModuleInstance(addrs.ModuleCallInstance, tfdiags.SourceRange) (cty.Value, tfdiags.Diagnostics) 29 GetModuleInstance(addrs.ModuleCallInstance, tfdiags.SourceRange) (cty.Value, tfdiags.Diagnostics)
diff --git a/vendor/github.com/hashicorp/terraform/lang/eval.go b/vendor/github.com/hashicorp/terraform/lang/eval.go
index a3fb363..a8fe8b6 100644
--- a/vendor/github.com/hashicorp/terraform/lang/eval.go
+++ b/vendor/github.com/hashicorp/terraform/lang/eval.go
@@ -203,6 +203,7 @@ func (s *Scope) evalContext(refs []*addrs.Reference, selfAddr addrs.Referenceabl
203 pathAttrs := map[string]cty.Value{} 203 pathAttrs := map[string]cty.Value{}
204 terraformAttrs := map[string]cty.Value{} 204 terraformAttrs := map[string]cty.Value{}
205 countAttrs := map[string]cty.Value{} 205 countAttrs := map[string]cty.Value{}
206 forEachAttrs := map[string]cty.Value{}
206 var self cty.Value 207 var self cty.Value
207 208
208 for _, ref := range refs { 209 for _, ref := range refs {
@@ -334,6 +335,14 @@ func (s *Scope) evalContext(refs []*addrs.Reference, selfAddr addrs.Referenceabl
334 self = val 335 self = val
335 } 336 }
336 337
338 case addrs.ForEachAttr:
339 val, valDiags := normalizeRefValue(s.Data.GetForEachAttr(subj, rng))
340 diags = diags.Append(valDiags)
341 forEachAttrs[subj.Name] = val
342 if isSelf {
343 self = val
344 }
345
337 default: 346 default:
338 // Should never happen 347 // Should never happen
339 panic(fmt.Errorf("Scope.buildEvalContext cannot handle address type %T", rawSubj)) 348 panic(fmt.Errorf("Scope.buildEvalContext cannot handle address type %T", rawSubj))
@@ -350,6 +359,7 @@ func (s *Scope) evalContext(refs []*addrs.Reference, selfAddr addrs.Referenceabl
350 vals["path"] = cty.ObjectVal(pathAttrs) 359 vals["path"] = cty.ObjectVal(pathAttrs)
351 vals["terraform"] = cty.ObjectVal(terraformAttrs) 360 vals["terraform"] = cty.ObjectVal(terraformAttrs)
352 vals["count"] = cty.ObjectVal(countAttrs) 361 vals["count"] = cty.ObjectVal(countAttrs)
362 vals["each"] = cty.ObjectVal(forEachAttrs)
353 if self != cty.NilVal { 363 if self != cty.NilVal {
354 vals["self"] = self 364 vals["self"] = self
355 } 365 }
diff --git a/vendor/github.com/hashicorp/terraform/lang/funcs/collection.go b/vendor/github.com/hashicorp/terraform/lang/funcs/collection.go
index 71b7a84..bcccc1f 100644
--- a/vendor/github.com/hashicorp/terraform/lang/funcs/collection.go
+++ b/vendor/github.com/hashicorp/terraform/lang/funcs/collection.go
@@ -246,7 +246,7 @@ var CompactFunc = function.New(&function.Spec{
246 246
247 for it := listVal.ElementIterator(); it.Next(); { 247 for it := listVal.ElementIterator(); it.Next(); {
248 _, v := it.Element() 248 _, v := it.Element()
249 if v.AsString() == "" { 249 if v.IsNull() || v.AsString() == "" {
250 continue 250 continue
251 } 251 }
252 outputList = append(outputList, v) 252 outputList = append(outputList, v)
@@ -363,6 +363,9 @@ var DistinctFunc = function.New(&function.Spec{
363 } 363 }
364 } 364 }
365 365
366 if len(list) == 0 {
367 return cty.ListValEmpty(retType.ElementType()), nil
368 }
366 return cty.ListVal(list), nil 369 return cty.ListVal(list), nil
367 }, 370 },
368}) 371})
@@ -389,6 +392,10 @@ var ChunklistFunc = function.New(&function.Spec{
389 return cty.UnknownVal(retType), nil 392 return cty.UnknownVal(retType), nil
390 } 393 }
391 394
395 if listVal.LengthInt() == 0 {
396 return cty.ListValEmpty(listVal.Type()), nil
397 }
398
392 var size int 399 var size int
393 err = gocty.FromCtyValue(args[1], &size) 400 err = gocty.FromCtyValue(args[1], &size)
394 if err != nil { 401 if err != nil {
@@ -686,8 +693,10 @@ var LookupFunc = function.New(&function.Spec{
686 return cty.StringVal(v.AsString()), nil 693 return cty.StringVal(v.AsString()), nil
687 case ty.Equals(cty.Number): 694 case ty.Equals(cty.Number):
688 return cty.NumberVal(v.AsBigFloat()), nil 695 return cty.NumberVal(v.AsBigFloat()), nil
696 case ty.Equals(cty.Bool):
697 return cty.BoolVal(v.True()), nil
689 default: 698 default:
690 return cty.NilVal, errors.New("lookup() can only be used with flat lists") 699 return cty.NilVal, errors.New("lookup() can only be used with maps of primitive types")
691 } 700 }
692 } 701 }
693 } 702 }
@@ -797,10 +806,12 @@ var MatchkeysFunc = function.New(&function.Spec{
797 }, 806 },
798 }, 807 },
799 Type: func(args []cty.Value) (cty.Type, error) { 808 Type: func(args []cty.Value) (cty.Type, error) {
800 if !args[1].Type().Equals(args[2].Type()) { 809 ty, _ := convert.UnifyUnsafe([]cty.Type{args[1].Type(), args[2].Type()})
801 return cty.NilType, errors.New("lists must be of the same type") 810 if ty == cty.NilType {
811 return cty.NilType, errors.New("keys and searchset must be of the same type")
802 } 812 }
803 813
814 // the return type is based on args[0] (values)
804 return args[0].Type(), nil 815 return args[0].Type(), nil
805 }, 816 },
806 Impl: func(args []cty.Value, retType cty.Type) (ret cty.Value, err error) { 817 Impl: func(args []cty.Value, retType cty.Type) (ret cty.Value, err error) {
@@ -813,10 +824,14 @@ var MatchkeysFunc = function.New(&function.Spec{
813 } 824 }
814 825
815 output := make([]cty.Value, 0) 826 output := make([]cty.Value, 0)
816
817 values := args[0] 827 values := args[0]
818 keys := args[1] 828
819 searchset := args[2] 829 // Keys and searchset must be the same type.
830 // We can skip error checking here because we've already verified that
831 // they can be unified in the Type function
832 ty, _ := convert.UnifyUnsafe([]cty.Type{args[1].Type(), args[2].Type()})
833 keys, _ := convert.Convert(args[1], ty)
834 searchset, _ := convert.Convert(args[2], ty)
820 835
821 // if searchset is empty, return an empty list. 836 // if searchset is empty, return an empty list.
822 if searchset.LengthInt() == 0 { 837 if searchset.LengthInt() == 0 {
@@ -867,7 +882,6 @@ var MergeFunc = function.New(&function.Spec{
867 Name: "maps", 882 Name: "maps",
868 Type: cty.DynamicPseudoType, 883 Type: cty.DynamicPseudoType,
869 AllowDynamicType: true, 884 AllowDynamicType: true,
870 AllowNull: true,
871 }, 885 },
872 Type: function.StaticReturnType(cty.DynamicPseudoType), 886 Type: function.StaticReturnType(cty.DynamicPseudoType),
873 Impl: func(args []cty.Value, retType cty.Type) (ret cty.Value, err error) { 887 Impl: func(args []cty.Value, retType cty.Type) (ret cty.Value, err error) {
diff --git a/vendor/github.com/hashicorp/terraform/lang/funcs/crypto.go b/vendor/github.com/hashicorp/terraform/lang/funcs/crypto.go
index 5cb4bc5..be006f8 100644
--- a/vendor/github.com/hashicorp/terraform/lang/funcs/crypto.go
+++ b/vendor/github.com/hashicorp/terraform/lang/funcs/crypto.go
@@ -14,6 +14,7 @@ import (
14 "hash" 14 "hash"
15 15
16 uuid "github.com/hashicorp/go-uuid" 16 uuid "github.com/hashicorp/go-uuid"
17 uuidv5 "github.com/satori/go.uuid"
17 "github.com/zclconf/go-cty/cty" 18 "github.com/zclconf/go-cty/cty"
18 "github.com/zclconf/go-cty/cty/function" 19 "github.com/zclconf/go-cty/cty/function"
19 "github.com/zclconf/go-cty/cty/gocty" 20 "github.com/zclconf/go-cty/cty/gocty"
@@ -32,6 +33,39 @@ var UUIDFunc = function.New(&function.Spec{
32 }, 33 },
33}) 34})
34 35
36var UUIDV5Func = function.New(&function.Spec{
37 Params: []function.Parameter{
38 {
39 Name: "namespace",
40 Type: cty.String,
41 },
42 {
43 Name: "name",
44 Type: cty.String,
45 },
46 },
47 Type: function.StaticReturnType(cty.String),
48 Impl: func(args []cty.Value, retType cty.Type) (ret cty.Value, err error) {
49 var namespace uuidv5.UUID
50 switch {
51 case args[0].AsString() == "dns":
52 namespace = uuidv5.NamespaceDNS
53 case args[0].AsString() == "url":
54 namespace = uuidv5.NamespaceURL
55 case args[0].AsString() == "oid":
56 namespace = uuidv5.NamespaceOID
57 case args[0].AsString() == "x500":
58 namespace = uuidv5.NamespaceX500
59 default:
60 if namespace, err = uuidv5.FromString(args[0].AsString()); err != nil {
61 return cty.UnknownVal(cty.String), fmt.Errorf("uuidv5() doesn't support namespace %s (%v)", args[0].AsString(), err)
62 }
63 }
64 val := args[1].AsString()
65 return cty.StringVal(uuidv5.NewV5(namespace, val).String()), nil
66 },
67})
68
35// Base64Sha256Func constructs a function that computes the SHA256 hash of a given string 69// Base64Sha256Func constructs a function that computes the SHA256 hash of a given string
36// and encodes it with Base64. 70// and encodes it with Base64.
37var Base64Sha256Func = makeStringHashFunction(sha256.New, base64.StdEncoding.EncodeToString) 71var Base64Sha256Func = makeStringHashFunction(sha256.New, base64.StdEncoding.EncodeToString)
@@ -228,6 +262,12 @@ func UUID() (cty.Value, error) {
228 return UUIDFunc.Call(nil) 262 return UUIDFunc.Call(nil)
229} 263}
230 264
265// UUIDV5 generates and returns a Type-5 UUID in the standard hexadecimal string
266// format.
267func UUIDV5(namespace cty.Value, name cty.Value) (cty.Value, error) {
268 return UUIDV5Func.Call([]cty.Value{namespace, name})
269}
270
231// Base64Sha256 computes the SHA256 hash of a given string and encodes it with 271// Base64Sha256 computes the SHA256 hash of a given string and encodes it with
232// Base64. 272// Base64.
233// 273//
diff --git a/vendor/github.com/hashicorp/terraform/lang/funcs/filesystem.go b/vendor/github.com/hashicorp/terraform/lang/funcs/filesystem.go
index 7dfc905..016b102 100644
--- a/vendor/github.com/hashicorp/terraform/lang/funcs/filesystem.go
+++ b/vendor/github.com/hashicorp/terraform/lang/funcs/filesystem.go
@@ -237,6 +237,21 @@ var DirnameFunc = function.New(&function.Spec{
237 }, 237 },
238}) 238})
239 239
240// AbsPathFunc constructs a function that converts a filesystem path to an absolute path
241var AbsPathFunc = function.New(&function.Spec{
242 Params: []function.Parameter{
243 {
244 Name: "path",
245 Type: cty.String,
246 },
247 },
248 Type: function.StaticReturnType(cty.String),
249 Impl: func(args []cty.Value, retType cty.Type) (cty.Value, error) {
250 absPath, err := filepath.Abs(args[0].AsString())
251 return cty.StringVal(filepath.ToSlash(absPath)), err
252 },
253})
254
240// PathExpandFunc constructs a function that expands a leading ~ character to the current user's home directory. 255// PathExpandFunc constructs a function that expands a leading ~ character to the current user's home directory.
241var PathExpandFunc = function.New(&function.Spec{ 256var PathExpandFunc = function.New(&function.Spec{
242 Params: []function.Parameter{ 257 Params: []function.Parameter{
diff --git a/vendor/github.com/hashicorp/terraform/lang/functions.go b/vendor/github.com/hashicorp/terraform/lang/functions.go
index 2c7b548..b77a55f 100644
--- a/vendor/github.com/hashicorp/terraform/lang/functions.go
+++ b/vendor/github.com/hashicorp/terraform/lang/functions.go
@@ -3,6 +3,7 @@ package lang
3import ( 3import (
4 "fmt" 4 "fmt"
5 5
6 ctyyaml "github.com/zclconf/go-cty-yaml"
6 "github.com/zclconf/go-cty/cty" 7 "github.com/zclconf/go-cty/cty"
7 "github.com/zclconf/go-cty/cty/function" 8 "github.com/zclconf/go-cty/cty/function"
8 "github.com/zclconf/go-cty/cty/function/stdlib" 9 "github.com/zclconf/go-cty/cty/function/stdlib"
@@ -30,6 +31,7 @@ func (s *Scope) Functions() map[string]function.Function {
30 31
31 s.funcs = map[string]function.Function{ 32 s.funcs = map[string]function.Function{
32 "abs": stdlib.AbsoluteFunc, 33 "abs": stdlib.AbsoluteFunc,
34 "abspath": funcs.AbsPathFunc,
33 "basename": funcs.BasenameFunc, 35 "basename": funcs.BasenameFunc,
34 "base64decode": funcs.Base64DecodeFunc, 36 "base64decode": funcs.Base64DecodeFunc,
35 "base64encode": funcs.Base64EncodeFunc, 37 "base64encode": funcs.Base64EncodeFunc,
@@ -85,6 +87,7 @@ func (s *Scope) Functions() map[string]function.Function {
85 "min": stdlib.MinFunc, 87 "min": stdlib.MinFunc,
86 "pathexpand": funcs.PathExpandFunc, 88 "pathexpand": funcs.PathExpandFunc,
87 "pow": funcs.PowFunc, 89 "pow": funcs.PowFunc,
90 "range": stdlib.RangeFunc,
88 "replace": funcs.ReplaceFunc, 91 "replace": funcs.ReplaceFunc,
89 "reverse": funcs.ReverseFunc, 92 "reverse": funcs.ReverseFunc,
90 "rsadecrypt": funcs.RsaDecryptFunc, 93 "rsadecrypt": funcs.RsaDecryptFunc,
@@ -114,7 +117,10 @@ func (s *Scope) Functions() map[string]function.Function {
114 "upper": stdlib.UpperFunc, 117 "upper": stdlib.UpperFunc,
115 "urlencode": funcs.URLEncodeFunc, 118 "urlencode": funcs.URLEncodeFunc,
116 "uuid": funcs.UUIDFunc, 119 "uuid": funcs.UUIDFunc,
120 "uuidv5": funcs.UUIDV5Func,
117 "values": funcs.ValuesFunc, 121 "values": funcs.ValuesFunc,
122 "yamldecode": ctyyaml.YAMLDecodeFunc,
123 "yamlencode": ctyyaml.YAMLEncodeFunc,
118 "zipmap": funcs.ZipmapFunc, 124 "zipmap": funcs.ZipmapFunc,
119 } 125 }
120 126
diff --git a/vendor/github.com/hashicorp/terraform/plans/objchange/compatible.go b/vendor/github.com/hashicorp/terraform/plans/objchange/compatible.go
index 8b7ef43..d85086c 100644
--- a/vendor/github.com/hashicorp/terraform/plans/objchange/compatible.go
+++ b/vendor/github.com/hashicorp/terraform/plans/objchange/compatible.go
@@ -84,7 +84,7 @@ func assertObjectCompatible(schema *configschema.Block, planned, actual cty.Valu
84 // whether there are dynamically-typed attributes inside. However, 84 // whether there are dynamically-typed attributes inside. However,
85 // both support a similar-enough API that we can treat them the 85 // both support a similar-enough API that we can treat them the
86 // same for our purposes here. 86 // same for our purposes here.
87 if !plannedV.IsKnown() || plannedV.IsNull() || actualV.IsNull() { 87 if !plannedV.IsKnown() || !actualV.IsKnown() || plannedV.IsNull() || actualV.IsNull() {
88 continue 88 continue
89 } 89 }
90 90
@@ -169,6 +169,16 @@ func assertObjectCompatible(schema *configschema.Block, planned, actual cty.Valu
169 }) 169 })
170 errs = append(errs, setErrs...) 170 errs = append(errs, setErrs...)
171 171
172 if maybeUnknownBlocks {
173 // When unknown blocks are present the final number of blocks
174 // may be different, either because the unknown set values
175 // become equal and are collapsed, or the count is unknown due
176 // a dynamic block. Unfortunately this means we can't do our
177 // usual checks in this case without generating false
178 // negatives.
179 continue
180 }
181
172 // There can be fewer elements in a set after its elements are all 182 // There can be fewer elements in a set after its elements are all
173 // known (values that turn out to be equal will coalesce) but the 183 // known (values that turn out to be equal will coalesce) but the
174 // number of elements must never get larger. 184 // number of elements must never get larger.
diff --git a/vendor/github.com/hashicorp/terraform/plugin/discovery/get.go b/vendor/github.com/hashicorp/terraform/plugin/discovery/get.go
index b1d01fb..c1d9e3b 100644
--- a/vendor/github.com/hashicorp/terraform/plugin/discovery/get.go
+++ b/vendor/github.com/hashicorp/terraform/plugin/discovery/get.go
@@ -204,6 +204,9 @@ func (i *ProviderInstaller) Get(provider string, req Constraints) (PluginMeta, t
204 } 204 }
205 205
206 downloadURLs, err := i.listProviderDownloadURLs(providerSource, versionMeta.Version) 206 downloadURLs, err := i.listProviderDownloadURLs(providerSource, versionMeta.Version)
207 if err != nil {
208 return PluginMeta{}, diags, err
209 }
207 providerURL := downloadURLs.DownloadURL 210 providerURL := downloadURLs.DownloadURL
208 211
209 if !i.SkipVerify { 212 if !i.SkipVerify {
diff --git a/vendor/github.com/hashicorp/terraform/plugin/grpc_provider.go b/vendor/github.com/hashicorp/terraform/plugin/grpc_provider.go
index ae9a400..5b190e2 100644
--- a/vendor/github.com/hashicorp/terraform/plugin/grpc_provider.go
+++ b/vendor/github.com/hashicorp/terraform/plugin/grpc_provider.go
@@ -330,6 +330,7 @@ func (p *GRPCProvider) ReadResource(r providers.ReadResourceRequest) (resp provi
330 protoReq := &proto.ReadResource_Request{ 330 protoReq := &proto.ReadResource_Request{
331 TypeName: r.TypeName, 331 TypeName: r.TypeName,
332 CurrentState: &proto.DynamicValue{Msgpack: mp}, 332 CurrentState: &proto.DynamicValue{Msgpack: mp},
333 Private: r.Private,
333 } 334 }
334 335
335 protoResp, err := p.client.ReadResource(p.ctx, protoReq) 336 protoResp, err := p.client.ReadResource(p.ctx, protoReq)
@@ -348,6 +349,7 @@ func (p *GRPCProvider) ReadResource(r providers.ReadResourceRequest) (resp provi
348 } 349 }
349 } 350 }
350 resp.NewState = state 351 resp.NewState = state
352 resp.Private = protoResp.Private
351 353
352 return resp 354 return resp
353} 355}
diff --git a/vendor/github.com/hashicorp/terraform/providers/provider.go b/vendor/github.com/hashicorp/terraform/providers/provider.go
index 1aa08c2..7e0a74c 100644
--- a/vendor/github.com/hashicorp/terraform/providers/provider.go
+++ b/vendor/github.com/hashicorp/terraform/providers/provider.go
@@ -176,6 +176,10 @@ type ReadResourceRequest struct {
176 176
177 // PriorState contains the previously saved state value for this resource. 177 // PriorState contains the previously saved state value for this resource.
178 PriorState cty.Value 178 PriorState cty.Value
179
180 // Private is an opaque blob that will be stored in state along with the
181 // resource. It is intended only for interpretation by the provider itself.
182 Private []byte
179} 183}
180 184
181type ReadResourceResponse struct { 185type ReadResourceResponse struct {
@@ -184,6 +188,10 @@ type ReadResourceResponse struct {
184 188
185 // Diagnostics contains any warnings or errors from the method call. 189 // Diagnostics contains any warnings or errors from the method call.
186 Diagnostics tfdiags.Diagnostics 190 Diagnostics tfdiags.Diagnostics
191
192 // Private is an opaque blob that will be stored in state along with the
193 // resource. It is intended only for interpretation by the provider itself.
194 Private []byte
187} 195}
188 196
189type PlanResourceChangeRequest struct { 197type PlanResourceChangeRequest struct {
diff --git a/vendor/github.com/hashicorp/terraform/states/state_deepcopy.go b/vendor/github.com/hashicorp/terraform/states/state_deepcopy.go
index ea717d0..8664f3b 100644
--- a/vendor/github.com/hashicorp/terraform/states/state_deepcopy.go
+++ b/vendor/github.com/hashicorp/terraform/states/state_deepcopy.go
@@ -147,7 +147,7 @@ func (obj *ResourceInstanceObjectSrc) DeepCopy() *ResourceInstanceObjectSrc {
147 147
148 var private []byte 148 var private []byte
149 if obj.Private != nil { 149 if obj.Private != nil {
150 private := make([]byte, len(obj.Private)) 150 private = make([]byte, len(obj.Private))
151 copy(private, obj.Private) 151 copy(private, obj.Private)
152 } 152 }
153 153
@@ -181,14 +181,17 @@ func (obj *ResourceInstanceObject) DeepCopy() *ResourceInstanceObject {
181 181
182 var private []byte 182 var private []byte
183 if obj.Private != nil { 183 if obj.Private != nil {
184 private := make([]byte, len(obj.Private)) 184 private = make([]byte, len(obj.Private))
185 copy(private, obj.Private) 185 copy(private, obj.Private)
186 } 186 }
187 187
188 // Some addrs.Referencable implementations are technically mutable, but 188 // Some addrs.Referenceable implementations are technically mutable, but
189 // we treat them as immutable by convention and so we don't deep-copy here. 189 // we treat them as immutable by convention and so we don't deep-copy here.
190 dependencies := make([]addrs.Referenceable, len(obj.Dependencies)) 190 var dependencies []addrs.Referenceable
191 copy(dependencies, obj.Dependencies) 191 if obj.Dependencies != nil {
192 dependencies = make([]addrs.Referenceable, len(obj.Dependencies))
193 copy(dependencies, obj.Dependencies)
194 }
192 195
193 return &ResourceInstanceObject{ 196 return &ResourceInstanceObject{
194 Value: obj.Value, 197 Value: obj.Value,
diff --git a/vendor/github.com/hashicorp/terraform/states/statefile/version2.go b/vendor/github.com/hashicorp/terraform/states/statefile/version2.go
index 6fe2ab8..be93924 100644
--- a/vendor/github.com/hashicorp/terraform/states/statefile/version2.go
+++ b/vendor/github.com/hashicorp/terraform/states/statefile/version2.go
@@ -205,5 +205,5 @@ type instanceStateV2 struct {
205type backendStateV2 struct { 205type backendStateV2 struct {
206 Type string `json:"type"` // Backend type 206 Type string `json:"type"` // Backend type
207 ConfigRaw json.RawMessage `json:"config"` // Backend raw config 207 ConfigRaw json.RawMessage `json:"config"` // Backend raw config
208 Hash int `json:"hash"` // Hash of portion of configuration from config files 208 Hash uint64 `json:"hash"` // Hash of portion of configuration from config files
209} 209}
diff --git a/vendor/github.com/hashicorp/terraform/states/statefile/version3_upgrade.go b/vendor/github.com/hashicorp/terraform/states/statefile/version3_upgrade.go
index 2cbe8a5..fbec547 100644
--- a/vendor/github.com/hashicorp/terraform/states/statefile/version3_upgrade.go
+++ b/vendor/github.com/hashicorp/terraform/states/statefile/version3_upgrade.go
@@ -79,7 +79,7 @@ func upgradeStateV3ToV4(old *stateV3) (*stateV4, error) {
79 case addrs.DataResourceMode: 79 case addrs.DataResourceMode:
80 modeStr = "data" 80 modeStr = "data"
81 default: 81 default:
82 return nil, fmt.Errorf("state contains resource %s with an unsupported resource mode", resAddr) 82 return nil, fmt.Errorf("state contains resource %s with an unsupported resource mode %#v", resAddr, resAddr.Mode)
83 } 83 }
84 84
85 // In state versions prior to 4 we allowed each instance of a 85 // In state versions prior to 4 we allowed each instance of a
@@ -98,7 +98,7 @@ func upgradeStateV3ToV4(old *stateV3) (*stateV4, error) {
98 var diags tfdiags.Diagnostics 98 var diags tfdiags.Diagnostics
99 providerAddr, diags = addrs.ParseAbsProviderConfigStr(oldProviderAddr) 99 providerAddr, diags = addrs.ParseAbsProviderConfigStr(oldProviderAddr)
100 if diags.HasErrors() { 100 if diags.HasErrors() {
101 return nil, diags.Err() 101 return nil, fmt.Errorf("invalid provider config reference %q for %s: %s", oldProviderAddr, instAddr, diags.Err())
102 } 102 }
103 } else { 103 } else {
104 // Smells like an old-style module-local provider address, 104 // Smells like an old-style module-local provider address,
@@ -109,7 +109,7 @@ func upgradeStateV3ToV4(old *stateV3) (*stateV4, error) {
109 if oldProviderAddr != "" { 109 if oldProviderAddr != "" {
110 localAddr, diags := addrs.ParseProviderConfigCompactStr(oldProviderAddr) 110 localAddr, diags := addrs.ParseProviderConfigCompactStr(oldProviderAddr)
111 if diags.HasErrors() { 111 if diags.HasErrors() {
112 return nil, diags.Err() 112 return nil, fmt.Errorf("invalid legacy provider config reference %q for %s: %s", oldProviderAddr, instAddr, diags.Err())
113 } 113 }
114 providerAddr = localAddr.Absolute(moduleAddr) 114 providerAddr = localAddr.Absolute(moduleAddr)
115 } else { 115 } else {
@@ -272,7 +272,7 @@ func upgradeInstanceObjectV3ToV4(rsOld *resourceStateV2, isOld *instanceStateV2,
272 instKeyRaw = string(tk) 272 instKeyRaw = string(tk)
273 default: 273 default:
274 if instKeyRaw != nil { 274 if instKeyRaw != nil {
275 return nil, fmt.Errorf("insupported instance key: %#v", instKey) 275 return nil, fmt.Errorf("unsupported instance key: %#v", instKey)
276 } 276 }
277 } 277 }
278 278
@@ -301,7 +301,11 @@ func upgradeInstanceObjectV3ToV4(rsOld *resourceStateV2, isOld *instanceStateV2,
301 301
302 dependencies := make([]string, len(rsOld.Dependencies)) 302 dependencies := make([]string, len(rsOld.Dependencies))
303 for i, v := range rsOld.Dependencies { 303 for i, v := range rsOld.Dependencies {
304 dependencies[i] = parseLegacyDependency(v) 304 depStr, err := parseLegacyDependency(v)
305 if err != nil {
306 return nil, fmt.Errorf("invalid dependency reference %q: %s", v, err)
307 }
308 dependencies[i] = depStr
305 } 309 }
306 310
307 return &instanceObjectStateV4{ 311 return &instanceObjectStateV4{
@@ -414,7 +418,7 @@ func simplifyImpliedValueType(ty cty.Type) cty.Type {
414 } 418 }
415} 419}
416 420
417func parseLegacyDependency(s string) string { 421func parseLegacyDependency(s string) (string, error) {
418 parts := strings.Split(s, ".") 422 parts := strings.Split(s, ".")
419 ret := parts[0] 423 ret := parts[0]
420 for _, part := range parts[1:] { 424 for _, part := range parts[1:] {
@@ -427,5 +431,14 @@ func parseLegacyDependency(s string) string {
427 } 431 }
428 ret = ret + "." + part 432 ret = ret + "." + part
429 } 433 }
430 return ret 434
435 // The result must parse as a reference, or else we'll create an invalid
436 // state file.
437 var diags tfdiags.Diagnostics
438 _, diags = addrs.ParseRefStr(ret)
439 if diags.HasErrors() {
440 return "", diags.Err()
441 }
442
443 return ret, nil
431} 444}
diff --git a/vendor/github.com/hashicorp/terraform/terraform/diff.go b/vendor/github.com/hashicorp/terraform/terraform/diff.go
index 7a6ef3d..323462f 100644
--- a/vendor/github.com/hashicorp/terraform/terraform/diff.go
+++ b/vendor/github.com/hashicorp/terraform/terraform/diff.go
@@ -13,7 +13,6 @@ import (
13 "sync" 13 "sync"
14 14
15 "github.com/hashicorp/terraform/addrs" 15 "github.com/hashicorp/terraform/addrs"
16 "github.com/hashicorp/terraform/config"
17 "github.com/hashicorp/terraform/config/hcl2shim" 16 "github.com/hashicorp/terraform/config/hcl2shim"
18 "github.com/hashicorp/terraform/configs/configschema" 17 "github.com/hashicorp/terraform/configs/configschema"
19 "github.com/zclconf/go-cty/cty" 18 "github.com/zclconf/go-cty/cty"
@@ -665,7 +664,7 @@ func (d *InstanceDiff) applySingleAttrDiff(path []string, attrs map[string]strin
665 old, exists := attrs[currentKey] 664 old, exists := attrs[currentKey]
666 665
667 if diff != nil && diff.NewComputed { 666 if diff != nil && diff.NewComputed {
668 result[attr] = config.UnknownVariableValue 667 result[attr] = hcl2shim.UnknownVariableValue
669 return result, nil 668 return result, nil
670 } 669 }
671 670
@@ -673,7 +672,7 @@ func (d *InstanceDiff) applySingleAttrDiff(path []string, attrs map[string]strin
673 // This only applied to top-level "id" fields. 672 // This only applied to top-level "id" fields.
674 if attr == "id" && len(path) == 1 { 673 if attr == "id" && len(path) == 1 {
675 if old == "" { 674 if old == "" {
676 result[attr] = config.UnknownVariableValue 675 result[attr] = hcl2shim.UnknownVariableValue
677 } else { 676 } else {
678 result[attr] = old 677 result[attr] = old
679 } 678 }
@@ -704,8 +703,8 @@ func (d *InstanceDiff) applySingleAttrDiff(path []string, attrs map[string]strin
704 // check for missmatched diff values 703 // check for missmatched diff values
705 if exists && 704 if exists &&
706 old != diff.Old && 705 old != diff.Old &&
707 old != config.UnknownVariableValue && 706 old != hcl2shim.UnknownVariableValue &&
708 diff.Old != config.UnknownVariableValue { 707 diff.Old != hcl2shim.UnknownVariableValue {
709 return result, fmt.Errorf("diff apply conflict for %s: diff expects %q, but prior value has %q", attr, diff.Old, old) 708 return result, fmt.Errorf("diff apply conflict for %s: diff expects %q, but prior value has %q", attr, diff.Old, old)
710 } 709 }
711 710
@@ -723,7 +722,7 @@ func (d *InstanceDiff) applySingleAttrDiff(path []string, attrs map[string]strin
723 } 722 }
724 723
725 if attrSchema.Computed && diff.NewComputed { 724 if attrSchema.Computed && diff.NewComputed {
726 result[attr] = config.UnknownVariableValue 725 result[attr] = hcl2shim.UnknownVariableValue
727 return result, nil 726 return result, nil
728 } 727 }
729 728
@@ -756,7 +755,7 @@ func (d *InstanceDiff) applyCollectionDiff(path []string, attrs map[string]strin
756 } 755 }
757 756
758 if diff.NewComputed { 757 if diff.NewComputed {
759 result[k[len(prefix):]] = config.UnknownVariableValue 758 result[k[len(prefix):]] = hcl2shim.UnknownVariableValue
760 return result, nil 759 return result, nil
761 } 760 }
762 761
diff --git a/vendor/github.com/hashicorp/terraform/terraform/eval_apply.go b/vendor/github.com/hashicorp/terraform/terraform/eval_apply.go
index 09313f7..422f372 100644
--- a/vendor/github.com/hashicorp/terraform/terraform/eval_apply.go
+++ b/vendor/github.com/hashicorp/terraform/terraform/eval_apply.go
@@ -61,7 +61,8 @@ func (n *EvalApply) Eval(ctx EvalContext) (interface{}, error) {
61 configVal := cty.NullVal(cty.DynamicPseudoType) 61 configVal := cty.NullVal(cty.DynamicPseudoType)
62 if n.Config != nil { 62 if n.Config != nil {
63 var configDiags tfdiags.Diagnostics 63 var configDiags tfdiags.Diagnostics
64 keyData := EvalDataForInstanceKey(n.Addr.Key) 64 forEach, _ := evaluateResourceForEachExpression(n.Config.ForEach, ctx)
65 keyData := EvalDataForInstanceKey(n.Addr.Key, forEach)
65 configVal, _, configDiags = ctx.EvaluateBlock(n.Config.Config, schema, nil, keyData) 66 configVal, _, configDiags = ctx.EvaluateBlock(n.Config.Config, schema, nil, keyData)
66 diags = diags.Append(configDiags) 67 diags = diags.Append(configDiags)
67 if configDiags.HasErrors() { 68 if configDiags.HasErrors() {
@@ -548,7 +549,8 @@ func (n *EvalApplyProvisioners) apply(ctx EvalContext, provs []*configs.Provisio
548 provisioner := ctx.Provisioner(prov.Type) 549 provisioner := ctx.Provisioner(prov.Type)
549 schema := ctx.ProvisionerSchema(prov.Type) 550 schema := ctx.ProvisionerSchema(prov.Type)
550 551
551 keyData := EvalDataForInstanceKey(instanceAddr.Key) 552 // TODO the for_each val is not added here, which might causes issues with provisioners
553 keyData := EvalDataForInstanceKey(instanceAddr.Key, nil)
552 554
553 // Evaluate the main provisioner configuration. 555 // Evaluate the main provisioner configuration.
554 config, _, configDiags := ctx.EvaluateBlock(prov.Config, schema, instanceAddr, keyData) 556 config, _, configDiags := ctx.EvaluateBlock(prov.Config, schema, instanceAddr, keyData)
diff --git a/vendor/github.com/hashicorp/terraform/terraform/eval_diff.go b/vendor/github.com/hashicorp/terraform/terraform/eval_diff.go
index b7acfb0..695b5fe 100644
--- a/vendor/github.com/hashicorp/terraform/terraform/eval_diff.go
+++ b/vendor/github.com/hashicorp/terraform/terraform/eval_diff.go
@@ -4,7 +4,6 @@ import (
4 "bytes" 4 "bytes"
5 "fmt" 5 "fmt"
6 "log" 6 "log"
7 "reflect"
8 "strings" 7 "strings"
9 8
10 "github.com/hashicorp/hcl2/hcl" 9 "github.com/hashicorp/hcl2/hcl"
@@ -134,7 +133,8 @@ func (n *EvalDiff) Eval(ctx EvalContext) (interface{}, error) {
134 // Should be caught during validation, so we don't bother with a pretty error here 133 // Should be caught during validation, so we don't bother with a pretty error here
135 return nil, fmt.Errorf("provider does not support resource type %q", n.Addr.Resource.Type) 134 return nil, fmt.Errorf("provider does not support resource type %q", n.Addr.Resource.Type)
136 } 135 }
137 keyData := EvalDataForInstanceKey(n.Addr.Key) 136 forEach, _ := evaluateResourceForEachExpression(n.Config.ForEach, ctx)
137 keyData := EvalDataForInstanceKey(n.Addr.Key, forEach)
138 configVal, _, configDiags := ctx.EvaluateBlock(config.Config, schema, nil, keyData) 138 configVal, _, configDiags := ctx.EvaluateBlock(config.Config, schema, nil, keyData)
139 diags = diags.Append(configDiags) 139 diags = diags.Append(configDiags)
140 if configDiags.HasErrors() { 140 if configDiags.HasErrors() {
@@ -174,6 +174,20 @@ func (n *EvalDiff) Eval(ctx EvalContext) (interface{}, error) {
174 } 174 }
175 } 175 }
176 176
177 log.Printf("[TRACE] Re-validating config for %q", n.Addr.Absolute(ctx.Path()))
178 // Allow the provider to validate the final set of values.
179 // The config was statically validated early on, but there may have been
180 // unknown values which the provider could not validate at the time.
181 validateResp := provider.ValidateResourceTypeConfig(
182 providers.ValidateResourceTypeConfigRequest{
183 TypeName: n.Addr.Resource.Type,
184 Config: configVal,
185 },
186 )
187 if validateResp.Diagnostics.HasErrors() {
188 return nil, validateResp.Diagnostics.InConfigBody(config.Config).Err()
189 }
190
177 // The provider gets an opportunity to customize the proposed new value, 191 // The provider gets an opportunity to customize the proposed new value,
178 // which in turn produces the _planned_ new value. 192 // which in turn produces the _planned_ new value.
179 resp := provider.PlanResourceChange(providers.PlanResourceChangeRequest{ 193 resp := provider.PlanResourceChange(providers.PlanResourceChangeRequest{
@@ -448,8 +462,9 @@ func (n *EvalDiff) Eval(ctx EvalContext) (interface{}, error) {
448 // must _also_ record the returned change in the active plan, 462 // must _also_ record the returned change in the active plan,
449 // which the expression evaluator will use in preference to this 463 // which the expression evaluator will use in preference to this
450 // incomplete value recorded in the state. 464 // incomplete value recorded in the state.
451 Status: states.ObjectPlanned, 465 Status: states.ObjectPlanned,
452 Value: plannedNewVal, 466 Value: plannedNewVal,
467 Private: plannedPrivate,
453 } 468 }
454 } 469 }
455 470
@@ -517,7 +532,7 @@ func processIgnoreChangesIndividual(prior, proposed cty.Value, ignoreChanges []h
517 // away any deeper values we already produced at that point. 532 // away any deeper values we already produced at that point.
518 var ignoreTraversal hcl.Traversal 533 var ignoreTraversal hcl.Traversal
519 for i, candidate := range ignoreChangesPath { 534 for i, candidate := range ignoreChangesPath {
520 if reflect.DeepEqual(path, candidate) { 535 if path.Equals(candidate) {
521 ignoreTraversal = ignoreChanges[i] 536 ignoreTraversal = ignoreChanges[i]
522 } 537 }
523 } 538 }
@@ -790,6 +805,7 @@ func (n *EvalDiffDestroy) Eval(ctx EvalContext) (interface{}, error) {
790 Before: state.Value, 805 Before: state.Value,
791 After: cty.NullVal(cty.DynamicPseudoType), 806 After: cty.NullVal(cty.DynamicPseudoType),
792 }, 807 },
808 Private: state.Private,
793 ProviderAddr: n.ProviderAddr, 809 ProviderAddr: n.ProviderAddr,
794 } 810 }
795 811
diff --git a/vendor/github.com/hashicorp/terraform/terraform/eval_for_each.go b/vendor/github.com/hashicorp/terraform/terraform/eval_for_each.go
new file mode 100644
index 0000000..b86bf37
--- /dev/null
+++ b/vendor/github.com/hashicorp/terraform/terraform/eval_for_each.go
@@ -0,0 +1,85 @@
1package terraform
2
3import (
4 "fmt"
5
6 "github.com/hashicorp/hcl2/hcl"
7 "github.com/hashicorp/terraform/tfdiags"
8 "github.com/zclconf/go-cty/cty"
9)
10
11// evaluateResourceForEachExpression interprets a "for_each" argument on a resource.
12//
13// Returns a cty.Value map, and diagnostics if necessary. It will return nil if
14// the expression is nil, and is used to distinguish between an unset for_each and an
15// empty map
16func evaluateResourceForEachExpression(expr hcl.Expression, ctx EvalContext) (forEach map[string]cty.Value, diags tfdiags.Diagnostics) {
17 forEachMap, known, diags := evaluateResourceForEachExpressionKnown(expr, ctx)
18 if !known {
19 // Attach a diag as we do with count, with the same downsides
20 diags = diags.Append(&hcl.Diagnostic{
21 Severity: hcl.DiagError,
22 Summary: "Invalid forEach argument",
23 Detail: `The "for_each" value depends on resource attributes that cannot be determined until apply, so Terraform cannot predict how many instances will be created. To work around this, use the -target argument to first apply only the resources that the for_each depends on.`,
24 })
25 }
26 return forEachMap, diags
27}
28
29// evaluateResourceForEachExpressionKnown is like evaluateResourceForEachExpression
30// except that it handles an unknown result by returning an empty map and
31// a known = false, rather than by reporting the unknown value as an error
32// diagnostic.
33func evaluateResourceForEachExpressionKnown(expr hcl.Expression, ctx EvalContext) (forEach map[string]cty.Value, known bool, diags tfdiags.Diagnostics) {
34 if expr == nil {
35 return nil, true, nil
36 }
37
38 forEachVal, forEachDiags := ctx.EvaluateExpr(expr, cty.DynamicPseudoType, nil)
39 diags = diags.Append(forEachDiags)
40 if diags.HasErrors() {
41 return nil, true, diags
42 }
43
44 switch {
45 case forEachVal.IsNull():
46 diags = diags.Append(&hcl.Diagnostic{
47 Severity: hcl.DiagError,
48 Summary: "Invalid for_each argument",
49 Detail: `The given "for_each" argument value is unsuitable: the given "for_each" argument value is null. A map, or set of strings is allowed.`,
50 Subject: expr.Range().Ptr(),
51 })
52 return nil, true, diags
53 case !forEachVal.IsKnown():
54 return map[string]cty.Value{}, false, diags
55 }
56
57 if !forEachVal.CanIterateElements() || forEachVal.Type().IsListType() {
58 diags = diags.Append(&hcl.Diagnostic{
59 Severity: hcl.DiagError,
60 Summary: "Invalid for_each argument",
61 Detail: fmt.Sprintf(`The given "for_each" argument value is unsuitable: the "for_each" argument must be a map, or set of strings, and you have provided a value of type %s.`, forEachVal.Type().FriendlyName()),
62 Subject: expr.Range().Ptr(),
63 })
64 return nil, true, diags
65 }
66
67 if forEachVal.Type().IsSetType() {
68 if forEachVal.Type().ElementType() != cty.String {
69 diags = diags.Append(&hcl.Diagnostic{
70 Severity: hcl.DiagError,
71 Summary: "Invalid for_each set argument",
72 Detail: fmt.Sprintf(`The given "for_each" argument value is unsuitable: "for_each" supports maps and sets of strings, but you have provided a set containing type %s.`, forEachVal.Type().ElementType().FriendlyName()),
73 Subject: expr.Range().Ptr(),
74 })
75 return nil, true, diags
76 }
77 }
78
79 // If the map is empty ({}), return an empty map, because cty will return nil when representing {} AsValueMap
80 if forEachVal.LengthInt() == 0 {
81 return map[string]cty.Value{}, true, diags
82 }
83
84 return forEachVal.AsValueMap(), true, nil
85}
diff --git a/vendor/github.com/hashicorp/terraform/terraform/eval_read_data.go b/vendor/github.com/hashicorp/terraform/terraform/eval_read_data.go
index 34f2d60..4999480 100644
--- a/vendor/github.com/hashicorp/terraform/terraform/eval_read_data.go
+++ b/vendor/github.com/hashicorp/terraform/terraform/eval_read_data.go
@@ -95,7 +95,8 @@ func (n *EvalReadData) Eval(ctx EvalContext) (interface{}, error) {
95 objTy := schema.ImpliedType() 95 objTy := schema.ImpliedType()
96 priorVal := cty.NullVal(objTy) // for data resources, prior is always null because we start fresh every time 96 priorVal := cty.NullVal(objTy) // for data resources, prior is always null because we start fresh every time
97 97
98 keyData := EvalDataForInstanceKey(n.Addr.Key) 98 forEach, _ := evaluateResourceForEachExpression(n.Config.ForEach, ctx)
99 keyData := EvalDataForInstanceKey(n.Addr.Key, forEach)
99 100
100 var configDiags tfdiags.Diagnostics 101 var configDiags tfdiags.Diagnostics
101 configVal, _, configDiags = ctx.EvaluateBlock(config.Config, schema, nil, keyData) 102 configVal, _, configDiags = ctx.EvaluateBlock(config.Config, schema, nil, keyData)
@@ -179,6 +180,17 @@ func (n *EvalReadData) Eval(ctx EvalContext) (interface{}, error) {
179 ) 180 )
180 } 181 }
181 182
183 log.Printf("[TRACE] Re-validating config for %s", absAddr)
184 validateResp := provider.ValidateDataSourceConfig(
185 providers.ValidateDataSourceConfigRequest{
186 TypeName: n.Addr.Resource.Type,
187 Config: configVal,
188 },
189 )
190 if validateResp.Diagnostics.HasErrors() {
191 return nil, validateResp.Diagnostics.InConfigBody(n.Config.Config).Err()
192 }
193
182 // If we get down here then our configuration is complete and we're read 194 // If we get down here then our configuration is complete and we're read
183 // to actually call the provider to read the data. 195 // to actually call the provider to read the data.
184 log.Printf("[TRACE] EvalReadData: %s configuration is complete, so reading from provider", absAddr) 196 log.Printf("[TRACE] EvalReadData: %s configuration is complete, so reading from provider", absAddr)
diff --git a/vendor/github.com/hashicorp/terraform/terraform/eval_refresh.go b/vendor/github.com/hashicorp/terraform/terraform/eval_refresh.go
index 03bc948..4dfb5b4 100644
--- a/vendor/github.com/hashicorp/terraform/terraform/eval_refresh.go
+++ b/vendor/github.com/hashicorp/terraform/terraform/eval_refresh.go
@@ -55,6 +55,7 @@ func (n *EvalRefresh) Eval(ctx EvalContext) (interface{}, error) {
55 req := providers.ReadResourceRequest{ 55 req := providers.ReadResourceRequest{
56 TypeName: n.Addr.Resource.Type, 56 TypeName: n.Addr.Resource.Type,
57 PriorState: priorVal, 57 PriorState: priorVal,
58 Private: state.Private,
58 } 59 }
59 60
60 provider := *n.Provider 61 provider := *n.Provider
@@ -87,6 +88,7 @@ func (n *EvalRefresh) Eval(ctx EvalContext) (interface{}, error) {
87 88
88 newState := state.DeepCopy() 89 newState := state.DeepCopy()
89 newState.Value = resp.NewState 90 newState.Value = resp.NewState
91 newState.Private = resp.Private
90 92
91 // Call post-refresh hook 93 // Call post-refresh hook
92 err = ctx.Hook(func(h Hook) (HookAction, error) { 94 err = ctx.Hook(func(h Hook) (HookAction, error) {
diff --git a/vendor/github.com/hashicorp/terraform/terraform/eval_state.go b/vendor/github.com/hashicorp/terraform/terraform/eval_state.go
index d506ce3..b611113 100644
--- a/vendor/github.com/hashicorp/terraform/terraform/eval_state.go
+++ b/vendor/github.com/hashicorp/terraform/terraform/eval_state.go
@@ -424,15 +424,21 @@ func (n *EvalWriteResourceState) Eval(ctx EvalContext) (interface{}, error) {
424 return nil, diags.Err() 424 return nil, diags.Err()
425 } 425 }
426 426
427 // Currently we ony support NoEach and EachList, because for_each support
428 // is not fully wired up across Terraform. Once for_each support is added,
429 // we'll need to handle that here too, setting states.EachMap if the
430 // assigned expression is a map.
431 eachMode := states.NoEach 427 eachMode := states.NoEach
432 if count >= 0 { // -1 signals "count not set" 428 if count >= 0 { // -1 signals "count not set"
433 eachMode = states.EachList 429 eachMode = states.EachList
434 } 430 }
435 431
432 forEach, forEachDiags := evaluateResourceForEachExpression(n.Config.ForEach, ctx)
433 diags = diags.Append(forEachDiags)
434 if forEachDiags.HasErrors() {
435 return nil, diags.Err()
436 }
437
438 if forEach != nil {
439 eachMode = states.EachMap
440 }
441
436 // This method takes care of all of the business logic of updating this 442 // This method takes care of all of the business logic of updating this
437 // while ensuring that any existing instances are preserved, etc. 443 // while ensuring that any existing instances are preserved, etc.
438 state.SetResourceMeta(absAddr, eachMode, n.ProviderAddr) 444 state.SetResourceMeta(absAddr, eachMode, n.ProviderAddr)
diff --git a/vendor/github.com/hashicorp/terraform/terraform/eval_validate.go b/vendor/github.com/hashicorp/terraform/terraform/eval_validate.go
index 0033e01..6b809a2 100644
--- a/vendor/github.com/hashicorp/terraform/terraform/eval_validate.go
+++ b/vendor/github.com/hashicorp/terraform/terraform/eval_validate.go
@@ -112,11 +112,12 @@ func (n *EvalValidateProvider) Eval(ctx EvalContext) (interface{}, error) {
112// the configuration of a provisioner belonging to a resource. The provisioner 112// the configuration of a provisioner belonging to a resource. The provisioner
113// config is expected to contain the merged connection configurations. 113// config is expected to contain the merged connection configurations.
114type EvalValidateProvisioner struct { 114type EvalValidateProvisioner struct {
115 ResourceAddr addrs.Resource 115 ResourceAddr addrs.Resource
116 Provisioner *provisioners.Interface 116 Provisioner *provisioners.Interface
117 Schema **configschema.Block 117 Schema **configschema.Block
118 Config *configs.Provisioner 118 Config *configs.Provisioner
119 ResourceHasCount bool 119 ResourceHasCount bool
120 ResourceHasForEach bool
120} 121}
121 122
122func (n *EvalValidateProvisioner) Eval(ctx EvalContext) (interface{}, error) { 123func (n *EvalValidateProvisioner) Eval(ctx EvalContext) (interface{}, error) {
@@ -198,6 +199,19 @@ func (n *EvalValidateProvisioner) evaluateBlock(ctx EvalContext, body hcl.Body,
198 // expected type since none of these elements are known at this 199 // expected type since none of these elements are known at this
199 // point anyway. 200 // point anyway.
200 selfAddr = n.ResourceAddr.Instance(addrs.IntKey(0)) 201 selfAddr = n.ResourceAddr.Instance(addrs.IntKey(0))
202 } else if n.ResourceHasForEach {
203 // For a resource that has for_each, we allow each.value and each.key
204 // but don't know at this stage what it will return.
205 keyData = InstanceKeyEvalData{
206 EachKey: cty.UnknownVal(cty.String),
207 EachValue: cty.DynamicVal,
208 }
209
210 // "self" can't point to an unknown key, but we'll force it to be
211 // key "" here, which should return an unknown value of the
212 // expected type since none of these elements are known at
213 // this point anyway.
214 selfAddr = n.ResourceAddr.Instance(addrs.StringKey(""))
201 } 215 }
202 216
203 return ctx.EvaluateBlock(body, schema, selfAddr, keyData) 217 return ctx.EvaluateBlock(body, schema, selfAddr, keyData)
@@ -370,10 +384,21 @@ func (n *EvalValidateResource) Eval(ctx EvalContext) (interface{}, error) {
370 diags = diags.Append(countDiags) 384 diags = diags.Append(countDiags)
371 } 385 }
372 386
387 if n.Config.ForEach != nil {
388 keyData = InstanceKeyEvalData{
389 EachKey: cty.UnknownVal(cty.String),
390 EachValue: cty.UnknownVal(cty.DynamicPseudoType),
391 }
392
393 // Evaluate the for_each expression here so we can expose the diagnostics
394 forEachDiags := n.validateForEach(ctx, n.Config.ForEach)
395 diags = diags.Append(forEachDiags)
396 }
397
373 for _, traversal := range n.Config.DependsOn { 398 for _, traversal := range n.Config.DependsOn {
374 ref, refDiags := addrs.ParseRef(traversal) 399 ref, refDiags := addrs.ParseRef(traversal)
375 diags = diags.Append(refDiags) 400 diags = diags.Append(refDiags)
376 if len(ref.Remaining) != 0 { 401 if !refDiags.HasErrors() && len(ref.Remaining) != 0 {
377 diags = diags.Append(&hcl.Diagnostic{ 402 diags = diags.Append(&hcl.Diagnostic{
378 Severity: hcl.DiagError, 403 Severity: hcl.DiagError,
379 Summary: "Invalid depends_on reference", 404 Summary: "Invalid depends_on reference",
@@ -542,3 +567,18 @@ func (n *EvalValidateResource) validateCount(ctx EvalContext, expr hcl.Expressio
542 567
543 return diags 568 return diags
544} 569}
570
571func (n *EvalValidateResource) validateForEach(ctx EvalContext, expr hcl.Expression) (diags tfdiags.Diagnostics) {
572 _, known, forEachDiags := evaluateResourceForEachExpressionKnown(expr, ctx)
573 // If the value isn't known then that's the best we can do for now, but
574 // we'll check more thoroughly during the plan walk
575 if !known {
576 return diags
577 }
578
579 if forEachDiags.HasErrors() {
580 diags = diags.Append(forEachDiags)
581 }
582
583 return diags
584}
diff --git a/vendor/github.com/hashicorp/terraform/terraform/eval_variable.go b/vendor/github.com/hashicorp/terraform/terraform/eval_variable.go
index 68adf76..ea46973 100644
--- a/vendor/github.com/hashicorp/terraform/terraform/eval_variable.go
+++ b/vendor/github.com/hashicorp/terraform/terraform/eval_variable.go
@@ -12,6 +12,7 @@ import (
12 "github.com/hashicorp/terraform/addrs" 12 "github.com/hashicorp/terraform/addrs"
13 13
14 "github.com/hashicorp/terraform/config" 14 "github.com/hashicorp/terraform/config"
15 "github.com/hashicorp/terraform/config/hcl2shim"
15 "github.com/hashicorp/terraform/config/module" 16 "github.com/hashicorp/terraform/config/module"
16 "github.com/zclconf/go-cty/cty" 17 "github.com/zclconf/go-cty/cty"
17 "github.com/zclconf/go-cty/cty/convert" 18 "github.com/zclconf/go-cty/cty/convert"
@@ -60,7 +61,7 @@ func (n *EvalTypeCheckVariable) Eval(ctx EvalContext) (interface{}, error) {
60 continue 61 continue
61 } 62 }
62 63
63 if proposedValue == config.UnknownVariableValue { 64 if proposedValue == hcl2shim.UnknownVariableValue {
64 continue 65 continue
65 } 66 }
66 67
diff --git a/vendor/github.com/hashicorp/terraform/terraform/evaluate.go b/vendor/github.com/hashicorp/terraform/terraform/evaluate.go
index ab65d47..9bb6009 100644
--- a/vendor/github.com/hashicorp/terraform/terraform/evaluate.go
+++ b/vendor/github.com/hashicorp/terraform/terraform/evaluate.go
@@ -120,20 +120,24 @@ type InstanceKeyEvalData struct {
120 120
121// EvalDataForInstanceKey constructs a suitable InstanceKeyEvalData for 121// EvalDataForInstanceKey constructs a suitable InstanceKeyEvalData for
122// evaluating in a context that has the given instance key. 122// evaluating in a context that has the given instance key.
123func EvalDataForInstanceKey(key addrs.InstanceKey) InstanceKeyEvalData { 123func EvalDataForInstanceKey(key addrs.InstanceKey, forEachMap map[string]cty.Value) InstanceKeyEvalData {
124 // At the moment we don't actually implement for_each, so we only
125 // ever populate CountIndex.
126 // (When we implement for_each later we may need to reorganize this some,
127 // so that we can resolve the ambiguity that an int key may either be
128 // a count.index or an each.key where for_each is over a list.)
129
130 var countIdx cty.Value 124 var countIdx cty.Value
125 var eachKey cty.Value
126 var eachVal cty.Value
127
131 if intKey, ok := key.(addrs.IntKey); ok { 128 if intKey, ok := key.(addrs.IntKey); ok {
132 countIdx = cty.NumberIntVal(int64(intKey)) 129 countIdx = cty.NumberIntVal(int64(intKey))
133 } 130 }
134 131
132 if stringKey, ok := key.(addrs.StringKey); ok {
133 eachKey = cty.StringVal(string(stringKey))
134 eachVal = forEachMap[string(stringKey)]
135 }
136
135 return InstanceKeyEvalData{ 137 return InstanceKeyEvalData{
136 CountIndex: countIdx, 138 CountIndex: countIdx,
139 EachKey: eachKey,
140 EachValue: eachVal,
137 } 141 }
138} 142}
139 143
@@ -173,6 +177,37 @@ func (d *evaluationStateData) GetCountAttr(addr addrs.CountAttr, rng tfdiags.Sou
173 } 177 }
174} 178}
175 179
180func (d *evaluationStateData) GetForEachAttr(addr addrs.ForEachAttr, rng tfdiags.SourceRange) (cty.Value, tfdiags.Diagnostics) {
181 var diags tfdiags.Diagnostics
182 var returnVal cty.Value
183 switch addr.Name {
184
185 case "key":
186 returnVal = d.InstanceKeyData.EachKey
187 case "value":
188 returnVal = d.InstanceKeyData.EachValue
189 default:
190 diags = diags.Append(&hcl.Diagnostic{
191 Severity: hcl.DiagError,
192 Summary: `Invalid "each" attribute`,
193 Detail: fmt.Sprintf(`The "each" object does not have an attribute named %q. The supported attributes are each.key and each.value, the current key and value pair of the "for_each" attribute set.`, addr.Name),
194 Subject: rng.ToHCL().Ptr(),
195 })
196 return cty.DynamicVal, diags
197 }
198
199 if returnVal == cty.NilVal {
200 diags = diags.Append(&hcl.Diagnostic{
201 Severity: hcl.DiagError,
202 Summary: `Reference to "each" in context without for_each`,
203 Detail: fmt.Sprintf(`The "each" object can be used only in "resource" blocks, and only when the "for_each" argument is set.`),
204 Subject: rng.ToHCL().Ptr(),
205 })
206 return cty.UnknownVal(cty.DynamicPseudoType), diags
207 }
208 return returnVal, diags
209}
210
176func (d *evaluationStateData) GetInputVariable(addr addrs.InputVariable, rng tfdiags.SourceRange) (cty.Value, tfdiags.Diagnostics) { 211func (d *evaluationStateData) GetInputVariable(addr addrs.InputVariable, rng tfdiags.SourceRange) (cty.Value, tfdiags.Diagnostics) {
177 var diags tfdiags.Diagnostics 212 var diags tfdiags.Diagnostics
178 213
@@ -569,7 +604,7 @@ func (d *evaluationStateData) GetResourceInstance(addr addrs.ResourceInstance, r
569 } 604 }
570 case states.EachMap: 605 case states.EachMap:
571 multi = key == addrs.NoKey 606 multi = key == addrs.NoKey
572 if _, ok := addr.Key.(addrs.IntKey); !multi && !ok { 607 if _, ok := addr.Key.(addrs.StringKey); !multi && !ok {
573 diags = diags.Append(&hcl.Diagnostic{ 608 diags = diags.Append(&hcl.Diagnostic{
574 Severity: hcl.DiagError, 609 Severity: hcl.DiagError,
575 Summary: "Invalid resource index", 610 Summary: "Invalid resource index",
@@ -696,7 +731,7 @@ func (d *evaluationStateData) getResourceInstancesAll(addr addrs.Resource, rng t
696 ty := schema.ImpliedType() 731 ty := schema.ImpliedType()
697 key := addrs.IntKey(i) 732 key := addrs.IntKey(i)
698 is, exists := rs.Instances[key] 733 is, exists := rs.Instances[key]
699 if exists { 734 if exists && is.Current != nil {
700 instAddr := addr.Instance(key).Absolute(d.ModulePath) 735 instAddr := addr.Instance(key).Absolute(d.ModulePath)
701 736
702 // Prefer pending value in plan if present. See getResourceInstanceSingle 737 // Prefer pending value in plan if present. See getResourceInstanceSingle
diff --git a/vendor/github.com/hashicorp/terraform/terraform/interpolate.go b/vendor/github.com/hashicorp/terraform/terraform/interpolate.go
index 26c1857..97bb1f6 100644
--- a/vendor/github.com/hashicorp/terraform/terraform/interpolate.go
+++ b/vendor/github.com/hashicorp/terraform/terraform/interpolate.go
@@ -11,16 +11,11 @@ import (
11 "github.com/hashicorp/hil" 11 "github.com/hashicorp/hil"
12 "github.com/hashicorp/hil/ast" 12 "github.com/hashicorp/hil/ast"
13 "github.com/hashicorp/terraform/config" 13 "github.com/hashicorp/terraform/config"
14 "github.com/hashicorp/terraform/config/hcl2shim"
14 "github.com/hashicorp/terraform/config/module" 15 "github.com/hashicorp/terraform/config/module"
15 "github.com/hashicorp/terraform/flatmap" 16 "github.com/hashicorp/terraform/flatmap"
16) 17)
17 18
18const (
19 // VarEnvPrefix is the prefix of variables that are read from
20 // the environment to set variables here.
21 VarEnvPrefix = "TF_VAR_"
22)
23
24// Interpolater is the structure responsible for determining the values 19// Interpolater is the structure responsible for determining the values
25// for interpolations such as `aws_instance.foo.bar`. 20// for interpolations such as `aws_instance.foo.bar`.
26type Interpolater struct { 21type Interpolater struct {
@@ -71,7 +66,7 @@ func (i *Interpolater) valueCountVar(
71func unknownVariable() ast.Variable { 66func unknownVariable() ast.Variable {
72 return ast.Variable{ 67 return ast.Variable{
73 Type: ast.TypeUnknown, 68 Type: ast.TypeUnknown,
74 Value: config.UnknownVariableValue, 69 Value: hcl2shim.UnknownVariableValue,
75 } 70 }
76} 71}
77 72
@@ -659,7 +654,7 @@ func (i *Interpolater) interpolateComplexTypeAttribute(
659 // ".#" count field is marked as unknown to indicate "this whole list is 654 // ".#" count field is marked as unknown to indicate "this whole list is
660 // unknown". We must honor that meaning here so computed references can be 655 // unknown". We must honor that meaning here so computed references can be
661 // treated properly during the plan phase. 656 // treated properly during the plan phase.
662 if lengthAttr == config.UnknownVariableValue { 657 if lengthAttr == hcl2shim.UnknownVariableValue {
663 return unknownVariable(), nil 658 return unknownVariable(), nil
664 } 659 }
665 660
@@ -675,7 +670,7 @@ func (i *Interpolater) interpolateComplexTypeAttribute(
675 // ".%" count field is marked as unknown to indicate "this whole list is 670 // ".%" count field is marked as unknown to indicate "this whole list is
676 // unknown". We must honor that meaning here so computed references can be 671 // unknown". We must honor that meaning here so computed references can be
677 // treated properly during the plan phase. 672 // treated properly during the plan phase.
678 if lengthAttr == config.UnknownVariableValue { 673 if lengthAttr == hcl2shim.UnknownVariableValue {
679 return unknownVariable(), nil 674 return unknownVariable(), nil
680 } 675 }
681 676
diff --git a/vendor/github.com/hashicorp/terraform/terraform/node_data_refresh.go b/vendor/github.com/hashicorp/terraform/terraform/node_data_refresh.go
index ab82163..dd92866 100644
--- a/vendor/github.com/hashicorp/terraform/terraform/node_data_refresh.go
+++ b/vendor/github.com/hashicorp/terraform/terraform/node_data_refresh.go
@@ -38,6 +38,16 @@ func (n *NodeRefreshableDataResource) DynamicExpand(ctx EvalContext) (*Graph, er
38 return nil, nil 38 return nil, nil
39 } 39 }
40 40
41 forEachMap, forEachKnown, forEachDiags := evaluateResourceForEachExpressionKnown(n.Config.ForEach, ctx)
42 if forEachDiags.HasErrors() {
43 return nil, diags.Err()
44 }
45 if !forEachKnown {
46 // If the for_each isn't known yet, we'll skip refreshing and try expansion
47 // again during the plan walk.
48 return nil, nil
49 }
50
41 // Next we need to potentially rename an instance address in the state 51 // Next we need to potentially rename an instance address in the state
42 // if we're transitioning whether "count" is set at all. 52 // if we're transitioning whether "count" is set at all.
43 fixResourceCountSetTransition(ctx, n.ResourceAddr(), count != -1) 53 fixResourceCountSetTransition(ctx, n.ResourceAddr(), count != -1)
@@ -77,6 +87,7 @@ func (n *NodeRefreshableDataResource) DynamicExpand(ctx EvalContext) (*Graph, er
77 Concrete: concreteResource, 87 Concrete: concreteResource,
78 Schema: n.Schema, 88 Schema: n.Schema,
79 Count: count, 89 Count: count,
90 ForEach: forEachMap,
80 Addr: n.ResourceAddr(), 91 Addr: n.ResourceAddr(),
81 }, 92 },
82 93
@@ -85,6 +96,7 @@ func (n *NodeRefreshableDataResource) DynamicExpand(ctx EvalContext) (*Graph, er
85 &OrphanResourceCountTransformer{ 96 &OrphanResourceCountTransformer{
86 Concrete: concreteResourceDestroyable, 97 Concrete: concreteResourceDestroyable,
87 Count: count, 98 Count: count,
99 ForEach: forEachMap,
88 Addr: n.ResourceAddr(), 100 Addr: n.ResourceAddr(),
89 State: state, 101 State: state,
90 }, 102 },
diff --git a/vendor/github.com/hashicorp/terraform/terraform/node_resource_abstract.go b/vendor/github.com/hashicorp/terraform/terraform/node_resource_abstract.go
index 3a0570c..d147b42 100644
--- a/vendor/github.com/hashicorp/terraform/terraform/node_resource_abstract.go
+++ b/vendor/github.com/hashicorp/terraform/terraform/node_resource_abstract.go
@@ -187,6 +187,8 @@ func (n *NodeAbstractResource) References() []*addrs.Reference {
187 187
188 refs, _ := lang.ReferencesInExpr(c.Count) 188 refs, _ := lang.ReferencesInExpr(c.Count)
189 result = append(result, refs...) 189 result = append(result, refs...)
190 refs, _ = lang.ReferencesInExpr(c.ForEach)
191 result = append(result, refs...)
190 refs, _ = lang.ReferencesInBlock(c.Config, n.Schema) 192 refs, _ = lang.ReferencesInBlock(c.Config, n.Schema)
191 result = append(result, refs...) 193 result = append(result, refs...)
192 if c.Managed != nil { 194 if c.Managed != nil {
@@ -238,21 +240,31 @@ func (n *NodeAbstractResourceInstance) References() []*addrs.Reference {
238 // need to do a little work here to massage this to the form we now 240 // need to do a little work here to massage this to the form we now
239 // want. 241 // want.
240 var result []*addrs.Reference 242 var result []*addrs.Reference
241 for _, addr := range s.Current.Dependencies {
242 if addr == nil {
243 // Should never happen; indicates a bug in the state loader
244 panic(fmt.Sprintf("dependencies for current object on %s contains nil address", n.ResourceInstanceAddr()))
245 }
246 243
247 // This is a little weird: we need to manufacture an addrs.Reference 244 // It is (apparently) possible for s.Current to be nil. This proved
248 // with a fake range here because the state isn't something we can 245 // difficult to reproduce, so we will fix the symptom here and hope
249 // make source references into. 246 // to find the root cause another time.
250 result = append(result, &addrs.Reference{ 247 //
251 Subject: addr, 248 // https://github.com/hashicorp/terraform/issues/21407
252 SourceRange: tfdiags.SourceRange{ 249 if s.Current == nil {
253 Filename: "(state file)", 250 log.Printf("[WARN] no current state found for %s", n.Name())
254 }, 251 } else {
255 }) 252 for _, addr := range s.Current.Dependencies {
253 if addr == nil {
254 // Should never happen; indicates a bug in the state loader
255 panic(fmt.Sprintf("dependencies for current object on %s contains nil address", n.ResourceInstanceAddr()))
256 }
257
258 // This is a little weird: we need to manufacture an addrs.Reference
259 // with a fake range here because the state isn't something we can
260 // make source references into.
261 result = append(result, &addrs.Reference{
262 Subject: addr,
263 SourceRange: tfdiags.SourceRange{
264 Filename: "(state file)",
265 },
266 })
267 }
256 } 268 }
257 return result 269 return result
258 } 270 }
diff --git a/vendor/github.com/hashicorp/terraform/terraform/node_resource_apply_instance.go b/vendor/github.com/hashicorp/terraform/terraform/node_resource_apply_instance.go
index dad7bfc..d795324 100644
--- a/vendor/github.com/hashicorp/terraform/terraform/node_resource_apply_instance.go
+++ b/vendor/github.com/hashicorp/terraform/terraform/node_resource_apply_instance.go
@@ -101,13 +101,6 @@ func (n *NodeApplyableResourceInstance) References() []*addrs.Reference {
101func (n *NodeApplyableResourceInstance) EvalTree() EvalNode { 101func (n *NodeApplyableResourceInstance) EvalTree() EvalNode {
102 addr := n.ResourceInstanceAddr() 102 addr := n.ResourceInstanceAddr()
103 103
104 // State still uses legacy-style internal ids, so we need to shim to get
105 // a suitable key to use.
106 stateId := NewLegacyResourceInstanceAddress(addr).stateId()
107
108 // Determine the dependencies for the state.
109 stateDeps := n.StateReferences()
110
111 if n.Config == nil { 104 if n.Config == nil {
112 // This should not be possible, but we've got here in at least one 105 // This should not be possible, but we've got here in at least one
113 // case as discussed in the following issue: 106 // case as discussed in the following issue:
@@ -132,15 +125,15 @@ func (n *NodeApplyableResourceInstance) EvalTree() EvalNode {
132 // Eval info is different depending on what kind of resource this is 125 // Eval info is different depending on what kind of resource this is
133 switch n.Config.Mode { 126 switch n.Config.Mode {
134 case addrs.ManagedResourceMode: 127 case addrs.ManagedResourceMode:
135 return n.evalTreeManagedResource(addr, stateId, stateDeps) 128 return n.evalTreeManagedResource(addr)
136 case addrs.DataResourceMode: 129 case addrs.DataResourceMode:
137 return n.evalTreeDataResource(addr, stateId, stateDeps) 130 return n.evalTreeDataResource(addr)
138 default: 131 default:
139 panic(fmt.Errorf("unsupported resource mode %s", n.Config.Mode)) 132 panic(fmt.Errorf("unsupported resource mode %s", n.Config.Mode))
140 } 133 }
141} 134}
142 135
143func (n *NodeApplyableResourceInstance) evalTreeDataResource(addr addrs.AbsResourceInstance, stateId string, stateDeps []addrs.Referenceable) EvalNode { 136func (n *NodeApplyableResourceInstance) evalTreeDataResource(addr addrs.AbsResourceInstance) EvalNode {
144 var provider providers.Interface 137 var provider providers.Interface
145 var providerSchema *ProviderSchema 138 var providerSchema *ProviderSchema
146 var change *plans.ResourceInstanceChange 139 var change *plans.ResourceInstanceChange
@@ -206,7 +199,7 @@ func (n *NodeApplyableResourceInstance) evalTreeDataResource(addr addrs.AbsResou
206 } 199 }
207} 200}
208 201
209func (n *NodeApplyableResourceInstance) evalTreeManagedResource(addr addrs.AbsResourceInstance, stateId string, stateDeps []addrs.Referenceable) EvalNode { 202func (n *NodeApplyableResourceInstance) evalTreeManagedResource(addr addrs.AbsResourceInstance) EvalNode {
210 // Declare a bunch of variables that are used for state during 203 // Declare a bunch of variables that are used for state during
211 // evaluation. Most of this are written to by-address below. 204 // evaluation. Most of this are written to by-address below.
212 var provider providers.Interface 205 var provider providers.Interface
diff --git a/vendor/github.com/hashicorp/terraform/terraform/node_resource_plan.go b/vendor/github.com/hashicorp/terraform/terraform/node_resource_plan.go
index 633c1c4..ec4aa93 100644
--- a/vendor/github.com/hashicorp/terraform/terraform/node_resource_plan.go
+++ b/vendor/github.com/hashicorp/terraform/terraform/node_resource_plan.go
@@ -77,6 +77,11 @@ func (n *NodePlannableResource) DynamicExpand(ctx EvalContext) (*Graph, error) {
77 return nil, diags.Err() 77 return nil, diags.Err()
78 } 78 }
79 79
80 forEachMap, forEachDiags := evaluateResourceForEachExpression(n.Config.ForEach, ctx)
81 if forEachDiags.HasErrors() {
82 return nil, diags.Err()
83 }
84
80 // Next we need to potentially rename an instance address in the state 85 // Next we need to potentially rename an instance address in the state
81 // if we're transitioning whether "count" is set at all. 86 // if we're transitioning whether "count" is set at all.
82 fixResourceCountSetTransition(ctx, n.ResourceAddr(), count != -1) 87 fixResourceCountSetTransition(ctx, n.ResourceAddr(), count != -1)
@@ -119,18 +124,20 @@ func (n *NodePlannableResource) DynamicExpand(ctx EvalContext) (*Graph, error) {
119 124
120 // Start creating the steps 125 // Start creating the steps
121 steps := []GraphTransformer{ 126 steps := []GraphTransformer{
122 // Expand the count. 127 // Expand the count or for_each (if present)
123 &ResourceCountTransformer{ 128 &ResourceCountTransformer{
124 Concrete: concreteResource, 129 Concrete: concreteResource,
125 Schema: n.Schema, 130 Schema: n.Schema,
126 Count: count, 131 Count: count,
132 ForEach: forEachMap,
127 Addr: n.ResourceAddr(), 133 Addr: n.ResourceAddr(),
128 }, 134 },
129 135
130 // Add the count orphans 136 // Add the count/for_each orphans
131 &OrphanResourceCountTransformer{ 137 &OrphanResourceCountTransformer{
132 Concrete: concreteResourceOrphan, 138 Concrete: concreteResourceOrphan,
133 Count: count, 139 Count: count,
140 ForEach: forEachMap,
134 Addr: n.ResourceAddr(), 141 Addr: n.ResourceAddr(),
135 State: state, 142 State: state,
136 }, 143 },
diff --git a/vendor/github.com/hashicorp/terraform/terraform/node_resource_plan_instance.go b/vendor/github.com/hashicorp/terraform/terraform/node_resource_plan_instance.go
index 75e0bcd..0f74bbe 100644
--- a/vendor/github.com/hashicorp/terraform/terraform/node_resource_plan_instance.go
+++ b/vendor/github.com/hashicorp/terraform/terraform/node_resource_plan_instance.go
@@ -34,25 +34,18 @@ var (
34func (n *NodePlannableResourceInstance) EvalTree() EvalNode { 34func (n *NodePlannableResourceInstance) EvalTree() EvalNode {
35 addr := n.ResourceInstanceAddr() 35 addr := n.ResourceInstanceAddr()
36 36
37 // State still uses legacy-style internal ids, so we need to shim to get
38 // a suitable key to use.
39 stateId := NewLegacyResourceInstanceAddress(addr).stateId()
40
41 // Determine the dependencies for the state.
42 stateDeps := n.StateReferences()
43
44 // Eval info is different depending on what kind of resource this is 37 // Eval info is different depending on what kind of resource this is
45 switch addr.Resource.Resource.Mode { 38 switch addr.Resource.Resource.Mode {
46 case addrs.ManagedResourceMode: 39 case addrs.ManagedResourceMode:
47 return n.evalTreeManagedResource(addr, stateId, stateDeps) 40 return n.evalTreeManagedResource(addr)
48 case addrs.DataResourceMode: 41 case addrs.DataResourceMode:
49 return n.evalTreeDataResource(addr, stateId, stateDeps) 42 return n.evalTreeDataResource(addr)
50 default: 43 default:
51 panic(fmt.Errorf("unsupported resource mode %s", n.Config.Mode)) 44 panic(fmt.Errorf("unsupported resource mode %s", n.Config.Mode))
52 } 45 }
53} 46}
54 47
55func (n *NodePlannableResourceInstance) evalTreeDataResource(addr addrs.AbsResourceInstance, stateId string, stateDeps []addrs.Referenceable) EvalNode { 48func (n *NodePlannableResourceInstance) evalTreeDataResource(addr addrs.AbsResourceInstance) EvalNode {
56 config := n.Config 49 config := n.Config
57 var provider providers.Interface 50 var provider providers.Interface
58 var providerSchema *ProviderSchema 51 var providerSchema *ProviderSchema
@@ -147,7 +140,7 @@ func (n *NodePlannableResourceInstance) evalTreeDataResource(addr addrs.AbsResou
147 } 140 }
148} 141}
149 142
150func (n *NodePlannableResourceInstance) evalTreeManagedResource(addr addrs.AbsResourceInstance, stateId string, stateDeps []addrs.Referenceable) EvalNode { 143func (n *NodePlannableResourceInstance) evalTreeManagedResource(addr addrs.AbsResourceInstance) EvalNode {
151 config := n.Config 144 config := n.Config
152 var provider providers.Interface 145 var provider providers.Interface
153 var providerSchema *ProviderSchema 146 var providerSchema *ProviderSchema
diff --git a/vendor/github.com/hashicorp/terraform/terraform/node_resource_refresh.go b/vendor/github.com/hashicorp/terraform/terraform/node_resource_refresh.go
index 9506023..9daeabf 100644
--- a/vendor/github.com/hashicorp/terraform/terraform/node_resource_refresh.go
+++ b/vendor/github.com/hashicorp/terraform/terraform/node_resource_refresh.go
@@ -39,6 +39,11 @@ func (n *NodeRefreshableManagedResource) DynamicExpand(ctx EvalContext) (*Graph,
39 return nil, diags.Err() 39 return nil, diags.Err()
40 } 40 }
41 41
42 forEachMap, forEachDiags := evaluateResourceForEachExpression(n.Config.ForEach, ctx)
43 if forEachDiags.HasErrors() {
44 return nil, diags.Err()
45 }
46
42 // Next we need to potentially rename an instance address in the state 47 // Next we need to potentially rename an instance address in the state
43 // if we're transitioning whether "count" is set at all. 48 // if we're transitioning whether "count" is set at all.
44 fixResourceCountSetTransition(ctx, n.ResourceAddr(), count != -1) 49 fixResourceCountSetTransition(ctx, n.ResourceAddr(), count != -1)
@@ -66,6 +71,7 @@ func (n *NodeRefreshableManagedResource) DynamicExpand(ctx EvalContext) (*Graph,
66 Concrete: concreteResource, 71 Concrete: concreteResource,
67 Schema: n.Schema, 72 Schema: n.Schema,
68 Count: count, 73 Count: count,
74 ForEach: forEachMap,
69 Addr: n.ResourceAddr(), 75 Addr: n.ResourceAddr(),
70 }, 76 },
71 77
@@ -74,6 +80,7 @@ func (n *NodeRefreshableManagedResource) DynamicExpand(ctx EvalContext) (*Graph,
74 &OrphanResourceCountTransformer{ 80 &OrphanResourceCountTransformer{
75 Concrete: concreteResource, 81 Concrete: concreteResource,
76 Count: count, 82 Count: count,
83 ForEach: forEachMap,
77 Addr: n.ResourceAddr(), 84 Addr: n.ResourceAddr(),
78 State: state, 85 State: state,
79 }, 86 },
diff --git a/vendor/github.com/hashicorp/terraform/terraform/node_resource_validate.go b/vendor/github.com/hashicorp/terraform/terraform/node_resource_validate.go
index 734ec9e..efa657b 100644
--- a/vendor/github.com/hashicorp/terraform/terraform/node_resource_validate.go
+++ b/vendor/github.com/hashicorp/terraform/terraform/node_resource_validate.go
@@ -54,6 +54,7 @@ func (n *NodeValidatableResource) EvalTree() EvalNode {
54 54
55 if managed := n.Config.Managed; managed != nil { 55 if managed := n.Config.Managed; managed != nil {
56 hasCount := n.Config.Count != nil 56 hasCount := n.Config.Count != nil
57 hasForEach := n.Config.ForEach != nil
57 58
58 // Validate all the provisioners 59 // Validate all the provisioners
59 for _, p := range managed.Provisioners { 60 for _, p := range managed.Provisioners {
@@ -74,11 +75,12 @@ func (n *NodeValidatableResource) EvalTree() EvalNode {
74 Schema: &provisionerSchema, 75 Schema: &provisionerSchema,
75 }, 76 },
76 &EvalValidateProvisioner{ 77 &EvalValidateProvisioner{
77 ResourceAddr: addr.Resource, 78 ResourceAddr: addr.Resource,
78 Provisioner: &provisioner, 79 Provisioner: &provisioner,
79 Schema: &provisionerSchema, 80 Schema: &provisionerSchema,
80 Config: p, 81 Config: p,
81 ResourceHasCount: hasCount, 82 ResourceHasCount: hasCount,
83 ResourceHasForEach: hasForEach,
82 }, 84 },
83 ) 85 )
84 } 86 }
diff --git a/vendor/github.com/hashicorp/terraform/terraform/provider_mock.go b/vendor/github.com/hashicorp/terraform/terraform/provider_mock.go
index 4ae346d..8eede48 100644
--- a/vendor/github.com/hashicorp/terraform/terraform/provider_mock.go
+++ b/vendor/github.com/hashicorp/terraform/terraform/provider_mock.go
@@ -8,7 +8,6 @@ import (
8 "github.com/zclconf/go-cty/cty" 8 "github.com/zclconf/go-cty/cty"
9 ctyjson "github.com/zclconf/go-cty/cty/json" 9 ctyjson "github.com/zclconf/go-cty/cty/json"
10 10
11 "github.com/hashicorp/terraform/config"
12 "github.com/hashicorp/terraform/config/hcl2shim" 11 "github.com/hashicorp/terraform/config/hcl2shim"
13 "github.com/hashicorp/terraform/providers" 12 "github.com/hashicorp/terraform/providers"
14 "github.com/hashicorp/terraform/tfdiags" 13 "github.com/hashicorp/terraform/tfdiags"
@@ -391,7 +390,7 @@ func (p *MockProvider) ApplyResourceChange(r providers.ApplyResourceChangeReques
391 for k, new := range plannedMap { 390 for k, new := range plannedMap {
392 old := priorMap[k] 391 old := priorMap[k]
393 newComputed := false 392 newComputed := false
394 if new == config.UnknownVariableValue { 393 if new == hcl2shim.UnknownVariableValue {
395 new = "" 394 new = ""
396 newComputed = true 395 newComputed = true
397 } 396 }
diff --git a/vendor/github.com/hashicorp/terraform/terraform/resource_address.go b/vendor/github.com/hashicorp/terraform/terraform/resource_address.go
index 156ecf5..5d8261a 100644
--- a/vendor/github.com/hashicorp/terraform/terraform/resource_address.go
+++ b/vendor/github.com/hashicorp/terraform/terraform/resource_address.go
@@ -365,6 +365,8 @@ func NewLegacyResourceInstanceAddress(addr addrs.AbsResourceInstance) *ResourceA
365 ret.Index = -1 365 ret.Index = -1
366 } else if ik, ok := addr.Resource.Key.(addrs.IntKey); ok { 366 } else if ik, ok := addr.Resource.Key.(addrs.IntKey); ok {
367 ret.Index = int(ik) 367 ret.Index = int(ik)
368 } else if _, ok := addr.Resource.Key.(addrs.StringKey); ok {
369 ret.Index = -1
368 } else { 370 } else {
369 panic(fmt.Errorf("cannot shim resource instance with key %#v to legacy ResourceAddress.Index", addr.Resource.Key)) 371 panic(fmt.Errorf("cannot shim resource instance with key %#v to legacy ResourceAddress.Index", addr.Resource.Key))
370 } 372 }
diff --git a/vendor/github.com/hashicorp/terraform/terraform/state.go b/vendor/github.com/hashicorp/terraform/terraform/state.go
index 092b690..6280fb0 100644
--- a/vendor/github.com/hashicorp/terraform/terraform/state.go
+++ b/vendor/github.com/hashicorp/terraform/terraform/state.go
@@ -1201,7 +1201,7 @@ func (m *ModuleState) prune() {
1201 } 1201 }
1202 1202
1203 for k, v := range m.Outputs { 1203 for k, v := range m.Outputs {
1204 if v.Value == config.UnknownVariableValue { 1204 if v.Value == hcl2shim.UnknownVariableValue {
1205 delete(m.Outputs, k) 1205 delete(m.Outputs, k)
1206 } 1206 }
1207 } 1207 }
@@ -1827,7 +1827,7 @@ func (s *InstanceState) MergeDiff(d *InstanceDiff) *InstanceState {
1827 continue 1827 continue
1828 } 1828 }
1829 if diff.NewComputed { 1829 if diff.NewComputed {
1830 result.Attributes[k] = config.UnknownVariableValue 1830 result.Attributes[k] = hcl2shim.UnknownVariableValue
1831 continue 1831 continue
1832 } 1832 }
1833 1833
diff --git a/vendor/github.com/hashicorp/terraform/terraform/transform_orphan_count.go b/vendor/github.com/hashicorp/terraform/terraform/transform_orphan_count.go
index eec762e..4f323a7 100644
--- a/vendor/github.com/hashicorp/terraform/terraform/transform_orphan_count.go
+++ b/vendor/github.com/hashicorp/terraform/terraform/transform_orphan_count.go
@@ -6,6 +6,7 @@ import (
6 "github.com/hashicorp/terraform/addrs" 6 "github.com/hashicorp/terraform/addrs"
7 "github.com/hashicorp/terraform/dag" 7 "github.com/hashicorp/terraform/dag"
8 "github.com/hashicorp/terraform/states" 8 "github.com/hashicorp/terraform/states"
9 "github.com/zclconf/go-cty/cty"
9) 10)
10 11
11// OrphanResourceCountTransformer is a GraphTransformer that adds orphans 12// OrphanResourceCountTransformer is a GraphTransformer that adds orphans
@@ -18,9 +19,10 @@ import (
18type OrphanResourceCountTransformer struct { 19type OrphanResourceCountTransformer struct {
19 Concrete ConcreteResourceInstanceNodeFunc 20 Concrete ConcreteResourceInstanceNodeFunc
20 21
21 Count int // Actual count of the resource, or -1 if count is not set at all 22 Count int // Actual count of the resource, or -1 if count is not set at all
22 Addr addrs.AbsResource // Addr of the resource to look for orphans 23 ForEach map[string]cty.Value // The ForEach map on the resource
23 State *states.State // Full global state 24 Addr addrs.AbsResource // Addr of the resource to look for orphans
25 State *states.State // Full global state
24} 26}
25 27
26func (t *OrphanResourceCountTransformer) Transform(g *Graph) error { 28func (t *OrphanResourceCountTransformer) Transform(g *Graph) error {
@@ -34,6 +36,10 @@ func (t *OrphanResourceCountTransformer) Transform(g *Graph) error {
34 haveKeys[key] = struct{}{} 36 haveKeys[key] = struct{}{}
35 } 37 }
36 38
39 // if for_each is set, use that transformer
40 if t.ForEach != nil {
41 return t.transformForEach(haveKeys, g)
42 }
37 if t.Count < 0 { 43 if t.Count < 0 {
38 return t.transformNoCount(haveKeys, g) 44 return t.transformNoCount(haveKeys, g)
39 } 45 }
@@ -43,6 +49,25 @@ func (t *OrphanResourceCountTransformer) Transform(g *Graph) error {
43 return t.transformCount(haveKeys, g) 49 return t.transformCount(haveKeys, g)
44} 50}
45 51
52func (t *OrphanResourceCountTransformer) transformForEach(haveKeys map[addrs.InstanceKey]struct{}, g *Graph) error {
53 for key := range haveKeys {
54 s, _ := key.(addrs.StringKey)
55 // If the key is present in our current for_each, carry on
56 if _, ok := t.ForEach[string(s)]; ok {
57 continue
58 }
59
60 abstract := NewNodeAbstractResourceInstance(t.Addr.Instance(key))
61 var node dag.Vertex = abstract
62 if f := t.Concrete; f != nil {
63 node = f(abstract)
64 }
65 log.Printf("[TRACE] OrphanResourceCount(non-zero): adding %s as %T", t.Addr, node)
66 g.Add(node)
67 }
68 return nil
69}
70
46func (t *OrphanResourceCountTransformer) transformCount(haveKeys map[addrs.InstanceKey]struct{}, g *Graph) error { 71func (t *OrphanResourceCountTransformer) transformCount(haveKeys map[addrs.InstanceKey]struct{}, g *Graph) error {
47 // Due to the logic in Transform, we only get in here if our count is 72 // Due to the logic in Transform, we only get in here if our count is
48 // at least one. 73 // at least one.
diff --git a/vendor/github.com/hashicorp/terraform/terraform/transform_resource_count.go b/vendor/github.com/hashicorp/terraform/terraform/transform_resource_count.go
index 1123790..c70a3c1 100644
--- a/vendor/github.com/hashicorp/terraform/terraform/transform_resource_count.go
+++ b/vendor/github.com/hashicorp/terraform/terraform/transform_resource_count.go
@@ -4,6 +4,7 @@ import (
4 "github.com/hashicorp/terraform/addrs" 4 "github.com/hashicorp/terraform/addrs"
5 "github.com/hashicorp/terraform/configs/configschema" 5 "github.com/hashicorp/terraform/configs/configschema"
6 "github.com/hashicorp/terraform/dag" 6 "github.com/hashicorp/terraform/dag"
7 "github.com/zclconf/go-cty/cty"
7) 8)
8 9
9// ResourceCountTransformer is a GraphTransformer that expands the count 10// ResourceCountTransformer is a GraphTransformer that expands the count
@@ -17,12 +18,13 @@ type ResourceCountTransformer struct {
17 // Count is either the number of indexed instances to create, or -1 to 18 // Count is either the number of indexed instances to create, or -1 to
18 // indicate that count is not set at all and thus a no-key instance should 19 // indicate that count is not set at all and thus a no-key instance should
19 // be created. 20 // be created.
20 Count int 21 Count int
21 Addr addrs.AbsResource 22 ForEach map[string]cty.Value
23 Addr addrs.AbsResource
22} 24}
23 25
24func (t *ResourceCountTransformer) Transform(g *Graph) error { 26func (t *ResourceCountTransformer) Transform(g *Graph) error {
25 if t.Count < 0 { 27 if t.Count < 0 && t.ForEach == nil {
26 // Negative count indicates that count is not set at all. 28 // Negative count indicates that count is not set at all.
27 addr := t.Addr.Instance(addrs.NoKey) 29 addr := t.Addr.Instance(addrs.NoKey)
28 30
@@ -37,6 +39,19 @@ func (t *ResourceCountTransformer) Transform(g *Graph) error {
37 return nil 39 return nil
38 } 40 }
39 41
42 // Add nodes related to the for_each expression
43 for key := range t.ForEach {
44 addr := t.Addr.Instance(addrs.StringKey(key))
45 abstract := NewNodeAbstractResourceInstance(addr)
46 abstract.Schema = t.Schema
47 var node dag.Vertex = abstract
48 if f := t.Concrete; f != nil {
49 node = f(abstract)
50 }
51
52 g.Add(node)
53 }
54
40 // For each count, build and add the node 55 // For each count, build and add the node
41 for i := 0; i < t.Count; i++ { 56 for i := 0; i < t.Count; i++ {
42 key := addrs.IntKey(i) 57 key := addrs.IntKey(i)
diff --git a/vendor/github.com/hashicorp/terraform/terraform/util.go b/vendor/github.com/hashicorp/terraform/terraform/util.go
index 752241a..5428cd5 100644
--- a/vendor/github.com/hashicorp/terraform/terraform/util.go
+++ b/vendor/github.com/hashicorp/terraform/terraform/util.go
@@ -2,8 +2,6 @@ package terraform
2 2
3import ( 3import (
4 "sort" 4 "sort"
5
6 "github.com/hashicorp/terraform/config"
7) 5)
8 6
9// Semaphore is a wrapper around a channel to provide 7// Semaphore is a wrapper around a channel to provide
@@ -48,10 +46,6 @@ func (s Semaphore) Release() {
48 } 46 }
49} 47}
50 48
51func resourceProvider(resourceType, explicitProvider string) string {
52 return config.ResourceProviderFullName(resourceType, explicitProvider)
53}
54
55// strSliceContains checks if a given string is contained in a slice 49// strSliceContains checks if a given string is contained in a slice
56// When anybody asks why Go needs generics, here you go. 50// When anybody asks why Go needs generics, here you go.
57func strSliceContains(haystack []string, needle string) bool { 51func strSliceContains(haystack []string, needle string) bool {
diff --git a/vendor/github.com/hashicorp/terraform/version/version.go b/vendor/github.com/hashicorp/terraform/version/version.go
index 30d7284..c30595c 100644
--- a/vendor/github.com/hashicorp/terraform/version/version.go
+++ b/vendor/github.com/hashicorp/terraform/version/version.go
@@ -11,7 +11,7 @@ import (
11) 11)
12 12
13// The main version number that is being run at the moment. 13// The main version number that is being run at the moment.
14var Version = "0.12.0" 14var Version = "0.12.6"
15 15
16// A pre-release marker for the version. If this is "" (empty string) 16// A pre-release marker for the version. If this is "" (empty string)
17// then it means that it is a final release. Otherwise, this is a pre-release 17// then it means that it is a final release. Otherwise, this is a pre-release