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}}"});
import pulumi
import pulumi_nutanix as nutanix
fip1 = nutanix.FloatingIp("fip1", external_subnet_reference_uuid="{{ext_sub_uuid}}")
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
})
}
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}}",
});
});
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());
}
}
resources:
fip1:
type: nutanix:FloatingIp
properties:
externalSubnetReferenceUuid: '{{ext_sub_uuid}}'
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}}",
});
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}}")
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
})
}
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}}",
});
});
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());
}
}
resources:
fip2:
type: nutanix:FloatingIp
properties:
externalSubnetReferenceName: '{{ext_sub_name}}'
privateIp: '{{ip_address}}'
vpcReferenceName: '{{vpc_name}}'
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 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 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 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 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 String
- The unique name of the resource.
- args 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",
});
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"),
})
var floatingIpResource = new FloatingIp("floatingIpResource", FloatingIpArgs.builder()
.apiVersion("string")
.externalSubnetReferenceName("string")
.externalSubnetReferenceUuid("string")
.privateIp("string")
.vmNicReferenceUuid("string")
.vpcReferenceName("string")
.vpcReferenceUuid("string")
.build());
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")
const floatingIpResource = new nutanix.FloatingIp("floatingIpResource", {
apiVersion: "string",
externalSubnetReferenceName: "string",
externalSubnetReferenceUuid: "string",
privateIp: "string",
vmNicReferenceUuid: "string",
vpcReferenceName: "string",
vpcReferenceUuid: "string",
});
type: nutanix:FloatingIp
properties:
apiVersion: string
externalSubnetReferenceName: string
externalSubnetReferenceUuid: string
privateIp: string
vmNicReferenceUuid: string
vpcReferenceName: string
vpcReferenceUuid: string
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:
- Api
Version string - The version of the API.
- External
Subnet stringReference Name - The reference to a subnet. Should not be used with {external_subnet_reference_uuid} .
- External
Subnet stringReference Uuid - The reference to a subnet. Should not be used with {external_subnet_reference_name} .
- Private
Ip string - Private IP with which floating IP is associated. Should be used with vpc_reference .
- Vm
Nic stringReference Uuid - The reference to a vm_nic .
- Vpc
Reference stringName - The reference to a vpc. Should not be used with {vpc_reference_uuid}.
- Vpc
Reference stringUuid - The reference to a vpc. Should not be used with {vpc_reference_name}.
- Api
Version string - The version of the API.
- External
Subnet stringReference Name - The reference to a subnet. Should not be used with {external_subnet_reference_uuid} .
- External
Subnet stringReference Uuid - The reference to a subnet. Should not be used with {external_subnet_reference_name} .
- Private
Ip string - Private IP with which floating IP is associated. Should be used with vpc_reference .
- Vm
Nic stringReference Uuid - The reference to a vm_nic .
- Vpc
Reference stringName - The reference to a vpc. Should not be used with {vpc_reference_uuid}.
- Vpc
Reference stringUuid - The reference to a vpc. Should not be used with {vpc_reference_name}.
- api
Version String - The version of the API.
- external
Subnet StringReference Name - The reference to a subnet. Should not be used with {external_subnet_reference_uuid} .
- external
Subnet StringReference Uuid - The reference to a subnet. Should not be used with {external_subnet_reference_name} .
- private
Ip String - Private IP with which floating IP is associated. Should be used with vpc_reference .
- vm
Nic StringReference Uuid - The reference to a vm_nic .
- vpc
Reference StringName - The reference to a vpc. Should not be used with {vpc_reference_uuid}.
- vpc
Reference StringUuid - The reference to a vpc. Should not be used with {vpc_reference_name}.
- api
Version string - The version of the API.
- external
Subnet stringReference Name - The reference to a subnet. Should not be used with {external_subnet_reference_uuid} .
- external
Subnet stringReference Uuid - The reference to a subnet. Should not be used with {external_subnet_reference_name} .
- private
Ip string - Private IP with which floating IP is associated. Should be used with vpc_reference .
- vm
Nic stringReference Uuid - The reference to a vm_nic .
- vpc
Reference stringName - The reference to a vpc. Should not be used with {vpc_reference_uuid}.
- vpc
Reference stringUuid - The reference to a vpc. Should not be used with {vpc_reference_name}.
- api_
version str - The version of the API.
- external_
subnet_ strreference_ name - The reference to a subnet. Should not be used with {external_subnet_reference_uuid} .
- external_
subnet_ strreference_ uuid - 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_ strreference_ uuid - The reference to a vm_nic .
- vpc_
reference_ strname - The reference to a vpc. Should not be used with {vpc_reference_uuid}.
- vpc_
reference_ struuid - The reference to a vpc. Should not be used with {vpc_reference_name}.
- api
Version String - The version of the API.
- external
Subnet StringReference Name - The reference to a subnet. Should not be used with {external_subnet_reference_uuid} .
- external
Subnet StringReference Uuid - The reference to a subnet. Should not be used with {external_subnet_reference_name} .
- private
Ip String - Private IP with which floating IP is associated. Should be used with vpc_reference .
- vm
Nic StringReference Uuid - The reference to a vm_nic .
- vpc
Reference StringName - The reference to a vpc. Should not be used with {vpc_reference_uuid}.
- vpc
Reference StringUuid - 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:
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)
Resource lookup is not supported in YAML
- 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.
- Api
Version string - The version of the API.
- External
Subnet stringReference Name - The reference to a subnet. Should not be used with {external_subnet_reference_uuid} .
- External
Subnet stringReference Uuid - The reference to a subnet. Should not be used with {external_subnet_reference_name} .
- Metadata Dictionary<string, string>
- The floating_ips kind metadata.
- Private
Ip string - Private IP with which floating IP is associated. Should be used with vpc_reference .
- Vm
Nic stringReference Uuid - The reference to a vm_nic .
- Vpc
Reference stringName - The reference to a vpc. Should not be used with {vpc_reference_uuid}.
- Vpc
Reference stringUuid - The reference to a vpc. Should not be used with {vpc_reference_name}.
- Api
Version string - The version of the API.
- External
Subnet stringReference Name - The reference to a subnet. Should not be used with {external_subnet_reference_uuid} .
- External
Subnet stringReference Uuid - The reference to a subnet. Should not be used with {external_subnet_reference_name} .
- Metadata map[string]string
- The floating_ips kind metadata.
- Private
Ip string - Private IP with which floating IP is associated. Should be used with vpc_reference .
- Vm
Nic stringReference Uuid - The reference to a vm_nic .
- Vpc
Reference stringName - The reference to a vpc. Should not be used with {vpc_reference_uuid}.
- Vpc
Reference stringUuid - The reference to a vpc. Should not be used with {vpc_reference_name}.
- api
Version String - The version of the API.
- external
Subnet StringReference Name - The reference to a subnet. Should not be used with {external_subnet_reference_uuid} .
- external
Subnet StringReference Uuid - The reference to a subnet. Should not be used with {external_subnet_reference_name} .
- metadata Map<String,String>
- The floating_ips kind metadata.
- private
Ip String - Private IP with which floating IP is associated. Should be used with vpc_reference .
- vm
Nic StringReference Uuid - The reference to a vm_nic .
- vpc
Reference StringName - The reference to a vpc. Should not be used with {vpc_reference_uuid}.
- vpc
Reference StringUuid - The reference to a vpc. Should not be used with {vpc_reference_name}.
- api
Version string - The version of the API.
- external
Subnet stringReference Name - The reference to a subnet. Should not be used with {external_subnet_reference_uuid} .
- external
Subnet stringReference Uuid - The reference to a subnet. Should not be used with {external_subnet_reference_name} .
- metadata {[key: string]: string}
- The floating_ips kind metadata.
- private
Ip string - Private IP with which floating IP is associated. Should be used with vpc_reference .
- vm
Nic stringReference Uuid - The reference to a vm_nic .
- vpc
Reference stringName - The reference to a vpc. Should not be used with {vpc_reference_uuid}.
- vpc
Reference stringUuid - The reference to a vpc. Should not be used with {vpc_reference_name}.
- api_
version str - The version of the API.
- external_
subnet_ strreference_ name - The reference to a subnet. Should not be used with {external_subnet_reference_uuid} .
- external_
subnet_ strreference_ uuid - 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_ strreference_ uuid - The reference to a vm_nic .
- vpc_
reference_ strname - The reference to a vpc. Should not be used with {vpc_reference_uuid}.
- vpc_
reference_ struuid - The reference to a vpc. Should not be used with {vpc_reference_name}.
- api
Version String - The version of the API.
- external
Subnet StringReference Name - The reference to a subnet. Should not be used with {external_subnet_reference_uuid} .
- external
Subnet StringReference Uuid - The reference to a subnet. Should not be used with {external_subnet_reference_name} .
- metadata Map<String>
- The floating_ips kind metadata.
- private
Ip String - Private IP with which floating IP is associated. Should be used with vpc_reference .
- vm
Nic StringReference Uuid - The reference to a vm_nic .
- vpc
Reference StringName - The reference to a vpc. Should not be used with {vpc_reference_uuid}.
- vpc
Reference StringUuid - 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.