Commit Graph

23479 Commits

Author SHA1 Message Date
Brian Flad 626022670e
Update CHANGELOG for #20374 2019-02-20 08:49:14 -08:00
James Bardin 9bd7419fce
Merge pull request #20395 from hashicorp/jbardin/go-plugin
update go-plugin
2019-02-20 11:44:38 -05:00
Brian Flad 185a3304e5
Merge pull request #20374 from hashicorp/td-backend-s3-dependencies
backend/s3: Switch from github.com/terraform-providers/terraform-provider-aws to github.com/hashicorp/aws-sdk-go-base
2019-02-20 08:42:07 -08:00
Brian Flad a41e545198
backend/s3: Reinstate region validation and update copy for skip_requesting_account_id deprecation message 2019-02-20 08:29:09 -08:00
James Bardin 493ee39f23 update go-plugin 2019-02-20 11:24:05 -05:00
Sander van Harmelen 3376e6ef2e
Update CHANGELOG.md 2019-02-20 10:49:12 +01:00
Sander van Harmelen 43eb7c08e0
Merge pull request #20379 from hashicorp/svh/f-state-service
backend/remote: use `state.v2` for remote state only
2019-02-20 10:48:05 +01:00
Kristin Laemmert b14472f22c
command/jsonconfig: add missing fields from configuration output (#20387)
Display depends_on for resources and outputs, and description for
outputs.
2019-02-19 16:31:10 -08:00
Paddy 1bef862e3a
Merge pull request #18972 from rileykarson/patch-2
Fix Google Cloud Platform name across docs
2019-02-19 15:50:46 -08:00
Kristin Laemmert 874b333962
command/format: fix an issue where data resources were not displaying (#20386)
Fixes #20245
2019-02-19 14:18:47 -08:00
Kristin Laemmert c59a274e96
command/jsonplan: "deposed" should be a string, not a bool. (#20351) 2019-02-19 13:55:49 -08:00
Brian Flad 43f12bbfe0
backend/s3: Update copy for skip_get_ec2_platforms and skip_requesting_account_id argument deprecations 2019-02-19 10:54:53 -08:00
Kristin Laemmert 818b4ec068
command/show: add "module_version" to "module_calls" in config (#20367)
* command/show: add "module_version" to "module_calls" in config portion
of `terraform show`.

Also extended the `terraform show -json` test to run `init` so we could
add examples with modules. This does _not_ test the "module_version"
yet, but it _did_ help expose a bug in jsonplan where modules were
duplicated. This is also fixed in this PR.

* command/jsonconfig: rename version to version_constraint and
resolved_source to source.
2019-02-19 08:12:33 -08:00
Sander van Harmelen 54736b068b backend/remote: use `state.v2` for remote state only
The API surface area is much smaller when we use the remote backend for remote state only.

So in order to try and prevent any backwards incompatibilities when TF runs inside of TFE, we’ve split up the discovery services into `state.v2` (which can be used for remote state only configurations, so when running in TFE) and `tfe.v2.1` (which can be used for all remote configurations).
2019-02-19 10:59:51 +01:00
Brian Flad 1aaac172b0
backend/s3: Switch from github.com/terraform-providers/terraform-provider-aws to github.com/hashicorp/aws-sdk-go-base
Output from acceptance testing (no new failures):

```
--- PASS: TestBackend_impl (0.00s)
--- PASS: TestBackendConfig (0.37s)
--- PASS: TestBackendConfig_invalidKey (0.00s)
--- PASS: TestBackend (3.26s)
--- PASS: TestBackendLocked (6.80s)
--- FAIL: TestBackendExtraPaths (2.32s)
--- PASS: TestBackendPrefixInWorkspace (2.06s)
--- PASS: TestKeyEnv (8.20s)
--- PASS: TestRemoteClient_impl (0.00s)
--- PASS: TestRemoteClient (2.42s)
--- PASS: TestRemoteClientLocks (6.33s)
--- PASS: TestForceUnlock (13.31s)
--- PASS: TestRemoteClient_clientMD5 (11.75s)
--- PASS: TestRemoteClient_stateChecksum (10.07s)
```
2019-02-18 02:30:30 -05:00
Paul Tyng 0ff04b1232
Merge pull request #20359 from hashicorp/paultyng-patch-1
Create provider_issue.md
2019-02-15 11:15:30 -05:00
Paul Tyng 01e6002101
Update provider_issue.md 2019-02-15 10:58:56 -05:00
Paul Tyng f49f3e56f4
Create provider_issue.md 2019-02-15 10:55:28 -05:00
Martin Atkins 32f0afeffa
Update CHANGELOG.md 2019-02-14 18:16:28 -08:00
Martin Atkins 6813350e8d
Update CHANGELOG.md 2019-02-14 18:16:11 -08:00
Jurnell Cockhren 1242e08473 fix(salt-masterless): Compare retrieved variable values with defaults 2019-02-14 18:13:16 -08:00
Jurnell Cockhren 996f845d4b fix(salt-masterless): set the default values for state and pillar remote locations 2019-02-14 18:13:16 -08:00
James Bardin fabdd0db3e
Merge pull request #20348 from hashicorp/jbardin/list-empty-strings
simple list diffs may also have missing elements
2019-02-14 13:36:26 -05:00
James Bardin da389d6cd4 simple list diffs may also have missing elements
Like was done for list blocks, simple lists of strings may be missing
empty string elements, and any list may be implicitly truncated.
2019-02-14 13:06:04 -05:00
Martin Atkins 0b2cc6298b plans/objchange: Fix panic in AssertObjectCompatible with set blocks
Our usual "ground rules" for mapping configschema to cty call for the
collection values representing nested block types to always be known and
non-null, using an empty collection to represent the absense of any blocks
of that type so that users can always safely use length(...) etc on them
without worrying about them sometimes being null.

However, due to some different behaviors in the legacy SDK we've allowed
it an exception to this rule which means that we can see unknown and null
collections in these positions in object values returned from provider
operations like PlanResourceChange and ApplyResourceChange when the legacy
SDK opt-out is activated.

As a consequence of this, we need to be mindful in our safety check
functions, like AssertObjectCompatible here, of tolerating these non-ideal
situations to allow the safety checks to complete. We run these checks
even when the provider requests an opt-out, because we want to note any
inconsistencies as WARNING level log lines to aid in debugging.
2019-02-14 10:04:51 -08:00
Brian Flad 58eba8fe9a
Merge pull request #20339 from hashicorp/td-UnsafeSetFieldRaw-deprecation
helper/schema: Add deprecation to ResourceData.UnsafeSetFieldRaw
2019-02-14 12:51:21 -05:00
Martin Atkins bfbce53911 vendor: go get github.com/hashicorp/hcl2@master
This includes a fix to properly report the position of an errant block
inside a block processed as JustAttributes, which fixes #20248.
2019-02-14 09:49:37 -08:00
Brian Flad 3d908f56aa
helper/schema: Add deprecation to ResourceData.UnsafeSetFieldRaw
This functionality is no longer supported in Terraform 0.12 and above.
2019-02-13 22:12:10 -05:00
James Bardin f9b62cb5fe
Merge pull request #20335 from hashicorp/jbardin/diff-apply
Diff apply needs to check for both types of containers keys
2019-02-13 19:33:34 -05:00
Martin Atkins b4d9f63622 website: Forward-port docs on file-hashing functions from 0.11 branch 2019-02-13 16:10:14 -08:00
James Bardin c34c37fbd5 missed .% suffixes in diff.Apply
Diff.Apply checks for unneeded container count diffs, but was missing
the check for maps.

Add an early return for planning a destroy.
2019-02-13 19:09:46 -05:00
James Bardin 931f459336 add a trouble test schema from the aws provider 2019-02-13 19:09:46 -05:00
Martin Atkins fedbd6c3b8 helper/plugin: fix panic with empty objects in normalizeNullValues
cty.Value.AsValueMap can return nil if called on an empty map or object.
The logic above was dealing with that case for maps, but object types
were falling through into this codepath and panicking when trying to
assign a new key into the nil dstMap.

This also includes a bonus fix where we were calling ty.ElementType in
a switch case that accepts object types. Object types don't have a single
element type, so we can't call ElementType on those (that also panics)
but we _can_ use the type of the value we selected from src to construct
our placeholder null value.
2019-02-13 15:56:12 -08:00
Radek Simko 8f3ee1800d
Merge pull request #20316 from hashicorp/vendor-go-tfe-bump
vendor: github.com/hashicorp/go-tfe@v0.3.8
2019-02-13 09:06:22 +00:00
Martin Atkins 12a6d22589 core: Better handle providers failing updates with no new value
A provider may react to a create or update failing by returning error
diagnostics and a partially-updated or nil new value, in which case we
do not expect our AssertObjectCompatible consistency check to succeed: the
provider is just assumed to be doing the best it can to preserve whatever
partial outcome it was able to achieve.

However, if errors are accompanied with a nil new value after an update,
we'll assume that the provider is telling us it wasn't able to get far
enough to make any change at all, and so we'll retain the prior value in
state. This ensures that a provider can't cause an object to be forgotten
from the state just because an update failed.
2019-02-12 18:13:14 -08:00
James Bardin 303e5cc82e
Merge pull request #20319 from hashicorp/jbardin/go-plugin
update go-plugin
2019-02-12 20:59:31 -05:00
James Bardin cf7a6b7bb8 update go-plugin
This unfortunately breaks alpha comaptibility at this point, due to
changes in the grpc paths.
2019-02-12 18:28:34 -05:00
Radek Simko 5a20e1ab94
Merge pull request #20243 from hashicorp/v0.12-upgrade-guide-remote-state
docs/upgrade-guide: Document changes in remote state referencing
2019-02-12 22:16:41 +00:00
James Bardin b758628e51
Merge pull request #20308 from hashicorp/jbardin/requires-replace
Requires replace should not error on missing index steps
2019-02-12 15:08:38 -05:00
Radek Simko e2df4c435f
Merge pull request #20287 from hashicorp/vendor-aws-bump
vendor: github.com/terraform-providers/terraform-provider-aws@v1.58.0
2019-02-12 20:07:39 +00:00
Kristin Laemmert f783ed0d45
command/jsonconfig: display module variables in config output (#20311)
* command/jsonconfig: display module variables in config output

The tests have been updated to reflect this change.

* command/jsonconfig: properly handle variables with nil defaults
2019-02-12 12:03:07 -08:00
Radek Simko 916310e601
vendor: github.com/hashicorp/go-tfe@v0.3.8 2019-02-12 19:54:56 +00:00
James Bardin c6daf9fb24 don't error on all invalid RequiresReplace paths
RequiresReplace paths with IndexSteps that have been added or removed
may fail to apply against one of the two state values. Only error out if
the path cannot be applied to both values.
2019-02-12 14:43:41 -05:00
Chris Griggs 2ad995a859
Merge pull request #20312 from cgriggs01/cgriggs01-community4
[Website] Adding Community Providers
2019-02-12 10:19:02 -08:00
Martin Atkins eb1346447f
Merge #20282: Enforce expected behaviors for provider PlanResourceChange
An exception remains for the legacy SDK, which does not meet all of these requirements.
2019-02-12 09:19:05 -08:00
James Bardin f932e11a50 create a test that removes a RequiresReplace path
One of the paths that triggers RequiresReplace does not apply to the
new value.
2019-02-12 11:48:36 -05:00
Radek Simko a486cd838e
vendor: github.com/terraform-providers/terraform-provider-aws@v1.58.0 2019-02-12 16:32:22 +00:00
Radek Simko c2032d8fcf
Merge pull request #20290 from hashicorp/vendor-hil-bump
vendor: github.com/hashicorp/hil@latest
2019-02-12 16:31:36 +00:00
Radek Simko f137b32140
vendor: github.com/hashicorp/hil@latest 2019-02-12 15:56:22 +00:00
Radek Simko fe7e7afd53
Merge pull request #20302 from hashicorp/vendor-bump-deps
vendor: Bump more dependencies to go-mod-aware versions
2019-02-12 15:54:47 +00:00