terraform/helper/resource
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
..
error.go
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 type names don't imply the resource mode 2019-01-12 11:43:48 -05: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 command: "terraform init" can partially initialize for 0.12upgrade 2019-01-14 11:33:21 -08: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 TestCheckNoResourceAttr for empty containers 2019-01-09 13:09:02 -05:00
wait.go Fixing small typo in resource/wait.go 2018-03-14 17:33:03 +01:00
wait_test.go