Files
terraform-netbox/modules/netbox-global/custom_fields.tf
unkin-agent be53170557
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/plan Pipeline failed
Derive the site from the config path and split out global objects
Stop repeating the site slug inside the YAML: terragrunt passes the dc as
site_slug and site.yaml carries only site-wide attributes. Declare device
types, roles, platforms, custom fields and the dhcp IPAM role once in
config/global via their own unit and state; the per-site unit looks them up
by slug or name.
2026-10-03 18:34:40 +10:00

20 lines
843 B
Terraform

# Custom-field DEFINITIONS: what bootapi needs NetBox to carry before it can
# pick anything but the default distro.
#
# Definitions only. Values are set where they are owned:
# provision_template -> by the UI/autodiscovery, on the device
# pxe_enabled -> NOT managed here. It is runtime state: bootapi's
# /provisioned callback clears it at the end of an
# install so a host does not re-image on its next PXE.
# Setting it from terraform would re-enable installs on
# every apply.
resource "netbox_custom_field" "this" {
for_each = var.custom_fields
name = each.key
type = each.value.type
content_types = each.value.content_types
label = each.value.label
description = each.value.description
}