mirror of
https://github.com/opentofu/opentofu.git
synced 2024-12-28 18:01:01 -06:00
bdcac8792d
Previously we were using the type name requested in the import to select the schema, but a provider is free to return additional objects of other types as part of an import result, and so it's important that we perform schema selection separately for each returned object. If we don't do this, we get confusing downstream errors where the resulting object decodes to the wrong type and breaks various invariants expected by Terraform Core. The testResourceImportOther test in the test provider didn't catch this previously because it happened to have an identical schema to the other resource type being imported. Now the schema is changed and also there's a computed attribute we can set as part of the refresh phase to make sure we're completing the Read call properly during import. Refresh was working correctly, but we didn't have any tests for it as part of the import flow. |
||
---|---|---|
.. | ||
convert | ||
discovery | ||
mock_proto | ||
client.go | ||
grpc_provider_test.go | ||
grpc_provider.go | ||
grpc_provisioner_test.go | ||
grpc_provisioner.go | ||
plugin_test.go | ||
plugin.go | ||
resource_provider_test.go | ||
resource_provider.go | ||
resource_provisioner_test.go | ||
resource_provisioner.go | ||
serve.go | ||
ui_input_test.go | ||
ui_input.go | ||
ui_output_test.go | ||
ui_output.go |