Commit Graph

25768 Commits

Author SHA1 Message Date
Martin Atkins c5bd783eba internal/getproviders: Stub NetworkMirrorSource
This is a placeholder for later implementation of a mirror source that
talks to a particular remote HTTP server and expects it to implement the
provider mirror protocol.
2020-04-21 16:27:48 -07:00
Martin Atkins 2c535d829d command/cliconfig: Decode provider_installation blocks
This new CLI config block type allows explicitly specifying where
Terraform should look to find provider plugins for installation. This is
not used anywhere as of this commit, but in a future commit we'll change
package main to treat the presence of a block of this type as a request
to disable the default set of provider sources and use these explicitly-
specified ones instead.
2020-04-21 15:48:07 -07:00
Kristin Laemmert 8108face36
terraform: return `initialization required` error when provider schemas not found (#24715)
A side effect of the various changes to the provider installer included losing the initialization required error message which would occur if a user removed or modified the .terraform directory.

Previously, plugin factories were created after the configuration was loaded, in terraform.NewContext. Terraform would compare the required providers (from config and state) to the available providers and return the aforementioned error if a provider was missing.

Provider factories are now loaded at the beginning of any terraform command, before terraform even loads the configuration, and therefore before terraform has a list of required providers.

This commit replaces the current error when a providers' schema cannot be found in the provider factories with the init error, and adds a command test (to plan tests, for no real reason other than that's what I thought of first).
2020-04-21 16:29:27 -04:00
Petros Kolyvas eb76f41031
Merge pull request #24723 from hashicorp/cgriggs01-provider-links
[Website] Adding provider docs
2020-04-21 12:59:27 -04:00
Chris Griggs b6d602c162 [Website] Adding provider docs 2020-04-21 09:11:14 -07:00
Petros Kolyvas a31cd8059a
Merge pull request #24702 from bmcustodio/bmcustodio-change-username
Change my username.
2020-04-21 10:13:21 -04:00
Alisdair McDiarmid 7871c40a2c
Update CHANGELOG.md 2020-04-20 12:13:36 -04:00
Alisdair McDiarmid e32e7e2c4b
Merge pull request #24617 from hashicorp/alisdair/provider-installer-signature-verification
internal: Verify provider signatures on install
2020-04-20 12:11:40 -04:00
Bruno Miguel Custódio 1bb292bcdb
Change my username.
Signed-off-by: Bruno Miguel Custódio <brunomcustodio@gmail.com>
2020-04-18 08:34:22 +01:00
Martin Atkins 92d6a30bb4 main: skip direct provider installation for providers available locally
This more closely replicates the 0.12-and-earlier behavior, where having
at least one version of a provider installed locally would totally disable
any attempt to look for newer versions remotely.

This is just for the implicit default behavior. Assumption is that later
we'll have an explicit configuration mechanism that will allow the user
to specify exactly where to look for what, and thus avoid tricky
heuristics like this.
2020-04-17 13:55:11 -07:00
Alisdair McDiarmid a5b3d497cc internal: Verify provider signatures on install
Providers installed from the registry are accompanied by a list of
checksums (the "SHA256SUMS" file), which is cryptographically signed to
allow package authentication. The process of verifying this has multiple
steps:

- First we must verify that the SHA256 hash of the package archive
  matches the expected hash. This could be done for local installations
  too, in the future.
- Next we ensure that the expected hash returned as part of the registry
  API response matches an entry in the checksum list.
- Finally we verify the cryptographic signature of the checksum list,
  using the public keys provided by the registry.

Each of these steps is implemented as a separate PackageAuthentication
type. The local archive installation mechanism uses only the archive
checksum authenticator, and the HTTP installation uses all three in the
order given.

The package authentication system now also returns a result value, which
is used by command/init to display the result of the authentication
process.

There are three tiers of signature, each of which is presented
differently to the user:

- Signatures from the embedded HashiCorp public key indicate that the
  provider is officially supported by HashiCorp;
- If the signing key is not from HashiCorp, it may have an associated
  trust signature, which indicates that the provider is from one of
  HashiCorp's trusted partners;
- Otherwise, if the signature is valid, this is a community provider.
2020-04-17 13:57:19 -04:00
Kristin Laemmert f09ae6f862
provider source tests: added test suite to exercise hyphenated providers (#24685) 2020-04-16 15:54:33 -04:00
Paul Tyng 1c9735bab5
Merge pull request #24686 from hashicorp/paultyng-patch-1
Add page explaining provider trust tiers
2020-04-16 10:53:47 -04:00
Paul Tyng 3856dacc1e
Update website/docs/registry/providers/tiers.html.md 2020-04-16 10:03:52 -04:00
Paul Tyng 663a57b263
Update website/docs/registry/providers/tiers.html.md
Co-Authored-By: Alisdair McDiarmid <alisdair@users.noreply.github.com>
2020-04-16 10:02:48 -04:00
Paul Tyng 0f25f796e1
Add page explaining provider trust tiers 2020-04-16 09:34:35 -04:00
Ryan Uber dcbd835ac3
Merge pull request #24655 from hashicorp/b-remote-policy-check-race
backend/remote: display cost estimate and policy check whenever available
2020-04-15 12:38:15 -07:00
Ryan Uber 105fcb3cac backend/remote: move reading policy check logs earlier 2020-04-15 12:31:44 -07:00
Alisdair McDiarmid 24ced6bbca
Update CHANGELOG.md 2020-04-15 14:28:34 -04:00
Noah Mercado d4d8812afa
Feature: Sum Function (#24666)
The sum function takes a list or set of numbers and returns the sum of those
numbers.
2020-04-15 14:27:06 -04:00
Chris Griggs 8d71337596
Merge pull request #24653 from hashicorp/cgriggs01-infoblox-links
[Website] provider links
2020-04-14 09:36:29 -07:00
Alisdair McDiarmid a2b21db556
Update CHANGELOG.md 2020-04-14 09:24:54 -04:00
Alisdair McDiarmid 8e7ace44c3
Merge pull request #24650 from hashicorp/alisdair/upgrade-hcl
vendor: go get github.com/hashicorp/hcl/v2@v2.4.0
2020-04-14 09:21:44 -04:00
Daniel Dreier c14d6f4241
Fix typo in CONTRIBUTING.md 2020-04-13 18:01:12 -07:00
Pam Selle ab101f99df
Merge pull request #24635 from hashicorp/pselle/docs-mod-count
Docs for count/for_each on modules
2020-04-13 18:39:59 -04:00
Ryan Uber 93906e1ad8 backend/remote: display cost estimate and policy check whenever available 2020-04-13 13:04:53 -07:00
Chris Griggs 8da255073e [Website] provider links 2020-04-13 12:29:15 -07:00
Pam Selle 146644a848 update addressing section 2020-04-13 12:13:18 -04:00
Pam Selle 608c17d518 Update providers block notes 2020-04-13 12:08:08 -04:00
Fred 76f583ac9f
website/docs: fix broken hcl json spec link (#24630) 2020-04-13 11:15:13 -04:00
Alisdair McDiarmid 9128ce611a vendor: go get github.com/hashicorp/hcl/v2@v2.4.0 2020-04-13 10:48:29 -04:00
Alisdair McDiarmid 65f9de04af
Update CHANGELOG.md 2020-04-13 09:44:47 -04:00
Alisdair McDiarmid 4cc18ce061
Merge pull request #24621 from hashicorp/alisdair/upgrade-go-cty
vendor: go get github.com/zclconf/go-cty@v1.4.0
2020-04-13 09:42:42 -04:00
Mikhail Mazurskiy c9ce1f0c1f
Fix typos (#24531) 2020-04-13 08:34:40 -04:00
Pam Selle 65c4ba9c85 First docs for count/for_each on modules 2020-04-10 15:14:06 -04:00
Kristin Laemmert 4079247270
Update CHANGELOG.md 2020-04-10 15:11:46 -04:00
Kristin Laemmert 269d511481 command/providers: refactor with new provider types and functions
The providers command has been refactored to use the modern provider types and
ProviderRequirements() functions. This resulted in a breaking change to
the output: it no longer outputs the providers by module and no longer
prints `(inherited)` or `(from state)` to show why a provider is
included. We decided that at this time it was best to stick with the
existing functions and make this change, but if we get feedback from the
community we will revisit.

Additional tests to exercise providers in modules and providers from
state have been included.
2020-04-10 15:08:10 -04:00
Kristin Laemmert 0a5fb40fdf configs: include provider configs in ProviderRequirements()
This PR adds iteration through any provider configuration blocks in the
config in addProviderRequirements().

A stale comment (of mine!) would leave one expecting the
module.ProviderRequirements to include any requirements from provider
configs. The comment was inaccurate and has been updated.
2020-04-10 15:08:10 -04:00
James Bardin 5ddb1a5808
Merge pull request #24623 from hashicorp/jbardin/module-output-references
Correctly connect module output references during plan
2020-04-10 14:46:25 -04:00
James Bardin 46b85820ba
Update addrs/module_call.go
Co-Authored-By: Pam Selle <pam@hashicorp.com>
2020-04-10 14:45:36 -04:00
Eduard Tamsa 534ba630e4
docs(flatten): Fix typos (#24492) 2020-04-10 08:59:17 -04:00
Kyler Middleton 89bef596fc
docs: Fix typo in maintainer-etiquette (#24609) 2020-04-10 08:55:19 -04:00
Danny Guo b7b981fbe1
website/docs: Fix a typo in the import command docs (#24622) 2020-04-10 08:54:19 -04:00
Stanislav Petrashov 0add5d4915 Update community-index.html.markdown 2020-04-09 15:59:36 -07:00
Michael Conlon 1ec6fc6643
website: note special behavior for modules in us-east-1 S3 buckets (#24155)
* Keep s3 docs in line with functionality

Related to https://github.com/hashicorp/terraform/issues/16442

* @nfagerlund's suggested markdown and wording changes
2020-04-09 15:56:59 -07:00
James Bardin b9ddec33e9 de-specify module output references
Like resource references, we need to make instance references less
specific when they aren't expanded yet during plan.
2020-04-09 15:41:35 -04:00
James Bardin a805e14283 module output expansion test 2020-04-09 15:39:48 -04:00
James Bardin a0f92f9d6a remove extra brackets in state string output 2020-04-09 15:36:16 -04:00
Alisdair McDiarmid 1593b8b8e5 vendor: go get github.com/zclconf/go-cty@v1.4.0
This fixes several bugs:

- `substr("abc", 0, 0)` would previously return `"abc"`, despite the
  length argument being `0`. This has been changed to return an empty
  string when length is zero.

- `ceil(1/0)` and `floor(1/0)` would previously return a large integer
  value, rather than infinity. This has been fixed.
2020-04-09 14:19:05 -04:00
Petros Kolyvas 2bb020193b
Merge pull request #24556 from pkolyvas/contribution-codeowners
An update to our CODEOWNERS and Contribution Guide
2020-04-09 14:12:09 -04:00