45 lines
1.0 KiB
HCL
45 lines
1.0 KiB
HCL
module "app" {
|
|
source = "./modules/lxc_container"
|
|
|
|
target_node = "px"
|
|
vm_hostname = "app-01"
|
|
ostemplate = "local:vztmpl/ubuntu-22.04-custome.tar.zst"
|
|
ssh_public_key = file("./ssh/id_terraform.pub")
|
|
private_key = file("./ssh/id_terraform")
|
|
ip_address = "10.10.10.3/24"
|
|
gateway = "10.10.10.1"
|
|
bridge = "vmbr1"
|
|
storage = "local"
|
|
size = "8G"
|
|
|
|
lxc_resources = {
|
|
cores = 2
|
|
memory = 2048
|
|
swap = 512
|
|
}
|
|
|
|
}
|
|
module "apps" {
|
|
source = "./modules/lxc_dynamic"
|
|
|
|
target_node = "px"
|
|
ostemplate = "local:vztmpl/ubuntu-22.04-custome.tar.zst"
|
|
ssh_public_key = file("./ssh/id_terraform.pub")
|
|
private_key = file("./ssh/id_terraform")
|
|
gateway = "10.10.10.1"
|
|
bridge = "vmbr1"
|
|
storage = "local"
|
|
size = "8G"
|
|
|
|
lxc_resources = {
|
|
cores = 2
|
|
memory = 2048
|
|
swap = 512
|
|
}
|
|
|
|
containers = {
|
|
nginx01 = { ip = "10.10.10.5/24" }
|
|
nginx02 = { ip = "10.10.10.6/24" }
|
|
}
|
|
}
|