published on Wednesday, Nov 4, 2026 by e-breuninger
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 = netbox.getFrontPortTemplate({
name: "test-front_port_template",
});
import pulumi
import pulumi_netbox as netbox
test = netbox.get_front_port_template(name="test-front_port_template")
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.LookupFrontPortTemplate(ctx, &netbox.LookupFrontPortTemplateArgs{
Name: pulumi.StringRef("test-front_port_template"),
}, 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.GetFrontPortTemplate.Invoke(new()
{
Name = "test-front_port_template",
});
});
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.GetFrontPortTemplateArgs;
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.getFrontPortTemplate(GetFrontPortTemplateArgs.builder()
.name("test-front_port_template")
.build());
}
}
variables:
test:
fn::invoke:
function: netbox:getFrontPortTemplate
arguments:
name: test-front_port_template
Example coming soon!
Using getFrontPortTemplate
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 getFrontPortTemplate(args: GetFrontPortTemplateArgs, opts?: InvokeOptions): Promise<GetFrontPortTemplateResult>
function getFrontPortTemplateOutput(args: GetFrontPortTemplateOutputArgs, opts?: InvokeOutputOptions): Output<GetFrontPortTemplateResult>def get_front_port_template(id: Optional[float] = None,
module_type_id: Optional[float] = None,
name: Optional[str] = None,
type: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetFrontPortTemplateResult
def get_front_port_template_output(id: pulumi.Input[Optional[float]] = None,
module_type_id: pulumi.Input[Optional[float]] = None,
name: pulumi.Input[Optional[str]] = None,
type: pulumi.Input[Optional[str]] = None,
opts: Optional[InvokeOutputOptions] = None) -> Output[GetFrontPortTemplateResult]func LookupFrontPortTemplate(ctx *Context, args *LookupFrontPortTemplateArgs, opts ...InvokeOption) (*LookupFrontPortTemplateResult, error)
func LookupFrontPortTemplateOutput(ctx *Context, args *LookupFrontPortTemplateOutputArgs, opts ...InvokeOption) LookupFrontPortTemplateResultOutput> Note: This function is named LookupFrontPortTemplate in the Go SDK.
public static class GetFrontPortTemplate
{
public static Task<GetFrontPortTemplateResult> InvokeAsync(GetFrontPortTemplateArgs args, InvokeOptions? opts = null)
public static Output<GetFrontPortTemplateResult> Invoke(GetFrontPortTemplateInvokeArgs args, InvokeOptions? opts = null)
public static Output<GetFrontPortTemplateResult> Invoke(GetFrontPortTemplateInvokeArgs args, InvokeOutputOptions opts)
}public static CompletableFuture<GetFrontPortTemplateResult> getFrontPortTemplate(GetFrontPortTemplateArgs args, InvokeOptions options)
public static Output<GetFrontPortTemplateResult> getFrontPortTemplate(GetFrontPortTemplateArgs args, InvokeOptions options)
public static Output<GetFrontPortTemplateResult> getFrontPortTemplate(GetFrontPortTemplateArgs args, InvokeOutputOptions options)
fn::invoke:
function: netbox:index/getFrontPortTemplate:getFrontPortTemplate
arguments:
# arguments dictionarydata "netbox_get_front_port_template" "name" {
# arguments
}The following arguments are supported:
- Id double
- NetBox id.
- Module
Type doubleId - Id of the module type. Set exactly one of devicetypeid and moduletypeid; NetBox rejects both and neither.
- Name string
- Type string
- Port type as its NetBox slug, e.g. 8p8c, lc, mpo (any of NetBox's port type choices).
- Id float64
- NetBox id.
- Module
Type float64Id - Id of the module type. Set exactly one of devicetypeid and moduletypeid; NetBox rejects both and neither.
- Name string
- Type string
- Port type as its NetBox slug, e.g. 8p8c, lc, mpo (any of NetBox's port type choices).
- id number
- NetBox id.
- module_
type_ numberid - Id of the module type. Set exactly one of devicetypeid and moduletypeid; NetBox rejects both and neither.
- name string
- type string
- Port type as its NetBox slug, e.g. 8p8c, lc, mpo (any of NetBox's port type choices).
- id Double
- NetBox id.
- module
Type DoubleId - Id of the module type. Set exactly one of devicetypeid and moduletypeid; NetBox rejects both and neither.
- name String
- type String
- Port type as its NetBox slug, e.g. 8p8c, lc, mpo (any of NetBox's port type choices).
- id number
- NetBox id.
- module
Type numberId - Id of the module type. Set exactly one of devicetypeid and moduletypeid; NetBox rejects both and neither.
- name string
- type string
- Port type as its NetBox slug, e.g. 8p8c, lc, mpo (any of NetBox's port type choices).
- id float
- NetBox id.
- module_
type_ floatid - Id of the module type. Set exactly one of devicetypeid and moduletypeid; NetBox rejects both and neither.
- name str
- type str
- Port type as its NetBox slug, e.g. 8p8c, lc, mpo (any of NetBox's port type choices).
- id Number
- NetBox id.
- module
Type NumberId - Id of the module type. Set exactly one of devicetypeid and moduletypeid; NetBox rejects both and neither.
- name String
- type String
- Port type as its NetBox slug, e.g. 8p8c, lc, mpo (any of NetBox's port type choices).
getFrontPortTemplate Result
The following output properties are available:
- Color
Hex string - RGB color in hex (e.g. ff0000).
- Created string
- Description string
- Device
Type doubleId - Id of the device type. Set exactly one of devicetypeid and moduletypeid; NetBox rejects both and neither.
- Id double
- NetBox id.
- Label string
- Physical label.
- Last
Updated string - Module
Type doubleId - 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.
- Rear
Port doubleId - 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 doublePosition - Position on rearportid. Requires rearportid. Must be a whole number.
- Rear
Ports List<GetFront Port Template Rear Port> - 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 float64Id - Id of the device type. Set exactly one of devicetypeid and moduletypeid; NetBox rejects both and neither.
- Id float64
- NetBox id.
- Label string
- Physical label.
- Last
Updated string - Module
Type float64Id - 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.
- Rear
Port float64Id - 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 float64Position - Position on rearportid. Requires rearportid. Must be a whole number.
- Rear
Ports []GetFront Port Template Rear Port - 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_ numberid - Id of the device type. Set exactly one of devicetypeid and moduletypeid; NetBox rejects both and neither.
- id number
- NetBox id.
- label string
- Physical label.
- last_
updated string - module_
type_ numberid - 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_ numberid - 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_ numberposition - 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
- color
Hex String - RGB color in hex (e.g. ff0000).
- created String
- description String
- device
Type DoubleId - Id of the device type. Set exactly one of devicetypeid and moduletypeid; NetBox rejects both and neither.
- id Double
- NetBox id.
- label String
- Physical label.
- last
Updated String - module
Type DoubleId - 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.
- rear
Port DoubleId - 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 DoublePosition - Position on rearportid. Requires rearportid. Must be a whole number.
- rear
Ports List<GetFront Port Template Rear Port> - 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 numberId - Id of the device type. Set exactly one of devicetypeid and moduletypeid; NetBox rejects both and neither.
- id number
- NetBox id.
- label string
- Physical label.
- last
Updated string - module
Type numberId - 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 numberId - 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 numberPosition - Position on rearportid. Requires rearportid. Must be a whole number.
- rear
Ports GetFront Port Template Rear Port[] - 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_ floatid - Id of the device type. Set exactly one of devicetypeid and moduletypeid; NetBox rejects both and neither.
- id float
- NetBox id.
- label str
- Physical label.
- last_
updated str - module_
type_ floatid - 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_ floatid - 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_ floatposition - Position on rearportid. Requires rearportid. Must be a whole number.
- rear_
ports Sequence[GetFront Port Template Rear Port] - 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
- color
Hex String - RGB color in hex (e.g. ff0000).
- created String
- description String
- device
Type NumberId - Id of the device type. Set exactly one of devicetypeid and moduletypeid; NetBox rejects both and neither.
- id Number
- NetBox id.
- label String
- Physical label.
- last
Updated String - module
Type NumberId - 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 NumberId - 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 NumberPosition - Position on rearportid. Requires rearportid. Must be a whole number.
- rear
Ports 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
GetFrontPortTemplateRearPort
- Position double
- Position on the front port, 1-based and unique per port. Must be a whole number.
- Rear
Port doubleId - Id of the rear port template the position maps to.
- Rear
Port doublePosition - 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.
- Rear
Port float64Id - Id of the rear port template the position maps to.
- Rear
Port float64Position - 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_ numberid - Id of the rear port template the position maps to.
- rear_
port_ numberposition - 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.
- rear
Port DoubleId - Id of the rear port template the position maps to.
- rear
Port DoublePosition - 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 numberId - Id of the rear port template the position maps to.
- rear
Port numberPosition - 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_ floatid - Id of the rear port template the position maps to.
- rear_
port_ floatposition - 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 NumberId - Id of the rear port template the position maps to.
- rear
Port NumberPosition - Position on that rear port, 1-based; each rear port position takes one mapping. Must be a whole number.
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