1. Registry
  2. Packages
  3. Netbox Provider
  4. API Docs
  5. VirtualMachineInterface
Viewing docs for netbox 6.0.1
published on Monday, Nov 16, 2026 by e-breuninger
netbox
Viewing docs for netbox 6.0.1
published on Monday, Nov 16, 2026 by e-breuninger

    A virtual machine interface (virtualization.vminterface).

    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.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as netbox from "@pulumi/netbox";
    
    const test = new netbox.ClusterType("test", {name: "test-cluster-type"});
    const testCluster = new netbox.Cluster("test", {
        name: "test-cluster",
        clusterTypeId: test.clusterTypeId,
    });
    const testVirtualMachine = new netbox.VirtualMachine("test", {
        name: "test-virtual-machine",
        clusterId: testCluster.clusterId,
    });
    const testA = new netbox.Vlan("test_a", {
        name: "test-vlan-a",
        vid: 100,
    });
    const testB = new netbox.Vlan("test_b", {
        name: "test-vlan-b",
        vid: 101,
    });
    const testVrf = new netbox.Vrf("test", {name: "test-vrf"});
    const testVirtualMachineInterface = new netbox.VirtualMachineInterface("test", {
        virtualMachineId: testVirtualMachine.virtualMachineId,
        name: "test-virtual-machine-interface",
        mtu: 1500,
        mode: "tagged",
        untaggedVlanId: testA.vlanId,
        taggedVlanIds: [testB.vlanId],
        vrfId: testVrf.vrfId,
        description: "test-description",
    });
    
    import pulumi
    import pulumi_netbox as netbox
    
    test = netbox.ClusterType("test", name="test-cluster-type")
    test_cluster = netbox.Cluster("test",
        name="test-cluster",
        cluster_type_id=test.cluster_type_id)
    test_virtual_machine = netbox.VirtualMachine("test",
        name="test-virtual-machine",
        cluster_id=test_cluster.cluster_id)
    test_a = netbox.Vlan("test_a",
        name="test-vlan-a",
        vid=100)
    test_b = netbox.Vlan("test_b",
        name="test-vlan-b",
        vid=101)
    test_vrf = netbox.Vrf("test", name="test-vrf")
    test_virtual_machine_interface = netbox.VirtualMachineInterface("test",
        virtual_machine_id=test_virtual_machine.virtual_machine_id,
        name="test-virtual-machine-interface",
        mtu=1500,
        mode="tagged",
        untagged_vlan_id=test_a.vlan_id,
        tagged_vlan_ids=[test_b.vlan_id],
        vrf_id=test_vrf.vrf_id,
        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.NewClusterType(ctx, "test", &netbox.ClusterTypeArgs{
    			Name: pulumi.String("test-cluster-type"),
    		})
    		if err != nil {
    			return err
    		}
    		testCluster, err := netbox.NewCluster(ctx, "test", &netbox.ClusterArgs{
    			Name:          pulumi.String("test-cluster"),
    			ClusterTypeId: test.ClusterTypeId,
    		})
    		if err != nil {
    			return err
    		}
    		testVirtualMachine, err := netbox.NewVirtualMachine(ctx, "test", &netbox.VirtualMachineArgs{
    			Name:      pulumi.String("test-virtual-machine"),
    			ClusterId: testCluster.ClusterId,
    		})
    		if err != nil {
    			return err
    		}
    		testA, err := netbox.NewVlan(ctx, "test_a", &netbox.VlanArgs{
    			Name: pulumi.String("test-vlan-a"),
    			Vid:  pulumi.Float64(100),
    		})
    		if err != nil {
    			return err
    		}
    		testB, err := netbox.NewVlan(ctx, "test_b", &netbox.VlanArgs{
    			Name: pulumi.String("test-vlan-b"),
    			Vid:  pulumi.Float64(101),
    		})
    		if err != nil {
    			return err
    		}
    		testVrf, err := netbox.NewVrf(ctx, "test", &netbox.VrfArgs{
    			Name: pulumi.String("test-vrf"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = netbox.NewVirtualMachineInterface(ctx, "test", &netbox.VirtualMachineInterfaceArgs{
    			VirtualMachineId: testVirtualMachine.VirtualMachineId,
    			Name:             pulumi.String("test-virtual-machine-interface"),
    			Mtu:              pulumi.Float64(1500),
    			Mode:             pulumi.String("tagged"),
    			UntaggedVlanId:   testA.VlanId,
    			TaggedVlanIds: pulumi.Float64Array{
    				testB.VlanId,
    			},
    			VrfId:       testVrf.VrfId,
    			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.ClusterType("test", new()
        {
            Name = "test-cluster-type",
        });
    
        var testCluster = new Netbox.Cluster("test", new()
        {
            Name = "test-cluster",
            ClusterTypeId = test.ClusterTypeId,
        });
    
        var testVirtualMachine = new Netbox.VirtualMachine("test", new()
        {
            Name = "test-virtual-machine",
            ClusterId = testCluster.ClusterId,
        });
    
        var testA = new Netbox.Vlan("test_a", new()
        {
            Name = "test-vlan-a",
            Vid = 100,
        });
    
        var testB = new Netbox.Vlan("test_b", new()
        {
            Name = "test-vlan-b",
            Vid = 101,
        });
    
        var testVrf = new Netbox.Vrf("test", new()
        {
            Name = "test-vrf",
        });
    
        var testVirtualMachineInterface = new Netbox.VirtualMachineInterface("test", new()
        {
            VirtualMachineId = testVirtualMachine.VirtualMachineId,
            Name = "test-virtual-machine-interface",
            Mtu = 1500,
            Mode = "tagged",
            UntaggedVlanId = testA.VlanId,
            TaggedVlanIds = new[]
            {
                testB.VlanId,
            },
            VrfId = testVrf.VrfId,
            Description = "test-description",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.netbox.ClusterType;
    import com.pulumi.netbox.ClusterTypeArgs;
    import com.pulumi.netbox.Cluster;
    import com.pulumi.netbox.ClusterArgs;
    import com.pulumi.netbox.VirtualMachine;
    import com.pulumi.netbox.VirtualMachineArgs;
    import com.pulumi.netbox.Vlan;
    import com.pulumi.netbox.VlanArgs;
    import com.pulumi.netbox.Vrf;
    import com.pulumi.netbox.VrfArgs;
    import com.pulumi.netbox.VirtualMachineInterface;
    import com.pulumi.netbox.VirtualMachineInterfaceArgs;
    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 ClusterType("test", ClusterTypeArgs.builder()
                .name("test-cluster-type")
                .build());
    
            var testCluster = new Cluster("testCluster", ClusterArgs.builder()
                .name("test-cluster")
                .clusterTypeId(test.clusterTypeId())
                .build());
    
            var testVirtualMachine = new VirtualMachine("testVirtualMachine", VirtualMachineArgs.builder()
                .name("test-virtual-machine")
                .clusterId(testCluster.clusterId())
                .build());
    
            var testA = new Vlan("testA", VlanArgs.builder()
                .name("test-vlan-a")
                .vid(100.0)
                .build());
    
            var testB = new Vlan("testB", VlanArgs.builder()
                .name("test-vlan-b")
                .vid(101.0)
                .build());
    
            var testVrf = new Vrf("testVrf", VrfArgs.builder()
                .name("test-vrf")
                .build());
    
            var testVirtualMachineInterface = new VirtualMachineInterface("testVirtualMachineInterface", VirtualMachineInterfaceArgs.builder()
                .virtualMachineId(testVirtualMachine.virtualMachineId())
                .name("test-virtual-machine-interface")
                .mtu(1500.0)
                .mode("tagged")
                .untaggedVlanId(testA.vlanId())
                .taggedVlanIds(testB.vlanId())
                .vrfId(testVrf.vrfId())
                .description("test-description")
                .build());
    
        }
    }
    
    resources:
      test:
        type: netbox:ClusterType
        properties:
          name: test-cluster-type
      testCluster:
        type: netbox:Cluster
        name: test
        properties:
          name: test-cluster
          clusterTypeId: ${test.clusterTypeId}
      testVirtualMachine:
        type: netbox:VirtualMachine
        name: test
        properties:
          name: test-virtual-machine
          clusterId: ${testCluster.clusterId}
      testA:
        type: netbox:Vlan
        name: test_a
        properties:
          name: test-vlan-a
          vid: 100
      testB:
        type: netbox:Vlan
        name: test_b
        properties:
          name: test-vlan-b
          vid: 101
      testVrf:
        type: netbox:Vrf
        name: test
        properties:
          name: test-vrf
      testVirtualMachineInterface:
        type: netbox:VirtualMachineInterface
        name: test
        properties:
          virtualMachineId: ${testVirtualMachine.virtualMachineId}
          name: test-virtual-machine-interface
          mtu: 1500
          mode: tagged
          untaggedVlanId: ${testA.vlanId}
          taggedVlanIds:
            - ${testB.vlanId}
          vrfId: ${testVrf.vrfId}
          description: test-description
    
    Example coming soon!
    

    Create VirtualMachineInterface Resource

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

    Constructor syntax

    new VirtualMachineInterface(name: string, args: VirtualMachineInterfaceArgs, opts?: CustomResourceOptions);
    @overload
    def VirtualMachineInterface(resource_name: str,
                                args: VirtualMachineInterfaceArgs,
                                opts: Optional[ResourceOptions] = None)
    
    @overload
    def VirtualMachineInterface(resource_name: str,
                                opts: Optional[ResourceOptions] = None,
                                virtual_machine_id: Optional[float] = None,
                                parent_id: Optional[float] = None,
                                tags: Optional[Sequence[str]] = None,
                                enabled: Optional[bool] = None,
                                mode: Optional[str] = None,
                                mtu: Optional[float] = None,
                                name: Optional[str] = None,
                                description: Optional[str] = None,
                                qinq_svlan_id: Optional[float] = None,
                                owner_id: Optional[float] = None,
                                tagged_vlan_ids: Optional[Sequence[float]] = None,
                                bridge_id: Optional[float] = None,
                                untagged_vlan_id: Optional[float] = None,
                                custom_fields: Optional[Mapping[str, str]] = None,
                                vlan_translation_policy_id: Optional[float] = None,
                                vrf_id: Optional[float] = None)
    func NewVirtualMachineInterface(ctx *Context, name string, args VirtualMachineInterfaceArgs, opts ...ResourceOption) (*VirtualMachineInterface, error)
    public VirtualMachineInterface(string name, VirtualMachineInterfaceArgs args, CustomResourceOptions? opts = null)
    public VirtualMachineInterface(String name, VirtualMachineInterfaceArgs args)
    public VirtualMachineInterface(String name, VirtualMachineInterfaceArgs args, CustomResourceOptions options)
    
    type: netbox:VirtualMachineInterface
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "netbox_virtual_machine_interface" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args VirtualMachineInterfaceArgs
    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 VirtualMachineInterfaceArgs
    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 VirtualMachineInterfaceArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args VirtualMachineInterfaceArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args VirtualMachineInterfaceArgs
    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 virtualMachineInterfaceResource = new Netbox.VirtualMachineInterface("virtualMachineInterfaceResource", new()
    {
        VirtualMachineId = 0.0,
        ParentId = 0.0,
        Tags = new[]
        {
            "string",
        },
        Enabled = false,
        Mode = "string",
        Mtu = 0.0,
        Name = "string",
        Description = "string",
        QinqSvlanId = 0.0,
        OwnerId = 0.0,
        TaggedVlanIds = new[]
        {
            0.0,
        },
        BridgeId = 0.0,
        UntaggedVlanId = 0.0,
        CustomFields = 
        {
            { "string", "string" },
        },
        VlanTranslationPolicyId = 0.0,
        VrfId = 0.0,
    });
    
    example, err := netbox.NewVirtualMachineInterface(ctx, "virtualMachineInterfaceResource", &netbox.VirtualMachineInterfaceArgs{
    	VirtualMachineId: pulumi.Float64(0),
    	ParentId:         pulumi.Float64(0),
    	Tags: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Enabled:     pulumi.Bool(false),
    	Mode:        pulumi.String("string"),
    	Mtu:         pulumi.Float64(0),
    	Name:        pulumi.String("string"),
    	Description: pulumi.String("string"),
    	QinqSvlanId: pulumi.Float64(0),
    	OwnerId:     pulumi.Float64(0),
    	TaggedVlanIds: pulumi.Float64Array{
    		pulumi.Float64(0),
    	},
    	BridgeId:       pulumi.Float64(0),
    	UntaggedVlanId: pulumi.Float64(0),
    	CustomFields: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	VlanTranslationPolicyId: pulumi.Float64(0),
    	VrfId:                   pulumi.Float64(0),
    })
    
    resource "netbox_virtual_machine_interface" "virtualMachineInterfaceResource" {
      lifecycle {
        create_before_destroy = true
      }
      virtual_machine_id = 0
      parent_id          = 0
      tags               = ["string"]
      enabled            = false
      mode               = "string"
      mtu                = 0
      name               = "string"
      description        = "string"
      qinq_svlan_id      = 0
      owner_id           = 0
      tagged_vlan_ids    = [0]
      bridge_id          = 0
      untagged_vlan_id   = 0
      custom_fields = {
        "string" = "string"
      }
      vlan_translation_policy_id = 0
      vrf_id                     = 0
    }
    
    var virtualMachineInterfaceResource = new VirtualMachineInterface("virtualMachineInterfaceResource", VirtualMachineInterfaceArgs.builder()
        .virtualMachineId(0.0)
        .parentId(0.0)
        .tags("string")
        .enabled(false)
        .mode("string")
        .mtu(0.0)
        .name("string")
        .description("string")
        .qinqSvlanId(0.0)
        .ownerId(0.0)
        .taggedVlanIds(0.0)
        .bridgeId(0.0)
        .untaggedVlanId(0.0)
        .customFields(Map.of("string", "string"))
        .vlanTranslationPolicyId(0.0)
        .vrfId(0.0)
        .build());
    
    virtual_machine_interface_resource = netbox.VirtualMachineInterface("virtualMachineInterfaceResource",
        virtual_machine_id=float(0),
        parent_id=float(0),
        tags=["string"],
        enabled=False,
        mode="string",
        mtu=float(0),
        name="string",
        description="string",
        qinq_svlan_id=float(0),
        owner_id=float(0),
        tagged_vlan_ids=[float(0)],
        bridge_id=float(0),
        untagged_vlan_id=float(0),
        custom_fields={
            "string": "string",
        },
        vlan_translation_policy_id=float(0),
        vrf_id=float(0))
    
    const virtualMachineInterfaceResource = new netbox.VirtualMachineInterface("virtualMachineInterfaceResource", {
        virtualMachineId: 0,
        parentId: 0,
        tags: ["string"],
        enabled: false,
        mode: "string",
        mtu: 0,
        name: "string",
        description: "string",
        qinqSvlanId: 0,
        ownerId: 0,
        taggedVlanIds: [0],
        bridgeId: 0,
        untaggedVlanId: 0,
        customFields: {
            string: "string",
        },
        vlanTranslationPolicyId: 0,
        vrfId: 0,
    });
    
    type: netbox:VirtualMachineInterface
    properties:
        bridgeId: 0
        customFields:
            string: string
        description: string
        enabled: false
        mode: string
        mtu: 0
        name: string
        ownerId: 0
        parentId: 0
        qinqSvlanId: 0
        taggedVlanIds:
            - 0
        tags:
            - string
        untaggedVlanId: 0
        virtualMachineId: 0
        vlanTranslationPolicyId: 0
        vrfId: 0
    

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

    VirtualMachineId double
    Id of the virtual machine.
    BridgeId double
    Id of the bridged interface.
    CustomFields Dictionary<string, string>
    Custom field values by field name. Every value is a string; NetBox coerces numbers and booleans. An object field holds the related object's id, e.g. "12", a multiobject field a JSON list of ids in any order, e.g. jsonencode([12, 13]). A key removed from the map is cleared in NetBox (set {} to clear all).
    Description string
    Enabled bool
    Whether the interface is enabled.
    Mode string
    802.1Q tagging mode. One of: access, tagged, tagged-all, q-in-q.
    Mtu double
    MTU in bytes. Must be a whole number.
    Name string
    OwnerId double
    Id of the owner the object is assigned to.
    ParentId double
    Id of the parent interface.
    QinqSvlanId double
    Id of the Q-in-Q service VLAN.
    TaggedVlanIds List<double>
    Ids of the tagged VLANs.
    Tags List<string>
    Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
    UntaggedVlanId double
    Id of the untagged VLAN.
    VlanTranslationPolicyId double
    Id of the VLAN translation policy.
    VrfId double
    Id of the VRF.
    VirtualMachineId float64
    Id of the virtual machine.
    BridgeId float64
    Id of the bridged interface.
    CustomFields map[string]string
    Custom field values by field name. Every value is a string; NetBox coerces numbers and booleans. An object field holds the related object's id, e.g. "12", a multiobject field a JSON list of ids in any order, e.g. jsonencode([12, 13]). A key removed from the map is cleared in NetBox (set {} to clear all).
    Description string
    Enabled bool
    Whether the interface is enabled.
    Mode string
    802.1Q tagging mode. One of: access, tagged, tagged-all, q-in-q.
    Mtu float64
    MTU in bytes. Must be a whole number.
    Name string
    OwnerId float64
    Id of the owner the object is assigned to.
    ParentId float64
    Id of the parent interface.
    QinqSvlanId float64
    Id of the Q-in-Q service VLAN.
    TaggedVlanIds []float64
    Ids of the tagged VLANs.
    Tags []string
    Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
    UntaggedVlanId float64
    Id of the untagged VLAN.
    VlanTranslationPolicyId float64
    Id of the VLAN translation policy.
    VrfId float64
    Id of the VRF.
    virtual_machine_id number
    Id of the virtual machine.
    bridge_id number
    Id of the bridged interface.
    custom_fields map(string)
    Custom field values by field name. Every value is a string; NetBox coerces numbers and booleans. An object field holds the related object's id, e.g. "12", a multiobject field a JSON list of ids in any order, e.g. jsonencode([12, 13]). A key removed from the map is cleared in NetBox (set {} to clear all).
    description string
    enabled bool
    Whether the interface is enabled.
    mode string
    802.1Q tagging mode. One of: access, tagged, tagged-all, q-in-q.
    mtu number
    MTU in bytes. Must be a whole number.
    name string
    owner_id number
    Id of the owner the object is assigned to.
    parent_id number
    Id of the parent interface.
    qinq_svlan_id number
    Id of the Q-in-Q service VLAN.
    tagged_vlan_ids list(number)
    Ids of the tagged VLANs.
    tags list(string)
    Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
    untagged_vlan_id number
    Id of the untagged VLAN.
    vlan_translation_policy_id number
    Id of the VLAN translation policy.
    vrf_id number
    Id of the VRF.
    virtualMachineId Double
    Id of the virtual machine.
    bridgeId Double
    Id of the bridged interface.
    customFields Map<String,String>
    Custom field values by field name. Every value is a string; NetBox coerces numbers and booleans. An object field holds the related object's id, e.g. "12", a multiobject field a JSON list of ids in any order, e.g. jsonencode([12, 13]). A key removed from the map is cleared in NetBox (set {} to clear all).
    description String
    enabled Boolean
    Whether the interface is enabled.
    mode String
    802.1Q tagging mode. One of: access, tagged, tagged-all, q-in-q.
    mtu Double
    MTU in bytes. Must be a whole number.
    name String
    ownerId Double
    Id of the owner the object is assigned to.
    parentId Double
    Id of the parent interface.
    qinqSvlanId Double
    Id of the Q-in-Q service VLAN.
    taggedVlanIds List<Double>
    Ids of the tagged VLANs.
    tags List<String>
    Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
    untaggedVlanId Double
    Id of the untagged VLAN.
    vlanTranslationPolicyId Double
    Id of the VLAN translation policy.
    vrfId Double
    Id of the VRF.
    virtualMachineId number
    Id of the virtual machine.
    bridgeId number
    Id of the bridged interface.
    customFields {[key: string]: string}
    Custom field values by field name. Every value is a string; NetBox coerces numbers and booleans. An object field holds the related object's id, e.g. "12", a multiobject field a JSON list of ids in any order, e.g. jsonencode([12, 13]). A key removed from the map is cleared in NetBox (set {} to clear all).
    description string
    enabled boolean
    Whether the interface is enabled.
    mode string
    802.1Q tagging mode. One of: access, tagged, tagged-all, q-in-q.
    mtu number
    MTU in bytes. Must be a whole number.
    name string
    ownerId number
    Id of the owner the object is assigned to.
    parentId number
    Id of the parent interface.
    qinqSvlanId number
    Id of the Q-in-Q service VLAN.
    taggedVlanIds number[]
    Ids of the tagged VLANs.
    tags string[]
    Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
    untaggedVlanId number
    Id of the untagged VLAN.
    vlanTranslationPolicyId number
    Id of the VLAN translation policy.
    vrfId number
    Id of the VRF.
    virtual_machine_id float
    Id of the virtual machine.
    bridge_id float
    Id of the bridged interface.
    custom_fields Mapping[str, str]
    Custom field values by field name. Every value is a string; NetBox coerces numbers and booleans. An object field holds the related object's id, e.g. "12", a multiobject field a JSON list of ids in any order, e.g. jsonencode([12, 13]). A key removed from the map is cleared in NetBox (set {} to clear all).
    description str
    enabled bool
    Whether the interface is enabled.
    mode str
    802.1Q tagging mode. One of: access, tagged, tagged-all, q-in-q.
    mtu float
    MTU in bytes. Must be a whole number.
    name str
    owner_id float
    Id of the owner the object is assigned to.
    parent_id float
    Id of the parent interface.
    qinq_svlan_id float
    Id of the Q-in-Q service VLAN.
    tagged_vlan_ids Sequence[float]
    Ids of the tagged VLANs.
    tags Sequence[str]
    Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
    untagged_vlan_id float
    Id of the untagged VLAN.
    vlan_translation_policy_id float
    Id of the VLAN translation policy.
    vrf_id float
    Id of the VRF.
    virtualMachineId Number
    Id of the virtual machine.
    bridgeId Number
    Id of the bridged interface.
    customFields Map<String>
    Custom field values by field name. Every value is a string; NetBox coerces numbers and booleans. An object field holds the related object's id, e.g. "12", a multiobject field a JSON list of ids in any order, e.g. jsonencode([12, 13]). A key removed from the map is cleared in NetBox (set {} to clear all).
    description String
    enabled Boolean
    Whether the interface is enabled.
    mode String
    802.1Q tagging mode. One of: access, tagged, tagged-all, q-in-q.
    mtu Number
    MTU in bytes. Must be a whole number.
    name String
    ownerId Number
    Id of the owner the object is assigned to.
    parentId Number
    Id of the parent interface.
    qinqSvlanId Number
    Id of the Q-in-Q service VLAN.
    taggedVlanIds List<Number>
    Ids of the tagged VLANs.
    tags List<String>
    Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
    untaggedVlanId Number
    Id of the untagged VLAN.
    vlanTranslationPolicyId Number
    Id of the VLAN translation policy.
    vrfId Number
    Id of the VRF.

    Outputs

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

    Created string
    Id string
    The provider-assigned unique ID for this managed resource.
    LastUpdated string
    TagsAlls List<string>
    Slugs of all tags on the object, including the provider's default_tags.
    Url string
    VirtualMachineInterfaceId double
    NetBox id.
    Created string
    Id string
    The provider-assigned unique ID for this managed resource.
    LastUpdated string
    TagsAlls []string
    Slugs of all tags on the object, including the provider's default_tags.
    Url string
    VirtualMachineInterfaceId float64
    NetBox id.
    created string
    id string
    The provider-assigned unique ID for this managed resource.
    last_updated string
    tags_alls list(string)
    Slugs of all tags on the object, including the provider's default_tags.
    url string
    virtual_machine_interface_id number
    NetBox id.
    created String
    id String
    The provider-assigned unique ID for this managed resource.
    lastUpdated String
    tagsAlls List<String>
    Slugs of all tags on the object, including the provider's default_tags.
    url String
    virtualMachineInterfaceId Double
    NetBox id.
    created string
    id string
    The provider-assigned unique ID for this managed resource.
    lastUpdated string
    tagsAlls string[]
    Slugs of all tags on the object, including the provider's default_tags.
    url string
    virtualMachineInterfaceId number
    NetBox id.
    created str
    id str
    The provider-assigned unique ID for this managed resource.
    last_updated str
    tags_alls Sequence[str]
    Slugs of all tags on the object, including the provider's default_tags.
    url str
    virtual_machine_interface_id float
    NetBox id.
    created String
    id String
    The provider-assigned unique ID for this managed resource.
    lastUpdated String
    tagsAlls List<String>
    Slugs of all tags on the object, including the provider's default_tags.
    url String
    virtualMachineInterfaceId Number
    NetBox id.

    Look up Existing VirtualMachineInterface Resource

    Get an existing VirtualMachineInterface 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?: VirtualMachineInterfaceState, opts?: CustomResourceOptions): VirtualMachineInterface
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            bridge_id: Optional[float] = None,
            created: Optional[str] = None,
            custom_fields: Optional[Mapping[str, str]] = None,
            description: Optional[str] = None,
            enabled: Optional[bool] = None,
            last_updated: Optional[str] = None,
            mode: Optional[str] = None,
            mtu: Optional[float] = None,
            name: Optional[str] = None,
            owner_id: Optional[float] = None,
            parent_id: Optional[float] = None,
            qinq_svlan_id: Optional[float] = None,
            tagged_vlan_ids: Optional[Sequence[float]] = None,
            tags: Optional[Sequence[str]] = None,
            tags_alls: Optional[Sequence[str]] = None,
            untagged_vlan_id: Optional[float] = None,
            url: Optional[str] = None,
            virtual_machine_id: Optional[float] = None,
            virtual_machine_interface_id: Optional[float] = None,
            vlan_translation_policy_id: Optional[float] = None,
            vrf_id: Optional[float] = None) -> VirtualMachineInterface
    func GetVirtualMachineInterface(ctx *Context, name string, id IDInput, state *VirtualMachineInterfaceState, opts ...ResourceOption) (*VirtualMachineInterface, error)
    public static VirtualMachineInterface Get(string name, Input<string> id, VirtualMachineInterfaceState? state, CustomResourceOptions? opts = null)
    public static VirtualMachineInterface get(String name, Output<String> id, VirtualMachineInterfaceState state, CustomResourceOptions options)
    resources:  existingVirtualMachineInterface:    type: netbox:VirtualMachineInterface    get:      id: ${id}
    import {
      to = netbox_virtual_machine_interface.example
      id = "${id}"
    }
    
    name string
    The unique name of the resulting resource.
    id Input<ID>
    The unique provider ID of the resource to look up.
    state VirtualMachineInterfaceState
    Known property values the provider needs, along with the ID, to find the resource. Usually not required.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resulting resource.
    id str
    The unique provider ID of the resource to look up.
    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 resulting resource.
    id IDInput
    The unique provider ID of the resource to look up.
    state VirtualMachineInterfaceState
    Known property values the provider needs, along with the ID, to find the resource. Usually not required.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resulting resource.
    id Input<string>
    The unique provider ID of the resource to look up.
    state VirtualMachineInterfaceState
    Known property values the provider needs, along with the ID, to find the resource. Usually not required.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resulting resource.
    id Output<String>
    The unique provider ID of the resource to look up.
    state VirtualMachineInterfaceState
    Known property values the provider needs, along with the ID, to find the resource. Usually not required.
    options CustomResourceOptions
    Bag of options to control resource's behavior.
    The following state arguments are supported:
    BridgeId double
    Id of the bridged interface.
    Created string
    CustomFields Dictionary<string, string>
    Custom field values by field name. Every value is a string; NetBox coerces numbers and booleans. An object field holds the related object's id, e.g. "12", a multiobject field a JSON list of ids in any order, e.g. jsonencode([12, 13]). A key removed from the map is cleared in NetBox (set {} to clear all).
    Description string
    Enabled bool
    Whether the interface is enabled.
    LastUpdated string
    Mode string
    802.1Q tagging mode. One of: access, tagged, tagged-all, q-in-q.
    Mtu double
    MTU in bytes. Must be a whole number.
    Name string
    OwnerId double
    Id of the owner the object is assigned to.
    ParentId double
    Id of the parent interface.
    QinqSvlanId double
    Id of the Q-in-Q service VLAN.
    TaggedVlanIds List<double>
    Ids of the tagged VLANs.
    Tags List<string>
    Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
    TagsAlls List<string>
    Slugs of all tags on the object, including the provider's default_tags.
    UntaggedVlanId double
    Id of the untagged VLAN.
    Url string
    VirtualMachineId double
    Id of the virtual machine.
    VirtualMachineInterfaceId double
    NetBox id.
    VlanTranslationPolicyId double
    Id of the VLAN translation policy.
    VrfId double
    Id of the VRF.
    BridgeId float64
    Id of the bridged interface.
    Created string
    CustomFields map[string]string
    Custom field values by field name. Every value is a string; NetBox coerces numbers and booleans. An object field holds the related object's id, e.g. "12", a multiobject field a JSON list of ids in any order, e.g. jsonencode([12, 13]). A key removed from the map is cleared in NetBox (set {} to clear all).
    Description string
    Enabled bool
    Whether the interface is enabled.
    LastUpdated string
    Mode string
    802.1Q tagging mode. One of: access, tagged, tagged-all, q-in-q.
    Mtu float64
    MTU in bytes. Must be a whole number.
    Name string
    OwnerId float64
    Id of the owner the object is assigned to.
    ParentId float64
    Id of the parent interface.
    QinqSvlanId float64
    Id of the Q-in-Q service VLAN.
    TaggedVlanIds []float64
    Ids of the tagged VLANs.
    Tags []string
    Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
    TagsAlls []string
    Slugs of all tags on the object, including the provider's default_tags.
    UntaggedVlanId float64
    Id of the untagged VLAN.
    Url string
    VirtualMachineId float64
    Id of the virtual machine.
    VirtualMachineInterfaceId float64
    NetBox id.
    VlanTranslationPolicyId float64
    Id of the VLAN translation policy.
    VrfId float64
    Id of the VRF.
    bridge_id number
    Id of the bridged interface.
    created string
    custom_fields map(string)
    Custom field values by field name. Every value is a string; NetBox coerces numbers and booleans. An object field holds the related object's id, e.g. "12", a multiobject field a JSON list of ids in any order, e.g. jsonencode([12, 13]). A key removed from the map is cleared in NetBox (set {} to clear all).
    description string
    enabled bool
    Whether the interface is enabled.
    last_updated string
    mode string
    802.1Q tagging mode. One of: access, tagged, tagged-all, q-in-q.
    mtu number
    MTU in bytes. Must be a whole number.
    name string
    owner_id number
    Id of the owner the object is assigned to.
    parent_id number
    Id of the parent interface.
    qinq_svlan_id number
    Id of the Q-in-Q service VLAN.
    tagged_vlan_ids list(number)
    Ids of the tagged VLANs.
    tags list(string)
    Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
    tags_alls list(string)
    Slugs of all tags on the object, including the provider's default_tags.
    untagged_vlan_id number
    Id of the untagged VLAN.
    url string
    virtual_machine_id number
    Id of the virtual machine.
    virtual_machine_interface_id number
    NetBox id.
    vlan_translation_policy_id number
    Id of the VLAN translation policy.
    vrf_id number
    Id of the VRF.
    bridgeId Double
    Id of the bridged interface.
    created String
    customFields Map<String,String>
    Custom field values by field name. Every value is a string; NetBox coerces numbers and booleans. An object field holds the related object's id, e.g. "12", a multiobject field a JSON list of ids in any order, e.g. jsonencode([12, 13]). A key removed from the map is cleared in NetBox (set {} to clear all).
    description String
    enabled Boolean
    Whether the interface is enabled.
    lastUpdated String
    mode String
    802.1Q tagging mode. One of: access, tagged, tagged-all, q-in-q.
    mtu Double
    MTU in bytes. Must be a whole number.
    name String
    ownerId Double
    Id of the owner the object is assigned to.
    parentId Double
    Id of the parent interface.
    qinqSvlanId Double
    Id of the Q-in-Q service VLAN.
    taggedVlanIds List<Double>
    Ids of the tagged VLANs.
    tags List<String>
    Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
    tagsAlls List<String>
    Slugs of all tags on the object, including the provider's default_tags.
    untaggedVlanId Double
    Id of the untagged VLAN.
    url String
    virtualMachineId Double
    Id of the virtual machine.
    virtualMachineInterfaceId Double
    NetBox id.
    vlanTranslationPolicyId Double
    Id of the VLAN translation policy.
    vrfId Double
    Id of the VRF.
    bridgeId number
    Id of the bridged interface.
    created string
    customFields {[key: string]: string}
    Custom field values by field name. Every value is a string; NetBox coerces numbers and booleans. An object field holds the related object's id, e.g. "12", a multiobject field a JSON list of ids in any order, e.g. jsonencode([12, 13]). A key removed from the map is cleared in NetBox (set {} to clear all).
    description string
    enabled boolean
    Whether the interface is enabled.
    lastUpdated string
    mode string
    802.1Q tagging mode. One of: access, tagged, tagged-all, q-in-q.
    mtu number
    MTU in bytes. Must be a whole number.
    name string
    ownerId number
    Id of the owner the object is assigned to.
    parentId number
    Id of the parent interface.
    qinqSvlanId number
    Id of the Q-in-Q service VLAN.
    taggedVlanIds number[]
    Ids of the tagged VLANs.
    tags string[]
    Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
    tagsAlls string[]
    Slugs of all tags on the object, including the provider's default_tags.
    untaggedVlanId number
    Id of the untagged VLAN.
    url string
    virtualMachineId number
    Id of the virtual machine.
    virtualMachineInterfaceId number
    NetBox id.
    vlanTranslationPolicyId number
    Id of the VLAN translation policy.
    vrfId number
    Id of the VRF.
    bridge_id float
    Id of the bridged interface.
    created str
    custom_fields Mapping[str, str]
    Custom field values by field name. Every value is a string; NetBox coerces numbers and booleans. An object field holds the related object's id, e.g. "12", a multiobject field a JSON list of ids in any order, e.g. jsonencode([12, 13]). A key removed from the map is cleared in NetBox (set {} to clear all).
    description str
    enabled bool
    Whether the interface is enabled.
    last_updated str
    mode str
    802.1Q tagging mode. One of: access, tagged, tagged-all, q-in-q.
    mtu float
    MTU in bytes. Must be a whole number.
    name str
    owner_id float
    Id of the owner the object is assigned to.
    parent_id float
    Id of the parent interface.
    qinq_svlan_id float
    Id of the Q-in-Q service VLAN.
    tagged_vlan_ids Sequence[float]
    Ids of the tagged VLANs.
    tags Sequence[str]
    Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
    tags_alls Sequence[str]
    Slugs of all tags on the object, including the provider's default_tags.
    untagged_vlan_id float
    Id of the untagged VLAN.
    url str
    virtual_machine_id float
    Id of the virtual machine.
    virtual_machine_interface_id float
    NetBox id.
    vlan_translation_policy_id float
    Id of the VLAN translation policy.
    vrf_id float
    Id of the VRF.
    bridgeId Number
    Id of the bridged interface.
    created String
    customFields Map<String>
    Custom field values by field name. Every value is a string; NetBox coerces numbers and booleans. An object field holds the related object's id, e.g. "12", a multiobject field a JSON list of ids in any order, e.g. jsonencode([12, 13]). A key removed from the map is cleared in NetBox (set {} to clear all).
    description String
    enabled Boolean
    Whether the interface is enabled.
    lastUpdated String
    mode String
    802.1Q tagging mode. One of: access, tagged, tagged-all, q-in-q.
    mtu Number
    MTU in bytes. Must be a whole number.
    name String
    ownerId Number
    Id of the owner the object is assigned to.
    parentId Number
    Id of the parent interface.
    qinqSvlanId Number
    Id of the Q-in-Q service VLAN.
    taggedVlanIds List<Number>
    Ids of the tagged VLANs.
    tags List<String>
    Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
    tagsAlls List<String>
    Slugs of all tags on the object, including the provider's default_tags.
    untaggedVlanId Number
    Id of the untagged VLAN.
    url String
    virtualMachineId Number
    Id of the virtual machine.
    virtualMachineInterfaceId Number
    NetBox id.
    vlanTranslationPolicyId Number
    Id of the VLAN translation policy.
    vrfId Number
    Id of the VRF.

    Import

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

    terraform

    import {

    to = netbox_virtual_machine_interface.test

    id = “123”

    }

    The pulumi import command can be used, for example:

    $ pulumi import netbox:index/virtualMachineInterface:VirtualMachineInterface 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.1
    published on Monday, Nov 16, 2026 by e-breuninger

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial