efeb148be7
Device records, interfaces, MACs and cabling are written by the autodiscovery agent, and host names, roles and IP allocation by the UI, so terraform declaring them fights both owners. - drop the device, interface, MAC, per-host IP and net:<name> tag resources - declare sites, device types, roles and platforms in their own config files - add interface templates per device type and model the Omada SG3429X - add per-site VLAN groups and VLANs, seeding vid 101 and 201 in syd1 - publish network profiles as site-scoped config contexts - rename subnets to net-<a>-<b>-<c>-<d>-<len> and restore dns/domain/next_server
20 lines
843 B
Terraform
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
|
|
}
|