Commit Graph

25253 Commits

Author SHA1 Message Date
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
Patryk Szczygłowski 03739a99ff
Cloudflare, not CloudFlare 2019-12-11 16:00:33 +00:00
Kristin Laemmert 49fc53d1d1
provider source enhancements
* configs: move ProviderConfigCompact[Str] from addrs to configs

The configs package is aware of provider name and type (which are the
same thing today, but expected to be two different things in a future
release), and should be the source of truth for a provider config
address. This is an intermediate step; the next step will change the returned types to something based in the configs package.

* command: rename choosePlugins to chooseProviders to clarify scope of function

* use `Provider.LegacyString()` (instead of `Provider.Type`) consistently
* explicitly create legacy-style provider (continuing from above change)
2019-12-11 08:35:55 -05:00
Martin Atkins 5a8ca31d48
Update CHANGELOG.md 2019-12-10 11:55:20 -08:00
Martin Atkins c06675c616 command: New -compact-warnings option
When warnings appear in isolation (not accompanied by an error) it's
reasonable to want to defer resolving them for a while because they are
not actually blocking immediate work.

However, our warning messages tend to be long by default in order to
include all of the necessary context to understand the implications of
the warning, and that can make them overwhelming when combined with other
output.

As a compromise, this adds a new CLI option -compact-warnings which is
supported for all the main operation commands and which uses a more
compact format to print out warnings as long as they aren't also
accompanied by errors.

The default remains unchanged except that the threshold for consolidating
warning messages is reduced to one so that we'll now only show one of
each distinct warning summary.

Full warning messages are always shown if there's at least one error
included in the diagnostic set too, because in that case the warning
message could contain additional context to help understand the error.
2019-12-10 11:53:14 -08:00
Pam Selle 5421a62eae
Merge pull request #23401 from sclaire-1/master
Edit BUILDING.md
2019-12-10 14:17:20 -05:00
Pam Selle 63df95dbca
Update CHANGELOG.md 2019-12-10 13:13:00 -05:00
Pam Selle d45a4d33bb
Merge pull request #22963 from rekahsoft/s3-backend-pagination
Allow s3 backends to contain more then 1000 workspaces
2019-12-10 13:11:45 -05:00
Pam Selle a4b0de1b78
Merge pull request #23631 from pselle/s3AccFix
Fix S3 test
2019-12-10 13:11:12 -05:00
Pam Selle 45fa6a3145 Fix S3 test 2019-12-10 12:48:08 -05:00
Martin Atkins b90fb25321 experiments: a mechanism for opt-in experimental language features
Traditionally we've preferred to release new language features in major
releases only, because we can then use the beta cycle to gather feedback
on the feature and learn about any usability challenges or other
situations we didn't consider during our design in time to make those
changes before inclusion in a stable release.

This "experiments" feature is intended to decouple the feedback cycle for
new features from the major release rhythm, and thus allow us to release
new features in minor releases by first releasing them as experimental for
a minor release or two, adjust for any feedback gathered during that
period, and then finally remove the experiment gate and enable the feature
for everyone.

The intended model here is that anything behind an experiment gate is
subject to breaking changes even in patch releases, and so any module
using these experimental features will be broken by a future Terraform
upgrade.

The behavior implemented here is:

- Recognize a new "experiments" setting in the "terraform" block which
  allows module authors to explicitly opt in to experimental features.

  terraform {
    experiments = [resource_for_each]
  }

- Generate a warning whenever loading a module that has experiments
  enabled, to avoid accidentally depending on experimental features and
  thus risking unexpected breakage on next Terraform upgrade.

- We check the enabled experiments against the configuration at module
  load time, which means that experiments are scoped to a particular
  module. Enabling an experiment in one module does not automatically
  enable it in any other module.

This experiments mechanism is itself an experiment, and so I'd like to
use the resource for_each feature to trial it. Because any configuration
using experiments is subject to breaking changes, we are free to adjust
this experiments feature in future releases as we see fit, but once
for_each is shipped without an experiment gate we'll be blocked from
making significant changes to it until the next major release at least.
2019-12-10 09:27:05 -08:00
Lars Lehtonen 77ffb4a0eb
backend/remote-state/http: fix dropped test errors 2019-12-10 07:36:54 -08:00
Lars Lehtonen 2845896fc9
backend/remote-state/http: drop unused assertError() 2019-12-10 07:33:22 -08:00
Alvin Huang a99a807b59
Fix typo in changelog 2019-12-10 09:39:52 -05:00
Kristin Laemmert f8a23da480 explicitly create legacy-style provider 2019-12-09 15:17:47 -05:00
Pam Selle 9efab422ba
Merge pull request #23611 from pselle/vendor
Run of vendor and tidy
2019-12-09 11:54:00 -05:00
Kristin Laemmert 86e450a85f use LegacyString() consistently 2019-12-09 11:34:36 -05:00
Pam Selle 717ed70c21 Run of vendor and tidy 2019-12-09 11:34:12 -05:00
Kristin Laemmert efafadbe5e command: rename choosePlugins to chooseProviders to clarify scope of function 2019-12-09 09:47:09 -05:00
Kristin Laemmert 67fc4dd5a1 configs: move ProviderConfigCompact[Str] from addrs to configs
The configs package is aware of provider name and type (which are the
same thing today, but expected to be two different things in a future
release), and should be the source of truth for a provider config
address.
2019-12-09 08:30:08 -05:00
Pam Selle befb3dadfa
Merge pull request #23574 from hashicorp/changelog-notarization-info
Add notarization details to changelog
2019-12-06 15:59:24 -05:00
Michele 9c4582e42a Update changelog 2019-12-06 09:56:10 -08:00
James Bardin f281eb2b44
Merge pull request #23595 from hashicorp/jbardin/deprecate-destroy-references
Update destroy provisioner warnings
2019-12-06 12:31:20 -05:00
Pam Selle 9ef44b72b3
Update CHANGELOG.md 2019-12-06 12:10:33 -05:00
Pam Selle d8c31a1efa
Merge pull request #23581 from hashicorp/pselle/show-panic-23377
Fix panic on show plan
2019-12-06 12:08:16 -05:00
Pam Selle 9c4d3cc1b1 Add a test 2019-12-06 11:53:43 -05:00
James Bardin b9d48d3173
Merge pull request #23596 from hashicorp/jbardin/fix-state-test
Fix tests
2019-12-06 11:18:14 -05:00
James Bardin 42a2bb4da3 expand test tempdir symlinks to fix tests on macos 2019-12-06 10:56:47 -05:00
James Bardin 96d1e57191 fix type in state mv test 2019-12-06 10:52:14 -05:00
James Bardin b715ef2590 don't print just warnings when loading backend cfg
Any warnings will be caught again when the entire config is loaded, and
duplicated in the output.
2019-12-06 10:20:23 -05:00
James Bardin 2fdf984cce update destroy provisioner warning text
Make it a little more user-oriented
2019-12-06 10:20:23 -05:00
Kristin Laemmert e3416124cc
addrs: replace "Type string" with "Type Provider" in ProviderConfig
* huge change to weave new addrs.Provider into addrs.ProviderConfig
* terraform: do not include an empty string in the returned Providers /
Provisioners
- Fixed a minor bug where results included an extra empty string
2019-12-06 08:00:18 -05:00