fix: recreation of kubeconfig fails after migration (#928)
This commit is contained in:
parent
229930ee0c
commit
33b239a74d
1 changed files with 2 additions and 0 deletions
|
|
@ -276,6 +276,8 @@ func (r *kubeconfigResource) Read(ctx context.Context, req resource.ReadRequest,
|
||||||
clusterName := model.ClusterName.ValueString()
|
clusterName := model.ClusterName.ValueString()
|
||||||
kubeconfigUUID := model.KubeconfigId.ValueString()
|
kubeconfigUUID := model.KubeconfigId.ValueString()
|
||||||
region := r.providerData.GetRegionWithOverride(model.Region)
|
region := r.providerData.GetRegionWithOverride(model.Region)
|
||||||
|
// Prevent error state when updating to v2 api version and the kubeconfig is expired
|
||||||
|
model.Region = types.StringValue(region)
|
||||||
// Prevent recreation of kubeconfig when updating to v2 api version
|
// Prevent recreation of kubeconfig when updating to v2 api version
|
||||||
diags = resp.State.SetAttribute(ctx, path.Root("region"), region)
|
diags = resp.State.SetAttribute(ctx, path.Root("region"), region)
|
||||||
resp.Diagnostics.Append(diags...)
|
resp.Diagnostics.Append(diags...)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue