mirror of
https://github.com/bpg/terraform-provider-proxmox.git
synced 2025-07-03 12:02:57 +00:00
* chore(docs): update cloud-init and VM configuration examples - Added timezone and package installation for qemu-guest-agent in cloud-init configuration. - Updated VM configuration to include 'started' attribute and clarified agent usage in documentation. Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com> * not sure why the image checksum has changed This looks a bit suspicious, but I can ignore this for the test code. In production that would be a red flag requiring investigation Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com> --------- Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
58 lines
1.1 KiB
HCL
58 lines
1.1 KiB
HCL
resource "proxmox_virtual_environment_vm" "ubuntu_template" {
|
|
name = "ubuntu-template"
|
|
node_name = "pve"
|
|
|
|
template = true
|
|
started = false
|
|
|
|
machine = "q35"
|
|
bios = "ovmf"
|
|
description = "Managed by Terraform"
|
|
|
|
cpu {
|
|
cores = 2
|
|
}
|
|
|
|
memory {
|
|
dedicated = 2048
|
|
}
|
|
|
|
efi_disk {
|
|
datastore_id = "local"
|
|
file_format = "raw"
|
|
type = "4m"
|
|
}
|
|
|
|
disk {
|
|
datastore_id = "local-lvm"
|
|
file_id = proxmox_virtual_environment_download_file.ubuntu_cloud_image.id
|
|
interface = "virtio0"
|
|
iothread = true
|
|
discard = "on"
|
|
size = 20
|
|
}
|
|
|
|
initialization {
|
|
ip_config {
|
|
ipv4 {
|
|
address = "dhcp"
|
|
}
|
|
}
|
|
|
|
user_data_file_id = proxmox_virtual_environment_file.user_data_cloud_config.id
|
|
}
|
|
|
|
network_device {
|
|
bridge = "vmbr0"
|
|
}
|
|
|
|
}
|
|
|
|
resource "proxmox_virtual_environment_download_file" "ubuntu_cloud_image" {
|
|
content_type = "iso"
|
|
datastore_id = "local"
|
|
node_name = "pve"
|
|
|
|
url = "https://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-amd64.img"
|
|
}
|