published on Wednesday, Nov 4, 2026 by e-breuninger
published on Wednesday, Nov 4, 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 = netbox.getVirtualChassis({
name: "test-virtual_chassis",
});
import pulumi
import pulumi_netbox as netbox
test = netbox.get_virtual_chassis(name="test-virtual_chassis")
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.LookupVirtualChassis(ctx, &netbox.LookupVirtualChassisArgs{
Name: pulumi.StringRef("test-virtual_chassis"),
}, nil)
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 = Netbox.GetVirtualChassis.Invoke(new()
{
Name = "test-virtual_chassis",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.netbox.NetboxFunctions;
import com.pulumi.netbox.inputs.GetVirtualChassisArgs;
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) {
final var test = NetboxFunctions.getVirtualChassis(GetVirtualChassisArgs.builder()
.name("test-virtual_chassis")
.build());
}
}
variables:
test:
fn::invoke:
function: netbox:getVirtualChassis
arguments:
name: test-virtual_chassis
Example coming soon!
Using getVirtualChassis
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getVirtualChassis(args: GetVirtualChassisArgs, opts?: InvokeOptions): Promise<GetVirtualChassisResult>
function getVirtualChassisOutput(args: GetVirtualChassisOutputArgs, opts?: InvokeOutputOptions): Output<GetVirtualChassisResult>def get_virtual_chassis(custom_field_filters: Optional[Mapping[str, str]] = None,
domain: Optional[str] = None,
id: Optional[float] = None,
master_id: Optional[float] = None,
name: Optional[str] = None,
owner_id: Optional[float] = None,
tag_slug: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetVirtualChassisResult
def get_virtual_chassis_output(custom_field_filters: pulumi.Input[Optional[Mapping[str, pulumi.Input[str]]]] = None,
domain: pulumi.Input[Optional[str]] = None,
id: pulumi.Input[Optional[float]] = None,
master_id: pulumi.Input[Optional[float]] = None,
name: pulumi.Input[Optional[str]] = None,
owner_id: pulumi.Input[Optional[float]] = None,
tag_slug: pulumi.Input[Optional[str]] = None,
opts: Optional[InvokeOutputOptions] = None) -> Output[GetVirtualChassisResult]func LookupVirtualChassis(ctx *Context, args *LookupVirtualChassisArgs, opts ...InvokeOption) (*LookupVirtualChassisResult, error)
func LookupVirtualChassisOutput(ctx *Context, args *LookupVirtualChassisOutputArgs, opts ...InvokeOption) LookupVirtualChassisResultOutput> Note: This function is named LookupVirtualChassis in the Go SDK.
public static class GetVirtualChassis
{
public static Task<GetVirtualChassisResult> InvokeAsync(GetVirtualChassisArgs args, InvokeOptions? opts = null)
public static Output<GetVirtualChassisResult> Invoke(GetVirtualChassisInvokeArgs args, InvokeOptions? opts = null)
public static Output<GetVirtualChassisResult> Invoke(GetVirtualChassisInvokeArgs args, InvokeOutputOptions opts)
}public static CompletableFuture<GetVirtualChassisResult> getVirtualChassis(GetVirtualChassisArgs args, InvokeOptions options)
public static Output<GetVirtualChassisResult> getVirtualChassis(GetVirtualChassisArgs args, InvokeOptions options)
public static Output<GetVirtualChassisResult> getVirtualChassis(GetVirtualChassisArgs args, InvokeOutputOptions options)
fn::invoke:
function: netbox:index/getVirtualChassis:getVirtualChassis
arguments:
# arguments dictionarydata "netbox_get_virtual_chassis" "name" {
# arguments
}The following arguments are supported:
- Custom
Field Dictionary<string, string>Filters - Custom field values to match, by field name, e.g. { tier = "gold" }: each entry filters as cf_\n\n with the field's own filter logic, loose (case-insensitive substring) or exact.
- Domain string
- Id double
- NetBox id.
- Master
Id double - Id of the device acting as chassis master.
- Name string
- Owner
Id double - Id of the owner the object is assigned to.
- string
- Slug of a tag the object carries.
- Custom
Field map[string]stringFilters - Custom field values to match, by field name, e.g. { tier = "gold" }: each entry filters as cf_\n\n with the field's own filter logic, loose (case-insensitive substring) or exact.
- Domain string
- Id float64
- NetBox id.
- Master
Id float64 - Id of the device acting as chassis master.
- Name string
- Owner
Id float64 - Id of the owner the object is assigned to.
- string
- Slug of a tag the object carries.
- custom_
field_ map(string)filters - Custom field values to match, by field name, e.g. { tier = "gold" }: each entry filters as cf_\n\n with the field's own filter logic, loose (case-insensitive substring) or exact.
- domain string
- id number
- NetBox id.
- master_
id number - Id of the device acting as chassis master.
- name string
- owner_
id number - Id of the owner the object is assigned to.
- tag_
slug string - Slug of a tag the object carries.
- custom
Field Map<String,String>Filters - Custom field values to match, by field name, e.g. { tier = "gold" }: each entry filters as cf_\n\n with the field's own filter logic, loose (case-insensitive substring) or exact.
- domain String
- id Double
- NetBox id.
- master
Id Double - Id of the device acting as chassis master.
- name String
- owner
Id Double - Id of the owner the object is assigned to.
- String
- Slug of a tag the object carries.
- custom
Field {[key: string]: string}Filters - Custom field values to match, by field name, e.g. { tier = "gold" }: each entry filters as cf_\n\n with the field's own filter logic, loose (case-insensitive substring) or exact.
- domain string
- id number
- NetBox id.
- master
Id number - Id of the device acting as chassis master.
- name string
- owner
Id number - Id of the owner the object is assigned to.
- string
- Slug of a tag the object carries.
- custom_
field_ Mapping[str, str]filters - Custom field values to match, by field name, e.g. { tier = "gold" }: each entry filters as cf_\n\n with the field's own filter logic, loose (case-insensitive substring) or exact.
- domain str
- id float
- NetBox id.
- master_
id float - Id of the device acting as chassis master.
- name str
- owner_
id float - Id of the owner the object is assigned to.
- tag_
slug str - Slug of a tag the object carries.
- custom
Field Map<String>Filters - Custom field values to match, by field name, e.g. { tier = "gold" }: each entry filters as cf_\n\n with the field's own filter logic, loose (case-insensitive substring) or exact.
- domain String
- id Number
- NetBox id.
- master
Id Number - Id of the device acting as chassis master.
- name String
- owner
Id Number - Id of the owner the object is assigned to.
- String
- Slug of a tag the object carries.
getVirtualChassis Result
The following output properties are available:
- 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
- Id double
- NetBox id.
- Last
Updated string - Master
Id double - Id of the device acting as chassis 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
- Custom
Field Dictionary<string, string>Filters - Custom field values to match, by field name, e.g. { tier = "gold" }: each entry filters as cf_\n\n with the field's own filter logic, loose (case-insensitive substring) or exact.
- string
- Slug of a tag the object carries.
- 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
- Id float64
- NetBox id.
- Last
Updated string - Master
Id float64 - Id of the device acting as chassis 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
- Custom
Field map[string]stringFilters - Custom field values to match, by field name, e.g. { tier = "gold" }: each entry filters as cf_\n\n with the field's own filter logic, loose (case-insensitive substring) or exact.
- string
- Slug of a tag the object carries.
- 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
- id number
- NetBox id.
- last_
updated string - master_
id number - Id of the device acting as chassis 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
- custom_
field_ map(string)filters - Custom field values to match, by field name, e.g. { tier = "gold" }: each entry filters as cf_\n\n with the field's own filter logic, loose (case-insensitive substring) or exact.
- tag_
slug string - Slug of a tag the object carries.
- 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
- id Double
- NetBox id.
- last
Updated String - master
Id Double - Id of the device acting as chassis 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
- custom
Field Map<String,String>Filters - Custom field values to match, by field name, e.g. { tier = "gold" }: each entry filters as cf_\n\n with the field's own filter logic, loose (case-insensitive substring) or exact.
- String
- Slug of a tag the object carries.
- 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
- id number
- NetBox id.
- last
Updated string - master
Id number - Id of the device acting as chassis 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
- custom
Field {[key: string]: string}Filters - Custom field values to match, by field name, e.g. { tier = "gold" }: each entry filters as cf_\n\n with the field's own filter logic, loose (case-insensitive substring) or exact.
- string
- Slug of a tag the object carries.
- 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
- id float
- NetBox id.
- last_
updated str - master_
id float - Id of the device acting as chassis 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
- custom_
field_ Mapping[str, str]filters - Custom field values to match, by field name, e.g. { tier = "gold" }: each entry filters as cf_\n\n with the field's own filter logic, loose (case-insensitive substring) or exact.
- tag_
slug str - Slug of a tag the object carries.
- 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
- id Number
- NetBox id.
- last
Updated String - master
Id Number - Id of the device acting as chassis 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
- custom
Field Map<String>Filters - Custom field values to match, by field name, e.g. { tier = "gold" }: each entry filters as cf_\n\n with the field's own filter logic, loose (case-insensitive substring) or exact.
- String
- Slug of a tag the object carries.
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