1. Registry
  2. Packages
  3. Netbox Provider
  4. API Docs
  5. FrontPortTemplate
Viewing docs for netbox 6.0.0
published on Wednesday, Nov 4, 2026 by e-breuninger

netbox.FrontPortTemplate

netbox
Viewing docs for netbox 6.0.0
published on Wednesday, Nov 4, 2026 by e-breuninger

    A front port template of a device type or module type (dcim.frontporttemplate), mapped position by position onto rear port templates of the same type.

    From the official documentation:

    A template for a front-facing pass-through port that will be created on all instantiations of the parent device type. See the front port 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 testRearPortTemplate = new netbox.RearPortTemplate("test", {
        deviceTypeId: testDeviceType.deviceTypeId,
        name: "test-rear-port-template",
        type: "8p8c",
        positions: 4,
    });
    const testFrontPortTemplate = new netbox.FrontPortTemplate("test", {
        deviceTypeId: testDeviceType.deviceTypeId,
        name: "test-front-port-template",
        type: "8p8c",
        rearPortId: testRearPortTemplate.rearPortTemplateId,
        rearPortPosition: 2,
        colorHex: "ff0000",
        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_rear_port_template = netbox.RearPortTemplate("test",
        device_type_id=test_device_type.device_type_id,
        name="test-rear-port-template",
        type="8p8c",
        positions=4)
    test_front_port_template = netbox.FrontPortTemplate("test",
        device_type_id=test_device_type.device_type_id,
        name="test-front-port-template",
        type="8p8c",
        rear_port_id=test_rear_port_template.rear_port_template_id,
        rear_port_position=2,
        color_hex="ff0000",
        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
    		}
    		testRearPortTemplate, err := netbox.NewRearPortTemplate(ctx, "test", &netbox.RearPortTemplateArgs{
    			DeviceTypeId: testDeviceType.DeviceTypeId,
    			Name:         pulumi.String("test-rear-port-template"),
    			Type:         pulumi.String("8p8c"),
    			Positions:    pulumi.Float64(4),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = netbox.NewFrontPortTemplate(ctx, "test", &netbox.FrontPortTemplateArgs{
    			DeviceTypeId:     testDeviceType.DeviceTypeId,
    			Name:             pulumi.String("test-front-port-template"),
    			Type:             pulumi.String("8p8c"),
    			RearPortId:       testRearPortTemplate.RearPortTemplateId,
    			RearPortPosition: pulumi.Float64(2),
    			ColorHex:         pulumi.String("ff0000"),
    			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 testRearPortTemplate = new Netbox.RearPortTemplate("test", new()
        {
            DeviceTypeId = testDeviceType.DeviceTypeId,
            Name = "test-rear-port-template",
            Type = "8p8c",
            Positions = 4,
        });
    
        var testFrontPortTemplate = new Netbox.FrontPortTemplate("test", new()
        {
            DeviceTypeId = testDeviceType.DeviceTypeId,
            Name = "test-front-port-template",
            Type = "8p8c",
            RearPortId = testRearPortTemplate.RearPortTemplateId,
            RearPortPosition = 2,
            ColorHex = "ff0000",
            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.RearPortTemplate;
    import com.pulumi.netbox.RearPortTemplateArgs;
    import com.pulumi.netbox.FrontPortTemplate;
    import com.pulumi.netbox.FrontPortTemplateArgs;
    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 testRearPortTemplate = new RearPortTemplate("testRearPortTemplate", RearPortTemplateArgs.builder()
                .deviceTypeId(testDeviceType.deviceTypeId())
                .name("test-rear-port-template")
                .type("8p8c")
                .positions(4.0)
                .build());
    
            var testFrontPortTemplate = new FrontPortTemplate("testFrontPortTemplate", FrontPortTemplateArgs.builder()
                .deviceTypeId(testDeviceType.deviceTypeId())
                .name("test-front-port-template")
                .type("8p8c")
                .rearPortId(testRearPortTemplate.rearPortTemplateId())
                .rearPortPosition(2.0)
                .colorHex("ff0000")
                .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
      testRearPortTemplate:
        type: netbox:RearPortTemplate
        name: test
        properties:
          deviceTypeId: ${testDeviceType.deviceTypeId}
          name: test-rear-port-template
          type: 8p8c
          positions: 4
      testFrontPortTemplate:
        type: netbox:FrontPortTemplate
        name: test
        properties:
          deviceTypeId: ${testDeviceType.deviceTypeId}
          name: test-front-port-template
          type: 8p8c
          rearPortId: ${testRearPortTemplate.rearPortTemplateId}
          rearPortPosition: 2
          colorHex: ff0000
          label: test-label
          description: test-description
    
    Example coming soon!
    

    Create FrontPortTemplate Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new FrontPortTemplate(name: string, args: FrontPortTemplateArgs, opts?: CustomResourceOptions);
    @overload
    def FrontPortTemplate(resource_name: str,
                          args: FrontPortTemplateArgs,
                          opts: Optional[ResourceOptions] = None)
    
    @overload
    def FrontPortTemplate(resource_name: str,
                          opts: Optional[ResourceOptions] = None,
                          type: Optional[str] = None,
                          color_hex: Optional[str] = None,
                          description: Optional[str] = None,
                          device_type_id: Optional[float] = None,
                          label: Optional[str] = None,
                          module_type_id: Optional[float] = None,
                          name: Optional[str] = None,
                          positions: Optional[float] = None,
                          rear_port_id: Optional[float] = None,
                          rear_port_position: Optional[float] = None,
                          rear_ports: Optional[Sequence[FrontPortTemplateRearPortArgs]] = None)
    func NewFrontPortTemplate(ctx *Context, name string, args FrontPortTemplateArgs, opts ...ResourceOption) (*FrontPortTemplate, error)
    public FrontPortTemplate(string name, FrontPortTemplateArgs args, CustomResourceOptions? opts = null)
    public FrontPortTemplate(String name, FrontPortTemplateArgs args)
    public FrontPortTemplate(String name, FrontPortTemplateArgs args, CustomResourceOptions options)
    
    type: netbox:FrontPortTemplate
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "netbox_front_port_template" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args FrontPortTemplateArgs
    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 FrontPortTemplateArgs
    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 FrontPortTemplateArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args FrontPortTemplateArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args FrontPortTemplateArgs
    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 frontPortTemplateResource = new Netbox.FrontPortTemplate("frontPortTemplateResource", new()
    {
        Type = "string",
        ColorHex = "string",
        Description = "string",
        DeviceTypeId = 0.0,
        Label = "string",
        ModuleTypeId = 0.0,
        Name = "string",
        Positions = 0.0,
        RearPortId = 0.0,
        RearPortPosition = 0.0,
        RearPorts = new[]
        {
            new Netbox.Inputs.FrontPortTemplateRearPortArgs
            {
                Position = 0.0,
                RearPortId = 0.0,
                RearPortPosition = 0.0,
            },
        },
    });
    
    example, err := netbox.NewFrontPortTemplate(ctx, "frontPortTemplateResource", &netbox.FrontPortTemplateArgs{
    	Type:             pulumi.String("string"),
    	ColorHex:         pulumi.String("string"),
    	Description:      pulumi.String("string"),
    	DeviceTypeId:     pulumi.Float64(0),
    	Label:            pulumi.String("string"),
    	ModuleTypeId:     pulumi.Float64(0),
    	Name:             pulumi.String("string"),
    	Positions:        pulumi.Float64(0),
    	RearPortId:       pulumi.Float64(0),
    	RearPortPosition: pulumi.Float64(0),
    	RearPorts: netbox.FrontPortTemplateRearPortArray{
    		&netbox.FrontPortTemplateRearPortArgs{
    			Position:         pulumi.Float64(0),
    			RearPortId:       pulumi.Float64(0),
    			RearPortPosition: pulumi.Float64(0),
    		},
    	},
    })
    
    resource "netbox_front_port_template" "frontPortTemplateResource" {
      lifecycle {
        create_before_destroy = true
      }
      type               = "string"
      color_hex          = "string"
      description        = "string"
      device_type_id     = 0
      label              = "string"
      module_type_id     = 0
      name               = "string"
      positions          = 0
      rear_port_id       = 0
      rear_port_position = 0
      rear_ports {
        position           = 0
        rear_port_id       = 0
        rear_port_position = 0
      }
    }
    
    var frontPortTemplateResource = new FrontPortTemplate("frontPortTemplateResource", FrontPortTemplateArgs.builder()
        .type("string")
        .colorHex("string")
        .description("string")
        .deviceTypeId(0.0)
        .label("string")
        .moduleTypeId(0.0)
        .name("string")
        .positions(0.0)
        .rearPortId(0.0)
        .rearPortPosition(0.0)
        .rearPorts(FrontPortTemplateRearPortArgs.builder()
            .position(0.0)
            .rearPortId(0.0)
            .rearPortPosition(0.0)
            .build())
        .build());
    
    front_port_template_resource = netbox.FrontPortTemplate("frontPortTemplateResource",
        type="string",
        color_hex="string",
        description="string",
        device_type_id=float(0),
        label="string",
        module_type_id=float(0),
        name="string",
        positions=float(0),
        rear_port_id=float(0),
        rear_port_position=float(0),
        rear_ports=[{
            "position": float(0),
            "rear_port_id": float(0),
            "rear_port_position": float(0),
        }])
    
    const frontPortTemplateResource = new netbox.FrontPortTemplate("frontPortTemplateResource", {
        type: "string",
        colorHex: "string",
        description: "string",
        deviceTypeId: 0,
        label: "string",
        moduleTypeId: 0,
        name: "string",
        positions: 0,
        rearPortId: 0,
        rearPortPosition: 0,
        rearPorts: [{
            position: 0,
            rearPortId: 0,
            rearPortPosition: 0,
        }],
    });
    
    type: netbox:FrontPortTemplate
    properties:
        colorHex: string
        description: string
        deviceTypeId: 0
        label: string
        moduleTypeId: 0
        name: string
        positions: 0
        rearPortId: 0
        rearPortPosition: 0
        rearPorts:
            - position: 0
              rearPortId: 0
              rearPortPosition: 0
        type: string
    

    FrontPortTemplate 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 FrontPortTemplate resource accepts the following input properties:

    Type string
    Port type as its NetBox slug, e.g. 8p8c, lc, mpo (any of NetBox's port type choices).
    ColorHex string
    RGB color in hex (e.g. ff0000).
    Description string
    DeviceTypeId double
    Id of the device type. Set exactly one of devicetypeid and moduletypeid; NetBox rejects both and neither.
    Label string
    Physical label.
    ModuleTypeId double
    Id of the module type. Set exactly one of devicetypeid and moduletypeid; NetBox rejects both and neither.
    Name string
    Positions double
    Number of positions on the front port, at least the number of rear_ports mappings. NetBox checks a lower value against the mappings it already holds, so remove mappings in one apply and lower positions in the next. Must be a whole number.
    RearPortId double
    Rear port of a single-position front port: the same as rearports = [{position = 1, rearportid = ..., rearportposition = ...}]. Conflicts with rearports and with positions > 1.
    RearPortPosition double
    Position on rearportid. Requires rearportid. Must be a whole number.
    RearPorts List<FrontPortTemplateRearPort>
    Mappings of the front port's positions onto rear port templates of the same device type or module type, one object per position. Derived from rearportid and rearportposition when those are set; an empty set, or neither form, leaves the port unmapped. Changing the set recreates every mapping, since NetBox 4.6 rejects an update that resends an existing one.
    Type string
    Port type as its NetBox slug, e.g. 8p8c, lc, mpo (any of NetBox's port type choices).
    ColorHex string
    RGB color in hex (e.g. ff0000).
    Description string
    DeviceTypeId float64
    Id of the device type. Set exactly one of devicetypeid and moduletypeid; NetBox rejects both and neither.
    Label string
    Physical label.
    ModuleTypeId float64
    Id of the module type. Set exactly one of devicetypeid and moduletypeid; NetBox rejects both and neither.
    Name string
    Positions float64
    Number of positions on the front port, at least the number of rear_ports mappings. NetBox checks a lower value against the mappings it already holds, so remove mappings in one apply and lower positions in the next. Must be a whole number.
    RearPortId float64
    Rear port of a single-position front port: the same as rearports = [{position = 1, rearportid = ..., rearportposition = ...}]. Conflicts with rearports and with positions > 1.
    RearPortPosition float64
    Position on rearportid. Requires rearportid. Must be a whole number.
    RearPorts []FrontPortTemplateRearPortArgs
    Mappings of the front port's positions onto rear port templates of the same device type or module type, one object per position. Derived from rearportid and rearportposition when those are set; an empty set, or neither form, leaves the port unmapped. Changing the set recreates every mapping, since NetBox 4.6 rejects an update that resends an existing one.
    type string
    Port type as its NetBox slug, e.g. 8p8c, lc, mpo (any of NetBox's port type choices).
    color_hex string
    RGB color in hex (e.g. ff0000).
    description string
    device_type_id number
    Id of the device type. Set exactly one of devicetypeid and moduletypeid; NetBox rejects both and neither.
    label string
    Physical label.
    module_type_id number
    Id of the module type. Set exactly one of devicetypeid and moduletypeid; NetBox rejects both and neither.
    name string
    positions number
    Number of positions on the front port, at least the number of rear_ports mappings. NetBox checks a lower value against the mappings it already holds, so remove mappings in one apply and lower positions in the next. Must be a whole number.
    rear_port_id number
    Rear port of a single-position front port: the same as rearports = [{position = 1, rearportid = ..., rearportposition = ...}]. Conflicts with rearports and with positions > 1.
    rear_port_position number
    Position on rearportid. Requires rearportid. Must be a whole number.
    rear_ports list(object)
    Mappings of the front port's positions onto rear port templates of the same device type or module type, one object per position. Derived from rearportid and rearportposition when those are set; an empty set, or neither form, leaves the port unmapped. Changing the set recreates every mapping, since NetBox 4.6 rejects an update that resends an existing one.
    type String
    Port type as its NetBox slug, e.g. 8p8c, lc, mpo (any of NetBox's port type choices).
    colorHex String
    RGB color in hex (e.g. ff0000).
    description String
    deviceTypeId Double
    Id of the device type. Set exactly one of devicetypeid and moduletypeid; NetBox rejects both and neither.
    label String
    Physical label.
    moduleTypeId Double
    Id of the module type. Set exactly one of devicetypeid and moduletypeid; NetBox rejects both and neither.
    name String
    positions Double
    Number of positions on the front port, at least the number of rear_ports mappings. NetBox checks a lower value against the mappings it already holds, so remove mappings in one apply and lower positions in the next. Must be a whole number.
    rearPortId Double
    Rear port of a single-position front port: the same as rearports = [{position = 1, rearportid = ..., rearportposition = ...}]. Conflicts with rearports and with positions > 1.
    rearPortPosition Double
    Position on rearportid. Requires rearportid. Must be a whole number.
    rearPorts List<FrontPortTemplateRearPort>
    Mappings of the front port's positions onto rear port templates of the same device type or module type, one object per position. Derived from rearportid and rearportposition when those are set; an empty set, or neither form, leaves the port unmapped. Changing the set recreates every mapping, since NetBox 4.6 rejects an update that resends an existing one.
    type string
    Port type as its NetBox slug, e.g. 8p8c, lc, mpo (any of NetBox's port type choices).
    colorHex string
    RGB color in hex (e.g. ff0000).
    description string
    deviceTypeId number
    Id of the device type. Set exactly one of devicetypeid and moduletypeid; NetBox rejects both and neither.
    label string
    Physical label.
    moduleTypeId number
    Id of the module type. Set exactly one of devicetypeid and moduletypeid; NetBox rejects both and neither.
    name string
    positions number
    Number of positions on the front port, at least the number of rear_ports mappings. NetBox checks a lower value against the mappings it already holds, so remove mappings in one apply and lower positions in the next. Must be a whole number.
    rearPortId number
    Rear port of a single-position front port: the same as rearports = [{position = 1, rearportid = ..., rearportposition = ...}]. Conflicts with rearports and with positions > 1.
    rearPortPosition number
    Position on rearportid. Requires rearportid. Must be a whole number.
    rearPorts FrontPortTemplateRearPort[]
    Mappings of the front port's positions onto rear port templates of the same device type or module type, one object per position. Derived from rearportid and rearportposition when those are set; an empty set, or neither form, leaves the port unmapped. Changing the set recreates every mapping, since NetBox 4.6 rejects an update that resends an existing one.
    type str
    Port type as its NetBox slug, e.g. 8p8c, lc, mpo (any of NetBox's port type choices).
    color_hex str
    RGB color in hex (e.g. ff0000).
    description str
    device_type_id float
    Id of the device type. Set exactly one of devicetypeid and moduletypeid; NetBox rejects both and neither.
    label str
    Physical label.
    module_type_id float
    Id of the module type. Set exactly one of devicetypeid and moduletypeid; NetBox rejects both and neither.
    name str
    positions float
    Number of positions on the front port, at least the number of rear_ports mappings. NetBox checks a lower value against the mappings it already holds, so remove mappings in one apply and lower positions in the next. Must be a whole number.
    rear_port_id float
    Rear port of a single-position front port: the same as rearports = [{position = 1, rearportid = ..., rearportposition = ...}]. Conflicts with rearports and with positions > 1.
    rear_port_position float
    Position on rearportid. Requires rearportid. Must be a whole number.
    rear_ports Sequence[FrontPortTemplateRearPortArgs]
    Mappings of the front port's positions onto rear port templates of the same device type or module type, one object per position. Derived from rearportid and rearportposition when those are set; an empty set, or neither form, leaves the port unmapped. Changing the set recreates every mapping, since NetBox 4.6 rejects an update that resends an existing one.
    type String
    Port type as its NetBox slug, e.g. 8p8c, lc, mpo (any of NetBox's port type choices).
    colorHex String
    RGB color in hex (e.g. ff0000).
    description String
    deviceTypeId Number
    Id of the device type. Set exactly one of devicetypeid and moduletypeid; NetBox rejects both and neither.
    label String
    Physical label.
    moduleTypeId Number
    Id of the module type. Set exactly one of devicetypeid and moduletypeid; NetBox rejects both and neither.
    name String
    positions Number
    Number of positions on the front port, at least the number of rear_ports mappings. NetBox checks a lower value against the mappings it already holds, so remove mappings in one apply and lower positions in the next. Must be a whole number.
    rearPortId Number
    Rear port of a single-position front port: the same as rearports = [{position = 1, rearportid = ..., rearportposition = ...}]. Conflicts with rearports and with positions > 1.
    rearPortPosition Number
    Position on rearportid. Requires rearportid. Must be a whole number.
    rearPorts List<Property Map>
    Mappings of the front port's positions onto rear port templates of the same device type or module type, one object per position. Derived from rearportid and rearportposition when those are set; an empty set, or neither form, leaves the port unmapped. Changing the set recreates every mapping, since NetBox 4.6 rejects an update that resends an existing one.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the FrontPortTemplate resource produces the following output properties:

    Created string
    FrontPortTemplateId double
    NetBox id.
    Id string
    The provider-assigned unique ID for this managed resource.
    LastUpdated string
    Url string
    Created string
    FrontPortTemplateId float64
    NetBox id.
    Id string
    The provider-assigned unique ID for this managed resource.
    LastUpdated string
    Url string
    created string
    front_port_template_id number
    NetBox id.
    id string
    The provider-assigned unique ID for this managed resource.
    last_updated string
    url string
    created String
    frontPortTemplateId Double
    NetBox id.
    id String
    The provider-assigned unique ID for this managed resource.
    lastUpdated String
    url String
    created string
    frontPortTemplateId number
    NetBox id.
    id string
    The provider-assigned unique ID for this managed resource.
    lastUpdated string
    url string
    created str
    front_port_template_id float
    NetBox id.
    id str
    The provider-assigned unique ID for this managed resource.
    last_updated str
    url str
    created String
    frontPortTemplateId Number
    NetBox id.
    id String
    The provider-assigned unique ID for this managed resource.
    lastUpdated String
    url String

    Look up Existing FrontPortTemplate Resource

    Get an existing FrontPortTemplate 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?: FrontPortTemplateState, opts?: CustomResourceOptions): FrontPortTemplate
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            color_hex: Optional[str] = None,
            created: Optional[str] = None,
            description: Optional[str] = None,
            device_type_id: Optional[float] = None,
            front_port_template_id: Optional[float] = None,
            label: Optional[str] = None,
            last_updated: Optional[str] = None,
            module_type_id: Optional[float] = None,
            name: Optional[str] = None,
            positions: Optional[float] = None,
            rear_port_id: Optional[float] = None,
            rear_port_position: Optional[float] = None,
            rear_ports: Optional[Sequence[FrontPortTemplateRearPortArgs]] = None,
            type: Optional[str] = None,
            url: Optional[str] = None) -> FrontPortTemplate
    func GetFrontPortTemplate(ctx *Context, name string, id IDInput, state *FrontPortTemplateState, opts ...ResourceOption) (*FrontPortTemplate, error)
    public static FrontPortTemplate Get(string name, Input<string> id, FrontPortTemplateState? state, CustomResourceOptions? opts = null)
    public static FrontPortTemplate get(String name, Output<String> id, FrontPortTemplateState state, CustomResourceOptions options)
    resources:  _:    type: netbox:FrontPortTemplate    get:      id: ${id}
    import {
      to = netbox_front_port_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.
    The following state arguments are supported:
    ColorHex string
    RGB color in hex (e.g. ff0000).
    Created string
    Description string
    DeviceTypeId double
    Id of the device type. Set exactly one of devicetypeid and moduletypeid; NetBox rejects both and neither.
    FrontPortTemplateId double
    NetBox id.
    Label string
    Physical label.
    LastUpdated string
    ModuleTypeId double
    Id of the module type. Set exactly one of devicetypeid and moduletypeid; NetBox rejects both and neither.
    Name string
    Positions double
    Number of positions on the front port, at least the number of rear_ports mappings. NetBox checks a lower value against the mappings it already holds, so remove mappings in one apply and lower positions in the next. Must be a whole number.
    RearPortId double
    Rear port of a single-position front port: the same as rearports = [{position = 1, rearportid = ..., rearportposition = ...}]. Conflicts with rearports and with positions > 1.
    RearPortPosition double
    Position on rearportid. Requires rearportid. Must be a whole number.
    RearPorts List<FrontPortTemplateRearPort>
    Mappings of the front port's positions onto rear port templates of the same device type or module type, one object per position. Derived from rearportid and rearportposition when those are set; an empty set, or neither form, leaves the port unmapped. Changing the set recreates every mapping, since NetBox 4.6 rejects an update that resends an existing one.
    Type string
    Port type as its NetBox slug, e.g. 8p8c, lc, mpo (any of NetBox's port type choices).
    Url string
    ColorHex string
    RGB color in hex (e.g. ff0000).
    Created string
    Description string
    DeviceTypeId float64
    Id of the device type. Set exactly one of devicetypeid and moduletypeid; NetBox rejects both and neither.
    FrontPortTemplateId float64
    NetBox id.
    Label string
    Physical label.
    LastUpdated string
    ModuleTypeId float64
    Id of the module type. Set exactly one of devicetypeid and moduletypeid; NetBox rejects both and neither.
    Name string
    Positions float64
    Number of positions on the front port, at least the number of rear_ports mappings. NetBox checks a lower value against the mappings it already holds, so remove mappings in one apply and lower positions in the next. Must be a whole number.
    RearPortId float64
    Rear port of a single-position front port: the same as rearports = [{position = 1, rearportid = ..., rearportposition = ...}]. Conflicts with rearports and with positions > 1.
    RearPortPosition float64
    Position on rearportid. Requires rearportid. Must be a whole number.
    RearPorts []FrontPortTemplateRearPortArgs
    Mappings of the front port's positions onto rear port templates of the same device type or module type, one object per position. Derived from rearportid and rearportposition when those are set; an empty set, or neither form, leaves the port unmapped. Changing the set recreates every mapping, since NetBox 4.6 rejects an update that resends an existing one.
    Type string
    Port type as its NetBox slug, e.g. 8p8c, lc, mpo (any of NetBox's port type choices).
    Url string
    color_hex string
    RGB color in hex (e.g. ff0000).
    created string
    description string
    device_type_id number
    Id of the device type. Set exactly one of devicetypeid and moduletypeid; NetBox rejects both and neither.
    front_port_template_id number
    NetBox id.
    label string
    Physical label.
    last_updated string
    module_type_id number
    Id of the module type. Set exactly one of devicetypeid and moduletypeid; NetBox rejects both and neither.
    name string
    positions number
    Number of positions on the front port, at least the number of rear_ports mappings. NetBox checks a lower value against the mappings it already holds, so remove mappings in one apply and lower positions in the next. Must be a whole number.
    rear_port_id number
    Rear port of a single-position front port: the same as rearports = [{position = 1, rearportid = ..., rearportposition = ...}]. Conflicts with rearports and with positions > 1.
    rear_port_position number
    Position on rearportid. Requires rearportid. Must be a whole number.
    rear_ports list(object)
    Mappings of the front port's positions onto rear port templates of the same device type or module type, one object per position. Derived from rearportid and rearportposition when those are set; an empty set, or neither form, leaves the port unmapped. Changing the set recreates every mapping, since NetBox 4.6 rejects an update that resends an existing one.
    type string
    Port type as its NetBox slug, e.g. 8p8c, lc, mpo (any of NetBox's port type choices).
    url string
    colorHex String
    RGB color in hex (e.g. ff0000).
    created String
    description String
    deviceTypeId Double
    Id of the device type. Set exactly one of devicetypeid and moduletypeid; NetBox rejects both and neither.
    frontPortTemplateId Double
    NetBox id.
    label String
    Physical label.
    lastUpdated String
    moduleTypeId Double
    Id of the module type. Set exactly one of devicetypeid and moduletypeid; NetBox rejects both and neither.
    name String
    positions Double
    Number of positions on the front port, at least the number of rear_ports mappings. NetBox checks a lower value against the mappings it already holds, so remove mappings in one apply and lower positions in the next. Must be a whole number.
    rearPortId Double
    Rear port of a single-position front port: the same as rearports = [{position = 1, rearportid = ..., rearportposition = ...}]. Conflicts with rearports and with positions > 1.
    rearPortPosition Double
    Position on rearportid. Requires rearportid. Must be a whole number.
    rearPorts List<FrontPortTemplateRearPort>
    Mappings of the front port's positions onto rear port templates of the same device type or module type, one object per position. Derived from rearportid and rearportposition when those are set; an empty set, or neither form, leaves the port unmapped. Changing the set recreates every mapping, since NetBox 4.6 rejects an update that resends an existing one.
    type String
    Port type as its NetBox slug, e.g. 8p8c, lc, mpo (any of NetBox's port type choices).
    url String
    colorHex string
    RGB color in hex (e.g. ff0000).
    created string
    description string
    deviceTypeId number
    Id of the device type. Set exactly one of devicetypeid and moduletypeid; NetBox rejects both and neither.
    frontPortTemplateId number
    NetBox id.
    label string
    Physical label.
    lastUpdated string
    moduleTypeId number
    Id of the module type. Set exactly one of devicetypeid and moduletypeid; NetBox rejects both and neither.
    name string
    positions number
    Number of positions on the front port, at least the number of rear_ports mappings. NetBox checks a lower value against the mappings it already holds, so remove mappings in one apply and lower positions in the next. Must be a whole number.
    rearPortId number
    Rear port of a single-position front port: the same as rearports = [{position = 1, rearportid = ..., rearportposition = ...}]. Conflicts with rearports and with positions > 1.
    rearPortPosition number
    Position on rearportid. Requires rearportid. Must be a whole number.
    rearPorts FrontPortTemplateRearPort[]
    Mappings of the front port's positions onto rear port templates of the same device type or module type, one object per position. Derived from rearportid and rearportposition when those are set; an empty set, or neither form, leaves the port unmapped. Changing the set recreates every mapping, since NetBox 4.6 rejects an update that resends an existing one.
    type string
    Port type as its NetBox slug, e.g. 8p8c, lc, mpo (any of NetBox's port type choices).
    url string
    color_hex str
    RGB color in hex (e.g. ff0000).
    created str
    description str
    device_type_id float
    Id of the device type. Set exactly one of devicetypeid and moduletypeid; NetBox rejects both and neither.
    front_port_template_id float
    NetBox id.
    label str
    Physical label.
    last_updated str
    module_type_id float
    Id of the module type. Set exactly one of devicetypeid and moduletypeid; NetBox rejects both and neither.
    name str
    positions float
    Number of positions on the front port, at least the number of rear_ports mappings. NetBox checks a lower value against the mappings it already holds, so remove mappings in one apply and lower positions in the next. Must be a whole number.
    rear_port_id float
    Rear port of a single-position front port: the same as rearports = [{position = 1, rearportid = ..., rearportposition = ...}]. Conflicts with rearports and with positions > 1.
    rear_port_position float
    Position on rearportid. Requires rearportid. Must be a whole number.
    rear_ports Sequence[FrontPortTemplateRearPortArgs]
    Mappings of the front port's positions onto rear port templates of the same device type or module type, one object per position. Derived from rearportid and rearportposition when those are set; an empty set, or neither form, leaves the port unmapped. Changing the set recreates every mapping, since NetBox 4.6 rejects an update that resends an existing one.
    type str
    Port type as its NetBox slug, e.g. 8p8c, lc, mpo (any of NetBox's port type choices).
    url str
    colorHex String
    RGB color in hex (e.g. ff0000).
    created String
    description String
    deviceTypeId Number
    Id of the device type. Set exactly one of devicetypeid and moduletypeid; NetBox rejects both and neither.
    frontPortTemplateId Number
    NetBox id.
    label String
    Physical label.
    lastUpdated String
    moduleTypeId Number
    Id of the module type. Set exactly one of devicetypeid and moduletypeid; NetBox rejects both and neither.
    name String
    positions Number
    Number of positions on the front port, at least the number of rear_ports mappings. NetBox checks a lower value against the mappings it already holds, so remove mappings in one apply and lower positions in the next. Must be a whole number.
    rearPortId Number
    Rear port of a single-position front port: the same as rearports = [{position = 1, rearportid = ..., rearportposition = ...}]. Conflicts with rearports and with positions > 1.
    rearPortPosition Number
    Position on rearportid. Requires rearportid. Must be a whole number.
    rearPorts List<Property Map>
    Mappings of the front port's positions onto rear port templates of the same device type or module type, one object per position. Derived from rearportid and rearportposition when those are set; an empty set, or neither form, leaves the port unmapped. Changing the set recreates every mapping, since NetBox 4.6 rejects an update that resends an existing one.
    type String
    Port type as its NetBox slug, e.g. 8p8c, lc, mpo (any of NetBox's port type choices).
    url String

    Supporting Types

    FrontPortTemplateRearPort, FrontPortTemplateRearPortArgs

    Position double
    Position on the front port, 1-based and unique per port. Must be a whole number.
    RearPortId double
    Id of the rear port template the position maps to.
    RearPortPosition double
    Position on that rear port, 1-based; each rear port position takes one mapping. Must be a whole number.
    Position float64
    Position on the front port, 1-based and unique per port. Must be a whole number.
    RearPortId float64
    Id of the rear port template the position maps to.
    RearPortPosition float64
    Position on that rear port, 1-based; each rear port position takes one mapping. Must be a whole number.
    position number
    Position on the front port, 1-based and unique per port. Must be a whole number.
    rear_port_id number
    Id of the rear port template the position maps to.
    rear_port_position number
    Position on that rear port, 1-based; each rear port position takes one mapping. Must be a whole number.
    position Double
    Position on the front port, 1-based and unique per port. Must be a whole number.
    rearPortId Double
    Id of the rear port template the position maps to.
    rearPortPosition Double
    Position on that rear port, 1-based; each rear port position takes one mapping. Must be a whole number.
    position number
    Position on the front port, 1-based and unique per port. Must be a whole number.
    rearPortId number
    Id of the rear port template the position maps to.
    rearPortPosition number
    Position on that rear port, 1-based; each rear port position takes one mapping. Must be a whole number.
    position float
    Position on the front port, 1-based and unique per port. Must be a whole number.
    rear_port_id float
    Id of the rear port template the position maps to.
    rear_port_position float
    Position on that rear port, 1-based; each rear port position takes one mapping. Must be a whole number.
    position Number
    Position on the front port, 1-based and unique per port. Must be a whole number.
    rearPortId Number
    Id of the rear port template the position maps to.
    rearPortPosition Number
    Position on that rear port, 1-based; each rear port position takes one mapping. Must be a whole number.

    Import

    In Terraform v1.5.0 and later, the import block can be used with the id attribute, for example:

    terraform

    import {

    to = netbox_front_port_template.test

    id = “123”

    }

    The pulumi import command can be used, for example:

    $ pulumi import netbox:index/frontPortTemplate:FrontPortTemplate 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 netbox Terraform Provider.
    netbox
    Viewing docs for netbox 6.0.0
    published on Wednesday, Nov 4, 2026 by e-breuninger

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial