Create the chassis_mac field before the devices that carry it
This commit is contained in:
@@ -71,4 +71,7 @@ resource "netbox_device" "network" {
|
||||
serial = each.value.serial
|
||||
asset_tag = each.value.asset_tag
|
||||
custom_fields = each.value.chassis_mac != null ? { chassis_mac = lower(each.value.chassis_mac) } : null
|
||||
|
||||
# chassis_mac must exist as a field before a device can carry a value for it.
|
||||
depends_on = [netbox_custom_field.this]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user