1. Packages
  2. Nutanix
  3. API Docs
  4. FloatingIp
Nutanix v0.7.4 published on Friday, Mar 21, 2025 by Piers Karsenbarg

nutanix.FloatingIp

Explore with Pulumi AI

Provides Nutanix resource to create Floating IPs.

create Floating IP with External Subnet UUID

import * as pulumi from "@pulumi/pulumi";
import * as nutanix from "@pierskarsenbarg/nutanix";

const fip1 = new nutanix.FloatingIp("fip1", {externalSubnetReferenceUuid: "{{ext_sub_uuid}}"});
Copy
import pulumi
import pulumi_nutanix as nutanix

fip1 = nutanix.FloatingIp("fip1", external_subnet_reference_uuid="{{ext_sub_uuid}}")
Copy
package main

import (
	"github.com/pierskarsenbarg/pulumi-nutanix/sdk/go/nutanix"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := nutanix.NewFloatingIp(ctx, "fip1", &nutanix.FloatingIpArgs{
			ExternalSubnetReferenceUuid: pulumi.String("{{ext_sub_uuid}}"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Nutanix = PiersKarsenbarg.Nutanix;

return await Deployment.RunAsync(() => 
{
    var fip1 = new Nutanix.FloatingIp("fip1", new()
    {
        ExternalSubnetReferenceUuid = "{{ext_sub_uuid}}",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.nutanix.FloatingIp;
import com.pulumi.nutanix.FloatingIpArgs;
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 fip1 = new FloatingIp("fip1", FloatingIpArgs.builder()
            .externalSubnetReferenceUuid("{{ext_sub_uuid}}")
            .build());

    }
}
Copy
resources:
  fip1:
    type: nutanix:FloatingIp
    properties:
      externalSubnetReferenceUuid: '{{ext_sub_uuid}}'
Copy

create Floating IP with vpc name with external subnet name

import * as pulumi from "@pulumi/pulumi";
import * as nutanix from "@pierskarsenbarg/nutanix";

const fip2 = new nutanix.FloatingIp("fip2", {
    externalSubnetReferenceName: "{{ext_sub_name}}",
    privateIp: "{{ip_address}}",
    vpcReferenceName: "{{vpc_name}}",
});
Copy
import pulumi
import pulumi_nutanix as nutanix

fip2 = nutanix.FloatingIp("fip2",
    external_subnet_reference_name="{{ext_sub_name}}",
    private_ip="{{ip_address}}",
    vpc_reference_name="{{vpc_name}}")
Copy
package main

import (
	"github.com/pierskarsenbarg/pulumi-nutanix/sdk/go/nutanix"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := nutanix.NewFloatingIp(ctx, "fip2", &nutanix.FloatingIpArgs{
			ExternalSubnetReferenceName: pulumi.String("{{ext_sub_name}}"),
			PrivateIp:                   pulumi.String("{{ip_address}}"),
			VpcReferenceName:            pulumi.String("{{vpc_name}}"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Nutanix = PiersKarsenbarg.Nutanix;

return await Deployment.RunAsync(() => 
{
    var fip2 = new Nutanix.FloatingIp("fip2", new()
    {
        ExternalSubnetReferenceName = "{{ext_sub_name}}",
        PrivateIp = "{{ip_address}}",
        VpcReferenceName = "{{vpc_name}}",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.nutanix.FloatingIp;
import com.pulumi.nutanix.FloatingIpArgs;
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 fip2 = new FloatingIp("fip2", FloatingIpArgs.builder()
            .externalSubnetReferenceName("{{ext_sub_name}}")
            .privateIp("{{ip_address}}")
            .vpcReferenceName("{{vpc_name}}")
            .build());

    }
}
Copy
resources:
  fip2:
    type: nutanix:FloatingIp
    properties:
      externalSubnetReferenceName: '{{ext_sub_name}}'
      privateIp: '{{ip_address}}'
      vpcReferenceName: '{{vpc_name}}'
Copy

Create FloatingIp Resource

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

Constructor syntax

new FloatingIp(name: string, args?: FloatingIpArgs, opts?: CustomResourceOptions);
@overload
def FloatingIp(resource_name: str,
               args: Optional[FloatingIpArgs] = None,
               opts: Optional[ResourceOptions] = None)

@overload
def FloatingIp(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               api_version: Optional[str] = None,
               external_subnet_reference_name: Optional[str] = None,
               external_subnet_reference_uuid: Optional[str] = None,
               private_ip: Optional[str] = None,
               vm_nic_reference_uuid: Optional[str] = None,
               vpc_reference_name: Optional[str] = None,
               vpc_reference_uuid: Optional[str] = None)
func NewFloatingIp(ctx *Context, name string, args *FloatingIpArgs, opts ...ResourceOption) (*FloatingIp, error)
public FloatingIp(string name, FloatingIpArgs? args = null, CustomResourceOptions? opts = null)
public FloatingIp(String name, FloatingIpArgs args)
public FloatingIp(String name, FloatingIpArgs args, CustomResourceOptions options)
type: nutanix:FloatingIp
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args FloatingIpArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args FloatingIpArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args FloatingIpArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args FloatingIpArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. FloatingIpArgs
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 floatingIpResource = new Nutanix.FloatingIp("floatingIpResource", new()
{
    ApiVersion = "string",
    ExternalSubnetReferenceName = "string",
    ExternalSubnetReferenceUuid = "string",
    PrivateIp = "string",
    VmNicReferenceUuid = "string",
    VpcReferenceName = "string",
    VpcReferenceUuid = "string",
});
Copy
example, err := nutanix.NewFloatingIp(ctx, "floatingIpResource", &nutanix.FloatingIpArgs{
	ApiVersion:                  pulumi.String("string"),
	ExternalSubnetReferenceName: pulumi.String("string"),
	ExternalSubnetReferenceUuid: pulumi.String("string"),
	PrivateIp:                   pulumi.String("string"),
	VmNicReferenceUuid:          pulumi.String("string"),
	VpcReferenceName:            pulumi.String("string"),
	VpcReferenceUuid:            pulumi.String("string"),
})
Copy
var floatingIpResource = new FloatingIp("floatingIpResource", FloatingIpArgs.builder()
    .apiVersion("string")
    .externalSubnetReferenceName("string")
    .externalSubnetReferenceUuid("string")
    .privateIp("string")
    .vmNicReferenceUuid("string")
    .vpcReferenceName("string")
    .vpcReferenceUuid("string")
    .build());
Copy
floating_ip_resource = nutanix.FloatingIp("floatingIpResource",
    api_version="string",
    external_subnet_reference_name="string",
    external_subnet_reference_uuid="string",
    private_ip="string",
    vm_nic_reference_uuid="string",
    vpc_reference_name="string",
    vpc_reference_uuid="string")
Copy
const floatingIpResource = new nutanix.FloatingIp("floatingIpResource", {
    apiVersion: "string",
    externalSubnetReferenceName: "string",
    externalSubnetReferenceUuid: "string",
    privateIp: "string",
    vmNicReferenceUuid: "string",
    vpcReferenceName: "string",
    vpcReferenceUuid: "string",
});
Copy
type: nutanix:FloatingIp
properties:
    apiVersion: string
    externalSubnetReferenceName: string
    externalSubnetReferenceUuid: string
    privateIp: string
    vmNicReferenceUuid: string
    vpcReferenceName: string
    vpcReferenceUuid: string
Copy

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

ApiVersion string
The version of the API.
ExternalSubnetReferenceName Changes to this property will trigger replacement. string
The reference to a subnet. Should not be used with {external_subnet_reference_uuid} .
ExternalSubnetReferenceUuid Changes to this property will trigger replacement. string
The reference to a subnet. Should not be used with {external_subnet_reference_name} .
PrivateIp string
Private IP with which floating IP is associated. Should be used with vpc_reference .
VmNicReferenceUuid string
The reference to a vm_nic .
VpcReferenceName string
The reference to a vpc. Should not be used with {vpc_reference_uuid}.
VpcReferenceUuid string
The reference to a vpc. Should not be used with {vpc_reference_name}.
ApiVersion string
The version of the API.
ExternalSubnetReferenceName Changes to this property will trigger replacement. string
The reference to a subnet. Should not be used with {external_subnet_reference_uuid} .
ExternalSubnetReferenceUuid Changes to this property will trigger replacement. string
The reference to a subnet. Should not be used with {external_subnet_reference_name} .
PrivateIp string
Private IP with which floating IP is associated. Should be used with vpc_reference .
VmNicReferenceUuid string
The reference to a vm_nic .
VpcReferenceName string
The reference to a vpc. Should not be used with {vpc_reference_uuid}.
VpcReferenceUuid string
The reference to a vpc. Should not be used with {vpc_reference_name}.
apiVersion String
The version of the API.
externalSubnetReferenceName Changes to this property will trigger replacement. String
The reference to a subnet. Should not be used with {external_subnet_reference_uuid} .
externalSubnetReferenceUuid Changes to this property will trigger replacement. String
The reference to a subnet. Should not be used with {external_subnet_reference_name} .
privateIp String
Private IP with which floating IP is associated. Should be used with vpc_reference .
vmNicReferenceUuid String
The reference to a vm_nic .
vpcReferenceName String
The reference to a vpc. Should not be used with {vpc_reference_uuid}.
vpcReferenceUuid String
The reference to a vpc. Should not be used with {vpc_reference_name}.
apiVersion string
The version of the API.
externalSubnetReferenceName Changes to this property will trigger replacement. string
The reference to a subnet. Should not be used with {external_subnet_reference_uuid} .
externalSubnetReferenceUuid Changes to this property will trigger replacement. string
The reference to a subnet. Should not be used with {external_subnet_reference_name} .
privateIp string
Private IP with which floating IP is associated. Should be used with vpc_reference .
vmNicReferenceUuid string
The reference to a vm_nic .
vpcReferenceName string
The reference to a vpc. Should not be used with {vpc_reference_uuid}.
vpcReferenceUuid string
The reference to a vpc. Should not be used with {vpc_reference_name}.
api_version str
The version of the API.
external_subnet_reference_name Changes to this property will trigger replacement. str
The reference to a subnet. Should not be used with {external_subnet_reference_uuid} .
external_subnet_reference_uuid Changes to this property will trigger replacement. str
The reference to a subnet. Should not be used with {external_subnet_reference_name} .
private_ip str
Private IP with which floating IP is associated. Should be used with vpc_reference .
vm_nic_reference_uuid str
The reference to a vm_nic .
vpc_reference_name str
The reference to a vpc. Should not be used with {vpc_reference_uuid}.
vpc_reference_uuid str
The reference to a vpc. Should not be used with {vpc_reference_name}.
apiVersion String
The version of the API.
externalSubnetReferenceName Changes to this property will trigger replacement. String
The reference to a subnet. Should not be used with {external_subnet_reference_uuid} .
externalSubnetReferenceUuid Changes to this property will trigger replacement. String
The reference to a subnet. Should not be used with {external_subnet_reference_name} .
privateIp String
Private IP with which floating IP is associated. Should be used with vpc_reference .
vmNicReferenceUuid String
The reference to a vm_nic .
vpcReferenceName String
The reference to a vpc. Should not be used with {vpc_reference_uuid}.
vpcReferenceUuid String
The reference to a vpc. Should not be used with {vpc_reference_name}.

Outputs

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

Id string
The provider-assigned unique ID for this managed resource.
Metadata Dictionary<string, string>
The floating_ips kind metadata.
Id string
The provider-assigned unique ID for this managed resource.
Metadata map[string]string
The floating_ips kind metadata.
id String
The provider-assigned unique ID for this managed resource.
metadata Map<String,String>
The floating_ips kind metadata.
id string
The provider-assigned unique ID for this managed resource.
metadata {[key: string]: string}
The floating_ips kind metadata.
id str
The provider-assigned unique ID for this managed resource.
metadata Mapping[str, str]
The floating_ips kind metadata.
id String
The provider-assigned unique ID for this managed resource.
metadata Map<String>
The floating_ips kind metadata.

Look up Existing FloatingIp Resource

Get an existing FloatingIp 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?: FloatingIpState, opts?: CustomResourceOptions): FloatingIp
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        api_version: Optional[str] = None,
        external_subnet_reference_name: Optional[str] = None,
        external_subnet_reference_uuid: Optional[str] = None,
        metadata: Optional[Mapping[str, str]] = None,
        private_ip: Optional[str] = None,
        vm_nic_reference_uuid: Optional[str] = None,
        vpc_reference_name: Optional[str] = None,
        vpc_reference_uuid: Optional[str] = None) -> FloatingIp
func GetFloatingIp(ctx *Context, name string, id IDInput, state *FloatingIpState, opts ...ResourceOption) (*FloatingIp, error)
public static FloatingIp Get(string name, Input<string> id, FloatingIpState? state, CustomResourceOptions? opts = null)
public static FloatingIp get(String name, Output<String> id, FloatingIpState state, CustomResourceOptions options)
resources:  _:    type: nutanix:FloatingIp    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
ApiVersion string
The version of the API.
ExternalSubnetReferenceName Changes to this property will trigger replacement. string
The reference to a subnet. Should not be used with {external_subnet_reference_uuid} .
ExternalSubnetReferenceUuid Changes to this property will trigger replacement. string
The reference to a subnet. Should not be used with {external_subnet_reference_name} .
Metadata Dictionary<string, string>
The floating_ips kind metadata.
PrivateIp string
Private IP with which floating IP is associated. Should be used with vpc_reference .
VmNicReferenceUuid string
The reference to a vm_nic .
VpcReferenceName string
The reference to a vpc. Should not be used with {vpc_reference_uuid}.
VpcReferenceUuid string
The reference to a vpc. Should not be used with {vpc_reference_name}.
ApiVersion string
The version of the API.
ExternalSubnetReferenceName Changes to this property will trigger replacement. string
The reference to a subnet. Should not be used with {external_subnet_reference_uuid} .
ExternalSubnetReferenceUuid Changes to this property will trigger replacement. string
The reference to a subnet. Should not be used with {external_subnet_reference_name} .
Metadata map[string]string
The floating_ips kind metadata.
PrivateIp string
Private IP with which floating IP is associated. Should be used with vpc_reference .
VmNicReferenceUuid string
The reference to a vm_nic .
VpcReferenceName string
The reference to a vpc. Should not be used with {vpc_reference_uuid}.
VpcReferenceUuid string
The reference to a vpc. Should not be used with {vpc_reference_name}.
apiVersion String
The version of the API.
externalSubnetReferenceName Changes to this property will trigger replacement. String
The reference to a subnet. Should not be used with {external_subnet_reference_uuid} .
externalSubnetReferenceUuid Changes to this property will trigger replacement. String
The reference to a subnet. Should not be used with {external_subnet_reference_name} .
metadata Map<String,String>
The floating_ips kind metadata.
privateIp String
Private IP with which floating IP is associated. Should be used with vpc_reference .
vmNicReferenceUuid String
The reference to a vm_nic .
vpcReferenceName String
The reference to a vpc. Should not be used with {vpc_reference_uuid}.
vpcReferenceUuid String
The reference to a vpc. Should not be used with {vpc_reference_name}.
apiVersion string
The version of the API.
externalSubnetReferenceName Changes to this property will trigger replacement. string
The reference to a subnet. Should not be used with {external_subnet_reference_uuid} .
externalSubnetReferenceUuid Changes to this property will trigger replacement. string
The reference to a subnet. Should not be used with {external_subnet_reference_name} .
metadata {[key: string]: string}
The floating_ips kind metadata.
privateIp string
Private IP with which floating IP is associated. Should be used with vpc_reference .
vmNicReferenceUuid string
The reference to a vm_nic .
vpcReferenceName string
The reference to a vpc. Should not be used with {vpc_reference_uuid}.
vpcReferenceUuid string
The reference to a vpc. Should not be used with {vpc_reference_name}.
api_version str
The version of the API.
external_subnet_reference_name Changes to this property will trigger replacement. str
The reference to a subnet. Should not be used with {external_subnet_reference_uuid} .
external_subnet_reference_uuid Changes to this property will trigger replacement. str
The reference to a subnet. Should not be used with {external_subnet_reference_name} .
metadata Mapping[str, str]
The floating_ips kind metadata.
private_ip str
Private IP with which floating IP is associated. Should be used with vpc_reference .
vm_nic_reference_uuid str
The reference to a vm_nic .
vpc_reference_name str
The reference to a vpc. Should not be used with {vpc_reference_uuid}.
vpc_reference_uuid str
The reference to a vpc. Should not be used with {vpc_reference_name}.
apiVersion String
The version of the API.
externalSubnetReferenceName Changes to this property will trigger replacement. String
The reference to a subnet. Should not be used with {external_subnet_reference_uuid} .
externalSubnetReferenceUuid Changes to this property will trigger replacement. String
The reference to a subnet. Should not be used with {external_subnet_reference_name} .
metadata Map<String>
The floating_ips kind metadata.
privateIp String
Private IP with which floating IP is associated. Should be used with vpc_reference .
vmNicReferenceUuid String
The reference to a vm_nic .
vpcReferenceName String
The reference to a vpc. Should not be used with {vpc_reference_uuid}.
vpcReferenceUuid String
The reference to a vpc. Should not be used with {vpc_reference_name}.

Package Details

Repository
nutanix pierskarsenbarg/pulumi-nutanix
License
Apache-2.0
Notes
This Pulumi package is based on the nutanix Terraform Provider.