mirror of
https://github.com/GoodOlClint/PSProxmoxVE.git
synced 2026-08-10 22:36:52 +00:00
79fae0bb37
- Remove ISO upload and answer-file resources (pre-provisioned manually) - Remove null_resource wait/token steps (token created out-of-band) - Switch iso_file to iso_file_id referencing an existing Proxmox file ID - Add lifecycle ignore_changes for started and cdrom - Update README with proxmox-auto-install-assistant ISO prep instructions - Update default variables to match homelab environment Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
72 lines
1.1 KiB
Terraform
72 lines
1.1 KiB
Terraform
terraform {
|
|
required_version = ">= 1.5.0"
|
|
required_providers {
|
|
proxmox = {
|
|
source = "bpg/proxmox"
|
|
version = ">= 0.70.0"
|
|
}
|
|
}
|
|
}
|
|
|
|
provider "proxmox" {
|
|
endpoint = var.proxmox_endpoint
|
|
api_token = var.proxmox_api_token
|
|
insecure = var.proxmox_insecure
|
|
|
|
ssh {
|
|
agent = true
|
|
username = "root"
|
|
}
|
|
}
|
|
|
|
resource "proxmox_virtual_environment_vm" "nested_pve" {
|
|
name = var.vm_name
|
|
node_name = var.target_node
|
|
vm_id = var.vm_id
|
|
|
|
machine = "q35"
|
|
bios = "ovmf"
|
|
|
|
cpu {
|
|
type = "host"
|
|
cores = var.cores
|
|
sockets = 1
|
|
}
|
|
|
|
memory {
|
|
dedicated = var.memory
|
|
}
|
|
|
|
efi_disk {
|
|
datastore_id = var.disk_storage
|
|
type = "4m"
|
|
}
|
|
|
|
disk {
|
|
datastore_id = var.disk_storage
|
|
interface = "scsi0"
|
|
size = var.disk_size
|
|
file_format = "raw"
|
|
}
|
|
|
|
cdrom {
|
|
file_id = var.iso_file_id
|
|
interface = "ide2"
|
|
}
|
|
|
|
network_device {
|
|
bridge = var.network_bridge
|
|
model = "virtio"
|
|
}
|
|
|
|
operating_system {
|
|
type = "l26"
|
|
}
|
|
|
|
started = true
|
|
|
|
lifecycle {
|
|
ignore_changes = [started, cdrom]
|
|
}
|
|
}
|