terraform/helper/plugin
Martin Atkins 477da57a92 helper/plugin: Honor resource type overrides in import
One quirky aspect of our import feature is that we allow the importer to
produce additional resources alongside the one that was imported, such as
to create separate rules for each rule of an imported security group.

Providers need to be able to set the types of these other resources since
they may not match the "main" resource type. They do this by calling
ResourceData.SetType, which in turn sets InstanceState.Ephemeral.Type.

In our shims here we therefore need to copy that out into our new TypeName
field so that the new core import code can see it and create the right
type in the state.

Testing this required a minor change to the test harness to allow the
ImportStateCheck function to see the resource type.
2019-01-30 09:05:08 -08:00
..
doc.go helper/plugin package for grpc servers 2018-10-16 18:58:49 -07:00
grpc_provider.go helper/plugin: Honor resource type overrides in import 2019-01-30 09:05:08 -08:00
grpc_provider_test.go don't replace null strings with empty strings 2019-01-17 19:19:13 -05: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