1. Packages
  2. OpenStack
  3. API Docs
  4. compute
  5. FloatingIp
OpenStack v3.15.1 published on Thursday, Feb 1, 2024 by Pulumi

openstack.compute.FloatingIp

Explore with Pulumi AI

openstack logo
OpenStack v3.15.1 published on Thursday, Feb 1, 2024 by Pulumi

    Manages a V2 floating IP resource within OpenStack Nova (compute) that can be used for compute instances.

    Please note that managing floating IPs through the OpenStack Compute API has been deprecated. Unless you are using an older OpenStack environment, it is recommended to use the openstack.networking.FloatingIp resource instead, which uses the OpenStack Networking API.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using OpenStack = Pulumi.OpenStack;
    
    return await Deployment.RunAsync(() => 
    {
        var floatip1 = new OpenStack.Compute.FloatingIp("floatip1", new()
        {
            Pool = "public",
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-openstack/sdk/v3/go/openstack/compute"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := compute.NewFloatingIp(ctx, "floatip1", &compute.FloatingIpArgs{
    			Pool: pulumi.String("public"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.openstack.compute.FloatingIp;
    import com.pulumi.openstack.compute.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 floatip1 = new FloatingIp("floatip1", FloatingIpArgs.builder()        
                .pool("public")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_openstack as openstack
    
    floatip1 = openstack.compute.FloatingIp("floatip1", pool="public")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as openstack from "@pulumi/openstack";
    
    const floatip1 = new openstack.compute.FloatingIp("floatip1", {pool: "public"});
    
    resources:
      floatip1:
        type: openstack:compute:FloatingIp
        properties:
          pool: public
    

    Create FloatingIp Resource

    new FloatingIp(name: string, args: FloatingIpArgs, opts?: CustomResourceOptions);
    @overload
    def FloatingIp(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   pool: Optional[str] = None,
                   region: Optional[str] = None)
    @overload
    def FloatingIp(resource_name: str,
                   args: FloatingIpArgs,
                   opts: Optional[ResourceOptions] = None)
    func NewFloatingIp(ctx *Context, name string, args FloatingIpArgs, opts ...ResourceOption) (*FloatingIp, error)
    public FloatingIp(string name, FloatingIpArgs args, CustomResourceOptions? opts = null)
    public FloatingIp(String name, FloatingIpArgs args)
    public FloatingIp(String name, FloatingIpArgs args, CustomResourceOptions options)
    
    type: openstack:compute:FloatingIp
    properties: # The arguments to resource properties.
    options: # 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.
    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.

    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

    The FloatingIp resource accepts the following input properties:

    Pool string
    The name of the pool from which to obtain the floating IP. Changing this creates a new floating IP.
    Region string
    The region in which to obtain the V2 Compute client. A Compute client is needed to create a floating IP that can be used with a compute instance. If omitted, the region argument of the provider is used. Changing this creates a new floating IP (which may or may not have a different address).
    Pool string
    The name of the pool from which to obtain the floating IP. Changing this creates a new floating IP.
    Region string
    The region in which to obtain the V2 Compute client. A Compute client is needed to create a floating IP that can be used with a compute instance. If omitted, the region argument of the provider is used. Changing this creates a new floating IP (which may or may not have a different address).
    pool String
    The name of the pool from which to obtain the floating IP. Changing this creates a new floating IP.
    region String
    The region in which to obtain the V2 Compute client. A Compute client is needed to create a floating IP that can be used with a compute instance. If omitted, the region argument of the provider is used. Changing this creates a new floating IP (which may or may not have a different address).
    pool string
    The name of the pool from which to obtain the floating IP. Changing this creates a new floating IP.
    region string
    The region in which to obtain the V2 Compute client. A Compute client is needed to create a floating IP that can be used with a compute instance. If omitted, the region argument of the provider is used. Changing this creates a new floating IP (which may or may not have a different address).
    pool str
    The name of the pool from which to obtain the floating IP. Changing this creates a new floating IP.
    region str
    The region in which to obtain the V2 Compute client. A Compute client is needed to create a floating IP that can be used with a compute instance. If omitted, the region argument of the provider is used. Changing this creates a new floating IP (which may or may not have a different address).
    pool String
    The name of the pool from which to obtain the floating IP. Changing this creates a new floating IP.
    region String
    The region in which to obtain the V2 Compute client. A Compute client is needed to create a floating IP that can be used with a compute instance. If omitted, the region argument of the provider is used. Changing this creates a new floating IP (which may or may not have a different address).

    Outputs

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

    Address string
    The actual floating IP address itself.
    FixedIp string
    The fixed IP address corresponding to the floating IP.
    Id string
    The provider-assigned unique ID for this managed resource.
    InstanceId string
    UUID of the compute instance associated with the floating IP.
    Address string
    The actual floating IP address itself.
    FixedIp string
    The fixed IP address corresponding to the floating IP.
    Id string
    The provider-assigned unique ID for this managed resource.
    InstanceId string
    UUID of the compute instance associated with the floating IP.
    address String
    The actual floating IP address itself.
    fixedIp String
    The fixed IP address corresponding to the floating IP.
    id String
    The provider-assigned unique ID for this managed resource.
    instanceId String
    UUID of the compute instance associated with the floating IP.
    address string
    The actual floating IP address itself.
    fixedIp string
    The fixed IP address corresponding to the floating IP.
    id string
    The provider-assigned unique ID for this managed resource.
    instanceId string
    UUID of the compute instance associated with the floating IP.
    address str
    The actual floating IP address itself.
    fixed_ip str
    The fixed IP address corresponding to the floating IP.
    id str
    The provider-assigned unique ID for this managed resource.
    instance_id str
    UUID of the compute instance associated with the floating IP.
    address String
    The actual floating IP address itself.
    fixedIp String
    The fixed IP address corresponding to the floating IP.
    id String
    The provider-assigned unique ID for this managed resource.
    instanceId String
    UUID of the compute instance associated with the floating IP.

    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,
            address: Optional[str] = None,
            fixed_ip: Optional[str] = None,
            instance_id: Optional[str] = None,
            pool: Optional[str] = None,
            region: 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.
    The following state arguments are supported:
    Address string
    The actual floating IP address itself.
    FixedIp string
    The fixed IP address corresponding to the floating IP.
    InstanceId string
    UUID of the compute instance associated with the floating IP.
    Pool string
    The name of the pool from which to obtain the floating IP. Changing this creates a new floating IP.
    Region string
    The region in which to obtain the V2 Compute client. A Compute client is needed to create a floating IP that can be used with a compute instance. If omitted, the region argument of the provider is used. Changing this creates a new floating IP (which may or may not have a different address).
    Address string
    The actual floating IP address itself.
    FixedIp string
    The fixed IP address corresponding to the floating IP.
    InstanceId string
    UUID of the compute instance associated with the floating IP.
    Pool string
    The name of the pool from which to obtain the floating IP. Changing this creates a new floating IP.
    Region string
    The region in which to obtain the V2 Compute client. A Compute client is needed to create a floating IP that can be used with a compute instance. If omitted, the region argument of the provider is used. Changing this creates a new floating IP (which may or may not have a different address).
    address String
    The actual floating IP address itself.
    fixedIp String
    The fixed IP address corresponding to the floating IP.
    instanceId String
    UUID of the compute instance associated with the floating IP.
    pool String
    The name of the pool from which to obtain the floating IP. Changing this creates a new floating IP.
    region String
    The region in which to obtain the V2 Compute client. A Compute client is needed to create a floating IP that can be used with a compute instance. If omitted, the region argument of the provider is used. Changing this creates a new floating IP (which may or may not have a different address).
    address string
    The actual floating IP address itself.
    fixedIp string
    The fixed IP address corresponding to the floating IP.
    instanceId string
    UUID of the compute instance associated with the floating IP.
    pool string
    The name of the pool from which to obtain the floating IP. Changing this creates a new floating IP.
    region string
    The region in which to obtain the V2 Compute client. A Compute client is needed to create a floating IP that can be used with a compute instance. If omitted, the region argument of the provider is used. Changing this creates a new floating IP (which may or may not have a different address).
    address str
    The actual floating IP address itself.
    fixed_ip str
    The fixed IP address corresponding to the floating IP.
    instance_id str
    UUID of the compute instance associated with the floating IP.
    pool str
    The name of the pool from which to obtain the floating IP. Changing this creates a new floating IP.
    region str
    The region in which to obtain the V2 Compute client. A Compute client is needed to create a floating IP that can be used with a compute instance. If omitted, the region argument of the provider is used. Changing this creates a new floating IP (which may or may not have a different address).
    address String
    The actual floating IP address itself.
    fixedIp String
    The fixed IP address corresponding to the floating IP.
    instanceId String
    UUID of the compute instance associated with the floating IP.
    pool String
    The name of the pool from which to obtain the floating IP. Changing this creates a new floating IP.
    region String
    The region in which to obtain the V2 Compute client. A Compute client is needed to create a floating IP that can be used with a compute instance. If omitted, the region argument of the provider is used. Changing this creates a new floating IP (which may or may not have a different address).

    Import

    Floating IPs can be imported using the id, e.g.

     $ pulumi import openstack:compute/floatingIp:FloatingIp floatip_1 89c60255-9bd6-460c-822a-e2b959ede9d2
    

    Package Details

    Repository
    OpenStack pulumi/pulumi-openstack
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the openstack Terraform Provider.
    openstack logo
    OpenStack v3.15.1 published on Thursday, Feb 1, 2024 by Pulumi