From 95cbad8fd36f09d29452bd77eee731271406fb0a Mon Sep 17 00:00:00 2001 From: m0build <173701823+m0build-io@users.noreply.github.com> Date: Mon, 30 Dec 2024 02:16:28 +0100 Subject: [PATCH] use ReinstallInstanceRequest instead of NewReinstallInstanceRequestWithDefaults This commit fix the issue where the default_user would be reset to admin on reinstallation independently from the value set in terrafom --- contabo/resource_instance.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contabo/resource_instance.go b/contabo/resource_instance.go index da662f3..6bb6785 100644 --- a/contabo/resource_instance.go +++ b/contabo/resource_instance.go @@ -455,7 +455,7 @@ func updateInstanceValues(d *schema.ResourceData, client *openapi.APIClient, ctx } func reinstall(d *schema.ResourceData, client *openapi.APIClient, ctx context.Context, instanceId int64, diags diag.Diagnostics, m interface{}) diag.Diagnostics { - patchInstanceRequest := openapi.NewReinstallInstanceRequestWithDefaults() + patchInstanceRequest := &openapi.ReinstallInstanceRequest{} if d.HasChange("ssh_keys") { sshKeys := d.Get("ssh_keys")