mirror of
https://github.com/bpg/terraform-provider-proxmox.git
synced 2025-07-08 14:55:02 +00:00
* feat(vm): Import Disk via API. Signed-off-by: Marco Attia <54147992+Vaneixus@users.noreply.github.com> * lint(vm): fix Linter Issues. Signed-off-by: Marco Attia <54147992+Vaneixus@users.noreply.github.com> * fix(vm): import_from update issues. Signed-off-by: Marco Attia <54147992+Vaneixus@users.noreply.github.com> * fix: store `import_from` in the state, add acc test for `import_from` Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com> * chore: update examples and docs Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com> * fix: linter Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com> * chore: re-gen docs Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com> --------- Signed-off-by: Marco Attia <54147992+Vaneixus@users.noreply.github.com> Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com> Co-authored-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
27 lines
765 B
HCL
27 lines
765 B
HCL
resource "proxmox_virtual_environment_vm" "debian_vm" {
|
|
name = "test-debian"
|
|
node_name = "pve"
|
|
|
|
# should be true if qemu agent is not installed / enabled on the VM
|
|
stop_on_destroy = true
|
|
|
|
initialization {
|
|
user_account {
|
|
# do not use this in production, configure your own ssh key instead!
|
|
username = "user"
|
|
password = "password"
|
|
}
|
|
}
|
|
|
|
disk {
|
|
datastore_id = "local-lvm"
|
|
# qcow2 image downloaded from https://cloud.debian.org/images/cloud/bookworm/latest/ and renamed to *.img
|
|
# the image is not of import type, so provider will use SSH client to import it
|
|
file_id = "local:iso/debian-12-genericcloud-amd64.img"
|
|
interface = "virtio0"
|
|
iothread = true
|
|
discard = "on"
|
|
size = 20
|
|
}
|
|
}
|