1. Packages
  2. Packages
  3. Netbox Provider
  4. API Docs
  5. Interface
Viewing docs for netbox 5.4.0
published on Friday, May 29, 2026 by e-breuninger
Viewing docs for netbox 5.4.0
published on Friday, May 29, 2026 by e-breuninger

    From the official documentation:

    Virtual machine interfaces behave similarly to device interfaces, and can be assigned to VRFs, and may have IP addresses, VLANs, and services attached to them. However, given their virtual nature, they lack properties pertaining to physical attributes. For example, VM interfaces do not have a physical type and cannot have cables attached to them.

    Create Interface Resource

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

    Constructor syntax

    new Interface(name: string, args: InterfaceArgs, opts?: CustomResourceOptions);
    @overload
    def Interface(resource_name: str,
                  args: InterfaceArgs,
                  opts: Optional[ResourceOptions] = None)
    
    @overload
    def Interface(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  virtual_machine_id: Optional[float] = None,
                  bridge_interface_id: Optional[float] = None,
                  description: Optional[str] = None,
                  enabled: Optional[bool] = None,
                  interface_id: Optional[str] = None,
                  mode: Optional[str] = None,
                  mtu: Optional[float] = None,
                  name: Optional[str] = None,
                  tagged_vlans: Optional[Sequence[float]] = None,
                  tags: Optional[Sequence[str]] = None,
                  type: Optional[str] = None,
                  untagged_vlan: Optional[float] = None)
    func NewInterface(ctx *Context, name string, args InterfaceArgs, opts ...ResourceOption) (*Interface, error)
    public Interface(string name, InterfaceArgs args, CustomResourceOptions? opts = null)
    public Interface(String name, InterfaceArgs args)
    public Interface(String name, InterfaceArgs args, CustomResourceOptions options)
    
    type: netbox:Interface
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "netbox_interface" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args InterfaceArgs
    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 InterfaceArgs
    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 InterfaceArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args InterfaceArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args InterfaceArgs
    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 interfaceResource = new Netbox.Interface("interfaceResource", new()
    {
        VirtualMachineId = 0,
        BridgeInterfaceId = 0,
        Description = "string",
        Enabled = false,
        InterfaceId = "string",
        Mode = "string",
        Mtu = 0,
        Name = "string",
        TaggedVlans = new[]
        {
            0,
        },
        Tags = new[]
        {
            "string",
        },
        UntaggedVlan = 0,
    });
    
    example, err := netbox.NewInterface(ctx, "interfaceResource", &netbox.InterfaceArgs{
    	VirtualMachineId:  pulumi.Float64(0),
    	BridgeInterfaceId: pulumi.Float64(0),
    	Description:       pulumi.String("string"),
    	Enabled:           pulumi.Bool(false),
    	InterfaceId:       pulumi.String("string"),
    	Mode:              pulumi.String("string"),
    	Mtu:               pulumi.Float64(0),
    	Name:              pulumi.String("string"),
    	TaggedVlans: pulumi.Float64Array{
    		pulumi.Float64(0),
    	},
    	Tags: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	UntaggedVlan: pulumi.Float64(0),
    })
    
    resource "netbox_interface" "interfaceResource" {
      virtual_machine_id  = 0
      bridge_interface_id = 0
      description         = "string"
      enabled             = false
      interface_id        = "string"
      mode                = "string"
      mtu                 = 0
      name                = "string"
      tagged_vlans        = [0]
      tags                = ["string"]
      untagged_vlan       = 0
    }
    
    var interfaceResource = new Interface("interfaceResource", InterfaceArgs.builder()
        .virtualMachineId(0.0)
        .bridgeInterfaceId(0.0)
        .description("string")
        .enabled(false)
        .interfaceId("string")
        .mode("string")
        .mtu(0.0)
        .name("string")
        .taggedVlans(0.0)
        .tags("string")
        .untaggedVlan(0.0)
        .build());
    
    interface_resource = netbox.Interface("interfaceResource",
        virtual_machine_id=float(0),
        bridge_interface_id=float(0),
        description="string",
        enabled=False,
        interface_id="string",
        mode="string",
        mtu=float(0),
        name="string",
        tagged_vlans=[float(0)],
        tags=["string"],
        untagged_vlan=float(0))
    
    const interfaceResource = new netbox.Interface("interfaceResource", {
        virtualMachineId: 0,
        bridgeInterfaceId: 0,
        description: "string",
        enabled: false,
        interfaceId: "string",
        mode: "string",
        mtu: 0,
        name: "string",
        taggedVlans: [0],
        tags: ["string"],
        untaggedVlan: 0,
    });
    
    type: netbox:Interface
    properties:
        bridgeInterfaceId: 0
        description: string
        enabled: false
        interfaceId: string
        mode: string
        mtu: 0
        name: string
        taggedVlans:
            - 0
        tags:
            - string
        untaggedVlan: 0
        virtualMachineId: 0
    

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

    VirtualMachineId double
    BridgeInterfaceId double
    ID of the bridge interface this interface belongs to.
    Description string
    Enabled bool
    Defaults to true.
    InterfaceId string
    The ID of this resource.
    Mode string
    Valid values are access, tagged and tagged-all.
    Mtu double
    Name string
    TaggedVlans List<double>
    Tags List<string>
    Type string

    Deprecated: Deprecated

    UntaggedVlan double
    VirtualMachineId float64
    BridgeInterfaceId float64
    ID of the bridge interface this interface belongs to.
    Description string
    Enabled bool
    Defaults to true.
    InterfaceId string
    The ID of this resource.
    Mode string
    Valid values are access, tagged and tagged-all.
    Mtu float64
    Name string
    TaggedVlans []float64
    Tags []string
    Type string

    Deprecated: Deprecated

    UntaggedVlan float64
    virtual_machine_id number
    bridge_interface_id number
    ID of the bridge interface this interface belongs to.
    description string
    enabled bool
    Defaults to true.
    interface_id string
    The ID of this resource.
    mode string
    Valid values are access, tagged and tagged-all.
    mtu number
    name string
    tagged_vlans list(number)
    tags list(string)
    type string

    Deprecated: Deprecated

    untagged_vlan number
    virtualMachineId Double
    bridgeInterfaceId Double
    ID of the bridge interface this interface belongs to.
    description String
    enabled Boolean
    Defaults to true.
    interfaceId String
    The ID of this resource.
    mode String
    Valid values are access, tagged and tagged-all.
    mtu Double
    name String
    taggedVlans List<Double>
    tags List<String>
    type String

    Deprecated: Deprecated

    untaggedVlan Double
    virtualMachineId number
    bridgeInterfaceId number
    ID of the bridge interface this interface belongs to.
    description string
    enabled boolean
    Defaults to true.
    interfaceId string
    The ID of this resource.
    mode string
    Valid values are access, tagged and tagged-all.
    mtu number
    name string
    taggedVlans number[]
    tags string[]
    type string

    Deprecated: Deprecated

    untaggedVlan number
    virtual_machine_id float
    bridge_interface_id float
    ID of the bridge interface this interface belongs to.
    description str
    enabled bool
    Defaults to true.
    interface_id str
    The ID of this resource.
    mode str
    Valid values are access, tagged and tagged-all.
    mtu float
    name str
    tagged_vlans Sequence[float]
    tags Sequence[str]
    type str

    Deprecated: Deprecated

    untagged_vlan float
    virtualMachineId Number
    bridgeInterfaceId Number
    ID of the bridge interface this interface belongs to.
    description String
    enabled Boolean
    Defaults to true.
    interfaceId String
    The ID of this resource.
    mode String
    Valid values are access, tagged and tagged-all.
    mtu Number
    name String
    taggedVlans List<Number>
    tags List<String>
    type String

    Deprecated: Deprecated

    untaggedVlan Number

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    MacAddress string
    PrimaryMacAddressId double
    The primary MAC address id.
    TagsAlls List<string>
    Id string
    The provider-assigned unique ID for this managed resource.
    MacAddress string
    PrimaryMacAddressId float64
    The primary MAC address id.
    TagsAlls []string
    id string
    The provider-assigned unique ID for this managed resource.
    mac_address string
    primary_mac_address_id number
    The primary MAC address id.
    tags_alls list(string)
    id String
    The provider-assigned unique ID for this managed resource.
    macAddress String
    primaryMacAddressId Double
    The primary MAC address id.
    tagsAlls List<String>
    id string
    The provider-assigned unique ID for this managed resource.
    macAddress string
    primaryMacAddressId number
    The primary MAC address id.
    tagsAlls string[]
    id str
    The provider-assigned unique ID for this managed resource.
    mac_address str
    primary_mac_address_id float
    The primary MAC address id.
    tags_alls Sequence[str]
    id String
    The provider-assigned unique ID for this managed resource.
    macAddress String
    primaryMacAddressId Number
    The primary MAC address id.
    tagsAlls List<String>

    Look up Existing Interface Resource

    Get an existing Interface 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?: InterfaceState, opts?: CustomResourceOptions): Interface
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            bridge_interface_id: Optional[float] = None,
            description: Optional[str] = None,
            enabled: Optional[bool] = None,
            interface_id: Optional[str] = None,
            mac_address: Optional[str] = None,
            mode: Optional[str] = None,
            mtu: Optional[float] = None,
            name: Optional[str] = None,
            primary_mac_address_id: Optional[float] = None,
            tagged_vlans: Optional[Sequence[float]] = None,
            tags: Optional[Sequence[str]] = None,
            tags_alls: Optional[Sequence[str]] = None,
            type: Optional[str] = None,
            untagged_vlan: Optional[float] = None,
            virtual_machine_id: Optional[float] = None) -> Interface
    func GetInterface(ctx *Context, name string, id IDInput, state *InterfaceState, opts ...ResourceOption) (*Interface, error)
    public static Interface Get(string name, Input<string> id, InterfaceState? state, CustomResourceOptions? opts = null)
    public static Interface get(String name, Output<String> id, InterfaceState state, CustomResourceOptions options)
    resources:  _:    type: netbox:Interface    get:      id: ${id}
    import {
      to = netbox_interface.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:
    BridgeInterfaceId double
    ID of the bridge interface this interface belongs to.
    Description string
    Enabled bool
    Defaults to true.
    InterfaceId string
    The ID of this resource.
    MacAddress string
    Mode string
    Valid values are access, tagged and tagged-all.
    Mtu double
    Name string
    PrimaryMacAddressId double
    The primary MAC address id.
    TaggedVlans List<double>
    Tags List<string>
    TagsAlls List<string>
    Type string

    Deprecated: Deprecated

    UntaggedVlan double
    VirtualMachineId double
    BridgeInterfaceId float64
    ID of the bridge interface this interface belongs to.
    Description string
    Enabled bool
    Defaults to true.
    InterfaceId string
    The ID of this resource.
    MacAddress string
    Mode string
    Valid values are access, tagged and tagged-all.
    Mtu float64
    Name string
    PrimaryMacAddressId float64
    The primary MAC address id.
    TaggedVlans []float64
    Tags []string
    TagsAlls []string
    Type string

    Deprecated: Deprecated

    UntaggedVlan float64
    VirtualMachineId float64
    bridge_interface_id number
    ID of the bridge interface this interface belongs to.
    description string
    enabled bool
    Defaults to true.
    interface_id string
    The ID of this resource.
    mac_address string
    mode string
    Valid values are access, tagged and tagged-all.
    mtu number
    name string
    primary_mac_address_id number
    The primary MAC address id.
    tagged_vlans list(number)
    tags list(string)
    tags_alls list(string)
    type string

    Deprecated: Deprecated

    untagged_vlan number
    virtual_machine_id number
    bridgeInterfaceId Double
    ID of the bridge interface this interface belongs to.
    description String
    enabled Boolean
    Defaults to true.
    interfaceId String
    The ID of this resource.
    macAddress String
    mode String
    Valid values are access, tagged and tagged-all.
    mtu Double
    name String
    primaryMacAddressId Double
    The primary MAC address id.
    taggedVlans List<Double>
    tags List<String>
    tagsAlls List<String>
    type String

    Deprecated: Deprecated

    untaggedVlan Double
    virtualMachineId Double
    bridgeInterfaceId number
    ID of the bridge interface this interface belongs to.
    description string
    enabled boolean
    Defaults to true.
    interfaceId string
    The ID of this resource.
    macAddress string
    mode string
    Valid values are access, tagged and tagged-all.
    mtu number
    name string
    primaryMacAddressId number
    The primary MAC address id.
    taggedVlans number[]
    tags string[]
    tagsAlls string[]
    type string

    Deprecated: Deprecated

    untaggedVlan number
    virtualMachineId number
    bridge_interface_id float
    ID of the bridge interface this interface belongs to.
    description str
    enabled bool
    Defaults to true.
    interface_id str
    The ID of this resource.
    mac_address str
    mode str
    Valid values are access, tagged and tagged-all.
    mtu float
    name str
    primary_mac_address_id float
    The primary MAC address id.
    tagged_vlans Sequence[float]
    tags Sequence[str]
    tags_alls Sequence[str]
    type str

    Deprecated: Deprecated

    untagged_vlan float
    virtual_machine_id float
    bridgeInterfaceId Number
    ID of the bridge interface this interface belongs to.
    description String
    enabled Boolean
    Defaults to true.
    interfaceId String
    The ID of this resource.
    macAddress String
    mode String
    Valid values are access, tagged and tagged-all.
    mtu Number
    name String
    primaryMacAddressId Number
    The primary MAC address id.
    taggedVlans List<Number>
    tags List<String>
    tagsAlls List<String>
    type String

    Deprecated: Deprecated

    untaggedVlan Number
    virtualMachineId Number

    Package Details

    Repository
    netbox e-breuninger/terraform-provider-netbox
    License
    Notes
    This Pulumi package is based on the netbox Terraform Provider.
    Viewing docs for netbox 5.4.0
    published on Friday, May 29, 2026 by e-breuninger

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial