1. Packages
  2. Packages
  3. OVH
  4. API Docs
  5. getCloudPublicIps
Viewing docs for OVHCloud v2.17.0
published on Friday, Jul 17, 2026 by OVHcloud
ovh logo
Viewing docs for OVHCloud v2.17.0
published on Friday, Jul 17, 2026 by OVHcloud

    Use this data source to list all public IPs (additional, external network and floating IPs) of a public cloud project.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ovh from "@ovhcloud/pulumi-ovh";
    
    const all = ovh.getCloudPublicIps({
        serviceName: "<public cloud project ID>",
    });
    export const publicIps = all.then(all => all.publicIps);
    
    import pulumi
    import pulumi_ovh as ovh
    
    all = ovh.get_cloud_public_ips(service_name="<public cloud project ID>")
    pulumi.export("publicIps", all.public_ips)
    
    package main
    
    import (
    	"github.com/ovh/pulumi-ovh/sdk/v2/go/ovh"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		all, err := ovh.GetCloudPublicIps(ctx, &ovh.GetCloudPublicIpsArgs{
    			ServiceName: pulumi.StringRef("<public cloud project ID>"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("publicIps", all.PublicIps)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ovh = Pulumi.Ovh;
    
    return await Deployment.RunAsync(() => 
    {
        var all = Ovh.GetCloudPublicIps.Invoke(new()
        {
            ServiceName = "<public cloud project ID>",
        });
    
        return new Dictionary<string, object?>
        {
            ["publicIps"] = all.Apply(getCloudPublicIpsResult => getCloudPublicIpsResult.PublicIps),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ovh.OvhFunctions;
    import com.pulumi.ovh.inputs.GetCloudPublicIpsArgs;
    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 all = OvhFunctions.getCloudPublicIps(GetCloudPublicIpsArgs.builder()
                .serviceName("<public cloud project ID>")
                .build());
    
            ctx.export("publicIps", all.publicIps());
        }
    }
    
    variables:
      all:
        fn::invoke:
          function: ovh:getCloudPublicIps
          arguments:
            serviceName: <public cloud project ID>
    outputs:
      publicIps: ${all.publicIps}
    
    Example coming soon!
    

    Using getCloudPublicIps

    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 getCloudPublicIps(args: GetCloudPublicIpsArgs, opts?: InvokeOptions): Promise<GetCloudPublicIpsResult>
    function getCloudPublicIpsOutput(args: GetCloudPublicIpsOutputArgs, opts?: InvokeOptions): Output<GetCloudPublicIpsResult>
    def get_cloud_public_ips(service_name: Optional[str] = None,
                             opts: Optional[InvokeOptions] = None) -> GetCloudPublicIpsResult
    def get_cloud_public_ips_output(service_name: pulumi.Input[Optional[str]] = None,
                             opts: Optional[InvokeOptions] = None) -> Output[GetCloudPublicIpsResult]
    func GetCloudPublicIps(ctx *Context, args *GetCloudPublicIpsArgs, opts ...InvokeOption) (*GetCloudPublicIpsResult, error)
    func GetCloudPublicIpsOutput(ctx *Context, args *GetCloudPublicIpsOutputArgs, opts ...InvokeOption) GetCloudPublicIpsResultOutput

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

    public static class GetCloudPublicIps 
    {
        public static Task<GetCloudPublicIpsResult> InvokeAsync(GetCloudPublicIpsArgs args, InvokeOptions? opts = null)
        public static Output<GetCloudPublicIpsResult> Invoke(GetCloudPublicIpsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetCloudPublicIpsResult> getCloudPublicIps(GetCloudPublicIpsArgs args, InvokeOptions options)
    public static Output<GetCloudPublicIpsResult> getCloudPublicIps(GetCloudPublicIpsArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ovh:index/getCloudPublicIps:getCloudPublicIps
      arguments:
        # arguments dictionary
    data "ovh_get_cloud_public_ips" "name" {
        # arguments
    }

    The following arguments are supported:

    ServiceName string
    Service name of the resource representing the id of the cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    ServiceName string
    Service name of the resource representing the id of the cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    service_name string
    Service name of the resource representing the id of the cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    serviceName String
    Service name of the resource representing the id of the cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    serviceName string
    Service name of the resource representing the id of the cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    service_name str
    Service name of the resource representing the id of the cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    serviceName String
    Service name of the resource representing the id of the cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.

    getCloudPublicIps Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    PublicIps List<GetCloudPublicIpsPublicIp>
    List of public IPs of the project. Each element exports:
    ServiceName string
    Id string
    The provider-assigned unique ID for this managed resource.
    PublicIps []GetCloudPublicIpsPublicIp
    List of public IPs of the project. Each element exports:
    ServiceName string
    id string
    The provider-assigned unique ID for this managed resource.
    public_ips list(object)
    List of public IPs of the project. Each element exports:
    service_name string
    id String
    The provider-assigned unique ID for this managed resource.
    publicIps List<GetCloudPublicIpsPublicIp>
    List of public IPs of the project. Each element exports:
    serviceName String
    id string
    The provider-assigned unique ID for this managed resource.
    publicIps GetCloudPublicIpsPublicIp[]
    List of public IPs of the project. Each element exports:
    serviceName string
    id str
    The provider-assigned unique ID for this managed resource.
    public_ips Sequence[GetCloudPublicIpsPublicIp]
    List of public IPs of the project. Each element exports:
    service_name str
    id String
    The provider-assigned unique ID for this managed resource.
    publicIps List<Property Map>
    List of public IPs of the project. Each element exports:
    serviceName String

    Supporting Types

    GetCloudPublicIpsPublicIp

    Ip string
    Public IP address.
    Type string
    Type of the public IP (ADDITIONAL_IP, EXT_NET_IP, FLOATING_IP).
    Ip string
    Public IP address.
    Type string
    Type of the public IP (ADDITIONAL_IP, EXT_NET_IP, FLOATING_IP).
    ip string
    Public IP address.
    type string
    Type of the public IP (ADDITIONAL_IP, EXT_NET_IP, FLOATING_IP).
    ip String
    Public IP address.
    type String
    Type of the public IP (ADDITIONAL_IP, EXT_NET_IP, FLOATING_IP).
    ip string
    Public IP address.
    type string
    Type of the public IP (ADDITIONAL_IP, EXT_NET_IP, FLOATING_IP).
    ip str
    Public IP address.
    type str
    Type of the public IP (ADDITIONAL_IP, EXT_NET_IP, FLOATING_IP).
    ip String
    Public IP address.
    type String
    Type of the public IP (ADDITIONAL_IP, EXT_NET_IP, FLOATING_IP).

    Package Details

    Repository
    ovh ovh/pulumi-ovh
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the ovh Terraform Provider.
    ovh logo
    Viewing docs for OVHCloud v2.17.0
    published on Friday, Jul 17, 2026 by OVHcloud

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial