From ccb69be19ddea073a2a8fa32a59d41dfc27acc48 Mon Sep 17 00:00:00 2001 From: Marcel Jacek Date: Wed, 16 Sep 2026 11:43:17 +0200 Subject: [PATCH] fix(iaas): remove UseStateForUnknown in network_interface and volume schema resource --- stackit/internal/services/iaas/networkinterface/resource.go | 6 ++---- stackit/internal/services/iaas/volume/resource.go | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/stackit/internal/services/iaas/networkinterface/resource.go b/stackit/internal/services/iaas/networkinterface/resource.go index 5fce1bc74..ebced747a 100644 --- a/stackit/internal/services/iaas/networkinterface/resource.go +++ b/stackit/internal/services/iaas/networkinterface/resource.go @@ -263,10 +263,8 @@ func (r *networkInterfaceResource) Schema(_ context.Context, _ resource.SchemaRe }, "type": schema.StringAttribute{ Description: "Type of network interface. Some of the possible values are: " + utils.FormatPossibleValues(typeOptions...), - Computed: true, - PlanModifiers: []planmodifier.String{ - stringplanmodifier.UseStateForUnknown(), - }, + // UseStateForUnknown should never be set here. This value can change during updates and cause an error. + Computed: true, }, }, } diff --git a/stackit/internal/services/iaas/volume/resource.go b/stackit/internal/services/iaas/volume/resource.go index 109cf36d0..8eecf7ebe 100644 --- a/stackit/internal/services/iaas/volume/resource.go +++ b/stackit/internal/services/iaas/volume/resource.go @@ -206,10 +206,8 @@ func (r *volumeResource) Schema(_ context.Context, _ resource.SchemaRequest, res }, "server_id": schema.StringAttribute{ Description: "The server ID of the server to which the volume is attached to.", - Computed: true, - PlanModifiers: []planmodifier.String{ - stringplanmodifier.UseStateForUnknown(), - }, + // UseStateForUnknown should never be set here. This value can change during updates and cause an error. + Computed: true, Validators: []validator.String{ validate.UUID(), validate.NoSeparator(),