terraform/helper/plugin
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
..
doc.go
grpc_provider.go helper/schema: Implementation of the AsSingle mechanism 2019-03-14 15:36:15 -07:00
grpc_provider_test.go remove normalizeFlatmapContainers 2019-03-12 12:04:35 -04:00
grpc_provisioner.go plugin: Establish our current plugin protocol as version 5 2018-11-19 09:56:41 -08:00
grpc_provisioner_test.go plugin: Establish our current plugin protocol as version 5 2018-11-19 09:56:41 -08:00
unknown.go switch blocks based on value type, and check attrs 2019-02-08 14:46:29 -05:00
unknown_test.go switch blocks based on value type, and check attrs 2019-02-08 14:46:29 -05:00