-
Notifications
You must be signed in to change notification settings - Fork 31
Open
Labels
Description
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:
network_interface {
type = "public"
}
network_interface {
type = "private"
network = upcloud_network.private.id
}Then I rearrange it to look like this:
network_interface {
type = "private"
network = upcloud_network.private.id
}
network_interface {
type = "public"
}When I then run plan I get the following change
~ network_interface {
~ network = "<redacted>" -> "<redacted>"
~ type = "public" -> "private"
# (6 unchanged attributes hidden)
}
~ network_interface {
~ type = "private" -> "public"
# (7 unchanged attributes hidden)
}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.
Reactions are currently unavailable