published on Wednesday, Jul 15, 2026 by e-breuninger
published on Wednesday, Jul 15, 2026 by e-breuninger
From the official documentation:
A template for a module bay that will be created on all instantiations of the parent device type. See the module bay 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: "Cisco"});
const testDeviceType = new netbox.DeviceType("test", {
model: "Catalyst 9300X-24Y",
slug: "catalyst-9300x-24y",
partNumber: "C9300X-24Y",
manufacturerId: test.manufacturerId,
});
const testModuleBayTemplate = new netbox.ModuleBayTemplate("test", {
name: "TwentyFiveGigE1/0/1",
label: "SFP28 cage",
position: "TwentyFiveGigE1/0/1",
deviceTypeId: testDeviceType.deviceTypeId,
});
import pulumi
import pulumi_netbox as netbox
test = netbox.Manufacturer("test", name="Cisco")
test_device_type = netbox.DeviceType("test",
model="Catalyst 9300X-24Y",
slug="catalyst-9300x-24y",
part_number="C9300X-24Y",
manufacturer_id=test.manufacturer_id)
test_module_bay_template = netbox.ModuleBayTemplate("test",
name="TwentyFiveGigE1/0/1",
label="SFP28 cage",
position="TwentyFiveGigE1/0/1",
device_type_id=test_device_type.device_type_id)
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/netbox/v5/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("Cisco"),
})
if err != nil {
return err
}
testDeviceType, err := netbox.NewDeviceType(ctx, "test", &netbox.DeviceTypeArgs{
Model: pulumi.String("Catalyst 9300X-24Y"),
Slug: pulumi.String("catalyst-9300x-24y"),
PartNumber: pulumi.String("C9300X-24Y"),
ManufacturerId: test.ManufacturerId,
})
if err != nil {
return err
}
_, err = netbox.NewModuleBayTemplate(ctx, "test", &netbox.ModuleBayTemplateArgs{
Name: pulumi.String("TwentyFiveGigE1/0/1"),
Label: pulumi.String("SFP28 cage"),
Position: pulumi.String("TwentyFiveGigE1/0/1"),
DeviceTypeId: testDeviceType.DeviceTypeId,
})
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 = "Cisco",
});
var testDeviceType = new Netbox.DeviceType("test", new()
{
Model = "Catalyst 9300X-24Y",
Slug = "catalyst-9300x-24y",
PartNumber = "C9300X-24Y",
ManufacturerId = test.ManufacturerId,
});
var testModuleBayTemplate = new Netbox.ModuleBayTemplate("test", new()
{
Name = "TwentyFiveGigE1/0/1",
Label = "SFP28 cage",
Position = "TwentyFiveGigE1/0/1",
DeviceTypeId = testDeviceType.DeviceTypeId,
});
});
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.ModuleBayTemplate;
import com.pulumi.netbox.ModuleBayTemplateArgs;
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("Cisco")
.build());
var testDeviceType = new DeviceType("testDeviceType", DeviceTypeArgs.builder()
.model("Catalyst 9300X-24Y")
.slug("catalyst-9300x-24y")
.partNumber("C9300X-24Y")
.manufacturerId(test.manufacturerId())
.build());
var testModuleBayTemplate = new ModuleBayTemplate("testModuleBayTemplate", ModuleBayTemplateArgs.builder()
.name("TwentyFiveGigE1/0/1")
.label("SFP28 cage")
.position("TwentyFiveGigE1/0/1")
.deviceTypeId(testDeviceType.deviceTypeId())
.build());
}
}
resources:
test:
type: netbox:Manufacturer
properties:
name: Cisco
testDeviceType:
type: netbox:DeviceType
name: test
properties:
model: Catalyst 9300X-24Y
slug: catalyst-9300x-24y
partNumber: C9300X-24Y
manufacturerId: ${test.manufacturerId}
testModuleBayTemplate:
type: netbox:ModuleBayTemplate
name: test
properties:
name: TwentyFiveGigE1/0/1
label: SFP28 cage
position: TwentyFiveGigE1/0/1
deviceTypeId: ${testDeviceType.deviceTypeId}
Example coming soon!
Create ModuleBayTemplate Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ModuleBayTemplate(name: string, args: ModuleBayTemplateArgs, opts?: CustomResourceOptions);@overload
def ModuleBayTemplate(resource_name: str,
args: ModuleBayTemplateArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ModuleBayTemplate(resource_name: str,
opts: Optional[ResourceOptions] = None,
device_type_id: Optional[float] = None,
description: Optional[str] = None,
label: Optional[str] = None,
module_bay_template_id: Optional[str] = None,
name: Optional[str] = None,
position: Optional[str] = None)func NewModuleBayTemplate(ctx *Context, name string, args ModuleBayTemplateArgs, opts ...ResourceOption) (*ModuleBayTemplate, error)public ModuleBayTemplate(string name, ModuleBayTemplateArgs args, CustomResourceOptions? opts = null)
public ModuleBayTemplate(String name, ModuleBayTemplateArgs args)
public ModuleBayTemplate(String name, ModuleBayTemplateArgs args, CustomResourceOptions options)
type: netbox:ModuleBayTemplate
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "netbox_module_bay_template" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args ModuleBayTemplateArgs
- 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 ModuleBayTemplateArgs
- 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 ModuleBayTemplateArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ModuleBayTemplateArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ModuleBayTemplateArgs
- 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 moduleBayTemplateResource = new Netbox.ModuleBayTemplate("moduleBayTemplateResource", new()
{
DeviceTypeId = 0,
Description = "string",
Label = "string",
ModuleBayTemplateId = "string",
Name = "string",
Position = "string",
});
example, err := netbox.NewModuleBayTemplate(ctx, "moduleBayTemplateResource", &netbox.ModuleBayTemplateArgs{
DeviceTypeId: pulumi.Float64(0),
Description: pulumi.String("string"),
Label: pulumi.String("string"),
ModuleBayTemplateId: pulumi.String("string"),
Name: pulumi.String("string"),
Position: pulumi.String("string"),
})
resource "netbox_module_bay_template" "moduleBayTemplateResource" {
lifecycle {
create_before_destroy = true
}
device_type_id = 0
description = "string"
label = "string"
module_bay_template_id = "string"
name = "string"
position = "string"
}
var moduleBayTemplateResource = new ModuleBayTemplate("moduleBayTemplateResource", ModuleBayTemplateArgs.builder()
.deviceTypeId(0.0)
.description("string")
.label("string")
.moduleBayTemplateId("string")
.name("string")
.position("string")
.build());
module_bay_template_resource = netbox.ModuleBayTemplate("moduleBayTemplateResource",
device_type_id=float(0),
description="string",
label="string",
module_bay_template_id="string",
name="string",
position="string")
const moduleBayTemplateResource = new netbox.ModuleBayTemplate("moduleBayTemplateResource", {
deviceTypeId: 0,
description: "string",
label: "string",
moduleBayTemplateId: "string",
name: "string",
position: "string",
});
type: netbox:ModuleBayTemplate
properties:
description: string
deviceTypeId: 0
label: string
moduleBayTemplateId: string
name: string
position: string
ModuleBayTemplate 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 ModuleBayTemplate resource accepts the following input properties:
- Device
Type doubleId - Description string
- Label string
- Module
Bay stringTemplate Id - The ID of this resource.
- Name string
- Position string
- Identifier to reference when renaming installed components.
- Device
Type float64Id - Description string
- Label string
- Module
Bay stringTemplate Id - The ID of this resource.
- Name string
- Position string
- Identifier to reference when renaming installed components.
- device_
type_ numberid - description string
- label string
- module_
bay_ stringtemplate_ id - The ID of this resource.
- name string
- position string
- Identifier to reference when renaming installed components.
- device
Type DoubleId - description String
- label String
- module
Bay StringTemplate Id - The ID of this resource.
- name String
- position String
- Identifier to reference when renaming installed components.
- device
Type numberId - description string
- label string
- module
Bay stringTemplate Id - The ID of this resource.
- name string
- position string
- Identifier to reference when renaming installed components.
- device_
type_ floatid - description str
- label str
- module_
bay_ strtemplate_ id - The ID of this resource.
- name str
- position str
- Identifier to reference when renaming installed components.
- device
Type NumberId - description String
- label String
- module
Bay StringTemplate Id - The ID of this resource.
- name String
- position String
- Identifier to reference when renaming installed components.
Outputs
All input properties are implicitly available as output properties. Additionally, the ModuleBayTemplate resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing ModuleBayTemplate Resource
Get an existing ModuleBayTemplate 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?: ModuleBayTemplateState, opts?: CustomResourceOptions): ModuleBayTemplate@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
device_type_id: Optional[float] = None,
label: Optional[str] = None,
module_bay_template_id: Optional[str] = None,
name: Optional[str] = None,
position: Optional[str] = None) -> ModuleBayTemplatefunc GetModuleBayTemplate(ctx *Context, name string, id IDInput, state *ModuleBayTemplateState, opts ...ResourceOption) (*ModuleBayTemplate, error)public static ModuleBayTemplate Get(string name, Input<string> id, ModuleBayTemplateState? state, CustomResourceOptions? opts = null)public static ModuleBayTemplate get(String name, Output<String> id, ModuleBayTemplateState state, CustomResourceOptions options)resources: _: type: netbox:ModuleBayTemplate get: id: ${id}import {
to = netbox_module_bay_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.
- Description string
- Device
Type doubleId - Label string
- Module
Bay stringTemplate Id - The ID of this resource.
- Name string
- Position string
- Identifier to reference when renaming installed components.
- Description string
- Device
Type float64Id - Label string
- Module
Bay stringTemplate Id - The ID of this resource.
- Name string
- Position string
- Identifier to reference when renaming installed components.
- description string
- device_
type_ numberid - label string
- module_
bay_ stringtemplate_ id - The ID of this resource.
- name string
- position string
- Identifier to reference when renaming installed components.
- description String
- device
Type DoubleId - label String
- module
Bay StringTemplate Id - The ID of this resource.
- name String
- position String
- Identifier to reference when renaming installed components.
- description string
- device
Type numberId - label string
- module
Bay stringTemplate Id - The ID of this resource.
- name string
- position string
- Identifier to reference when renaming installed components.
- description str
- device_
type_ floatid - label str
- module_
bay_ strtemplate_ id - The ID of this resource.
- name str
- position str
- Identifier to reference when renaming installed components.
- description String
- device
Type NumberId - label String
- module
Bay StringTemplate Id - The ID of this resource.
- name String
- position String
- Identifier to reference when renaming installed components.
Package Details
- Repository
- netbox e-breuninger/terraform-provider-netbox
- License
- Notes
- This Pulumi package is based on the
netboxTerraform Provider.
published on Wednesday, Jul 15, 2026 by e-breuninger