terraform/helper/resource
Martin Atkins 1987a92386 helper/schema: Implementation of the AsSingle mechanism
The previous commit added a new flag to schema.Schema which is documented
to make a list with MaxItems: 1 be presented to Terraform Core as a single
value instead, giving a way to switch to non-list nested resources without
it being a breaking change for Terraform v0.11 users as long as it's done
prior to a provider's first v0.12-compatible release.

This is the implementation of that mechanism. It's intentionally
implemented as a suite of extra fixups rather than direct modifications to
existing shim code because we want to ensure that this has no effect
whatsoever on the result of a resource type that _isn't_ using AsSingle.

Although there is some small unit test coverage of the fixup steps here,
the primary testing for this is in the test provider since the integration
of all of these fixup steps in the correct order is the more important
result than any of the intermediate fixup steps.
2019-03-14 15:36:15 -07:00
..
error.go helper/resource: Add retries to err message 2017-01-20 11:09:04 -08:00
grpc_test_provider.go plugin: Establish our current plugin protocol as version 5 2018-11-19 09:56:41 -08:00
id.go Export a const for validation methods 2018-03-10 12:40:37 -05:00
id_test.go Make failure message more explicit 2018-03-10 21:53:54 -05:00
map.go
map_test.go helper/resource: Fix duplicated function testConfig 2018-10-16 19:14:11 -07:00
resource.go
state.go helper/resource: fix ungrammatical doc comment in StateChangeConf 2017-11-08 09:43:36 -08:00
state_shim.go helper/schema: Implementation of the AsSingle mechanism 2019-03-14 15:36:15 -07:00
state_shim_test.go use actual schema.Resources for state shims 2019-01-10 12:20:03 -05:00
state_test.go add test for proper cancelation 2017-04-19 18:07:00 -04:00
testing.go allow 0 and unset to be equal in count tests 2019-02-11 11:35:19 -05:00
testing_config.go use actual schema.Resources for state shims 2019-01-10 12:20:03 -05:00
testing_import_state.go helper/plugin: Honor resource type overrides in import 2019-01-30 09:05:08 -08:00
testing_import_state_test.go skip resource tests for now 2018-10-31 14:17:23 -04:00
testing_test.go allow 0 and unset to be equal in count tests 2019-02-11 11:35:19 -05:00
wait.go Fixing small typo in resource/wait.go 2018-03-14 17:33:03 +01:00
wait_test.go fix tests affected by refreshGracePeriod 2017-04-19 18:07:00 -04:00