IBM-tfproviders / terraform-provider-vsphere

Mozilla Public License 2.0
5 stars 5 forks source link

NIC update support #23

Closed santoshananda closed 7 years ago

santoshananda commented 7 years ago

The NICs can now be updated and this will not result in deletion and creation of VM. ForceNew is now set to false. The NICs can be added or deleted as part of these commits.

  1. When a NIC is added, all existing NICs are deleted and all NICs are added.
  2. When a NIC is deleted, all existing NICs are deleted and all NICs, except the one deleted, are added.

This delete create mechanism was implemented as the device addition and NIC customization are two separate operations and any mismatch in the order of sending these two input arrays results in reconfiguration of the NICs. To overcome this issue, all NICs are deleted and all NICs are added, to maintain the order of the device addition and NIC customization.