1. Packages
  2. Packages
  3. OVH
  4. API Docs
  5. getCloudRegions
Viewing docs for OVHCloud v2.15.0
published on Monday, Jun 29, 2026 by OVHcloud
ovh logo
Viewing docs for OVHCloud v2.15.0
published on Monday, Jun 29, 2026 by OVHcloud

    Use this data source to list the regions available for a public cloud project, using the OVHcloud API v2. All pages are fetched, so the full list of regions is returned.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ovh from "@ovhcloud/pulumi-ovh";
    
    export = async () => {
        const regions = await ovh.getCloudRegions({
            serviceName: "<public cloud project ID>",
        });
        return {
            regions: regions.regions,
        };
    }
    
    import pulumi
    import pulumi_ovh as ovh
    
    regions = ovh.get_cloud_regions(service_name="<public cloud project ID>")
    pulumi.export("regions", regions.regions)
    
    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 {
    		regions, err := ovh.GetCloudRegions(ctx, &ovh.GetCloudRegionsArgs{
    			ServiceName: "<public cloud project ID>",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("regions", regions.Regions)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ovh = Pulumi.Ovh;
    
    return await Deployment.RunAsync(() => 
    {
        var regions = Ovh.GetCloudRegions.Invoke(new()
        {
            ServiceName = "<public cloud project ID>",
        });
    
        return new Dictionary<string, object?>
        {
            ["regions"] = regions.Apply(getCloudRegionsResult => getCloudRegionsResult.Regions),
        };
    });
    
    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.GetCloudRegionsArgs;
    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 regions = OvhFunctions.getCloudRegions(GetCloudRegionsArgs.builder()
                .serviceName("<public cloud project ID>")
                .build());
    
            ctx.export("regions", regions.regions());
        }
    }
    
    variables:
      regions:
        fn::invoke:
          function: ovh:getCloudRegions
          arguments:
            serviceName: <public cloud project ID>
    outputs:
      regions: ${regions.regions}
    
    Example coming soon!
    

    Using getCloudRegions

    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 getCloudRegions(args: GetCloudRegionsArgs, opts?: InvokeOptions): Promise<GetCloudRegionsResult>
    function getCloudRegionsOutput(args: GetCloudRegionsOutputArgs, opts?: InvokeOptions): Output<GetCloudRegionsResult>
    def get_cloud_regions(service_name: Optional[str] = None,
                          opts: Optional[InvokeOptions] = None) -> GetCloudRegionsResult
    def get_cloud_regions_output(service_name: pulumi.Input[Optional[str]] = None,
                          opts: Optional[InvokeOptions] = None) -> Output[GetCloudRegionsResult]
    func GetCloudRegions(ctx *Context, args *GetCloudRegionsArgs, opts ...InvokeOption) (*GetCloudRegionsResult, error)
    func GetCloudRegionsOutput(ctx *Context, args *GetCloudRegionsOutputArgs, opts ...InvokeOption) GetCloudRegionsResultOutput

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

    public static class GetCloudRegions 
    {
        public static Task<GetCloudRegionsResult> InvokeAsync(GetCloudRegionsArgs args, InvokeOptions? opts = null)
        public static Output<GetCloudRegionsResult> Invoke(GetCloudRegionsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetCloudRegionsResult> getCloudRegions(GetCloudRegionsArgs args, InvokeOptions options)
    public static Output<GetCloudRegionsResult> getCloudRegions(GetCloudRegionsArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ovh:index/getCloudRegions:getCloudRegions
      arguments:
        # arguments dictionary
    data "ovh_getcloudregions" "name" {
        # arguments
    }

    The following arguments are supported:

    ServiceName string
    The id of the public cloud project.
    ServiceName string
    The id of the public cloud project.
    service_name string
    The id of the public cloud project.
    serviceName String
    The id of the public cloud project.
    serviceName string
    The id of the public cloud project.
    service_name str
    The id of the public cloud project.
    serviceName String
    The id of the public cloud project.

    getCloudRegions Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Regions List<GetCloudRegionsRegion>
    The list of regions available for the project. Each region exports:
    ServiceName string
    Id string
    The provider-assigned unique ID for this managed resource.
    Regions []GetCloudRegionsRegion
    The list of regions available for the project. Each region exports:
    ServiceName string
    id string
    The provider-assigned unique ID for this managed resource.
    regions list(object)
    The list of regions available for the project. Each region exports:
    service_name string
    id String
    The provider-assigned unique ID for this managed resource.
    regions List<GetCloudRegionsRegion>
    The list of regions available for the project. Each region exports:
    serviceName String
    id string
    The provider-assigned unique ID for this managed resource.
    regions GetCloudRegionsRegion[]
    The list of regions available for the project. Each region exports:
    serviceName string
    id str
    The provider-assigned unique ID for this managed resource.
    regions Sequence[GetCloudRegionsRegion]
    The list of regions available for the project. Each region exports:
    service_name str
    id String
    The provider-assigned unique ID for this managed resource.
    regions List<Property Map>
    The list of regions available for the project. Each region exports:
    serviceName String

    Supporting Types

    GetCloudRegionsRegion

    AvailabilityZones List<string>
    Availability zones available in the region.
    Continent string
    Continent code of the region.
    Country string
    Country code of the region.
    DatacenterName string
    Display name of the datacenter hosting the region.
    Name string
    Name of the region (e.g. GRA11).
    Services List<string>
    Available OpenStack services in the region.
    Status string
    Region status (ENABLED, DISABLED or MAINTENANCE).
    AvailabilityZones []string
    Availability zones available in the region.
    Continent string
    Continent code of the region.
    Country string
    Country code of the region.
    DatacenterName string
    Display name of the datacenter hosting the region.
    Name string
    Name of the region (e.g. GRA11).
    Services []string
    Available OpenStack services in the region.
    Status string
    Region status (ENABLED, DISABLED or MAINTENANCE).
    availability_zones list(string)
    Availability zones available in the region.
    continent string
    Continent code of the region.
    country string
    Country code of the region.
    datacenter_name string
    Display name of the datacenter hosting the region.
    name string
    Name of the region (e.g. GRA11).
    services list(string)
    Available OpenStack services in the region.
    status string
    Region status (ENABLED, DISABLED or MAINTENANCE).
    availabilityZones List<String>
    Availability zones available in the region.
    continent String
    Continent code of the region.
    country String
    Country code of the region.
    datacenterName String
    Display name of the datacenter hosting the region.
    name String
    Name of the region (e.g. GRA11).
    services List<String>
    Available OpenStack services in the region.
    status String
    Region status (ENABLED, DISABLED or MAINTENANCE).
    availabilityZones string[]
    Availability zones available in the region.
    continent string
    Continent code of the region.
    country string
    Country code of the region.
    datacenterName string
    Display name of the datacenter hosting the region.
    name string
    Name of the region (e.g. GRA11).
    services string[]
    Available OpenStack services in the region.
    status string
    Region status (ENABLED, DISABLED or MAINTENANCE).
    availability_zones Sequence[str]
    Availability zones available in the region.
    continent str
    Continent code of the region.
    country str
    Country code of the region.
    datacenter_name str
    Display name of the datacenter hosting the region.
    name str
    Name of the region (e.g. GRA11).
    services Sequence[str]
    Available OpenStack services in the region.
    status str
    Region status (ENABLED, DISABLED or MAINTENANCE).
    availabilityZones List<String>
    Availability zones available in the region.
    continent String
    Continent code of the region.
    country String
    Country code of the region.
    datacenterName String
    Display name of the datacenter hosting the region.
    name String
    Name of the region (e.g. GRA11).
    services List<String>
    Available OpenStack services in the region.
    status String
    Region status (ENABLED, DISABLED or MAINTENANCE).

    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.15.0
    published on Monday, Jun 29, 2026 by OVHcloud

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial