Skip to content

Commit

Permalink
fix vmGetTPMState
Browse files Browse the repository at this point in the history
Signed-off-by: Pavel Boldyrev <[email protected]>
  • Loading branch information
bpg committed Nov 30, 2023
1 parent a25de3c commit ff3bdb2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions proxmoxtf/resource/vm.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ff3bdb2

Please sign in to comment.