From b4174a7c82398970f9f318955fdd07d7ab378360 Mon Sep 17 00:00:00 2001 From: Pavel Boldyrev <627562+bpg@users.noreply.github.com> Date: Mon, 8 Apr 2024 22:48:07 -0400 Subject: [PATCH] fix(vm): panic if `initialization.user_account_keys` contains `null` (#1197) Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com> --- proxmoxtf/resource/vm/vm.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/proxmoxtf/resource/vm/vm.go b/proxmoxtf/resource/vm/vm.go index 2c7c9824..b5baec42 100644 --- a/proxmoxtf/resource/vm/vm.go +++ b/proxmoxtf/resource/vm/vm.go @@ -2890,7 +2890,9 @@ func vmGetCloudInitConfig(d *schema.ResourceData) *vms.CustomCloudInitConfig { sshKeys := make(vms.CustomCloudInitSSHKeys, len(keys)) for i, k := range keys { - sshKeys[i] = k.(string) + if k != nil { + sshKeys[i] = k.(string) + } } initializationConfig.SSHKeys = &sshKeys