Commit Graph

28483 Commits

Author SHA1 Message Date
James Bardin 570b70b02f
Merge pull request #28078 from jasons42/configure-etcdv3-client-max-request-size
Expose etcd client MaxCallSendMsgSize config
2021-07-20 15:49:14 -04:00
James Bardin 8dd722ece0
Merge pull request #29167 from xiaozhu36/xiaozhu
backend/oss: Changes the DescribeEndpoint to DescribeEndpoints to fixes the unsupported sts bug
2021-07-20 15:12:31 -04:00
James Bardin 431aa0280e
Merge pull request #29157 from remilapeyre/unique-constraint
Add uniqueness constraint on workspaces name for the pg backend
2021-07-20 15:11:35 -04:00
Jason Smith 5ff9b7626b Fix broken link
Fix website-link-check failing as https://coreos.com/etcd/ 301's to https://etcd.io/. Updated link to https://etcd.io/.
2021-07-20 14:04:49 -05:00
Jason Smith 162f853841 Document max_request_bytes config 2021-07-20 14:04:47 -05:00
Jason Smith d1608d7a7f Expose etcd client MaxCallSendMsgSize config
The etcdv3 client has a default request send limit of 2.0 MiB. This change
exposes the configuration option to increase that limit enabling larger
state using the etcdv3 backend.

This also requires that the corresponding --max-request-bytes flag be
increased on the server side. The default there is 1.5 MiB.

Fixes https://github.com/hashicorp/terraform/issues/25745
2021-07-20 14:04:45 -05:00
James Bardin 271352620b
Merge pull request #29199 from hashicorp/jbardin/etcd3-unmaintained
etcdv3 backend is unmaintained
2021-07-20 14:30:11 -04:00
James Bardin dd330e5194
Merge pull request #29200 from hashicorp/jbardin/rebase-25554
manual rebase of #25554
2021-07-20 14:29:56 -04:00
James Bardin 017633f000
Merge pull request #28128 from hashicorp/jbardin/etcdv3
StateMgr must be able to return with locked state
2021-07-20 14:27:58 -04:00
James Bardin f418b9cd52 etcdv3 backend is unmaintained
There have been no responses from the codeowner for this backend, so
moving to Unmaintained status.
2021-07-20 13:59:08 -04:00
Kevin Burke c047958b57 go.mod,backend: update coreos/etcd dependency to release-3.4 branch
etcd rewrote its import path from coreos/etcd to go.etcd.io/etcd.
Changed the imports path in this commit, which also updates the code
version.

This lets us remove the github.com/ugorji/go/codec dependency, which
was pinned to a fairly old version. The net change is a loss of 30,000
lines of code in the vendor directory. (I first noticed this problem
because the outdated go/codec dependency was causing a dependency
failure when I tried to put Terraform and another project in the same
vendor directory.)

Note the version shows up funkily in go.mod, but I verified
visually it's the same commit as the "release-3.4" tag in
github.com/coreos/etcd. The etcd team plans to fix the release version
tagging in v3.5, which should be released soon.
2021-07-20 12:27:22 -04:00
James Bardin 9c20ed6185 StateMgr must be able to return with locked state
The current usage of internal remote state backends requires that
`StateMgr` be able to return an instance of `statemgr.Full` even if the
state is currently locked.
2021-07-20 12:10:34 -04:00
Alisdair McDiarmid 6d65c19134
Merge pull request #29178 from hashicorp/alisdair/fix-flapping-json-output-test-for-real
Fix flapping JSON output test properly
2021-07-16 10:05:48 -04:00
Alisdair McDiarmid a456d030db Fix flapping JSON output test properly
This commit makes the output order of the resource drift messages
stable, by building a slice of changes and sorting it by address.
2021-07-15 13:30:11 -04:00
Kristin Laemmert 0d80a74539
configs/configschema: fix missing "computed" attributes from NestedObject's ImpliedType (#29172)
* configs/configschema: fix missing "computed" attributes from NestedObject's ImpliedType

listOptionalAttrsFromObject was not including "computed" attributes in the list of optional object attributes. This is now fixed. I've also added some tests and fixed some panics and otherwise bad behavior when bad input is given. One natable change is in ImpliedType, which was panicking on an invalid nesting mode. The comment expressly states that it will return a result even when the schema is inconsistent, so I removed the panic and instead return an empty object.
2021-07-15 13:00:07 -04:00
Paddy 8bdea502ab
Add support for protocol 6 providers during init. (#29153)
Update the version constraints for what providers will be downloaded
from the registry, allowing protocol 6 providers to be downloaded from
the registry.
2021-07-15 09:39:40 -07:00
Alisdair McDiarmid cb683b1dc1
Merge pull request #29175 from hashicorp/alisdair/fix-flapping-json-output-test
Fix flapping JSON output test
2021-07-15 12:27:47 -04:00
Kristin Laemmert 563f1436eb
various docs updates (#29018)
* website/docs: add sensitivity warning to output documentation

fixes #28005

* website/docs: add note about ** to fileset documentation

closes #24220

* website/docs: add note that `dynamic` expressions aren't included in json config output

closes #28346

* website: the provider installer isn't necessarily concurrency safe

closes #28367
2021-07-15 12:22:17 -04:00
Alisdair McDiarmid c51112a30c Fix flapping JSON output test
This test would previously fail randomly due to the use of multiple
resource instances. Instance keys are iterated over as a map for
presentation, which has intentionally inconsistent ordering.

To fix this, I changed the test to use different resource addresses for
the three drift cases. I also extracted them to a separate test, and
tweaked the test helper functions to reduce the number of fatal exit
points, to make failed test debugging easier.
2021-07-15 12:03:01 -04:00
xiaozhu36 c495caafeb backend/oss: Changes the DescribeEndpoint to DescribeEndpoints to fixes the unsupported sts bug 2021-07-15 16:07:18 +08:00
Martin Atkins 3e5bfa7364 refactoring: Stubbing of the logic for handling moves
This is a whole lot of nothing right now, just stubbing out some control
flow that ultimately just leads to TODOs that cause it to do nothing at
all.

My intent here is to get this cross-cutting skeleton in place and thus
make it easier for us to collaborate on adding the meat to it, so that
it's more likely we can work on different parts separately and still get
a result that tessellates.
2021-07-14 17:37:48 -07:00
Martin Atkins 22eee529e3 addrs: MoveEndpointInModule
We previously built out addrs.UnifyMoveEndpoints with a different
implementation strategy in mind, but that design turns out to not be
viable because it forces us to move to AbsMoveable addresses too soon,
before we've done the analysis required to identify chained and nested
moves.

Instead, UnifyMoveEndpoints will return a new type MoveEndpointInModule
which conceptually represents a matching pattern which either matches or
doesn't match a particular AbsMoveable. It does this by just binding the
unified relative address from the MoveEndpoint to the module where it
was declared, and thus allows us to distinguish between the part of the
module path which applies to any instances of the given modules vs. the
user-specified part which must identify particular module instances.
2021-07-14 17:37:48 -07:00
Martin Atkins cd06572c4f addrs: ModuleInstance and AbsResourceInstance are UniqueKeyers
Since these address types are not directly comparable themselves, we use
an unexported named type around the string representation, whereby the
special type can avoid any ambiguity between string representations of
different types and thus each type only needs to worry about possible
ambiguity of its _own_ string representation.
2021-07-14 17:37:48 -07:00
Martin Atkins f3a57db293 addrs: UniqueKey and UniqueKeyer
Many times now we've seen situations where we need to use addresses
as map keys, but not all of our address types are comparable and thus
we tend to end up using string representations as keys instead.

That's problematic because conversion to string uses type information
and some of the address types have string representations that are
ambiguous with one another.

UniqueKey therefore represents an opaque key that is unique for each
functionally-distinct address across all types that implement
UniqueKeyer.

For this initial commit I've implemented UniqueKeyer only for the
Referenceable family of types. These are an easy case because they
were all already comparable (intentionally) anyway. Later commits
can implement UniqueKeyer for other types that are not naturally
comparable, such as any which include a ModuleInstance.

This also includes a new type addrs.Set which wraps a map as a set
of addresses, using the unique keys to ensure that there can be only
one element for each distinct address.
2021-07-14 17:37:48 -07:00
Laura Pacilio 7cd333dea1
Merge pull request #29163 from hashicorp/rar-docs-update-add-anchor
website: Adds anchor for TF_CLI_ARGS.
2021-07-14 14:45:35 -04:00
Russell Rollins 3174dfd63f Adds anchor for TF_CLI_ARGS. 2021-07-14 14:08:52 -04:00
hc-github-team-tf-core b6614cf2b3 Cleanup after v1.1.0-alpha20210714 release 2021-07-14 17:18:47 +00:00
hc-github-team-tf-core 3b61e8df7a
Release v1.1.0-alpha20210714 2021-07-14 16:55:22 +00:00
Rémi Lapeyre 4177bd98b9 Change wording for the skip_... options of the pg backend 2021-07-14 12:01:54 +02:00
Rémi Lapeyre b8e0d6f418 Add UNIQUE constraint in the states table for the pg backend 2021-07-14 11:59:14 +02:00
Rémi Lapeyre 3bf053a5fc Add a test to ensure that workspaces must have a unique name in pg backend 2021-07-14 11:57:28 +02:00
Kristin Laemmert 43f698dc9d
states: new `Move` funcs for Resource, ResourceInstance, and ModuleInstances (#29068)
* states: add MoveAbsResource and MoveAbsResourceInstance state functions and corresponding syncState wrapper functions.

* states: add MoveModuleInstance and MaybeMoveModuleInstance

* addrs: adding a new function, ModuleInstance.IsDeclaredByCall, which returns true if the receiver is an instance of the given AbsModuleCall.
2021-07-13 16:10:46 -04:00
Alisdair McDiarmid 5a34825fc1
Merge pull request #29131 from hashicorp/alisdair/sequence-diff-commentary
Add comments explaining how ctySequenceDiff works
2021-07-13 16:05:05 -04:00
Laura Pacilio 36f51e2790
Merge pull request #29133 from hashicorp/add-deploy-to-readme
Add deploy information to website folder readme
2021-07-13 11:23:13 -04:00
Alisdair McDiarmid 72a7c95353
Merge pull request #29072 from hashicorp/alisdair/json-ui-resource-drift
json-output: Add resource drift to machine readable UI
2021-07-12 09:54:42 -04:00
Laura Pacilio 557b8df31b
Active voice and link fix
Co-authored-by: Tu Nguyen <im2nguyen@users.noreply.github.com>
2021-07-12 09:22:16 -04:00
Nick Fagerlund 0e004f2377
website: remove legacy provider docs index (#29134)
* website: Update or remove references to legacy provider docs

We've finally evicted the last of the legacy provider docs from terraform.io!
Let's celebrate by purging all memory of them.

The 0.11 docs are now so thoroughly legacy that I don't believe they need a new
destination for their provider links, so I just removed those.

* website: remove old provider docs index

This will require a redirect in the terraform-website repo.

* Apply suggestions from code review

Co-authored-by: Laura Pacilio <83350965+laurapacilio@users.noreply.github.com>

Co-authored-by: Laura Pacilio <83350965+laurapacilio@users.noreply.github.com>
2021-07-09 14:44:58 -07:00
Laura Pacilio aeee849e6c Add deploy information to website folder readme 2021-07-09 15:02:15 -04:00
Alisdair McDiarmid ef0181cfbd Add comments explaining how ctySequenceDiff works
The logic behind this code took me a while to understand, so I wrote
down what I understand to be the reasoning behind how it works. The
trickiest part is rendering changing objects as updates. I think the
other pieces are fairly common to LCS sequence diff rendering, so I
didn't explain those in detail.
2021-07-09 13:14:20 -04:00
rita d0d9ee1e62
Merge pull request #29107 from hashicorp/link_to_refresh_tutorial
Link refresh tutorial from plan and refresh docs pages
2021-07-07 13:42:33 -04:00
James Bardin b00e8c1113
Merge pull request #29110 from hashicorp/jbardin/update-cty
update go-cty to v1.9.0
2021-07-07 10:26:06 -04:00
James Bardin 04e0ed79fa update go-cty to v1.9.0 2021-07-07 10:07:42 -04:00
ritsok 595646916f Link refresh tutorial from plan and refresh docs pages 2021-07-06 15:52:16 -04:00
Laura Pacilio 19eaba888e
Merge pull request #29066 from hashicorp/add-compatibility-promises-toc
Add compatibility promises to sidebar toc
2021-07-06 14:08:05 -04:00
Laura Pacilio 341b1d7628
Merge pull request #29085 from hashicorp/add-local-preview-instr-readme
Add instructions to preview docs site locally to /website readme
2021-07-02 14:06:33 -04:00
Laura Pacilio a8600ca2e4 Fix numbering for second step 2021-07-02 14:02:03 -04:00
Laura Pacilio 13d690081c Fix numbering in first section 2021-07-02 13:52:15 -04:00
Laura Pacilio d3b9d5cdda
Update website/README.md
Co-authored-by: Tu Nguyen <im2nguyen@users.noreply.github.com>
2021-07-02 13:51:00 -04:00
Laura Pacilio b3736334f7
Update website/README.md
Co-authored-by: Tu Nguyen <im2nguyen@users.noreply.github.com>
2021-07-02 13:50:09 -04:00
Laura Pacilio 52e2094726
Update website/README.md
Co-authored-by: Tu Nguyen <im2nguyen@users.noreply.github.com>
2021-07-02 13:49:59 -04:00