Martin Atkins
7b3e6b32d4
go.mod: Now targeting the Go 1.18 language
...
This means we can now use type parameter syntax where appropriate.
This commit also includes an upgrade to the golang.org/x/tools module,
in order to get a newer version of "stringer" that supports the type
parameters syntax.
2022-06-16 07:03:36 -07:00
James Bardin
0d3d95486a
Merge pull request #31218 from hashicorp/jbardin/validate-provider-local-names
...
Validate duplicate provider local names in `required_providers`
2022-06-15 13:51:38 -04:00
James Bardin
57c0deb01e
check for duplicate defaults from resource names
2022-06-15 13:32:30 -04:00
James Bardin
9db277af42
Merge pull request #31246 from hashicorp/jbardin/copy-deps-for-comparison
...
copy dependency values when sorting
2022-06-14 12:44:58 -04:00
James Bardin
e7e3d80850
Merge pull request #31223 from Kagashino/fix/cos-backend-unlock-tag
...
Backend/COS: remove COS object lock tag either when unlock remote state
2022-06-14 12:21:01 -04:00
James Bardin
f1ce3edcc5
copy dependency values when sorting
...
Expanded resource instances can initially share the same dependency
slice, so we must take care to not modify the array values when
checking the dependencies.
In the future we can convert these to a generic Set data type, as we
often need to compare for equality and take the union of multiple groups
of dependencies.
2022-06-14 11:09:27 -04:00
Laura Pacilio
cbf86e0181
Merge pull request #31240 from hashicorp/add-internals-to-sidebar
...
Add internals to the sidebar
2022-06-14 10:55:57 -04:00
Laura Pacilio
2e4b417e3c
Add internals to the sidebar
2022-06-13 17:30:11 -04:00
Craig Wright
0db75574fc
Merge pull request #31227 from pyaillet/patch-1
...
Fix a wrong usage of sudo in debian install doc
2022-06-13 14:04:47 -07:00
James Bardin
b6ddb087e1
Merge pull request #31237 from hashicorp/jbardin/update-go-getter
...
update go-getter@v1.6.2
2022-06-13 15:21:40 -04:00
James Bardin
ba5f1795ab
update go-getter@v1.6.2
2022-06-13 15:04:33 -04:00
Laura Pacilio
f6752c6cfa
Merge pull request #31204 from parkchoongho/patch-1
...
Update syntax.mdx
2022-06-13 11:20:41 -04:00
Laura Pacilio
5c43afcb0e
Merge pull request #31213 from hashicorp/add-warnings-backends
...
Revise Backends Config Page
2022-06-13 11:05:51 -04:00
James Bardin
256b113990
Merge pull request #31176 from hashicorp/jbardin/plan-destroy-configure-provider
...
Configure providers during a destroy plan
2022-06-13 09:05:24 -04:00
Park Choong Ho
7510dc4d47
Update website/docs/language/resources/syntax.mdx
...
Co-authored-by: Laura Pacilio <83350965+laurapacilio@users.noreply.github.com>
2022-06-13 17:21:37 +09:00
Pierre-Yves Aillet
2fd3da94c7
Fix a wrong usage of sudo in debian install doc
...
Currently `sudo` is applied to `echo` resulting in:
`/etc/apt/sources.list.d/terraform.list: Permission denied`
Using `echo "..." | sudo tee /etc/apt/sources.list.d/terraform.list` fix the problem
2022-06-11 16:04:10 +02:00
James Bardin
d7238d510a
skip already added provider nodes
...
We can skip providers which already have a node in the graph for their
type.
2022-06-10 10:37:58 -04:00
James Bardin
2581bc93cb
Check for duplicate types in required_providers
...
Adding multiple local names for the same provider type in
required_providers was not prevented, which can lead to ambiguous
behavior in Terraform. Providers are always indexed by the providers
fully qualified name, so duplicate local names cannot be differentiated.
2022-06-10 10:37:21 -04:00
Kagashino
cab6cee385
fix: backend/cos - remove cos object write lock either when unlock state file
2022-06-10 20:14:58 +08:00
Laura Pacilio
c4d7207230
Merge pull request #31191 from IgnacioNMiranda/patch-1
...
docs: update depends_on.mdx meta-argument
2022-06-09 16:37:32 -04:00
Laura Pacilio
fa76c1dcf0
apply suggestions from PR review
2022-06-09 14:55:12 -04:00
Martin Atkins
543e5f4971
docs: "Resource Instance Change Lifecycle" revised
...
The previous version of this document was produced in haste in order to
support the development of the new provider framework, and so it focused
only on the most important details and left some of the operations totally
unmentioned.
This new version aims to capture the full set of managed-resource-related
provider operations, documenting when Terraform Core will call them and
what the provider ought to do in order to meet Terraform Core's
expectations for a valid response.
This new version does still assume a certain amount of knowledge on the
part of the reader about broadly what Terraform does from a user
perspective and what role providers play in that process. Perhaps a future
revision will include some additional background context as well, but
this is a snapshot of what I had time to do today between other work and
so for now I focused on presenting the remaining operations in a similar
amount of detail to what was here before.
2022-06-09 10:19:43 -07:00
James Bardin
b4ff641a47
Merge pull request #31215 from hashicorp/jbardin/deprecate-backends
...
deprecate unmaintained remote state backends
2022-06-09 10:06:04 -04:00
James Bardin
0c7d39aca5
deprecate unmaintained backends
2022-06-08 18:09:25 -04:00
Laura Pacilio
53d0661785
Add warning note to each backend page
2022-06-08 16:32:01 -04:00
Laura Pacilio
89dbd6a26b
Remove overview backends page; add sensitive credentials warning to config page
2022-06-08 16:17:27 -04:00
hc-github-team-tf-core
2f1a8bbbd8
Cleanup after v1.3.0-alpha20220608 release
2022-06-08 17:31:07 +00:00
hc-github-team-tf-core
da14009ef0
Release v1.3.0-alpha20220608
2022-06-08 17:15:04 +00:00
Laura Pacilio
5bfd746696
Merge pull request #31198 from hashicorp/add-format-function-guidance
...
Add guidance about using the format function
2022-06-08 11:08:53 -04:00
Park Choong Ho
3513352300
Update syntax.mdx
...
fix wrong grammar
2022-06-08 18:37:56 +09:00
Laura Pacilio
6aa960c239
Update website/docs/language/expressions/custom-conditions.mdx
2022-06-07 17:09:42 -04:00
Laura Pacilio
9b57fc2964
Add guidance about using the format function
2022-06-07 16:44:25 -04:00
Laura Pacilio
41659a776e
Merge pull request #31185 from paullschock/patch-2
...
Add details reg. verbosity of debug log level (replace #29641 )
2022-06-06 12:25:10 -04:00
Ignacio Miranda Figueroa
68a83e48e7
docs: update depends_on.mdx meta-argument
2022-06-06 11:15:09 -04:00
Alisdair McDiarmid
6c3d50e37f
Update CHANGELOG.md
2022-06-06 11:08:19 -04:00
Alisdair McDiarmid
f8e2b3ada5
Merge pull request #31154 from hashicorp/alisdair/module-variable-optional-default
...
Add inline defaults to optional object attribute type constraints
2022-06-06 11:06:43 -04:00
James Bardin
82f47ca992
Merge pull request #31184 from hashicorp/bflad-GetProviderSchema-early-diag-return
...
Return early on GetProviderSchema RPC responses with error diagnostics
2022-06-06 09:00:59 -04:00
Paul Schock
48b06007dd
Add details reg. verbosity of debug log level
...
Update as a result of https://github.com/hashicorp/terraform/pull/29641
2022-06-03 12:17:52 -07:00
Brian Flad
0b404f4a95
Return early on GetProviderSchema RPC responses with error diagnostics
...
Reference: https://github.com/hashicorp/terraform/issues/31047
Prevent potential panics and immediately return provider-defined errors diagnostics.
Previously:
```
--- FAIL: TestGRPCProvider_GetSchema_ResponseErrorDiagnostic (0.00s)
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x70 pc=0x17fa752]
goroutine 13 [running]:
testing.tRunner.func1.2({0x191a100, 0x2236330})
/usr/local/Cellar/go/1.18.2/libexec/src/testing/testing.go:1389 +0x24e
testing.tRunner.func1()
/usr/local/Cellar/go/1.18.2/libexec/src/testing/testing.go:1392 +0x39f
panic({0x191a100, 0x2236330})
/usr/local/Cellar/go/1.18.2/libexec/src/runtime/panic.go:838 +0x207
github.com/hashicorp/terraform/internal/plugin6/convert.ProtoToConfigSchema(0x0)
/Users/bflad/src/github.com/hashicorp/terraform/internal/plugin6/convert/schema.go:110 +0x52
github.com/hashicorp/terraform/internal/plugin6/convert.ProtoToProviderSchema(...)
/Users/bflad/src/github.com/hashicorp/terraform/internal/plugin6/convert/schema.go:98
github.com/hashicorp/terraform/internal/plugin6.(*GRPCProvider).GetProviderSchema(0xc00004a200)
/Users/bflad/src/github.com/hashicorp/terraform/internal/plugin6/grpc_provider.go:152 +0x29a
github.com/hashicorp/terraform/internal/plugin6.TestGRPCProvider_GetSchema_ResponseErrorDiagnostic(0x0?)
/Users/bflad/src/github.com/hashicorp/terraform/internal/plugin6/grpc_provider_test.go:158 +0x265
testing.tRunner(0xc0001031e0, 0x1a733d8)
/usr/local/Cellar/go/1.18.2/libexec/src/testing/testing.go:1439 +0x102
created by testing.(*T).Run
/usr/local/Cellar/go/1.18.2/libexec/src/testing/testing.go:1486 +0x35f
```
Previously:
```
--- FAIL: TestGRPCProvider_GetSchema_ResponseErrorDiagnostic (0.00s)
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x70 pc=0x18a2732]
goroutine 7 [running]:
testing.tRunner.func1.2({0x1a5e720, 0x250be50})
/usr/local/Cellar/go/1.18.2/libexec/src/testing/testing.go:1389 +0x24e
testing.tRunner.func1()
/usr/local/Cellar/go/1.18.2/libexec/src/testing/testing.go:1392 +0x39f
panic({0x1a5e720, 0x250be50})
/usr/local/Cellar/go/1.18.2/libexec/src/runtime/panic.go:838 +0x207
github.com/hashicorp/terraform/internal/plugin/convert.ProtoToConfigSchema(0x0)
/Users/bflad/src/github.com/hashicorp/terraform/internal/plugin/convert/schema.go:104 +0x52
github.com/hashicorp/terraform/internal/plugin/convert.ProtoToProviderSchema(...)
/Users/bflad/src/github.com/hashicorp/terraform/internal/plugin/convert/schema.go:92
github.com/hashicorp/terraform/internal/plugin.(*GRPCProvider).GetProviderSchema(0xc00004a600)
/Users/bflad/src/github.com/hashicorp/terraform/internal/plugin/grpc_provider.go:149 +0x29a
github.com/hashicorp/terraform/internal/plugin.TestGRPCProvider_GetSchema_ResponseErrorDiagnostic(0x0?)
/Users/bflad/src/github.com/hashicorp/terraform/internal/plugin/grpc_provider_test.go:130 +0x265
testing.tRunner(0xc0001031e0, 0x1be9500)
/usr/local/Cellar/go/1.18.2/libexec/src/testing/testing.go:1439 +0x102
created by testing.(*T).Run
/usr/local/Cellar/go/1.18.2/libexec/src/testing/testing.go:1486 +0x35f
```
2022-06-03 14:27:55 -04:00
Alisdair McDiarmid
472df9686f
Update CHANGELOG.md
...
Removing items which shipped in the recent 1.2 patch release.
2022-06-02 16:47:54 -04:00
Martin Atkins
e00f0804ef
development docs: Planning Behaviors
...
For a while now we've had information equivalent to this in various
internal documents that we've referred to when designing features such as
config-driven refactoring, the "replace" planning option, and so forth.
However, so far we've not put that information in any sort of durable
public place that we can easily find and refer to when having design
discussions on GitHub and similar.
This is therefore an attempt to capture a summary of the three main design
patterns we've identified for planning-related behaviors, with a few
motivating examples of each one, in the hope that this will be a good
reference and some helpful inspiration for future design work.
It's intentionally not totally comprehensive of all planning behaviors
both because that would duplicate the end-user-oriented documentation and
because it would be burdensome to keep updating this document each time we
add anything new which might fit into these categories. However, we might
add a later feature to this document if it illustrates a new take or
different perspective on one of these patterns.
2022-06-02 10:56:29 -07:00
Laura Pacilio
6c7db7186a
Merge pull request #31171 from fractos/patch-1
...
Fix custom conditions example
2022-06-02 10:59:53 -04:00
James Bardin
619fa61f0b
have mockProvider always check it was configured
...
We do this already for other calls, but skipped UpgradeResourceState
since it wasn't previously possible to configure during a destroy plan.
2022-06-01 16:16:20 -04:00
James Bardin
38d70a1c3d
configure providers during destroy plan
...
Now that we can fully evaluate a provider configuration, make sure we
configure the provider before using it during a destroy plan.
2022-06-01 16:03:27 -04:00
James Bardin
93ff27227a
Merge pull request #31163 from hashicorp/jbardin/plan-destroy
...
Use plan graph builder for destroy
2022-06-01 15:37:13 -04:00
James Bardin
e36ee757a5
minor cleanup from review
2022-06-01 15:29:59 -04:00
James Bardin
4fb8a5a3ec
Merge pull request #31164 from hashicorp/jbardin/go-getter-security-options
...
add XTerraformGetLimit to prevent redirect loops
2022-06-01 13:04:20 -04:00
James Bardin
47f9850f02
add XTerraformGetLimit to prevent redirect loops
2022-06-01 12:46:22 -04:00
kmoe
229789f60f
Update CHANGELOG.md
2022-06-01 17:08:02 +01:00
kmoe
f341c35819
Update CHANGELOG.md
2022-06-01 16:00:08 +01:00