netbox.IpAddress
Explore with Pulumi AI
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:
- Ip
Address string - Status string
- Valid values are
active
,reserved
,deprecated
,dhcp
andslaac
. - Custom
Fields Dictionary<string, string> - Description string
- Device
Interface doubleId - Conflicts with
interface_id
andvirtual_machine_interface_id
. - Dns
Name string - Interface
Id double - Required when
object_type
is set. - Ip
Address stringId - The ID of this resource.
- Nat
Inside doubleAddress Id - Object
Type string - Valid values are
virtualization.vminterface
anddcim.interface
. Required wheninterface_id
is set. - Role string
- Valid values are
loopback
,secondary
,anycast
,vip
,vrrp
,hsrp
,glbp
andcarp
. - List<string>
- Tenant
Id double - Virtual
Machine doubleInterface Id - Conflicts with
interface_id
anddevice_interface_id
. - Vrf
Id double
- Ip
Address string - Status string
- Valid values are
active
,reserved
,deprecated
,dhcp
andslaac
. - Custom
Fields map[string]string - Description string
- Device
Interface float64Id - Conflicts with
interface_id
andvirtual_machine_interface_id
. - Dns
Name string - Interface
Id float64 - Required when
object_type
is set. - Ip
Address stringId - The ID of this resource.
- Nat
Inside float64Address Id - Object
Type string - Valid values are
virtualization.vminterface
anddcim.interface
. Required wheninterface_id
is set. - Role string
- Valid values are
loopback
,secondary
,anycast
,vip
,vrrp
,hsrp
,glbp
andcarp
. - []string
- Tenant
Id float64 - Virtual
Machine float64Interface Id - Conflicts with
interface_id
anddevice_interface_id
. - Vrf
Id float64
- ip
Address String - status String
- Valid values are
active
,reserved
,deprecated
,dhcp
andslaac
. - custom
Fields Map<String,String> - description String
- device
Interface DoubleId - Conflicts with
interface_id
andvirtual_machine_interface_id
. - dns
Name String - interface
Id Double - Required when
object_type
is set. - ip
Address StringId - The ID of this resource.
- nat
Inside DoubleAddress Id - object
Type String - Valid values are
virtualization.vminterface
anddcim.interface
. Required wheninterface_id
is set. - role String
- Valid values are
loopback
,secondary
,anycast
,vip
,vrrp
,hsrp
,glbp
andcarp
. - List<String>
- tenant
Id Double - virtual
Machine DoubleInterface Id - Conflicts with
interface_id
anddevice_interface_id
. - vrf
Id Double
- ip
Address string - status string
- Valid values are
active
,reserved
,deprecated
,dhcp
andslaac
. - custom
Fields {[key: string]: string} - description string
- device
Interface numberId - Conflicts with
interface_id
andvirtual_machine_interface_id
. - dns
Name string - interface
Id number - Required when
object_type
is set. - ip
Address stringId - The ID of this resource.
- nat
Inside numberAddress Id - object
Type string - Valid values are
virtualization.vminterface
anddcim.interface
. Required wheninterface_id
is set. - role string
- Valid values are
loopback
,secondary
,anycast
,vip
,vrrp
,hsrp
,glbp
andcarp
. - string[]
- tenant
Id number - virtual
Machine numberInterface Id - Conflicts with
interface_id
anddevice_interface_id
. - vrf
Id number
- ip_
address str - status str
- Valid values are
active
,reserved
,deprecated
,dhcp
andslaac
. - custom_
fields Mapping[str, str] - description str
- device_
interface_ floatid - Conflicts with
interface_id
andvirtual_machine_interface_id
. - dns_
name str - interface_
id float - Required when
object_type
is set. - ip_
address_ strid - The ID of this resource.
- nat_
inside_ floataddress_ id - object_
type str - Valid values are
virtualization.vminterface
anddcim.interface
. Required wheninterface_id
is set. - role str
- Valid values are
loopback
,secondary
,anycast
,vip
,vrrp
,hsrp
,glbp
andcarp
. - Sequence[str]
- tenant_
id float - virtual_
machine_ floatinterface_ id - Conflicts with
interface_id
anddevice_interface_id
. - vrf_
id float
- ip
Address String - status String
- Valid values are
active
,reserved
,deprecated
,dhcp
andslaac
. - custom
Fields Map<String> - description String
- device
Interface NumberId - Conflicts with
interface_id
andvirtual_machine_interface_id
. - dns
Name String - interface
Id Number - Required when
object_type
is set. - ip
Address StringId - The ID of this resource.
- nat
Inside NumberAddress Id - object
Type String - Valid values are
virtualization.vminterface
anddcim.interface
. Required wheninterface_id
is set. - role String
- Valid values are
loopback
,secondary
,anycast
,vip
,vrrp
,hsrp
,glbp
andcarp
. - List<String>
- tenant
Id Number - virtual
Machine NumberInterface Id - Conflicts with
interface_id
anddevice_interface_id
. - vrf
Id 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.
- Nat
Outside List<IpAddresses Address Nat Outside Address>
- Id string
- The provider-assigned unique ID for this managed resource.
- Nat
Outside []IpAddresses Address Nat Outside Address
- id String
- The provider-assigned unique ID for this managed resource.
- nat
Outside List<IpAddresses Address Nat Outside Address>
- id string
- The provider-assigned unique ID for this managed resource.
- nat
Outside IpAddresses Address Nat Outside Address[]
- id str
- The provider-assigned unique ID for this managed resource.
- nat_
outside_ Sequence[Ipaddresses Address Nat Outside Address]
- id String
- The provider-assigned unique ID for this managed resource.
- nat
Outside List<Property Map>Addresses
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.
- Custom
Fields Dictionary<string, string> - Description string
- Device
Interface doubleId - Conflicts with
interface_id
andvirtual_machine_interface_id
. - Dns
Name string - Interface
Id double - Required when
object_type
is set. - Ip
Address string - Ip
Address stringId - The ID of this resource.
- Nat
Inside doubleAddress Id - Nat
Outside List<IpAddresses Address Nat Outside Address> - Object
Type string - Valid values are
virtualization.vminterface
anddcim.interface
. Required wheninterface_id
is set. - Role string
- Valid values are
loopback
,secondary
,anycast
,vip
,vrrp
,hsrp
,glbp
andcarp
. - Status string
- Valid values are
active
,reserved
,deprecated
,dhcp
andslaac
. - List<string>
- Tenant
Id double - Virtual
Machine doubleInterface Id - Conflicts with
interface_id
anddevice_interface_id
. - Vrf
Id double
- Custom
Fields map[string]string - Description string
- Device
Interface float64Id - Conflicts with
interface_id
andvirtual_machine_interface_id
. - Dns
Name string - Interface
Id float64 - Required when
object_type
is set. - Ip
Address string - Ip
Address stringId - The ID of this resource.
- Nat
Inside float64Address Id - Nat
Outside []IpAddresses Address Nat Outside Address Args - Object
Type string - Valid values are
virtualization.vminterface
anddcim.interface
. Required wheninterface_id
is set. - Role string
- Valid values are
loopback
,secondary
,anycast
,vip
,vrrp
,hsrp
,glbp
andcarp
. - Status string
- Valid values are
active
,reserved
,deprecated
,dhcp
andslaac
. - []string
- Tenant
Id float64 - Virtual
Machine float64Interface Id - Conflicts with
interface_id
anddevice_interface_id
. - Vrf
Id float64
- custom
Fields Map<String,String> - description String
- device
Interface DoubleId - Conflicts with
interface_id
andvirtual_machine_interface_id
. - dns
Name String - interface
Id Double - Required when
object_type
is set. - ip
Address String - ip
Address StringId - The ID of this resource.
- nat
Inside DoubleAddress Id - nat
Outside List<IpAddresses Address Nat Outside Address> - object
Type String - Valid values are
virtualization.vminterface
anddcim.interface
. Required wheninterface_id
is set. - role String
- Valid values are
loopback
,secondary
,anycast
,vip
,vrrp
,hsrp
,glbp
andcarp
. - status String
- Valid values are
active
,reserved
,deprecated
,dhcp
andslaac
. - List<String>
- tenant
Id Double - virtual
Machine DoubleInterface Id - Conflicts with
interface_id
anddevice_interface_id
. - vrf
Id Double
- custom
Fields {[key: string]: string} - description string
- device
Interface numberId - Conflicts with
interface_id
andvirtual_machine_interface_id
. - dns
Name string - interface
Id number - Required when
object_type
is set. - ip
Address string - ip
Address stringId - The ID of this resource.
- nat
Inside numberAddress Id - nat
Outside IpAddresses Address Nat Outside Address[] - object
Type string - Valid values are
virtualization.vminterface
anddcim.interface
. Required wheninterface_id
is set. - role string
- Valid values are
loopback
,secondary
,anycast
,vip
,vrrp
,hsrp
,glbp
andcarp
. - status string
- Valid values are
active
,reserved
,deprecated
,dhcp
andslaac
. - string[]
- tenant
Id number - virtual
Machine numberInterface Id - Conflicts with
interface_id
anddevice_interface_id
. - vrf
Id number
- custom_
fields Mapping[str, str] - description str
- device_
interface_ floatid - Conflicts with
interface_id
andvirtual_machine_interface_id
. - dns_
name str - interface_
id float - Required when
object_type
is set. - ip_
address str - ip_
address_ strid - The ID of this resource.
- nat_
inside_ floataddress_ id - nat_
outside_ Sequence[Ipaddresses Address Nat Outside Address Args] - object_
type str - Valid values are
virtualization.vminterface
anddcim.interface
. Required wheninterface_id
is set. - role str
- Valid values are
loopback
,secondary
,anycast
,vip
,vrrp
,hsrp
,glbp
andcarp
. - status str
- Valid values are
active
,reserved
,deprecated
,dhcp
andslaac
. - Sequence[str]
- tenant_
id float - virtual_
machine_ floatinterface_ id - Conflicts with
interface_id
anddevice_interface_id
. - vrf_
id float
- custom
Fields Map<String> - description String
- device
Interface NumberId - Conflicts with
interface_id
andvirtual_machine_interface_id
. - dns
Name String - interface
Id Number - Required when
object_type
is set. - ip
Address String - ip
Address StringId - The ID of this resource.
- nat
Inside NumberAddress Id - nat
Outside List<Property Map>Addresses - object
Type String - Valid values are
virtualization.vminterface
anddcim.interface
. Required wheninterface_id
is set. - role String
- Valid values are
loopback
,secondary
,anycast
,vip
,vrrp
,hsrp
,glbp
andcarp
. - status String
- Valid values are
active
,reserved
,deprecated
,dhcp
andslaac
. - List<String>
- tenant
Id Number - virtual
Machine NumberInterface Id - Conflicts with
interface_id
anddevice_interface_id
. - vrf
Id Number
Supporting Types
IpAddressNatOutsideAddress, IpAddressNatOutsideAddressArgs
- Address
Family double - Id double
- Ip
Address string
- Address
Family float64 - Id float64
- Ip
Address string
- address
Family Double - id Double
- ip
Address String
- address
Family number - id number
- ip
Address string
- address_
family float - id float
- ip_
address str
- address
Family Number - id Number
- ip
Address String
Package Details
- Repository
- netbox e-breuninger/terraform-provider-netbox
- License
- Notes
- This Pulumi package is based on the
netbox
Terraform Provider.