published on Wednesday, Nov 4, 2026 by e-breuninger
published on Wednesday, Nov 4, 2026 by e-breuninger
A physical device (dcim.device). primary_ip4_id/primary_ip6_id are set through netbox_primary_ip.
From the official documentation:
Every piece of hardware which is installed within a site or rack exists in NetBox as a device. Devices are measured in rack units (U) and can be half depth or full depth. A device may have a height of 0U: These devices do not consume vertical rack space and cannot be assigned to a particular rack unit. A common example of a 0U device is a vertically-mounted PDU.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as netbox from "@pulumi/netbox";
const test = new netbox.Site("test", {name: "test-site"});
const testManufacturer = new netbox.Manufacturer("test", {name: "test-manufacturer"});
const testDeviceType = new netbox.DeviceType("test", {
manufacturerId: testManufacturer.manufacturerId,
model: "test-device-type",
});
const testDeviceRole = new netbox.DeviceRole("test", {name: "test-device-role"});
const testTenant = new netbox.Tenant("test", {name: "test-tenant"});
const testPlatform = new netbox.Platform("test", {name: "test-platform"});
const testLocation = new netbox.Location("test", {
name: "test-location",
siteId: test.siteId,
});
const testRack = new netbox.Rack("test", {
name: "test-rack",
siteId: test.siteId,
locationId: testLocation.locationId,
});
const testDevice = new netbox.Device("test", {
name: "test-device",
deviceTypeId: testDeviceType.deviceTypeId,
roleId: testDeviceRole.deviceRoleId,
siteId: test.siteId,
locationId: testLocation.locationId,
rackId: testRack.rackId,
rackPosition: 10,
rackFace: "front",
status: "active",
airflow: "front-to-rear",
tenantId: testTenant.tenantId,
platformId: testPlatform.platformId,
serial: "test-serial",
assetTag: "test-asset-tag",
description: "test-description",
localContextData: JSON.stringify({
ntp: ["192.0.2.1"],
}),
});
import pulumi
import json
import pulumi_netbox as netbox
test = netbox.Site("test", name="test-site")
test_manufacturer = netbox.Manufacturer("test", name="test-manufacturer")
test_device_type = netbox.DeviceType("test",
manufacturer_id=test_manufacturer.manufacturer_id,
model="test-device-type")
test_device_role = netbox.DeviceRole("test", name="test-device-role")
test_tenant = netbox.Tenant("test", name="test-tenant")
test_platform = netbox.Platform("test", name="test-platform")
test_location = netbox.Location("test",
name="test-location",
site_id=test.site_id)
test_rack = netbox.Rack("test",
name="test-rack",
site_id=test.site_id,
location_id=test_location.location_id)
test_device = netbox.Device("test",
name="test-device",
device_type_id=test_device_type.device_type_id,
role_id=test_device_role.device_role_id,
site_id=test.site_id,
location_id=test_location.location_id,
rack_id=test_rack.rack_id,
rack_position=10,
rack_face="front",
status="active",
airflow="front-to-rear",
tenant_id=test_tenant.tenant_id,
platform_id=test_platform.platform_id,
serial="test-serial",
asset_tag="test-asset-tag",
description="test-description",
local_context_data=json.dumps({
"ntp": ["192.0.2.1"],
}))
package main
import (
"encoding/json"
"github.com/pulumi/pulumi-terraform-provider/sdks/go/netbox/v6/netbox"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
test, err := netbox.NewSite(ctx, "test", &netbox.SiteArgs{
Name: pulumi.String("test-site"),
})
if err != nil {
return err
}
testManufacturer, err := netbox.NewManufacturer(ctx, "test", &netbox.ManufacturerArgs{
Name: pulumi.String("test-manufacturer"),
})
if err != nil {
return err
}
testDeviceType, err := netbox.NewDeviceType(ctx, "test", &netbox.DeviceTypeArgs{
ManufacturerId: testManufacturer.ManufacturerId,
Model: pulumi.String("test-device-type"),
})
if err != nil {
return err
}
testDeviceRole, err := netbox.NewDeviceRole(ctx, "test", &netbox.DeviceRoleArgs{
Name: pulumi.String("test-device-role"),
})
if err != nil {
return err
}
testTenant, err := netbox.NewTenant(ctx, "test", &netbox.TenantArgs{
Name: pulumi.String("test-tenant"),
})
if err != nil {
return err
}
testPlatform, err := netbox.NewPlatform(ctx, "test", &netbox.PlatformArgs{
Name: pulumi.String("test-platform"),
})
if err != nil {
return err
}
testLocation, err := netbox.NewLocation(ctx, "test", &netbox.LocationArgs{
Name: pulumi.String("test-location"),
SiteId: test.SiteId,
})
if err != nil {
return err
}
testRack, err := netbox.NewRack(ctx, "test", &netbox.RackArgs{
Name: pulumi.String("test-rack"),
SiteId: test.SiteId,
LocationId: testLocation.LocationId,
})
if err != nil {
return err
}
tmpJSON0, err := json.Marshal(map[string]interface{}{
"ntp": []string{
"192.0.2.1",
},
})
if err != nil {
return err
}
json0 := string(tmpJSON0)
_, err = netbox.NewDevice(ctx, "test", &netbox.DeviceArgs{
Name: pulumi.String("test-device"),
DeviceTypeId: testDeviceType.DeviceTypeId,
RoleId: testDeviceRole.DeviceRoleId,
SiteId: test.SiteId,
LocationId: testLocation.LocationId,
RackId: testRack.RackId,
RackPosition: pulumi.Float64(10),
RackFace: pulumi.String("front"),
Status: pulumi.String("active"),
Airflow: pulumi.String("front-to-rear"),
TenantId: testTenant.TenantId,
PlatformId: testPlatform.PlatformId,
Serial: pulumi.String("test-serial"),
AssetTag: pulumi.String("test-asset-tag"),
Description: pulumi.String("test-description"),
LocalContextData: pulumi.String(json0),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using System.Text.Json;
using Pulumi;
using Netbox = Pulumi.Netbox;
return await Deployment.RunAsync(() =>
{
var test = new Netbox.Site("test", new()
{
Name = "test-site",
});
var testManufacturer = new Netbox.Manufacturer("test", new()
{
Name = "test-manufacturer",
});
var testDeviceType = new Netbox.DeviceType("test", new()
{
ManufacturerId = testManufacturer.ManufacturerId,
Model = "test-device-type",
});
var testDeviceRole = new Netbox.DeviceRole("test", new()
{
Name = "test-device-role",
});
var testTenant = new Netbox.Tenant("test", new()
{
Name = "test-tenant",
});
var testPlatform = new Netbox.Platform("test", new()
{
Name = "test-platform",
});
var testLocation = new Netbox.Location("test", new()
{
Name = "test-location",
SiteId = test.SiteId,
});
var testRack = new Netbox.Rack("test", new()
{
Name = "test-rack",
SiteId = test.SiteId,
LocationId = testLocation.LocationId,
});
var testDevice = new Netbox.Device("test", new()
{
Name = "test-device",
DeviceTypeId = testDeviceType.DeviceTypeId,
RoleId = testDeviceRole.DeviceRoleId,
SiteId = test.SiteId,
LocationId = testLocation.LocationId,
RackId = testRack.RackId,
RackPosition = 10,
RackFace = "front",
Status = "active",
Airflow = "front-to-rear",
TenantId = testTenant.TenantId,
PlatformId = testPlatform.PlatformId,
Serial = "test-serial",
AssetTag = "test-asset-tag",
Description = "test-description",
LocalContextData = JsonSerializer.Serialize(new Dictionary<string, object?>
{
["ntp"] = new[]
{
"192.0.2.1",
},
}),
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.netbox.Site;
import com.pulumi.netbox.SiteArgs;
import com.pulumi.netbox.Manufacturer;
import com.pulumi.netbox.ManufacturerArgs;
import com.pulumi.netbox.DeviceType;
import com.pulumi.netbox.DeviceTypeArgs;
import com.pulumi.netbox.DeviceRole;
import com.pulumi.netbox.DeviceRoleArgs;
import com.pulumi.netbox.Tenant;
import com.pulumi.netbox.TenantArgs;
import com.pulumi.netbox.Platform;
import com.pulumi.netbox.PlatformArgs;
import com.pulumi.netbox.Location;
import com.pulumi.netbox.LocationArgs;
import com.pulumi.netbox.Rack;
import com.pulumi.netbox.RackArgs;
import com.pulumi.netbox.Device;
import com.pulumi.netbox.DeviceArgs;
import static com.pulumi.codegen.internal.Serialization.*;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var test = new Site("test", SiteArgs.builder()
.name("test-site")
.build());
var testManufacturer = new Manufacturer("testManufacturer", ManufacturerArgs.builder()
.name("test-manufacturer")
.build());
var testDeviceType = new DeviceType("testDeviceType", DeviceTypeArgs.builder()
.manufacturerId(testManufacturer.manufacturerId())
.model("test-device-type")
.build());
var testDeviceRole = new DeviceRole("testDeviceRole", DeviceRoleArgs.builder()
.name("test-device-role")
.build());
var testTenant = new Tenant("testTenant", TenantArgs.builder()
.name("test-tenant")
.build());
var testPlatform = new Platform("testPlatform", PlatformArgs.builder()
.name("test-platform")
.build());
var testLocation = new Location("testLocation", LocationArgs.builder()
.name("test-location")
.siteId(test.siteId())
.build());
var testRack = new Rack("testRack", RackArgs.builder()
.name("test-rack")
.siteId(test.siteId())
.locationId(testLocation.locationId())
.build());
var testDevice = new Device("testDevice", DeviceArgs.builder()
.name("test-device")
.deviceTypeId(testDeviceType.deviceTypeId())
.roleId(testDeviceRole.deviceRoleId())
.siteId(test.siteId())
.locationId(testLocation.locationId())
.rackId(testRack.rackId())
.rackPosition(10.0)
.rackFace("front")
.status("active")
.airflow("front-to-rear")
.tenantId(testTenant.tenantId())
.platformId(testPlatform.platformId())
.serial("test-serial")
.assetTag("test-asset-tag")
.description("test-description")
.localContextData(serializeJson(
jsonObject(
jsonProperty("ntp", jsonArray("192.0.2.1"))
)))
.build());
}
}
resources:
test:
type: netbox:Site
properties:
name: test-site
testManufacturer:
type: netbox:Manufacturer
name: test
properties:
name: test-manufacturer
testDeviceType:
type: netbox:DeviceType
name: test
properties:
manufacturerId: ${testManufacturer.manufacturerId}
model: test-device-type
testDeviceRole:
type: netbox:DeviceRole
name: test
properties:
name: test-device-role
testTenant:
type: netbox:Tenant
name: test
properties:
name: test-tenant
testPlatform:
type: netbox:Platform
name: test
properties:
name: test-platform
testLocation:
type: netbox:Location
name: test
properties:
name: test-location
siteId: ${test.siteId}
testRack:
type: netbox:Rack
name: test
properties:
name: test-rack
siteId: ${test.siteId}
locationId: ${testLocation.locationId}
testDevice:
type: netbox:Device
name: test
properties:
name: test-device
deviceTypeId: ${testDeviceType.deviceTypeId}
roleId: ${testDeviceRole.deviceRoleId}
siteId: ${test.siteId}
locationId: ${testLocation.locationId}
rackId: ${testRack.rackId}
rackPosition: 10
rackFace: front
status: active
airflow: front-to-rear
tenantId: ${testTenant.tenantId}
platformId: ${testPlatform.platformId}
serial: test-serial
assetTag: test-asset-tag
description: test-description
localContextData:
fn::toJSON:
ntp:
- 192.0.2.1
Example coming soon!
Create Device Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Device(name: string, args: DeviceArgs, opts?: CustomResourceOptions);@overload
def Device(resource_name: str,
args: DeviceArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Device(resource_name: str,
opts: Optional[ResourceOptions] = None,
device_type_id: Optional[float] = None,
site_id: Optional[float] = None,
role_id: Optional[float] = None,
description: Optional[str] = None,
platform_id: Optional[float] = None,
custom_fields: Optional[Mapping[str, str]] = None,
airflow: Optional[str] = None,
comments: Optional[str] = None,
latitude: Optional[float] = None,
local_context_data: Optional[str] = None,
location_id: Optional[float] = None,
longitude: Optional[float] = None,
name: Optional[str] = None,
owner_id: Optional[float] = None,
config_template_id: Optional[float] = None,
rack_face: Optional[str] = None,
rack_id: Optional[float] = None,
rack_position: Optional[float] = None,
cluster_id: Optional[float] = None,
serial: Optional[str] = None,
asset_tag: Optional[str] = None,
status: Optional[str] = None,
tags: Optional[Sequence[str]] = None,
tenant_id: Optional[float] = None,
virtual_chassis_id: Optional[float] = None,
virtual_chassis_position: Optional[float] = None,
virtual_chassis_priority: Optional[float] = None)func NewDevice(ctx *Context, name string, args DeviceArgs, opts ...ResourceOption) (*Device, error)public Device(string name, DeviceArgs args, CustomResourceOptions? opts = null)
public Device(String name, DeviceArgs args)
public Device(String name, DeviceArgs args, CustomResourceOptions options)
type: netbox:Device
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "netbox_device" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args DeviceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args DeviceArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args DeviceArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DeviceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args DeviceArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var deviceResource = new Netbox.Device("deviceResource", new()
{
DeviceTypeId = 0.0,
SiteId = 0.0,
RoleId = 0.0,
Description = "string",
PlatformId = 0.0,
CustomFields =
{
{ "string", "string" },
},
Airflow = "string",
Comments = "string",
Latitude = 0.0,
LocalContextData = "string",
LocationId = 0.0,
Longitude = 0.0,
Name = "string",
OwnerId = 0.0,
ConfigTemplateId = 0.0,
RackFace = "string",
RackId = 0.0,
RackPosition = 0.0,
ClusterId = 0.0,
Serial = "string",
AssetTag = "string",
Status = "string",
Tags = new[]
{
"string",
},
TenantId = 0.0,
VirtualChassisId = 0.0,
VirtualChassisPosition = 0.0,
VirtualChassisPriority = 0.0,
});
example, err := netbox.NewDevice(ctx, "deviceResource", &netbox.DeviceArgs{
DeviceTypeId: pulumi.Float64(0),
SiteId: pulumi.Float64(0),
RoleId: pulumi.Float64(0),
Description: pulumi.String("string"),
PlatformId: pulumi.Float64(0),
CustomFields: pulumi.StringMap{
"string": pulumi.String("string"),
},
Airflow: pulumi.String("string"),
Comments: pulumi.String("string"),
Latitude: pulumi.Float64(0),
LocalContextData: pulumi.String("string"),
LocationId: pulumi.Float64(0),
Longitude: pulumi.Float64(0),
Name: pulumi.String("string"),
OwnerId: pulumi.Float64(0),
ConfigTemplateId: pulumi.Float64(0),
RackFace: pulumi.String("string"),
RackId: pulumi.Float64(0),
RackPosition: pulumi.Float64(0),
ClusterId: pulumi.Float64(0),
Serial: pulumi.String("string"),
AssetTag: pulumi.String("string"),
Status: pulumi.String("string"),
Tags: pulumi.StringArray{
pulumi.String("string"),
},
TenantId: pulumi.Float64(0),
VirtualChassisId: pulumi.Float64(0),
VirtualChassisPosition: pulumi.Float64(0),
VirtualChassisPriority: pulumi.Float64(0),
})
resource "netbox_device" "deviceResource" {
lifecycle {
create_before_destroy = true
}
device_type_id = 0
site_id = 0
role_id = 0
description = "string"
platform_id = 0
custom_fields = {
"string" = "string"
}
airflow = "string"
comments = "string"
latitude = 0
local_context_data = "string"
location_id = 0
longitude = 0
name = "string"
owner_id = 0
config_template_id = 0
rack_face = "string"
rack_id = 0
rack_position = 0
cluster_id = 0
serial = "string"
asset_tag = "string"
status = "string"
tags = ["string"]
tenant_id = 0
virtual_chassis_id = 0
virtual_chassis_position = 0
virtual_chassis_priority = 0
}
var deviceResource = new Device("deviceResource", DeviceArgs.builder()
.deviceTypeId(0.0)
.siteId(0.0)
.roleId(0.0)
.description("string")
.platformId(0.0)
.customFields(Map.of("string", "string"))
.airflow("string")
.comments("string")
.latitude(0.0)
.localContextData("string")
.locationId(0.0)
.longitude(0.0)
.name("string")
.ownerId(0.0)
.configTemplateId(0.0)
.rackFace("string")
.rackId(0.0)
.rackPosition(0.0)
.clusterId(0.0)
.serial("string")
.assetTag("string")
.status("string")
.tags("string")
.tenantId(0.0)
.virtualChassisId(0.0)
.virtualChassisPosition(0.0)
.virtualChassisPriority(0.0)
.build());
device_resource = netbox.Device("deviceResource",
device_type_id=float(0),
site_id=float(0),
role_id=float(0),
description="string",
platform_id=float(0),
custom_fields={
"string": "string",
},
airflow="string",
comments="string",
latitude=float(0),
local_context_data="string",
location_id=float(0),
longitude=float(0),
name="string",
owner_id=float(0),
config_template_id=float(0),
rack_face="string",
rack_id=float(0),
rack_position=float(0),
cluster_id=float(0),
serial="string",
asset_tag="string",
status="string",
tags=["string"],
tenant_id=float(0),
virtual_chassis_id=float(0),
virtual_chassis_position=float(0),
virtual_chassis_priority=float(0))
const deviceResource = new netbox.Device("deviceResource", {
deviceTypeId: 0,
siteId: 0,
roleId: 0,
description: "string",
platformId: 0,
customFields: {
string: "string",
},
airflow: "string",
comments: "string",
latitude: 0,
localContextData: "string",
locationId: 0,
longitude: 0,
name: "string",
ownerId: 0,
configTemplateId: 0,
rackFace: "string",
rackId: 0,
rackPosition: 0,
clusterId: 0,
serial: "string",
assetTag: "string",
status: "string",
tags: ["string"],
tenantId: 0,
virtualChassisId: 0,
virtualChassisPosition: 0,
virtualChassisPriority: 0,
});
type: netbox:Device
properties:
airflow: string
assetTag: string
clusterId: 0
comments: string
configTemplateId: 0
customFields:
string: string
description: string
deviceTypeId: 0
latitude: 0
localContextData: string
locationId: 0
longitude: 0
name: string
ownerId: 0
platformId: 0
rackFace: string
rackId: 0
rackPosition: 0
roleId: 0
serial: string
siteId: 0
status: string
tags:
- string
tenantId: 0
virtualChassisId: 0
virtualChassisPosition: 0
virtualChassisPriority: 0
Device Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Device resource accepts the following input properties:
- Device
Type doubleId - Id of the device type.
- Role
Id double - Id of the device role.
- Site
Id double - Id of the site.
- Airflow string
- One of: front-to-rear, rear-to-front, left-to-right, right-to-left, side-to-rear, passive, mixed, rear-to-side, bottom-to-top, top-to-bottom.
- Asset
Tag string - Unique asset tag.
- Cluster
Id double - Id of the virtualization cluster the device hosts.
- Comments string
- Config
Template doubleId - Id of the config template.
- Custom
Fields Dictionary<string, string> - Custom field values by field name. Every value is a string; NetBox coerces numbers and booleans. An object field holds the related object's id, e.g. "12", a multiobject field a JSON list of ids in any order, e.g. jsonencode([12, 13]). A key removed from the map is cleared in NetBox (set {} to clear all).
- Description string
- Latitude double
- GPS coordinate in decimal format (xx.yyyyyy).
- Local
Context stringData - Local config context data as JSON text (use jsonencode()).
- Location
Id double - Id of the location within the site.
- Longitude double
- GPS coordinate in decimal format (xx.yyyyyy).
- Name string
- Device name; NetBox allows unnamed devices.
- Owner
Id double - Id of the owner the object is assigned to.
- Platform
Id double - Id of the platform.
- Rack
Face string - Rack face the device is mounted on. One of: front, rear.
- Rack
Id double - Id of the rack.
- Rack
Position double - Lowest rack unit occupied by the device; half units (e.g. 1.5) are allowed.
- Serial string
- Chassis serial number.
- Status string
- Operational status. One of: offline, active, planned, staged, failed, inventory, decommissioning.
- List<string>
- Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
- Tenant
Id double - Id of the tenant.
- Virtual
Chassis doubleId - Id of the virtual chassis.
- Virtual
Chassis doublePosition - Position in the virtual chassis (0-255). Must be a whole number.
- Virtual
Chassis doublePriority - Master election priority in the virtual chassis (0-255). Must be a whole number.
- Device
Type float64Id - Id of the device type.
- Role
Id float64 - Id of the device role.
- Site
Id float64 - Id of the site.
- Airflow string
- One of: front-to-rear, rear-to-front, left-to-right, right-to-left, side-to-rear, passive, mixed, rear-to-side, bottom-to-top, top-to-bottom.
- Asset
Tag string - Unique asset tag.
- Cluster
Id float64 - Id of the virtualization cluster the device hosts.
- Comments string
- Config
Template float64Id - Id of the config template.
- Custom
Fields map[string]string - Custom field values by field name. Every value is a string; NetBox coerces numbers and booleans. An object field holds the related object's id, e.g. "12", a multiobject field a JSON list of ids in any order, e.g. jsonencode([12, 13]). A key removed from the map is cleared in NetBox (set {} to clear all).
- Description string
- Latitude float64
- GPS coordinate in decimal format (xx.yyyyyy).
- Local
Context stringData - Local config context data as JSON text (use jsonencode()).
- Location
Id float64 - Id of the location within the site.
- Longitude float64
- GPS coordinate in decimal format (xx.yyyyyy).
- Name string
- Device name; NetBox allows unnamed devices.
- Owner
Id float64 - Id of the owner the object is assigned to.
- Platform
Id float64 - Id of the platform.
- Rack
Face string - Rack face the device is mounted on. One of: front, rear.
- Rack
Id float64 - Id of the rack.
- Rack
Position float64 - Lowest rack unit occupied by the device; half units (e.g. 1.5) are allowed.
- Serial string
- Chassis serial number.
- Status string
- Operational status. One of: offline, active, planned, staged, failed, inventory, decommissioning.
- []string
- Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
- Tenant
Id float64 - Id of the tenant.
- Virtual
Chassis float64Id - Id of the virtual chassis.
- Virtual
Chassis float64Position - Position in the virtual chassis (0-255). Must be a whole number.
- Virtual
Chassis float64Priority - Master election priority in the virtual chassis (0-255). Must be a whole number.
- device_
type_ numberid - Id of the device type.
- role_
id number - Id of the device role.
- site_
id number - Id of the site.
- airflow string
- One of: front-to-rear, rear-to-front, left-to-right, right-to-left, side-to-rear, passive, mixed, rear-to-side, bottom-to-top, top-to-bottom.
- asset_
tag string - Unique asset tag.
- cluster_
id number - Id of the virtualization cluster the device hosts.
- comments string
- config_
template_ numberid - Id of the config template.
- custom_
fields map(string) - Custom field values by field name. Every value is a string; NetBox coerces numbers and booleans. An object field holds the related object's id, e.g. "12", a multiobject field a JSON list of ids in any order, e.g. jsonencode([12, 13]). A key removed from the map is cleared in NetBox (set {} to clear all).
- description string
- latitude number
- GPS coordinate in decimal format (xx.yyyyyy).
- local_
context_ stringdata - Local config context data as JSON text (use jsonencode()).
- location_
id number - Id of the location within the site.
- longitude number
- GPS coordinate in decimal format (xx.yyyyyy).
- name string
- Device name; NetBox allows unnamed devices.
- owner_
id number - Id of the owner the object is assigned to.
- platform_
id number - Id of the platform.
- rack_
face string - Rack face the device is mounted on. One of: front, rear.
- rack_
id number - Id of the rack.
- rack_
position number - Lowest rack unit occupied by the device; half units (e.g. 1.5) are allowed.
- serial string
- Chassis serial number.
- status string
- Operational status. One of: offline, active, planned, staged, failed, inventory, decommissioning.
- list(string)
- Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
- tenant_
id number - Id of the tenant.
- virtual_
chassis_ numberid - Id of the virtual chassis.
- virtual_
chassis_ numberposition - Position in the virtual chassis (0-255). Must be a whole number.
- virtual_
chassis_ numberpriority - Master election priority in the virtual chassis (0-255). Must be a whole number.
- device
Type DoubleId - Id of the device type.
- role
Id Double - Id of the device role.
- site
Id Double - Id of the site.
- airflow String
- One of: front-to-rear, rear-to-front, left-to-right, right-to-left, side-to-rear, passive, mixed, rear-to-side, bottom-to-top, top-to-bottom.
- asset
Tag String - Unique asset tag.
- cluster
Id Double - Id of the virtualization cluster the device hosts.
- comments String
- config
Template DoubleId - Id of the config template.
- custom
Fields Map<String,String> - Custom field values by field name. Every value is a string; NetBox coerces numbers and booleans. An object field holds the related object's id, e.g. "12", a multiobject field a JSON list of ids in any order, e.g. jsonencode([12, 13]). A key removed from the map is cleared in NetBox (set {} to clear all).
- description String
- latitude Double
- GPS coordinate in decimal format (xx.yyyyyy).
- local
Context StringData - Local config context data as JSON text (use jsonencode()).
- location
Id Double - Id of the location within the site.
- longitude Double
- GPS coordinate in decimal format (xx.yyyyyy).
- name String
- Device name; NetBox allows unnamed devices.
- owner
Id Double - Id of the owner the object is assigned to.
- platform
Id Double - Id of the platform.
- rack
Face String - Rack face the device is mounted on. One of: front, rear.
- rack
Id Double - Id of the rack.
- rack
Position Double - Lowest rack unit occupied by the device; half units (e.g. 1.5) are allowed.
- serial String
- Chassis serial number.
- status String
- Operational status. One of: offline, active, planned, staged, failed, inventory, decommissioning.
- List<String>
- Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
- tenant
Id Double - Id of the tenant.
- virtual
Chassis DoubleId - Id of the virtual chassis.
- virtual
Chassis DoublePosition - Position in the virtual chassis (0-255). Must be a whole number.
- virtual
Chassis DoublePriority - Master election priority in the virtual chassis (0-255). Must be a whole number.
- device
Type numberId - Id of the device type.
- role
Id number - Id of the device role.
- site
Id number - Id of the site.
- airflow string
- One of: front-to-rear, rear-to-front, left-to-right, right-to-left, side-to-rear, passive, mixed, rear-to-side, bottom-to-top, top-to-bottom.
- asset
Tag string - Unique asset tag.
- cluster
Id number - Id of the virtualization cluster the device hosts.
- comments string
- config
Template numberId - Id of the config template.
- custom
Fields {[key: string]: string} - Custom field values by field name. Every value is a string; NetBox coerces numbers and booleans. An object field holds the related object's id, e.g. "12", a multiobject field a JSON list of ids in any order, e.g. jsonencode([12, 13]). A key removed from the map is cleared in NetBox (set {} to clear all).
- description string
- latitude number
- GPS coordinate in decimal format (xx.yyyyyy).
- local
Context stringData - Local config context data as JSON text (use jsonencode()).
- location
Id number - Id of the location within the site.
- longitude number
- GPS coordinate in decimal format (xx.yyyyyy).
- name string
- Device name; NetBox allows unnamed devices.
- owner
Id number - Id of the owner the object is assigned to.
- platform
Id number - Id of the platform.
- rack
Face string - Rack face the device is mounted on. One of: front, rear.
- rack
Id number - Id of the rack.
- rack
Position number - Lowest rack unit occupied by the device; half units (e.g. 1.5) are allowed.
- serial string
- Chassis serial number.
- status string
- Operational status. One of: offline, active, planned, staged, failed, inventory, decommissioning.
- string[]
- Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
- tenant
Id number - Id of the tenant.
- virtual
Chassis numberId - Id of the virtual chassis.
- virtual
Chassis numberPosition - Position in the virtual chassis (0-255). Must be a whole number.
- virtual
Chassis numberPriority - Master election priority in the virtual chassis (0-255). Must be a whole number.
- device_
type_ floatid - Id of the device type.
- role_
id float - Id of the device role.
- site_
id float - Id of the site.
- airflow str
- One of: front-to-rear, rear-to-front, left-to-right, right-to-left, side-to-rear, passive, mixed, rear-to-side, bottom-to-top, top-to-bottom.
- asset_
tag str - Unique asset tag.
- cluster_
id float - Id of the virtualization cluster the device hosts.
- comments str
- config_
template_ floatid - Id of the config template.
- custom_
fields Mapping[str, str] - Custom field values by field name. Every value is a string; NetBox coerces numbers and booleans. An object field holds the related object's id, e.g. "12", a multiobject field a JSON list of ids in any order, e.g. jsonencode([12, 13]). A key removed from the map is cleared in NetBox (set {} to clear all).
- description str
- latitude float
- GPS coordinate in decimal format (xx.yyyyyy).
- local_
context_ strdata - Local config context data as JSON text (use jsonencode()).
- location_
id float - Id of the location within the site.
- longitude float
- GPS coordinate in decimal format (xx.yyyyyy).
- name str
- Device name; NetBox allows unnamed devices.
- owner_
id float - Id of the owner the object is assigned to.
- platform_
id float - Id of the platform.
- rack_
face str - Rack face the device is mounted on. One of: front, rear.
- rack_
id float - Id of the rack.
- rack_
position float - Lowest rack unit occupied by the device; half units (e.g. 1.5) are allowed.
- serial str
- Chassis serial number.
- status str
- Operational status. One of: offline, active, planned, staged, failed, inventory, decommissioning.
- Sequence[str]
- Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
- tenant_
id float - Id of the tenant.
- virtual_
chassis_ floatid - Id of the virtual chassis.
- virtual_
chassis_ floatposition - Position in the virtual chassis (0-255). Must be a whole number.
- virtual_
chassis_ floatpriority - Master election priority in the virtual chassis (0-255). Must be a whole number.
- device
Type NumberId - Id of the device type.
- role
Id Number - Id of the device role.
- site
Id Number - Id of the site.
- airflow String
- One of: front-to-rear, rear-to-front, left-to-right, right-to-left, side-to-rear, passive, mixed, rear-to-side, bottom-to-top, top-to-bottom.
- asset
Tag String - Unique asset tag.
- cluster
Id Number - Id of the virtualization cluster the device hosts.
- comments String
- config
Template NumberId - Id of the config template.
- custom
Fields Map<String> - Custom field values by field name. Every value is a string; NetBox coerces numbers and booleans. An object field holds the related object's id, e.g. "12", a multiobject field a JSON list of ids in any order, e.g. jsonencode([12, 13]). A key removed from the map is cleared in NetBox (set {} to clear all).
- description String
- latitude Number
- GPS coordinate in decimal format (xx.yyyyyy).
- local
Context StringData - Local config context data as JSON text (use jsonencode()).
- location
Id Number - Id of the location within the site.
- longitude Number
- GPS coordinate in decimal format (xx.yyyyyy).
- name String
- Device name; NetBox allows unnamed devices.
- owner
Id Number - Id of the owner the object is assigned to.
- platform
Id Number - Id of the platform.
- rack
Face String - Rack face the device is mounted on. One of: front, rear.
- rack
Id Number - Id of the rack.
- rack
Position Number - Lowest rack unit occupied by the device; half units (e.g. 1.5) are allowed.
- serial String
- Chassis serial number.
- status String
- Operational status. One of: offline, active, planned, staged, failed, inventory, decommissioning.
- List<String>
- Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
- tenant
Id Number - Id of the tenant.
- virtual
Chassis NumberId - Id of the virtual chassis.
- virtual
Chassis NumberPosition - Position in the virtual chassis (0-255). Must be a whole number.
- virtual
Chassis NumberPriority - Master election priority in the virtual chassis (0-255). Must be a whole number.
Outputs
All input properties are implicitly available as output properties. Additionally, the Device resource produces the following output properties:
- Config
Context string - Rendered config context (localcontextdata merged with the context assigned through cluster, platform, role, site, tenant and tags) as JSON text, decode with jsondecode().
- Console
Port doubleCount - Number of console ports on the device.
- Console
Server doublePort Count - Number of console server ports on the device.
- Created string
- Device
Bay doubleCount - Number of device bays on the device.
- Device
Id double - NetBox id.
- Front
Port doubleCount - Number of front ports on the device.
- Id string
- The provider-assigned unique ID for this managed resource.
- Interface
Count double - Number of interfaces on the device.
- Inventory
Item doubleCount - Number of inventory items on the device.
- Last
Updated string - Module
Bay doubleCount - Number of module bays on the device.
- Oob
Ip doubleId - Id of the out-of-band management IP address (managed by netboxdeviceoob_ip).
- Power
Outlet doubleCount - Number of power outlets on the device.
- Power
Port doubleCount - Number of power ports on the device.
- Primary
Ip4Id double - Id of the primary IPv4 address (managed by netboxprimaryip).
- Primary
Ip6Id double - Id of the primary IPv6 address (managed by netboxprimaryip).
- Rear
Port doubleCount - Number of rear ports on the device.
- List<string>
- Slugs of all tags on the object, including the provider's default_tags.
- Url string
- Config
Context string - Rendered config context (localcontextdata merged with the context assigned through cluster, platform, role, site, tenant and tags) as JSON text, decode with jsondecode().
- Console
Port float64Count - Number of console ports on the device.
- Console
Server float64Port Count - Number of console server ports on the device.
- Created string
- Device
Bay float64Count - Number of device bays on the device.
- Device
Id float64 - NetBox id.
- Front
Port float64Count - Number of front ports on the device.
- Id string
- The provider-assigned unique ID for this managed resource.
- Interface
Count float64 - Number of interfaces on the device.
- Inventory
Item float64Count - Number of inventory items on the device.
- Last
Updated string - Module
Bay float64Count - Number of module bays on the device.
- Oob
Ip float64Id - Id of the out-of-band management IP address (managed by netboxdeviceoob_ip).
- Power
Outlet float64Count - Number of power outlets on the device.
- Power
Port float64Count - Number of power ports on the device.
- Primary
Ip4Id float64 - Id of the primary IPv4 address (managed by netboxprimaryip).
- Primary
Ip6Id float64 - Id of the primary IPv6 address (managed by netboxprimaryip).
- Rear
Port float64Count - Number of rear ports on the device.
- []string
- Slugs of all tags on the object, including the provider's default_tags.
- Url string
- config_
context string - Rendered config context (localcontextdata merged with the context assigned through cluster, platform, role, site, tenant and tags) as JSON text, decode with jsondecode().
- console_
port_ numbercount - Number of console ports on the device.
- console_
server_ numberport_ count - Number of console server ports on the device.
- created string
- device_
bay_ numbercount - Number of device bays on the device.
- device_
id number - NetBox id.
- front_
port_ numbercount - Number of front ports on the device.
- id string
- The provider-assigned unique ID for this managed resource.
- interface_
count number - Number of interfaces on the device.
- inventory_
item_ numbercount - Number of inventory items on the device.
- last_
updated string - module_
bay_ numbercount - Number of module bays on the device.
- oob_
ip_ numberid - Id of the out-of-band management IP address (managed by netboxdeviceoob_ip).
- power_
outlet_ numbercount - Number of power outlets on the device.
- power_
port_ numbercount - Number of power ports on the device.
- primary_
ip4_ numberid - Id of the primary IPv4 address (managed by netboxprimaryip).
- primary_
ip6_ numberid - Id of the primary IPv6 address (managed by netboxprimaryip).
- rear_
port_ numbercount - Number of rear ports on the device.
- list(string)
- Slugs of all tags on the object, including the provider's default_tags.
- url string
- config
Context String - Rendered config context (localcontextdata merged with the context assigned through cluster, platform, role, site, tenant and tags) as JSON text, decode with jsondecode().
- console
Port DoubleCount - Number of console ports on the device.
- console
Server DoublePort Count - Number of console server ports on the device.
- created String
- device
Bay DoubleCount - Number of device bays on the device.
- device
Id Double - NetBox id.
- front
Port DoubleCount - Number of front ports on the device.
- id String
- The provider-assigned unique ID for this managed resource.
- interface
Count Double - Number of interfaces on the device.
- inventory
Item DoubleCount - Number of inventory items on the device.
- last
Updated String - module
Bay DoubleCount - Number of module bays on the device.
- oob
Ip DoubleId - Id of the out-of-band management IP address (managed by netboxdeviceoob_ip).
- power
Outlet DoubleCount - Number of power outlets on the device.
- power
Port DoubleCount - Number of power ports on the device.
- primary
Ip4Id Double - Id of the primary IPv4 address (managed by netboxprimaryip).
- primary
Ip6Id Double - Id of the primary IPv6 address (managed by netboxprimaryip).
- rear
Port DoubleCount - Number of rear ports on the device.
- List<String>
- Slugs of all tags on the object, including the provider's default_tags.
- url String
- config
Context string - Rendered config context (localcontextdata merged with the context assigned through cluster, platform, role, site, tenant and tags) as JSON text, decode with jsondecode().
- console
Port numberCount - Number of console ports on the device.
- console
Server numberPort Count - Number of console server ports on the device.
- created string
- device
Bay numberCount - Number of device bays on the device.
- device
Id number - NetBox id.
- front
Port numberCount - Number of front ports on the device.
- id string
- The provider-assigned unique ID for this managed resource.
- interface
Count number - Number of interfaces on the device.
- inventory
Item numberCount - Number of inventory items on the device.
- last
Updated string - module
Bay numberCount - Number of module bays on the device.
- oob
Ip numberId - Id of the out-of-band management IP address (managed by netboxdeviceoob_ip).
- power
Outlet numberCount - Number of power outlets on the device.
- power
Port numberCount - Number of power ports on the device.
- primary
Ip4Id number - Id of the primary IPv4 address (managed by netboxprimaryip).
- primary
Ip6Id number - Id of the primary IPv6 address (managed by netboxprimaryip).
- rear
Port numberCount - Number of rear ports on the device.
- string[]
- Slugs of all tags on the object, including the provider's default_tags.
- url string
- config_
context str - Rendered config context (localcontextdata merged with the context assigned through cluster, platform, role, site, tenant and tags) as JSON text, decode with jsondecode().
- console_
port_ floatcount - Number of console ports on the device.
- console_
server_ floatport_ count - Number of console server ports on the device.
- created str
- device_
bay_ floatcount - Number of device bays on the device.
- device_
id float - NetBox id.
- front_
port_ floatcount - Number of front ports on the device.
- id str
- The provider-assigned unique ID for this managed resource.
- interface_
count float - Number of interfaces on the device.
- inventory_
item_ floatcount - Number of inventory items on the device.
- last_
updated str - module_
bay_ floatcount - Number of module bays on the device.
- oob_
ip_ floatid - Id of the out-of-band management IP address (managed by netboxdeviceoob_ip).
- power_
outlet_ floatcount - Number of power outlets on the device.
- power_
port_ floatcount - Number of power ports on the device.
- primary_
ip4_ floatid - Id of the primary IPv4 address (managed by netboxprimaryip).
- primary_
ip6_ floatid - Id of the primary IPv6 address (managed by netboxprimaryip).
- rear_
port_ floatcount - Number of rear ports on the device.
- Sequence[str]
- Slugs of all tags on the object, including the provider's default_tags.
- url str
- config
Context String - Rendered config context (localcontextdata merged with the context assigned through cluster, platform, role, site, tenant and tags) as JSON text, decode with jsondecode().
- console
Port NumberCount - Number of console ports on the device.
- console
Server NumberPort Count - Number of console server ports on the device.
- created String
- device
Bay NumberCount - Number of device bays on the device.
- device
Id Number - NetBox id.
- front
Port NumberCount - Number of front ports on the device.
- id String
- The provider-assigned unique ID for this managed resource.
- interface
Count Number - Number of interfaces on the device.
- inventory
Item NumberCount - Number of inventory items on the device.
- last
Updated String - module
Bay NumberCount - Number of module bays on the device.
- oob
Ip NumberId - Id of the out-of-band management IP address (managed by netboxdeviceoob_ip).
- power
Outlet NumberCount - Number of power outlets on the device.
- power
Port NumberCount - Number of power ports on the device.
- primary
Ip4Id Number - Id of the primary IPv4 address (managed by netboxprimaryip).
- primary
Ip6Id Number - Id of the primary IPv6 address (managed by netboxprimaryip).
- rear
Port NumberCount - Number of rear ports on the device.
- List<String>
- Slugs of all tags on the object, including the provider's default_tags.
- url String
Look up Existing Device Resource
Get an existing Device resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: DeviceState, opts?: CustomResourceOptions): Device@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
airflow: Optional[str] = None,
asset_tag: Optional[str] = None,
cluster_id: Optional[float] = None,
comments: Optional[str] = None,
config_context: Optional[str] = None,
config_template_id: Optional[float] = None,
console_port_count: Optional[float] = None,
console_server_port_count: Optional[float] = None,
created: Optional[str] = None,
custom_fields: Optional[Mapping[str, str]] = None,
description: Optional[str] = None,
device_bay_count: Optional[float] = None,
device_id: Optional[float] = None,
device_type_id: Optional[float] = None,
front_port_count: Optional[float] = None,
interface_count: Optional[float] = None,
inventory_item_count: Optional[float] = None,
last_updated: Optional[str] = None,
latitude: Optional[float] = None,
local_context_data: Optional[str] = None,
location_id: Optional[float] = None,
longitude: Optional[float] = None,
module_bay_count: Optional[float] = None,
name: Optional[str] = None,
oob_ip_id: Optional[float] = None,
owner_id: Optional[float] = None,
platform_id: Optional[float] = None,
power_outlet_count: Optional[float] = None,
power_port_count: Optional[float] = None,
primary_ip4_id: Optional[float] = None,
primary_ip6_id: Optional[float] = None,
rack_face: Optional[str] = None,
rack_id: Optional[float] = None,
rack_position: Optional[float] = None,
rear_port_count: Optional[float] = None,
role_id: Optional[float] = None,
serial: Optional[str] = None,
site_id: Optional[float] = None,
status: Optional[str] = None,
tags: Optional[Sequence[str]] = None,
tags_alls: Optional[Sequence[str]] = None,
tenant_id: Optional[float] = None,
url: Optional[str] = None,
virtual_chassis_id: Optional[float] = None,
virtual_chassis_position: Optional[float] = None,
virtual_chassis_priority: Optional[float] = None) -> Devicefunc GetDevice(ctx *Context, name string, id IDInput, state *DeviceState, opts ...ResourceOption) (*Device, error)public static Device Get(string name, Input<string> id, DeviceState? state, CustomResourceOptions? opts = null)public static Device get(String name, Output<String> id, DeviceState state, CustomResourceOptions options)resources: _: type: netbox:Device get: id: ${id}import {
to = netbox_device.example
id = "${id}"
}
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Airflow string
- One of: front-to-rear, rear-to-front, left-to-right, right-to-left, side-to-rear, passive, mixed, rear-to-side, bottom-to-top, top-to-bottom.
- Asset
Tag string - Unique asset tag.
- Cluster
Id double - Id of the virtualization cluster the device hosts.
- Comments string
- Config
Context string - Rendered config context (localcontextdata merged with the context assigned through cluster, platform, role, site, tenant and tags) as JSON text, decode with jsondecode().
- Config
Template doubleId - Id of the config template.
- Console
Port doubleCount - Number of console ports on the device.
- Console
Server doublePort Count - Number of console server ports on the device.
- Created string
- Custom
Fields Dictionary<string, string> - Custom field values by field name. Every value is a string; NetBox coerces numbers and booleans. An object field holds the related object's id, e.g. "12", a multiobject field a JSON list of ids in any order, e.g. jsonencode([12, 13]). A key removed from the map is cleared in NetBox (set {} to clear all).
- Description string
- Device
Bay doubleCount - Number of device bays on the device.
- Device
Id double - NetBox id.
- Device
Type doubleId - Id of the device type.
- Front
Port doubleCount - Number of front ports on the device.
- Interface
Count double - Number of interfaces on the device.
- Inventory
Item doubleCount - Number of inventory items on the device.
- Last
Updated string - Latitude double
- GPS coordinate in decimal format (xx.yyyyyy).
- Local
Context stringData - Local config context data as JSON text (use jsonencode()).
- Location
Id double - Id of the location within the site.
- Longitude double
- GPS coordinate in decimal format (xx.yyyyyy).
- Module
Bay doubleCount - Number of module bays on the device.
- Name string
- Device name; NetBox allows unnamed devices.
- Oob
Ip doubleId - Id of the out-of-band management IP address (managed by netboxdeviceoob_ip).
- Owner
Id double - Id of the owner the object is assigned to.
- Platform
Id double - Id of the platform.
- Power
Outlet doubleCount - Number of power outlets on the device.
- Power
Port doubleCount - Number of power ports on the device.
- Primary
Ip4Id double - Id of the primary IPv4 address (managed by netboxprimaryip).
- Primary
Ip6Id double - Id of the primary IPv6 address (managed by netboxprimaryip).
- Rack
Face string - Rack face the device is mounted on. One of: front, rear.
- Rack
Id double - Id of the rack.
- Rack
Position double - Lowest rack unit occupied by the device; half units (e.g. 1.5) are allowed.
- Rear
Port doubleCount - Number of rear ports on the device.
- Role
Id double - Id of the device role.
- Serial string
- Chassis serial number.
- Site
Id double - Id of the site.
- Status string
- Operational status. One of: offline, active, planned, staged, failed, inventory, decommissioning.
- List<string>
- Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
- List<string>
- Slugs of all tags on the object, including the provider's default_tags.
- Tenant
Id double - Id of the tenant.
- Url string
- Virtual
Chassis doubleId - Id of the virtual chassis.
- Virtual
Chassis doublePosition - Position in the virtual chassis (0-255). Must be a whole number.
- Virtual
Chassis doublePriority - Master election priority in the virtual chassis (0-255). Must be a whole number.
- Airflow string
- One of: front-to-rear, rear-to-front, left-to-right, right-to-left, side-to-rear, passive, mixed, rear-to-side, bottom-to-top, top-to-bottom.
- Asset
Tag string - Unique asset tag.
- Cluster
Id float64 - Id of the virtualization cluster the device hosts.
- Comments string
- Config
Context string - Rendered config context (localcontextdata merged with the context assigned through cluster, platform, role, site, tenant and tags) as JSON text, decode with jsondecode().
- Config
Template float64Id - Id of the config template.
- Console
Port float64Count - Number of console ports on the device.
- Console
Server float64Port Count - Number of console server ports on the device.
- Created string
- Custom
Fields map[string]string - Custom field values by field name. Every value is a string; NetBox coerces numbers and booleans. An object field holds the related object's id, e.g. "12", a multiobject field a JSON list of ids in any order, e.g. jsonencode([12, 13]). A key removed from the map is cleared in NetBox (set {} to clear all).
- Description string
- Device
Bay float64Count - Number of device bays on the device.
- Device
Id float64 - NetBox id.
- Device
Type float64Id - Id of the device type.
- Front
Port float64Count - Number of front ports on the device.
- Interface
Count float64 - Number of interfaces on the device.
- Inventory
Item float64Count - Number of inventory items on the device.
- Last
Updated string - Latitude float64
- GPS coordinate in decimal format (xx.yyyyyy).
- Local
Context stringData - Local config context data as JSON text (use jsonencode()).
- Location
Id float64 - Id of the location within the site.
- Longitude float64
- GPS coordinate in decimal format (xx.yyyyyy).
- Module
Bay float64Count - Number of module bays on the device.
- Name string
- Device name; NetBox allows unnamed devices.
- Oob
Ip float64Id - Id of the out-of-band management IP address (managed by netboxdeviceoob_ip).
- Owner
Id float64 - Id of the owner the object is assigned to.
- Platform
Id float64 - Id of the platform.
- Power
Outlet float64Count - Number of power outlets on the device.
- Power
Port float64Count - Number of power ports on the device.
- Primary
Ip4Id float64 - Id of the primary IPv4 address (managed by netboxprimaryip).
- Primary
Ip6Id float64 - Id of the primary IPv6 address (managed by netboxprimaryip).
- Rack
Face string - Rack face the device is mounted on. One of: front, rear.
- Rack
Id float64 - Id of the rack.
- Rack
Position float64 - Lowest rack unit occupied by the device; half units (e.g. 1.5) are allowed.
- Rear
Port float64Count - Number of rear ports on the device.
- Role
Id float64 - Id of the device role.
- Serial string
- Chassis serial number.
- Site
Id float64 - Id of the site.
- Status string
- Operational status. One of: offline, active, planned, staged, failed, inventory, decommissioning.
- []string
- Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
- []string
- Slugs of all tags on the object, including the provider's default_tags.
- Tenant
Id float64 - Id of the tenant.
- Url string
- Virtual
Chassis float64Id - Id of the virtual chassis.
- Virtual
Chassis float64Position - Position in the virtual chassis (0-255). Must be a whole number.
- Virtual
Chassis float64Priority - Master election priority in the virtual chassis (0-255). Must be a whole number.
- airflow string
- One of: front-to-rear, rear-to-front, left-to-right, right-to-left, side-to-rear, passive, mixed, rear-to-side, bottom-to-top, top-to-bottom.
- asset_
tag string - Unique asset tag.
- cluster_
id number - Id of the virtualization cluster the device hosts.
- comments string
- config_
context string - Rendered config context (localcontextdata merged with the context assigned through cluster, platform, role, site, tenant and tags) as JSON text, decode with jsondecode().
- config_
template_ numberid - Id of the config template.
- console_
port_ numbercount - Number of console ports on the device.
- console_
server_ numberport_ count - Number of console server ports on the device.
- created string
- custom_
fields map(string) - Custom field values by field name. Every value is a string; NetBox coerces numbers and booleans. An object field holds the related object's id, e.g. "12", a multiobject field a JSON list of ids in any order, e.g. jsonencode([12, 13]). A key removed from the map is cleared in NetBox (set {} to clear all).
- description string
- device_
bay_ numbercount - Number of device bays on the device.
- device_
id number - NetBox id.
- device_
type_ numberid - Id of the device type.
- front_
port_ numbercount - Number of front ports on the device.
- interface_
count number - Number of interfaces on the device.
- inventory_
item_ numbercount - Number of inventory items on the device.
- last_
updated string - latitude number
- GPS coordinate in decimal format (xx.yyyyyy).
- local_
context_ stringdata - Local config context data as JSON text (use jsonencode()).
- location_
id number - Id of the location within the site.
- longitude number
- GPS coordinate in decimal format (xx.yyyyyy).
- module_
bay_ numbercount - Number of module bays on the device.
- name string
- Device name; NetBox allows unnamed devices.
- oob_
ip_ numberid - Id of the out-of-band management IP address (managed by netboxdeviceoob_ip).
- owner_
id number - Id of the owner the object is assigned to.
- platform_
id number - Id of the platform.
- power_
outlet_ numbercount - Number of power outlets on the device.
- power_
port_ numbercount - Number of power ports on the device.
- primary_
ip4_ numberid - Id of the primary IPv4 address (managed by netboxprimaryip).
- primary_
ip6_ numberid - Id of the primary IPv6 address (managed by netboxprimaryip).
- rack_
face string - Rack face the device is mounted on. One of: front, rear.
- rack_
id number - Id of the rack.
- rack_
position number - Lowest rack unit occupied by the device; half units (e.g. 1.5) are allowed.
- rear_
port_ numbercount - Number of rear ports on the device.
- role_
id number - Id of the device role.
- serial string
- Chassis serial number.
- site_
id number - Id of the site.
- status string
- Operational status. One of: offline, active, planned, staged, failed, inventory, decommissioning.
- list(string)
- Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
- list(string)
- Slugs of all tags on the object, including the provider's default_tags.
- tenant_
id number - Id of the tenant.
- url string
- virtual_
chassis_ numberid - Id of the virtual chassis.
- virtual_
chassis_ numberposition - Position in the virtual chassis (0-255). Must be a whole number.
- virtual_
chassis_ numberpriority - Master election priority in the virtual chassis (0-255). Must be a whole number.
- airflow String
- One of: front-to-rear, rear-to-front, left-to-right, right-to-left, side-to-rear, passive, mixed, rear-to-side, bottom-to-top, top-to-bottom.
- asset
Tag String - Unique asset tag.
- cluster
Id Double - Id of the virtualization cluster the device hosts.
- comments String
- config
Context String - Rendered config context (localcontextdata merged with the context assigned through cluster, platform, role, site, tenant and tags) as JSON text, decode with jsondecode().
- config
Template DoubleId - Id of the config template.
- console
Port DoubleCount - Number of console ports on the device.
- console
Server DoublePort Count - Number of console server ports on the device.
- created String
- custom
Fields Map<String,String> - Custom field values by field name. Every value is a string; NetBox coerces numbers and booleans. An object field holds the related object's id, e.g. "12", a multiobject field a JSON list of ids in any order, e.g. jsonencode([12, 13]). A key removed from the map is cleared in NetBox (set {} to clear all).
- description String
- device
Bay DoubleCount - Number of device bays on the device.
- device
Id Double - NetBox id.
- device
Type DoubleId - Id of the device type.
- front
Port DoubleCount - Number of front ports on the device.
- interface
Count Double - Number of interfaces on the device.
- inventory
Item DoubleCount - Number of inventory items on the device.
- last
Updated String - latitude Double
- GPS coordinate in decimal format (xx.yyyyyy).
- local
Context StringData - Local config context data as JSON text (use jsonencode()).
- location
Id Double - Id of the location within the site.
- longitude Double
- GPS coordinate in decimal format (xx.yyyyyy).
- module
Bay DoubleCount - Number of module bays on the device.
- name String
- Device name; NetBox allows unnamed devices.
- oob
Ip DoubleId - Id of the out-of-band management IP address (managed by netboxdeviceoob_ip).
- owner
Id Double - Id of the owner the object is assigned to.
- platform
Id Double - Id of the platform.
- power
Outlet DoubleCount - Number of power outlets on the device.
- power
Port DoubleCount - Number of power ports on the device.
- primary
Ip4Id Double - Id of the primary IPv4 address (managed by netboxprimaryip).
- primary
Ip6Id Double - Id of the primary IPv6 address (managed by netboxprimaryip).
- rack
Face String - Rack face the device is mounted on. One of: front, rear.
- rack
Id Double - Id of the rack.
- rack
Position Double - Lowest rack unit occupied by the device; half units (e.g. 1.5) are allowed.
- rear
Port DoubleCount - Number of rear ports on the device.
- role
Id Double - Id of the device role.
- serial String
- Chassis serial number.
- site
Id Double - Id of the site.
- status String
- Operational status. One of: offline, active, planned, staged, failed, inventory, decommissioning.
- List<String>
- Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
- List<String>
- Slugs of all tags on the object, including the provider's default_tags.
- tenant
Id Double - Id of the tenant.
- url String
- virtual
Chassis DoubleId - Id of the virtual chassis.
- virtual
Chassis DoublePosition - Position in the virtual chassis (0-255). Must be a whole number.
- virtual
Chassis DoublePriority - Master election priority in the virtual chassis (0-255). Must be a whole number.
- airflow string
- One of: front-to-rear, rear-to-front, left-to-right, right-to-left, side-to-rear, passive, mixed, rear-to-side, bottom-to-top, top-to-bottom.
- asset
Tag string - Unique asset tag.
- cluster
Id number - Id of the virtualization cluster the device hosts.
- comments string
- config
Context string - Rendered config context (localcontextdata merged with the context assigned through cluster, platform, role, site, tenant and tags) as JSON text, decode with jsondecode().
- config
Template numberId - Id of the config template.
- console
Port numberCount - Number of console ports on the device.
- console
Server numberPort Count - Number of console server ports on the device.
- created string
- custom
Fields {[key: string]: string} - Custom field values by field name. Every value is a string; NetBox coerces numbers and booleans. An object field holds the related object's id, e.g. "12", a multiobject field a JSON list of ids in any order, e.g. jsonencode([12, 13]). A key removed from the map is cleared in NetBox (set {} to clear all).
- description string
- device
Bay numberCount - Number of device bays on the device.
- device
Id number - NetBox id.
- device
Type numberId - Id of the device type.
- front
Port numberCount - Number of front ports on the device.
- interface
Count number - Number of interfaces on the device.
- inventory
Item numberCount - Number of inventory items on the device.
- last
Updated string - latitude number
- GPS coordinate in decimal format (xx.yyyyyy).
- local
Context stringData - Local config context data as JSON text (use jsonencode()).
- location
Id number - Id of the location within the site.
- longitude number
- GPS coordinate in decimal format (xx.yyyyyy).
- module
Bay numberCount - Number of module bays on the device.
- name string
- Device name; NetBox allows unnamed devices.
- oob
Ip numberId - Id of the out-of-band management IP address (managed by netboxdeviceoob_ip).
- owner
Id number - Id of the owner the object is assigned to.
- platform
Id number - Id of the platform.
- power
Outlet numberCount - Number of power outlets on the device.
- power
Port numberCount - Number of power ports on the device.
- primary
Ip4Id number - Id of the primary IPv4 address (managed by netboxprimaryip).
- primary
Ip6Id number - Id of the primary IPv6 address (managed by netboxprimaryip).
- rack
Face string - Rack face the device is mounted on. One of: front, rear.
- rack
Id number - Id of the rack.
- rack
Position number - Lowest rack unit occupied by the device; half units (e.g. 1.5) are allowed.
- rear
Port numberCount - Number of rear ports on the device.
- role
Id number - Id of the device role.
- serial string
- Chassis serial number.
- site
Id number - Id of the site.
- status string
- Operational status. One of: offline, active, planned, staged, failed, inventory, decommissioning.
- string[]
- Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
- string[]
- Slugs of all tags on the object, including the provider's default_tags.
- tenant
Id number - Id of the tenant.
- url string
- virtual
Chassis numberId - Id of the virtual chassis.
- virtual
Chassis numberPosition - Position in the virtual chassis (0-255). Must be a whole number.
- virtual
Chassis numberPriority - Master election priority in the virtual chassis (0-255). Must be a whole number.
- airflow str
- One of: front-to-rear, rear-to-front, left-to-right, right-to-left, side-to-rear, passive, mixed, rear-to-side, bottom-to-top, top-to-bottom.
- asset_
tag str - Unique asset tag.
- cluster_
id float - Id of the virtualization cluster the device hosts.
- comments str
- config_
context str - Rendered config context (localcontextdata merged with the context assigned through cluster, platform, role, site, tenant and tags) as JSON text, decode with jsondecode().
- config_
template_ floatid - Id of the config template.
- console_
port_ floatcount - Number of console ports on the device.
- console_
server_ floatport_ count - Number of console server ports on the device.
- created str
- custom_
fields Mapping[str, str] - Custom field values by field name. Every value is a string; NetBox coerces numbers and booleans. An object field holds the related object's id, e.g. "12", a multiobject field a JSON list of ids in any order, e.g. jsonencode([12, 13]). A key removed from the map is cleared in NetBox (set {} to clear all).
- description str
- device_
bay_ floatcount - Number of device bays on the device.
- device_
id float - NetBox id.
- device_
type_ floatid - Id of the device type.
- front_
port_ floatcount - Number of front ports on the device.
- interface_
count float - Number of interfaces on the device.
- inventory_
item_ floatcount - Number of inventory items on the device.
- last_
updated str - latitude float
- GPS coordinate in decimal format (xx.yyyyyy).
- local_
context_ strdata - Local config context data as JSON text (use jsonencode()).
- location_
id float - Id of the location within the site.
- longitude float
- GPS coordinate in decimal format (xx.yyyyyy).
- module_
bay_ floatcount - Number of module bays on the device.
- name str
- Device name; NetBox allows unnamed devices.
- oob_
ip_ floatid - Id of the out-of-band management IP address (managed by netboxdeviceoob_ip).
- owner_
id float - Id of the owner the object is assigned to.
- platform_
id float - Id of the platform.
- power_
outlet_ floatcount - Number of power outlets on the device.
- power_
port_ floatcount - Number of power ports on the device.
- primary_
ip4_ floatid - Id of the primary IPv4 address (managed by netboxprimaryip).
- primary_
ip6_ floatid - Id of the primary IPv6 address (managed by netboxprimaryip).
- rack_
face str - Rack face the device is mounted on. One of: front, rear.
- rack_
id float - Id of the rack.
- rack_
position float - Lowest rack unit occupied by the device; half units (e.g. 1.5) are allowed.
- rear_
port_ floatcount - Number of rear ports on the device.
- role_
id float - Id of the device role.
- serial str
- Chassis serial number.
- site_
id float - Id of the site.
- status str
- Operational status. One of: offline, active, planned, staged, failed, inventory, decommissioning.
- Sequence[str]
- Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
- Sequence[str]
- Slugs of all tags on the object, including the provider's default_tags.
- tenant_
id float - Id of the tenant.
- url str
- virtual_
chassis_ floatid - Id of the virtual chassis.
- virtual_
chassis_ floatposition - Position in the virtual chassis (0-255). Must be a whole number.
- virtual_
chassis_ floatpriority - Master election priority in the virtual chassis (0-255). Must be a whole number.
- airflow String
- One of: front-to-rear, rear-to-front, left-to-right, right-to-left, side-to-rear, passive, mixed, rear-to-side, bottom-to-top, top-to-bottom.
- asset
Tag String - Unique asset tag.
- cluster
Id Number - Id of the virtualization cluster the device hosts.
- comments String
- config
Context String - Rendered config context (localcontextdata merged with the context assigned through cluster, platform, role, site, tenant and tags) as JSON text, decode with jsondecode().
- config
Template NumberId - Id of the config template.
- console
Port NumberCount - Number of console ports on the device.
- console
Server NumberPort Count - Number of console server ports on the device.
- created String
- custom
Fields Map<String> - Custom field values by field name. Every value is a string; NetBox coerces numbers and booleans. An object field holds the related object's id, e.g. "12", a multiobject field a JSON list of ids in any order, e.g. jsonencode([12, 13]). A key removed from the map is cleared in NetBox (set {} to clear all).
- description String
- device
Bay NumberCount - Number of device bays on the device.
- device
Id Number - NetBox id.
- device
Type NumberId - Id of the device type.
- front
Port NumberCount - Number of front ports on the device.
- interface
Count Number - Number of interfaces on the device.
- inventory
Item NumberCount - Number of inventory items on the device.
- last
Updated String - latitude Number
- GPS coordinate in decimal format (xx.yyyyyy).
- local
Context StringData - Local config context data as JSON text (use jsonencode()).
- location
Id Number - Id of the location within the site.
- longitude Number
- GPS coordinate in decimal format (xx.yyyyyy).
- module
Bay NumberCount - Number of module bays on the device.
- name String
- Device name; NetBox allows unnamed devices.
- oob
Ip NumberId - Id of the out-of-band management IP address (managed by netboxdeviceoob_ip).
- owner
Id Number - Id of the owner the object is assigned to.
- platform
Id Number - Id of the platform.
- power
Outlet NumberCount - Number of power outlets on the device.
- power
Port NumberCount - Number of power ports on the device.
- primary
Ip4Id Number - Id of the primary IPv4 address (managed by netboxprimaryip).
- primary
Ip6Id Number - Id of the primary IPv6 address (managed by netboxprimaryip).
- rack
Face String - Rack face the device is mounted on. One of: front, rear.
- rack
Id Number - Id of the rack.
- rack
Position Number - Lowest rack unit occupied by the device; half units (e.g. 1.5) are allowed.
- rear
Port NumberCount - Number of rear ports on the device.
- role
Id Number - Id of the device role.
- serial String
- Chassis serial number.
- site
Id Number - Id of the site.
- status String
- Operational status. One of: offline, active, planned, staged, failed, inventory, decommissioning.
- List<String>
- Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
- List<String>
- Slugs of all tags on the object, including the provider's default_tags.
- tenant
Id Number - Id of the tenant.
- url String
- virtual
Chassis NumberId - Id of the virtual chassis.
- virtual
Chassis NumberPosition - Position in the virtual chassis (0-255). Must be a whole number.
- virtual
Chassis NumberPriority - Master election priority in the virtual chassis (0-255). Must be a whole number.
Import
In Terraform v1.5.0 and later, the import block can be used with the id attribute, for example:
terraform
import {
to = netbox_device.test
id = “123”
}
The pulumi import command can be used, for example:
$ pulumi import netbox:index/device:Device test 123
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- netbox e-breuninger/terraform-provider-netbox
- License
- Notes
- This Pulumi package is based on the
netboxTerraform Provider.
published on Wednesday, Nov 4, 2026 by e-breuninger