mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 04:19:19 -08:00
feat(aya): build box
This commit is contained in:
parent
8c32beacdf
commit
f56d511812
15 changed files with 299 additions and 4 deletions
|
|
@ -4,6 +4,8 @@ variable "proxmox_container_template" {
|
|||
}
|
||||
|
||||
locals {
|
||||
proxmox_aya_vm_id = 105
|
||||
proxmox_aya_config = jsondecode(file("${path.root}/../systems/aya/lxc.json"))
|
||||
proxmox_reimu_vm_id = 104
|
||||
proxmox_reimu_config = jsondecode(file("${path.root}/../systems/reimu/lxc.json"))
|
||||
proxmox_hakurei_vm_id = 103
|
||||
|
|
@ -64,6 +66,10 @@ resource "proxmox_virtual_environment_container" "reimu" {
|
|||
ipv6 {
|
||||
address = "auto"
|
||||
}
|
||||
ipv4 {
|
||||
address = "10.1.1.45/24"
|
||||
gateway = "10.1.1.1"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -94,7 +100,7 @@ resource "proxmox_virtual_environment_container" "reimu" {
|
|||
started = false
|
||||
|
||||
lifecycle {
|
||||
ignore_changes = [started, description, operating_system[0].template_file_id]
|
||||
ignore_changes = [started, unprivileged, description, operating_system[0].template_file_id]
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -105,6 +111,74 @@ module "reimu_config" {
|
|||
config = local.proxmox_reimu_config.lxc
|
||||
}
|
||||
|
||||
resource "proxmox_virtual_environment_container" "aya" {
|
||||
node_name = "reisen"
|
||||
vm_id = local.proxmox_aya_vm_id
|
||||
tags = ["tf"]
|
||||
description = "zoomzoom"
|
||||
|
||||
memory {
|
||||
dedicated = 16384
|
||||
swap = 8192
|
||||
}
|
||||
|
||||
cpu {
|
||||
cores = 12
|
||||
units = 768
|
||||
}
|
||||
|
||||
disk {
|
||||
datastore_id = "local-zfs"
|
||||
size = 32
|
||||
}
|
||||
|
||||
initialization {
|
||||
hostname = "aya"
|
||||
ip_config {
|
||||
ipv6 {
|
||||
address = "auto"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
startup {
|
||||
order = 4
|
||||
up_delay = 0
|
||||
down_delay = 0
|
||||
}
|
||||
|
||||
network_interface {
|
||||
name = "eth0"
|
||||
mac_address = "BC:24:11:C4:66:A9"
|
||||
}
|
||||
|
||||
operating_system {
|
||||
template_file_id = var.proxmox_container_template
|
||||
type = "nixos"
|
||||
}
|
||||
|
||||
unprivileged = true
|
||||
features {
|
||||
nesting = true
|
||||
}
|
||||
|
||||
console {
|
||||
type = "console"
|
||||
}
|
||||
started = false
|
||||
|
||||
lifecycle {
|
||||
ignore_changes = [started, description, operating_system[0].template_file_id]
|
||||
}
|
||||
}
|
||||
|
||||
module "aya_config" {
|
||||
source = "./system/proxmox/lxc/config"
|
||||
connection = local.proxmox_reisen_connection
|
||||
container = proxmox_virtual_environment_container.aya
|
||||
config = local.proxmox_aya_config.lxc
|
||||
}
|
||||
|
||||
resource "proxmox_virtual_environment_vm" "freeipa" {
|
||||
name = "freeipa"
|
||||
description = "FreeIPA, our identity management system"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue