OpenStack v5.0.0 published on Friday, Sep 27, 2024 by Pulumi
openstack.networking.getFloatingIp
Explore with Pulumi AI
Use this data source to get the ID of an available OpenStack floating IP.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as openstack from "@pulumi/openstack";
const floatingip1 = openstack.networking.getFloatingIp({
address: "192.168.0.4",
});
import pulumi
import pulumi_openstack as openstack
floatingip1 = openstack.networking.get_floating_ip(address="192.168.0.4")
package main
import (
"github.com/pulumi/pulumi-openstack/sdk/v5/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
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using OpenStack = Pulumi.OpenStack;
return await Deployment.RunAsync(() =>
{
var floatingip1 = OpenStack.Networking.GetFloatingIp.Invoke(new()
{
Address = "192.168.0.4",
});
});
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());
}
}
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.
- Fixed
Ip string - The specific IP address of the internal port which should be associated with the floating IP.
- Pool string
- The ID of the network from which the floating IP belongs to.
- Port
Id 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).
- List<string>
- The list of floating IP tags to filter.
- Tenant
Id 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.
- Fixed
Ip string - The specific IP address of the internal port which should be associated with the floating IP.
- Pool string
- The ID of the network from which the floating IP belongs to.
- Port
Id 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).
- []string
- The list of floating IP tags to filter.
- Tenant
Id 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.
- fixed
Ip String - The specific IP address of the internal port which should be associated with the floating IP.
- pool String
- The ID of the network from which the floating IP belongs to.
- port
Id 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).
- List<String>
- The list of floating IP tags to filter.
- tenant
Id 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.
- fixed
Ip string - The specific IP address of the internal port which should be associated with the floating IP.
- pool string
- The ID of the network from which the floating IP belongs to.
- port
Id 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).
- string[]
- The list of floating IP tags to filter.
- tenant
Id 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 ID of the network 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).
- 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.
- fixed
Ip String - The specific IP address of the internal port which should be associated with the floating IP.
- pool String
- The ID of the network from which the floating IP belongs to.
- port
Id 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).
- List<String>
- The list of floating IP tags to filter.
- tenant
Id String - The owner of the floating IP.
getFloatingIp Result
The following output properties are available:
- List<string>
- A set of string tags applied on the floating IP.
- Dns
Domain string - The floating IP DNS domain. Available, when Neutron DNS extension is enabled.
- Dns
Name 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
- Fixed
Ip string - Pool string
- Port
Id string - Region string
- Status string
- List<string>
- Tenant
Id string
- []string
- A set of string tags applied on the floating IP.
- Dns
Domain string - The floating IP DNS domain. Available, when Neutron DNS extension is enabled.
- Dns
Name 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
- Fixed
Ip string - Pool string
- Port
Id string - Region string
- Status string
- []string
- Tenant
Id string
- List<String>
- A set of string tags applied on the floating IP.
- dns
Domain String - The floating IP DNS domain. Available, when Neutron DNS extension is enabled.
- dns
Name 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
- fixed
Ip String - pool String
- port
Id String - region String
- status String
- List<String>
- tenant
Id String
- string[]
- A set of string tags applied on the floating IP.
- dns
Domain string - The floating IP DNS domain. Available, when Neutron DNS extension is enabled.
- dns
Name 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
- fixed
Ip string - pool string
- port
Id string - region string
- status string
- string[]
- tenant
Id string
- 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
- Sequence[str]
- tenant_
id str
- List<String>
- A set of string tags applied on the floating IP.
- dns
Domain String - The floating IP DNS domain. Available, when Neutron DNS extension is enabled.
- dns
Name 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
- fixed
Ip String - pool String
- port
Id String - region String
- status String
- List<String>
- tenant
Id String
Package Details
- Repository
- OpenStack pulumi/pulumi-openstack
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
openstack
Terraform Provider.