OpenStack

Pulumi Official
Package maintained by Pulumi
v3.9.0 published on Thursday, Aug 4, 2022 by Pulumi

getFloatingIp

Use this data source to get the ID of an available OpenStack floating IP.

Example Usage

using Pulumi;
using OpenStack = Pulumi.OpenStack;

class MyStack : Stack
{
    public MyStack()
    {
        var floatingip1 = Output.Create(OpenStack.Networking.GetFloatingIp.InvokeAsync(new OpenStack.Networking.GetFloatingIpArgs
        {
            Address = "192.168.0.4",
        }));
    }

}
package main

import (
	"github.com/pulumi/pulumi-openstack/sdk/v3/go/openstack/networking"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := networking.LookupFloatingIp(ctx, &networking.LookupFloatingIpArgs{
			Address: pulumi.StringRef("192.168.0.4"),
		}, nil)
		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.networking.NetworkingFunctions;
import com.pulumi.openstack.networking.inputs.GetFloatingIpArgs;
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) {
        final var floatingip1 = NetworkingFunctions.getFloatingIp(GetFloatingIpArgs.builder()
            .address("192.168.0.4")
            .build());

    }
}
import pulumi
import pulumi_openstack as openstack

floatingip1 = openstack.networking.get_floating_ip(address="192.168.0.4")
import * as pulumi from "@pulumi/pulumi";
import * as openstack from "@pulumi/openstack";

const floatingip1 = pulumi.output(openstack.networking.getFloatingIp({
    address: "192.168.0.4",
}));
variables:
  floatingip1:
    Fn::Invoke:
      Function: openstack:networking:getFloatingIp
      Arguments:
        address: 192.168.0.4

Using getFloatingIp

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getFloatingIp(args: GetFloatingIpArgs, opts?: InvokeOptions): Promise<GetFloatingIpResult>
function getFloatingIpOutput(args: GetFloatingIpOutputArgs, opts?: InvokeOptions): Output<GetFloatingIpResult>
def get_floating_ip(address: Optional[str] = None,
                    description: Optional[str] = None,
                    fixed_ip: Optional[str] = None,
                    pool: Optional[str] = None,
                    port_id: Optional[str] = None,
                    region: Optional[str] = None,
                    status: Optional[str] = None,
                    tags: Optional[Sequence[str]] = None,
                    tenant_id: Optional[str] = None,
                    opts: Optional[InvokeOptions] = None) -> GetFloatingIpResult
def get_floating_ip_output(address: Optional[pulumi.Input[str]] = None,
                    description: Optional[pulumi.Input[str]] = None,
                    fixed_ip: Optional[pulumi.Input[str]] = None,
                    pool: Optional[pulumi.Input[str]] = None,
                    port_id: Optional[pulumi.Input[str]] = None,
                    region: Optional[pulumi.Input[str]] = None,
                    status: Optional[pulumi.Input[str]] = None,
                    tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                    tenant_id: Optional[pulumi.Input[str]] = None,
                    opts: Optional[InvokeOptions] = None) -> Output[GetFloatingIpResult]
func LookupFloatingIp(ctx *Context, args *LookupFloatingIpArgs, opts ...InvokeOption) (*LookupFloatingIpResult, error)
func LookupFloatingIpOutput(ctx *Context, args *LookupFloatingIpOutputArgs, opts ...InvokeOption) LookupFloatingIpResultOutput

> Note: This function is named LookupFloatingIp in the Go SDK.

public static class GetFloatingIp 
{
    public static Task<GetFloatingIpResult> InvokeAsync(GetFloatingIpArgs args, InvokeOptions? opts = null)
    public static Output<GetFloatingIpResult> Invoke(GetFloatingIpInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetFloatingIpResult> getFloatingIp(GetFloatingIpArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: openstack:networking/getFloatingIp:getFloatingIp
  Arguments:
    # Arguments dictionary

The following arguments are supported:

Address string

The IP address of the floating IP.

Description string

Human-readable description of the floating IP.

FixedIp string

The specific IP address of the internal port which should be associated with the floating IP.

Pool string

The name of the pool from which the floating IP belongs to.

PortId string

The ID of the port the floating IP is attached.

Region string

The region in which to obtain the V2 Neutron client. A Neutron client is needed to retrieve floating IP ids. If omitted, the region argument of the provider is used.

Status string

status of the floating IP (ACTIVE/DOWN).

Tags List<string>

The list of floating IP tags to filter.

TenantId string

The owner of the floating IP.

Address string

The IP address of the floating IP.

Description string

Human-readable description of the floating IP.

FixedIp string

The specific IP address of the internal port which should be associated with the floating IP.

Pool string

The name of the pool from which the floating IP belongs to.

PortId string

The ID of the port the floating IP is attached.

Region string

The region in which to obtain the V2 Neutron client. A Neutron client is needed to retrieve floating IP ids. If omitted, the region argument of the provider is used.

Status string

status of the floating IP (ACTIVE/DOWN).

Tags []string

The list of floating IP tags to filter.

TenantId string

The owner of the floating IP.

address String

The IP address of the floating IP.

description String

Human-readable description of the floating IP.

fixedIp String

The specific IP address of the internal port which should be associated with the floating IP.

pool String

The name of the pool from which the floating IP belongs to.

portId String

The ID of the port the floating IP is attached.

region String

The region in which to obtain the V2 Neutron client. A Neutron client is needed to retrieve floating IP ids. If omitted, the region argument of the provider is used.

status String

status of the floating IP (ACTIVE/DOWN).

tags List<String>

The list of floating IP tags to filter.

tenantId String

The owner of the floating IP.

address string

The IP address of the floating IP.

description string

Human-readable description of the floating IP.

fixedIp string

The specific IP address of the internal port which should be associated with the floating IP.

pool string

The name of the pool from which the floating IP belongs to.

portId string

The ID of the port the floating IP is attached.

region string

The region in which to obtain the V2 Neutron client. A Neutron client is needed to retrieve floating IP ids. If omitted, the region argument of the provider is used.

status string

status of the floating IP (ACTIVE/DOWN).

tags string[]

The list of floating IP tags to filter.

tenantId string

The owner of the floating IP.

address str

The IP address of the floating IP.

description str

Human-readable description of the floating IP.

fixed_ip str

The specific IP address of the internal port which should be associated with the floating IP.

pool str

The name of the pool from which the floating IP belongs to.

port_id str

The ID of the port the floating IP is attached.

region str

The region in which to obtain the V2 Neutron client. A Neutron client is needed to retrieve floating IP ids. If omitted, the region argument of the provider is used.

status str

status of the floating IP (ACTIVE/DOWN).

tags Sequence[str]

The list of floating IP tags to filter.

tenant_id str

The owner of the floating IP.

address String

The IP address of the floating IP.

description String

Human-readable description of the floating IP.

fixedIp String

The specific IP address of the internal port which should be associated with the floating IP.

pool String

The name of the pool from which the floating IP belongs to.

portId String

The ID of the port the floating IP is attached.

region String

The region in which to obtain the V2 Neutron client. A Neutron client is needed to retrieve floating IP ids. If omitted, the region argument of the provider is used.

status String

status of the floating IP (ACTIVE/DOWN).

tags List<String>

The list of floating IP tags to filter.

tenantId String

The owner of the floating IP.

getFloatingIp Result

The following output properties are available:

AllTags List<string>

A set of string tags applied on the floating IP.

DnsDomain string

The floating IP DNS domain. Available, when Neutron DNS extension is enabled.

DnsName string

The floating IP DNS name. Available, when Neutron DNS extension is enabled.

Id string

The provider-assigned unique ID for this managed resource.

Address string
Description string
FixedIp string
Pool string
PortId string
Region string
Status string
Tags List<string>
TenantId string
AllTags []string

A set of string tags applied on the floating IP.

DnsDomain string

The floating IP DNS domain. Available, when Neutron DNS extension is enabled.

DnsName string

The floating IP DNS name. Available, when Neutron DNS extension is enabled.

Id string

The provider-assigned unique ID for this managed resource.

Address string
Description string
FixedIp string
Pool string
PortId string
Region string
Status string
Tags []string
TenantId string
allTags List<String>

A set of string tags applied on the floating IP.

dnsDomain String

The floating IP DNS domain. Available, when Neutron DNS extension is enabled.

dnsName String

The floating IP DNS name. Available, when Neutron DNS extension is enabled.

id String

The provider-assigned unique ID for this managed resource.

address String
description String
fixedIp String
pool String
portId String
region String
status String
tags List<String>
tenantId String
allTags string[]

A set of string tags applied on the floating IP.

dnsDomain string

The floating IP DNS domain. Available, when Neutron DNS extension is enabled.

dnsName string

The floating IP DNS name. Available, when Neutron DNS extension is enabled.

id string

The provider-assigned unique ID for this managed resource.

address string
description string
fixedIp string
pool string
portId string
region string
status string
tags string[]
tenantId string
all_tags Sequence[str]

A set of string tags applied on the floating IP.

dns_domain str

The floating IP DNS domain. Available, when Neutron DNS extension is enabled.

dns_name str

The floating IP DNS name. Available, when Neutron DNS extension is enabled.

id str

The provider-assigned unique ID for this managed resource.

address str
description str
fixed_ip str
pool str
port_id str
region str
status str
tags Sequence[str]
tenant_id str
allTags List<String>

A set of string tags applied on the floating IP.

dnsDomain String

The floating IP DNS domain. Available, when Neutron DNS extension is enabled.

dnsName String

The floating IP DNS name. Available, when Neutron DNS extension is enabled.

id String

The provider-assigned unique ID for this managed resource.

address String
description String
fixedIp String
pool String
portId String
region String
status String
tags List<String>
tenantId String

Package Details

Repository
https://github.com/pulumi/pulumi-openstack
License
Apache-2.0
Notes

This Pulumi package is based on the openstack Terraform Provider.