mirror of
https://github.com/bpg/terraform-provider-proxmox.git
synced 2025-06-30 02:31:10 +00:00
feat(vm2): add initial support for `cdrom` This is a breaking change comparing to v1 - switching the cdrom schema from a nested block to a nested attribute map. Improvements comparing to v1: - support for `ide`, `sata`, `scsi` interfaces - support for multiple cdroms Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
42 lines
1.3 KiB
Go
42 lines
1.3 KiB
Go
/*
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
|
*/
|
|
|
|
package cpu
|
|
|
|
import (
|
|
"github.com/hashicorp/terraform-plugin-framework/attr"
|
|
"github.com/hashicorp/terraform-plugin-framework/types"
|
|
)
|
|
|
|
// Model represents the CPU model.
|
|
type Model struct {
|
|
Affinity types.String `tfsdk:"affinity"`
|
|
Architecture types.String `tfsdk:"architecture"`
|
|
Cores types.Int64 `tfsdk:"cores"`
|
|
Flags types.Set `tfsdk:"flags"`
|
|
Hotplugged types.Int64 `tfsdk:"hotplugged"`
|
|
Limit types.Int64 `tfsdk:"limit"`
|
|
Numa types.Bool `tfsdk:"numa"`
|
|
Sockets types.Int64 `tfsdk:"sockets"`
|
|
Type types.String `tfsdk:"type"`
|
|
Units types.Int64 `tfsdk:"units"`
|
|
}
|
|
|
|
func attributeTypes() map[string]attr.Type {
|
|
return map[string]attr.Type{
|
|
"affinity": types.StringType,
|
|
"architecture": types.StringType,
|
|
"cores": types.Int64Type,
|
|
"flags": types.SetType{ElemType: types.StringType},
|
|
"hotplugged": types.Int64Type,
|
|
"limit": types.Int64Type,
|
|
"numa": types.BoolType,
|
|
"sockets": types.Int64Type,
|
|
"type": types.StringType,
|
|
"units": types.Int64Type,
|
|
}
|
|
}
|