resource "netbox_dcim_region" "example" {
name = "example"
slug = "example"
description = "example description"
}
resource "netbox_tenancy_tenant" "example" {
name = "example"
slug = "example"
}
module "example" {
source = "tle06/netbox/site"
path = "site.yaml"
region = netbox_dcim_region.example.id
tenant = netbox_tenancy_tenant.example.id
}
site:
name: "Example site 01"
region: "Barcelona"
tenant: "Store"
time_zone: "Europe/Madrid"
site_id: "S111"
physical_address: "example of physical address"
status: "active" #Optional
facility: "example facility" #Optional
asn_id: 65000 #Optional
description: "example description" #Optional
shipping_address: "example shipping address" #Optional
latitude: "10.800000" #Optional
longitude : "11.800000" #Optional
contact_name: "John doe" #Optional
contact_phone: "+33734989876" #Optional
contact_email: "john.doe@example.com" #Optional
comments: "example comments" #Optional
racks:
- name: "BCN-RCK111"
status: "active" #Optional
role_id: 1 #Optional
serial: "example serial" #Optional
asset_tag: "example asset tag" #Optional
type: "wall-frame" #Optional
width: 10 #Optional
u_height: 19 #Optional
desc_units: false #Optional
outer_width: 10 #Optional
outer_depth: 10 #Optional
outer_unit: "mm" #Optional
comments: "example comments" #Optional
devices:
- name: "BCN-ACP001"
device_type_id: 7
device_role_id: 4
comments: "exampel comments" #Optional
status: "active" #Optional
asset_tag: "example tag" #Optional
cluster_id: 1 #Optional
serial: "example serial" #Optional
face: "front" #Optional
platform_id: 1 #Optional
interfaces:
- name: "Interface 1"
tagged_vlan: [300]
type: "1000base-t" #Optional
connection_status: true #Optional
enabled: true #Optional
management_only: false #Optional
label: "example label" #Optional
mac_address: "00:00:00:00:00:00" #Optional
mode: "access" #Optional
description: "example description" #Optional
untagged_vlan_id: 71 #Optional
mtu: 1500 #Optional
- name: "Interface 2"
tagged_vlan: [400]
prefixes:
- prefix: "192.168.1.0/24"
vrf: 1 #Optional
description: "example description" #Optional
status: "active" #Optional
is_pool: true #Optional
- prefix: "192.168.2.0/24"
vlans:
- vid: "300"
name: "example vlan 300"
status: "reserved" #Optional
role_id: 1 #Optional
description: "example description" #Optional
- vid: "400"
name: "example vlan 400"
Name |
Version |
netbox |
0.1.0-alpha.7 |
No modules.
Name |
Description |
Type |
Default |
Required |
path |
The path of the yaml file describing the site. |
string |
n/a |
yes |
region |
The ID of region where the site will be located. |
number |
n/a |
yes |
tenant |
The ID of tenant that will be added to the site. |
number |
n/a |
yes |
Name |
Description |
devices |
the devices generated |
input |
The yaml file converted to varible |
interfaces |
The interfaces attached to the devices |
prefixes |
The prefix added to the site. |
racks |
The racks generated and attached to the site |
site |
The full site generated |
site_tag |
The site tag generated from the site_id value |
vlans |
The VLANs generated |
MIT Licensed. See LICENSE for full details.