iac/terraform/runner.tf

71 lines
1.2 KiB
Terraform
Raw Normal View History

2024-07-12 23:57:29 -04:00
resource "proxmox_virtual_environment_vm" "Runner" {
2024-08-27 17:08:02 -04:00
# VM General Settings
node_name = "prox"
vm_id = 952
name = "Runner"
description = "Forgejo Runner for iac"
tags = ["tofu", "ubuntu-22", "iac-repo", "infrastructure"]
2024-07-12 23:57:29 -04:00
2024-08-27 17:08:02 -04:00
agent {
enabled = true
}
2024-07-12 23:57:29 -04:00
2024-08-27 17:08:02 -04:00
clone {
vm_id = 8100
}
# VM CPU Settings
cpu {
cores = 2
type = "host"
architecture = "x86_64"
flags = []
}
# VM Memory Settings
memory {
dedicated = 2048
}
2024-07-12 23:57:29 -04:00
2024-08-27 17:08:02 -04:00
# VM Network Settings
network_device {
bridge = "vmbr0"
model = "virtio"
}
2024-07-12 23:57:29 -04:00
2024-08-27 17:08:02 -04:00
# VM Disk Settings
disk {
datastore_id = "Fast2Tb"
size = 40
interface = "scsi0"
file_format = "raw"
path_in_datastore = "vm-952-disk-0"
}
2024-07-12 23:57:29 -04:00
2024-08-27 17:08:02 -04:00
vga {
type = "serial0"
}
2024-07-12 23:57:29 -04:00
2024-08-27 17:08:02 -04:00
initialization {
ip_config {
ipv4 {
address = "dhcp"
}
2024-07-12 23:57:29 -04:00
}
2024-08-27 17:08:02 -04:00
user_data_file_id = "Slow4tb:snippets/cloud-config.yaml"
}
lifecycle {
ignore_changes = [
initialization[0].user_account,
initialization[0].user_data_file_id,
cpu[0].flags,
disk[0].file_format,
disk[0].path_in_datastore,
]
}
2024-07-12 23:57:29 -04:00
}