Commit Graph

25840 Commits

Author SHA1 Message Date
James Bardin c5300dc46d
Merge pull request #23792 from hashicorp/jbardin/update-go-getter
update go-getter
2020-01-07 17:05:30 -05:00
Martin Atkins e184b9edb9
Update CHANGELOG.md 2020-01-07 13:52:46 -08:00
Martin Atkins 8ea60ea651
Update CHANGELOG.md 2020-01-07 13:46:33 -08:00
Martin Atkins 7471779fca
Update CHANGELOG.md 2020-01-07 13:44:49 -08:00
Kristin Laemmert d72a192078
Update CHANGELOG.md 2020-01-07 15:11:14 -05:00
James Bardin 82678ed156 udpate CHANGELOG.md 2020-01-07 15:09:07 -05:00
Kristin Laemmert 4d8fde3d6f
command: use backend config from state when backend=false is used. (#23802)
* command: use backend config from state when backend=false is used.

When a user runs `terraform init --backend=false`, terraform should
inspect the state for a previously-configured backend, and use that
backend, ignoring any backend config in the current configuration. If no
backend is configured or there is no state, return a local backend.

Fixes #16593
2020-01-07 15:07:06 -05:00
Kristin Laemmert 5d3ca8aaf1
Update CHANGELOG.md 2020-01-07 15:05:01 -05:00
Kristin Laemmert 4045a6e5d0
initwd: cache registry responses for module versions and download URL (#23727)
* initwd: cache registry responses for module versions and download URL

Closes #23544
2020-01-07 15:03:23 -05:00
Martin Atkins 2a95d98383 docs: terraform state show is not machine-readable
In earlier versions of Terraform the result of terraform state show was
in the pre-0.12 "flatmap" structure that was unable to reflect nested
data structures. That was fixed in Terraform 0.12, but as a consequence
this statement about the output being machine-parseable (which was
debateable even in older versions) is incorrect.

Fortunately, we now have "terraform show -json" to get output that is
intentionally machine-parseable, so we'll recommend to use that instead
here. The JSON output of that command is a superset of what's produced by
"terraform state show", so should be usable to meet any use-case that
might previously have been met by parsing the "terraform state show"
output.
2020-01-07 09:39:20 -08:00
Martin Atkins 2b2ac1f6de configs: use local set of go-getter detectors
In an earlier change we switched to defining our own sets of detectors,
getters, etc for go-getter in order to insulate us from upstream changes
to those sets that might otherwise change the user-visible behavior of
Terraform's module installer.

However, we apparently neglected to actually refer to our local set of
detectors, and continued to refer to the upstream set. Here we catch up
with the latest detectors from upstream (taken from the version of
go-getter we currently have vendored) and start using that fixed set.

Currently we are maintaining these custom go-getter sets in two places
due to the configload vs. initwd distinction. That was already true for
goGetterGetters and goGetterDecompressors, and so I've preserved that for
now just to keep this change relatively simple; in later change it would
be nice to factor these "get with go getter" functions out into a shared
location which we can call from both configload and initwd.
2020-01-07 09:38:46 -08:00
Pam Selle 948d4d0ecf
Merge pull request #23749 from jasonwalsh/master
website: update publishing modules documentation
2020-01-07 16:58:36 +01:00
James Bardin 9e5fca67e8 update go-getter
Update to a go1.12 compatible branch of v1.4.1, which removes the
Header.Clone methods which were added in go1.13.
2020-01-06 20:44:02 -05:00
James Bardin ae407060f0
Merge pull request #23791 from hashicorp/jbardin/state-mv
remove stale dependencies on `state mv`
2020-01-06 16:02:22 -05:00
Pam Selle 4977120764
Merge pull request #23733 from GennadySpb/patch-1
Change Yandex.Cloud provider name in index
2020-01-06 21:37:03 +01:00
James Bardin 98c02ac114 remove stale dependencies on `state mv`
Clear any Dependencies if there is an entry matching a `state mv` from
address. While stale dependencies won't directly effect any current
operations, clearing the list will allow them to be recreated in their
entirety during refresh. This will help future releases that may rely
solely on the pre-calculated dependencies for destruction ordering.
2020-01-06 15:06:41 -05:00
Martin Atkins dc178789b2
Update CHANGELOG.md 2020-01-06 10:25:01 -08:00
Martin Atkins 7f8e087ce3 core: Don't panic if EvalMaybeResourceDeposedObject has no DeposedKey
This is a "should never happen" case, but we have reports of it actually
happening. In order to try to collect a bit more data about what's going
on here, we're changing what was previously a hard panic into a normal
error message that can include the address of the instance we were working
on and the action we were trying to do to it at the time.

The hope is to narrow down what situations can trigger this in order to
find a reliable reproduction case in order to debug further. This also
means that for those who _do_ encounter this problem in the meantime
Terraform will have a chance to shut down cleanly and therefore be more
likely to be able to recover on a subsequent plan/apply cycle.

Further investigation of this will follow once we see a report or two of
this updated error message.
2020-01-06 10:22:51 -08:00
jasonwalsh 62aae82913
website: update publishing modules documentation 2019-12-24 10:22:59 -05:00
Nick Fagerlund 413e423bba website: Use canonical URLs for learn.hashicorp.com links
The .html suffix redirects correctly, but it's not the 'real' path and thus
can throw off analytics.
2019-12-20 16:06:00 -08:00
GennadySpb e4c4c8cab5
Change Yandex.Cloud provider name in index
'Yandex' -> 'Yandex.Cloud'
2019-12-20 11:48:40 +03:00
James Bardin 6bad4e3dc0 add an interp that fails during planned destroy
Chain some values so that we can get an interpolation that fails if a
module input is evaluated during destroy.
2019-12-19 09:09:38 -05:00
James Bardin aa8a0f063c update 2 tests to match the new output
These 2 tests were matching the old-style state strings, and the only
change is to module outputs which are no longer marshaled.
2019-12-19 09:09:38 -05:00
James Bardin fe3edb8e46 more aggressively prune unused values
Since a planned destroy can no longer indicate it is a full destroy,
unused values were being left in the apply graph for evaluation. If
these values contains interpolations that can fail, (for example, a
zipmap with mismatched list sizes), it will cause the apply to abort.

The PrunUnusedValuesTransformer was only previously run during destroy,
more out of conservatism than for any other particular reason. Adapt it
to always remove unused values from the graph, with the exception being
the root module outputs, which must be retained when we don't have a
clear indication that a full destroy is being executed.
2019-12-19 09:09:38 -05:00
Nick Fagerlund c0176aeab3 website: Revise sensitive data in state page 2019-12-18 11:39:04 -08:00
Pam Selle f1237f816c
Merge pull request #23151 from jeschkies/patch-1
Correct simple typo in `walk.go`.
2019-12-17 16:33:44 +01:00
James Bardin 37d2202afe
Merge pull request #23696 from hashicorp/jbardin/orphan-resource-provider
NodeDestroyResource does not need a provider
2019-12-17 09:09:44 -05:00
Pam Selle d2fc7aad87
Merge pull request #23268 from rajata07/master
small fix with command usage 'terraform workspace New'
2019-12-17 07:37:20 -05:00
Pam Selle 76831793d0
Merge pull request #23265 from lucazz/update_docs_for_outputs
Update Output values docs
2019-12-17 07:34:46 -05:00
Pam Selle 3bcea18d1c
Update outputs.html.md 2019-12-17 07:33:11 -05:00
Pam Selle 31b56207e0
Update outputs.html.md 2019-12-17 07:32:22 -05:00
Pam Selle a93298bd14
Merge pull request #23656 from hashicorp/paddy_gcs_backend_env_var
Add a backend-specific env var for the GCS backend.
2019-12-17 07:30:41 -05:00
Pam Selle b25ca47b30
Merge pull request #23687 from IgorVodka/patch-1
website: Fix inpage link in docs
2019-12-17 07:29:30 -05:00
James Bardin 414cbbe808 NodeDestroyResource does not need a provider
The resource cleanup node does not need a provider. We can't directly
remove the ProvidedBy method, but this node only needs to be eval-able
so we can remove all the NodeAbstractResource methods at once.
2019-12-16 17:55:49 -05:00
James Bardin a119ac17a4
Merge pull request #23661 from jcaamano/master
ssh: Fix deadlock on agent forwarding error
2019-12-16 11:06:49 -05:00
Igor Vodka be89975667
Fix markdown being misused in docs 2019-12-16 16:29:47 +03:00
Kristin Laemmert 2f36a82091
Merge pull request #23658 from hashicorp/mildwonkey/b-terrafrom-bundle
terraform-bundle: fix panic with addrs.Provider
2019-12-13 08:00:19 -05:00
James Bardin 2eb4651a3b
Merge pull request #23663 from hashicorp/jbardin/resource-connection-refs
check resource-level connections block for references
2019-12-12 21:08:13 -05:00
Pam Selle 5db7afa545
Merge pull request #23645 from patryk/patch-1
Cloudflare, not CloudFlare
2019-12-12 16:48:14 -05:00
Pam Selle 41675543c8
Merge pull request #23627 from alrs/fix-backend-remote-state-dropped-test-errs
Fix backend remote state dropped test errors
2019-12-12 15:21:29 -05:00
Martin Atkins 9a17497d3f vendor: go get github.com/hashicorp/hcl/v2@v2.2.0
This also includes an upgrade to cty v1.1.1 because HCL calls for it.

The changes in these two libraries are mainly to codepaths that don't
directly affect Terraform, but including this upgrade will cause some
small improvements to Terraform's error messages for type conversion
problems.
2019-12-12 10:36:23 -08:00
James Bardin a57337327d check resource-level connections block for refs
References from a resource-level connection blocks were not returned
from NodeAbstractResource.References, causing the provisioner connection
attributes to sometimes be evaluated too early.
2019-12-12 12:57:23 -05:00
Pam Selle 7ed1add7e0
Merge pull request #23625 from hashicorp/fix-typo
Fix typo in changelog
2019-12-12 12:44:18 -05:00
Jaime Caamaño Ruiz c3a61a040e ssh: Fix deadlock on agent forwarding error
If there is an error when opening the session for agent forwarding in
the process ssh connention, there is a deadlock when recursively
calling Connect on an internal reattempt. Avoid that, and let the
connection be reattempted externally.
2019-12-12 18:16:17 +01:00
Kristin Laemmert c72d2c6c44 build: add terraform-bundle e2etests 2019-12-12 09:26:26 -05:00
Kristin Laemmert 8c6ae66494 terraform-bundle: fix panic with addrs.Provider
Fixes #23652
2019-12-12 09:14:38 -05:00
Paddy Carver b8752c7610 Add a backend-specific env var for the GCS backend.
Right now, the only environment variable available is the same
environment variable that will be picked up by the GCP provider. Users
would like to be able to store state in separate projects or accounts or
otherwise authenticate to the provider with a service account that
doesn't have access to the state. This seems like a reasonable enough
practice to me, and the solution seems straightforward--offer an
environment variable that doesn't mean anything to the provider to
configure the backend credentials. I've added GOOGLE_BACKEND_CREDENTIALS
to manage just the backend credentials, and documented it appropriately.
2019-12-12 03:35:39 -08:00
Martin Atkins bfbd00a23c website: Note about using jsonencode/yamlencode in templatefile
It's a common source of errors to try to produce JSON or YAML syntax
using string concatenation via our template language but to miss some
details like correct string escaping, quoting, required commas, etc.

The jsonencode and yamlencode functions are a better way to generate JSON
and YAML, but it's not immediately obvious that both of these functions
are available for use in external templates (via templatefile) too.

Given that questions related to this come up a lot in our community forum
and elsewhere, it seems worth having a documentation section to show the
pattern of having a template that consists only of a single function call.
2019-12-11 12:57:01 -08:00
tf-release-bot 28880aa47d Cleanup after v0.12.18 release 2019-12-11 16:29:59 +00:00
tf-release-bot 0bda605bc1
v0.12.18 2019-12-11 16:14:26 +00:00