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. |
||
---|---|---|
.. | ||
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.