mirror of
https://github.com/bpg/terraform-provider-proxmox.git
synced 2025-07-04 04:22:59 +00:00
Merge pull request #62 from luhahn/fix-cloudinit
Fix cloudinit and extend documentation for Release-0.4.0
This commit is contained in:
commit
c534da01cc
14
CHANGELOG.md
14
CHANGELOG.md
@ -5,11 +5,25 @@ FEATURES:
|
||||
* **New Data Source:** `proxmox_virtual_environment_time`
|
||||
* **New Resource:** `proxmox_virtual_environment_time`
|
||||
|
||||
BREAKING CHANGES:
|
||||
|
||||
* `interface` is now required to create disks
|
||||
|
||||
```
|
||||
disk {
|
||||
datastore_id = "local-lvm"
|
||||
file_id = "${proxmox_virtual_environment_file.ubuntu_cloud_image.id}"
|
||||
interface = "scsi0"
|
||||
}
|
||||
```
|
||||
|
||||
ENHANCEMENTS:
|
||||
|
||||
* provider/configuration: Add `virtual_environment.otp` argument for TOTP support
|
||||
* resource/virtual_environment_vm: Clone supports resize and datastore_id for moving disks
|
||||
* resource/virtual_environment_vm: Bulk clones can now use retries as argument to try multiple times to create a clone.
|
||||
* resource/virtual_environment_vm: `on_boot` parameter can be used to start a VM after the Node has been rebooted.
|
||||
* resource/virtual_environment_vm: `reboot` parameter can be used to reboot a VM after creation
|
||||
|
||||
BUG FIXES:
|
||||
|
||||
|
@ -247,6 +247,7 @@ output "ubuntu_vm_public_key" {
|
||||
* `rate_limit` - (Optional) The rate limit in megabytes per second.
|
||||
* `vlan_id` - (Optional) The VLAN identifier.
|
||||
* `node_name` - (Required) The name of the node to assign the virtual machine to.
|
||||
* `on_boot` - (Optional) Specifies whether a VM will be started during system boot. (defaults to `false`)
|
||||
* `operating_system` - (Optional) The Operating System configuration.
|
||||
* `type` - (Optional) The type (defaults to `other`).
|
||||
* `l24` - Linux Kernel 2.4.
|
||||
@ -262,6 +263,7 @@ output "ubuntu_vm_public_key" {
|
||||
* `wvista` - Windows Vista.
|
||||
* `wxp` - Windows XP.
|
||||
* `pool_id` - (Optional) The identifier for a pool to assign the virtual machine to.
|
||||
* `reboot` - (Optional) Reboot the VM after initial creation. (defaults to `false`)
|
||||
* `serial_device` - (Optional) A serial device (multiple blocks supported).
|
||||
* `device` - (Optional) The device (defaults to `socket`).
|
||||
* `/dev/*` - A host serial device.
|
||||
|
@ -1169,7 +1169,7 @@ func resourceVirtualEnvironmentVMCreateClone(d *schema.ResourceData, m interface
|
||||
|
||||
cdromMedia := "cdrom"
|
||||
|
||||
updateBody.IDEDevices = proxmox.CustomStorageDevices{
|
||||
ideDevices = proxmox.CustomStorageDevices{
|
||||
"ide3": proxmox.CustomStorageDevice{
|
||||
Enabled: cdromEnabled,
|
||||
FileVolume: cdromFileID,
|
||||
@ -1221,7 +1221,7 @@ func resourceVirtualEnvironmentVMCreateClone(d *schema.ResourceData, m interface
|
||||
cdromCloudInitFileID := fmt.Sprintf("%s:cloudinit", initializationDatastoreID)
|
||||
cdromCloudInitMedia := "cdrom"
|
||||
|
||||
updateBody.IDEDevices = proxmox.CustomStorageDevices{
|
||||
ideDevices = proxmox.CustomStorageDevices{
|
||||
"ide2": proxmox.CustomStorageDevice{
|
||||
Enabled: cdromCloudInitEnabled,
|
||||
FileVolume: cdromCloudInitFileID,
|
||||
@ -1594,12 +1594,12 @@ func resourceVirtualEnvironmentVMCreateCustom(d *schema.ResourceData, m interfac
|
||||
|
||||
ideDevice2Media := "cdrom"
|
||||
ideDevices := proxmox.CustomStorageDevices{
|
||||
"ide1": proxmox.CustomStorageDevice{
|
||||
"ide2": proxmox.CustomStorageDevice{
|
||||
Enabled: cdromCloudInitEnabled,
|
||||
FileVolume: cdromCloudInitFileID,
|
||||
Media: &ideDevice2Media,
|
||||
},
|
||||
"ide2": proxmox.CustomStorageDevice{
|
||||
"ide3": proxmox.CustomStorageDevice{
|
||||
Enabled: cdromEnabled,
|
||||
FileVolume: cdromFileID,
|
||||
Media: &ideDevice2Media,
|
||||
@ -1663,13 +1663,6 @@ func resourceVirtualEnvironmentVMCreateCustom(d *schema.ResourceData, m interfac
|
||||
createBody.VirtualIODevices = virtioDeviceObjects
|
||||
}
|
||||
|
||||
//this will most likely break the cdrom part thats why ide is disabled in line 2017
|
||||
/*
|
||||
if ideDevices != nil {
|
||||
createBody.IDEDevices = ideDeviceObjects
|
||||
}
|
||||
*/
|
||||
|
||||
// Only the root account is allowed to change the CPU architecture, which makes this check necessary.
|
||||
if veClient.Username == proxmox.DefaultRootAccount || cpuArchitecture != dvResourceVirtualEnvironmentVMCPUArchitecture {
|
||||
createBody.CPUArchitecture = &cpuArchitecture
|
||||
|
Loading…
Reference in New Issue
Block a user