published on Wednesday, Nov 4, 2026 by e-breuninger
published on Wednesday, Nov 4, 2026 by e-breuninger
A NetBox IP address (ipam.ipaddress).
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
An IP address is either unassigned or assigned to one interface. The assignment is written as device_interface_id or virtual_machine_interface_id, or as the assigned_object_type and assigned_object_id pair; the provider fills in the other form.
Assigned to a device interface
import * as pulumi from "@pulumi/pulumi";
import * as netbox from "@pulumi/netbox";
const test = new netbox.Site("test", {name: "test-site"});
const testManufacturer = new netbox.Manufacturer("test", {name: "test-manufacturer"});
const testDeviceType = new netbox.DeviceType("test", {
manufacturerId: testManufacturer.manufacturerId,
model: "test-device-type",
});
const testDeviceRole = new netbox.DeviceRole("test", {name: "test-device-role"});
const testDevice = new netbox.Device("test", {
name: "test-device",
deviceTypeId: testDeviceType.deviceTypeId,
roleId: testDeviceRole.deviceRoleId,
siteId: test.siteId,
});
const testDeviceInterface = new netbox.DeviceInterface("test", {
deviceId: testDevice.deviceId,
name: "eth0",
type: "1000base-t",
});
const testIpAddress = new netbox.IpAddress("test", {
ipAddress: "192.0.2.10/24",
status: "active",
deviceInterfaceId: testDeviceInterface.deviceInterfaceId,
dnsName: "test-device.example.com",
});
import pulumi
import pulumi_netbox as netbox
test = netbox.Site("test", name="test-site")
test_manufacturer = netbox.Manufacturer("test", name="test-manufacturer")
test_device_type = netbox.DeviceType("test",
manufacturer_id=test_manufacturer.manufacturer_id,
model="test-device-type")
test_device_role = netbox.DeviceRole("test", name="test-device-role")
test_device = netbox.Device("test",
name="test-device",
device_type_id=test_device_type.device_type_id,
role_id=test_device_role.device_role_id,
site_id=test.site_id)
test_device_interface = netbox.DeviceInterface("test",
device_id=test_device.device_id,
name="eth0",
type="1000base-t")
test_ip_address = netbox.IpAddress("test",
ip_address="192.0.2.10/24",
status="active",
device_interface_id=test_device_interface.device_interface_id,
dns_name="test-device.example.com")
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.NewSite(ctx, "test", &netbox.SiteArgs{
Name: pulumi.String("test-site"),
})
if err != nil {
return err
}
testManufacturer, err := netbox.NewManufacturer(ctx, "test", &netbox.ManufacturerArgs{
Name: pulumi.String("test-manufacturer"),
})
if err != nil {
return err
}
testDeviceType, err := netbox.NewDeviceType(ctx, "test", &netbox.DeviceTypeArgs{
ManufacturerId: testManufacturer.ManufacturerId,
Model: pulumi.String("test-device-type"),
})
if err != nil {
return err
}
testDeviceRole, err := netbox.NewDeviceRole(ctx, "test", &netbox.DeviceRoleArgs{
Name: pulumi.String("test-device-role"),
})
if err != nil {
return err
}
testDevice, err := netbox.NewDevice(ctx, "test", &netbox.DeviceArgs{
Name: pulumi.String("test-device"),
DeviceTypeId: testDeviceType.DeviceTypeId,
RoleId: testDeviceRole.DeviceRoleId,
SiteId: test.SiteId,
})
if err != nil {
return err
}
testDeviceInterface, err := netbox.NewDeviceInterface(ctx, "test", &netbox.DeviceInterfaceArgs{
DeviceId: testDevice.DeviceId,
Name: pulumi.String("eth0"),
Type: pulumi.String("1000base-t"),
})
if err != nil {
return err
}
_, err = netbox.NewIpAddress(ctx, "test", &netbox.IpAddressArgs{
IpAddress: pulumi.String("192.0.2.10/24"),
Status: pulumi.String("active"),
DeviceInterfaceId: testDeviceInterface.DeviceInterfaceId,
DnsName: pulumi.String("test-device.example.com"),
})
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.Site("test", new()
{
Name = "test-site",
});
var testManufacturer = new Netbox.Manufacturer("test", new()
{
Name = "test-manufacturer",
});
var testDeviceType = new Netbox.DeviceType("test", new()
{
ManufacturerId = testManufacturer.ManufacturerId,
Model = "test-device-type",
});
var testDeviceRole = new Netbox.DeviceRole("test", new()
{
Name = "test-device-role",
});
var testDevice = new Netbox.Device("test", new()
{
Name = "test-device",
DeviceTypeId = testDeviceType.DeviceTypeId,
RoleId = testDeviceRole.DeviceRoleId,
SiteId = test.SiteId,
});
var testDeviceInterface = new Netbox.DeviceInterface("test", new()
{
DeviceId = testDevice.DeviceId,
Name = "eth0",
Type = "1000base-t",
});
var testIpAddress = new Netbox.IpAddress("test", new()
{
IpAddress = "192.0.2.10/24",
Status = "active",
DeviceInterfaceId = testDeviceInterface.DeviceInterfaceId,
DnsName = "test-device.example.com",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.netbox.Site;
import com.pulumi.netbox.SiteArgs;
import com.pulumi.netbox.Manufacturer;
import com.pulumi.netbox.ManufacturerArgs;
import com.pulumi.netbox.DeviceType;
import com.pulumi.netbox.DeviceTypeArgs;
import com.pulumi.netbox.DeviceRole;
import com.pulumi.netbox.DeviceRoleArgs;
import com.pulumi.netbox.Device;
import com.pulumi.netbox.DeviceArgs;
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) {
var test = new Site("test", SiteArgs.builder()
.name("test-site")
.build());
var testManufacturer = new Manufacturer("testManufacturer", ManufacturerArgs.builder()
.name("test-manufacturer")
.build());
var testDeviceType = new DeviceType("testDeviceType", DeviceTypeArgs.builder()
.manufacturerId(testManufacturer.manufacturerId())
.model("test-device-type")
.build());
var testDeviceRole = new DeviceRole("testDeviceRole", DeviceRoleArgs.builder()
.name("test-device-role")
.build());
var testDevice = new Device("testDevice", DeviceArgs.builder()
.name("test-device")
.deviceTypeId(testDeviceType.deviceTypeId())
.roleId(testDeviceRole.deviceRoleId())
.siteId(test.siteId())
.build());
var testDeviceInterface = new DeviceInterface("testDeviceInterface", DeviceInterfaceArgs.builder()
.deviceId(testDevice.deviceId())
.name("eth0")
.type("1000base-t")
.build());
var testIpAddress = new IpAddress("testIpAddress", IpAddressArgs.builder()
.ipAddress("192.0.2.10/24")
.status("active")
.deviceInterfaceId(testDeviceInterface.deviceInterfaceId())
.dnsName("test-device.example.com")
.build());
}
}
resources:
test:
type: netbox:Site
properties:
name: test-site
testManufacturer:
type: netbox:Manufacturer
name: test
properties:
name: test-manufacturer
testDeviceType:
type: netbox:DeviceType
name: test
properties:
manufacturerId: ${testManufacturer.manufacturerId}
model: test-device-type
testDeviceRole:
type: netbox:DeviceRole
name: test
properties:
name: test-device-role
testDevice:
type: netbox:Device
name: test
properties:
name: test-device
deviceTypeId: ${testDeviceType.deviceTypeId}
roleId: ${testDeviceRole.deviceRoleId}
siteId: ${test.siteId}
testDeviceInterface:
type: netbox:DeviceInterface
name: test
properties:
deviceId: ${testDevice.deviceId}
name: eth0
type: 1000base-t
testIpAddress:
type: netbox:IpAddress
name: test
properties:
ipAddress: 192.0.2.10/24
status: active
deviceInterfaceId: ${testDeviceInterface.deviceInterfaceId}
dnsName: test-device.example.com
Example coming soon!
Assigned to a virtual machine interface
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 testVirtualMachineInterface = new netbox.VirtualMachineInterface("test", {
virtualMachineId: testVirtualMachine.virtualMachineId,
name: "eth0",
});
const testIpAddress = new netbox.IpAddress("test", {
ipAddress: "192.0.2.20/24",
status: "active",
virtualMachineInterfaceId: testVirtualMachineInterface.virtualMachineInterfaceId,
});
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_virtual_machine_interface = netbox.VirtualMachineInterface("test",
virtual_machine_id=test_virtual_machine.virtual_machine_id,
name="eth0")
test_ip_address = netbox.IpAddress("test",
ip_address="192.0.2.20/24",
status="active",
virtual_machine_interface_id=test_virtual_machine_interface.virtual_machine_interface_id)
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
}
testVirtualMachineInterface, err := netbox.NewVirtualMachineInterface(ctx, "test", &netbox.VirtualMachineInterfaceArgs{
VirtualMachineId: testVirtualMachine.VirtualMachineId,
Name: pulumi.String("eth0"),
})
if err != nil {
return err
}
_, err = netbox.NewIpAddress(ctx, "test", &netbox.IpAddressArgs{
IpAddress: pulumi.String("192.0.2.20/24"),
Status: pulumi.String("active"),
VirtualMachineInterfaceId: testVirtualMachineInterface.VirtualMachineInterfaceId,
})
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 testVirtualMachineInterface = new Netbox.VirtualMachineInterface("test", new()
{
VirtualMachineId = testVirtualMachine.VirtualMachineId,
Name = "eth0",
});
var testIpAddress = new Netbox.IpAddress("test", new()
{
IpAddress = "192.0.2.20/24",
Status = "active",
VirtualMachineInterfaceId = testVirtualMachineInterface.VirtualMachineInterfaceId,
});
});
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.VirtualMachineInterface;
import com.pulumi.netbox.VirtualMachineInterfaceArgs;
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 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 testVirtualMachineInterface = new VirtualMachineInterface("testVirtualMachineInterface", VirtualMachineInterfaceArgs.builder()
.virtualMachineId(testVirtualMachine.virtualMachineId())
.name("eth0")
.build());
var testIpAddress = new IpAddress("testIpAddress", IpAddressArgs.builder()
.ipAddress("192.0.2.20/24")
.status("active")
.virtualMachineInterfaceId(testVirtualMachineInterface.virtualMachineInterfaceId())
.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}
testVirtualMachineInterface:
type: netbox:VirtualMachineInterface
name: test
properties:
virtualMachineId: ${testVirtualMachine.virtualMachineId}
name: eth0
testIpAddress:
type: netbox:IpAddress
name: test
properties:
ipAddress: 192.0.2.20/24
status: active
virtualMachineInterfaceId: ${testVirtualMachineInterface.virtualMachineInterfaceId}
Example coming soon!
Assigned through the object type and id pair
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 testVirtualMachineInterface = new netbox.VirtualMachineInterface("test", {
virtualMachineId: testVirtualMachine.virtualMachineId,
name: "eth0",
});
// The generic pair; device_interface_id and virtual_machine_interface_id are aliases of it.
const testIpAddress = new netbox.IpAddress("test", {
ipAddress: "192.0.2.30/24",
status: "active",
assignedObjectType: "virtualization.vminterface",
assignedObjectId: testVirtualMachineInterface.virtualMachineInterfaceId,
});
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_virtual_machine_interface = netbox.VirtualMachineInterface("test",
virtual_machine_id=test_virtual_machine.virtual_machine_id,
name="eth0")
# The generic pair; device_interface_id and virtual_machine_interface_id are aliases of it.
test_ip_address = netbox.IpAddress("test",
ip_address="192.0.2.30/24",
status="active",
assigned_object_type="virtualization.vminterface",
assigned_object_id=test_virtual_machine_interface.virtual_machine_interface_id)
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
}
testVirtualMachineInterface, err := netbox.NewVirtualMachineInterface(ctx, "test", &netbox.VirtualMachineInterfaceArgs{
VirtualMachineId: testVirtualMachine.VirtualMachineId,
Name: pulumi.String("eth0"),
})
if err != nil {
return err
}
// The generic pair; device_interface_id and virtual_machine_interface_id are aliases of it.
_, err = netbox.NewIpAddress(ctx, "test", &netbox.IpAddressArgs{
IpAddress: pulumi.String("192.0.2.30/24"),
Status: pulumi.String("active"),
AssignedObjectType: pulumi.String("virtualization.vminterface"),
AssignedObjectId: testVirtualMachineInterface.VirtualMachineInterfaceId,
})
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 testVirtualMachineInterface = new Netbox.VirtualMachineInterface("test", new()
{
VirtualMachineId = testVirtualMachine.VirtualMachineId,
Name = "eth0",
});
// The generic pair; device_interface_id and virtual_machine_interface_id are aliases of it.
var testIpAddress = new Netbox.IpAddress("test", new()
{
IpAddress = "192.0.2.30/24",
Status = "active",
AssignedObjectType = "virtualization.vminterface",
AssignedObjectId = testVirtualMachineInterface.VirtualMachineInterfaceId,
});
});
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.VirtualMachineInterface;
import com.pulumi.netbox.VirtualMachineInterfaceArgs;
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 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 testVirtualMachineInterface = new VirtualMachineInterface("testVirtualMachineInterface", VirtualMachineInterfaceArgs.builder()
.virtualMachineId(testVirtualMachine.virtualMachineId())
.name("eth0")
.build());
// The generic pair; device_interface_id and virtual_machine_interface_id are aliases of it.
var testIpAddress = new IpAddress("testIpAddress", IpAddressArgs.builder()
.ipAddress("192.0.2.30/24")
.status("active")
.assignedObjectType("virtualization.vminterface")
.assignedObjectId(testVirtualMachineInterface.virtualMachineInterfaceId())
.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}
testVirtualMachineInterface:
type: netbox:VirtualMachineInterface
name: test
properties:
virtualMachineId: ${testVirtualMachine.virtualMachineId}
name: eth0
# The generic pair; device_interface_id and virtual_machine_interface_id are aliases of it.
testIpAddress:
type: netbox:IpAddress
name: test
properties:
ipAddress: 192.0.2.30/24
status: active
assignedObjectType: virtualization.vminterface
assignedObjectId: ${testVirtualMachineInterface.virtualMachineInterfaceId}
Example coming soon!
Not assigned
import * as pulumi from "@pulumi/pulumi";
import * as netbox from "@pulumi/netbox";
const test = new netbox.Tenant("test", {name: "test-tenant"});
const testVrf = new netbox.Vrf("test", {name: "test-vrf"});
const testIpAddress = new netbox.IpAddress("test", {
ipAddress: "192.0.2.40/24",
status: "reserved",
role: "vip",
dnsName: "test-vip.example.com",
description: "test-description",
tenantId: test.tenantId,
vrfId: testVrf.vrfId,
});
import pulumi
import pulumi_netbox as netbox
test = netbox.Tenant("test", name="test-tenant")
test_vrf = netbox.Vrf("test", name="test-vrf")
test_ip_address = netbox.IpAddress("test",
ip_address="192.0.2.40/24",
status="reserved",
role="vip",
dns_name="test-vip.example.com",
description="test-description",
tenant_id=test.tenant_id,
vrf_id=test_vrf.vrf_id)
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.NewTenant(ctx, "test", &netbox.TenantArgs{
Name: pulumi.String("test-tenant"),
})
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.NewIpAddress(ctx, "test", &netbox.IpAddressArgs{
IpAddress: pulumi.String("192.0.2.40/24"),
Status: pulumi.String("reserved"),
Role: pulumi.String("vip"),
DnsName: pulumi.String("test-vip.example.com"),
Description: pulumi.String("test-description"),
TenantId: test.TenantId,
VrfId: testVrf.VrfId,
})
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.Tenant("test", new()
{
Name = "test-tenant",
});
var testVrf = new Netbox.Vrf("test", new()
{
Name = "test-vrf",
});
var testIpAddress = new Netbox.IpAddress("test", new()
{
IpAddress = "192.0.2.40/24",
Status = "reserved",
Role = "vip",
DnsName = "test-vip.example.com",
Description = "test-description",
TenantId = test.TenantId,
VrfId = testVrf.VrfId,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.netbox.Tenant;
import com.pulumi.netbox.TenantArgs;
import com.pulumi.netbox.Vrf;
import com.pulumi.netbox.VrfArgs;
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 test = new Tenant("test", TenantArgs.builder()
.name("test-tenant")
.build());
var testVrf = new Vrf("testVrf", VrfArgs.builder()
.name("test-vrf")
.build());
var testIpAddress = new IpAddress("testIpAddress", IpAddressArgs.builder()
.ipAddress("192.0.2.40/24")
.status("reserved")
.role("vip")
.dnsName("test-vip.example.com")
.description("test-description")
.tenantId(test.tenantId())
.vrfId(testVrf.vrfId())
.build());
}
}
resources:
test:
type: netbox:Tenant
properties:
name: test-tenant
testVrf:
type: netbox:Vrf
name: test
properties:
name: test-vrf
testIpAddress:
type: netbox:IpAddress
name: test
properties:
ipAddress: 192.0.2.40/24
status: reserved
role: vip
dnsName: test-vip.example.com
description: test-description
tenantId: ${test.tenantId}
vrfId: ${testVrf.vrfId}
Example coming soon!
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,
nat_inside_address_id: Optional[float] = None,
owner_id: Optional[float] = None,
custom_fields: Optional[Mapping[str, str]] = None,
description: Optional[str] = None,
device_interface_id: Optional[float] = None,
dns_name: Optional[str] = None,
comments: Optional[str] = None,
assigned_object_type: Optional[str] = None,
nat_inside_id: Optional[float] = None,
assigned_object_id: Optional[float] = 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)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.
resource "netbox_ip_address" "name" {
# resource properties
}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",
OwnerId = 0.0,
CustomFields =
{
{ "string", "string" },
},
Description = "string",
DeviceInterfaceId = 0.0,
DnsName = "string",
Comments = "string",
AssignedObjectType = "string",
NatInsideId = 0.0,
AssignedObjectId = 0.0,
Role = "string",
Status = "string",
Tags = new[]
{
"string",
},
TenantId = 0.0,
VirtualMachineInterfaceId = 0.0,
VrfId = 0.0,
});
example, err := netbox.NewIpAddress(ctx, "ipAddressResource", &netbox.IpAddressArgs{
IpAddress: pulumi.String("string"),
OwnerId: pulumi.Float64(0),
CustomFields: pulumi.StringMap{
"string": pulumi.String("string"),
},
Description: pulumi.String("string"),
DeviceInterfaceId: pulumi.Float64(0),
DnsName: pulumi.String("string"),
Comments: pulumi.String("string"),
AssignedObjectType: pulumi.String("string"),
NatInsideId: pulumi.Float64(0),
AssignedObjectId: pulumi.Float64(0),
Role: pulumi.String("string"),
Status: pulumi.String("string"),
Tags: pulumi.StringArray{
pulumi.String("string"),
},
TenantId: pulumi.Float64(0),
VirtualMachineInterfaceId: pulumi.Float64(0),
VrfId: pulumi.Float64(0),
})
resource "netbox_ip_address" "ipAddressResource" {
lifecycle {
create_before_destroy = true
}
ip_address = "string"
owner_id = 0
custom_fields = {
"string" = "string"
}
description = "string"
device_interface_id = 0
dns_name = "string"
comments = "string"
assigned_object_type = "string"
nat_inside_id = 0
assigned_object_id = 0
role = "string"
status = "string"
tags = ["string"]
tenant_id = 0
virtual_machine_interface_id = 0
vrf_id = 0
}
var ipAddressResource = new IpAddress("ipAddressResource", IpAddressArgs.builder()
.ipAddress("string")
.ownerId(0.0)
.customFields(Map.of("string", "string"))
.description("string")
.deviceInterfaceId(0.0)
.dnsName("string")
.comments("string")
.assignedObjectType("string")
.natInsideId(0.0)
.assignedObjectId(0.0)
.role("string")
.status("string")
.tags("string")
.tenantId(0.0)
.virtualMachineInterfaceId(0.0)
.vrfId(0.0)
.build());
ip_address_resource = netbox.IpAddress("ipAddressResource",
ip_address="string",
owner_id=float(0),
custom_fields={
"string": "string",
},
description="string",
device_interface_id=float(0),
dns_name="string",
comments="string",
assigned_object_type="string",
nat_inside_id=float(0),
assigned_object_id=float(0),
role="string",
status="string",
tags=["string"],
tenant_id=float(0),
virtual_machine_interface_id=float(0),
vrf_id=float(0))
const ipAddressResource = new netbox.IpAddress("ipAddressResource", {
ipAddress: "string",
ownerId: 0,
customFields: {
string: "string",
},
description: "string",
deviceInterfaceId: 0,
dnsName: "string",
comments: "string",
assignedObjectType: "string",
natInsideId: 0,
assignedObjectId: 0,
role: "string",
status: "string",
tags: ["string"],
tenantId: 0,
virtualMachineInterfaceId: 0,
vrfId: 0,
});
type: netbox:IpAddress
properties:
assignedObjectId: 0
assignedObjectType: string
comments: string
customFields:
string: string
description: string
deviceInterfaceId: 0
dnsName: string
ipAddress: string
natInsideId: 0
ownerId: 0
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:
- Ip
Address string - IPv4 or IPv6 address with prefix length (e.g. 10.0.0.1/24).
- Assigned
Object doubleId - Id of the object the address is assigned to (see assignedobjecttype).
- Assigned
Object stringType - Content type of the object the address is assigned to. Derived from deviceinterfaceid or virtualmachineinterfaceid when one of those is set; set it together with assignedobject_id for other object types. One of: dcim.interface, virtualization.vminterface, ipam.fhrpgroup.
- Comments string
- Custom
Fields 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
- Device
Interface doubleId - Id of the device interface the address is assigned to (assignedobjecttype dcim.interface). Conflicts with virtualmachineinterfaceid and with setting the assignedobject_* pair directly.
- Dns
Name string - Hostname or FQDN (not case-sensitive).
- Nat
Inside doubleAddress Id - Deprecated alias of natinsideid.
- Nat
Inside doubleId - Id of the IP address this address is the NAT (outside) IP for.
- Owner
Id double - Id of the owner the object is assigned to.
- Role string
- Functional role. One of: loopback, secondary, anycast, vip, vrrp, hsrp, glbp, carp.
- Status string
- Operational status. One of: active, reserved, deprecated, dhcp, slaac.
- List<string>
- Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
- Tenant
Id double - Id of the tenant.
- Virtual
Machine doubleInterface Id - Id of the virtual machine interface the address is assigned to (assignedobjecttype virtualization.vminterface). Conflicts with deviceinterfaceid and with setting the assigned*object** pair directly.
- Vrf
Id double - Id of the VRF.
- Ip
Address string - IPv4 or IPv6 address with prefix length (e.g. 10.0.0.1/24).
- Assigned
Object float64Id - Id of the object the address is assigned to (see assignedobjecttype).
- Assigned
Object stringType - Content type of the object the address is assigned to. Derived from deviceinterfaceid or virtualmachineinterfaceid when one of those is set; set it together with assignedobject_id for other object types. One of: dcim.interface, virtualization.vminterface, ipam.fhrpgroup.
- Comments string
- Custom
Fields 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
- Device
Interface float64Id - Id of the device interface the address is assigned to (assignedobjecttype dcim.interface). Conflicts with virtualmachineinterfaceid and with setting the assignedobject_* pair directly.
- Dns
Name string - Hostname or FQDN (not case-sensitive).
- Nat
Inside float64Address Id - Deprecated alias of natinsideid.
- Nat
Inside float64Id - Id of the IP address this address is the NAT (outside) IP for.
- Owner
Id float64 - Id of the owner the object is assigned to.
- Role string
- Functional role. One of: loopback, secondary, anycast, vip, vrrp, hsrp, glbp, carp.
- Status string
- Operational status. One of: active, reserved, deprecated, dhcp, slaac.
- []string
- Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
- Tenant
Id float64 - Id of the tenant.
- Virtual
Machine float64Interface Id - Id of the virtual machine interface the address is assigned to (assignedobjecttype virtualization.vminterface). Conflicts with deviceinterfaceid and with setting the assigned*object** pair directly.
- Vrf
Id float64 - Id of the VRF.
- ip_
address string - IPv4 or IPv6 address with prefix length (e.g. 10.0.0.1/24).
- assigned_
object_ numberid - Id of the object the address is assigned to (see assignedobjecttype).
- assigned_
object_ stringtype - Content type of the object the address is assigned to. Derived from deviceinterfaceid or virtualmachineinterfaceid when one of those is set; set it together with assignedobject_id for other object types. One of: dcim.interface, virtualization.vminterface, ipam.fhrpgroup.
- comments 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
- device_
interface_ numberid - Id of the device interface the address is assigned to (assignedobjecttype dcim.interface). Conflicts with virtualmachineinterfaceid and with setting the assignedobject_* pair directly.
- dns_
name string - Hostname or FQDN (not case-sensitive).
- nat_
inside_ numberaddress_ id - Deprecated alias of natinsideid.
- nat_
inside_ numberid - Id of the IP address this address is the NAT (outside) IP for.
- owner_
id number - Id of the owner the object is assigned to.
- role string
- Functional role. One of: loopback, secondary, anycast, vip, vrrp, hsrp, glbp, carp.
- status string
- Operational status. One of: active, reserved, deprecated, dhcp, slaac.
- list(string)
- Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
- tenant_
id number - Id of the tenant.
- virtual_
machine_ numberinterface_ id - Id of the virtual machine interface the address is assigned to (assignedobjecttype virtualization.vminterface). Conflicts with deviceinterfaceid and with setting the assigned*object** pair directly.
- vrf_
id number - Id of the VRF.
- ip
Address String - IPv4 or IPv6 address with prefix length (e.g. 10.0.0.1/24).
- assigned
Object DoubleId - Id of the object the address is assigned to (see assignedobjecttype).
- assigned
Object StringType - Content type of the object the address is assigned to. Derived from deviceinterfaceid or virtualmachineinterfaceid when one of those is set; set it together with assignedobject_id for other object types. One of: dcim.interface, virtualization.vminterface, ipam.fhrpgroup.
- comments String
- custom
Fields 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
- device
Interface DoubleId - Id of the device interface the address is assigned to (assignedobjecttype dcim.interface). Conflicts with virtualmachineinterfaceid and with setting the assignedobject_* pair directly.
- dns
Name String - Hostname or FQDN (not case-sensitive).
- nat
Inside DoubleAddress Id - Deprecated alias of natinsideid.
- nat
Inside DoubleId - Id of the IP address this address is the NAT (outside) IP for.
- owner
Id Double - Id of the owner the object is assigned to.
- role String
- Functional role. One of: loopback, secondary, anycast, vip, vrrp, hsrp, glbp, carp.
- status String
- Operational status. One of: active, reserved, deprecated, dhcp, slaac.
- List<String>
- Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
- tenant
Id Double - Id of the tenant.
- virtual
Machine DoubleInterface Id - Id of the virtual machine interface the address is assigned to (assignedobjecttype virtualization.vminterface). Conflicts with deviceinterfaceid and with setting the assigned*object** pair directly.
- vrf
Id Double - Id of the VRF.
- ip
Address string - IPv4 or IPv6 address with prefix length (e.g. 10.0.0.1/24).
- assigned
Object numberId - Id of the object the address is assigned to (see assignedobjecttype).
- assigned
Object stringType - Content type of the object the address is assigned to. Derived from deviceinterfaceid or virtualmachineinterfaceid when one of those is set; set it together with assignedobject_id for other object types. One of: dcim.interface, virtualization.vminterface, ipam.fhrpgroup.
- comments string
- custom
Fields {[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
- device
Interface numberId - Id of the device interface the address is assigned to (assignedobjecttype dcim.interface). Conflicts with virtualmachineinterfaceid and with setting the assignedobject_* pair directly.
- dns
Name string - Hostname or FQDN (not case-sensitive).
- nat
Inside numberAddress Id - Deprecated alias of natinsideid.
- nat
Inside numberId - Id of the IP address this address is the NAT (outside) IP for.
- owner
Id number - Id of the owner the object is assigned to.
- role string
- Functional role. One of: loopback, secondary, anycast, vip, vrrp, hsrp, glbp, carp.
- status string
- Operational status. One of: active, reserved, deprecated, dhcp, slaac.
- string[]
- Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
- tenant
Id number - Id of the tenant.
- virtual
Machine numberInterface Id - Id of the virtual machine interface the address is assigned to (assignedobjecttype virtualization.vminterface). Conflicts with deviceinterfaceid and with setting the assigned*object** pair directly.
- vrf
Id number - Id of the VRF.
- ip_
address str - IPv4 or IPv6 address with prefix length (e.g. 10.0.0.1/24).
- assigned_
object_ floatid - Id of the object the address is assigned to (see assignedobjecttype).
- assigned_
object_ strtype - Content type of the object the address is assigned to. Derived from deviceinterfaceid or virtualmachineinterfaceid when one of those is set; set it together with assignedobject_id for other object types. One of: dcim.interface, virtualization.vminterface, ipam.fhrpgroup.
- comments 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
- device_
interface_ floatid - Id of the device interface the address is assigned to (assignedobjecttype dcim.interface). Conflicts with virtualmachineinterfaceid and with setting the assignedobject_* pair directly.
- dns_
name str - Hostname or FQDN (not case-sensitive).
- nat_
inside_ floataddress_ id - Deprecated alias of natinsideid.
- nat_
inside_ floatid - Id of the IP address this address is the NAT (outside) IP for.
- owner_
id float - Id of the owner the object is assigned to.
- role str
- Functional role. One of: loopback, secondary, anycast, vip, vrrp, hsrp, glbp, carp.
- status str
- Operational status. One of: active, reserved, deprecated, dhcp, slaac.
- Sequence[str]
- Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
- tenant_
id float - Id of the tenant.
- virtual_
machine_ floatinterface_ id - Id of the virtual machine interface the address is assigned to (assignedobjecttype virtualization.vminterface). Conflicts with deviceinterfaceid and with setting the assigned*object** pair directly.
- vrf_
id float - Id of the VRF.
- ip
Address String - IPv4 or IPv6 address with prefix length (e.g. 10.0.0.1/24).
- assigned
Object NumberId - Id of the object the address is assigned to (see assignedobjecttype).
- assigned
Object StringType - Content type of the object the address is assigned to. Derived from deviceinterfaceid or virtualmachineinterfaceid when one of those is set; set it together with assignedobject_id for other object types. One of: dcim.interface, virtualization.vminterface, ipam.fhrpgroup.
- comments 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
- device
Interface NumberId - Id of the device interface the address is assigned to (assignedobjecttype dcim.interface). Conflicts with virtualmachineinterfaceid and with setting the assignedobject_* pair directly.
- dns
Name String - Hostname or FQDN (not case-sensitive).
- nat
Inside NumberAddress Id - Deprecated alias of natinsideid.
- nat
Inside NumberId - Id of the IP address this address is the NAT (outside) IP for.
- owner
Id Number - Id of the owner the object is assigned to.
- role String
- Functional role. One of: loopback, secondary, anycast, vip, vrrp, hsrp, glbp, carp.
- status String
- Operational status. One of: active, reserved, deprecated, dhcp, slaac.
- List<String>
- Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
- tenant
Id Number - Id of the tenant.
- virtual
Machine NumberInterface Id - Id of the virtual machine interface the address is assigned to (assignedobjecttype virtualization.vminterface). Conflicts with deviceinterfaceid and with setting the assigned*object** pair directly.
- vrf
Id Number - Id of the VRF.
Outputs
All input properties are implicitly available as output properties. Additionally, the IpAddress resource produces the following output properties:
- Assigned
Object IpAddress Assigned Object - The interface the address is assigned to. device is null for VM interfaces.
- Created string
- Family double
- IP family (4 or 6).
- Id string
- The provider-assigned unique ID for this managed resource.
- Ip
Address doubleId - NetBox id of the IP address.
- Last
Updated string - Nat
Outside List<double>Ids - Ids of the addresses that name this one as their natinsideid.
- List<string>
- Slugs of all tags on the object, including the provider's default_tags.
- Url string
- Assigned
Object IpAddress Assigned Object - The interface the address is assigned to. device is null for VM interfaces.
- Created string
- Family float64
- IP family (4 or 6).
- Id string
- The provider-assigned unique ID for this managed resource.
- Ip
Address float64Id - NetBox id of the IP address.
- Last
Updated string - Nat
Outside []float64Ids - Ids of the addresses that name this one as their natinsideid.
- []string
- Slugs of all tags on the object, including the provider's default_tags.
- Url string
- assigned_
object object - The interface the address is assigned to. device is null for VM interfaces.
- created string
- family number
- IP family (4 or 6).
- id string
- The provider-assigned unique ID for this managed resource.
- ip_
address_ numberid - NetBox id of the IP address.
- last_
updated string - nat_
outside_ list(number)ids - Ids of the addresses that name this one as their natinsideid.
- list(string)
- Slugs of all tags on the object, including the provider's default_tags.
- url string
- assigned
Object IpAddress Assigned Object - The interface the address is assigned to. device is null for VM interfaces.
- created String
- family Double
- IP family (4 or 6).
- id String
- The provider-assigned unique ID for this managed resource.
- ip
Address DoubleId - NetBox id of the IP address.
- last
Updated String - nat
Outside List<Double>Ids - Ids of the addresses that name this one as their natinsideid.
- List<String>
- Slugs of all tags on the object, including the provider's default_tags.
- url String
- assigned
Object IpAddress Assigned Object - The interface the address is assigned to. device is null for VM interfaces.
- created string
- family number
- IP family (4 or 6).
- id string
- The provider-assigned unique ID for this managed resource.
- ip
Address numberId - NetBox id of the IP address.
- last
Updated string - nat
Outside number[]Ids - Ids of the addresses that name this one as their natinsideid.
- string[]
- Slugs of all tags on the object, including the provider's default_tags.
- url string
- assigned_
object IpAddress Assigned Object - The interface the address is assigned to. device is null for VM interfaces.
- created str
- family float
- IP family (4 or 6).
- id str
- The provider-assigned unique ID for this managed resource.
- ip_
address_ floatid - NetBox id of the IP address.
- last_
updated str - nat_
outside_ Sequence[float]ids - Ids of the addresses that name this one as their natinsideid.
- Sequence[str]
- Slugs of all tags on the object, including the provider's default_tags.
- url str
- assigned
Object Property Map - The interface the address is assigned to. device is null for VM interfaces.
- created String
- family Number
- IP family (4 or 6).
- id String
- The provider-assigned unique ID for this managed resource.
- ip
Address NumberId - NetBox id of the IP address.
- last
Updated String - nat
Outside List<Number>Ids - Ids of the addresses that name this one as their natinsideid.
- List<String>
- Slugs of all tags on the object, including the provider's default_tags.
- url String
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,
assigned_object: Optional[IpAddressAssignedObjectArgs] = None,
assigned_object_id: Optional[float] = None,
assigned_object_type: Optional[str] = None,
comments: Optional[str] = None,
created: Optional[str] = None,
custom_fields: Optional[Mapping[str, str]] = None,
description: Optional[str] = None,
device_interface_id: Optional[float] = None,
dns_name: Optional[str] = None,
family: Optional[float] = None,
ip_address: Optional[str] = None,
ip_address_id: Optional[float] = None,
last_updated: Optional[str] = None,
nat_inside_address_id: Optional[float] = None,
nat_inside_id: Optional[float] = None,
nat_outside_ids: Optional[Sequence[float]] = None,
owner_id: Optional[float] = None,
role: Optional[str] = None,
status: Optional[str] = None,
tags: Optional[Sequence[str]] = None,
tags_alls: Optional[Sequence[str]] = None,
tenant_id: Optional[float] = None,
url: Optional[str] = None,
virtual_machine_interface_id: Optional[float] = None,
vrf_id: Optional[float] = None) -> IpAddressfunc 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}import {
to = netbox_ip_address.example
id = "${id}"
}
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Assigned
Object IpAddress Assigned Object - The interface the address is assigned to. device is null for VM interfaces.
- Assigned
Object doubleId - Id of the object the address is assigned to (see assignedobjecttype).
- Assigned
Object stringType - Content type of the object the address is assigned to. Derived from deviceinterfaceid or virtualmachineinterfaceid when one of those is set; set it together with assignedobject_id for other object types. One of: dcim.interface, virtualization.vminterface, ipam.fhrpgroup.
- Comments string
- Created string
- Custom
Fields 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
- Device
Interface doubleId - Id of the device interface the address is assigned to (assignedobjecttype dcim.interface). Conflicts with virtualmachineinterfaceid and with setting the assignedobject_* pair directly.
- Dns
Name string - Hostname or FQDN (not case-sensitive).
- Family double
- IP family (4 or 6).
- Ip
Address string - IPv4 or IPv6 address with prefix length (e.g. 10.0.0.1/24).
- Ip
Address doubleId - NetBox id of the IP address.
- Last
Updated string - Nat
Inside doubleAddress Id - Deprecated alias of natinsideid.
- Nat
Inside doubleId - Id of the IP address this address is the NAT (outside) IP for.
- Nat
Outside List<double>Ids - Ids of the addresses that name this one as their natinsideid.
- Owner
Id double - Id of the owner the object is assigned to.
- Role string
- Functional role. One of: loopback, secondary, anycast, vip, vrrp, hsrp, glbp, carp.
- Status string
- Operational status. One of: active, reserved, deprecated, dhcp, slaac.
- List<string>
- Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
- List<string>
- Slugs of all tags on the object, including the provider's default_tags.
- Tenant
Id double - Id of the tenant.
- Url string
- Virtual
Machine doubleInterface Id - Id of the virtual machine interface the address is assigned to (assignedobjecttype virtualization.vminterface). Conflicts with deviceinterfaceid and with setting the assigned*object** pair directly.
- Vrf
Id double - Id of the VRF.
- Assigned
Object IpAddress Assigned Object Args - The interface the address is assigned to. device is null for VM interfaces.
- Assigned
Object float64Id - Id of the object the address is assigned to (see assignedobjecttype).
- Assigned
Object stringType - Content type of the object the address is assigned to. Derived from deviceinterfaceid or virtualmachineinterfaceid when one of those is set; set it together with assignedobject_id for other object types. One of: dcim.interface, virtualization.vminterface, ipam.fhrpgroup.
- Comments string
- Created string
- Custom
Fields 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
- Device
Interface float64Id - Id of the device interface the address is assigned to (assignedobjecttype dcim.interface). Conflicts with virtualmachineinterfaceid and with setting the assignedobject_* pair directly.
- Dns
Name string - Hostname or FQDN (not case-sensitive).
- Family float64
- IP family (4 or 6).
- Ip
Address string - IPv4 or IPv6 address with prefix length (e.g. 10.0.0.1/24).
- Ip
Address float64Id - NetBox id of the IP address.
- Last
Updated string - Nat
Inside float64Address Id - Deprecated alias of natinsideid.
- Nat
Inside float64Id - Id of the IP address this address is the NAT (outside) IP for.
- Nat
Outside []float64Ids - Ids of the addresses that name this one as their natinsideid.
- Owner
Id float64 - Id of the owner the object is assigned to.
- Role string
- Functional role. One of: loopback, secondary, anycast, vip, vrrp, hsrp, glbp, carp.
- Status string
- Operational status. One of: active, reserved, deprecated, dhcp, slaac.
- []string
- Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
- []string
- Slugs of all tags on the object, including the provider's default_tags.
- Tenant
Id float64 - Id of the tenant.
- Url string
- Virtual
Machine float64Interface Id - Id of the virtual machine interface the address is assigned to (assignedobjecttype virtualization.vminterface). Conflicts with deviceinterfaceid and with setting the assigned*object** pair directly.
- Vrf
Id float64 - Id of the VRF.
- assigned_
object object - The interface the address is assigned to. device is null for VM interfaces.
- assigned_
object_ numberid - Id of the object the address is assigned to (see assignedobjecttype).
- assigned_
object_ stringtype - Content type of the object the address is assigned to. Derived from deviceinterfaceid or virtualmachineinterfaceid when one of those is set; set it together with assignedobject_id for other object types. One of: dcim.interface, virtualization.vminterface, ipam.fhrpgroup.
- comments string
- 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
- device_
interface_ numberid - Id of the device interface the address is assigned to (assignedobjecttype dcim.interface). Conflicts with virtualmachineinterfaceid and with setting the assignedobject_* pair directly.
- dns_
name string - Hostname or FQDN (not case-sensitive).
- family number
- IP family (4 or 6).
- ip_
address string - IPv4 or IPv6 address with prefix length (e.g. 10.0.0.1/24).
- ip_
address_ numberid - NetBox id of the IP address.
- last_
updated string - nat_
inside_ numberaddress_ id - Deprecated alias of natinsideid.
- nat_
inside_ numberid - Id of the IP address this address is the NAT (outside) IP for.
- nat_
outside_ list(number)ids - Ids of the addresses that name this one as their natinsideid.
- owner_
id number - Id of the owner the object is assigned to.
- role string
- Functional role. One of: loopback, secondary, anycast, vip, vrrp, hsrp, glbp, carp.
- status string
- Operational status. One of: active, reserved, deprecated, dhcp, slaac.
- list(string)
- Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
- list(string)
- Slugs of all tags on the object, including the provider's default_tags.
- tenant_
id number - Id of the tenant.
- url string
- virtual_
machine_ numberinterface_ id - Id of the virtual machine interface the address is assigned to (assignedobjecttype virtualization.vminterface). Conflicts with deviceinterfaceid and with setting the assigned*object** pair directly.
- vrf_
id number - Id of the VRF.
- assigned
Object IpAddress Assigned Object - The interface the address is assigned to. device is null for VM interfaces.
- assigned
Object DoubleId - Id of the object the address is assigned to (see assignedobjecttype).
- assigned
Object StringType - Content type of the object the address is assigned to. Derived from deviceinterfaceid or virtualmachineinterfaceid when one of those is set; set it together with assignedobject_id for other object types. One of: dcim.interface, virtualization.vminterface, ipam.fhrpgroup.
- comments String
- created String
- custom
Fields 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
- device
Interface DoubleId - Id of the device interface the address is assigned to (assignedobjecttype dcim.interface). Conflicts with virtualmachineinterfaceid and with setting the assignedobject_* pair directly.
- dns
Name String - Hostname or FQDN (not case-sensitive).
- family Double
- IP family (4 or 6).
- ip
Address String - IPv4 or IPv6 address with prefix length (e.g. 10.0.0.1/24).
- ip
Address DoubleId - NetBox id of the IP address.
- last
Updated String - nat
Inside DoubleAddress Id - Deprecated alias of natinsideid.
- nat
Inside DoubleId - Id of the IP address this address is the NAT (outside) IP for.
- nat
Outside List<Double>Ids - Ids of the addresses that name this one as their natinsideid.
- owner
Id Double - Id of the owner the object is assigned to.
- role String
- Functional role. One of: loopback, secondary, anycast, vip, vrrp, hsrp, glbp, carp.
- status String
- Operational status. One of: active, reserved, deprecated, dhcp, slaac.
- List<String>
- Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
- List<String>
- Slugs of all tags on the object, including the provider's default_tags.
- tenant
Id Double - Id of the tenant.
- url String
- virtual
Machine DoubleInterface Id - Id of the virtual machine interface the address is assigned to (assignedobjecttype virtualization.vminterface). Conflicts with deviceinterfaceid and with setting the assigned*object** pair directly.
- vrf
Id Double - Id of the VRF.
- assigned
Object IpAddress Assigned Object - The interface the address is assigned to. device is null for VM interfaces.
- assigned
Object numberId - Id of the object the address is assigned to (see assignedobjecttype).
- assigned
Object stringType - Content type of the object the address is assigned to. Derived from deviceinterfaceid or virtualmachineinterfaceid when one of those is set; set it together with assignedobject_id for other object types. One of: dcim.interface, virtualization.vminterface, ipam.fhrpgroup.
- comments string
- created string
- custom
Fields {[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
- device
Interface numberId - Id of the device interface the address is assigned to (assignedobjecttype dcim.interface). Conflicts with virtualmachineinterfaceid and with setting the assignedobject_* pair directly.
- dns
Name string - Hostname or FQDN (not case-sensitive).
- family number
- IP family (4 or 6).
- ip
Address string - IPv4 or IPv6 address with prefix length (e.g. 10.0.0.1/24).
- ip
Address numberId - NetBox id of the IP address.
- last
Updated string - nat
Inside numberAddress Id - Deprecated alias of natinsideid.
- nat
Inside numberId - Id of the IP address this address is the NAT (outside) IP for.
- nat
Outside number[]Ids - Ids of the addresses that name this one as their natinsideid.
- owner
Id number - Id of the owner the object is assigned to.
- role string
- Functional role. One of: loopback, secondary, anycast, vip, vrrp, hsrp, glbp, carp.
- status string
- Operational status. One of: active, reserved, deprecated, dhcp, slaac.
- string[]
- Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
- string[]
- Slugs of all tags on the object, including the provider's default_tags.
- tenant
Id number - Id of the tenant.
- url string
- virtual
Machine numberInterface Id - Id of the virtual machine interface the address is assigned to (assignedobjecttype virtualization.vminterface). Conflicts with deviceinterfaceid and with setting the assigned*object** pair directly.
- vrf
Id number - Id of the VRF.
- assigned_
object IpAddress Assigned Object Args - The interface the address is assigned to. device is null for VM interfaces.
- assigned_
object_ floatid - Id of the object the address is assigned to (see assignedobjecttype).
- assigned_
object_ strtype - Content type of the object the address is assigned to. Derived from deviceinterfaceid or virtualmachineinterfaceid when one of those is set; set it together with assignedobject_id for other object types. One of: dcim.interface, virtualization.vminterface, ipam.fhrpgroup.
- comments str
- 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
- device_
interface_ floatid - Id of the device interface the address is assigned to (assignedobjecttype dcim.interface). Conflicts with virtualmachineinterfaceid and with setting the assignedobject_* pair directly.
- dns_
name str - Hostname or FQDN (not case-sensitive).
- family float
- IP family (4 or 6).
- ip_
address str - IPv4 or IPv6 address with prefix length (e.g. 10.0.0.1/24).
- ip_
address_ floatid - NetBox id of the IP address.
- last_
updated str - nat_
inside_ floataddress_ id - Deprecated alias of natinsideid.
- nat_
inside_ floatid - Id of the IP address this address is the NAT (outside) IP for.
- nat_
outside_ Sequence[float]ids - Ids of the addresses that name this one as their natinsideid.
- owner_
id float - Id of the owner the object is assigned to.
- role str
- Functional role. One of: loopback, secondary, anycast, vip, vrrp, hsrp, glbp, carp.
- status str
- Operational status. One of: active, reserved, deprecated, dhcp, slaac.
- Sequence[str]
- Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
- Sequence[str]
- Slugs of all tags on the object, including the provider's default_tags.
- tenant_
id float - Id of the tenant.
- url str
- virtual_
machine_ floatinterface_ id - Id of the virtual machine interface the address is assigned to (assignedobjecttype virtualization.vminterface). Conflicts with deviceinterfaceid and with setting the assigned*object** pair directly.
- vrf_
id float - Id of the VRF.
- assigned
Object Property Map - The interface the address is assigned to. device is null for VM interfaces.
- assigned
Object NumberId - Id of the object the address is assigned to (see assignedobjecttype).
- assigned
Object StringType - Content type of the object the address is assigned to. Derived from deviceinterfaceid or virtualmachineinterfaceid when one of those is set; set it together with assignedobject_id for other object types. One of: dcim.interface, virtualization.vminterface, ipam.fhrpgroup.
- comments String
- 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
- device
Interface NumberId - Id of the device interface the address is assigned to (assignedobjecttype dcim.interface). Conflicts with virtualmachineinterfaceid and with setting the assignedobject_* pair directly.
- dns
Name String - Hostname or FQDN (not case-sensitive).
- family Number
- IP family (4 or 6).
- ip
Address String - IPv4 or IPv6 address with prefix length (e.g. 10.0.0.1/24).
- ip
Address NumberId - NetBox id of the IP address.
- last
Updated String - nat
Inside NumberAddress Id - Deprecated alias of natinsideid.
- nat
Inside NumberId - Id of the IP address this address is the NAT (outside) IP for.
- nat
Outside List<Number>Ids - Ids of the addresses that name this one as their natinsideid.
- owner
Id Number - Id of the owner the object is assigned to.
- role String
- Functional role. One of: loopback, secondary, anycast, vip, vrrp, hsrp, glbp, carp.
- status String
- Operational status. One of: active, reserved, deprecated, dhcp, slaac.
- List<String>
- Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
- List<String>
- Slugs of all tags on the object, including the provider's default_tags.
- tenant
Id Number - Id of the tenant.
- url String
- virtual
Machine NumberInterface Id - Id of the virtual machine interface the address is assigned to (assignedobjecttype virtualization.vminterface). Conflicts with deviceinterfaceid and with setting the assigned*object** pair directly.
- vrf
Id Number - Id of the VRF.
Supporting Types
IpAddressAssignedObject, IpAddressAssignedObjectArgs
- Device
Ip
Address Assigned Object Device - Id double
- Name string
- Device
Ip
Address Assigned Object Device - Id float64
- Name string
- device
Ip
Address Assigned Object Device - id Double
- name String
- device
Ip
Address Assigned Object Device - id number
- name string
- device
Ip
Address Assigned Object Device - id float
- name str
- device Property Map
- id Number
- name String
IpAddressAssignedObjectDevice, IpAddressAssignedObjectDeviceArgs
Import
In Terraform v1.5.0 and later, the import block can be used with the id attribute, for example:
terraform
import {
to = netbox_ip_address.test
id = “123”
}
The pulumi import command can be used, for example:
$ pulumi import netbox:index/ipAddress:IpAddress 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
netboxTerraform Provider.
published on Wednesday, Nov 4, 2026 by e-breuninger