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:
- Ip
Address doubleId - Virtual
Machine doubleId - Ip
Address doubleVersion - Defaults to
4
. - Primary
Ip stringId - The ID of this resource.
- Ip
Address float64Id - Virtual
Machine float64Id - Ip
Address float64Version - Defaults to
4
. - Primary
Ip stringId - The ID of this resource.
- ip
Address DoubleId - virtual
Machine DoubleId - ip
Address DoubleVersion - Defaults to
4
. - primary
Ip StringId - The ID of this resource.
- ip
Address numberId - virtual
Machine numberId - ip
Address numberVersion - Defaults to
4
. - primary
Ip 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.
- ip
Address NumberId - virtual
Machine NumberId - ip
Address NumberVersion - Defaults to
4
. - primary
Ip 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) -> PrimaryIp
func 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.
- Ip
Address doubleId - Ip
Address doubleVersion - Defaults to
4
. - Primary
Ip stringId - The ID of this resource.
- Virtual
Machine doubleId
- Ip
Address float64Id - Ip
Address float64Version - Defaults to
4
. - Primary
Ip stringId - The ID of this resource.
- Virtual
Machine float64Id
- ip
Address DoubleId - ip
Address DoubleVersion - Defaults to
4
. - primary
Ip StringId - The ID of this resource.
- virtual
Machine DoubleId
- ip
Address numberId - ip
Address numberVersion - Defaults to
4
. - primary
Ip stringId - The ID of this resource.
- virtual
Machine numberId
- ip_
address_ floatid - ip_
address_ floatversion - Defaults to
4
. - primary_
ip_ strid - The ID of this resource.
- virtual_
machine_ floatid
- ip
Address NumberId - ip
Address NumberVersion - Defaults to
4
. - primary
Ip StringId - The ID of this resource.
- virtual
Machine NumberId
Package Details
- Repository
- netbox e-breuninger/terraform-provider-netbox
- License
- Notes
- This Pulumi package is based on the
netbox
Terraform Provider.