Open jimeh opened 3 years ago
With the planned migration in #97 to the new Plugin Framework, along with some purpose made enhancements to Katapult's Core API, this issue should become easier to resolve.
+1
The ability to import resources is something that is blocking us managing all of our resources in Terraform.
We currently do not support importing
katapult_virtual_machine
resources, as thedisk_template
anddisk_template_options
attributes are only relevant during creation, and are not returned by the API at the moment.There are plans for the API to return these attributes, but it's not a straight forward thing, so we probably should not delay import support until it's ready.
Based on the import documentation, we probably want to use [ImportStateVerifyIgnore][2], and simply require users to define a
lifecycle
block with aignore_changes
attribute to avoid the disk template options from showing as changed after import.[2]: https://www.terraform.io/docs/extend/resources/import.html#importstateverifyignore-1
It might be possible to use
CustomizeDiff
to suppress changes to attributes which are only available during create. I did have a very brief look into this back in December, but didn't have much luck, so I'm not sure if it's possible.