Documentation
¶
Index ¶
- Variables
- type CloudInitIpSetType
- type CloudInitIpSetValue
- type VirtualMachineAgentModel
- type VirtualMachineCloudInitDnsModel
- type VirtualMachineCloudInitIpConfigModel
- type VirtualMachineCloudInitIpModel
- type VirtualMachineCloudInitModel
- type VirtualMachineCloudInitUserModel
- type VirtualMachineCpuModel
- type VirtualMachineDataSourceModel
- type VirtualMachineDataSourceSetType
- type VirtualMachineDataSourceSetValue
- type VirtualMachineDiskModel
- type VirtualMachineDiskSetType
- type VirtualMachineDiskSetValue
- type VirtualMachineDiskSpeedLimitsModel
- type VirtualMachineMemoryModel
- type VirtualMachineNetworkInterfaceModel
- type VirtualMachineNetworkInterfaceSetType
- type VirtualMachineNetworkInterfaceSetValue
- type VirtualMachinePCIDeviceModel
- type VirtualMachinePCIDeviceSetType
- type VirtualMachinePCIDeviceSetValue
Constants ¶
This section is empty.
Variables ¶
View Source
var CloudInitAttributes = map[string]schema.Attribute{ "user": schema.SingleNestedAttribute{ Optional: true, Attributes: CloudInitUserAttributes, }, "ip": schema.SetNestedAttribute{ Optional: true, CustomType: NewCloudInitIpSetType(), NestedObject: CloudInitIpSchema, Validators: []validator.Set{ setvalidator.SizeAtLeast(1), }, }, "dns": schema.SingleNestedAttribute{ Optional: true, Attributes: CloudInitDnsAttributes, }, }
View Source
var CloudInitDataSourceAttributes = map[string]dschema.Attribute{ "user": dschema.SingleNestedAttribute{ Computed: true, Attributes: CloudInitUserDataSourceAttributes, }, "ip": dschema.SetNestedAttribute{ Computed: true, CustomType: NewCloudInitIpSetType(), NestedObject: CloudInitIpDataSourceSchema, }, "dns": dschema.SingleNestedAttribute{ Computed: true, Attributes: CloudInitDnsDataSourceAttributes, }, }
View Source
var CloudInitDnsAttributes = map[string]schema.Attribute{ "nameserver": schema.StringAttribute{ Optional: true, Description: "The nameserver to use for the machine.", }, "domain": schema.StringAttribute{ Optional: true, Description: "The domain to use for the machine.", }, }
View Source
var CloudInitDnsDataSourceAttributes = map[string]dschema.Attribute{ "nameserver": dschema.StringAttribute{ Computed: true, Description: "The nameserver to use for the machine.", }, "domain": dschema.StringAttribute{ Computed: true, Description: "The domain to use for the machine.", }, }
View Source
var CloudInitIp = types.ObjectType{ AttrTypes: map[string]attr.Type{ "position": types.Int64Type, "v4": CloudInitIpConfig, "v6": CloudInitIpConfig, }, }
View Source
var CloudInitIpConfig = types.ObjectType{ AttrTypes: map[string]attr.Type{ "dhcp": types.BoolType, "address": types.StringType, "netmask": types.StringType, "gateway": types.StringType, }, }
View Source
var CloudInitIpConfigDataSourceSchema = map[string]dschema.Attribute{ "dhcp": dschema.BoolAttribute{ Computed: true, Description: "Whether to use DHCP to get the IP address.", }, "address": dschema.StringAttribute{ Computed: true, Description: "The IP address to use for the machine.", }, "netmask": dschema.StringAttribute{ Computed: true, Description: "The IP address netmask to use for the machine.", }, "gateway": dschema.StringAttribute{ Computed: true, Description: "The gateway to use for the machine.", }, }
View Source
var CloudInitIpConfigSchema = map[string]schema.Attribute{ "dhcp": schema.BoolAttribute{ Optional: true, Computed: true, Description: "Whether to use DHCP to get the IP address.", PlanModifiers: []planmodifier.Bool{ boolplanmodifier.UseStateForUnknown(), }, }, "address": schema.StringAttribute{ Optional: true, Description: "The IP address to use for the machine.", }, "netmask": schema.StringAttribute{ Optional: true, Description: "The IP address netmask to use for the machine.", }, "gateway": schema.StringAttribute{ Optional: true, Description: "The gateway to use for the machine.", }, }
View Source
var CloudInitIpConfigTypes = map[string]attr.Type{ "dhcp": types.BoolType, "address": types.StringType, "netmask": types.StringType, "gateway": types.StringType, }
View Source
var CloudInitIpDataSourceSchema = dschema.NestedAttributeObject{ Attributes: map[string]dschema.Attribute{ "position": dschema.Int64Attribute{ Computed: true, Description: "The position of the network interface in the VM as an int. Used to determine the interface name (net0, net1, etc).", }, "v4": dschema.SingleNestedAttribute{ Computed: true, Attributes: CloudInitIpConfigDataSourceSchema, }, "v6": dschema.SingleNestedAttribute{ Computed: true, Attributes: CloudInitIpConfigDataSourceSchema, }, }, }
View Source
var CloudInitIpSchema = schema.NestedAttributeObject{ Attributes: map[string]schema.Attribute{ "position": schema.Int64Attribute{ Required: true, Description: "The position of the network interface in the VM as an int. Used to determine the interface name (net0, net1, etc).", }, "v4": schema.SingleNestedAttribute{ Optional: true, Attributes: CloudInitIpConfigSchema, }, "v6": schema.SingleNestedAttribute{ Optional: true, Attributes: CloudInitIpConfigSchema, }, }, }
View Source
var CloudInitIpType = types.ObjectType{ AttrTypes: map[string]attr.Type{ "position": types.Int64Type, "v4": types.ObjectType{ AttrTypes: CloudInitIpConfigTypes, }, "v6": types.ObjectType{ AttrTypes: CloudInitIpConfigTypes, }, }, }
View Source
var CloudInitUserAttributes = map[string]schema.Attribute{ "name": schema.StringAttribute{ Required: true, Description: "The name of the user.", }, "password": schema.StringAttribute{ Optional: true, Sensitive: true, Description: "The password of the user.", }, "public_keys": schema.SetAttribute{ Optional: true, Description: "The public ssh keys of the user.", ElementType: types.StringType, Validators: []validator.Set{ setvalidator.SizeAtLeast(1), }, }, }
View Source
var CloudInitUserDataSourceAttributes = map[string]dschema.Attribute{ "name": dschema.StringAttribute{ Computed: true, Description: "The name of the user.", }, "password": dschema.StringAttribute{ Computed: true, Sensitive: true, Description: "The password of the user.", }, "public_keys": dschema.SetAttribute{ Computed: true, Description: "The public ssh keys of the user.", ElementType: types.StringType, }, }
View Source
var VirtualMachineDataSourceType = types.ObjectType{ AttrTypes: map[string]attr.Type{ "id": types.Int64Type, "node": types.StringType, "name": types.StringType, "description": types.StringType, "tags": types.SetType{ ElemType: types.StringType, }, "agent": types.ObjectType{ AttrTypes: map[string]attr.Type{ "enabled": types.BoolType, "use_fstrim": types.BoolType, "type": types.StringType, }, }, "bios": types.StringType, "cpu": types.ObjectType{ AttrTypes: map[string]attr.Type{ "architecture": types.StringType, "cores": types.Int64Type, "sockets": types.Int64Type, "emulated_type": types.StringType, "cpu_units": types.Int64Type, }, }, "disks": NewVirtualMachineDiskSetType(), "network_interfaces": NewVirtualMachineNetworkInterfaceSetType(), "pci_devices": NewVirtualMachinePCIDeviceSetType(), "memory": types.ObjectType{ AttrTypes: map[string]attr.Type{ "dedicated": types.Int64Type, "floating": types.Int64Type, "shared": types.Int64Type, }, }, "cloud_init": types.ObjectType{ AttrTypes: map[string]attr.Type{ "user": types.ObjectType{ AttrTypes: map[string]attr.Type{ "password": types.StringType, "public_keys": types.SetType{ ElemType: types.StringType, }, "name": types.StringType, }, }, "ip": NewCloudInitIpSetType(), "dns": types.ObjectType{ AttrTypes: map[string]attr.Type{ "nameserver": types.StringType, "domain": types.StringType, }, }, }, }, "machine_type": types.StringType, "kvm_arguments": types.StringType, "keyboard_layout": types.StringType, "type": types.StringType, "resource_pool": types.StringType, "start_on_node_boot": types.BoolType, }, }
View Source
var VirtualMachineDisk = types.ObjectType{ AttrTypes: map[string]attr.Type{ "storage": types.StringType, "file_format": types.StringType, "size": types.Int64Type, "name": types.StringType, "use_iothread": types.BoolType, "speed_limits": types.ObjectType{ AttrTypes: map[string]attr.Type{ "read": types.Int64Type, "write": types.Int64Type, "read_burstable": types.Int64Type, "write_burstable": types.Int64Type, }, }, "interface_type": types.StringType, "position": types.Int64Type, "ssd_emulation": types.BoolType, "discard": types.BoolType, }, }
View Source
var VirtualMachineNetworkInterface = types.ObjectType{ AttrTypes: map[string]attr.Type{ "bridge": types.StringType, "enabled": types.BoolType, "use_firewall": types.BoolType, "mac_address": types.StringType, "model": types.StringType, "rate_limit": types.Int64Type, "position": types.Int64Type, "vlan": types.Int64Type, "mtu": types.Int64Type, }, }
View Source
var VirtualMachinePCIDevice = types.ObjectType{ AttrTypes: map[string]attr.Type{ "name": types.StringType, "id": types.StringType, "pcie": types.BoolType, "mdev": types.StringType, "rombar": types.BoolType, "rom_file": types.StringType, "primary_gpu": types.BoolType, }, }
Functions ¶
This section is empty.
Types ¶
type CloudInitIpSetType ¶
func NewCloudInitIpSetType ¶
func NewCloudInitIpSetType() CloudInitIpSetType
func (CloudInitIpSetType) String ¶
func (st CloudInitIpSetType) String() string
func (CloudInitIpSetType) ValueFromTerraform ¶
type CloudInitIpSetValue ¶
type CloudInitIpSetValue struct {
types.Set
Configs []VirtualMachineCloudInitIpModel
}
func CloudInitIpSetValueFrom ¶
func CloudInitIpSetValueFrom(ctx context.Context, configs []VirtualMachineCloudInitIpModel) CloudInitIpSetValue
func CloudInitIpToSetValue ¶
func CloudInitIpToSetValue(ctx context.Context, ip []vm.VirtualMachineCloudInitIp) CloudInitIpSetValue
type VirtualMachineAgentModel ¶
type VirtualMachineAgentModel struct {
Enabled types.Bool `tfsdk:"enabled"`
UseFSTrim types.Bool `tfsdk:"use_fstrim"`
Type types.String `tfsdk:"type"`
}
func VMAgentToModel ¶
func VMAgentToModel(agent *vm.VirtualMachineAgent) VirtualMachineAgentModel
type VirtualMachineCloudInitIpModel ¶
type VirtualMachineCloudInitIpModel struct {
Position types.Int64 `tfsdk:"position"`
V4 *VirtualMachineCloudInitIpConfigModel `tfsdk:"v4"`
V6 *VirtualMachineCloudInitIpConfigModel `tfsdk:"v6"`
}
type VirtualMachineCloudInitModel ¶
type VirtualMachineCloudInitModel struct {
User *VirtualMachineCloudInitUserModel `tfsdk:"user"`
IP CloudInitIpSetValue `tfsdk:"ip"`
DNS *VirtualMachineCloudInitDnsModel `tfsdk:"dns"`
}
func CloudInitToModel ¶
func CloudInitToModel(ctx context.Context, ci *vm.VirtualMachineCloudInit) *VirtualMachineCloudInitModel
type VirtualMachineCpuModel ¶
type VirtualMachineCpuModel struct {
Architecture types.String `tfsdk:"architecture"`
Cores types.Int64 `tfsdk:"cores"`
Sockets types.Int64 `tfsdk:"sockets"`
EmulatedType types.String `tfsdk:"emulated_type"`
CPUUnits types.Int64 `tfsdk:"cpu_units"`
}
func VMCPUToModel ¶
func VMCPUToModel(cpu *vm.VirtualMachineCpu) VirtualMachineCpuModel
type VirtualMachineDataSourceModel ¶
type VirtualMachineDataSourceModel struct {
ID types.Int64 `tfsdk:"id"`
Node types.String `tfsdk:"node"`
Name types.String `tfsdk:"name"`
Description types.String `tfsdk:"description"`
Tags types.Set `tfsdk:"tags"`
Agent *VirtualMachineAgentModel `tfsdk:"agent"`
BIOS types.String `tfsdk:"bios"`
CPU VirtualMachineCpuModel `tfsdk:"cpu"`
Disks VirtualMachineDiskSetValue `tfsdk:"disks"`
PCIDevices VirtualMachinePCIDeviceSetValue `tfsdk:"pci_devices"`
NetworkInterfaces VirtualMachineNetworkInterfaceSetValue `tfsdk:"network_interfaces"`
Memory VirtualMachineMemoryModel `tfsdk:"memory"`
MachineType types.String `tfsdk:"machine_type"`
KVMArguments types.String `tfsdk:"kvm_arguments"`
KeyboardLayout types.String `tfsdk:"keyboard_layout"`
CloudInit *VirtualMachineCloudInitModel `tfsdk:"cloud_init"`
Type types.String `tfsdk:"type"`
ResourcePool types.String `tfsdk:"resource_pool"`
StartOnNodeBoot types.Bool `tfsdk:"start_on_node_boot"`
}
func VMToModel ¶
func VMToModel(ctx context.Context, v *service.VirtualMachine) *VirtualMachineDataSourceModel
type VirtualMachineDataSourceSetType ¶
func NewVirtualMachineDataSourceType ¶
func NewVirtualMachineDataSourceType() VirtualMachineDataSourceSetType
func (VirtualMachineDataSourceSetType) Equal ¶
func (ci VirtualMachineDataSourceSetType) Equal(o attr.Type) bool
func (VirtualMachineDataSourceSetType) ValueFromTerraform ¶
type VirtualMachineDataSourceSetValue ¶
type VirtualMachineDataSourceSetValue struct {
types.Set
Vms []VirtualMachineDataSourceModel
}
func VirtualMachineDataSourceSetValueFrom ¶
func VirtualMachineDataSourceSetValueFrom(ctx context.Context, vms []VirtualMachineDataSourceModel) (VirtualMachineDataSourceSetValue, error)
type VirtualMachineDiskModel ¶
type VirtualMachineDiskModel struct {
Storage types.String `tfsdk:"storage"`
FileFormat types.String `tfsdk:"file_format"`
Size types.Int64 `tfsdk:"size"`
UseIOThread types.Bool `tfsdk:"use_iothread"`
SpeedLimits *VirtualMachineDiskSpeedLimitsModel `tfsdk:"speed_limits"`
InterfaceType types.String `tfsdk:"interface_type"`
SSDEmulation types.Bool `tfsdk:"ssd_emulation"`
Position types.Int64 `tfsdk:"position"`
Discard types.Bool `tfsdk:"discard"`
Name types.String `tfsdk:"name"`
}
type VirtualMachineDiskSetType ¶
func NewVirtualMachineDiskSetType ¶
func NewVirtualMachineDiskSetType() VirtualMachineDiskSetType
func (VirtualMachineDiskSetType) ValueFromTerraform ¶
type VirtualMachineDiskSetValue ¶
type VirtualMachineDiskSetValue struct {
types.Set
Disks []VirtualMachineDiskModel
}
func VirtualMachineDiskSetValueFrom ¶
func VirtualMachineDiskSetValueFrom(ctx context.Context, disks []VirtualMachineDiskModel) VirtualMachineDiskSetValue
func VirtualMachineDiskToSetValue ¶
func VirtualMachineDiskToSetValue(ctx context.Context, disks []vm.VirtualMachineDisk) VirtualMachineDiskSetValue
type VirtualMachineMemoryModel ¶
type VirtualMachineMemoryModel struct {
Dedicated types.Int64 `tfsdk:"dedicated"`
Floating types.Int64 `tfsdk:"floating"`
}
func VMMemoryToModel ¶
func VMMemoryToModel(memory *vm.VirtualMachineMemory) VirtualMachineMemoryModel
type VirtualMachineNetworkInterfaceModel ¶
type VirtualMachineNetworkInterfaceModel struct {
Position types.Int64 `tfsdk:"position"`
Bridge types.String `tfsdk:"bridge"`
Enabled types.Bool `tfsdk:"enabled"`
UseFirewall types.Bool `tfsdk:"use_firewall"`
MacAddress types.String `tfsdk:"mac_address"`
Model types.String `tfsdk:"model"`
Vlan types.Int64 `tfsdk:"vlan"`
RateLimit types.Int64 `tfsdk:"rate_limit"`
MTU types.Int64 `tfsdk:"mtu"`
}
type VirtualMachineNetworkInterfaceSetType ¶
func NewVirtualMachineNetworkInterfaceSetType ¶
func NewVirtualMachineNetworkInterfaceSetType() VirtualMachineNetworkInterfaceSetType
func (VirtualMachineNetworkInterfaceSetType) Equal ¶
func (d VirtualMachineNetworkInterfaceSetType) Equal(o attr.Type) bool
func (VirtualMachineNetworkInterfaceSetType) ValueFromTerraform ¶
type VirtualMachineNetworkInterfaceSetValue ¶
type VirtualMachineNetworkInterfaceSetValue struct {
types.Set
Nics []VirtualMachineNetworkInterfaceModel
}
func VirtualMachineNetworkInterfaceSetValueFrom ¶
func VirtualMachineNetworkInterfaceSetValueFrom(ctx context.Context, nics []VirtualMachineNetworkInterfaceModel) VirtualMachineNetworkInterfaceSetValue
func VirtualMachineNetworkInterfaceToSetValue ¶
func VirtualMachineNetworkInterfaceToSetValue(ctx context.Context, nics []vm.VirtualMachineNetworkInterface) VirtualMachineNetworkInterfaceSetValue
type VirtualMachinePCIDeviceSetType ¶
func NewVirtualMachinePCIDeviceSetType ¶
func NewVirtualMachinePCIDeviceSetType() VirtualMachinePCIDeviceSetType
func (VirtualMachinePCIDeviceSetType) Equal ¶
func (d VirtualMachinePCIDeviceSetType) Equal(o attr.Type) bool
func (VirtualMachinePCIDeviceSetType) ValueFromTerraform ¶
type VirtualMachinePCIDeviceSetValue ¶
type VirtualMachinePCIDeviceSetValue struct {
types.Set
PCIDevices []VirtualMachinePCIDeviceModel
}
func VirtualMachinePCIDeviceSetValueFrom ¶
func VirtualMachinePCIDeviceSetValueFrom(ctx context.Context, dev []VirtualMachinePCIDeviceModel) VirtualMachinePCIDeviceSetValue
func VirtualMachinePCIDeviceToSetValue ¶
func VirtualMachinePCIDeviceToSetValue(ctx context.Context, devices []vm.VirtualMachinePCIDevice) VirtualMachinePCIDeviceSetValue
Click to show internal directories.
Click to hide internal directories.