published on Wednesday, Nov 4, 2026 by e-breuninger
published on Wednesday, Nov 4, 2026 by e-breuninger
An inventory item template of a device type (dcim.inventoryitemtemplate).
From the official documentation:
Deprecation Warning: Beginning in NetBox v4.3, the use of inventory items has been deprecated. They are planned for removal in a future NetBox release. Users are strongly encouraged to begin using modules and module types in place of inventory items. Modules provide enhanced functionality and can be configured with user-defined attributes.
A template for an inventory item that will be automatically created when instantiating a new device. All attributes of this object will be copied to the new inventory item, including the associations with a parent item and assigned component, if any. See the inventory item documentation for more detail.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as netbox from "@pulumi/netbox";
const test = new netbox.Manufacturer("test", {name: "test-manufacturer"});
const testDeviceType = new netbox.DeviceType("test", {
manufacturerId: test.manufacturerId,
model: "test-device-type",
});
const testInventoryItemRole = new netbox.InventoryItemRole("test", {name: "test-inventory-item-role"});
const testInventoryItemTemplate = new netbox.InventoryItemTemplate("test", {
deviceTypeId: testDeviceType.deviceTypeId,
name: "test-inventory-item-template",
roleId: testInventoryItemRole.inventoryItemRoleId,
manufacturerId: test.manufacturerId,
partId: "test-part-id",
label: "test-label",
description: "test-description",
});
import pulumi
import pulumi_netbox as netbox
test = netbox.Manufacturer("test", name="test-manufacturer")
test_device_type = netbox.DeviceType("test",
manufacturer_id=test.manufacturer_id,
model="test-device-type")
test_inventory_item_role = netbox.InventoryItemRole("test", name="test-inventory-item-role")
test_inventory_item_template = netbox.InventoryItemTemplate("test",
device_type_id=test_device_type.device_type_id,
name="test-inventory-item-template",
role_id=test_inventory_item_role.inventory_item_role_id,
manufacturer_id=test.manufacturer_id,
part_id="test-part-id",
label="test-label",
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.NewManufacturer(ctx, "test", &netbox.ManufacturerArgs{
Name: pulumi.String("test-manufacturer"),
})
if err != nil {
return err
}
testDeviceType, err := netbox.NewDeviceType(ctx, "test", &netbox.DeviceTypeArgs{
ManufacturerId: test.ManufacturerId,
Model: pulumi.String("test-device-type"),
})
if err != nil {
return err
}
testInventoryItemRole, err := netbox.NewInventoryItemRole(ctx, "test", &netbox.InventoryItemRoleArgs{
Name: pulumi.String("test-inventory-item-role"),
})
if err != nil {
return err
}
_, err = netbox.NewInventoryItemTemplate(ctx, "test", &netbox.InventoryItemTemplateArgs{
DeviceTypeId: testDeviceType.DeviceTypeId,
Name: pulumi.String("test-inventory-item-template"),
RoleId: testInventoryItemRole.InventoryItemRoleId,
ManufacturerId: test.ManufacturerId,
PartId: pulumi.String("test-part-id"),
Label: pulumi.String("test-label"),
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.Manufacturer("test", new()
{
Name = "test-manufacturer",
});
var testDeviceType = new Netbox.DeviceType("test", new()
{
ManufacturerId = test.ManufacturerId,
Model = "test-device-type",
});
var testInventoryItemRole = new Netbox.InventoryItemRole("test", new()
{
Name = "test-inventory-item-role",
});
var testInventoryItemTemplate = new Netbox.InventoryItemTemplate("test", new()
{
DeviceTypeId = testDeviceType.DeviceTypeId,
Name = "test-inventory-item-template",
RoleId = testInventoryItemRole.InventoryItemRoleId,
ManufacturerId = test.ManufacturerId,
PartId = "test-part-id",
Label = "test-label",
Description = "test-description",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.netbox.Manufacturer;
import com.pulumi.netbox.ManufacturerArgs;
import com.pulumi.netbox.DeviceType;
import com.pulumi.netbox.DeviceTypeArgs;
import com.pulumi.netbox.InventoryItemRole;
import com.pulumi.netbox.InventoryItemRoleArgs;
import com.pulumi.netbox.InventoryItemTemplate;
import com.pulumi.netbox.InventoryItemTemplateArgs;
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 Manufacturer("test", ManufacturerArgs.builder()
.name("test-manufacturer")
.build());
var testDeviceType = new DeviceType("testDeviceType", DeviceTypeArgs.builder()
.manufacturerId(test.manufacturerId())
.model("test-device-type")
.build());
var testInventoryItemRole = new InventoryItemRole("testInventoryItemRole", InventoryItemRoleArgs.builder()
.name("test-inventory-item-role")
.build());
var testInventoryItemTemplate = new InventoryItemTemplate("testInventoryItemTemplate", InventoryItemTemplateArgs.builder()
.deviceTypeId(testDeviceType.deviceTypeId())
.name("test-inventory-item-template")
.roleId(testInventoryItemRole.inventoryItemRoleId())
.manufacturerId(test.manufacturerId())
.partId("test-part-id")
.label("test-label")
.description("test-description")
.build());
}
}
resources:
test:
type: netbox:Manufacturer
properties:
name: test-manufacturer
testDeviceType:
type: netbox:DeviceType
name: test
properties:
manufacturerId: ${test.manufacturerId}
model: test-device-type
testInventoryItemRole:
type: netbox:InventoryItemRole
name: test
properties:
name: test-inventory-item-role
testInventoryItemTemplate:
type: netbox:InventoryItemTemplate
name: test
properties:
deviceTypeId: ${testDeviceType.deviceTypeId}
name: test-inventory-item-template
roleId: ${testInventoryItemRole.inventoryItemRoleId}
manufacturerId: ${test.manufacturerId}
partId: test-part-id
label: test-label
description: test-description
Example coming soon!
Create InventoryItemTemplate Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new InventoryItemTemplate(name: string, args: InventoryItemTemplateArgs, opts?: CustomResourceOptions);@overload
def InventoryItemTemplate(resource_name: str,
args: InventoryItemTemplateArgs,
opts: Optional[ResourceOptions] = None)
@overload
def InventoryItemTemplate(resource_name: str,
opts: Optional[ResourceOptions] = None,
device_type_id: Optional[float] = None,
component_id: Optional[float] = None,
component_type: Optional[str] = None,
description: Optional[str] = None,
label: Optional[str] = None,
manufacturer_id: Optional[float] = None,
name: Optional[str] = None,
parent_id: Optional[float] = None,
part_id: Optional[str] = None,
role_id: Optional[float] = None)func NewInventoryItemTemplate(ctx *Context, name string, args InventoryItemTemplateArgs, opts ...ResourceOption) (*InventoryItemTemplate, error)public InventoryItemTemplate(string name, InventoryItemTemplateArgs args, CustomResourceOptions? opts = null)
public InventoryItemTemplate(String name, InventoryItemTemplateArgs args)
public InventoryItemTemplate(String name, InventoryItemTemplateArgs args, CustomResourceOptions options)
type: netbox:InventoryItemTemplate
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "netbox_inventory_item_template" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args InventoryItemTemplateArgs
- 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 InventoryItemTemplateArgs
- 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 InventoryItemTemplateArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args InventoryItemTemplateArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args InventoryItemTemplateArgs
- 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 inventoryItemTemplateResource = new Netbox.InventoryItemTemplate("inventoryItemTemplateResource", new()
{
DeviceTypeId = 0.0,
ComponentId = 0.0,
ComponentType = "string",
Description = "string",
Label = "string",
ManufacturerId = 0.0,
Name = "string",
ParentId = 0.0,
PartId = "string",
RoleId = 0.0,
});
example, err := netbox.NewInventoryItemTemplate(ctx, "inventoryItemTemplateResource", &netbox.InventoryItemTemplateArgs{
DeviceTypeId: pulumi.Float64(0),
ComponentId: pulumi.Float64(0),
ComponentType: pulumi.String("string"),
Description: pulumi.String("string"),
Label: pulumi.String("string"),
ManufacturerId: pulumi.Float64(0),
Name: pulumi.String("string"),
ParentId: pulumi.Float64(0),
PartId: pulumi.String("string"),
RoleId: pulumi.Float64(0),
})
resource "netbox_inventory_item_template" "inventoryItemTemplateResource" {
lifecycle {
create_before_destroy = true
}
device_type_id = 0
component_id = 0
component_type = "string"
description = "string"
label = "string"
manufacturer_id = 0
name = "string"
parent_id = 0
part_id = "string"
role_id = 0
}
var inventoryItemTemplateResource = new InventoryItemTemplate("inventoryItemTemplateResource", InventoryItemTemplateArgs.builder()
.deviceTypeId(0.0)
.componentId(0.0)
.componentType("string")
.description("string")
.label("string")
.manufacturerId(0.0)
.name("string")
.parentId(0.0)
.partId("string")
.roleId(0.0)
.build());
inventory_item_template_resource = netbox.InventoryItemTemplate("inventoryItemTemplateResource",
device_type_id=float(0),
component_id=float(0),
component_type="string",
description="string",
label="string",
manufacturer_id=float(0),
name="string",
parent_id=float(0),
part_id="string",
role_id=float(0))
const inventoryItemTemplateResource = new netbox.InventoryItemTemplate("inventoryItemTemplateResource", {
deviceTypeId: 0,
componentId: 0,
componentType: "string",
description: "string",
label: "string",
manufacturerId: 0,
name: "string",
parentId: 0,
partId: "string",
roleId: 0,
});
type: netbox:InventoryItemTemplate
properties:
componentId: 0
componentType: string
description: string
deviceTypeId: 0
label: string
manufacturerId: 0
name: string
parentId: 0
partId: string
roleId: 0
InventoryItemTemplate 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 InventoryItemTemplate resource accepts the following input properties:
- Device
Type doubleId - Id of the device type. NetBox refuses to move a template to another type.
- Component
Id double - Id of the component template named by component_type.
- Component
Type string - Type of the component template the item is bound to, e.g. dcim.interfacetemplate. Requires component_id.
- Description string
- Label string
- Physical label.
- Manufacturer
Id double - Id of the manufacturer.
- Name string
- Parent
Id double - Id of the parent inventory item template.
- Part
Id string - Manufacturer part number.
- Role
Id double - Id of the inventory item role.
- Device
Type float64Id - Id of the device type. NetBox refuses to move a template to another type.
- Component
Id float64 - Id of the component template named by component_type.
- Component
Type string - Type of the component template the item is bound to, e.g. dcim.interfacetemplate. Requires component_id.
- Description string
- Label string
- Physical label.
- Manufacturer
Id float64 - Id of the manufacturer.
- Name string
- Parent
Id float64 - Id of the parent inventory item template.
- Part
Id string - Manufacturer part number.
- Role
Id float64 - Id of the inventory item role.
- device_
type_ numberid - Id of the device type. NetBox refuses to move a template to another type.
- component_
id number - Id of the component template named by component_type.
- component_
type string - Type of the component template the item is bound to, e.g. dcim.interfacetemplate. Requires component_id.
- description string
- label string
- Physical label.
- manufacturer_
id number - Id of the manufacturer.
- name string
- parent_
id number - Id of the parent inventory item template.
- part_
id string - Manufacturer part number.
- role_
id number - Id of the inventory item role.
- device
Type DoubleId - Id of the device type. NetBox refuses to move a template to another type.
- component
Id Double - Id of the component template named by component_type.
- component
Type String - Type of the component template the item is bound to, e.g. dcim.interfacetemplate. Requires component_id.
- description String
- label String
- Physical label.
- manufacturer
Id Double - Id of the manufacturer.
- name String
- parent
Id Double - Id of the parent inventory item template.
- part
Id String - Manufacturer part number.
- role
Id Double - Id of the inventory item role.
- device
Type numberId - Id of the device type. NetBox refuses to move a template to another type.
- component
Id number - Id of the component template named by component_type.
- component
Type string - Type of the component template the item is bound to, e.g. dcim.interfacetemplate. Requires component_id.
- description string
- label string
- Physical label.
- manufacturer
Id number - Id of the manufacturer.
- name string
- parent
Id number - Id of the parent inventory item template.
- part
Id string - Manufacturer part number.
- role
Id number - Id of the inventory item role.
- device_
type_ floatid - Id of the device type. NetBox refuses to move a template to another type.
- component_
id float - Id of the component template named by component_type.
- component_
type str - Type of the component template the item is bound to, e.g. dcim.interfacetemplate. Requires component_id.
- description str
- label str
- Physical label.
- manufacturer_
id float - Id of the manufacturer.
- name str
- parent_
id float - Id of the parent inventory item template.
- part_
id str - Manufacturer part number.
- role_
id float - Id of the inventory item role.
- device
Type NumberId - Id of the device type. NetBox refuses to move a template to another type.
- component
Id Number - Id of the component template named by component_type.
- component
Type String - Type of the component template the item is bound to, e.g. dcim.interfacetemplate. Requires component_id.
- description String
- label String
- Physical label.
- manufacturer
Id Number - Id of the manufacturer.
- name String
- parent
Id Number - Id of the parent inventory item template.
- part
Id String - Manufacturer part number.
- role
Id Number - Id of the inventory item role.
Outputs
All input properties are implicitly available as output properties. Additionally, the InventoryItemTemplate resource produces the following output properties:
- Created string
- Id string
- The provider-assigned unique ID for this managed resource.
- Inventory
Item doubleTemplate Id - NetBox id.
- Last
Updated string - Url string
- Created string
- Id string
- The provider-assigned unique ID for this managed resource.
- Inventory
Item float64Template Id - NetBox id.
- Last
Updated string - Url string
- created string
- id string
- The provider-assigned unique ID for this managed resource.
- inventory_
item_ numbertemplate_ id - NetBox id.
- last_
updated string - url string
- created String
- id String
- The provider-assigned unique ID for this managed resource.
- inventory
Item DoubleTemplate Id - NetBox id.
- last
Updated String - url String
- created string
- id string
- The provider-assigned unique ID for this managed resource.
- inventory
Item numberTemplate Id - NetBox id.
- last
Updated string - url string
- created str
- id str
- The provider-assigned unique ID for this managed resource.
- inventory_
item_ floattemplate_ id - NetBox id.
- last_
updated str - url str
- created String
- id String
- The provider-assigned unique ID for this managed resource.
- inventory
Item NumberTemplate Id - NetBox id.
- last
Updated String - url String
Look up Existing InventoryItemTemplate Resource
Get an existing InventoryItemTemplate 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?: InventoryItemTemplateState, opts?: CustomResourceOptions): InventoryItemTemplate@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
component_id: Optional[float] = None,
component_type: Optional[str] = None,
created: Optional[str] = None,
description: Optional[str] = None,
device_type_id: Optional[float] = None,
inventory_item_template_id: Optional[float] = None,
label: Optional[str] = None,
last_updated: Optional[str] = None,
manufacturer_id: Optional[float] = None,
name: Optional[str] = None,
parent_id: Optional[float] = None,
part_id: Optional[str] = None,
role_id: Optional[float] = None,
url: Optional[str] = None) -> InventoryItemTemplatefunc GetInventoryItemTemplate(ctx *Context, name string, id IDInput, state *InventoryItemTemplateState, opts ...ResourceOption) (*InventoryItemTemplate, error)public static InventoryItemTemplate Get(string name, Input<string> id, InventoryItemTemplateState? state, CustomResourceOptions? opts = null)public static InventoryItemTemplate get(String name, Output<String> id, InventoryItemTemplateState state, CustomResourceOptions options)resources: _: type: netbox:InventoryItemTemplate get: id: ${id}import {
to = netbox_inventory_item_template.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.
- Component
Id double - Id of the component template named by component_type.
- Component
Type string - Type of the component template the item is bound to, e.g. dcim.interfacetemplate. Requires component_id.
- Created string
- Description string
- Device
Type doubleId - Id of the device type. NetBox refuses to move a template to another type.
- Inventory
Item doubleTemplate Id - NetBox id.
- Label string
- Physical label.
- Last
Updated string - Manufacturer
Id double - Id of the manufacturer.
- Name string
- Parent
Id double - Id of the parent inventory item template.
- Part
Id string - Manufacturer part number.
- Role
Id double - Id of the inventory item role.
- Url string
- Component
Id float64 - Id of the component template named by component_type.
- Component
Type string - Type of the component template the item is bound to, e.g. dcim.interfacetemplate. Requires component_id.
- Created string
- Description string
- Device
Type float64Id - Id of the device type. NetBox refuses to move a template to another type.
- Inventory
Item float64Template Id - NetBox id.
- Label string
- Physical label.
- Last
Updated string - Manufacturer
Id float64 - Id of the manufacturer.
- Name string
- Parent
Id float64 - Id of the parent inventory item template.
- Part
Id string - Manufacturer part number.
- Role
Id float64 - Id of the inventory item role.
- Url string
- component_
id number - Id of the component template named by component_type.
- component_
type string - Type of the component template the item is bound to, e.g. dcim.interfacetemplate. Requires component_id.
- created string
- description string
- device_
type_ numberid - Id of the device type. NetBox refuses to move a template to another type.
- inventory_
item_ numbertemplate_ id - NetBox id.
- label string
- Physical label.
- last_
updated string - manufacturer_
id number - Id of the manufacturer.
- name string
- parent_
id number - Id of the parent inventory item template.
- part_
id string - Manufacturer part number.
- role_
id number - Id of the inventory item role.
- url string
- component
Id Double - Id of the component template named by component_type.
- component
Type String - Type of the component template the item is bound to, e.g. dcim.interfacetemplate. Requires component_id.
- created String
- description String
- device
Type DoubleId - Id of the device type. NetBox refuses to move a template to another type.
- inventory
Item DoubleTemplate Id - NetBox id.
- label String
- Physical label.
- last
Updated String - manufacturer
Id Double - Id of the manufacturer.
- name String
- parent
Id Double - Id of the parent inventory item template.
- part
Id String - Manufacturer part number.
- role
Id Double - Id of the inventory item role.
- url String
- component
Id number - Id of the component template named by component_type.
- component
Type string - Type of the component template the item is bound to, e.g. dcim.interfacetemplate. Requires component_id.
- created string
- description string
- device
Type numberId - Id of the device type. NetBox refuses to move a template to another type.
- inventory
Item numberTemplate Id - NetBox id.
- label string
- Physical label.
- last
Updated string - manufacturer
Id number - Id of the manufacturer.
- name string
- parent
Id number - Id of the parent inventory item template.
- part
Id string - Manufacturer part number.
- role
Id number - Id of the inventory item role.
- url string
- component_
id float - Id of the component template named by component_type.
- component_
type str - Type of the component template the item is bound to, e.g. dcim.interfacetemplate. Requires component_id.
- created str
- description str
- device_
type_ floatid - Id of the device type. NetBox refuses to move a template to another type.
- inventory_
item_ floattemplate_ id - NetBox id.
- label str
- Physical label.
- last_
updated str - manufacturer_
id float - Id of the manufacturer.
- name str
- parent_
id float - Id of the parent inventory item template.
- part_
id str - Manufacturer part number.
- role_
id float - Id of the inventory item role.
- url str
- component
Id Number - Id of the component template named by component_type.
- component
Type String - Type of the component template the item is bound to, e.g. dcim.interfacetemplate. Requires component_id.
- created String
- description String
- device
Type NumberId - Id of the device type. NetBox refuses to move a template to another type.
- inventory
Item NumberTemplate Id - NetBox id.
- label String
- Physical label.
- last
Updated String - manufacturer
Id Number - Id of the manufacturer.
- name String
- parent
Id Number - Id of the parent inventory item template.
- part
Id String - Manufacturer part number.
- role
Id Number - Id of the inventory item role.
- 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_template.test
id = “123”
}
The pulumi import command can be used, for example:
$ pulumi import netbox:index/inventoryItemTemplate:InventoryItemTemplate 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