Commit Graph

27446 Commits

Author SHA1 Message Date
Radek Simko eddcc4d80c
docs: Fix typo (provider arg in data source) (#26802) 2020-11-04 09:55:15 -04:00
Jacob Tomaw 3f9abbc30d
Remove redundant Local Named Values section
The second Local Named Values has a subset of the information the first one has and adds nothing to the documentation other than confusion.
2020-11-03 08:09:12 -05:00
James Bardin 6bb79b7714
Merge pull request #26788 from hashicorp/jbardin/eval-self-block
allow path and terraform in self-block eval
2020-11-02 15:09:39 -05:00
Tej-Singh-Rana 832918c65b
website: fixed spelling error (#26758) 2020-11-02 11:15:44 -08:00
timvandamme fbf267fbfd
website: for_each doesn't implicitly convert to set (#26450)
The documentation states that an explicit type conversion to set is needed, but it does not say why implicit type conversion does not work. 

Co-authored-by: Nick Fagerlund <nick@hashicorp.com>
2020-11-02 11:13:51 -08:00
James Bardin 7c4d00c04c allow path and terraform in self-block eval
We can insert the terraform and path values into EvalSelfBlock, since
these are static and always known during evaluation.
2020-11-02 14:00:58 -05:00
Alisdair McDiarmid 90c4f11b61 go get github.com/hashicorp/go-getter@v1.5.0
Includes fix for breaking upstream API change.
2020-11-02 10:46:24 -05:00
Alisdair McDiarmid b1bc0e5d92 getproviders: Normalize versions before dedupe
When rendering a set of version constraints to a string, we normalize
partially-constrained versions. This means converting a version
like 2.68.* to 2.68.0.

Prior to this commit, this normalization was done after deduplication.
This could result in a version constraints string with duplicate
entries, if multiple partially-constrained versions are equivalent. This
commit fixes this by normalizing before deduplicating and sorting.
2020-11-02 10:45:45 -05:00
Alisdair McDiarmid 3ed08e3566 Remove backport review teams for now
This requires more GitHub token permissions than we have, and it's
inessential. The backport PRs should have reviews assigned to the
original PR author anyway.
2020-11-02 10:43:22 -05:00
Alisdair McDiarmid 7ec85a7588
Merge pull request #26784 from hashicorp/alisdair/only-show-root-module-output-changes
backend: Only show root module output changes
2020-11-02 10:34:59 -05:00
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
Alvin Huang 70a8be60b9 switch to hashicorp docker mirror 2020-10-29 22:37:11 -04: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