1. Packages
  2. Edgecenter Provider
  3. API Docs
  4. getFloatingip
edgecenter 0.8.0 published on Wednesday, Apr 30, 2025 by edge-center

edgecenter.getFloatingip

Explore with Pulumi AI

edgecenter logo
edgecenter 0.8.0 published on Wednesday, Apr 30, 2025 by edge-center

    A floating IP is a static IP address that can be associated with one of your instances or loadbalancers, allowing it to have a static public IP address. The floating IP can be re-associated to any other instance in the same datacenter.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as edgecenter from "@pulumi/edgecenter";
    
    const pr = edgecenter.getProject({
        name: "test",
    });
    const rg = edgecenter.getRegion({
        name: "ED-10 Preprod",
    });
    const ip = Promise.all([rg, pr]).then(([rg, pr]) => edgecenter.getFloatingip({
        floatingIpAddress: "10.100.179.172",
        regionId: rg.id,
        projectId: pr.id,
    }));
    export const view = ip;
    
    import pulumi
    import pulumi_edgecenter as edgecenter
    
    pr = edgecenter.get_project(name="test")
    rg = edgecenter.get_region(name="ED-10 Preprod")
    ip = edgecenter.get_floatingip(floating_ip_address="10.100.179.172",
        region_id=rg.id,
        project_id=pr.id)
    pulumi.export("view", ip)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/edgecenter/edgecenter"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		pr, err := edgecenter.LookupProject(ctx, &edgecenter.LookupProjectArgs{
    			Name: pulumi.StringRef("test"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		rg, err := edgecenter.GetRegion(ctx, &edgecenter.GetRegionArgs{
    			Name: "ED-10 Preprod",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ip, err := edgecenter.LookupFloatingip(ctx, &edgecenter.LookupFloatingipArgs{
    			FloatingIpAddress: pulumi.StringRef("10.100.179.172"),
    			RegionId:          pulumi.Float64Ref(rg.Id),
    			ProjectId:         pulumi.Float64Ref(pr.Id),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("view", ip)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Edgecenter = Pulumi.Edgecenter;
    
    return await Deployment.RunAsync(() => 
    {
        var pr = Edgecenter.GetProject.Invoke(new()
        {
            Name = "test",
        });
    
        var rg = Edgecenter.GetRegion.Invoke(new()
        {
            Name = "ED-10 Preprod",
        });
    
        var ip = Edgecenter.GetFloatingip.Invoke(new()
        {
            FloatingIpAddress = "10.100.179.172",
            RegionId = rg.Apply(getRegionResult => getRegionResult.Id),
            ProjectId = pr.Apply(getProjectResult => getProjectResult.Id),
        });
    
        return new Dictionary<string, object?>
        {
            ["view"] = ip,
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.edgecenter.EdgecenterFunctions;
    import com.pulumi.edgecenter.inputs.GetProjectArgs;
    import com.pulumi.edgecenter.inputs.GetRegionArgs;
    import com.pulumi.edgecenter.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 pr = EdgecenterFunctions.getProject(GetProjectArgs.builder()
                .name("test")
                .build());
    
            final var rg = EdgecenterFunctions.getRegion(GetRegionArgs.builder()
                .name("ED-10 Preprod")
                .build());
    
            final var ip = EdgecenterFunctions.getFloatingip(GetFloatingipArgs.builder()
                .floatingIpAddress("10.100.179.172")
                .regionId(rg.applyValue(getRegionResult -> getRegionResult.id()))
                .projectId(pr.applyValue(getProjectResult -> getProjectResult.id()))
                .build());
    
            ctx.export("view", ip.applyValue(getFloatingipResult -> getFloatingipResult));
        }
    }
    
    variables:
      pr:
        fn::invoke:
          function: edgecenter:getProject
          arguments:
            name: test
      rg:
        fn::invoke:
          function: edgecenter:getRegion
          arguments:
            name: ED-10 Preprod
      ip:
        fn::invoke:
          function: edgecenter:getFloatingip
          arguments:
            floatingIpAddress: 10.100.179.172
            regionId: ${rg.id}
            projectId: ${pr.id}
    outputs:
      view: ${ip}
    

    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_floatingip(floating_ip_address: Optional[str] = None,
                       id: Optional[str] = None,
                       metadata_k: Optional[str] = None,
                       metadata_kv: Optional[Mapping[str, str]] = None,
                       port_id: Optional[str] = None,
                       project_id: Optional[float] = None,
                       project_name: Optional[str] = None,
                       region_id: Optional[float] = None,
                       region_name: Optional[str] = None,
                       opts: Optional[InvokeOptions] = None) -> GetFloatingipResult
    def get_floatingip_output(floating_ip_address: Optional[pulumi.Input[str]] = None,
                       id: Optional[pulumi.Input[str]] = None,
                       metadata_k: Optional[pulumi.Input[str]] = None,
                       metadata_kv: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                       port_id: Optional[pulumi.Input[str]] = None,
                       project_id: Optional[pulumi.Input[float]] = None,
                       project_name: Optional[pulumi.Input[str]] = None,
                       region_id: Optional[pulumi.Input[float]] = None,
                       region_name: 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)
    public static Output<GetFloatingipResult> getFloatingip(GetFloatingipArgs args, InvokeOptions options)
    
    fn::invoke:
      function: edgecenter:index/getFloatingip:getFloatingip
      arguments:
        # arguments dictionary

    The following arguments are supported:

    FloatingIpAddress string
    The floating IP address assigned to the resource. It must be a valid IP address.
    Id string
    floating IP uuid
    MetadataK string
    Filtration query opts (only key).
    MetadataKv Dictionary<string, string>
    Filtration query opts, for example, {offset = "10", limit = "10"}.
    PortId string
    The ID (uuid) of the network port that the floating IP is associated with.
    ProjectId double
    The uuid of the project. Either 'projectid' or 'projectname' must be specified.
    ProjectName string
    The name of the project. Either 'projectid' or 'projectname' must be specified.
    RegionId double
    The uuid of the region. Either 'regionid' or 'regionname' must be specified.
    RegionName string
    The name of the region. Either 'regionid' or 'regionname' must be specified.
    FloatingIpAddress string
    The floating IP address assigned to the resource. It must be a valid IP address.
    Id string
    floating IP uuid
    MetadataK string
    Filtration query opts (only key).
    MetadataKv map[string]string
    Filtration query opts, for example, {offset = "10", limit = "10"}.
    PortId string
    The ID (uuid) of the network port that the floating IP is associated with.
    ProjectId float64
    The uuid of the project. Either 'projectid' or 'projectname' must be specified.
    ProjectName string
    The name of the project. Either 'projectid' or 'projectname' must be specified.
    RegionId float64
    The uuid of the region. Either 'regionid' or 'regionname' must be specified.
    RegionName string
    The name of the region. Either 'regionid' or 'regionname' must be specified.
    floatingIpAddress String
    The floating IP address assigned to the resource. It must be a valid IP address.
    id String
    floating IP uuid
    metadataK String
    Filtration query opts (only key).
    metadataKv Map<String,String>
    Filtration query opts, for example, {offset = "10", limit = "10"}.
    portId String
    The ID (uuid) of the network port that the floating IP is associated with.
    projectId Double
    The uuid of the project. Either 'projectid' or 'projectname' must be specified.
    projectName String
    The name of the project. Either 'projectid' or 'projectname' must be specified.
    regionId Double
    The uuid of the region. Either 'regionid' or 'regionname' must be specified.
    regionName String
    The name of the region. Either 'regionid' or 'regionname' must be specified.
    floatingIpAddress string
    The floating IP address assigned to the resource. It must be a valid IP address.
    id string
    floating IP uuid
    metadataK string
    Filtration query opts (only key).
    metadataKv {[key: string]: string}
    Filtration query opts, for example, {offset = "10", limit = "10"}.
    portId string
    The ID (uuid) of the network port that the floating IP is associated with.
    projectId number
    The uuid of the project. Either 'projectid' or 'projectname' must be specified.
    projectName string
    The name of the project. Either 'projectid' or 'projectname' must be specified.
    regionId number
    The uuid of the region. Either 'regionid' or 'regionname' must be specified.
    regionName string
    The name of the region. Either 'regionid' or 'regionname' must be specified.
    floating_ip_address str
    The floating IP address assigned to the resource. It must be a valid IP address.
    id str
    floating IP uuid
    metadata_k str
    Filtration query opts (only key).
    metadata_kv Mapping[str, str]
    Filtration query opts, for example, {offset = "10", limit = "10"}.
    port_id str
    The ID (uuid) of the network port that the floating IP is associated with.
    project_id float
    The uuid of the project. Either 'projectid' or 'projectname' must be specified.
    project_name str
    The name of the project. Either 'projectid' or 'projectname' must be specified.
    region_id float
    The uuid of the region. Either 'regionid' or 'regionname' must be specified.
    region_name str
    The name of the region. Either 'regionid' or 'regionname' must be specified.
    floatingIpAddress String
    The floating IP address assigned to the resource. It must be a valid IP address.
    id String
    floating IP uuid
    metadataK String
    Filtration query opts (only key).
    metadataKv Map<String>
    Filtration query opts, for example, {offset = "10", limit = "10"}.
    portId String
    The ID (uuid) of the network port that the floating IP is associated with.
    projectId Number
    The uuid of the project. Either 'projectid' or 'projectname' must be specified.
    projectName String
    The name of the project. Either 'projectid' or 'projectname' must be specified.
    regionId Number
    The uuid of the region. Either 'regionid' or 'regionname' must be specified.
    regionName String
    The name of the region. Either 'regionid' or 'regionname' must be specified.

    getFloatingip Result

    The following output properties are available:

    FixedIpAddress string
    The fixed (reserved) IP address that is associated with the floating IP.
    InstanceIdAttachedTo string
    The ID (uuid) of the instance, that the floating IP is associated with.
    LoadBalancersIdAttachedTo string
    The ID (uuid) of the loadbalancer, that the floating IP associated with
    MetadataReadOnlies List<GetFloatingipMetadataReadOnly>
    A list of read-only metadata items, e.g. tags.
    RouterId string
    The ID (uuid) of the router that the floating IP is associated with.
    Status string
    The current status of the floating IP resource. Can be 'DOWN' or 'ACTIVE'.
    FloatingIpAddress string
    The floating IP address assigned to the resource. It must be a valid IP address.
    Id string
    floating IP uuid
    MetadataK string
    Filtration query opts (only key).
    MetadataKv Dictionary<string, string>
    Filtration query opts, for example, {offset = "10", limit = "10"}.
    PortId string
    The ID (uuid) of the network port that the floating IP is associated with.
    ProjectId double
    The uuid of the project. Either 'projectid' or 'projectname' must be specified.
    ProjectName string
    The name of the project. Either 'projectid' or 'projectname' must be specified.
    RegionId double
    The uuid of the region. Either 'regionid' or 'regionname' must be specified.
    RegionName string
    The name of the region. Either 'regionid' or 'regionname' must be specified.
    FixedIpAddress string
    The fixed (reserved) IP address that is associated with the floating IP.
    InstanceIdAttachedTo string
    The ID (uuid) of the instance, that the floating IP is associated with.
    LoadBalancersIdAttachedTo string
    The ID (uuid) of the loadbalancer, that the floating IP associated with
    MetadataReadOnlies []GetFloatingipMetadataReadOnly
    A list of read-only metadata items, e.g. tags.
    RouterId string
    The ID (uuid) of the router that the floating IP is associated with.
    Status string
    The current status of the floating IP resource. Can be 'DOWN' or 'ACTIVE'.
    FloatingIpAddress string
    The floating IP address assigned to the resource. It must be a valid IP address.
    Id string
    floating IP uuid
    MetadataK string
    Filtration query opts (only key).
    MetadataKv map[string]string
    Filtration query opts, for example, {offset = "10", limit = "10"}.
    PortId string
    The ID (uuid) of the network port that the floating IP is associated with.
    ProjectId float64
    The uuid of the project. Either 'projectid' or 'projectname' must be specified.
    ProjectName string
    The name of the project. Either 'projectid' or 'projectname' must be specified.
    RegionId float64
    The uuid of the region. Either 'regionid' or 'regionname' must be specified.
    RegionName string
    The name of the region. Either 'regionid' or 'regionname' must be specified.
    fixedIpAddress String
    The fixed (reserved) IP address that is associated with the floating IP.
    instanceIdAttachedTo String
    The ID (uuid) of the instance, that the floating IP is associated with.
    loadBalancersIdAttachedTo String
    The ID (uuid) of the loadbalancer, that the floating IP associated with
    metadataReadOnlies List<GetFloatingipMetadataReadOnly>
    A list of read-only metadata items, e.g. tags.
    routerId String
    The ID (uuid) of the router that the floating IP is associated with.
    status String
    The current status of the floating IP resource. Can be 'DOWN' or 'ACTIVE'.
    floatingIpAddress String
    The floating IP address assigned to the resource. It must be a valid IP address.
    id String
    floating IP uuid
    metadataK String
    Filtration query opts (only key).
    metadataKv Map<String,String>
    Filtration query opts, for example, {offset = "10", limit = "10"}.
    portId String
    The ID (uuid) of the network port that the floating IP is associated with.
    projectId Double
    The uuid of the project. Either 'projectid' or 'projectname' must be specified.
    projectName String
    The name of the project. Either 'projectid' or 'projectname' must be specified.
    regionId Double
    The uuid of the region. Either 'regionid' or 'regionname' must be specified.
    regionName String
    The name of the region. Either 'regionid' or 'regionname' must be specified.
    fixedIpAddress string
    The fixed (reserved) IP address that is associated with the floating IP.
    instanceIdAttachedTo string
    The ID (uuid) of the instance, that the floating IP is associated with.
    loadBalancersIdAttachedTo string
    The ID (uuid) of the loadbalancer, that the floating IP associated with
    metadataReadOnlies GetFloatingipMetadataReadOnly[]
    A list of read-only metadata items, e.g. tags.
    routerId string
    The ID (uuid) of the router that the floating IP is associated with.
    status string
    The current status of the floating IP resource. Can be 'DOWN' or 'ACTIVE'.
    floatingIpAddress string
    The floating IP address assigned to the resource. It must be a valid IP address.
    id string
    floating IP uuid
    metadataK string
    Filtration query opts (only key).
    metadataKv {[key: string]: string}
    Filtration query opts, for example, {offset = "10", limit = "10"}.
    portId string
    The ID (uuid) of the network port that the floating IP is associated with.
    projectId number
    The uuid of the project. Either 'projectid' or 'projectname' must be specified.
    projectName string
    The name of the project. Either 'projectid' or 'projectname' must be specified.
    regionId number
    The uuid of the region. Either 'regionid' or 'regionname' must be specified.
    regionName string
    The name of the region. Either 'regionid' or 'regionname' must be specified.
    fixed_ip_address str
    The fixed (reserved) IP address that is associated with the floating IP.
    instance_id_attached_to str
    The ID (uuid) of the instance, that the floating IP is associated with.
    load_balancers_id_attached_to str
    The ID (uuid) of the loadbalancer, that the floating IP associated with
    metadata_read_onlies Sequence[GetFloatingipMetadataReadOnly]
    A list of read-only metadata items, e.g. tags.
    router_id str
    The ID (uuid) of the router that the floating IP is associated with.
    status str
    The current status of the floating IP resource. Can be 'DOWN' or 'ACTIVE'.
    floating_ip_address str
    The floating IP address assigned to the resource. It must be a valid IP address.
    id str
    floating IP uuid
    metadata_k str
    Filtration query opts (only key).
    metadata_kv Mapping[str, str]
    Filtration query opts, for example, {offset = "10", limit = "10"}.
    port_id str
    The ID (uuid) of the network port that the floating IP is associated with.
    project_id float
    The uuid of the project. Either 'projectid' or 'projectname' must be specified.
    project_name str
    The name of the project. Either 'projectid' or 'projectname' must be specified.
    region_id float
    The uuid of the region. Either 'regionid' or 'regionname' must be specified.
    region_name str
    The name of the region. Either 'regionid' or 'regionname' must be specified.
    fixedIpAddress String
    The fixed (reserved) IP address that is associated with the floating IP.
    instanceIdAttachedTo String
    The ID (uuid) of the instance, that the floating IP is associated with.
    loadBalancersIdAttachedTo String
    The ID (uuid) of the loadbalancer, that the floating IP associated with
    metadataReadOnlies List<Property Map>
    A list of read-only metadata items, e.g. tags.
    routerId String
    The ID (uuid) of the router that the floating IP is associated with.
    status String
    The current status of the floating IP resource. Can be 'DOWN' or 'ACTIVE'.
    floatingIpAddress String
    The floating IP address assigned to the resource. It must be a valid IP address.
    id String
    floating IP uuid
    metadataK String
    Filtration query opts (only key).
    metadataKv Map<String>
    Filtration query opts, for example, {offset = "10", limit = "10"}.
    portId String
    The ID (uuid) of the network port that the floating IP is associated with.
    projectId Number
    The uuid of the project. Either 'projectid' or 'projectname' must be specified.
    projectName String
    The name of the project. Either 'projectid' or 'projectname' must be specified.
    regionId Number
    The uuid of the region. Either 'regionid' or 'regionname' must be specified.
    regionName String
    The name of the region. Either 'regionid' or 'regionname' must be specified.

    Supporting Types

    GetFloatingipMetadataReadOnly

    Key string
    ReadOnly bool
    Value string
    Key string
    ReadOnly bool
    Value string
    key String
    readOnly Boolean
    value String
    key string
    readOnly boolean
    value string
    key str
    read_only bool
    value str
    key String
    readOnly Boolean
    value String

    Package Details

    Repository
    edgecenter edge-center/terraform-provider-edgecenter
    License
    Notes
    This Pulumi package is based on the edgecenter Terraform Provider.
    edgecenter logo
    edgecenter 0.8.0 published on Wednesday, Apr 30, 2025 by edge-center