feat(terraform): add core-mon LXC container definition on netcore

This commit is contained in:
karpenok committed 2026-11-11 15:56:07 +07:00
1 parent 38fc67048a
commit 9e9b8e9caf
4 files changed
+64 -1

No files matched your search

+51
View File
@@ -0,0 +1,51 @@
resource "proxmox_virtual_environment_container" "core_mon" {
description = "Managed by Terraform: core-mon (Prometheus, Alertmanager, Grafana, Ntfy)"
node_name = var.proxmox_node
vm_id = 903
unprivileged = true
started = true
initialization {
hostname = "core-mon"
ip_config {
ipv4 {
address = "192.168.1.108/24"
gateway = "192.168.1.1"
}
}
user_account {
keys = var.ssh_public_keys
}
}
network_interface {
name = "eth0"
bridge = "vmbr10"
}
operating_system {
template_file_id = "local:vztmpl/debian-13-standard_13.6-1_amd64.tar.zst"
type = "debian"
}
cpu {
cores = 2
}
memory {
dedicated = 4096
swap = 2048
}
disk {
datastore_id = "local-lvm"
size = 30
}
features {
nesting = true
}
}
+1 -1
View File
@@ -14,7 +14,7 @@ terraform {
}
provider "proxmox" {
endpoint = var.proxmox_endpoint
endpoint = var.proxmox_endpoint
api_token = var.proxmox_api_token
insecure = var.proxmox_insecure
+10
View File
@@ -17,3 +17,13 @@ output "core_secrets_ip" {
description = "IPv4 адрес контейнера core-secrets"
value = proxmox_virtual_environment_container.core_secrets.initialization[0].ip_config[0].ipv4[0].address
}
output "core_mon_id" {
description = "VMID контейнера core-mon"
value = proxmox_virtual_environment_container.core_mon.vm_id
}
output "core_mon_ip" {
description = "IPv4 адрес контейнера core-mon"
value = proxmox_virtual_environment_container.core_mon.initialization[0].ip_config[0].ipv4[0].address
}