Commit Graph

26418 Commits

Author SHA1 Message Date
Lars Lehtonen 3d6a321d59
tools/terraform-bundle: fix dropped error (#25475) 2020-07-06 14:30:36 -04:00
James Bardin b6c409613e make all unnecessary edges dotted
There were a couple missing
2020-07-02 14:22:52 -04:00
Alvin Huang 682440766f
Merge pull request #25456 from hashicorp/use-alpine-latest
use alpine:latest as the base image for terraform docker containers
2020-07-02 10:32:31 -04:00
Petros Kolyvas 1232404ef2
Merge pull request #25457 from hashicorp/jul20_provider_docs_link
website: Fix broken link to /docs/registry/providers/docs.html
2020-07-02 09:40:46 -04:00
Nick Fagerlund 54e34fd9bb website: Fix broken link to /docs/registry/providers/docs.html 2020-07-01 17:06:16 -07:00
James Bardin af20d5404f
Merge pull request #25455 from hashicorp/jbardin/destroy-doc
Update destroy doc
2020-07-01 19:45:53 -04:00
James Bardin 1c1782bb1b add lists of operations 2020-07-01 17:11:55 -04:00
James Bardin dcf62ed378 Fix typo and add more information about CBD
The reason for the interleaved updated in CBD is important.

fix
2020-07-01 17:11:50 -04:00
James Bardin fb9c8261c5 replace the incorrect graph image
The dot in the comment was correct, so it was just the wrong image
saved.
2020-07-01 16:44:17 -04:00
James Bardin c12d0d139d
Merge pull request #25453 from hashicorp/jbardin/destroy-doc
add doc about destroying resources and ordering
2020-07-01 16:16:24 -04:00
James Bardin 16b7541277
Apply suggestions from code review
Co-authored-by: Alisdair McDiarmid <alisdair@users.noreply.github.com>
2020-07-01 16:10:02 -04:00
Alvin Huang b52715a8f7 use alpine:latest as the base image for terraform docker containers 2020-07-01 16:03:06 -04:00
Pam Selle 9cf5a18532
Merge pull request #25238 from HadrienPatte/fix-json-output-format-docs
Fix JSON output format documentation
2020-07-01 15:08:02 -04:00
Pam Selle d1e9172960
Merge pull request #25292 from mschuchard/patch-1
update hcl language markdown to terraform markdown
2020-07-01 15:07:04 -04:00
Martin Atkins fa6ab0c2d7
version: Fix version number for 0.13.0-dev 2020-07-01 11:56:24 -07:00
James Bardin 642dadcd96 add doc about destroying resources and ordering 2020-07-01 14:50:12 -04:00
hashicorp-ci e2d73e78ad Cleanup after v0.13.0-beta3 release 2020-07-01 18:47:35 +00:00
hashicorp-ci ab93bca6c5
Release v0.13.0-beta3 2020-07-01 17:50:24 +00:00
Martin Atkins b47f75b0ef
Update CHANGELOG.md 2020-07-01 10:47:08 -07:00
Kristin Laemmert 906da0e550
Update CHANGELOG.md 2020-07-01 09:45:04 -04:00
Kristin Laemmert f3a1f1a263
terraform console: enable use of impure functions (#25442)
* command/console: allow use of impure functions in terraform console
* add tests for Context Eval
2020-07-01 09:43:07 -04:00
Lucas Barbay a9fd9a97f2
Update community-index.html.markdown
Add Itop and FortiADC (By Fortinet) community providers
2020-07-01 12:21:57 +02:00
Kristin Laemmert fdab1704cc
Update CHANGELOG.md 2020-06-30 14:13:21 -04:00
Kristin Laemmert 604e65bb62 Revert "backend/local: release lock if there is an error in Context() (#25427)"
This reverts commit 1ba0d615e7.
2020-06-30 14:12:32 -04:00
Petros Kolyvas 6b8d389d57
Merge pull request #25428 from hashicorp/rln-add-import-guide-link
Add link to new Terraform Import guide on learn platform
2020-06-30 11:44:29 -04:00
Alisdair McDiarmid 098428df61
Update CHANGELOG.md 2020-06-29 15:29:55 -04:00
Alisdair McDiarmid df82796550
Merge pull request #25420 from hashicorp/alisdair/fix-import-provider-config-references
terraform: Relax provider config ref constraints
2020-06-29 15:28:10 -04:00
Kristin Laemmert 98410c3041
Update CHANGELOG.md 2020-06-29 15:27:33 -04:00
Kristin Laemmert 1ba0d615e7
backend/local: release lock if there is an error in Context() (#25427)
* command/console: return in case of errors before trying to unlock remote
state

The remote backend `Context` would exit without an active lock if there
was an error, while the local backend `Context` exited *with* a lock. This
caused a problem in `terraform console`, which would call unlock
regardless of error status.

This commit makes the local and remote backend consistently unlock the
state incase of error, and updates terraform console to check for errors
before trying to unlock the state.

* adding tests for remote and local backends
2020-06-29 14:57:42 -04:00
James Bardin 8a152f5649
Merge pull request #25419 from hashicorp/jbardin/cbd-scale-in
don't evaluate destroy instances
2020-06-29 12:58:11 -04:00
Robin Norwood 30779a384f Add link to usage as well 2020-06-29 10:44:07 -05:00
Robin Norwood cd1cc9fc79 Add link to new Terraform Import guide on learn platform 2020-06-29 10:38:46 -05:00
Justin Campbell e85376990d
website: Terraform Registry Provider Publishing docs (#25378)
* website: Terraform Registry Provider Publishing

* website: (Registry) remove OS/arch recommendation

Until we have a canonical list to point to

Co-authored-by: Paul Tyng <ptyng@hashicorp.com>

Co-authored-by: Paul Tyng <ptyng@hashicorp.com>
2020-06-29 11:04:52 -04:00
Alisdair McDiarmid ac99a3b916 terraform: Relax provider config ref constraints
When configuring providers, it is normally valid to refer to any value
which is known at apply time. This can include resource instance
attributes, variables, locals, and so on.

The import command has a simpler graph evaluation, which means that
many of these values are unknown. We previously prevented this from
happening by restricting provider configuration references to input
variables (#22862), but this was more restrictive than is necessary.

This commit changes how we verify provider configuration for import.
We no longer inspect the configuration references during graph building,
because this is too early to determine if these values will become known
or not.

Instead, when the provider is configured during evaluation, we
check if the configuration value is wholly known. If not, we fail with a
diagnostic error.

Includes a test case which verifies that providers can now be configured
using locals as well as vars, and an updated test case which verifies
that providers cannot be configured with references to resources.
2020-06-29 10:58:20 -04:00
Kristin Laemmert 45d72b3018
terraform: check for unknows in for_each type before validating set (#25426)
element types

The error message when evaluateForEachExpression encounted an unknown
value of cty.DynamicPseudoType was not clear:

The given "for_each" argument value is unsuitable: "for_each" supports maps
and sets of strings, but you have provided a set containing type dynamic.

By moving the check for unknowns before the check for set element types,
the following error is returned instead:

"The "for_each" value depends on resource attributes that cannot be
determined until apply (...)"
2020-06-29 09:12:36 -04:00
James Bardin 6243a6307a don't evaluate destroy instances
Orphaned instances that are create_before_destroy will still be in the
state when their references are evaluated. We need to skip instances
that are planned to be destroyed altogether, as they can't be part of an
evaluation.
2020-06-26 18:05:53 -04:00
Kristin Laemmert be34a0e76f
Update CHANGELOG.md 2020-06-26 12:50:10 -04:00
Kristin Laemmert df244b87c2
command/init: return an error with invalid -backend-config files (#25411)
* command/init: return an error with invalid -backend-config files

The -backend-config flag expects a set of key-value pairs or a file
containing key-value pairs. If the file instead contains a full backend
configuration block, it was silently ignored. This commit adds a check
for blocks in the file and returns an error if they are encountered.

Fixes #24845

* emphasize backend configuration file in docs
2020-06-26 12:49:31 -04:00
Julian Grinblat 0b3c0f64c2
build: Allow building on non-terraform named directory (#25340)
* Allow building on non-terraform named directory

* Fix gofmt errors

* Fix generate-plugins.go unused variable error
2020-06-26 12:07:58 -04:00
DouglasFarr 81b83763e9
website/docs: Typo fix to v11 upgrade guide (#25357)
with* correction.
2020-06-26 11:38:11 -04:00
Alisdair McDiarmid 65ddf2c664
Update CHANGELOG.md 2020-06-26 10:00:48 -04:00
Alisdair McDiarmid 7190ef571e
Merge pull request #25408 from hashicorp/alisdair/fix-panic-provider-alias
configs: Fail early for invalid resource provider
2020-06-26 09:59:46 -04:00
Alisdair McDiarmid 5e3d2dbdfa configs: Fail early for invalid resource provider
If a resource's "provider" reference is invalid and cannot be parsed, we
should not store the reference as part of a `ProviderConfigRef`. Doing
so creates an invalid data structure, which prevents us from using
`MustParseProviderPart` with the name in later steps.

The invalid test files added in this commit will cause a panic without
the code change.
2020-06-26 09:47:58 -04:00
Paul Tyng 4459e6ea3a
Merge pull request #25385 from hashicorp/newrelic
Fix links to migrated providers
2020-06-26 08:57:51 -04:00
Alisdair McDiarmid 5b9ae35e67
Update CHANGELOG.md 2020-06-26 08:57:46 -04:00
Alisdair McDiarmid fef43ad5b7
Merge pull request #25400 from hashicorp/alisdair/update-cty
Upgrade go-cty to v1.5.1
2020-06-26 08:56:15 -04:00
James Bardin 32d12d9719
Merge pull request #25373 from hashicorp/jbardin/targeting
New target transformer
2020-06-25 20:58:34 -04:00
Alisdair McDiarmid cc655af72f go get github.com/zclconf/go-cty@v1.5.1 2020-06-25 17:05:19 -04:00
Petros Kolyvas 16989dc70c
Merge pull request #25394 from Mikulas/patch-1
Document swift support for locks
2020-06-25 16:37:17 -04:00
James Bardin c96914d624
Merge pull request #25399 from hashicorp/jbardin/destroy-deps
index destroy dependencies by addrs.ConfigResource
2020-06-25 16:04:03 -04:00