69 lines
1.4 KiB
HCL
69 lines
1.4 KiB
HCL
resource "proxmox_virtual_environment_container" "unifi" {
|
|
node_name = "proxmox"
|
|
started = true
|
|
tags = []
|
|
template = false
|
|
vm_id = 103
|
|
|
|
console {
|
|
enabled = true
|
|
tty_count = 2
|
|
type = "tty"
|
|
}
|
|
|
|
cpu {
|
|
architecture = "amd64"
|
|
cores = 2
|
|
units = 1024
|
|
}
|
|
|
|
disk {
|
|
datastore_id = "local"
|
|
size = 32
|
|
}
|
|
|
|
initialization {
|
|
hostname = "unifi"
|
|
|
|
ip_config {
|
|
ipv4 {
|
|
address = "10.20.1.2/16"
|
|
gateway = "10.20.0.1"
|
|
}
|
|
ipv6 {
|
|
address = "auto"
|
|
}
|
|
}
|
|
}
|
|
|
|
memory {
|
|
dedicated = 2048
|
|
swap = 512
|
|
}
|
|
|
|
network_interface {
|
|
bridge = "vmbr0"
|
|
enabled = true
|
|
firewall = true
|
|
mac_address = "CA:B6:50:D7:1E:C2"
|
|
mtu = 0
|
|
name = "eth0"
|
|
rate_limit = 0
|
|
vlan_id = 0
|
|
}
|
|
|
|
operating_system {
|
|
template_file_id = proxmox_virtual_environment_file.ubuntu_container_template.id
|
|
type = "ubuntu"
|
|
}
|
|
}
|
|
|
|
resource "proxmox_virtual_environment_file" "ubuntu_container_template" {
|
|
content_type = "vztmpl"
|
|
datastore_id = "local"
|
|
node_name = "proxmox"
|
|
|
|
source_file {
|
|
path = "http://download.proxmox.com/images/system/ubuntu-22.04-standard_22.04-1_amd64.tar.zst"
|
|
}
|
|
} |