Commit Graph

29903 Commits

Author SHA1 Message Date
Laura Pacilio
5841db00b3 Change private to public dns :-) 2022-05-16 16:28:15 -04:00
Laura Pacilio
1fd140ff83
Merge pull request #31010 from jhrcek/patch-1
Add missing syntax highlighting for terraform snippets
2022-05-16 13:00:05 -04:00
Laura Pacilio
e9025f8636
Merge pull request #31019 from sylvainmetayer/patch-1
Add swift to workspace docs
2022-05-16 12:57:10 -04:00
Sylvain METAYER
16d3fad714
Update website/docs/language/state/workspaces.mdx
Co-authored-by: Laura Pacilio <83350965+laurapacilio@users.noreply.github.com>
2022-05-16 18:41:41 +02:00
Martin Atkins
1846a4752e
Update CHANGELOG.md 2022-05-11 11:14:56 -07:00
Martin Atkins
289bb60ce1 core: Defer on transitive dependencies for data resources with conditions
When a data resource is used for the purposes of verifying a condition
about an object managed elsewhere (e.g. if the managed resource doesn't
directly export all of the information required for the condition) it's
important that we defer the data resource read to the apply step if the
corresponding managed resource has any changes pending.

Typically we'd expect that to come "for free" but unfortunately we have
a pragmatic special case in our handling of data resources where we
normally defer to the apply step only if a _direct_ dependency of the data
resource has a change pending, and allow a plan-time read if there's
a pending change in an indirect dependency. This allowed us to preserve
some compatibility with the questionable historical behavior of always
reading data resources proactively unless the configuration contains
unknown values, since the arguably-more-correct behavior would've been a
regression for anyone who had been depending on that before.

Since preconditions and postconditions didn't exist until now, we are not
constrained in the same way by backward compatibility, and so we can adopt
the more correct behavior in the case where a data resource has conditions
specified. This does unfortunately make the handling of data resources
with conditions subtly inconsistent with those that don't, but this is
a better situation than the alternative where it would be easy to get into
a trapped situation where the remote system is invalid and it's impossible
to plan the change that would make it valid again because the conditions
evaluate too soon, prior to the fix being applied.
2022-05-11 11:01:38 -07:00
Martin Atkins
283914b79c
Update CHANGELOG.md 2022-05-09 11:48:47 -07:00
Martin Atkins
4cffff24b1 core: Report reason for deferring data read until apply
We have two different reasons why a data resource might be read only
during apply, rather than during planning as usual: the configuration
contains unknown values, or the data resource as a whole depends on a
managed resource which itself has a change pending.

However, we didn't previously distinguish these two in a way that allowed
the UI to describe the difference, and so we confusingly reported both
as "config refers to values not yet known", which in turn led to a number
of reasonable questions about why Terraform was claiming that but then
immediately below showing the configuration entirely known.

Now we'll use our existing "ActionReason" mechanism to tell the UI layer
which of the two reasons applies to a particular data resource instance.
The "dependency pending" situation tends to happen in conjunction with
"config unknown", so we'll prefer to refer that the configuration is
unknown if both are true.
2022-05-09 11:12:47 -07:00
Sylvain METAYER
3b1b485f45
Add swift to workspace docs
Swift backend support workspace (cf https://github.com/hashicorp/terraform/issues/19993#issuecomment-672839820 )
2022-05-09 17:53:00 +02:00
Laura Pacilio
98f9d646ce
Merge pull request #30969 from hashicorp/add-note-about-spaces
Add warning about spaces in variable value assignment
2022-05-09 10:34:30 -04:00
Jan Hrcek
fd5020cac7
Add missing syntax highlighting for terraform snippets 2022-05-06 08:22:03 +02:00
Alisdair McDiarmid
ec890211b6
Merge pull request #31008 from hashicorp/custom-conditions-typo
Fix custom conditions Markdown typo
2022-05-05 18:46:26 -04:00
Alisdair McDiarmid
b0f837e1f3
Fix custom conditions Markdown typo 2022-05-05 18:38:29 -04:00
Alisdair McDiarmid
59c4bc4057 Fix .gitignore terraform entry to be root-relative 2022-05-05 10:24:38 -04:00
Alisdair McDiarmid
125eb51dc4 Remove accidentally-committed binary
Also add this path to .gitignore to prevent future mistakes.
2022-05-05 10:14:15 -04:00
James Bardin
b97c64009e
Merge pull request #30987 from hashicorp/jbardin/get-schema-diags
plugin: diagnostics must be checked on all schema calls
2022-05-04 11:18:42 -04:00
Kevin Wang
f98cad3384
feat: pull over content for /docs (#30991)
* feat: pull over content for `/docs`

* chore: format json
2022-05-03 16:23:09 -04:00
Anna Winkler
22c121df86
Bump compatibility version to 1.3.0 for terraform core release (#30988)
* Bump compatibility version to 1.3.0 for terraform core release

Co-authored-by: Brandon Croft <brandon.croft@gmail.com>
2022-05-03 12:28:41 -06:00
James Bardin
8943c79322 diagnostics must be checked on all schema calls
We can no longer be assured that the particular instance of a provider
we are using has had GetProviderSchema called. Always check the
diagnostics even if we're fetching a cached response.
2022-05-03 10:30:59 -04:00
Alisdair McDiarmid
2f3200731c
Merge pull request #30984 from hashicorp/alisdair/fix-ssh-http-proxy-panic
communicator/ssh: Fix crash using SSH+HTTP proxy
2022-05-03 09:21:12 -04:00
Alisdair McDiarmid
0c435e2e08 communicator/ssh: Fix crash using SSH+HTTP proxy 2022-05-03 08:24:59 -04:00
James Bardin
80792312d8
Merge pull request #30979 from hashicorp/jbardin/cancel-auto-approve
check for cancellation before apply confirmation
2022-05-02 17:14:14 -04:00
Alisdair McDiarmid
28e94013b6
Merge pull request #30975 from hashicorp/lockfile-mention-state
Add note about lockfile's relationship to state
2022-05-02 16:53:42 -04:00
Luces Huayhuaca
ea1f0007ff
fix typo for task.Status (#30978) 2022-05-02 11:52:22 -07:00
James Bardin
df0a70bfb6 check for cancellation before apply confirmation
When executing an apply with no plan, it's possible for a cancellation
to arrive during the final batch of provider operations, resulting in no
errors in the plan. The run context was next checked during the
confirmation for apply, but in the case of -auto-approve that
confirmation is skipped, resulting in the canceled plan being applied.

Make sure we directly check for cancellation before confirming the plan.
2022-05-02 14:09:47 -04:00
Dan Slimmon
1f6d986595 Include something about how state is checked 2022-05-02 09:57:25 +00:00
Laura Pacilio
3eea9d709d Add warning about spaces in variable value assignment 2022-04-29 16:59:39 -04:00
Kevin Wang
488853be9c
fix: img/docs/concrete-plan.png (#30967) 2022-04-29 15:33:45 -04:00
Laura Pacilio
78f90a64b5
Merge pull request #30956 from tigerblue77/patch-1
Update apt.mdx
2022-04-29 11:58:17 -04:00
James Bardin
f19848babf
Merge pull request #30962 from hashicorp/jbardin/update-ssh
udpate x/crypto/ssh
2022-04-28 16:44:23 -04:00
James Bardin
8699b115a7 udpate x/crypto/ssh 2022-04-28 16:21:09 -04:00
James Bardin
0bcd04a561
Merge pull request #30958 from hashicorp/jbardin/dependencies-race
Fix race in state dependency encoding
2022-04-28 11:56:51 -04:00
James Bardin
2bd72914d8 add internal/states to the race detector tests
This runs relatively quickly, and there is at least 1 test with
concurrent operations.
2022-04-28 11:44:32 -04:00
James Bardin
34a01c92d6 copy Dependencies before sorting in state
Instances of the same AbsResource may share the same Dependencies, which
could point to the same backing array of values. Since address values
are not pointers, and not meant to be shared, we must copy the value
before sorting the slice in-place. Because individual instances of the
same resource may be encoded to state concurrently, failure to copy the
slice first can result in a data race.
2022-04-28 11:44:32 -04:00
Tigerblue77
2928967b41
Update apt.mdx
- Removed usage of `apt-key` which is deprecated and replaced by `gpg` command
- Removed usage of `curl` command which is not present by default on Debian systems
2022-04-28 14:58:56 +02:00
Martin Atkins
7e37d486dd
Update CHANGELOG.md 2022-04-27 17:15:21 -07:00
htamakos
4cfb6bc893
communicator/ssh: Add support SSH over HTTP Proxy (#30274)
Terraform's remote-exec provision hangs out when it execs on HTTP Proxy bacause it dosen't support SSH over HTTP Proxy. This commits enables Terraform's remote-exec to support SSH over HTTP Proxy.

* adds `proxy_*` fields to `connection` which add configuration for a proxy host
* if `proxy_host` set, connect to that proxy host via CONNECT method, then make the SSH connection to `host` or `bastion_host`
2022-04-27 16:59:17 -04:00
James Bardin
de65cc43f3 update version to 1.3.0 2022-04-27 15:52:08 -04:00
Alisdair McDiarmid
5e023ecfee
Merge pull request #30949 from hashicorp/alisdair/typeexpr-tests
typeexpr: Add test coverage
2022-04-27 15:44:00 -04:00
James Bardin
cc8e6fa05a update go version 2022-04-27 15:04:30 -04:00
James Bardin
207e568010 v1.3 changelog 2022-04-27 14:56:26 -04:00
Alisdair McDiarmid
c82e291422 typeexpr: More optional modifier tests
Ensuring that the constraint boolean carries through to the next level
of constraint calculation after an optional() modifier.
2022-04-27 14:53:16 -04:00
Alisdair McDiarmid
dde4979c49 typeexpr: Improve diagnostic for any() constraints
Using the any keyword with arguments (e.g. any(string, bool)) is
invalid, but any is not technically a "primitive type keyword". This
commit corrects the language in the diagnostic and updates the tests.
2022-04-27 14:52:03 -04:00
Tom Bamford
7a9746e835
Changelog for #30936 2022-04-27 19:42:38 +01:00
Tom Bamford
351fd9b119
Merge pull request #30936 from hashicorp/f/azurerm-backend-oidc
backend/remote-state/azure: support OIDC authentication
2022-04-27 19:34:53 +01:00
Tom Bamford
d08bc4463d
Azure Backend: support OIDC authentication 2022-04-27 19:27:30 +01:00
Tom Bamford
807e7c0350
Update to go-azure-helpers v0.31.1 2022-04-27 19:27:30 +01:00
Alisdair McDiarmid
356cee7b89 typeexpr: Add test coverage for optional modifier 2022-04-27 14:25:42 -04:00
Alisdair McDiarmid
bf9f733ca2 typeexpr: Import tests from hashicorp/hcl
This package is a fork of the HCL ext/typeexpr package, but we dropped
the tests when bringing it across. This commit imports those tests
verbatim.
2022-04-27 14:16:33 -04:00
Alisdair McDiarmid
6956a06d63 Update CHANGELOG.md 2022-04-27 13:46:23 -04:00