477da57a92
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. |
||
---|---|---|
.. | ||
error.go | ||
grpc_test_provider.go | ||
id.go | ||
id_test.go | ||
map.go | ||
map_test.go | ||
resource.go | ||
state.go | ||
state_shim.go | ||
state_shim_test.go | ||
state_test.go | ||
testing.go | ||
testing_config.go | ||
testing_import_state.go | ||
testing_import_state_test.go | ||
testing_test.go | ||
wait.go | ||
wait_test.go |