Commit Graph

27229 Commits

Author SHA1 Message Date
Alisdair McDiarmid
b335918c3c backend: Only show root module output changes
When rendering planned output changes, we need to filter the plan's
output changes to ensure that only root module outputs which have
changed are rendered. Otherwise we will render changes for submodule
outputs, and (with concise diff disabled) render unchanged outputs also.
2020-11-02 10:24:22 -05:00
Radek Simko
a413fa7425
Merge pull request #26763 from hashicorp/radeksimko-patch-1
docs: fix typo in provider local name
2020-10-31 08:37:33 +00:00
tuathail
33ee8a410c
website: Add note re: private_key configuration to intro (#24463) 2020-10-30 18:09:21 -07:00
Repon Kumar Roy
34549b402b website: clarify version constraint syntax 2020-10-30 17:44:48 -07:00
Nick Fagerlund
a058b64eb5
website: Index for element must be a non-negative integer (#26679)
* The index must be non-negative integer

and added instructions on how to get the last value in the list.

* Typo fix

Co-authored-by: Nick Fagerlund <nick@hashicorp.com>
2020-10-30 17:43:35 -07:00
Nick Fagerlund
5a4957f141
Typo fix 2020-10-30 17:42:40 -07:00
Nick Fagerlund
a0fee4c380 website: one more provider name typo 2020-10-30 17:35:23 -07:00
Radek Simko
8476c3f13e
docs: fix typo in provider local name 2020-10-30 21:59:19 +00:00
Alisdair McDiarmid
13d70844d7
Upgrade backport-assistant 2020-10-29 15:29:14 -04:00
Alisdair McDiarmid
b90994deac
Merge pull request #26735 from hashicorp/alisdair/disable-terraform-state-file-version-check
states: Disable Terraform version check
2020-10-29 15:22:06 -04:00
Martin Atkins
ced68fc446
Update CHANGELOG.md 2020-10-29 09:09:44 -07:00
Martin Atkins
d03a774def core: Fix typo in for_each sensitive error message
Co-authored-by: Alisdair McDiarmid <alisdair@users.noreply.github.com>
2020-10-29 09:07:48 -07:00
Martin Atkins
d24fdce5b8 command/format: Include unknown values in diagnostics
Previously when printing the relevant variables involved in a failed
expression evaluation we would just skip over unknown values entirely.

There are some errors, though, which are _caused by_ a value being
unknown, in which case it's helpful to show which of the inputs to that
expression were known vs. unknown so that the user can limit their further
investigation only to the unknown ones.

While here I also added a special case for sensitive values that overrides
all other display, because we don't know what about a value is sensitive
and so better to give nothing away at the expense of a slightly less
helpful error message.
2020-10-29 09:07:48 -07:00
Martin Atkins
e2c64bc255 core: Annotate for_each errors with expression info
Our diagnostics model allows for optionally annotating an error or warning
with information about the expression and eval context it was generated
from, which the diagnostic renderer for the UI will then use to give the
user some additional hints about what values may have contributed to the
error.

We previously didn't have those annotations on the results of evaluating
for_each expressions though, because in that case we were using the helper
function to evaluate an expression in one shot and thus we didn't ever
have a reference to the EvalContext in order to include it in the
diagnostic values.

Now, at the expense of having to handle the evaluation at a slightly lower
level of abstraction, we'll annotate all of the for_each error messages
with source expression information. This is valuable because we see users
often confused as to how their complex for_each expressions ended up being
invalid, and hopefully giving some information about what the inputs were
will allow more users to self-solve.
2020-10-29 09:07:48 -07:00
Paul Thrasher
1e601dc7c2
Merge pull request #26744 from hashicorp/pault/tfce-remove-error-messaging
Stop printing tfce error message log
2020-10-28 16:30:47 -07:00
Paul Thrasher
fc8a76a2a3
Stop printing tfce error message log 2020-10-28 16:03:55 -07:00
James Bardin
c7dd310988
Merge pull request #26743 from hashicorp/jbardin/fix-diags-tests
fix the rpc diags tests
2020-10-28 17:45:22 -04:00
James Bardin
73474327a0 fix the rpc diags tests
These weren't quite done, but got lost in the huge PR.
2020-10-28 17:40:36 -04:00
James Bardin
35dfac799e update CHANGELOG.md 2020-10-28 17:22:38 -04:00
James Bardin
d1ac382ec9
Merge pull request #26738 from hashicorp/jbardin/eval-diagnostics
Eval diagnostics
2020-10-28 17:21:18 -04:00
Alisdair McDiarmid
dc2e7520e5 states: Disable Terraform version check
For this version of Terraform and forward, we no longer refuse to read
compatible state files written by future versions of Terraform. This is
a commitment that any changes to the semantics or format of the state
file after this commit will require a new state file version 5.

The result of this is that users of this Terraform version will be able
to share remote state with users of future versions, and all users will
be able to read and write state. This will be true until the next major
state file version is required.

This does not affect users of previous versions of Terraform, which will
continue to refuse to read state written by later versions.
2020-10-28 16:52:35 -04:00
Pam Selle
92a8d2061c
Merge pull request #26739 from hashicorp/pselle/show-json
Unmark values before showing in JSON
2020-10-28 16:49:56 -04:00
Alisdair McDiarmid
61b38f3ada
Another action regex fix attempt
This time I actually tested the regex
2020-10-28 16:46:28 -04:00
Alisdair McDiarmid
e65f427927
Try to fix backport action
I made a mistake editing the regex. Here's hoping this works!
2020-10-28 16:43:38 -04:00
Pam Selle
2a222985f9
Merge pull request #26740 from hashicorp/pselle/show-output-sensitive
Hide sensitive outputs in terraform show
2020-10-28 16:38:17 -04:00
Pam Selle
f61a342311 Hide sensitive outputs in terraform show 2020-10-28 15:46:09 -04:00
Pam Selle
66091ae36c Unmark values before showing in JSON
This prevents "sensitive" values from unintentionally
showing as nil when running terraform show -json
2020-10-28 15:30:04 -04:00
James Bardin
b8bed97ef4 test for RPC warnings with no errors 2020-10-28 14:51:04 -04:00
James Bardin
f987b69777 interrupted execution now exits with an error 2020-10-28 14:40:30 -04:00
James Bardin
95f30451d9 get rid of EvalEarlyExitError
This was mostly unused now, since we no longer needed to interrupt a
series of eval node executions.

The exception was the stopHook, which is still used to halt execution
when there's an interrupt. Since interrupting execution should not
complete successfully, we use a normal opaque error to halt everything,
and return it to the UI.

We can work on coalescing or hiding these if necessary in a separate PR.
2020-10-28 14:40:30 -04:00
James Bardin
988059d533 make GraphNodeExecutable return diagnostics 2020-10-28 13:47:04 -04:00
James Bardin
77cabe187d last Evals without diagnostics 2020-10-28 12:32:49 -04:00
James Bardin
786a7291bf remove unused EvalValidateCount 2020-10-28 12:26:37 -04:00
James Bardin
c81fd833bb add diags to eval_state 2020-10-28 12:23:03 -04:00
James Bardin
524505830f add diags to eval_refresh 2020-10-28 12:03:00 -04:00
James Bardin
64491df856 add diags to data eval 2020-10-28 11:57:45 -04:00
James Bardin
b42aad5856 add diags to eval_diff 2020-10-28 11:46:07 -04:00
James Bardin
fe9c93b9f9 handle wrapped EvalEarlyExitErrors 2020-10-28 10:59:32 -04:00
Martin Atkins
e6e0b6ee46 providercache: verify locked hashes for local package dirs
Previously we were only verifying locked hashes for local archive zip
files, but if we have non-ziphash hashes available then we can and should
also verify that a local directory matches at least one of them.

This does mean that folks using filesystem mirrors but yet also running
Terraform across multiple platforms will need to take some extra care to
ensure the hashes pass on all relevant platforms, which could mean using
"terraform providers lock" to pre-seed their lock files with hashes across
all platforms, or could mean using the "packed" directory layout for the
filesystem mirror so that Terraform will end up in the install-from-archive
codepath instead of this install-from-directory codepath, and can thus
verify ziphash too.

(There's no additional documentation about the above here because there's
already general information about this in the lock file documentation
due to some similar -- though not identical -- situations with network
mirrors.)
2020-10-28 07:46:45 -07:00
Martin Atkins
24d32e9ca2 providercache: More exhaustive testing of the main installer
We previously had some tests for some happy paths and a few specific
failures into an empty directory with no existing locks, but we didn't
have tests for the installer respecting existing lock file entries.

This is a start on a more exhaustive set of tests for the installer,
aiming to visit as many of the possible codepaths as we can reasonably
test using this mocking strategy. (Some other codepaths require different
underlying source implementations, etc, so we'll have to visit those in
other tests separately.)
2020-10-28 07:46:45 -07:00
Martin Atkins
fc5a41b5e5 depsfile: Allow loading locks from a byte array in memory
This won't be a typical usage pattern for normal code, but will be useful
for tests that need to work with locks as input so that they don't need to
write out a temporary file on disk just to read it back in immediately.
2020-10-28 07:46:45 -07:00
Alisdair McDiarmid
1e32354e3e
Fix label regexp
We only use two components for versions, e.g. `0.13-backport` -> `v0.13`
2020-10-28 10:23:43 -04:00
Alisdair McDiarmid
fd14b237e5
Add backport assistant
Based on documentation in https://github.com/hashicorp/backport-assistant, using a
token from the teamterraform user.
2020-10-28 10:22:01 -04:00
alevinetx
66393bb62e
website: Update module-registry-protocol.html.md (#26639)
* Update module-registry-protocol.html.md

1: There is a mismatch in the segment labels for the version query URL (system vs provider)
2: There is a discrepancy between the documentation and the actual generated request for retrieving module source code (URL segments 4 vs 3)
 - There is no segment for "provider"

* Update module-registry-protocol.html.md

Changed ```:system``` to ```:provider``` for versions and source API URLs
2020-10-28 09:09:52 -04:00
James Bardin
477111e6b6 change apply Eval methods to use diags 2020-10-27 18:16:28 -04:00
Kristin Laemmert
da1d3cb2d3 remove unmaintained shell completion
These are unmaintained and their existence was a surprise to many of us.
Let's not keep them around to further languish.
2020-10-27 14:42:10 -04:00
Martin Atkins
430318e262 getproviders: Consistent ordering of terms in VersionConstraintsString
An earlier commit made this remove duplicates, which set the precedent
that this function is trying to canonically represent the _meaning_ of
the version constraints rather than exactly how they were expressed in
the configuration.

Continuing in that vein, now we'll also apply a consistent (though perhaps
often rather arbitrary) ordering to the terms, so that it doesn't change
due to irrelevant details like declarations being written in a different
order in the configuration.

The ordering here is intended to be reasonably intuitive for simple cases,
but constraint strings with many different constraints are hard to
interpret no matter how we order them so the main goal is consistency,
so those watching how the constraints change over time (e.g. in logs of
Terraform output, or in the dependency log file) will see fewer noisy
changes that don't actually mean anything.
2020-10-26 12:44:15 -07:00
Pam Selle
5f065c76aa
Merge pull request #26710 from aazon/patch-1
Small spelling improvement
2020-10-26 15:32:27 -04:00
Pam Selle
bc14a1c885
Merge pull request #26706 from hashicorp/pselle/provider-sens-experiment
Add provider sensitivity propagation experiment
2020-10-26 15:11:54 -04:00
Pam Selle
bd70bc63eb Add provider sensitivity propagation experiment
Rolls back marking attributes providers mark as sensitive
to an `experiment` and adds associated docs and adjustments
to the upgrade guide.
2020-10-26 15:05:22 -04:00