published on Wednesday, Nov 4, 2026 by e-breuninger
published on Wednesday, Nov 4, 2026 by e-breuninger
An inventory item on a device (dcim.inventoryitem).
From the official documentation:
Inventory items represent hardware components installed within a device, such as a power supply or CPU or line card. They are intended to be used primarily for inventory purposes.
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 testDevice = new netbox.Device("test", {
name: "test-device",
deviceTypeId: testDeviceType.deviceTypeId,
roleId: testDeviceRole.deviceRoleId,
siteId: test.siteId,
});
const testInventoryItemRole = new netbox.InventoryItemRole("test", {
name: "test-inventory-item-role",
colorHex: "00ff00",
});
const testInventoryItem = new netbox.InventoryItem("test", {
deviceId: testDevice.deviceId,
name: "test-inventory-item",
roleId: testInventoryItemRole.inventoryItemRoleId,
manufacturerId: testManufacturer.manufacturerId,
partId: "test-part-id",
serial: "test-serial",
assetTag: "test-asset-tag",
description: "test-description",
});
import pulumi
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_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)
test_inventory_item_role = netbox.InventoryItemRole("test",
name="test-inventory-item-role",
color_hex="00ff00")
test_inventory_item = netbox.InventoryItem("test",
device_id=test_device.device_id,
name="test-inventory-item",
role_id=test_inventory_item_role.inventory_item_role_id,
manufacturer_id=test_manufacturer.manufacturer_id,
part_id="test-part-id",
serial="test-serial",
asset_tag="test-asset-tag",
description="test-description")
package main
import (
"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
}
testDevice, err := netbox.NewDevice(ctx, "test", &netbox.DeviceArgs{
Name: pulumi.String("test-device"),
DeviceTypeId: testDeviceType.DeviceTypeId,
RoleId: testDeviceRole.DeviceRoleId,
SiteId: test.SiteId,
})
if err != nil {
return err
}
testInventoryItemRole, err := netbox.NewInventoryItemRole(ctx, "test", &netbox.InventoryItemRoleArgs{
Name: pulumi.String("test-inventory-item-role"),
ColorHex: pulumi.String("00ff00"),
})
if err != nil {
return err
}
_, err = netbox.NewInventoryItem(ctx, "test", &netbox.InventoryItemArgs{
DeviceId: testDevice.DeviceId,
Name: pulumi.String("test-inventory-item"),
RoleId: testInventoryItemRole.InventoryItemRoleId,
ManufacturerId: testManufacturer.ManufacturerId,
PartId: pulumi.String("test-part-id"),
Serial: pulumi.String("test-serial"),
AssetTag: pulumi.String("test-asset-tag"),
Description: pulumi.String("test-description"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
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 testDevice = new Netbox.Device("test", new()
{
Name = "test-device",
DeviceTypeId = testDeviceType.DeviceTypeId,
RoleId = testDeviceRole.DeviceRoleId,
SiteId = test.SiteId,
});
var testInventoryItemRole = new Netbox.InventoryItemRole("test", new()
{
Name = "test-inventory-item-role",
ColorHex = "00ff00",
});
var testInventoryItem = new Netbox.InventoryItem("test", new()
{
DeviceId = testDevice.DeviceId,
Name = "test-inventory-item",
RoleId = testInventoryItemRole.InventoryItemRoleId,
ManufacturerId = testManufacturer.ManufacturerId,
PartId = "test-part-id",
Serial = "test-serial",
AssetTag = "test-asset-tag",
Description = "test-description",
});
});
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.Device;
import com.pulumi.netbox.DeviceArgs;
import com.pulumi.netbox.InventoryItemRole;
import com.pulumi.netbox.InventoryItemRoleArgs;
import com.pulumi.netbox.InventoryItem;
import com.pulumi.netbox.InventoryItemArgs;
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 testDevice = new Device("testDevice", DeviceArgs.builder()
.name("test-device")
.deviceTypeId(testDeviceType.deviceTypeId())
.roleId(testDeviceRole.deviceRoleId())
.siteId(test.siteId())
.build());
var testInventoryItemRole = new InventoryItemRole("testInventoryItemRole", InventoryItemRoleArgs.builder()
.name("test-inventory-item-role")
.colorHex("00ff00")
.build());
var testInventoryItem = new InventoryItem("testInventoryItem", InventoryItemArgs.builder()
.deviceId(testDevice.deviceId())
.name("test-inventory-item")
.roleId(testInventoryItemRole.inventoryItemRoleId())
.manufacturerId(testManufacturer.manufacturerId())
.partId("test-part-id")
.serial("test-serial")
.assetTag("test-asset-tag")
.description("test-description")
.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
testDevice:
type: netbox:Device
name: test
properties:
name: test-device
deviceTypeId: ${testDeviceType.deviceTypeId}
roleId: ${testDeviceRole.deviceRoleId}
siteId: ${test.siteId}
testInventoryItemRole:
type: netbox:InventoryItemRole
name: test
properties:
name: test-inventory-item-role
colorHex: 00ff00
testInventoryItem:
type: netbox:InventoryItem
name: test
properties:
deviceId: ${testDevice.deviceId}
name: test-inventory-item
roleId: ${testInventoryItemRole.inventoryItemRoleId}
manufacturerId: ${testManufacturer.manufacturerId}
partId: test-part-id
serial: test-serial
assetTag: test-asset-tag
description: test-description
Example coming soon!
Create InventoryItem Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new InventoryItem(name: string, args: InventoryItemArgs, opts?: CustomResourceOptions);@overload
def InventoryItem(resource_name: str,
args: InventoryItemArgs,
opts: Optional[ResourceOptions] = None)
@overload
def InventoryItem(resource_name: str,
opts: Optional[ResourceOptions] = None,
device_id: Optional[float] = None,
manufacturer_id: Optional[float] = None,
owner_id: Optional[float] = None,
custom_fields: Optional[Mapping[str, str]] = None,
description: Optional[str] = None,
component_id: Optional[float] = None,
discovered: Optional[bool] = None,
component_type: Optional[str] = None,
label: Optional[str] = None,
name: Optional[str] = None,
asset_tag: Optional[str] = None,
parent_id: Optional[float] = None,
part_id: Optional[str] = None,
role_id: Optional[float] = None,
serial: Optional[str] = None,
status: Optional[str] = None,
tags: Optional[Sequence[str]] = None)func NewInventoryItem(ctx *Context, name string, args InventoryItemArgs, opts ...ResourceOption) (*InventoryItem, error)public InventoryItem(string name, InventoryItemArgs args, CustomResourceOptions? opts = null)
public InventoryItem(String name, InventoryItemArgs args)
public InventoryItem(String name, InventoryItemArgs args, CustomResourceOptions options)
type: netbox:InventoryItem
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "netbox_inventory_item" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args InventoryItemArgs
- 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 InventoryItemArgs
- 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 InventoryItemArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args InventoryItemArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args InventoryItemArgs
- 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 inventoryItemResource = new Netbox.InventoryItem("inventoryItemResource", new()
{
DeviceId = 0.0,
ManufacturerId = 0.0,
OwnerId = 0.0,
CustomFields =
{
{ "string", "string" },
},
Description = "string",
ComponentId = 0.0,
Discovered = false,
ComponentType = "string",
Label = "string",
Name = "string",
AssetTag = "string",
ParentId = 0.0,
PartId = "string",
RoleId = 0.0,
Serial = "string",
Status = "string",
Tags = new[]
{
"string",
},
});
example, err := netbox.NewInventoryItem(ctx, "inventoryItemResource", &netbox.InventoryItemArgs{
DeviceId: pulumi.Float64(0),
ManufacturerId: pulumi.Float64(0),
OwnerId: pulumi.Float64(0),
CustomFields: pulumi.StringMap{
"string": pulumi.String("string"),
},
Description: pulumi.String("string"),
ComponentId: pulumi.Float64(0),
Discovered: pulumi.Bool(false),
ComponentType: pulumi.String("string"),
Label: pulumi.String("string"),
Name: pulumi.String("string"),
AssetTag: pulumi.String("string"),
ParentId: pulumi.Float64(0),
PartId: pulumi.String("string"),
RoleId: pulumi.Float64(0),
Serial: pulumi.String("string"),
Status: pulumi.String("string"),
Tags: pulumi.StringArray{
pulumi.String("string"),
},
})
resource "netbox_inventory_item" "inventoryItemResource" {
lifecycle {
create_before_destroy = true
}
device_id = 0
manufacturer_id = 0
owner_id = 0
custom_fields = {
"string" = "string"
}
description = "string"
component_id = 0
discovered = false
component_type = "string"
label = "string"
name = "string"
asset_tag = "string"
parent_id = 0
part_id = "string"
role_id = 0
serial = "string"
status = "string"
tags = ["string"]
}
var inventoryItemResource = new InventoryItem("inventoryItemResource", InventoryItemArgs.builder()
.deviceId(0.0)
.manufacturerId(0.0)
.ownerId(0.0)
.customFields(Map.of("string", "string"))
.description("string")
.componentId(0.0)
.discovered(false)
.componentType("string")
.label("string")
.name("string")
.assetTag("string")
.parentId(0.0)
.partId("string")
.roleId(0.0)
.serial("string")
.status("string")
.tags("string")
.build());
inventory_item_resource = netbox.InventoryItem("inventoryItemResource",
device_id=float(0),
manufacturer_id=float(0),
owner_id=float(0),
custom_fields={
"string": "string",
},
description="string",
component_id=float(0),
discovered=False,
component_type="string",
label="string",
name="string",
asset_tag="string",
parent_id=float(0),
part_id="string",
role_id=float(0),
serial="string",
status="string",
tags=["string"])
const inventoryItemResource = new netbox.InventoryItem("inventoryItemResource", {
deviceId: 0,
manufacturerId: 0,
ownerId: 0,
customFields: {
string: "string",
},
description: "string",
componentId: 0,
discovered: false,
componentType: "string",
label: "string",
name: "string",
assetTag: "string",
parentId: 0,
partId: "string",
roleId: 0,
serial: "string",
status: "string",
tags: ["string"],
});
type: netbox:InventoryItem
properties:
assetTag: string
componentId: 0
componentType: string
customFields:
string: string
description: string
deviceId: 0
discovered: false
label: string
manufacturerId: 0
name: string
ownerId: 0
parentId: 0
partId: string
roleId: 0
serial: string
status: string
tags:
- string
InventoryItem 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 InventoryItem resource accepts the following input properties:
- Device
Id double - Id of the device.
- Asset
Tag string - Unique asset tag.
- Component
Id double - Id of the device component named by component_type.
- Component
Type string - Type of the device component the item is bound to, e.g. dcim.interface. Requires component_id.
- 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
- Discovered bool
- Whether the item was discovered automatically.
- Label string
- Physical label.
- Manufacturer
Id double - Id of the manufacturer.
- Name string
- Owner
Id double - Id of the owner the object is assigned to.
- Parent
Id double - Id of the parent inventory item.
- Part
Id string - Manufacturer part number.
- Role
Id double - Id of the inventory item role.
- Serial string
- Serial number.
- Status string
- Operational status. One of: offline, active, planned, staged, failed, decommissioning.
- List<string>
- Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
- Device
Id float64 - Id of the device.
- Asset
Tag string - Unique asset tag.
- Component
Id float64 - Id of the device component named by component_type.
- Component
Type string - Type of the device component the item is bound to, e.g. dcim.interface. Requires component_id.
- 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
- Discovered bool
- Whether the item was discovered automatically.
- Label string
- Physical label.
- Manufacturer
Id float64 - Id of the manufacturer.
- Name string
- Owner
Id float64 - Id of the owner the object is assigned to.
- Parent
Id float64 - Id of the parent inventory item.
- Part
Id string - Manufacturer part number.
- Role
Id float64 - Id of the inventory item role.
- Serial string
- Serial number.
- Status string
- Operational status. One of: offline, active, planned, staged, failed, decommissioning.
- []string
- Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
- device_
id number - Id of the device.
- asset_
tag string - Unique asset tag.
- component_
id number - Id of the device component named by component_type.
- component_
type string - Type of the device component the item is bound to, e.g. dcim.interface. Requires component_id.
- 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
- discovered bool
- Whether the item was discovered automatically.
- label string
- Physical label.
- manufacturer_
id number - Id of the manufacturer.
- name string
- owner_
id number - Id of the owner the object is assigned to.
- parent_
id number - Id of the parent inventory item.
- part_
id string - Manufacturer part number.
- role_
id number - Id of the inventory item role.
- serial string
- Serial number.
- status string
- Operational status. One of: offline, active, planned, staged, failed, decommissioning.
- list(string)
- Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
- device
Id Double - Id of the device.
- asset
Tag String - Unique asset tag.
- component
Id Double - Id of the device component named by component_type.
- component
Type String - Type of the device component the item is bound to, e.g. dcim.interface. Requires component_id.
- 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
- discovered Boolean
- Whether the item was discovered automatically.
- label String
- Physical label.
- manufacturer
Id Double - Id of the manufacturer.
- name String
- owner
Id Double - Id of the owner the object is assigned to.
- parent
Id Double - Id of the parent inventory item.
- part
Id String - Manufacturer part number.
- role
Id Double - Id of the inventory item role.
- serial String
- Serial number.
- status String
- Operational status. One of: offline, active, planned, staged, failed, decommissioning.
- List<String>
- Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
- device
Id number - Id of the device.
- asset
Tag string - Unique asset tag.
- component
Id number - Id of the device component named by component_type.
- component
Type string - Type of the device component the item is bound to, e.g. dcim.interface. Requires component_id.
- 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
- discovered boolean
- Whether the item was discovered automatically.
- label string
- Physical label.
- manufacturer
Id number - Id of the manufacturer.
- name string
- owner
Id number - Id of the owner the object is assigned to.
- parent
Id number - Id of the parent inventory item.
- part
Id string - Manufacturer part number.
- role
Id number - Id of the inventory item role.
- serial string
- Serial number.
- status string
- Operational status. One of: offline, active, planned, staged, failed, decommissioning.
- string[]
- Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
- device_
id float - Id of the device.
- asset_
tag str - Unique asset tag.
- component_
id float - Id of the device component named by component_type.
- component_
type str - Type of the device component the item is bound to, e.g. dcim.interface. Requires component_id.
- 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
- discovered bool
- Whether the item was discovered automatically.
- label str
- Physical label.
- manufacturer_
id float - Id of the manufacturer.
- name str
- owner_
id float - Id of the owner the object is assigned to.
- parent_
id float - Id of the parent inventory item.
- part_
id str - Manufacturer part number.
- role_
id float - Id of the inventory item role.
- serial str
- Serial number.
- status str
- Operational status. One of: offline, active, planned, staged, failed, decommissioning.
- Sequence[str]
- Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
- device
Id Number - Id of the device.
- asset
Tag String - Unique asset tag.
- component
Id Number - Id of the device component named by component_type.
- component
Type String - Type of the device component the item is bound to, e.g. dcim.interface. Requires component_id.
- 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
- discovered Boolean
- Whether the item was discovered automatically.
- label String
- Physical label.
- manufacturer
Id Number - Id of the manufacturer.
- name String
- owner
Id Number - Id of the owner the object is assigned to.
- parent
Id Number - Id of the parent inventory item.
- part
Id String - Manufacturer part number.
- role
Id Number - Id of the inventory item role.
- serial String
- Serial number.
- status String
- Operational status. One of: offline, active, planned, staged, failed, decommissioning.
- List<String>
- Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
Outputs
All input properties are implicitly available as output properties. Additionally, the InventoryItem resource produces the following output properties:
- Created string
- Id string
- The provider-assigned unique ID for this managed resource.
- Inventory
Item doubleId - NetBox id.
- Last
Updated string - List<string>
- Slugs of all tags on the object, including the provider's default_tags.
- Url string
- Created string
- Id string
- The provider-assigned unique ID for this managed resource.
- Inventory
Item float64Id - NetBox id.
- Last
Updated string - []string
- Slugs of all tags on the object, including the provider's default_tags.
- Url string
- created string
- id string
- The provider-assigned unique ID for this managed resource.
- inventory_
item_ numberid - NetBox id.
- last_
updated string - list(string)
- Slugs of all tags on the object, including the provider's default_tags.
- url string
- created String
- id String
- The provider-assigned unique ID for this managed resource.
- inventory
Item DoubleId - NetBox id.
- last
Updated String - List<String>
- Slugs of all tags on the object, including the provider's default_tags.
- url String
- created string
- id string
- The provider-assigned unique ID for this managed resource.
- inventory
Item numberId - NetBox id.
- last
Updated string - string[]
- Slugs of all tags on the object, including the provider's default_tags.
- url string
- created str
- id str
- The provider-assigned unique ID for this managed resource.
- inventory_
item_ floatid - NetBox id.
- last_
updated str - Sequence[str]
- Slugs of all tags on the object, including the provider's default_tags.
- url str
- created String
- id String
- The provider-assigned unique ID for this managed resource.
- inventory
Item NumberId - NetBox id.
- last
Updated String - List<String>
- Slugs of all tags on the object, including the provider's default_tags.
- url String
Look up Existing InventoryItem Resource
Get an existing InventoryItem 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?: InventoryItemState, opts?: CustomResourceOptions): InventoryItem@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
asset_tag: Optional[str] = None,
component_id: Optional[float] = None,
component_type: Optional[str] = None,
created: Optional[str] = None,
custom_fields: Optional[Mapping[str, str]] = None,
description: Optional[str] = None,
device_id: Optional[float] = None,
discovered: Optional[bool] = None,
inventory_item_id: Optional[float] = None,
label: Optional[str] = None,
last_updated: Optional[str] = None,
manufacturer_id: Optional[float] = None,
name: Optional[str] = None,
owner_id: Optional[float] = None,
parent_id: Optional[float] = None,
part_id: Optional[str] = None,
role_id: Optional[float] = None,
serial: Optional[str] = None,
status: Optional[str] = None,
tags: Optional[Sequence[str]] = None,
tags_alls: Optional[Sequence[str]] = None,
url: Optional[str] = None) -> InventoryItemfunc GetInventoryItem(ctx *Context, name string, id IDInput, state *InventoryItemState, opts ...ResourceOption) (*InventoryItem, error)public static InventoryItem Get(string name, Input<string> id, InventoryItemState? state, CustomResourceOptions? opts = null)public static InventoryItem get(String name, Output<String> id, InventoryItemState state, CustomResourceOptions options)resources: _: type: netbox:InventoryItem get: id: ${id}import {
to = netbox_inventory_item.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.
- Asset
Tag string - Unique asset tag.
- Component
Id double - Id of the device component named by component_type.
- Component
Type string - Type of the device component the item is bound to, e.g. dcim.interface. Requires component_id.
- 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
Id double - Id of the device.
- Discovered bool
- Whether the item was discovered automatically.
- Inventory
Item doubleId - NetBox id.
- Label string
- Physical label.
- Last
Updated string - Manufacturer
Id double - Id of the manufacturer.
- Name string
- Owner
Id double - Id of the owner the object is assigned to.
- Parent
Id double - Id of the parent inventory item.
- Part
Id string - Manufacturer part number.
- Role
Id double - Id of the inventory item role.
- Serial string
- Serial number.
- Status string
- Operational status. One of: offline, active, planned, staged, failed, 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.
- Url string
- Asset
Tag string - Unique asset tag.
- Component
Id float64 - Id of the device component named by component_type.
- Component
Type string - Type of the device component the item is bound to, e.g. dcim.interface. Requires component_id.
- 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
Id float64 - Id of the device.
- Discovered bool
- Whether the item was discovered automatically.
- Inventory
Item float64Id - NetBox id.
- Label string
- Physical label.
- Last
Updated string - Manufacturer
Id float64 - Id of the manufacturer.
- Name string
- Owner
Id float64 - Id of the owner the object is assigned to.
- Parent
Id float64 - Id of the parent inventory item.
- Part
Id string - Manufacturer part number.
- Role
Id float64 - Id of the inventory item role.
- Serial string
- Serial number.
- Status string
- Operational status. One of: offline, active, planned, staged, failed, 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.
- Url string
- asset_
tag string - Unique asset tag.
- component_
id number - Id of the device component named by component_type.
- component_
type string - Type of the device component the item is bound to, e.g. dcim.interface. Requires component_id.
- 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_
id number - Id of the device.
- discovered bool
- Whether the item was discovered automatically.
- inventory_
item_ numberid - NetBox id.
- label string
- Physical label.
- last_
updated string - manufacturer_
id number - Id of the manufacturer.
- name string
- owner_
id number - Id of the owner the object is assigned to.
- parent_
id number - Id of the parent inventory item.
- part_
id string - Manufacturer part number.
- role_
id number - Id of the inventory item role.
- serial string
- Serial number.
- status string
- Operational status. One of: offline, active, planned, staged, failed, 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.
- url string
- asset
Tag String - Unique asset tag.
- component
Id Double - Id of the device component named by component_type.
- component
Type String - Type of the device component the item is bound to, e.g. dcim.interface. Requires component_id.
- 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
Id Double - Id of the device.
- discovered Boolean
- Whether the item was discovered automatically.
- inventory
Item DoubleId - NetBox id.
- label String
- Physical label.
- last
Updated String - manufacturer
Id Double - Id of the manufacturer.
- name String
- owner
Id Double - Id of the owner the object is assigned to.
- parent
Id Double - Id of the parent inventory item.
- part
Id String - Manufacturer part number.
- role
Id Double - Id of the inventory item role.
- serial String
- Serial number.
- status String
- Operational status. One of: offline, active, planned, staged, failed, 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.
- url String
- asset
Tag string - Unique asset tag.
- component
Id number - Id of the device component named by component_type.
- component
Type string - Type of the device component the item is bound to, e.g. dcim.interface. Requires component_id.
- 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
Id number - Id of the device.
- discovered boolean
- Whether the item was discovered automatically.
- inventory
Item numberId - NetBox id.
- label string
- Physical label.
- last
Updated string - manufacturer
Id number - Id of the manufacturer.
- name string
- owner
Id number - Id of the owner the object is assigned to.
- parent
Id number - Id of the parent inventory item.
- part
Id string - Manufacturer part number.
- role
Id number - Id of the inventory item role.
- serial string
- Serial number.
- status string
- Operational status. One of: offline, active, planned, staged, failed, 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.
- url string
- asset_
tag str - Unique asset tag.
- component_
id float - Id of the device component named by component_type.
- component_
type str - Type of the device component the item is bound to, e.g. dcim.interface. Requires component_id.
- 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_
id float - Id of the device.
- discovered bool
- Whether the item was discovered automatically.
- inventory_
item_ floatid - NetBox id.
- label str
- Physical label.
- last_
updated str - manufacturer_
id float - Id of the manufacturer.
- name str
- owner_
id float - Id of the owner the object is assigned to.
- parent_
id float - Id of the parent inventory item.
- part_
id str - Manufacturer part number.
- role_
id float - Id of the inventory item role.
- serial str
- Serial number.
- status str
- Operational status. One of: offline, active, planned, staged, failed, 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.
- url str
- asset
Tag String - Unique asset tag.
- component
Id Number - Id of the device component named by component_type.
- component
Type String - Type of the device component the item is bound to, e.g. dcim.interface. Requires component_id.
- 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
Id Number - Id of the device.
- discovered Boolean
- Whether the item was discovered automatically.
- inventory
Item NumberId - NetBox id.
- label String
- Physical label.
- last
Updated String - manufacturer
Id Number - Id of the manufacturer.
- name String
- owner
Id Number - Id of the owner the object is assigned to.
- parent
Id Number - Id of the parent inventory item.
- part
Id String - Manufacturer part number.
- role
Id Number - Id of the inventory item role.
- serial String
- Serial number.
- status String
- Operational status. One of: offline, active, planned, staged, failed, 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.
- url String
Import
In Terraform v1.5.0 and later, the import block can be used with the id attribute, for example:
terraform
import {
to = netbox_inventory_item.test
id = “123”
}
The pulumi import command can be used, for example:
$ pulumi import netbox:index/inventoryItem:InventoryItem 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