published on Monday, Nov 16, 2026 by e-breuninger
published on Monday, Nov 16, 2026 by e-breuninger
A virtual chassis grouping devices (dcim.virtualchassis).
From the official documentation:
Sometimes it is necessary to model a set of physical devices as sharing a single management plane. Perhaps the most common example of such a scenario is stackable switches. These can be modeled as virtual chassis in NetBox, with one device acting as the chassis master and the rest as members. All components of member devices will appear on the master.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as netbox from "@pulumi/netbox";
const test = new netbox.VirtualChassis("test", {
name: "test-virtual-chassis",
domain: "test-domain",
description: "test-description",
});
import pulumi
import pulumi_netbox as netbox
test = netbox.VirtualChassis("test",
name="test-virtual-chassis",
domain="test-domain",
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 {
_, err := netbox.NewVirtualChassis(ctx, "test", &netbox.VirtualChassisArgs{
Name: pulumi.String("test-virtual-chassis"),
Domain: pulumi.String("test-domain"),
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.VirtualChassis("test", new()
{
Name = "test-virtual-chassis",
Domain = "test-domain",
Description = "test-description",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.netbox.VirtualChassis;
import com.pulumi.netbox.VirtualChassisArgs;
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 VirtualChassis("test", VirtualChassisArgs.builder()
.name("test-virtual-chassis")
.domain("test-domain")
.description("test-description")
.build());
}
}
resources:
test:
type: netbox:VirtualChassis
properties:
name: test-virtual-chassis
domain: test-domain
description: test-description
Example coming soon!
Create VirtualChassis Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new VirtualChassis(name: string, args?: VirtualChassisArgs, opts?: CustomResourceOptions);@overload
def VirtualChassis(resource_name: str,
args: Optional[VirtualChassisArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def VirtualChassis(resource_name: str,
opts: Optional[ResourceOptions] = None,
comments: Optional[str] = None,
custom_fields: Optional[Mapping[str, str]] = None,
description: Optional[str] = None,
domain: Optional[str] = None,
name: Optional[str] = None,
owner_id: Optional[float] = None,
tags: Optional[Sequence[str]] = None)func NewVirtualChassis(ctx *Context, name string, args *VirtualChassisArgs, opts ...ResourceOption) (*VirtualChassis, error)public VirtualChassis(string name, VirtualChassisArgs? args = null, CustomResourceOptions? opts = null)
public VirtualChassis(String name, VirtualChassisArgs args)
public VirtualChassis(String name, VirtualChassisArgs args, CustomResourceOptions options)
type: netbox:VirtualChassis
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "netbox_virtual_chassis" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args VirtualChassisArgs
- 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 VirtualChassisArgs
- 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 VirtualChassisArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args VirtualChassisArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args VirtualChassisArgs
- 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 virtualChassisResource = new Netbox.VirtualChassis("virtualChassisResource", new()
{
Comments = "string",
CustomFields =
{
{ "string", "string" },
},
Description = "string",
Domain = "string",
Name = "string",
OwnerId = 0.0,
Tags = new[]
{
"string",
},
});
example, err := netbox.NewVirtualChassis(ctx, "virtualChassisResource", &netbox.VirtualChassisArgs{
Comments: pulumi.String("string"),
CustomFields: pulumi.StringMap{
"string": pulumi.String("string"),
},
Description: pulumi.String("string"),
Domain: pulumi.String("string"),
Name: pulumi.String("string"),
OwnerId: pulumi.Float64(0),
Tags: pulumi.StringArray{
pulumi.String("string"),
},
})
resource "netbox_virtual_chassis" "virtualChassisResource" {
lifecycle {
create_before_destroy = true
}
comments = "string"
custom_fields = {
"string" = "string"
}
description = "string"
domain = "string"
name = "string"
owner_id = 0
tags = ["string"]
}
var virtualChassisResource = new VirtualChassis("virtualChassisResource", VirtualChassisArgs.builder()
.comments("string")
.customFields(Map.of("string", "string"))
.description("string")
.domain("string")
.name("string")
.ownerId(0.0)
.tags("string")
.build());
virtual_chassis_resource = netbox.VirtualChassis("virtualChassisResource",
comments="string",
custom_fields={
"string": "string",
},
description="string",
domain="string",
name="string",
owner_id=float(0),
tags=["string"])
const virtualChassisResource = new netbox.VirtualChassis("virtualChassisResource", {
comments: "string",
customFields: {
string: "string",
},
description: "string",
domain: "string",
name: "string",
ownerId: 0,
tags: ["string"],
});
type: netbox:VirtualChassis
properties:
comments: string
customFields:
string: string
description: string
domain: string
name: string
ownerId: 0
tags:
- string
VirtualChassis 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 VirtualChassis resource accepts the following input properties:
- Comments 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
- Domain string
- Name string
- Owner
Id double - Id of the owner the object is assigned to.
- List<string>
- Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
- Comments 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
- Domain string
- Name string
- Owner
Id float64 - Id of the owner the object is assigned to.
- []string
- Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
- comments 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
- domain string
- name string
- owner_
id number - Id of the owner the object is assigned to.
- list(string)
- Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
- comments 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
- domain String
- name String
- owner
Id Double - Id of the owner the object is assigned to.
- List<String>
- Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
- comments 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
- domain string
- name string
- owner
Id number - Id of the owner the object is assigned to.
- string[]
- Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
- comments 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
- domain str
- name str
- owner_
id float - Id of the owner the object is assigned to.
- Sequence[str]
- Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
- comments 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
- domain String
- name String
- owner
Id Number - Id of the owner the object is assigned to.
- 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 VirtualChassis resource produces the following output properties:
- Created string
- Id string
- The provider-assigned unique ID for this managed resource.
- Last
Updated string - Master
Id double - Id of the device acting as chassis master (managed by netboxvirtualchassis_master).
- Member
Count double - Number of members of the virtual chassis.
- List<string>
- Slugs of all tags on the object, including the provider's default_tags.
- Url string
- Virtual
Chassis doubleId - NetBox id.
- Created string
- Id string
- The provider-assigned unique ID for this managed resource.
- Last
Updated string - Master
Id float64 - Id of the device acting as chassis master (managed by netboxvirtualchassis_master).
- Member
Count float64 - Number of members of the virtual chassis.
- []string
- Slugs of all tags on the object, including the provider's default_tags.
- Url string
- Virtual
Chassis float64Id - NetBox id.
- created string
- id string
- The provider-assigned unique ID for this managed resource.
- last_
updated string - master_
id number - Id of the device acting as chassis master (managed by netboxvirtualchassis_master).
- member_
count number - Number of members of the virtual chassis.
- list(string)
- Slugs of all tags on the object, including the provider's default_tags.
- url string
- virtual_
chassis_ numberid - NetBox id.
- created String
- id String
- The provider-assigned unique ID for this managed resource.
- last
Updated String - master
Id Double - Id of the device acting as chassis master (managed by netboxvirtualchassis_master).
- member
Count Double - Number of members of the virtual chassis.
- List<String>
- Slugs of all tags on the object, including the provider's default_tags.
- url String
- virtual
Chassis DoubleId - NetBox id.
- created string
- id string
- The provider-assigned unique ID for this managed resource.
- last
Updated string - master
Id number - Id of the device acting as chassis master (managed by netboxvirtualchassis_master).
- member
Count number - Number of members of the virtual chassis.
- string[]
- Slugs of all tags on the object, including the provider's default_tags.
- url string
- virtual
Chassis numberId - NetBox id.
- created str
- id str
- The provider-assigned unique ID for this managed resource.
- last_
updated str - master_
id float - Id of the device acting as chassis master (managed by netboxvirtualchassis_master).
- member_
count float - Number of members of the virtual chassis.
- Sequence[str]
- Slugs of all tags on the object, including the provider's default_tags.
- url str
- virtual_
chassis_ floatid - NetBox id.
- created String
- id String
- The provider-assigned unique ID for this managed resource.
- last
Updated String - master
Id Number - Id of the device acting as chassis master (managed by netboxvirtualchassis_master).
- member
Count Number - Number of members of the virtual chassis.
- List<String>
- Slugs of all tags on the object, including the provider's default_tags.
- url String
- virtual
Chassis NumberId - NetBox id.
Look up Existing VirtualChassis Resource
Get an existing VirtualChassis 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?: VirtualChassisState, opts?: CustomResourceOptions): VirtualChassis@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
comments: Optional[str] = None,
created: Optional[str] = None,
custom_fields: Optional[Mapping[str, str]] = None,
description: Optional[str] = None,
domain: Optional[str] = None,
last_updated: Optional[str] = None,
master_id: Optional[float] = None,
member_count: Optional[float] = None,
name: Optional[str] = None,
owner_id: Optional[float] = None,
tags: Optional[Sequence[str]] = None,
tags_alls: Optional[Sequence[str]] = None,
url: Optional[str] = None,
virtual_chassis_id: Optional[float] = None) -> VirtualChassisfunc GetVirtualChassis(ctx *Context, name string, id IDInput, state *VirtualChassisState, opts ...ResourceOption) (*VirtualChassis, error)public static VirtualChassis Get(string name, Input<string> id, VirtualChassisState? state, CustomResourceOptions? opts = null)public static VirtualChassis get(String name, Output<String> id, VirtualChassisState state, CustomResourceOptions options)resources: existingVirtualChassis: type: netbox:VirtualChassis get: id: ${id}import {
to = netbox_virtual_chassis.example
id = "${id}"
}
- name string
- The unique name of the resulting resource.
- id Input<ID>
- The unique provider ID of the resource to look up.
- state VirtualChassisState
- Known property values the provider needs, along with the ID, to find the resource. Usually not required.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resulting resource.
- id str
- The unique provider ID of the resource to look up.
- 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 resulting resource.
- id IDInput
- The unique provider ID of the resource to look up.
- state VirtualChassisState
- Known property values the provider needs, along with the ID, to find the resource. Usually not required.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resulting resource.
- id Input<string>
- The unique provider ID of the resource to look up.
- state VirtualChassisState
- Known property values the provider needs, along with the ID, to find the resource. Usually not required.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resulting resource.
- id Output<String>
- The unique provider ID of the resource to look up.
- state VirtualChassisState
- Known property values the provider needs, along with the ID, to find the resource. Usually not required.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
- Comments string
- 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
- Domain string
- Last
Updated string - Master
Id double - Id of the device acting as chassis master (managed by netboxvirtualchassis_master).
- Member
Count double - Number of members of the virtual chassis.
- Name string
- Owner
Id double - Id of the owner the object is assigned to.
- 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
- Virtual
Chassis doubleId - NetBox id.
- Comments string
- 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
- Domain string
- Last
Updated string - Master
Id float64 - Id of the device acting as chassis master (managed by netboxvirtualchassis_master).
- Member
Count float64 - Number of members of the virtual chassis.
- Name string
- Owner
Id float64 - Id of the owner the object is assigned to.
- []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
- Virtual
Chassis float64Id - NetBox id.
- comments string
- 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
- domain string
- last_
updated string - master_
id number - Id of the device acting as chassis master (managed by netboxvirtualchassis_master).
- member_
count number - Number of members of the virtual chassis.
- name string
- owner_
id number - Id of the owner the object is assigned to.
- 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
- virtual_
chassis_ numberid - NetBox id.
- comments String
- 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
- domain String
- last
Updated String - master
Id Double - Id of the device acting as chassis master (managed by netboxvirtualchassis_master).
- member
Count Double - Number of members of the virtual chassis.
- name String
- owner
Id Double - Id of the owner the object is assigned to.
- 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
- virtual
Chassis DoubleId - NetBox id.
- comments string
- 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
- domain string
- last
Updated string - master
Id number - Id of the device acting as chassis master (managed by netboxvirtualchassis_master).
- member
Count number - Number of members of the virtual chassis.
- name string
- owner
Id number - Id of the owner the object is assigned to.
- 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
- virtual
Chassis numberId - NetBox id.
- comments str
- 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
- domain str
- last_
updated str - master_
id float - Id of the device acting as chassis master (managed by netboxvirtualchassis_master).
- member_
count float - Number of members of the virtual chassis.
- name str
- owner_
id float - Id of the owner the object is assigned to.
- 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
- virtual_
chassis_ floatid - NetBox id.
- comments String
- 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
- domain String
- last
Updated String - master
Id Number - Id of the device acting as chassis master (managed by netboxvirtualchassis_master).
- member
Count Number - Number of members of the virtual chassis.
- name String
- owner
Id Number - Id of the owner the object is assigned to.
- 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
- virtual
Chassis NumberId - NetBox id.
Import
In Terraform v1.5.0 and later, the import block can be used with the id attribute, for example:
terraform
import {
to = netbox_virtual_chassis.test
id = “123”
}
The pulumi import command can be used, for example:
$ pulumi import netbox:index/virtualChassis:VirtualChassis 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 Monday, Nov 16, 2026 by e-breuninger