phpipam stuff
This commit is contained in:
1 parent
423caa9ca4
commit
879e5966da
5 files changed
+26
-9
No files matched your search
@@ -16,6 +16,7 @@ locals {
|
||||
])
|
||||
|
||||
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.
|
||||
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" {
|
||||
source = "./opentofu/modules/technitium"
|
||||
|
||||
|
||||
+1
-1
Submodule opentofu updated: af1d02b9b2...555e446691.
@@ -12,6 +12,10 @@ terraform {
|
||||
source = "kenske/technitium"
|
||||
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"]
|
||||
}
|
||||
|
||||
# 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" {
|
||||
alias = "proxmox"
|
||||
pm_api_url = var.hypervisors["proxmox"].api_url
|
||||
|
||||
+1
-2
@@ -8,7 +8,6 @@ hypervisors = {
|
||||
}
|
||||
}
|
||||
|
||||
enable_ipam = false
|
||||
ipam_endpoint = "https://ipam.example.net/api"
|
||||
|
||||
network_subnets = {
|
||||
@@ -39,7 +38,7 @@ dns_records = [
|
||||
{ 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 = "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 ───────────────────────────────────────────────────────────
|
||||
|
||||
@@ -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" {
|
||||
description = "Base URL of the PHPIPAM API, e.g. https://ipam.example.com/api"
|
||||
type = string
|
||||
|
||||
Reference in new issue
Block a user