Skip to content

Commit

Permalink
use ReinstallInstanceRequest instead of NewReinstallInstanceRequestWi…
Browse files Browse the repository at this point in the history
…thDefaults

This commit fix the issue where the default_user would be reset to admin
on reinstallation independently from the value set in terrafom
  • Loading branch information
m0build-io committed Dec 30, 2024
1 parent 746125c commit 95cbad8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion contabo/resource_instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 95cbad8

Please sign in to comment.