mirror of
https://github.com/tolerryan/NewWatari.git
synced 2026-10-12 10:07:42 +00:00
58 lines
1.1 KiB
HCL
58 lines
1.1 KiB
HCL
terraform {
|
|
required_providers {
|
|
proxmox = {
|
|
source = "bpg/proxmox"
|
|
version = "0.97.1"
|
|
}
|
|
}
|
|
}
|
|
|
|
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"
|
|
}
|
|
}
|