1. Registry
  2. Packages
  3. Netbox Provider
  4. API Docs
  5. Device
Viewing docs for netbox 6.0.0
published on Wednesday, Nov 4, 2026 by e-breuninger
netbox
Viewing docs for netbox 6.0.0
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:

    DeviceTypeId double
    Id of the device type.
    RoleId double
    Id of the device role.
    SiteId 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.
    AssetTag string
    Unique asset tag.
    ClusterId double
    Id of the virtualization cluster the device hosts.
    Comments string
    ConfigTemplateId double
    Id of the config template.
    CustomFields 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).
    LocalContextData string
    Local config context data as JSON text (use jsonencode()).
    LocationId 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.
    OwnerId double
    Id of the owner the object is assigned to.
    PlatformId double
    Id of the platform.
    RackFace string
    Rack face the device is mounted on. One of: front, rear.
    RackId double
    Id of the rack.
    RackPosition 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.
    Tags List<string>
    Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
    TenantId double
    Id of the tenant.
    VirtualChassisId double
    Id of the virtual chassis.
    VirtualChassisPosition double
    Position in the virtual chassis (0-255). Must be a whole number.
    VirtualChassisPriority double
    Master election priority in the virtual chassis (0-255). Must be a whole number.
    DeviceTypeId float64
    Id of the device type.
    RoleId float64
    Id of the device role.
    SiteId 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.
    AssetTag string
    Unique asset tag.
    ClusterId float64
    Id of the virtualization cluster the device hosts.
    Comments string
    ConfigTemplateId float64
    Id of the config template.
    CustomFields 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).
    LocalContextData string
    Local config context data as JSON text (use jsonencode()).
    LocationId 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.
    OwnerId float64
    Id of the owner the object is assigned to.
    PlatformId float64
    Id of the platform.
    RackFace string
    Rack face the device is mounted on. One of: front, rear.
    RackId float64
    Id of the rack.
    RackPosition 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.
    Tags []string
    Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
    TenantId float64
    Id of the tenant.
    VirtualChassisId float64
    Id of the virtual chassis.
    VirtualChassisPosition float64
    Position in the virtual chassis (0-255). Must be a whole number.
    VirtualChassisPriority float64
    Master election priority in the virtual chassis (0-255). Must be a whole number.
    device_type_id number
    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_id number
    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_data string
    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.
    tags 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_id number
    Id of the virtual chassis.
    virtual_chassis_position number
    Position in the virtual chassis (0-255). Must be a whole number.
    virtual_chassis_priority number
    Master election priority in the virtual chassis (0-255). Must be a whole number.
    deviceTypeId Double
    Id of the device type.
    roleId Double
    Id of the device role.
    siteId 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.
    assetTag String
    Unique asset tag.
    clusterId Double
    Id of the virtualization cluster the device hosts.
    comments String
    configTemplateId Double
    Id of the config template.
    customFields 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).
    localContextData String
    Local config context data as JSON text (use jsonencode()).
    locationId 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.
    ownerId Double
    Id of the owner the object is assigned to.
    platformId Double
    Id of the platform.
    rackFace String
    Rack face the device is mounted on. One of: front, rear.
    rackId Double
    Id of the rack.
    rackPosition 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.
    tags List<String>
    Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
    tenantId Double
    Id of the tenant.
    virtualChassisId Double
    Id of the virtual chassis.
    virtualChassisPosition Double
    Position in the virtual chassis (0-255). Must be a whole number.
    virtualChassisPriority Double
    Master election priority in the virtual chassis (0-255). Must be a whole number.
    deviceTypeId number
    Id of the device type.
    roleId number
    Id of the device role.
    siteId 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.
    assetTag string
    Unique asset tag.
    clusterId number
    Id of the virtualization cluster the device hosts.
    comments string
    configTemplateId number
    Id of the config template.
    customFields {[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).
    localContextData string
    Local config context data as JSON text (use jsonencode()).
    locationId 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.
    ownerId number
    Id of the owner the object is assigned to.
    platformId number
    Id of the platform.
    rackFace string
    Rack face the device is mounted on. One of: front, rear.
    rackId number
    Id of the rack.
    rackPosition 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.
    tags string[]
    Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
    tenantId number
    Id of the tenant.
    virtualChassisId number
    Id of the virtual chassis.
    virtualChassisPosition number
    Position in the virtual chassis (0-255). Must be a whole number.
    virtualChassisPriority number
    Master election priority in the virtual chassis (0-255). Must be a whole number.
    device_type_id float
    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_id float
    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_data str
    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.
    tags 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_id float
    Id of the virtual chassis.
    virtual_chassis_position float
    Position in the virtual chassis (0-255). Must be a whole number.
    virtual_chassis_priority float
    Master election priority in the virtual chassis (0-255). Must be a whole number.
    deviceTypeId Number
    Id of the device type.
    roleId Number
    Id of the device role.
    siteId 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.
    assetTag String
    Unique asset tag.
    clusterId Number
    Id of the virtualization cluster the device hosts.
    comments String
    configTemplateId Number
    Id of the config template.
    customFields 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).
    localContextData String
    Local config context data as JSON text (use jsonencode()).
    locationId 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.
    ownerId Number
    Id of the owner the object is assigned to.
    platformId Number
    Id of the platform.
    rackFace String
    Rack face the device is mounted on. One of: front, rear.
    rackId Number
    Id of the rack.
    rackPosition 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.
    tags List<String>
    Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
    tenantId Number
    Id of the tenant.
    virtualChassisId Number
    Id of the virtual chassis.
    virtualChassisPosition Number
    Position in the virtual chassis (0-255). Must be a whole number.
    virtualChassisPriority Number
    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:

    ConfigContext string
    Rendered config context (localcontextdata merged with the context assigned through cluster, platform, role, site, tenant and tags) as JSON text, decode with jsondecode().
    ConsolePortCount double
    Number of console ports on the device.
    ConsoleServerPortCount double
    Number of console server ports on the device.
    Created string
    DeviceBayCount double
    Number of device bays on the device.
    DeviceId double
    NetBox id.
    FrontPortCount double
    Number of front ports on the device.
    Id string
    The provider-assigned unique ID for this managed resource.
    InterfaceCount double
    Number of interfaces on the device.
    InventoryItemCount double
    Number of inventory items on the device.
    LastUpdated string
    ModuleBayCount double
    Number of module bays on the device.
    OobIpId double
    Id of the out-of-band management IP address (managed by netboxdeviceoob_ip).
    PowerOutletCount double
    Number of power outlets on the device.
    PowerPortCount double
    Number of power ports on the device.
    PrimaryIp4Id double
    Id of the primary IPv4 address (managed by netboxprimaryip).
    PrimaryIp6Id double
    Id of the primary IPv6 address (managed by netboxprimaryip).
    RearPortCount double
    Number of rear ports on the device.
    TagsAlls List<string>
    Slugs of all tags on the object, including the provider's default_tags.
    Url string
    ConfigContext string
    Rendered config context (localcontextdata merged with the context assigned through cluster, platform, role, site, tenant and tags) as JSON text, decode with jsondecode().
    ConsolePortCount float64
    Number of console ports on the device.
    ConsoleServerPortCount float64
    Number of console server ports on the device.
    Created string
    DeviceBayCount float64
    Number of device bays on the device.
    DeviceId float64
    NetBox id.
    FrontPortCount float64
    Number of front ports on the device.
    Id string
    The provider-assigned unique ID for this managed resource.
    InterfaceCount float64
    Number of interfaces on the device.
    InventoryItemCount float64
    Number of inventory items on the device.
    LastUpdated string
    ModuleBayCount float64
    Number of module bays on the device.
    OobIpId float64
    Id of the out-of-band management IP address (managed by netboxdeviceoob_ip).
    PowerOutletCount float64
    Number of power outlets on the device.
    PowerPortCount float64
    Number of power ports on the device.
    PrimaryIp4Id float64
    Id of the primary IPv4 address (managed by netboxprimaryip).
    PrimaryIp6Id float64
    Id of the primary IPv6 address (managed by netboxprimaryip).
    RearPortCount float64
    Number of rear ports on the device.
    TagsAlls []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_count number
    Number of console ports on the device.
    console_server_port_count number
    Number of console server ports on the device.
    created string
    device_bay_count number
    Number of device bays on the device.
    device_id number
    NetBox id.
    front_port_count number
    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_count number
    Number of inventory items on the device.
    last_updated string
    module_bay_count number
    Number of module bays on the device.
    oob_ip_id number
    Id of the out-of-band management IP address (managed by netboxdeviceoob_ip).
    power_outlet_count number
    Number of power outlets on the device.
    power_port_count number
    Number of power ports on the device.
    primary_ip4_id number
    Id of the primary IPv4 address (managed by netboxprimaryip).
    primary_ip6_id number
    Id of the primary IPv6 address (managed by netboxprimaryip).
    rear_port_count number
    Number of rear ports on the device.
    tags_alls list(string)
    Slugs of all tags on the object, including the provider's default_tags.
    url string
    configContext String
    Rendered config context (localcontextdata merged with the context assigned through cluster, platform, role, site, tenant and tags) as JSON text, decode with jsondecode().
    consolePortCount Double
    Number of console ports on the device.
    consoleServerPortCount Double
    Number of console server ports on the device.
    created String
    deviceBayCount Double
    Number of device bays on the device.
    deviceId Double
    NetBox id.
    frontPortCount Double
    Number of front ports on the device.
    id String
    The provider-assigned unique ID for this managed resource.
    interfaceCount Double
    Number of interfaces on the device.
    inventoryItemCount Double
    Number of inventory items on the device.
    lastUpdated String
    moduleBayCount Double
    Number of module bays on the device.
    oobIpId Double
    Id of the out-of-band management IP address (managed by netboxdeviceoob_ip).
    powerOutletCount Double
    Number of power outlets on the device.
    powerPortCount Double
    Number of power ports on the device.
    primaryIp4Id Double
    Id of the primary IPv4 address (managed by netboxprimaryip).
    primaryIp6Id Double
    Id of the primary IPv6 address (managed by netboxprimaryip).
    rearPortCount Double
    Number of rear ports on the device.
    tagsAlls List<String>
    Slugs of all tags on the object, including the provider's default_tags.
    url String
    configContext string
    Rendered config context (localcontextdata merged with the context assigned through cluster, platform, role, site, tenant and tags) as JSON text, decode with jsondecode().
    consolePortCount number
    Number of console ports on the device.
    consoleServerPortCount number
    Number of console server ports on the device.
    created string
    deviceBayCount number
    Number of device bays on the device.
    deviceId number
    NetBox id.
    frontPortCount number
    Number of front ports on the device.
    id string
    The provider-assigned unique ID for this managed resource.
    interfaceCount number
    Number of interfaces on the device.
    inventoryItemCount number
    Number of inventory items on the device.
    lastUpdated string
    moduleBayCount number
    Number of module bays on the device.
    oobIpId number
    Id of the out-of-band management IP address (managed by netboxdeviceoob_ip).
    powerOutletCount number
    Number of power outlets on the device.
    powerPortCount number
    Number of power ports on the device.
    primaryIp4Id number
    Id of the primary IPv4 address (managed by netboxprimaryip).
    primaryIp6Id number
    Id of the primary IPv6 address (managed by netboxprimaryip).
    rearPortCount number
    Number of rear ports on the device.
    tagsAlls 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_count float
    Number of console ports on the device.
    console_server_port_count float
    Number of console server ports on the device.
    created str
    device_bay_count float
    Number of device bays on the device.
    device_id float
    NetBox id.
    front_port_count float
    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_count float
    Number of inventory items on the device.
    last_updated str
    module_bay_count float
    Number of module bays on the device.
    oob_ip_id float
    Id of the out-of-band management IP address (managed by netboxdeviceoob_ip).
    power_outlet_count float
    Number of power outlets on the device.
    power_port_count float
    Number of power ports on the device.
    primary_ip4_id float
    Id of the primary IPv4 address (managed by netboxprimaryip).
    primary_ip6_id float
    Id of the primary IPv6 address (managed by netboxprimaryip).
    rear_port_count float
    Number of rear ports on the device.
    tags_alls Sequence[str]
    Slugs of all tags on the object, including the provider's default_tags.
    url str
    configContext String
    Rendered config context (localcontextdata merged with the context assigned through cluster, platform, role, site, tenant and tags) as JSON text, decode with jsondecode().
    consolePortCount Number
    Number of console ports on the device.
    consoleServerPortCount Number
    Number of console server ports on the device.
    created String
    deviceBayCount Number
    Number of device bays on the device.
    deviceId Number
    NetBox id.
    frontPortCount Number
    Number of front ports on the device.
    id String
    The provider-assigned unique ID for this managed resource.
    interfaceCount Number
    Number of interfaces on the device.
    inventoryItemCount Number
    Number of inventory items on the device.
    lastUpdated String
    moduleBayCount Number
    Number of module bays on the device.
    oobIpId Number
    Id of the out-of-band management IP address (managed by netboxdeviceoob_ip).
    powerOutletCount Number
    Number of power outlets on the device.
    powerPortCount Number
    Number of power ports on the device.
    primaryIp4Id Number
    Id of the primary IPv4 address (managed by netboxprimaryip).
    primaryIp6Id Number
    Id of the primary IPv6 address (managed by netboxprimaryip).
    rearPortCount Number
    Number of rear ports on the device.
    tagsAlls 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) -> Device
    func 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.
    The following state arguments are supported:
    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.
    AssetTag string
    Unique asset tag.
    ClusterId double
    Id of the virtualization cluster the device hosts.
    Comments string
    ConfigContext string
    Rendered config context (localcontextdata merged with the context assigned through cluster, platform, role, site, tenant and tags) as JSON text, decode with jsondecode().
    ConfigTemplateId double
    Id of the config template.
    ConsolePortCount double
    Number of console ports on the device.
    ConsoleServerPortCount double
    Number of console server ports on the device.
    Created string
    CustomFields 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
    DeviceBayCount double
    Number of device bays on the device.
    DeviceId double
    NetBox id.
    DeviceTypeId double
    Id of the device type.
    FrontPortCount double
    Number of front ports on the device.
    InterfaceCount double
    Number of interfaces on the device.
    InventoryItemCount double
    Number of inventory items on the device.
    LastUpdated string
    Latitude double
    GPS coordinate in decimal format (xx.yyyyyy).
    LocalContextData string
    Local config context data as JSON text (use jsonencode()).
    LocationId double
    Id of the location within the site.
    Longitude double
    GPS coordinate in decimal format (xx.yyyyyy).
    ModuleBayCount double
    Number of module bays on the device.
    Name string
    Device name; NetBox allows unnamed devices.
    OobIpId double
    Id of the out-of-band management IP address (managed by netboxdeviceoob_ip).
    OwnerId double
    Id of the owner the object is assigned to.
    PlatformId double
    Id of the platform.
    PowerOutletCount double
    Number of power outlets on the device.
    PowerPortCount double
    Number of power ports on the device.
    PrimaryIp4Id double
    Id of the primary IPv4 address (managed by netboxprimaryip).
    PrimaryIp6Id double
    Id of the primary IPv6 address (managed by netboxprimaryip).
    RackFace string
    Rack face the device is mounted on. One of: front, rear.
    RackId double
    Id of the rack.
    RackPosition double
    Lowest rack unit occupied by the device; half units (e.g. 1.5) are allowed.
    RearPortCount double
    Number of rear ports on the device.
    RoleId double
    Id of the device role.
    Serial string
    Chassis serial number.
    SiteId double
    Id of the site.
    Status string
    Operational status. One of: offline, active, planned, staged, failed, inventory, decommissioning.
    Tags List<string>
    Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
    TagsAlls List<string>
    Slugs of all tags on the object, including the provider's default_tags.
    TenantId double
    Id of the tenant.
    Url string
    VirtualChassisId double
    Id of the virtual chassis.
    VirtualChassisPosition double
    Position in the virtual chassis (0-255). Must be a whole number.
    VirtualChassisPriority double
    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.
    AssetTag string
    Unique asset tag.
    ClusterId float64
    Id of the virtualization cluster the device hosts.
    Comments string
    ConfigContext string
    Rendered config context (localcontextdata merged with the context assigned through cluster, platform, role, site, tenant and tags) as JSON text, decode with jsondecode().
    ConfigTemplateId float64
    Id of the config template.
    ConsolePortCount float64
    Number of console ports on the device.
    ConsoleServerPortCount float64
    Number of console server ports on the device.
    Created string
    CustomFields 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
    DeviceBayCount float64
    Number of device bays on the device.
    DeviceId float64
    NetBox id.
    DeviceTypeId float64
    Id of the device type.
    FrontPortCount float64
    Number of front ports on the device.
    InterfaceCount float64
    Number of interfaces on the device.
    InventoryItemCount float64
    Number of inventory items on the device.
    LastUpdated string
    Latitude float64
    GPS coordinate in decimal format (xx.yyyyyy).
    LocalContextData string
    Local config context data as JSON text (use jsonencode()).
    LocationId float64
    Id of the location within the site.
    Longitude float64
    GPS coordinate in decimal format (xx.yyyyyy).
    ModuleBayCount float64
    Number of module bays on the device.
    Name string
    Device name; NetBox allows unnamed devices.
    OobIpId float64
    Id of the out-of-band management IP address (managed by netboxdeviceoob_ip).
    OwnerId float64
    Id of the owner the object is assigned to.
    PlatformId float64
    Id of the platform.
    PowerOutletCount float64
    Number of power outlets on the device.
    PowerPortCount float64
    Number of power ports on the device.
    PrimaryIp4Id float64
    Id of the primary IPv4 address (managed by netboxprimaryip).
    PrimaryIp6Id float64
    Id of the primary IPv6 address (managed by netboxprimaryip).
    RackFace string
    Rack face the device is mounted on. One of: front, rear.
    RackId float64
    Id of the rack.
    RackPosition float64
    Lowest rack unit occupied by the device; half units (e.g. 1.5) are allowed.
    RearPortCount float64
    Number of rear ports on the device.
    RoleId float64
    Id of the device role.
    Serial string
    Chassis serial number.
    SiteId float64
    Id of the site.
    Status string
    Operational status. One of: offline, active, planned, staged, failed, inventory, decommissioning.
    Tags []string
    Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
    TagsAlls []string
    Slugs of all tags on the object, including the provider's default_tags.
    TenantId float64
    Id of the tenant.
    Url string
    VirtualChassisId float64
    Id of the virtual chassis.
    VirtualChassisPosition float64
    Position in the virtual chassis (0-255). Must be a whole number.
    VirtualChassisPriority float64
    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_id number
    Id of the config template.
    console_port_count number
    Number of console ports on the device.
    console_server_port_count number
    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_count number
    Number of device bays on the device.
    device_id number
    NetBox id.
    device_type_id number
    Id of the device type.
    front_port_count number
    Number of front ports on the device.
    interface_count number
    Number of interfaces on the device.
    inventory_item_count number
    Number of inventory items on the device.
    last_updated string
    latitude number
    GPS coordinate in decimal format (xx.yyyyyy).
    local_context_data string
    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_count number
    Number of module bays on the device.
    name string
    Device name; NetBox allows unnamed devices.
    oob_ip_id number
    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_count number
    Number of power outlets on the device.
    power_port_count number
    Number of power ports on the device.
    primary_ip4_id number
    Id of the primary IPv4 address (managed by netboxprimaryip).
    primary_ip6_id 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_count number
    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.
    tags list(string)
    Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
    tags_alls 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_id number
    Id of the virtual chassis.
    virtual_chassis_position number
    Position in the virtual chassis (0-255). Must be a whole number.
    virtual_chassis_priority number
    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.
    assetTag String
    Unique asset tag.
    clusterId Double
    Id of the virtualization cluster the device hosts.
    comments String
    configContext String
    Rendered config context (localcontextdata merged with the context assigned through cluster, platform, role, site, tenant and tags) as JSON text, decode with jsondecode().
    configTemplateId Double
    Id of the config template.
    consolePortCount Double
    Number of console ports on the device.
    consoleServerPortCount Double
    Number of console server ports on the device.
    created String
    customFields 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
    deviceBayCount Double
    Number of device bays on the device.
    deviceId Double
    NetBox id.
    deviceTypeId Double
    Id of the device type.
    frontPortCount Double
    Number of front ports on the device.
    interfaceCount Double
    Number of interfaces on the device.
    inventoryItemCount Double
    Number of inventory items on the device.
    lastUpdated String
    latitude Double
    GPS coordinate in decimal format (xx.yyyyyy).
    localContextData String
    Local config context data as JSON text (use jsonencode()).
    locationId Double
    Id of the location within the site.
    longitude Double
    GPS coordinate in decimal format (xx.yyyyyy).
    moduleBayCount Double
    Number of module bays on the device.
    name String
    Device name; NetBox allows unnamed devices.
    oobIpId Double
    Id of the out-of-band management IP address (managed by netboxdeviceoob_ip).
    ownerId Double
    Id of the owner the object is assigned to.
    platformId Double
    Id of the platform.
    powerOutletCount Double
    Number of power outlets on the device.
    powerPortCount Double
    Number of power ports on the device.
    primaryIp4Id Double
    Id of the primary IPv4 address (managed by netboxprimaryip).
    primaryIp6Id Double
    Id of the primary IPv6 address (managed by netboxprimaryip).
    rackFace String
    Rack face the device is mounted on. One of: front, rear.
    rackId Double
    Id of the rack.
    rackPosition Double
    Lowest rack unit occupied by the device; half units (e.g. 1.5) are allowed.
    rearPortCount Double
    Number of rear ports on the device.
    roleId Double
    Id of the device role.
    serial String
    Chassis serial number.
    siteId Double
    Id of the site.
    status String
    Operational status. One of: offline, active, planned, staged, failed, inventory, decommissioning.
    tags List<String>
    Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
    tagsAlls List<String>
    Slugs of all tags on the object, including the provider's default_tags.
    tenantId Double
    Id of the tenant.
    url String
    virtualChassisId Double
    Id of the virtual chassis.
    virtualChassisPosition Double
    Position in the virtual chassis (0-255). Must be a whole number.
    virtualChassisPriority Double
    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.
    assetTag string
    Unique asset tag.
    clusterId number
    Id of the virtualization cluster the device hosts.
    comments string
    configContext string
    Rendered config context (localcontextdata merged with the context assigned through cluster, platform, role, site, tenant and tags) as JSON text, decode with jsondecode().
    configTemplateId number
    Id of the config template.
    consolePortCount number
    Number of console ports on the device.
    consoleServerPortCount number
    Number of console server ports on the device.
    created string
    customFields {[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
    deviceBayCount number
    Number of device bays on the device.
    deviceId number
    NetBox id.
    deviceTypeId number
    Id of the device type.
    frontPortCount number
    Number of front ports on the device.
    interfaceCount number
    Number of interfaces on the device.
    inventoryItemCount number
    Number of inventory items on the device.
    lastUpdated string
    latitude number
    GPS coordinate in decimal format (xx.yyyyyy).
    localContextData string
    Local config context data as JSON text (use jsonencode()).
    locationId number
    Id of the location within the site.
    longitude number
    GPS coordinate in decimal format (xx.yyyyyy).
    moduleBayCount number
    Number of module bays on the device.
    name string
    Device name; NetBox allows unnamed devices.
    oobIpId number
    Id of the out-of-band management IP address (managed by netboxdeviceoob_ip).
    ownerId number
    Id of the owner the object is assigned to.
    platformId number
    Id of the platform.
    powerOutletCount number
    Number of power outlets on the device.
    powerPortCount number
    Number of power ports on the device.
    primaryIp4Id number
    Id of the primary IPv4 address (managed by netboxprimaryip).
    primaryIp6Id number
    Id of the primary IPv6 address (managed by netboxprimaryip).
    rackFace string
    Rack face the device is mounted on. One of: front, rear.
    rackId number
    Id of the rack.
    rackPosition number
    Lowest rack unit occupied by the device; half units (e.g. 1.5) are allowed.
    rearPortCount number
    Number of rear ports on the device.
    roleId number
    Id of the device role.
    serial string
    Chassis serial number.
    siteId number
    Id of the site.
    status string
    Operational status. One of: offline, active, planned, staged, failed, inventory, decommissioning.
    tags string[]
    Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
    tagsAlls string[]
    Slugs of all tags on the object, including the provider's default_tags.
    tenantId number
    Id of the tenant.
    url string
    virtualChassisId number
    Id of the virtual chassis.
    virtualChassisPosition number
    Position in the virtual chassis (0-255). Must be a whole number.
    virtualChassisPriority number
    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_id float
    Id of the config template.
    console_port_count float
    Number of console ports on the device.
    console_server_port_count float
    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_count float
    Number of device bays on the device.
    device_id float
    NetBox id.
    device_type_id float
    Id of the device type.
    front_port_count float
    Number of front ports on the device.
    interface_count float
    Number of interfaces on the device.
    inventory_item_count float
    Number of inventory items on the device.
    last_updated str
    latitude float
    GPS coordinate in decimal format (xx.yyyyyy).
    local_context_data str
    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_count float
    Number of module bays on the device.
    name str
    Device name; NetBox allows unnamed devices.
    oob_ip_id float
    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_count float
    Number of power outlets on the device.
    power_port_count float
    Number of power ports on the device.
    primary_ip4_id float
    Id of the primary IPv4 address (managed by netboxprimaryip).
    primary_ip6_id float
    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_count float
    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.
    tags Sequence[str]
    Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
    tags_alls 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_id float
    Id of the virtual chassis.
    virtual_chassis_position float
    Position in the virtual chassis (0-255). Must be a whole number.
    virtual_chassis_priority float
    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.
    assetTag String
    Unique asset tag.
    clusterId Number
    Id of the virtualization cluster the device hosts.
    comments String
    configContext String
    Rendered config context (localcontextdata merged with the context assigned through cluster, platform, role, site, tenant and tags) as JSON text, decode with jsondecode().
    configTemplateId Number
    Id of the config template.
    consolePortCount Number
    Number of console ports on the device.
    consoleServerPortCount Number
    Number of console server ports on the device.
    created String
    customFields 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
    deviceBayCount Number
    Number of device bays on the device.
    deviceId Number
    NetBox id.
    deviceTypeId Number
    Id of the device type.
    frontPortCount Number
    Number of front ports on the device.
    interfaceCount Number
    Number of interfaces on the device.
    inventoryItemCount Number
    Number of inventory items on the device.
    lastUpdated String
    latitude Number
    GPS coordinate in decimal format (xx.yyyyyy).
    localContextData String
    Local config context data as JSON text (use jsonencode()).
    locationId Number
    Id of the location within the site.
    longitude Number
    GPS coordinate in decimal format (xx.yyyyyy).
    moduleBayCount Number
    Number of module bays on the device.
    name String
    Device name; NetBox allows unnamed devices.
    oobIpId Number
    Id of the out-of-band management IP address (managed by netboxdeviceoob_ip).
    ownerId Number
    Id of the owner the object is assigned to.
    platformId Number
    Id of the platform.
    powerOutletCount Number
    Number of power outlets on the device.
    powerPortCount Number
    Number of power ports on the device.
    primaryIp4Id Number
    Id of the primary IPv4 address (managed by netboxprimaryip).
    primaryIp6Id Number
    Id of the primary IPv6 address (managed by netboxprimaryip).
    rackFace String
    Rack face the device is mounted on. One of: front, rear.
    rackId Number
    Id of the rack.
    rackPosition Number
    Lowest rack unit occupied by the device; half units (e.g. 1.5) are allowed.
    rearPortCount Number
    Number of rear ports on the device.
    roleId Number
    Id of the device role.
    serial String
    Chassis serial number.
    siteId Number
    Id of the site.
    status String
    Operational status. One of: offline, active, planned, staged, failed, inventory, decommissioning.
    tags List<String>
    Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
    tagsAlls List<String>
    Slugs of all tags on the object, including the provider's default_tags.
    tenantId Number
    Id of the tenant.
    url String
    virtualChassisId Number
    Id of the virtual chassis.
    virtualChassisPosition Number
    Position in the virtual chassis (0-255). Must be a whole number.
    virtualChassisPriority Number
    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 netbox Terraform Provider.
    netbox
    Viewing docs for netbox 6.0.0
    published on Wednesday, Nov 4, 2026 by e-breuninger

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial