You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Another alternative would be that it's very clear that these nics are getting new addresses. And in that case I guess this one gets very related to this issue #646
The definition order is currently used as is in the API requests as the network_interface blocks are implemented as list. This is currently only documented through the data type after the field name in the resource docs. So, we could at least improve that description to better communicate how these blocks relate to the cloud resource and API requests, as you suggested in the latest comment.
Changing the list into a set or using list nested attribute instead of blocks to make the list behavior more visible in the Terraform configuration side would both be breaking changes.
Actually, I might be confusing this with some other field as there seems to be more complex handling for the network_interface blocks, so we could look into improving the handling as well 🤔 However, the data type of network_interface is list, so the order will have significance because of that even if can otherwise improve the logic.
The problem
When reordering network interfaces blocks on a server it always recreates the interfaces and thus gives them a new IP.
For example if I have this in on a server:
Then I rearrange it to look like this:
When I then run plan I get the following change
And after running apply, both those NICs are recreated and get new IPs
Expected behaviour
I'd expect that the order shouldn't matter, but more importantly, the NICs should keep their addresses after they are reordered.
The text was updated successfully, but these errors were encountered: