netbox.PrimaryIp
Explore with Pulumi AI
This resource is used to define the primary IP for a given virtual machine. The primary IP is reflected in the Virtual machine Netbox UI, which identifies the Primary IPv4 and IPv6 addresses.
Create PrimaryIp Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new PrimaryIp(name: string, args: PrimaryIpArgs, opts?: CustomResourceOptions);@overload
def PrimaryIp(resource_name: str,
              args: PrimaryIpArgs,
              opts: Optional[ResourceOptions] = None)
@overload
def PrimaryIp(resource_name: str,
              opts: Optional[ResourceOptions] = None,
              ip_address_id: Optional[float] = None,
              virtual_machine_id: Optional[float] = None,
              ip_address_version: Optional[float] = None,
              primary_ip_id: Optional[str] = None)func NewPrimaryIp(ctx *Context, name string, args PrimaryIpArgs, opts ...ResourceOption) (*PrimaryIp, error)public PrimaryIp(string name, PrimaryIpArgs args, CustomResourceOptions? opts = null)
public PrimaryIp(String name, PrimaryIpArgs args)
public PrimaryIp(String name, PrimaryIpArgs args, CustomResourceOptions options)
type: netbox:PrimaryIp
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 PrimaryIpArgs
- 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 PrimaryIpArgs
- 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 PrimaryIpArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args PrimaryIpArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args PrimaryIpArgs
- 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 primaryIpResource = new Netbox.PrimaryIp("primaryIpResource", new()
{
    IpAddressId = 0,
    VirtualMachineId = 0,
    IpAddressVersion = 0,
    PrimaryIpId = "string",
});
example, err := netbox.NewPrimaryIp(ctx, "primaryIpResource", &netbox.PrimaryIpArgs{
IpAddressId: pulumi.Float64(0),
VirtualMachineId: pulumi.Float64(0),
IpAddressVersion: pulumi.Float64(0),
PrimaryIpId: pulumi.String("string"),
})
var primaryIpResource = new PrimaryIp("primaryIpResource", PrimaryIpArgs.builder()
    .ipAddressId(0)
    .virtualMachineId(0)
    .ipAddressVersion(0)
    .primaryIpId("string")
    .build());
primary_ip_resource = netbox.PrimaryIp("primaryIpResource",
    ip_address_id=0,
    virtual_machine_id=0,
    ip_address_version=0,
    primary_ip_id="string")
const primaryIpResource = new netbox.PrimaryIp("primaryIpResource", {
    ipAddressId: 0,
    virtualMachineId: 0,
    ipAddressVersion: 0,
    primaryIpId: "string",
});
type: netbox:PrimaryIp
properties:
    ipAddressId: 0
    ipAddressVersion: 0
    primaryIpId: string
    virtualMachineId: 0
PrimaryIp 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 PrimaryIp resource accepts the following input properties:
- IpAddress doubleId 
- VirtualMachine doubleId 
- IpAddress doubleVersion 
- Defaults to 4.
- PrimaryIp stringId 
- The ID of this resource.
- IpAddress float64Id 
- VirtualMachine float64Id 
- IpAddress float64Version 
- Defaults to 4.
- PrimaryIp stringId 
- The ID of this resource.
- ipAddress DoubleId 
- virtualMachine DoubleId 
- ipAddress DoubleVersion 
- Defaults to 4.
- primaryIp StringId 
- The ID of this resource.
- ipAddress numberId 
- virtualMachine numberId 
- ipAddress numberVersion 
- Defaults to 4.
- primaryIp stringId 
- The ID of this resource.
- ip_address_ floatid 
- virtual_machine_ floatid 
- ip_address_ floatversion 
- Defaults to 4.
- primary_ip_ strid 
- The ID of this resource.
- ipAddress NumberId 
- virtualMachine NumberId 
- ipAddress NumberVersion 
- Defaults to 4.
- primaryIp StringId 
- The ID of this resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the PrimaryIp resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing PrimaryIp Resource
Get an existing PrimaryIp 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?: PrimaryIpState, opts?: CustomResourceOptions): PrimaryIp@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        ip_address_id: Optional[float] = None,
        ip_address_version: Optional[float] = None,
        primary_ip_id: Optional[str] = None,
        virtual_machine_id: Optional[float] = None) -> PrimaryIpfunc GetPrimaryIp(ctx *Context, name string, id IDInput, state *PrimaryIpState, opts ...ResourceOption) (*PrimaryIp, error)public static PrimaryIp Get(string name, Input<string> id, PrimaryIpState? state, CustomResourceOptions? opts = null)public static PrimaryIp get(String name, Output<String> id, PrimaryIpState state, CustomResourceOptions options)resources:  _:    type: netbox:PrimaryIp    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.
- IpAddress doubleId 
- IpAddress doubleVersion 
- Defaults to 4.
- PrimaryIp stringId 
- The ID of this resource.
- VirtualMachine doubleId 
- IpAddress float64Id 
- IpAddress float64Version 
- Defaults to 4.
- PrimaryIp stringId 
- The ID of this resource.
- VirtualMachine float64Id 
- ipAddress DoubleId 
- ipAddress DoubleVersion 
- Defaults to 4.
- primaryIp StringId 
- The ID of this resource.
- virtualMachine DoubleId 
- ipAddress numberId 
- ipAddress numberVersion 
- Defaults to 4.
- primaryIp stringId 
- The ID of this resource.
- virtualMachine numberId 
- ip_address_ floatid 
- ip_address_ floatversion 
- Defaults to 4.
- primary_ip_ strid 
- The ID of this resource.
- virtual_machine_ floatid 
- ipAddress NumberId 
- ipAddress NumberVersion 
- Defaults to 4.
- primaryIp StringId 
- The ID of this resource.
- virtualMachine NumberId 
Package Details
- Repository
- netbox e-breuninger/terraform-provider-netbox
- License
- Notes
- This Pulumi package is based on the netboxTerraform Provider.