1. Packages
  2. Packages
  3. OVH
  4. API Docs
  5. getCloudGateway
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 retrieve information about a gateway in a public cloud project.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ovh from "@ovhcloud/pulumi-ovh";
    
    const gateway = ovh.getCloudGateway({
        serviceName: "<public cloud project ID>",
        id: "<gateway ID>",
    });
    export const gatewayName = gateway.then(gateway => gateway.name);
    
    import pulumi
    import pulumi_ovh as ovh
    
    gateway = ovh.get_cloud_gateway(service_name="<public cloud project ID>",
        id="<gateway ID>")
    pulumi.export("gatewayName", gateway.name)
    
    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 {
    		gateway, err := ovh.LookupCloudGateway(ctx, &ovh.LookupCloudGatewayArgs{
    			ServiceName: "<public cloud project ID>",
    			Id:          "<gateway ID>",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("gatewayName", gateway.Name)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ovh = Pulumi.Ovh;
    
    return await Deployment.RunAsync(() => 
    {
        var gateway = Ovh.GetCloudGateway.Invoke(new()
        {
            ServiceName = "<public cloud project ID>",
            Id = "<gateway ID>",
        });
    
        return new Dictionary<string, object?>
        {
            ["gatewayName"] = gateway.Apply(getCloudGatewayResult => getCloudGatewayResult.Name),
        };
    });
    
    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.GetCloudGatewayArgs;
    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 gateway = OvhFunctions.getCloudGateway(GetCloudGatewayArgs.builder()
                .serviceName("<public cloud project ID>")
                .id("<gateway ID>")
                .build());
    
            ctx.export("gatewayName", gateway.name());
        }
    }
    
    variables:
      gateway:
        fn::invoke:
          function: ovh:getCloudGateway
          arguments:
            serviceName: <public cloud project ID>
            id: <gateway ID>
    outputs:
      gatewayName: ${gateway.name}
    
    Example coming soon!
    

    Using getCloudGateway

    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 getCloudGateway(args: GetCloudGatewayArgs, opts?: InvokeOptions): Promise<GetCloudGatewayResult>
    function getCloudGatewayOutput(args: GetCloudGatewayOutputArgs, opts?: InvokeOptions): Output<GetCloudGatewayResult>
    def get_cloud_gateway(id: Optional[str] = None,
                          service_name: Optional[str] = None,
                          opts: Optional[InvokeOptions] = None) -> GetCloudGatewayResult
    def get_cloud_gateway_output(id: pulumi.Input[Optional[str]] = None,
                          service_name: pulumi.Input[Optional[str]] = None,
                          opts: Optional[InvokeOptions] = None) -> Output[GetCloudGatewayResult]
    func LookupCloudGateway(ctx *Context, args *LookupCloudGatewayArgs, opts ...InvokeOption) (*LookupCloudGatewayResult, error)
    func LookupCloudGatewayOutput(ctx *Context, args *LookupCloudGatewayOutputArgs, opts ...InvokeOption) LookupCloudGatewayResultOutput

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

    public static class GetCloudGateway 
    {
        public static Task<GetCloudGatewayResult> InvokeAsync(GetCloudGatewayArgs args, InvokeOptions? opts = null)
        public static Output<GetCloudGatewayResult> Invoke(GetCloudGatewayInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetCloudGatewayResult> getCloudGateway(GetCloudGatewayArgs args, InvokeOptions options)
    public static Output<GetCloudGatewayResult> getCloudGateway(GetCloudGatewayArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ovh:index/getCloudGateway:getCloudGateway
      arguments:
        # arguments dictionary
    data "ovh_get_cloud_gateway" "name" {
        # arguments
    }

    The following arguments are supported:

    Id string
    Gateway ID.
    ServiceName string
    Service name of the resource representing the id of the cloud project.
    Id string
    Gateway ID.
    ServiceName string
    Service name of the resource representing the id of the cloud project.
    id string
    Gateway ID.
    service_name string
    Service name of the resource representing the id of the cloud project.
    id String
    Gateway ID.
    serviceName String
    Service name of the resource representing the id of the cloud project.
    id string
    Gateway ID.
    serviceName string
    Service name of the resource representing the id of the cloud project.
    id str
    Gateway ID.
    service_name str
    Service name of the resource representing the id of the cloud project.
    id String
    Gateway ID.
    serviceName String
    Service name of the resource representing the id of the cloud project.

    getCloudGateway Result

    The following output properties are available:

    Checksum string
    Computed hash representing the current target specification value.
    CreatedAt string
    Creation date of the gateway.
    CurrentState GetCloudGatewayCurrentState
    Current state of the gateway:
    Description string
    Gateway description.
    ExternalGateway GetCloudGatewayExternalGateway
    External gateway configuration:
    Id string
    Subnet ID.
    Location GetCloudGatewayLocation
    Location details:
    Name string
    Gateway name.
    ResourceStatus string
    Gateway readiness in the system (CREATING, DELETING, ERROR, OUT_OF_SYNC, READY, UPDATING).
    ServiceName string
    SubnetIds List<string>
    List of subnet IDs attached as router interfaces.
    UpdatedAt string
    Last update date of the gateway.
    Checksum string
    Computed hash representing the current target specification value.
    CreatedAt string
    Creation date of the gateway.
    CurrentState GetCloudGatewayCurrentState
    Current state of the gateway:
    Description string
    Gateway description.
    ExternalGateway GetCloudGatewayExternalGateway
    External gateway configuration:
    Id string
    Subnet ID.
    Location GetCloudGatewayLocation
    Location details:
    Name string
    Gateway name.
    ResourceStatus string
    Gateway readiness in the system (CREATING, DELETING, ERROR, OUT_OF_SYNC, READY, UPDATING).
    ServiceName string
    SubnetIds []string
    List of subnet IDs attached as router interfaces.
    UpdatedAt string
    Last update date of the gateway.
    checksum string
    Computed hash representing the current target specification value.
    created_at string
    Creation date of the gateway.
    current_state object
    Current state of the gateway:
    description string
    Gateway description.
    external_gateway object
    External gateway configuration:
    id string
    Subnet ID.
    location object
    Location details:
    name string
    Gateway name.
    resource_status string
    Gateway readiness in the system (CREATING, DELETING, ERROR, OUT_OF_SYNC, READY, UPDATING).
    service_name string
    subnet_ids list(string)
    List of subnet IDs attached as router interfaces.
    updated_at string
    Last update date of the gateway.
    checksum String
    Computed hash representing the current target specification value.
    createdAt String
    Creation date of the gateway.
    currentState GetCloudGatewayCurrentState
    Current state of the gateway:
    description String
    Gateway description.
    externalGateway GetCloudGatewayExternalGateway
    External gateway configuration:
    id String
    Subnet ID.
    location GetCloudGatewayLocation
    Location details:
    name String
    Gateway name.
    resourceStatus String
    Gateway readiness in the system (CREATING, DELETING, ERROR, OUT_OF_SYNC, READY, UPDATING).
    serviceName String
    subnetIds List<String>
    List of subnet IDs attached as router interfaces.
    updatedAt String
    Last update date of the gateway.
    checksum string
    Computed hash representing the current target specification value.
    createdAt string
    Creation date of the gateway.
    currentState GetCloudGatewayCurrentState
    Current state of the gateway:
    description string
    Gateway description.
    externalGateway GetCloudGatewayExternalGateway
    External gateway configuration:
    id string
    Subnet ID.
    location GetCloudGatewayLocation
    Location details:
    name string
    Gateway name.
    resourceStatus string
    Gateway readiness in the system (CREATING, DELETING, ERROR, OUT_OF_SYNC, READY, UPDATING).
    serviceName string
    subnetIds string[]
    List of subnet IDs attached as router interfaces.
    updatedAt string
    Last update date of the gateway.
    checksum str
    Computed hash representing the current target specification value.
    created_at str
    Creation date of the gateway.
    current_state GetCloudGatewayCurrentState
    Current state of the gateway:
    description str
    Gateway description.
    external_gateway GetCloudGatewayExternalGateway
    External gateway configuration:
    id str
    Subnet ID.
    location GetCloudGatewayLocation
    Location details:
    name str
    Gateway name.
    resource_status str
    Gateway readiness in the system (CREATING, DELETING, ERROR, OUT_OF_SYNC, READY, UPDATING).
    service_name str
    subnet_ids Sequence[str]
    List of subnet IDs attached as router interfaces.
    updated_at str
    Last update date of the gateway.
    checksum String
    Computed hash representing the current target specification value.
    createdAt String
    Creation date of the gateway.
    currentState Property Map
    Current state of the gateway:
    description String
    Gateway description.
    externalGateway Property Map
    External gateway configuration:
    id String
    Subnet ID.
    location Property Map
    Location details:
    name String
    Gateway name.
    resourceStatus String
    Gateway readiness in the system (CREATING, DELETING, ERROR, OUT_OF_SYNC, READY, UPDATING).
    serviceName String
    subnetIds List<String>
    List of subnet IDs attached as router interfaces.
    updatedAt String
    Last update date of the gateway.

    Supporting Types

    GetCloudGatewayCurrentState

    Description string
    Gateway description.
    ExternalGateway GetCloudGatewayCurrentStateExternalGateway
    External gateway configuration:
    ExternalIp string
    External IP address assigned to the gateway.
    Location GetCloudGatewayCurrentStateLocation
    Location details:
    Name string
    Gateway name.
    Status string
    OpenStack router status (ACTIVE, BUILD, DOWN, ERROR).
    Subnets List<GetCloudGatewayCurrentStateSubnet>
    Currently attached subnets:
    Description string
    Gateway description.
    ExternalGateway GetCloudGatewayCurrentStateExternalGateway
    External gateway configuration:
    ExternalIp string
    External IP address assigned to the gateway.
    Location GetCloudGatewayCurrentStateLocation
    Location details:
    Name string
    Gateway name.
    Status string
    OpenStack router status (ACTIVE, BUILD, DOWN, ERROR).
    Subnets []GetCloudGatewayCurrentStateSubnet
    Currently attached subnets:
    description string
    Gateway description.
    external_gateway object
    External gateway configuration:
    external_ip string
    External IP address assigned to the gateway.
    location object
    Location details:
    name string
    Gateway name.
    status string
    OpenStack router status (ACTIVE, BUILD, DOWN, ERROR).
    subnets list(object)
    Currently attached subnets:
    description String
    Gateway description.
    externalGateway GetCloudGatewayCurrentStateExternalGateway
    External gateway configuration:
    externalIp String
    External IP address assigned to the gateway.
    location GetCloudGatewayCurrentStateLocation
    Location details:
    name String
    Gateway name.
    status String
    OpenStack router status (ACTIVE, BUILD, DOWN, ERROR).
    subnets List<GetCloudGatewayCurrentStateSubnet>
    Currently attached subnets:
    description string
    Gateway description.
    externalGateway GetCloudGatewayCurrentStateExternalGateway
    External gateway configuration:
    externalIp string
    External IP address assigned to the gateway.
    location GetCloudGatewayCurrentStateLocation
    Location details:
    name string
    Gateway name.
    status string
    OpenStack router status (ACTIVE, BUILD, DOWN, ERROR).
    subnets GetCloudGatewayCurrentStateSubnet[]
    Currently attached subnets:
    description str
    Gateway description.
    external_gateway GetCloudGatewayCurrentStateExternalGateway
    External gateway configuration:
    external_ip str
    External IP address assigned to the gateway.
    location GetCloudGatewayCurrentStateLocation
    Location details:
    name str
    Gateway name.
    status str
    OpenStack router status (ACTIVE, BUILD, DOWN, ERROR).
    subnets Sequence[GetCloudGatewayCurrentStateSubnet]
    Currently attached subnets:
    description String
    Gateway description.
    externalGateway Property Map
    External gateway configuration:
    externalIp String
    External IP address assigned to the gateway.
    location Property Map
    Location details:
    name String
    Gateway name.
    status String
    OpenStack router status (ACTIVE, BUILD, DOWN, ERROR).
    subnets List<Property Map>
    Currently attached subnets:

    GetCloudGatewayCurrentStateExternalGateway

    Enabled bool
    Whether the external gateway is enabled.
    Model string
    External gateway sizing model.
    Enabled bool
    Whether the external gateway is enabled.
    Model string
    External gateway sizing model.
    enabled bool
    Whether the external gateway is enabled.
    model string
    External gateway sizing model.
    enabled Boolean
    Whether the external gateway is enabled.
    model String
    External gateway sizing model.
    enabled boolean
    Whether the external gateway is enabled.
    model string
    External gateway sizing model.
    enabled bool
    Whether the external gateway is enabled.
    model str
    External gateway sizing model.
    enabled Boolean
    Whether the external gateway is enabled.
    model String
    External gateway sizing model.

    GetCloudGatewayCurrentStateLocation

    AvailabilityZone string
    Availability zone.
    Region string
    Region.
    AvailabilityZone string
    Availability zone.
    Region string
    Region.
    availability_zone string
    Availability zone.
    region string
    Region.
    availabilityZone String
    Availability zone.
    region String
    Region.
    availabilityZone string
    Availability zone.
    region string
    Region.
    availability_zone str
    Availability zone.
    region str
    Region.
    availabilityZone String
    Availability zone.
    region String
    Region.

    GetCloudGatewayCurrentStateSubnet

    Id string
    Gateway ID.
    Id string
    Gateway ID.
    id string
    Gateway ID.
    id String
    Gateway ID.
    id string
    Gateway ID.
    id str
    Gateway ID.
    id String
    Gateway ID.

    GetCloudGatewayExternalGateway

    Enabled bool
    Whether the external gateway is enabled.
    Model string
    External gateway sizing model.
    Enabled bool
    Whether the external gateway is enabled.
    Model string
    External gateway sizing model.
    enabled bool
    Whether the external gateway is enabled.
    model string
    External gateway sizing model.
    enabled Boolean
    Whether the external gateway is enabled.
    model String
    External gateway sizing model.
    enabled boolean
    Whether the external gateway is enabled.
    model string
    External gateway sizing model.
    enabled bool
    Whether the external gateway is enabled.
    model str
    External gateway sizing model.
    enabled Boolean
    Whether the external gateway is enabled.
    model String
    External gateway sizing model.

    GetCloudGatewayLocation

    AvailabilityZone string
    Availability zone.
    Region string
    Region.
    AvailabilityZone string
    Availability zone.
    Region string
    Region.
    availability_zone string
    Availability zone.
    region string
    Region.
    availabilityZone String
    Availability zone.
    region String
    Region.
    availabilityZone string
    Availability zone.
    region string
    Region.
    availability_zone str
    Availability zone.
    region str
    Region.
    availabilityZone String
    Availability zone.
    region String
    Region.

    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