Commit Graph

25988 Commits

Author SHA1 Message Date
Alisdair McDiarmid
62d826e066 command/init: Use full config for provider reqs
Relying on the early config for provider requirements was necessary in
Terraform 0.12, to allow the 0.12upgrade command to run after init
installs providers.

However in 0.13, the same restrictions do not apply, and the detection
of provider requirements has changed. As a result, the early config
loader gives incorrect provider requirements in some circumstances,
such as those in the new test in this commit.

Therefore we are changing the init command to use the requirements found
by the full configuration loader. This also means that we can remove the
internal initwd CheckCoreVersionRequirements function.
2020-05-25 16:50:12 -04:00
Daniel Dreier
df39e0a806
Merge pull request #23989 from tatsuo48/fix_sample_code
fix sample code
2020-05-21 15:03:52 -07:00
Daniel Dreier
398972aa24
Merge pull request #22826 from yessarath/patch-1
local backend example added
2020-05-21 14:54:55 -07:00
Daniel Dreier
f737d684e5
Update website/docs/providers/terraform/d/remote_state.html.md
Co-authored-by: Nick Fagerlund <nick@hashicorp.com>
2020-05-21 14:54:40 -07:00
Daniel Dreier
d006b85c26
Update website/docs/providers/terraform/d/remote_state.html.md
Co-authored-by: Nick Fagerlund <nick@hashicorp.com>
2020-05-21 14:54:30 -07:00
Daniel Dreier
1c024aa06f
Merge pull request #24319 from ritarock/improve_doc
improve s3.html.md
2020-05-21 14:33:14 -07:00
Daniel Dreier
44e3d99409
Merge pull request #24659 from hashicorp/timestamp-doc
specify that `timestamp` returns UTC
2020-05-21 14:30:16 -07:00
Daniel Dreier
5e35dedc2a
Update website/docs/configuration/functions/timestamp.html.md
Co-authored-by: Matthew Sanabria <24284972+sudomateo@users.noreply.github.com>
2020-05-21 14:29:38 -07:00
Daniel Dreier
5f80f6d49d
Merge pull request #24771 from bradleypmartin/issue-24198-update-docs-for-map-type
Update maps docs to reflect v0.12 colon behavior
2020-05-21 14:28:19 -07:00
Daniel Dreier
5ef80b35e3
Merge pull request #24996 from pcleddy/foreach_with_toset_and_list
Example of for_each with list -> set using toset
2020-05-21 14:22:06 -07:00
Pam Selle
bfbdb4cb1d
Add docs for provider limitations when expanding modules (#25007)
* Add docs for provider limitations when expanding modules
2020-05-21 14:04:44 -04:00
Petros Kolyvas
5c49710893
Merge pull request #25008 from hashicorp/pkolyvas-import-static-site-language
Small modification to the website docs regarding import
2020-05-20 21:20:21 -04:00
Petros Kolyvas
c2f1033e86
Removing the "future version will...
We fully intend to do this, but this vague statement is no longer helpful. Will update when we have something more concrete.
2020-05-20 20:44:43 -04:00
Tom Harvey
d73fde47ac
updating to include #24669 2020-05-20 17:29:53 +02:00
Matthew Frahry
481b03c34a
Update azure backend storage sdk (#24669)
* update vendored azure sdk

* vendor giovanni storage sdk

* Add giovanni clients

* go mod vendor

* Swap to new storage sdk

* workable tests

* update .go-version to 1.14.2

* Tests working minus SAS

* Add SAS Token support

* Update vendor

* Passing tests

* Add date randomizer

* Captalize RG

* Remove random bits

* Update client var name

Co-authored-by: kt <kt@katbyte.me>
2020-05-20 17:29:02 +02:00
Kristin Laemmert
eead4c49fe command/init: add e2e tests for provider not found messages 2020-05-20 11:04:11 -04:00
Kristin Laemmert
8d28d73de3 getproviders: add a registry-specific error and modify output when a
provider is not found.

Previously a user would see the following error even if terraform was
only searching the local filesystem:

"provider registry registry.terraform.io does not have a provider named
...."

This PR adds a registry-specific error type and modifies the MultiSource
installer to check for registry errors. It will return the
registry-specific error message if there is one, but if not the error
message will list all locations searched.
2020-05-20 11:04:11 -04:00
Kristin Laemmert
a33a613703 command/init: add debug messages when -plugin-dir is set 2020-05-20 11:04:11 -04:00
James Bardin
e690fa1363
Merge pull request #24904 from hashicorp/jbardin/plan-data-sources
Evaluate data sources in plan when necessary
2020-05-20 10:00:32 -04:00
Paul Leddy
3d17c87698 Example of for_each with list -> set using toset 2020-05-19 16:03:21 -07:00
Kristin Laemmert
0d620018fe
provider cache: log errors and validate dir exists (#24993)
* providercache: add logging for errors from getproviders.SearchLocalDirectory

providercache.fillMetaCache() was silently swallowing errors when
searching the cache directory. This commit logs the error without
changing the behavior otherwise.

* command/cliconfig: validate plugin cache dir exists

The plugin cache directory must exist for terraform to use it, so we
will add a check at the begining.
2020-05-19 15:32:36 -04:00
CJ Horton
e1dcae17b7 add sad path tests for the TFP API version check 2020-05-19 11:14:48 -07:00
CJ Horton
68f199fc76 replace status string with go-tfe enum 2020-05-19 11:14:36 -07:00
CJ Horton
0b2a8a5f64 go get github.com/hashicorp/go-tfe@v0.8.1 + vendor 2020-05-19 11:14:27 -07:00
Martin Atkins
92e9428d0e
Update CHANGELOG.md 2020-05-19 09:45:56 -07:00
Martin Atkins
91de838243
Update CHANGELOG.md 2020-05-19 09:26:57 -07:00
Martin Atkins
c1f69fba03
backend/remote: Support -target on plan and apply 2020-05-19 09:24:19 -07:00
James Bardin
a8e0914d7f attach dependency type name changes 2020-05-18 21:35:37 -04:00
Daniel Dreier
19dc9b7b28
Merge pull request #24938 from hgsgtk/fix/typo_instance
fix typo ResourceInstancChange to ResourceInstanceChange
2020-05-18 18:23:12 -07:00
Martin Atkins
8e1615a802 backend/remote: Handle cost estimation skipped due to targeting
The remote server might choose to skip running cost estimation for a
targeted plan, in which case we'll show a note about it in the UI and then
move on, rather than returning an "invalid status" error.

This new status isn't yet available in the go-tfe library as a constant,
so for now we have the string directly in our switch statement. This is
a pragmatic way to expedite getting the "critical path" of this feature
in place without blocking on changes to ancillary codebases. A subsequent
commit should switch this over to tfe.CostEstimateSkippedDueToTargeting
once that's available in a go-tfe release.
2020-05-18 15:12:44 -07:00
Kristin Laemmert
a4c3c1d389
vendor: upgrade go-cty dependency to 1.4.1 (#24983)
* vendor: upgrade go-cty dependency to 1.4.1

This upgrade fixes a panic with inconsistent object element types.
2020-05-18 14:10:19 -04:00
James Bardin
78d8af18c2
Merge pull request #24956 from hashicorp/jbardin/cbd-state
CreateBeforeDestroy inheritence and state serializaton
2020-05-18 11:46:29 -04:00
James Bardin
08128fe775 add omitempty to create_before_destroy
no need to litter the state file with "create_before_destroy":false
2020-05-18 11:31:36 -04:00
Paul Tyng
eb4a3cafc6
Merge pull request #24972 from hashicorp/paultyng-patch-1
Remove sumologic from community
2020-05-18 11:02:55 -04:00
Paul Tyng
e8f75b55ab
Remove sumologic from community 2020-05-16 12:23:46 -04:00
CJ Horton
0eea4e7c62 prevent targeting for unsupported API versions 2020-05-15 16:57:18 -07:00
Mike Nomitch
650a272a1d Change message sent to remote backend if -target used 2020-05-15 15:58:45 -07:00
Martin Atkins
16f1f3b739 backend/remote: Support -target on plan and apply
Previously we did not allow -target to be used with the remote backend
because there was no way to send the targets to Terraform Cloud/Enterprise
via the API.

There is now an attribute in the request for creating a plan that allows
us to send target addresses, so we'll remove that restriction and copy
the given target addresses into the API request.
2020-05-15 15:58:45 -07:00
Martin Atkins
db4f3f8bc5 vendor: go get github.com/hashicorp/go-tfe@v0.8.0
This includes a new TargetAddrs field on both Run and RunCreateOptions
which we'll use to send resource addresses that were specified using
-target on the CLI command line when using the remote backend.

There were some unrelated upstream breaking changes compared to the last
version we had vendored, so this commit also includes some changes to the
backend/remote package to work with this new API, which now requires the
remote backend to be aware of the remote system's opaque workspace id.
2020-05-15 15:58:01 -07:00
Nick Fagerlund
e358d6b618
website: Edit text of new TF_IGNORE env var docs (#24788)
* website: Edit text of new TF_IGNORE env var docs

Fixing one broken link, and tidying the sentences a bit.

* typo

Co-authored-by: Pam Selle <pam@hashicorp.com>
2020-05-14 13:35:27 -07:00
James Bardin
a286ef6d9c remove depends_on from helper test shims 2020-05-14 15:57:16 -04:00
James Bardin
756e889697 remove unused DependsOn usage in state 2020-05-14 15:46:08 -04:00
James Bardin
c052463f62 test for inherited create_before_destroy in state 2020-05-14 15:46:08 -04:00
James Bardin
7731441beb Make sure CBD is correct during apply, and saved
The resource apply nodes need to be GraphNodeDestroyerCBD in order to
correctly inherit create_before_destroy. While the plan will have
recorded this to create the correct deposed nodes, the edges still need
to be transformed correctly.

We also need create_before_destroy to be saved to state for nodes that
inherited it, so that if they are removed from state the destroy will
happen in the correct order.
2020-05-14 15:46:08 -04:00
James Bardin
cf9b6de03e force cbd during apply too
We need to run the force CBD transformer during apply too, both to
ensure we can rely on the `CreateBeforeDestroy()` status for dependants
during apply, but also to ensure that the correct status is stored into
state.
2020-05-14 15:46:08 -04:00
James Bardin
9fe87fe520 remove unused depends_on field and add test
The depends_on fields was deprecated during 0.12, and is no longer used.

Add a roundtrip test for the create_before_destroy status.
2020-05-14 15:46:08 -04:00
James Bardin
23f5fc3e5a thread create_before_destroy to the state file 2020-05-14 15:46:08 -04:00
Chris Griggs
6a01c40312
Merge pull request #24953 from hashicorp/cgriggs01-ksyun
[Website] KingsoftCloud provider link
2020-05-14 12:23:33 -07:00
Chris Griggs
c29b51b455 [Website] Kingsoft cloud provider link 2020-05-14 09:33:12 -07:00
Alisdair McDiarmid
187f3f561b
Merge pull request #24952 from hashicorp/alisdair/upgrade-hcl
vendor: go get github.com/hashicorp/hcl/v2@v2.5.1
2020-05-14 09:56:56 -04:00