fix: diff between creation and import state #2127
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
There are differences between the state in the r/vsphere_virtual_machine when it is imported and when it is created/cloned. Fixed several of them which maked sense for me.
datastore_cluster_id - adding the property to the state when the VM is imported in order to keep the pervious behaviour.
disk.label / disk.keep_on_remove - the logic was to assign a computed label in format "disk" instead of the actual label added by the system and in such cases the disk was marked as keep_on_remove. Changed this to set the actual label and not setting the keep_on_remove property (defaulting to folse). If the label is not present - keeping the old logic.
Not sure how to proceed with sata_controller_count - looks like this should be a computed property, but this is a breaking change which I would avoid introducing.
Fixes #1706
Acceptance tests
Output from acceptance testing:
Release Note
Release note for CHANGELOG:
References
#1706