From cb60200e57f51a770a09a91be08909bc38d1987e Mon Sep 17 00:00:00 2001 From: Toni Kangas Date: Wed, 13 Nov 2024 13:20:17 +0200 Subject: [PATCH] chore(server): add note about defining index --- CHANGELOG.md | 2 +- internal/service/server/server.go | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 314bfd92..9706269f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,7 +12,7 @@ See updating [Changelog example here](https://keepachangelog.com/en/1.0.0/) ### Changed -- upcloud_server: When modifying `network_interfaces`, match configured network interfaces to the server's actual network interfaces by `index` and `ip_address` (in addition to list order). This is to avoid public and utility network interfaces being re-assigned when the interfaces are re-ordered or when interface is removed from middle of the list. This might result to inaccurate diffs in the Terraform plan when interfaces are re-ordered or when interface is removed from middle of the list. +- upcloud_server: When modifying `network_interfaces`, match configured network interfaces to the server's actual network interfaces by `index` and `ip_address` (in addition to list order). This is to avoid public and utility network interfaces being re-assigned when the interfaces are re-ordered or when interface is removed from middle of the list. This might result to inaccurate diffs in the Terraform plan when interfaces are re-ordered or when interface is removed from middle of the list. We recommend explicitly setting the value for `index` in configuration, when interfaces are re-ordered or when interface is removed from middle of the list. ## [5.14.0] - 2024-10-28 diff --git a/internal/service/server/server.go b/internal/service/server/server.go index 3f3026cf..bb518096 100644 --- a/internal/service/server/server.go +++ b/internal/service/server/server.go @@ -176,7 +176,9 @@ func resourceServerV0() *schema.Resource { Type: schema.TypeList, Description: `One or more blocks describing the network interfaces of the server. - In addition to list order, the configured network interfaces are matched to the server's actual network interfaces by ` + "`" + `index` + "`" + ` and ` + "`" + `ip_address` + "`" + ` fields. This is to avoid public and utility network interfaces being re-assigned when the server is updated. This might result to inaccurate diffs in the plan, when interfaces are re-ordered or when interface is removed from the middle of the list.`, + In addition to list order, the configured network interfaces are matched to the server's actual network interfaces by ` + "`" + `index` + "`" + ` and ` + "`" + `ip_address` + "`" + ` fields. This is to avoid public and utility network interfaces being re-assigned when the server is updated. This might result to inaccurate diffs in the plan, when interfaces are re-ordered or when interface is removed from the middle of the list. + + We recommend explicitly setting the value for ` + "`" + `index` + "`" + ` in configuration, when re-ordering interfaces or when removing interface from middle of the list.`, Required: true, MinItems: 1, Elem: &schema.Resource{