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. |
||
---|---|---|
.. | ||
acctest | ||
config | ||
copy | ||
customdiff | ||
didyoumean | ||
diff | ||
encryption | ||
experiment | ||
hashcode | ||
hilmapstructure | ||
logging | ||
mutexkv | ||
pathorcontents | ||
plugin | ||
resource | ||
schema | ||
shadow | ||
signalwrapper | ||
slowmessage | ||
structure | ||
validation | ||
variables | ||
wrappedreadline | ||
wrappedstreams | ||
README.md |
README.md
Helper Libraries
This folder contains helper libraries for Terraform plugins. A running joke is that this is "Terraform standard library" for plugins. The goal of the packages in this directory are to provide high-level helpers to make it easier to implement the various aspects of writing a plugin for Terraform.