1. Packages
  2. Netbox Provider
  3. API Docs
  4. IpAddress
netbox 3.10.0 published on Monday, Apr 14, 2025 by e-breuninger

netbox.IpAddress

Explore with Pulumi AI

netbox logo
netbox 3.10.0 published on Monday, Apr 14, 2025 by e-breuninger

    From the official documentation:

    An IP address comprises a single host address (either IPv4 or IPv6) and its subnet mask. Its mask should match exactly how the IP address is configured on an interface in the real world.

    Like a prefix, an IP address can optionally be assigned to a VRF (otherwise, it will appear in the “global” table). IP addresses are automatically arranged under parent prefixes within their respective VRFs according to the IP hierarchy.

    Example Usage

    Creating an IP address that is assigned to a virtual machine interface

    Starting with provider version 3.5.0, you can use the virtual_machine_interface_id attribute to assign an IP address to a virtual machine interface. You can also use the interface_id and object_type attributes instead.

    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 thisIpAddress = new netbox.IpAddress("thisIpAddress", {
        ipAddress: "10.0.0.60/24",
        status: "active",
        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_ip_address = netbox.IpAddress("thisIpAddress",
        ip_address="10.0.0.60/24",
        status="active",
        virtual_machine_interface_id=this_interface.interface_id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/netbox/v3/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.NewIpAddress(ctx, "thisIpAddress", &netbox.IpAddressArgs{
    			IpAddress:                 pulumi.String("10.0.0.60/24"),
    			Status:                    pulumi.String("active"),
    			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 thisIpAddress = new Netbox.IpAddress("thisIpAddress", new()
        {
            IpAddress = "10.0.0.60/24",
            Status = "active",
            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.IpAddress;
    import com.pulumi.netbox.IpAddressArgs;
    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 thisIpAddress = new IpAddress("thisIpAddress", IpAddressArgs.builder()
                .ipAddress("10.0.0.60/24")
                .status("active")
                .virtualMachineInterfaceId(thisInterface.interfaceId())
                .build());
    
        }
    }
    
    resources:
      # Assuming a virtual machine with the id `123` exists
      thisInterface:
        type: netbox:Interface
        properties:
          virtualMachineId: 123
      thisIpAddress:
        type: netbox:IpAddress
        properties:
          ipAddress: 10.0.0.60/24
          status: active
          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 thisIpAddress = new netbox.IpAddress("thisIpAddress", {
        ipAddress: "10.0.0.60/24",
        status: "active",
        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_ip_address = netbox.IpAddress("thisIpAddress",
        ip_address="10.0.0.60/24",
        status="active",
        interface_id=this_interface.interface_id,
        object_type="virtualization.vminterface")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/netbox/v3/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.NewIpAddress(ctx, "thisIpAddress", &netbox.IpAddressArgs{
    			IpAddress:   pulumi.String("10.0.0.60/24"),
    			Status:      pulumi.String("active"),
    			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 thisIpAddress = new Netbox.IpAddress("thisIpAddress", new()
        {
            IpAddress = "10.0.0.60/24",
            Status = "active",
            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.IpAddress;
    import com.pulumi.netbox.IpAddressArgs;
    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 thisIpAddress = new IpAddress("thisIpAddress", IpAddressArgs.builder()
                .ipAddress("10.0.0.60/24")
                .status("active")
                .interfaceId(thisInterface.interfaceId())
                .objectType("virtualization.vminterface")
                .build());
    
        }
    }
    
    resources:
      # Assuming a virtual machine with the id `123` exists
      thisInterface:
        type: netbox:Interface
        properties:
          virtualMachineId: 123
      thisIpAddress:
        type: netbox:IpAddress
        properties:
          ipAddress: 10.0.0.60/24
          status: active
          interfaceId: ${thisInterface.interfaceId}
          objectType: virtualization.vminterface
    

    Creating an IP address that is assigned to a device interface

    Starting with provider version 3.5.0, you can use the device_interface_id attribute to assign an IP address to a device interface. You can also use the interface_id and object_type attributes instead.

    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 thisIpAddress = new netbox.IpAddress("thisIpAddress", {
        ipAddress: "10.0.0.60/24",
        status: "active",
        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_ip_address = netbox.IpAddress("thisIpAddress",
        ip_address="10.0.0.60/24",
        status="active",
        device_interface_id=this_device_interface.device_interface_id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/netbox/v3/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.NewIpAddress(ctx, "thisIpAddress", &netbox.IpAddressArgs{
    			IpAddress:         pulumi.String("10.0.0.60/24"),
    			Status:            pulumi.String("active"),
    			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 thisIpAddress = new Netbox.IpAddress("thisIpAddress", new()
        {
            IpAddress = "10.0.0.60/24",
            Status = "active",
            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.IpAddress;
    import com.pulumi.netbox.IpAddressArgs;
    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 thisIpAddress = new IpAddress("thisIpAddress", IpAddressArgs.builder()
                .ipAddress("10.0.0.60/24")
                .status("active")
                .deviceInterfaceId(thisDeviceInterface.deviceInterfaceId())
                .build());
    
        }
    }
    
    resources:
      # Assuming a device with the id `123` exists
      thisDeviceInterface:
        type: netbox:DeviceInterface
        properties:
          deviceId: 123
          type: 1000base-t
      thisIpAddress:
        type: netbox:IpAddress
        properties:
          ipAddress: 10.0.0.60/24
          status: active
          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 thisIpAddress = new netbox.IpAddress("thisIpAddress", {
        ipAddress: "10.0.0.60/24",
        status: "active",
        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_ip_address = netbox.IpAddress("thisIpAddress",
        ip_address="10.0.0.60/24",
        status="active",
        interface_id=this_device_interface.device_interface_id,
        object_type="dcim.interface")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/netbox/v3/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.NewIpAddress(ctx, "thisIpAddress", &netbox.IpAddressArgs{
    			IpAddress:   pulumi.String("10.0.0.60/24"),
    			Status:      pulumi.String("active"),
    			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 thisIpAddress = new Netbox.IpAddress("thisIpAddress", new()
        {
            IpAddress = "10.0.0.60/24",
            Status = "active",
            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.IpAddress;
    import com.pulumi.netbox.IpAddressArgs;
    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 thisIpAddress = new IpAddress("thisIpAddress", IpAddressArgs.builder()
                .ipAddress("10.0.0.60/24")
                .status("active")
                .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
      thisIpAddress:
        type: netbox:IpAddress
        properties:
          ipAddress: 10.0.0.60/24
          status: active
          interfaceId: ${thisDeviceInterface.deviceInterfaceId}
          objectType: dcim.interface
    

    Creating an IP address that is not assigned to anything

    You can create an IP address that is not assigend to anything by omitting the attributes mentioned above.

    import * as pulumi from "@pulumi/pulumi";
    import * as netbox from "@pulumi/netbox";
    
    const _this = new netbox.IpAddress("this", {
        ipAddress: "10.0.0.50/24",
        status: "reserved",
    });
    
    import pulumi
    import pulumi_netbox as netbox
    
    this = netbox.IpAddress("this",
        ip_address="10.0.0.50/24",
        status="reserved")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/netbox/v3/netbox"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := netbox.NewIpAddress(ctx, "this", &netbox.IpAddressArgs{
    			IpAddress: pulumi.String("10.0.0.50/24"),
    			Status:    pulumi.String("reserved"),
    		})
    		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.IpAddress("this", new()
        {
            IpAddress = "10.0.0.50/24",
            Status = "reserved",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.netbox.IpAddress;
    import com.pulumi.netbox.IpAddressArgs;
    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 IpAddress("this", IpAddressArgs.builder()
                .ipAddress("10.0.0.50/24")
                .status("reserved")
                .build());
    
        }
    }
    
    resources:
      this:
        type: netbox:IpAddress
        properties:
          ipAddress: 10.0.0.50/24
          status: reserved
    

    Create IpAddress Resource

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

    Constructor syntax

    new IpAddress(name: string, args: IpAddressArgs, opts?: CustomResourceOptions);
    @overload
    def IpAddress(resource_name: str,
                  args: IpAddressArgs,
                  opts: Optional[ResourceOptions] = None)
    
    @overload
    def IpAddress(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  ip_address: Optional[str] = None,
                  status: Optional[str] = None,
                  ip_address_id: Optional[str] = None,
                  dns_name: Optional[str] = None,
                  interface_id: Optional[float] = None,
                  device_interface_id: Optional[float] = None,
                  custom_fields: Optional[Mapping[str, str]] = None,
                  nat_inside_address_id: Optional[float] = None,
                  object_type: Optional[str] = None,
                  role: Optional[str] = None,
                  description: Optional[str] = None,
                  tags: Optional[Sequence[str]] = None,
                  tenant_id: Optional[float] = None,
                  virtual_machine_interface_id: Optional[float] = None,
                  vrf_id: Optional[float] = None)
    func NewIpAddress(ctx *Context, name string, args IpAddressArgs, opts ...ResourceOption) (*IpAddress, error)
    public IpAddress(string name, IpAddressArgs args, CustomResourceOptions? opts = null)
    public IpAddress(String name, IpAddressArgs args)
    public IpAddress(String name, IpAddressArgs args, CustomResourceOptions options)
    
    type: netbox:IpAddress
    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 IpAddressArgs
    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 IpAddressArgs
    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 IpAddressArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args IpAddressArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args IpAddressArgs
    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 ipAddressResource = new Netbox.IpAddress("ipAddressResource", new()
    {
        IpAddress = "string",
        Status = "string",
        IpAddressId = "string",
        DnsName = "string",
        InterfaceId = 0,
        DeviceInterfaceId = 0,
        CustomFields = 
        {
            { "string", "string" },
        },
        NatInsideAddressId = 0,
        ObjectType = "string",
        Role = "string",
        Description = "string",
        Tags = new[]
        {
            "string",
        },
        TenantId = 0,
        VirtualMachineInterfaceId = 0,
        VrfId = 0,
    });
    
    example, err := netbox.NewIpAddress(ctx, "ipAddressResource", &netbox.IpAddressArgs{
    	IpAddress:         pulumi.String("string"),
    	Status:            pulumi.String("string"),
    	IpAddressId:       pulumi.String("string"),
    	DnsName:           pulumi.String("string"),
    	InterfaceId:       pulumi.Float64(0),
    	DeviceInterfaceId: pulumi.Float64(0),
    	CustomFields: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	NatInsideAddressId: pulumi.Float64(0),
    	ObjectType:         pulumi.String("string"),
    	Role:               pulumi.String("string"),
    	Description:        pulumi.String("string"),
    	Tags: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	TenantId:                  pulumi.Float64(0),
    	VirtualMachineInterfaceId: pulumi.Float64(0),
    	VrfId:                     pulumi.Float64(0),
    })
    
    var ipAddressResource = new IpAddress("ipAddressResource", IpAddressArgs.builder()
        .ipAddress("string")
        .status("string")
        .ipAddressId("string")
        .dnsName("string")
        .interfaceId(0)
        .deviceInterfaceId(0)
        .customFields(Map.of("string", "string"))
        .natInsideAddressId(0)
        .objectType("string")
        .role("string")
        .description("string")
        .tags("string")
        .tenantId(0)
        .virtualMachineInterfaceId(0)
        .vrfId(0)
        .build());
    
    ip_address_resource = netbox.IpAddress("ipAddressResource",
        ip_address="string",
        status="string",
        ip_address_id="string",
        dns_name="string",
        interface_id=0,
        device_interface_id=0,
        custom_fields={
            "string": "string",
        },
        nat_inside_address_id=0,
        object_type="string",
        role="string",
        description="string",
        tags=["string"],
        tenant_id=0,
        virtual_machine_interface_id=0,
        vrf_id=0)
    
    const ipAddressResource = new netbox.IpAddress("ipAddressResource", {
        ipAddress: "string",
        status: "string",
        ipAddressId: "string",
        dnsName: "string",
        interfaceId: 0,
        deviceInterfaceId: 0,
        customFields: {
            string: "string",
        },
        natInsideAddressId: 0,
        objectType: "string",
        role: "string",
        description: "string",
        tags: ["string"],
        tenantId: 0,
        virtualMachineInterfaceId: 0,
        vrfId: 0,
    });
    
    type: netbox:IpAddress
    properties:
        customFields:
            string: string
        description: string
        deviceInterfaceId: 0
        dnsName: string
        interfaceId: 0
        ipAddress: string
        ipAddressId: string
        natInsideAddressId: 0
        objectType: string
        role: string
        status: string
        tags:
            - string
        tenantId: 0
        virtualMachineInterfaceId: 0
        vrfId: 0
    

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

    IpAddress string
    Status string
    Valid values are active, reserved, deprecated, dhcp and slaac.
    CustomFields Dictionary<string, string>
    Description string
    DeviceInterfaceId double
    Conflicts with interface_id and virtual_machine_interface_id.
    DnsName string
    InterfaceId double
    Required when object_type is set.
    IpAddressId string
    The ID of this resource.
    NatInsideAddressId double
    ObjectType string
    Valid values are virtualization.vminterface and dcim.interface. Required when interface_id is set.
    Role string
    Valid values are loopback, secondary, anycast, vip, vrrp, hsrp, glbp and carp.
    Tags List<string>
    TenantId double
    VirtualMachineInterfaceId double
    Conflicts with interface_id and device_interface_id.
    VrfId double
    IpAddress string
    Status string
    Valid values are active, reserved, deprecated, dhcp and slaac.
    CustomFields map[string]string
    Description string
    DeviceInterfaceId float64
    Conflicts with interface_id and virtual_machine_interface_id.
    DnsName string
    InterfaceId float64
    Required when object_type is set.
    IpAddressId string
    The ID of this resource.
    NatInsideAddressId float64
    ObjectType string
    Valid values are virtualization.vminterface and dcim.interface. Required when interface_id is set.
    Role string
    Valid values are loopback, secondary, anycast, vip, vrrp, hsrp, glbp and carp.
    Tags []string
    TenantId float64
    VirtualMachineInterfaceId float64
    Conflicts with interface_id and device_interface_id.
    VrfId float64
    ipAddress String
    status String
    Valid values are active, reserved, deprecated, dhcp and slaac.
    customFields Map<String,String>
    description String
    deviceInterfaceId Double
    Conflicts with interface_id and virtual_machine_interface_id.
    dnsName String
    interfaceId Double
    Required when object_type is set.
    ipAddressId String
    The ID of this resource.
    natInsideAddressId Double
    objectType String
    Valid values are virtualization.vminterface and dcim.interface. Required when interface_id is set.
    role String
    Valid values are loopback, secondary, anycast, vip, vrrp, hsrp, glbp and carp.
    tags List<String>
    tenantId Double
    virtualMachineInterfaceId Double
    Conflicts with interface_id and device_interface_id.
    vrfId Double
    ipAddress string
    status string
    Valid values are active, reserved, deprecated, dhcp and slaac.
    customFields {[key: string]: string}
    description string
    deviceInterfaceId number
    Conflicts with interface_id and virtual_machine_interface_id.
    dnsName string
    interfaceId number
    Required when object_type is set.
    ipAddressId string
    The ID of this resource.
    natInsideAddressId number
    objectType string
    Valid values are virtualization.vminterface and dcim.interface. Required when interface_id is set.
    role string
    Valid values are loopback, secondary, anycast, vip, vrrp, hsrp, glbp and carp.
    tags string[]
    tenantId number
    virtualMachineInterfaceId number
    Conflicts with interface_id and device_interface_id.
    vrfId number
    ip_address str
    status str
    Valid values are active, reserved, deprecated, dhcp and slaac.
    custom_fields Mapping[str, str]
    description str
    device_interface_id float
    Conflicts with interface_id and virtual_machine_interface_id.
    dns_name str
    interface_id float
    Required when object_type is set.
    ip_address_id str
    The ID of this resource.
    nat_inside_address_id float
    object_type str
    Valid values are virtualization.vminterface and dcim.interface. Required when interface_id is set.
    role str
    Valid values are loopback, secondary, anycast, vip, vrrp, hsrp, glbp and carp.
    tags Sequence[str]
    tenant_id float
    virtual_machine_interface_id float
    Conflicts with interface_id and device_interface_id.
    vrf_id float
    ipAddress String
    status String
    Valid values are active, reserved, deprecated, dhcp and slaac.
    customFields Map<String>
    description String
    deviceInterfaceId Number
    Conflicts with interface_id and virtual_machine_interface_id.
    dnsName String
    interfaceId Number
    Required when object_type is set.
    ipAddressId String
    The ID of this resource.
    natInsideAddressId Number
    objectType String
    Valid values are virtualization.vminterface and dcim.interface. Required when interface_id is set.
    role String
    Valid values are loopback, secondary, anycast, vip, vrrp, hsrp, glbp and carp.
    tags List<String>
    tenantId Number
    virtualMachineInterfaceId Number
    Conflicts with interface_id and device_interface_id.
    vrfId Number

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    NatOutsideAddresses List<IpAddressNatOutsideAddress>
    Id string
    The provider-assigned unique ID for this managed resource.
    NatOutsideAddresses []IpAddressNatOutsideAddress
    id String
    The provider-assigned unique ID for this managed resource.
    natOutsideAddresses List<IpAddressNatOutsideAddress>
    id string
    The provider-assigned unique ID for this managed resource.
    natOutsideAddresses IpAddressNatOutsideAddress[]
    id str
    The provider-assigned unique ID for this managed resource.
    nat_outside_addresses Sequence[IpAddressNatOutsideAddress]
    id String
    The provider-assigned unique ID for this managed resource.
    natOutsideAddresses List<Property Map>

    Look up Existing IpAddress Resource

    Get an existing IpAddress 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?: IpAddressState, opts?: CustomResourceOptions): IpAddress
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            custom_fields: Optional[Mapping[str, str]] = None,
            description: Optional[str] = None,
            device_interface_id: Optional[float] = None,
            dns_name: Optional[str] = None,
            interface_id: Optional[float] = None,
            ip_address: Optional[str] = None,
            ip_address_id: Optional[str] = None,
            nat_inside_address_id: Optional[float] = None,
            nat_outside_addresses: Optional[Sequence[IpAddressNatOutsideAddressArgs]] = None,
            object_type: Optional[str] = None,
            role: Optional[str] = None,
            status: Optional[str] = None,
            tags: Optional[Sequence[str]] = None,
            tenant_id: Optional[float] = None,
            virtual_machine_interface_id: Optional[float] = None,
            vrf_id: Optional[float] = None) -> IpAddress
    func GetIpAddress(ctx *Context, name string, id IDInput, state *IpAddressState, opts ...ResourceOption) (*IpAddress, error)
    public static IpAddress Get(string name, Input<string> id, IpAddressState? state, CustomResourceOptions? opts = null)
    public static IpAddress get(String name, Output<String> id, IpAddressState state, CustomResourceOptions options)
    resources:  _:    type: netbox:IpAddress    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:
    CustomFields Dictionary<string, string>
    Description string
    DeviceInterfaceId double
    Conflicts with interface_id and virtual_machine_interface_id.
    DnsName string
    InterfaceId double
    Required when object_type is set.
    IpAddress string
    IpAddressId string
    The ID of this resource.
    NatInsideAddressId double
    NatOutsideAddresses List<IpAddressNatOutsideAddress>
    ObjectType string
    Valid values are virtualization.vminterface and dcim.interface. Required when interface_id is set.
    Role string
    Valid values are loopback, secondary, anycast, vip, vrrp, hsrp, glbp and carp.
    Status string
    Valid values are active, reserved, deprecated, dhcp and slaac.
    Tags List<string>
    TenantId double
    VirtualMachineInterfaceId double
    Conflicts with interface_id and device_interface_id.
    VrfId double
    CustomFields map[string]string
    Description string
    DeviceInterfaceId float64
    Conflicts with interface_id and virtual_machine_interface_id.
    DnsName string
    InterfaceId float64
    Required when object_type is set.
    IpAddress string
    IpAddressId string
    The ID of this resource.
    NatInsideAddressId float64
    NatOutsideAddresses []IpAddressNatOutsideAddressArgs
    ObjectType string
    Valid values are virtualization.vminterface and dcim.interface. Required when interface_id is set.
    Role string
    Valid values are loopback, secondary, anycast, vip, vrrp, hsrp, glbp and carp.
    Status string
    Valid values are active, reserved, deprecated, dhcp and slaac.
    Tags []string
    TenantId float64
    VirtualMachineInterfaceId float64
    Conflicts with interface_id and device_interface_id.
    VrfId float64
    customFields Map<String,String>
    description String
    deviceInterfaceId Double
    Conflicts with interface_id and virtual_machine_interface_id.
    dnsName String
    interfaceId Double
    Required when object_type is set.
    ipAddress String
    ipAddressId String
    The ID of this resource.
    natInsideAddressId Double
    natOutsideAddresses List<IpAddressNatOutsideAddress>
    objectType String
    Valid values are virtualization.vminterface and dcim.interface. Required when interface_id is set.
    role String
    Valid values are loopback, secondary, anycast, vip, vrrp, hsrp, glbp and carp.
    status String
    Valid values are active, reserved, deprecated, dhcp and slaac.
    tags List<String>
    tenantId Double
    virtualMachineInterfaceId Double
    Conflicts with interface_id and device_interface_id.
    vrfId Double
    customFields {[key: string]: string}
    description string
    deviceInterfaceId number
    Conflicts with interface_id and virtual_machine_interface_id.
    dnsName string
    interfaceId number
    Required when object_type is set.
    ipAddress string
    ipAddressId string
    The ID of this resource.
    natInsideAddressId number
    natOutsideAddresses IpAddressNatOutsideAddress[]
    objectType string
    Valid values are virtualization.vminterface and dcim.interface. Required when interface_id is set.
    role string
    Valid values are loopback, secondary, anycast, vip, vrrp, hsrp, glbp and carp.
    status string
    Valid values are active, reserved, deprecated, dhcp and slaac.
    tags string[]
    tenantId number
    virtualMachineInterfaceId number
    Conflicts with interface_id and device_interface_id.
    vrfId number
    custom_fields Mapping[str, str]
    description str
    device_interface_id float
    Conflicts with interface_id and virtual_machine_interface_id.
    dns_name str
    interface_id float
    Required when object_type is set.
    ip_address str
    ip_address_id str
    The ID of this resource.
    nat_inside_address_id float
    nat_outside_addresses Sequence[IpAddressNatOutsideAddressArgs]
    object_type str
    Valid values are virtualization.vminterface and dcim.interface. Required when interface_id is set.
    role str
    Valid values are loopback, secondary, anycast, vip, vrrp, hsrp, glbp and carp.
    status str
    Valid values are active, reserved, deprecated, dhcp and slaac.
    tags Sequence[str]
    tenant_id float
    virtual_machine_interface_id float
    Conflicts with interface_id and device_interface_id.
    vrf_id float
    customFields Map<String>
    description String
    deviceInterfaceId Number
    Conflicts with interface_id and virtual_machine_interface_id.
    dnsName String
    interfaceId Number
    Required when object_type is set.
    ipAddress String
    ipAddressId String
    The ID of this resource.
    natInsideAddressId Number
    natOutsideAddresses List<Property Map>
    objectType String
    Valid values are virtualization.vminterface and dcim.interface. Required when interface_id is set.
    role String
    Valid values are loopback, secondary, anycast, vip, vrrp, hsrp, glbp and carp.
    status String
    Valid values are active, reserved, deprecated, dhcp and slaac.
    tags List<String>
    tenantId Number
    virtualMachineInterfaceId Number
    Conflicts with interface_id and device_interface_id.
    vrfId Number

    Supporting Types

    IpAddressNatOutsideAddress, IpAddressNatOutsideAddressArgs

    AddressFamily double
    Id double
    IpAddress string
    AddressFamily float64
    Id float64
    IpAddress string
    addressFamily Double
    id Double
    ipAddress String
    addressFamily number
    id number
    ipAddress string
    addressFamily Number
    id Number
    ipAddress String

    Package Details

    Repository
    netbox e-breuninger/terraform-provider-netbox
    License
    Notes
    This Pulumi package is based on the netbox Terraform Provider.
    netbox logo
    netbox 3.10.0 published on Monday, Apr 14, 2025 by e-breuninger