mirror of
https://github.com/bpg/terraform-provider-proxmox.git
synced 2025-06-30 18:42:58 +00:00
fix(vm): panic if initialization.user_account_keys
contains null
(#1197)
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
This commit is contained in:
parent
c27311183a
commit
b4174a7c82
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user