38 lines
693 B
HCL
38 lines
693 B
HCL
resource "proxmox_lxc" "app" {
|
|
target_node = var.target_node
|
|
hostname = var.vm_hostname
|
|
ostemplate = var.ostemplate
|
|
password = "password"
|
|
|
|
ssh_public_keys = var.ssh_public_key
|
|
|
|
cores = var.lxc_resources.cores
|
|
memory = var.lxc_resources.memory
|
|
swap = var.lxc_resources.swap
|
|
|
|
rootfs {
|
|
storage = var.storage
|
|
size = var.size
|
|
}
|
|
|
|
network {
|
|
name = "eth0"
|
|
bridge = var.bridge
|
|
ip = "${var.ip_address}/24"
|
|
gw = var.gateway
|
|
firewall = true
|
|
}
|
|
|
|
start = true
|
|
|
|
connection {
|
|
type = "ssh"
|
|
host = var.ip_address
|
|
user = "root"
|
|
private_key = var.private_key
|
|
timeout = "2m"
|
|
}
|
|
|
|
|
|
}
|