Commit Graph

28982 Commits

Author SHA1 Message Date
Alisdair McDiarmid 89e8d0868a
Merge pull request #26061 from hashicorp/alisdair/013upgrade-registry-provider-redirect
command: Add redirect support to 0.13upgrade
2020-09-01 08:59:35 -04:00
Jai Govindani d8b36e5d12
style(providers): update syntax for terraform >= 0.11 2020-09-01 10:38:18 +07:00
Nick Fagerlund f57861936c website: fix a broken community provider link 2020-08-31 17:02:57 -07:00
Kristin Laemmert 49597c3c21
Update CHANGELOG.md 2020-08-31 15:52:29 -04:00
Kristin Laemmert 196c183dda
terraform: remove state from `validate` graph walk (#26063)
This pull reverts a recent change to backend/local which created two context, one with and one without state. Instead I have removed the state entirely from the validate graph (by explicitly passing a states.NewState() to the validate graph builder).

This changed caused a test failure, which (ty so much for the help) @jbardin discovered was inaccurate all along: the test's call to `Validate()` was actually what was removing the output from state. The new expected test output matches terraform's actual behavior on the command line: if you use -target to destroy a resource, an output that references only that resource is *not* removed from state even though that test would lead you to believe it did.

This includes two tests to cover the expected behavior:

TestPlan_varsUnset has been updated so it will panic if it gets more than one request to input a variable
TestPlan_providerArgumentUnset covers #26035

Fixes #26035, #26027
2020-08-31 15:45:39 -04:00
Alisdair McDiarmid fc7e467d19 command: Add redirect support to 0.13upgrade
If a provider changes namespace in the registry, we can detect this when
running the 0.13upgrade command. As long as there is a version matching
the user's constraints, we now use the provider's new source address.
Otherwise, warn the user that the provider has moved and a version
upgrade is necessary to move to it.
2020-08-31 14:53:35 -04:00
Tony Carmichael d7de46df10 Update publishing.html.md
docs updates for GPG key gen instructions
2020-08-31 09:16:27 -04:00
Pam Selle 7032e651a8
Merge pull request #25927 from hashicorp/aug20_mirror_sidebar
website: fix nav link text for 'providers mirror'
2020-08-28 12:48:58 -04:00
Pam Selle 8163c9771a
Merge pull request #25019 from 0zAND1z/patch-2
Update hashcode.go
2020-08-28 12:46:37 -04:00
Pam Selle 73cba31602
Merge pull request #25605 from davidair/patch-1
Tiny typo in an error message
2020-08-28 12:38:55 -04:00
Pam Selle f2d213c461
Merge pull request #25657 from pdecat/typo_hierarchical
Typo: heirarchical => hierarchical
2020-08-28 12:37:49 -04:00
Alisdair McDiarmid 2323e9370a command: Warn instead of error for empty output
When the output subcommand is called with no arguments, and there are no
outputs to show, we previously rendered an error message but returned a
non-error status code. This is confusing.

This commit changes the text UI to use a warning diagnostic, which makes
it clearer that this is a non-error situation. We do not change the exit
code or the text of the warning, so hopefully this is not considered a
breaking change.
2020-08-28 11:05:46 -04:00
Alisdair McDiarmid 27416fba92
Update CHANGELOG.md 2020-08-28 10:30:35 -04:00
Alisdair McDiarmid 8198e9758c
Merge pull request #26028 from hashicorp/alisdair/fix-eval-read-data-panic
terraform: Fix createEmptyBlocks NestingSingle bug
2020-08-28 10:29:28 -04:00
Kristin Laemmert 3e1f741666
webside/docs: add note re: archive subdirectories to http download (#26020)
section
2020-08-28 09:54:43 -04:00
Pam Selle ba461fe0e1
Merge pull request #26004 from bzeitler69/patch-1
chore: Update mirror.html.md
2020-08-28 09:46:45 -04:00
Pam Selle 29af42df81
Merge pull request #25973 from Fabian-Schmidt/provisioner_comment_fix
provisioner comment fix.
2020-08-28 09:46:13 -04:00
Pam Selle 233c7c6793 Run gofmt 2020-08-28 09:41:00 -04:00
Pam Selle 0e93ed4377
Merge pull request #26024 from hashicorp/rberlind-foreach-patch
Fix foreach to for_each
2020-08-27 20:56:55 -04:00
Alisdair McDiarmid 5be772d85a terraform: Fix createEmptyBlocks NestingSingle bug
When calling createEmptyBlocks, we only intend to process legacy SDK
blocks (NestingList or NestingSet), but the function also needs to pass
through NestingSingle block types untouched. To do so we must only look
up the container's element type after we've established that the block
is backed by a container.
2020-08-27 20:29:36 -04:00
Roger Berlind 3070f21241
Fix foreach to for_each
`foreach` on modules should be `for_each`
2020-08-27 14:37:52 -04:00
Alan D. Salewski f63c38d6a1
internal/initwd: allow tests to pass when $PWD contains symlinks (#26015)
Fixes #26014
2020-08-27 10:02:22 -04:00
Martin Atkins 9699479601
Update CHANGELOG.md 2020-08-26 15:27:04 -07:00
Martin Atkins 2bd2a9a923 internal/getproviders: HTTPMirrorSource implementation
We previously had this just stubbed out because it was a stretch goal for
the v0.13.0 release and it ultimately didn't make it in.

Here we fill out the existing stub -- with a minor change to its interface
so it can access credentials -- with a client implementation that is
compatible with the directory structure produced by the
"terraform providers mirror" subcommand, were the result to be published
on a static file server.
2020-08-26 13:18:08 -07:00
Martin Atkins 146e983c36 internal/getproviders: package authenticator for our new-style hashes
Earlier we introduced a new package hashing mechanism that is compatible
with both packed and unpacked packages, because it's a hash of the
contents of the package rather than of the archive it's delivered in.
However, we were using that only for the local selections file and not
for any remote package authentication yet.

The provider network mirrors protocol includes new-style hashes as a step
towards transitioning over to the new hash format in all cases, so this
new authenticator is here in preparation for verifying the checksums of
packages coming from network mirrors, for mirrors that support them.

For now this leaves us in a kinda confusing situation where we have both
NewPackageHashAuthentication for the new style and
NewArchiveChecksumAuthentication for the old style, which for the moment
is represented only by a doc comment on the latter. Hopefully we can
remove NewArchiveChecksumAuthentication in a future commit, if we can
get the registry updated to use the new hashing format.
2020-08-26 13:18:08 -07:00
Kristin Laemmert 23a8bdd522
configs: finish deprecation of the config package by removing the remaining used functions into configs (#25996) 2020-08-26 14:39:18 -04:00
hashicorp-ci 18bdd1a4f0 Cleanup after v0.13.1 release 2020-08-26 18:17:25 +00:00
hashicorp-ci d29b2627b9
Release v0.13.1 2020-08-26 17:59:59 +00:00
Kristin Laemmert 4569a37de4
website/docs: provider source related clarifications 2020-08-26 13:50:07 -04:00
Alisdair McDiarmid c13eba9b9d
Merge pull request #26005 from hashicorp/alisdair/backend-config-schema-fix
command: Fix backend config schema validation
2020-08-26 11:52:04 -04:00
Alisdair McDiarmid 45437721c9 command: Add test for backend config validation 2020-08-26 11:37:11 -04:00
Alisdair McDiarmid f028b0a2bf command: Fix backend config schema validation
When applying a backend config override file, we must not check for the
presence of all required fields, as the override can be a partial
configuration. It is only valid to check for required fields after all
overrides have been merged, which init already does.
2020-08-26 10:50:47 -04:00
Pam Selle edc670d079 Add deprecation warning for vendor provisioners
Adds a warning for chef, habitat, puppet, and salt-masterless
provisioners, and a corresponding test file to test for the warning
2020-08-26 10:46:04 -04:00
Bogdan Tsaitler b738da2f04
Update mirror.html.md 2020-08-26 17:10:45 +03:00
Kristin Laemmert 75e676f2f2
website/docs: remove unclear provider version constraint description (#25998) 2020-08-25 17:03:24 -04:00
Jamie Finnigan 08f593deb8
Merge pull request #25982 from hashicorp/gh_sec_pol
remove local SECURITY.md in favor of org-wide policy
2020-08-25 13:20:01 -07:00
Alisdair McDiarmid 93cd6b1b75
Merge pull request #25989 from pdecat/patch-1
Fix link to "v0.12-Compatible Provider Requirements" section
2020-08-25 15:59:25 -04:00
Alisdair McDiarmid d22a2cd3b2
Merge pull request #25992 from hashicorp/alisdair/upgrade-go
build: Use go 1.14.7
2020-08-25 15:11:05 -04:00
Alisdair McDiarmid 1b9b85115b
Merge pull request #25994 from hashicorp/alisdair/provider-requirements-doc-note
website: Provider requirements are not inherited
2020-08-25 14:33:17 -04:00
Alisdair McDiarmid 5f43934d5f website: Provider requirements are not inherited
Add a note to the provider configuration section explaining that only
config can be inherited by child modules, not source or version
requirements.
2020-08-25 13:02:16 -04:00
Alisdair McDiarmid b273ffe4df build: Use go 1.14.7
From the go release notes:

go1.14.3 (released 2020/05/14) includes fixes to cgo, the compiler, the
runtime, and the go/doc and math/big packages.

go1.14.4 (released 2020/06/01) includes fixes to the go doc command, the
runtime, and the encoding/json and os packages.

go1.14.5 (released 2020/07/14) includes security fixes to the
crypto/x509 and net/http packages.

go1.14.6 (released 2020/07/16) includes fixes to the go command, the
compiler, the linker, vet, and the database/sql, encoding/json,
net/http, reflect, and testing packages.

go1.14.7 (released 2020/08/06) includes security fixes to the
encoding/binary package.

https://golang.org/doc/devel/release.html#go1.14.minor
2020-08-25 12:37:08 -04:00
Paul Tyng 7a34d4d709
Add Terraform Cloud provider requirements (#25991) 2020-08-25 10:45:44 -04:00
Alisdair McDiarmid af2fb8f526
Update CHANGELOG.md 2020-08-25 09:05:07 -04:00
Alisdair McDiarmid aca6ce3c4d
Merge pull request #25990 from hashicorp/alisdair/clean-up-provider-tempfile
internal: Clean up package install temp file
2020-08-25 09:03:59 -04:00
Alisdair McDiarmid 915f53af23 internal: Clean up package install temp file
The installFromHTTPURL function downloads a package to a temporary file,
then delegates to installFromLocalArchive to install it. We were
previously not deleting the temporary file afterwards. This commit fixes
that.
2020-08-25 08:35:32 -04:00
Patrick Decat 84c50f9efb Fix link to "v0.12-Compatible Provider Requirements" section
On the https://www.terraform.io/docs/configuration/provider-requirements.html#requiring-providers page, the link to the `v0.12-Compatible Provider Requirements` section is broken:
* current link: https://www.terraform.io/docs/configuration/provider-requirements.html#v012-compatible-provider-requirements
* correct link: https://www.terraform.io/docs/configuration/provider-requirements.html#v0-12-compatible-provider-requirements
2020-08-25 12:35:07 +02:00
Jamie Finnigan 7eda697978 remove local SECURITY.md in favor of org-wide policy 2020-08-24 15:45:32 -07:00
Martin Atkins b1eec0fbcd core: NodeAbstractResourceInstance.Provider correct implied provider
When we need to select a qualified provider address based on an implied
provider name, we have a special case that the name "terraform" maps to
terraform.io/builtin/terraform instead of
registry.terraform.io/hashicorp/terraform as would be the case for other
prefixes.

However, in order for that to work properly we need to use
addrs.ImpliedProviderForUnqualifiedType instead of
addrs.NewDefaultProvider, because the latter just unconditionally always
produces a "default" provider configuration (belonging to the "hashicorp"
namespace on the public registry).
2020-08-24 11:41:28 -07:00
Martin Atkins 9c246e9a01 addrs: Resource.InModule, similar to Resource.Absolute
The Resource.Absolute function is there to conveniently construct an
AbsResource from a Resource by providing a module instance. Likewise, this
new InModule method allows conveniently constructing a ConfigResource from
a Resource by providing a module.
2020-08-24 11:41:28 -07:00
Alisdair McDiarmid d26ee0ea37
Update CHANGELOG.md 2020-08-24 10:17:06 -04:00