mirror of
https://github.com/letic/terraform-provider-proxmox.git
synced 2024-09-28 22:16:03 +00:00
Merge pull request #70 from V-Paranoiaque/feature/scsihw
Add SCSI controller support
This commit is contained in:
commit
0be9504190
@ -122,6 +122,7 @@ resource "proxmox_vm_qemu" "prepprovision-test" {
|
|||||||
cores = 3
|
cores = 3
|
||||||
sockets = 1
|
sockets = 1
|
||||||
memory = 2560
|
memory = 2560
|
||||||
|
scsihw = "lsi"
|
||||||
network {
|
network {
|
||||||
id = 0
|
id = 0
|
||||||
model = "virtio"
|
model = "virtio"
|
||||||
|
@ -27,6 +27,7 @@ resource "proxmox_vm_qemu" "cloudinit-test" {
|
|||||||
cores = "2"
|
cores = "2"
|
||||||
sockets = "1"
|
sockets = "1"
|
||||||
memory = "2048"
|
memory = "2048"
|
||||||
|
scsihw = "lsi"
|
||||||
|
|
||||||
# Setup the disk. The id has to be unique
|
# Setup the disk. The id has to be unique
|
||||||
disk {
|
disk {
|
||||||
|
@ -88,6 +88,11 @@ func resourceVmQemu() *schema.Resource {
|
|||||||
Optional: true,
|
Optional: true,
|
||||||
Default: 1,
|
Default: 1,
|
||||||
},
|
},
|
||||||
|
"scsihw": {
|
||||||
|
Type: schema.TypeString,
|
||||||
|
Optional: true,
|
||||||
|
Default: "",
|
||||||
|
},
|
||||||
"network": &schema.Schema{
|
"network": &schema.Schema{
|
||||||
Type: schema.TypeSet,
|
Type: schema.TypeSet,
|
||||||
Optional: true,
|
Optional: true,
|
||||||
@ -370,6 +375,7 @@ func resourceVmQemuCreate(d *schema.ResourceData, meta interface{}) error {
|
|||||||
Memory: d.Get("memory").(int),
|
Memory: d.Get("memory").(int),
|
||||||
QemuCores: d.Get("cores").(int),
|
QemuCores: d.Get("cores").(int),
|
||||||
QemuSockets: d.Get("sockets").(int),
|
QemuSockets: d.Get("sockets").(int),
|
||||||
|
Scsihw: d.Get("scsihw").(string),
|
||||||
QemuOs: d.Get("qemu_os").(string),
|
QemuOs: d.Get("qemu_os").(string),
|
||||||
QemuNetworks: qemuNetworks,
|
QemuNetworks: qemuNetworks,
|
||||||
QemuDisks: qemuDisks,
|
QemuDisks: qemuDisks,
|
||||||
@ -526,6 +532,7 @@ func resourceVmQemuUpdate(d *schema.ResourceData, meta interface{}) error {
|
|||||||
Memory: d.Get("memory").(int),
|
Memory: d.Get("memory").(int),
|
||||||
QemuCores: d.Get("cores").(int),
|
QemuCores: d.Get("cores").(int),
|
||||||
QemuSockets: d.Get("sockets").(int),
|
QemuSockets: d.Get("sockets").(int),
|
||||||
|
Scsihw: d.Get("scsihw").(string),
|
||||||
QemuOs: d.Get("qemu_os").(string),
|
QemuOs: d.Get("qemu_os").(string),
|
||||||
QemuNetworks: qemuNetworks,
|
QemuNetworks: qemuNetworks,
|
||||||
QemuDisks: qemuDisks,
|
QemuDisks: qemuDisks,
|
||||||
@ -614,6 +621,7 @@ func resourceVmQemuRead(d *schema.ResourceData, meta interface{}) error {
|
|||||||
d.Set("memory", config.Memory)
|
d.Set("memory", config.Memory)
|
||||||
d.Set("cores", config.QemuCores)
|
d.Set("cores", config.QemuCores)
|
||||||
d.Set("sockets", config.QemuSockets)
|
d.Set("sockets", config.QemuSockets)
|
||||||
|
d.Set("scsihw", config.Scsihw)
|
||||||
d.Set("qemu_os", config.QemuOs)
|
d.Set("qemu_os", config.QemuOs)
|
||||||
// Cloud-init.
|
// Cloud-init.
|
||||||
d.Set("ciuser", config.CIuser)
|
d.Set("ciuser", config.CIuser)
|
||||||
|
Loading…
Reference in New Issue
Block a user