1. Packages
  2. Netbox Provider
  3. API Docs
  4. MacAddress
netbox 4.0.0 published on Thursday, Jun 12, 2025 by e-breuninger

netbox.MacAddress

Explore with Pulumi AI

netbox logo
netbox 4.0.0 published on Thursday, Jun 12, 2025 by e-breuninger

    From the official documentation:

    A MAC address object in NetBox comprises a single Ethernet link layer address, and represents a MAC address as reported by or assigned to a network interface. MAC addresses can be assigned to device and virtual machine interfaces. A MAC address can be specified as the primary MAC address for a given device or VM interface.

    Example Usage

    Creating a MAC address that is assigned to a virtual machine interface

    With virtual_machine_interface_id:

    import * as pulumi from "@pulumi/pulumi";
    import * as netbox from "@pulumi/netbox";
    
    // Assuming a virtual machine with the id `123` exists
    const thisInterface = new netbox.Interface("thisInterface", {virtualMachineId: 123});
    const thisMacAddress = new netbox.MacAddress("thisMacAddress", {
        macAddress: "00:1A:2B:3C:4D:5E",
        virtualMachineInterfaceId: thisInterface.interfaceId,
    });
    
    import pulumi
    import pulumi_netbox as netbox
    
    # Assuming a virtual machine with the id `123` exists
    this_interface = netbox.Interface("thisInterface", virtual_machine_id=123)
    this_mac_address = netbox.MacAddress("thisMacAddress",
        mac_address="00:1A:2B:3C:4D:5E",
        virtual_machine_interface_id=this_interface.interface_id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/netbox/v4/netbox"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// Assuming a virtual machine with the id `123` exists
    		thisInterface, err := netbox.NewInterface(ctx, "thisInterface", &netbox.InterfaceArgs{
    			VirtualMachineId: pulumi.Float64(123),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = netbox.NewMacAddress(ctx, "thisMacAddress", &netbox.MacAddressArgs{
    			MacAddress:                pulumi.String("00:1A:2B:3C:4D:5E"),
    			VirtualMachineInterfaceId: thisInterface.InterfaceId,
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Netbox = Pulumi.Netbox;
    
    return await Deployment.RunAsync(() => 
    {
        // Assuming a virtual machine with the id `123` exists
        var thisInterface = new Netbox.Interface("thisInterface", new()
        {
            VirtualMachineId = 123,
        });
    
        var thisMacAddress = new Netbox.MacAddress("thisMacAddress", new()
        {
            MacAddress = "00:1A:2B:3C:4D:5E",
            VirtualMachineInterfaceId = thisInterface.InterfaceId,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.netbox.Interface;
    import com.pulumi.netbox.InterfaceArgs;
    import com.pulumi.netbox.MacAddress;
    import com.pulumi.netbox.MacAddressArgs;
    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) {
            // Assuming a virtual machine with the id `123` exists
            var thisInterface = new Interface("thisInterface", InterfaceArgs.builder()
                .virtualMachineId(123)
                .build());
    
            var thisMacAddress = new MacAddress("thisMacAddress", MacAddressArgs.builder()
                .macAddress("00:1A:2B:3C:4D:5E")
                .virtualMachineInterfaceId(thisInterface.interfaceId())
                .build());
    
        }
    }
    
    resources:
      # Assuming a virtual machine with the id `123` exists
      thisInterface:
        type: netbox:Interface
        properties:
          virtualMachineId: 123
      thisMacAddress:
        type: netbox:MacAddress
        properties:
          macAddress: 00:1A:2B:3C:4D:5E
          virtualMachineInterfaceId: ${thisInterface.interfaceId}
    

    With object_type and interface_id:

    import * as pulumi from "@pulumi/pulumi";
    import * as netbox from "@pulumi/netbox";
    
    // Assuming a virtual machine with the id `123` exists
    const thisInterface = new netbox.Interface("thisInterface", {virtualMachineId: 123});
    const thisMacAddress = new netbox.MacAddress("thisMacAddress", {
        macAddress: "00:1A:2B:3C:4D:5E",
        interfaceId: thisInterface.interfaceId,
        objectType: "virtualization.vminterface",
    });
    
    import pulumi
    import pulumi_netbox as netbox
    
    # Assuming a virtual machine with the id `123` exists
    this_interface = netbox.Interface("thisInterface", virtual_machine_id=123)
    this_mac_address = netbox.MacAddress("thisMacAddress",
        mac_address="00:1A:2B:3C:4D:5E",
        interface_id=this_interface.interface_id,
        object_type="virtualization.vminterface")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/netbox/v4/netbox"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// Assuming a virtual machine with the id `123` exists
    		thisInterface, err := netbox.NewInterface(ctx, "thisInterface", &netbox.InterfaceArgs{
    			VirtualMachineId: pulumi.Float64(123),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = netbox.NewMacAddress(ctx, "thisMacAddress", &netbox.MacAddressArgs{
    			MacAddress:  pulumi.String("00:1A:2B:3C:4D:5E"),
    			InterfaceId: thisInterface.InterfaceId,
    			ObjectType:  pulumi.String("virtualization.vminterface"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Netbox = Pulumi.Netbox;
    
    return await Deployment.RunAsync(() => 
    {
        // Assuming a virtual machine with the id `123` exists
        var thisInterface = new Netbox.Interface("thisInterface", new()
        {
            VirtualMachineId = 123,
        });
    
        var thisMacAddress = new Netbox.MacAddress("thisMacAddress", new()
        {
            MacAddress = "00:1A:2B:3C:4D:5E",
            InterfaceId = thisInterface.InterfaceId,
            ObjectType = "virtualization.vminterface",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.netbox.Interface;
    import com.pulumi.netbox.InterfaceArgs;
    import com.pulumi.netbox.MacAddress;
    import com.pulumi.netbox.MacAddressArgs;
    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) {
            // Assuming a virtual machine with the id `123` exists
            var thisInterface = new Interface("thisInterface", InterfaceArgs.builder()
                .virtualMachineId(123)
                .build());
    
            var thisMacAddress = new MacAddress("thisMacAddress", MacAddressArgs.builder()
                .macAddress("00:1A:2B:3C:4D:5E")
                .interfaceId(thisInterface.interfaceId())
                .objectType("virtualization.vminterface")
                .build());
    
        }
    }
    
    resources:
      # Assuming a virtual machine with the id `123` exists
      thisInterface:
        type: netbox:Interface
        properties:
          virtualMachineId: 123
      thisMacAddress:
        type: netbox:MacAddress
        properties:
          macAddress: 00:1A:2B:3C:4D:5E
          interfaceId: ${thisInterface.interfaceId}
          objectType: virtualization.vminterface
    

    Creating a MAC address that is assigned to a device interface

    With device_interface_id:

    import * as pulumi from "@pulumi/pulumi";
    import * as netbox from "@pulumi/netbox";
    
    // Assuming a device with the id `123` exists
    const thisDeviceInterface = new netbox.DeviceInterface("thisDeviceInterface", {
        deviceId: 123,
        type: "1000base-t",
    });
    const thisMacAddress = new netbox.MacAddress("thisMacAddress", {
        macAddress: "00:1A:2B:3C:4D:5E",
        deviceInterfaceId: thisDeviceInterface.deviceInterfaceId,
    });
    
    import pulumi
    import pulumi_netbox as netbox
    
    # Assuming a device with the id `123` exists
    this_device_interface = netbox.DeviceInterface("thisDeviceInterface",
        device_id=123,
        type="1000base-t")
    this_mac_address = netbox.MacAddress("thisMacAddress",
        mac_address="00:1A:2B:3C:4D:5E",
        device_interface_id=this_device_interface.device_interface_id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/netbox/v4/netbox"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// Assuming a device with the id `123` exists
    		thisDeviceInterface, err := netbox.NewDeviceInterface(ctx, "thisDeviceInterface", &netbox.DeviceInterfaceArgs{
    			DeviceId: pulumi.Float64(123),
    			Type:     pulumi.String("1000base-t"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = netbox.NewMacAddress(ctx, "thisMacAddress", &netbox.MacAddressArgs{
    			MacAddress:        pulumi.String("00:1A:2B:3C:4D:5E"),
    			DeviceInterfaceId: thisDeviceInterface.DeviceInterfaceId,
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Netbox = Pulumi.Netbox;
    
    return await Deployment.RunAsync(() => 
    {
        // Assuming a device with the id `123` exists
        var thisDeviceInterface = new Netbox.DeviceInterface("thisDeviceInterface", new()
        {
            DeviceId = 123,
            Type = "1000base-t",
        });
    
        var thisMacAddress = new Netbox.MacAddress("thisMacAddress", new()
        {
            MacAddress = "00:1A:2B:3C:4D:5E",
            DeviceInterfaceId = thisDeviceInterface.DeviceInterfaceId,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.netbox.DeviceInterface;
    import com.pulumi.netbox.DeviceInterfaceArgs;
    import com.pulumi.netbox.MacAddress;
    import com.pulumi.netbox.MacAddressArgs;
    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) {
            // Assuming a device with the id `123` exists
            var thisDeviceInterface = new DeviceInterface("thisDeviceInterface", DeviceInterfaceArgs.builder()
                .deviceId(123)
                .type("1000base-t")
                .build());
    
            var thisMacAddress = new MacAddress("thisMacAddress", MacAddressArgs.builder()
                .macAddress("00:1A:2B:3C:4D:5E")
                .deviceInterfaceId(thisDeviceInterface.deviceInterfaceId())
                .build());
    
        }
    }
    
    resources:
      # Assuming a device with the id `123` exists
      thisDeviceInterface:
        type: netbox:DeviceInterface
        properties:
          deviceId: 123
          type: 1000base-t
      thisMacAddress:
        type: netbox:MacAddress
        properties:
          macAddress: 00:1A:2B:3C:4D:5E
          deviceInterfaceId: ${thisDeviceInterface.deviceInterfaceId}
    

    With object_type and interface_id:

    import * as pulumi from "@pulumi/pulumi";
    import * as netbox from "@pulumi/netbox";
    
    // Assuming a device with the id `123` exists
    const thisDeviceInterface = new netbox.DeviceInterface("thisDeviceInterface", {
        deviceId: 123,
        type: "1000base-t",
    });
    const thisMacAddress = new netbox.MacAddress("thisMacAddress", {
        macAddress: "00:1A:2B:3C:4D:5E",
        interfaceId: thisDeviceInterface.deviceInterfaceId,
        objectType: "dcim.interface",
    });
    
    import pulumi
    import pulumi_netbox as netbox
    
    # Assuming a device with the id `123` exists
    this_device_interface = netbox.DeviceInterface("thisDeviceInterface",
        device_id=123,
        type="1000base-t")
    this_mac_address = netbox.MacAddress("thisMacAddress",
        mac_address="00:1A:2B:3C:4D:5E",
        interface_id=this_device_interface.device_interface_id,
        object_type="dcim.interface")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/netbox/v4/netbox"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// Assuming a device with the id `123` exists
    		thisDeviceInterface, err := netbox.NewDeviceInterface(ctx, "thisDeviceInterface", &netbox.DeviceInterfaceArgs{
    			DeviceId: pulumi.Float64(123),
    			Type:     pulumi.String("1000base-t"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = netbox.NewMacAddress(ctx, "thisMacAddress", &netbox.MacAddressArgs{
    			MacAddress:  pulumi.String("00:1A:2B:3C:4D:5E"),
    			InterfaceId: thisDeviceInterface.DeviceInterfaceId,
    			ObjectType:  pulumi.String("dcim.interface"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Netbox = Pulumi.Netbox;
    
    return await Deployment.RunAsync(() => 
    {
        // Assuming a device with the id `123` exists
        var thisDeviceInterface = new Netbox.DeviceInterface("thisDeviceInterface", new()
        {
            DeviceId = 123,
            Type = "1000base-t",
        });
    
        var thisMacAddress = new Netbox.MacAddress("thisMacAddress", new()
        {
            MacAddress = "00:1A:2B:3C:4D:5E",
            InterfaceId = thisDeviceInterface.DeviceInterfaceId,
            ObjectType = "dcim.interface",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.netbox.DeviceInterface;
    import com.pulumi.netbox.DeviceInterfaceArgs;
    import com.pulumi.netbox.MacAddress;
    import com.pulumi.netbox.MacAddressArgs;
    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) {
            // Assuming a device with the id `123` exists
            var thisDeviceInterface = new DeviceInterface("thisDeviceInterface", DeviceInterfaceArgs.builder()
                .deviceId(123)
                .type("1000base-t")
                .build());
    
            var thisMacAddress = new MacAddress("thisMacAddress", MacAddressArgs.builder()
                .macAddress("00:1A:2B:3C:4D:5E")
                .interfaceId(thisDeviceInterface.deviceInterfaceId())
                .objectType("dcim.interface")
                .build());
    
        }
    }
    
    resources:
      # Assuming a device with the id `123` exists
      thisDeviceInterface:
        type: netbox:DeviceInterface
        properties:
          deviceId: 123
          type: 1000base-t
      thisMacAddress:
        type: netbox:MacAddress
        properties:
          macAddress: 00:1A:2B:3C:4D:5E
          interfaceId: ${thisDeviceInterface.deviceInterfaceId}
          objectType: dcim.interface
    

    Creating a MAC address that is not assigned to anything

    You can create a MAC address that is not assigned to anything by omitting the attributes mentioned above.

    import * as pulumi from "@pulumi/pulumi";
    import * as netbox from "@pulumi/netbox";
    
    const _this = new netbox.MacAddress("this", {macAddress: "00:1A:2B:3C:4D:5E"});
    
    import pulumi
    import pulumi_netbox as netbox
    
    this = netbox.MacAddress("this", mac_address="00:1A:2B:3C:4D:5E")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/netbox/v4/netbox"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := netbox.NewMacAddress(ctx, "this", &netbox.MacAddressArgs{
    			MacAddress: pulumi.String("00:1A:2B:3C:4D:5E"),
    		})
    		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 @this = new Netbox.MacAddress("this", new()
        {
            MacAddress = "00:1A:2B:3C:4D:5E",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.netbox.MacAddress;
    import com.pulumi.netbox.MacAddressArgs;
    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 this_ = new MacAddress("this", MacAddressArgs.builder()
                .macAddress("00:1A:2B:3C:4D:5E")
                .build());
    
        }
    }
    
    resources:
      this:
        type: netbox:MacAddress
        properties:
          macAddress: 00:1A:2B:3C:4D:5E
    

    Create MacAddress Resource

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

    Constructor syntax

    new MacAddress(name: string, args: MacAddressArgs, opts?: CustomResourceOptions);
    @overload
    def MacAddress(resource_name: str,
                   args: MacAddressArgs,
                   opts: Optional[ResourceOptions] = None)
    
    @overload
    def MacAddress(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   mac_address: Optional[str] = None,
                   comments: Optional[str] = None,
                   custom_fields: Optional[Mapping[str, str]] = None,
                   description: Optional[str] = None,
                   device_interface_id: Optional[float] = None,
                   interface_id: Optional[float] = None,
                   mac_address_id: Optional[str] = None,
                   object_type: Optional[str] = None,
                   tags: Optional[Sequence[str]] = None,
                   virtual_machine_interface_id: Optional[float] = None)
    func NewMacAddress(ctx *Context, name string, args MacAddressArgs, opts ...ResourceOption) (*MacAddress, error)
    public MacAddress(string name, MacAddressArgs args, CustomResourceOptions? opts = null)
    public MacAddress(String name, MacAddressArgs args)
    public MacAddress(String name, MacAddressArgs args, CustomResourceOptions options)
    
    type: netbox:MacAddress
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args MacAddressArgs
    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 MacAddressArgs
    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 MacAddressArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args MacAddressArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args MacAddressArgs
    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 macAddressResource = new Netbox.MacAddress("macAddressResource", new()
    {
        MacAddress = "string",
        Comments = "string",
        CustomFields = 
        {
            { "string", "string" },
        },
        Description = "string",
        DeviceInterfaceId = 0,
        InterfaceId = 0,
        MacAddressId = "string",
        ObjectType = "string",
        Tags = new[]
        {
            "string",
        },
        VirtualMachineInterfaceId = 0,
    });
    
    example, err := netbox.NewMacAddress(ctx, "macAddressResource", &netbox.MacAddressArgs{
    	MacAddress: pulumi.String("string"),
    	Comments:   pulumi.String("string"),
    	CustomFields: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	Description:       pulumi.String("string"),
    	DeviceInterfaceId: pulumi.Float64(0),
    	InterfaceId:       pulumi.Float64(0),
    	MacAddressId:      pulumi.String("string"),
    	ObjectType:        pulumi.String("string"),
    	Tags: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	VirtualMachineInterfaceId: pulumi.Float64(0),
    })
    
    var macAddressResource = new MacAddress("macAddressResource", MacAddressArgs.builder()
        .macAddress("string")
        .comments("string")
        .customFields(Map.of("string", "string"))
        .description("string")
        .deviceInterfaceId(0.0)
        .interfaceId(0.0)
        .macAddressId("string")
        .objectType("string")
        .tags("string")
        .virtualMachineInterfaceId(0.0)
        .build());
    
    mac_address_resource = netbox.MacAddress("macAddressResource",
        mac_address="string",
        comments="string",
        custom_fields={
            "string": "string",
        },
        description="string",
        device_interface_id=0,
        interface_id=0,
        mac_address_id="string",
        object_type="string",
        tags=["string"],
        virtual_machine_interface_id=0)
    
    const macAddressResource = new netbox.MacAddress("macAddressResource", {
        macAddress: "string",
        comments: "string",
        customFields: {
            string: "string",
        },
        description: "string",
        deviceInterfaceId: 0,
        interfaceId: 0,
        macAddressId: "string",
        objectType: "string",
        tags: ["string"],
        virtualMachineInterfaceId: 0,
    });
    
    type: netbox:MacAddress
    properties:
        comments: string
        customFields:
            string: string
        description: string
        deviceInterfaceId: 0
        interfaceId: 0
        macAddress: string
        macAddressId: string
        objectType: string
        tags:
            - string
        virtualMachineInterfaceId: 0
    

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

    MacAddress string
    Comments string
    CustomFields Dictionary<string, string>
    Description string
    DeviceInterfaceId double
    Conflicts with interface_id and virtual_machine_interface_id.
    InterfaceId double
    Required when object_type is set.
    MacAddressId string
    The ID of this resource.
    ObjectType string
    Valid values are virtualization.vminterface and dcim.interface. Required when interface_id is set.
    Tags List<string>
    VirtualMachineInterfaceId double
    Conflicts with interface_id and device_interface_id.
    MacAddress string
    Comments string
    CustomFields map[string]string
    Description string
    DeviceInterfaceId float64
    Conflicts with interface_id and virtual_machine_interface_id.
    InterfaceId float64
    Required when object_type is set.
    MacAddressId string
    The ID of this resource.
    ObjectType string
    Valid values are virtualization.vminterface and dcim.interface. Required when interface_id is set.
    Tags []string
    VirtualMachineInterfaceId float64
    Conflicts with interface_id and device_interface_id.
    macAddress String
    comments String
    customFields Map<String,String>
    description String
    deviceInterfaceId Double
    Conflicts with interface_id and virtual_machine_interface_id.
    interfaceId Double
    Required when object_type is set.
    macAddressId String
    The ID of this resource.
    objectType String
    Valid values are virtualization.vminterface and dcim.interface. Required when interface_id is set.
    tags List<String>
    virtualMachineInterfaceId Double
    Conflicts with interface_id and device_interface_id.
    macAddress string
    comments string
    customFields {[key: string]: string}
    description string
    deviceInterfaceId number
    Conflicts with interface_id and virtual_machine_interface_id.
    interfaceId number
    Required when object_type is set.
    macAddressId string
    The ID of this resource.
    objectType string
    Valid values are virtualization.vminterface and dcim.interface. Required when interface_id is set.
    tags string[]
    virtualMachineInterfaceId number
    Conflicts with interface_id and device_interface_id.
    mac_address str
    comments str
    custom_fields Mapping[str, str]
    description str
    device_interface_id float
    Conflicts with interface_id and virtual_machine_interface_id.
    interface_id float
    Required when object_type is set.
    mac_address_id str
    The ID of this resource.
    object_type str
    Valid values are virtualization.vminterface and dcim.interface. Required when interface_id is set.
    tags Sequence[str]
    virtual_machine_interface_id float
    Conflicts with interface_id and device_interface_id.
    macAddress String
    comments String
    customFields Map<String>
    description String
    deviceInterfaceId Number
    Conflicts with interface_id and virtual_machine_interface_id.
    interfaceId Number
    Required when object_type is set.
    macAddressId String
    The ID of this resource.
    objectType String
    Valid values are virtualization.vminterface and dcim.interface. Required when interface_id is set.
    tags List<String>
    virtualMachineInterfaceId Number
    Conflicts with interface_id and device_interface_id.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    TagsAlls List<string>
    Id string
    The provider-assigned unique ID for this managed resource.
    TagsAlls []string
    id String
    The provider-assigned unique ID for this managed resource.
    tagsAlls List<String>
    id string
    The provider-assigned unique ID for this managed resource.
    tagsAlls string[]
    id str
    The provider-assigned unique ID for this managed resource.
    tags_alls Sequence[str]
    id String
    The provider-assigned unique ID for this managed resource.
    tagsAlls List<String>

    Look up Existing MacAddress Resource

    Get an existing MacAddress 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?: MacAddressState, opts?: CustomResourceOptions): MacAddress
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            comments: Optional[str] = None,
            custom_fields: Optional[Mapping[str, str]] = None,
            description: Optional[str] = None,
            device_interface_id: Optional[float] = None,
            interface_id: Optional[float] = None,
            mac_address: Optional[str] = None,
            mac_address_id: Optional[str] = None,
            object_type: Optional[str] = None,
            tags: Optional[Sequence[str]] = None,
            tags_alls: Optional[Sequence[str]] = None,
            virtual_machine_interface_id: Optional[float] = None) -> MacAddress
    func GetMacAddress(ctx *Context, name string, id IDInput, state *MacAddressState, opts ...ResourceOption) (*MacAddress, error)
    public static MacAddress Get(string name, Input<string> id, MacAddressState? state, CustomResourceOptions? opts = null)
    public static MacAddress get(String name, Output<String> id, MacAddressState state, CustomResourceOptions options)
    resources:  _:    type: netbox:MacAddress    get:      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:
    Comments string
    CustomFields Dictionary<string, string>
    Description string
    DeviceInterfaceId double
    Conflicts with interface_id and virtual_machine_interface_id.
    InterfaceId double
    Required when object_type is set.
    MacAddress string
    MacAddressId string
    The ID of this resource.
    ObjectType string
    Valid values are virtualization.vminterface and dcim.interface. Required when interface_id is set.
    Tags List<string>
    TagsAlls List<string>
    VirtualMachineInterfaceId double
    Conflicts with interface_id and device_interface_id.
    Comments string
    CustomFields map[string]string
    Description string
    DeviceInterfaceId float64
    Conflicts with interface_id and virtual_machine_interface_id.
    InterfaceId float64
    Required when object_type is set.
    MacAddress string
    MacAddressId string
    The ID of this resource.
    ObjectType string
    Valid values are virtualization.vminterface and dcim.interface. Required when interface_id is set.
    Tags []string
    TagsAlls []string
    VirtualMachineInterfaceId float64
    Conflicts with interface_id and device_interface_id.
    comments String
    customFields Map<String,String>
    description String
    deviceInterfaceId Double
    Conflicts with interface_id and virtual_machine_interface_id.
    interfaceId Double
    Required when object_type is set.
    macAddress String
    macAddressId String
    The ID of this resource.
    objectType String
    Valid values are virtualization.vminterface and dcim.interface. Required when interface_id is set.
    tags List<String>
    tagsAlls List<String>
    virtualMachineInterfaceId Double
    Conflicts with interface_id and device_interface_id.
    comments string
    customFields {[key: string]: string}
    description string
    deviceInterfaceId number
    Conflicts with interface_id and virtual_machine_interface_id.
    interfaceId number
    Required when object_type is set.
    macAddress string
    macAddressId string
    The ID of this resource.
    objectType string
    Valid values are virtualization.vminterface and dcim.interface. Required when interface_id is set.
    tags string[]
    tagsAlls string[]
    virtualMachineInterfaceId number
    Conflicts with interface_id and device_interface_id.
    comments str
    custom_fields Mapping[str, str]
    description str
    device_interface_id float
    Conflicts with interface_id and virtual_machine_interface_id.
    interface_id float
    Required when object_type is set.
    mac_address str
    mac_address_id str
    The ID of this resource.
    object_type str
    Valid values are virtualization.vminterface and dcim.interface. Required when interface_id is set.
    tags Sequence[str]
    tags_alls Sequence[str]
    virtual_machine_interface_id float
    Conflicts with interface_id and device_interface_id.
    comments String
    customFields Map<String>
    description String
    deviceInterfaceId Number
    Conflicts with interface_id and virtual_machine_interface_id.
    interfaceId Number
    Required when object_type is set.
    macAddress String
    macAddressId String
    The ID of this resource.
    objectType String
    Valid values are virtualization.vminterface and dcim.interface. Required when interface_id is set.
    tags List<String>
    tagsAlls List<String>
    virtualMachineInterfaceId Number
    Conflicts with interface_id and device_interface_id.

    Package Details

    Repository
    netbox e-breuninger/terraform-provider-netbox
    License
    Notes
    This Pulumi package is based on the netbox Terraform Provider.
    netbox logo
    netbox 4.0.0 published on Thursday, Jun 12, 2025 by e-breuninger