first attempt at vm deplyoment

This commit is contained in:
Ryan Toler
2026-05-13 06:32:19 +00:00
parent bf79507169
commit d01d11fa59
2 changed files with 100 additions and 0 deletions

48
lxc/grail-2/main.tf Normal file
View File

@@ -0,0 +1,48 @@
resource "proxmox_virtual_environment_vm" "debian_vm" {
name = "debian-bgp-node"
node_name = var.node_name
initialization {
user_data_file_id = proxmox_virtual_environment_file.cloud_config.id
ip_config {
ipv4 {
address = var.ip_address
gateway = var.gateway
}
}
dns {
servers = ["1.1.1.1", "8.8.8.8"]
}
hostname = var.hostname
user_account {
password = var.password
# keys = [trimspace(tls_private_key.example.public_key_openssh)]
}
}
network_device {
bridge = "vmbr0"
}
disk {
datastore_id = var.datastore_id
file_id = "local:iso/debian-13.4.0-amd64-netinst.iso"
interface = "scsi0"
size = var.disk_size_gb
}
tags = ["deb13", "terraform"]
cpu { cores = var.cores }
memory {
dedicated = var.memory
swap = var.swap
}
startup {
order = "3"
up_delay = "60"
down_delay = "60"
}
}