phpipam stuff

This commit is contained in:
nick committed 2026-06-26 01:02:52 -07:00
1 parent 423caa9ca4
commit 879e5966da
5 files changed
+26 -9

No files matched your search

+10
View File
@@ -16,6 +16,7 @@ locals {
]) ])
technitium_enabled = try(data.external.infisical.result["technitium_api_token"], "") != "" technitium_enabled = try(data.external.infisical.result["technitium_api_token"], "") != ""
ipam_enabled = try(data.external.infisical.result["ipam_username"], "") != ""
# Shared inputs passed to every proxmox_node module call. # Shared inputs passed to every proxmox_node module call.
node_common = { node_common = {
@@ -82,6 +83,15 @@ locals {
} }
} }
# Uncomment when phpIPAM is running and credentials are in Infisical.
# module "phpipam" {
# source = "./opentofu/modules/phpipam"
#
# enabled = local.ipam_enabled
# hosts = local.all_declared_hosts
# network_subnets = var.network_subnets
# }
module "technitium" { module "technitium" {
source = "./opentofu/modules/technitium" source = "./opentofu/modules/technitium"
Submodule opentofu updated: af1d02b9b2...555e446691.
+14
View File
@@ -12,6 +12,10 @@ terraform {
source = "kenske/technitium" source = "kenske/technitium"
version = "~> 0.2" version = "~> 0.2"
} }
# phpipam = {
# source = "lord-kyron/phpipam"
# version = "1.6.2"
# }
} }
} }
@@ -27,6 +31,16 @@ data "external" "infisical" {
program = ["bash", "-c", "infisical export --template=./secrets.tmpl"] program = ["bash", "-c", "infisical export --template=./secrets.tmpl"]
} }
# Uncomment when phpIPAM is running and credentials are in Infisical.
# provider "phpipam" {
# app_id = "tofu"
# endpoint = var.ipam_endpoint
# username = coalesce(try(data.external.infisical.result["ipam_username"], ""), "user-not-yet-provisioned")
# password = coalesce(try(data.external.infisical.result["ipam_password"], ""), "pass-not-yet-provisioned")
# insecure = false
# nest_custom_fields = false
# }
provider "proxmox" { provider "proxmox" {
alias = "proxmox" alias = "proxmox"
pm_api_url = var.hypervisors["proxmox"].api_url pm_api_url = var.hypervisors["proxmox"].api_url
+1 -2
View File
@@ -8,7 +8,6 @@ hypervisors = {
} }
} }
enable_ipam = false
ipam_endpoint = "https://ipam.example.net/api" ipam_endpoint = "https://ipam.example.net/api"
network_subnets = { network_subnets = {
@@ -39,7 +38,7 @@ dns_records = [
{ zone = "oswaldtheotter.lan", name = "omada", type = "A", value = "192.168.0.110" }, { zone = "oswaldtheotter.lan", name = "omada", type = "A", value = "192.168.0.110" },
{ zone = "oswaldtheotter.lan", name = "portanas", type = "A", value = "192.168.0.4" }, { zone = "oswaldtheotter.lan", name = "portanas", type = "A", value = "192.168.0.4" },
{ zone = "oswaldtheotter.lan", name = "proxmox", type = "A", value = "192.168.0.240" }, { zone = "oswaldtheotter.lan", name = "proxmox", type = "A", value = "192.168.0.240" },
{ zone = "oswaldtheotter.lan", name = "nas", type = "CNAME", value = "portanas.lan.oswaldtheotter.net" }, { zone = "oswaldtheotter.lan", name = "nas", type = "CNAME", value = "portanas.oswaldtheotter.lan" },
] ]
# ── Node definitions ─────────────────────────────────────────────────────────── # ── Node definitions ───────────────────────────────────────────────────────────
-6
View File
@@ -7,12 +7,6 @@ variable "hypervisors" {
})) }))
} }
variable "enable_ipam" {
description = "When true, register all IPs in PHPIPAM. Requires ipam_endpoint and IPAM credentials in Infisical."
type = bool
default = false
}
variable "ipam_endpoint" { variable "ipam_endpoint" {
description = "Base URL of the PHPIPAM API, e.g. https://ipam.example.com/api" description = "Base URL of the PHPIPAM API, e.g. https://ipam.example.com/api"
type = string type = string