Skip to content

Commit 33b239a

Browse files
authored
fix: recreation of kubeconfig fails after migration (#928)
1 parent 229930e commit 33b239a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

stackit/internal/services/ske/kubeconfig/resource.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,8 @@ func (r *kubeconfigResource) Read(ctx context.Context, req resource.ReadRequest,
276276
clusterName := model.ClusterName.ValueString()
277277
kubeconfigUUID := model.KubeconfigId.ValueString()
278278
region := r.providerData.GetRegionWithOverride(model.Region)
279+
// Prevent error state when updating to v2 api version and the kubeconfig is expired
280+
model.Region = types.StringValue(region)
279281
// Prevent recreation of kubeconfig when updating to v2 api version
280282
diags = resp.State.SetAttribute(ctx, path.Root("region"), region)
281283
resp.Diagnostics.Append(diags...)

0 commit comments

Comments
 (0)