From ff3bdb2c0be7ecfd166af15af306e2f2763007e4 Mon Sep 17 00:00:00 2001 From: Pavel Boldyrev <627562+bpg@users.noreply.github.com> Date: Wed, 29 Nov 2023 22:21:20 -0500 Subject: [PATCH] fix vmGetTPMState Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com> --- proxmoxtf/resource/vm.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/proxmoxtf/resource/vm.go b/proxmoxtf/resource/vm.go index d12221080..ee7e82ea7 100644 --- a/proxmoxtf/resource/vm.go +++ b/proxmoxtf/resource/vm.go @@ -3362,12 +3362,12 @@ func vmGetTPMState(d *schema.ResourceData, disk []interface{}) *vms.CustomTPMSta block := tpmState[0].(map[string]interface{}) datastoreID, _ := block[mkResourceVirtualEnvironmentVMTPMStateDatastoreID].(string) - version, _ := block[mkResourceVirtualEnvironmentVMTPMState].(*string) + version, _ := block[mkResourceVirtualEnvironmentVMTPMStateVersion].(string) // use the special syntax STORAGE_ID:SIZE_IN_GiB to allocate a new volume. // NB SIZE_IN_GiB is ignored, see docs for more info. tpmStateConfig.FileVolume = fmt.Sprintf("%s:1", datastoreID) - tpmStateConfig.Version = version + tpmStateConfig.Version = &version } return tpmStateConfig