1. Packages
  2. Packages
  3. Ionoscloud
  4. API Docs
  5. dbaas
  6. getPSQLClusterV2
Viewing docs for IonosCloud v0.3.1
published on Wednesday, Jun 10, 2026 by ionos-cloud
ionoscloud logo
Viewing docs for IonosCloud v0.3.1
published on Wednesday, Jun 10, 2026 by ionos-cloud

    The DBaaS PostgreSQL v2 Cluster data source can be used to search for and return an existing DBaaS PostgreSQL v2 Cluster. If a single match is found, it will be returned. If your search results in multiple matches, an error will be returned. When this happens, please refine your search string so that it is specific enough to return only one result.

    Example Usage

    By ID

    import * as pulumi from "@pulumi/pulumi";
    import * as ionoscloud from "@ionos-cloud/sdk-pulumi";
    
    const example = ionoscloud.dbaas.getPSQLClusterV2({
        id: "cluster_id",
        location: "de/txl",
    });
    
    import pulumi
    import pulumi_ionoscloud as ionoscloud
    
    example = ionoscloud.dbaas.get_psql_cluster_v2(id="cluster_id",
        location="de/txl")
    
    package main
    
    import (
    	"github.com/ionos-cloud/pulumi-ionoscloud/sdk/go/ionoscloud/dbaas"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := dbaas.LookupPSQLClusterV2(ctx, &dbaas.LookupPSQLClusterV2Args{
    			Id:       pulumi.StringRef("cluster_id"),
    			Location: "de/txl",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ionoscloud = Ionoscloud.Pulumi.Ionoscloud;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Ionoscloud.Dbaas.GetPSQLClusterV2.Invoke(new()
        {
            Id = "cluster_id",
            Location = "de/txl",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ionoscloud.dbaas.DbaasFunctions;
    import com.pulumi.ionoscloud.dbaas.inputs.GetPSQLClusterV2Args;
    import java.util.ArrayList;
    import java.util.Arrays;
    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 example = DbaasFunctions.getPSQLClusterV2(GetPSQLClusterV2Args.builder()
                .id("cluster_id")
                .location("de/txl")
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: ionoscloud:dbaas:getPSQLClusterV2
          arguments:
            id: cluster_id
            location: de/txl
    
    pulumi {
      required_providers {
        ionoscloud = {
          source = "pulumi/ionoscloud"
        }
      }
    }
    
    data "ionoscloud_dbaas_getpsqlclusterv2" "example" {
      id       = "cluster_id"
      location = "de/txl"
    }
    

    By Name

    import * as pulumi from "@pulumi/pulumi";
    import * as ionoscloud from "@ionos-cloud/sdk-pulumi";
    
    const example = ionoscloud.dbaas.getPSQLClusterV2({
        name: "cluster_name",
        location: "de/txl",
    });
    
    import pulumi
    import pulumi_ionoscloud as ionoscloud
    
    example = ionoscloud.dbaas.get_psql_cluster_v2(name="cluster_name",
        location="de/txl")
    
    package main
    
    import (
    	"github.com/ionos-cloud/pulumi-ionoscloud/sdk/go/ionoscloud/dbaas"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := dbaas.LookupPSQLClusterV2(ctx, &dbaas.LookupPSQLClusterV2Args{
    			Name:     pulumi.StringRef("cluster_name"),
    			Location: "de/txl",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ionoscloud = Ionoscloud.Pulumi.Ionoscloud;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Ionoscloud.Dbaas.GetPSQLClusterV2.Invoke(new()
        {
            Name = "cluster_name",
            Location = "de/txl",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ionoscloud.dbaas.DbaasFunctions;
    import com.pulumi.ionoscloud.dbaas.inputs.GetPSQLClusterV2Args;
    import java.util.ArrayList;
    import java.util.Arrays;
    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 example = DbaasFunctions.getPSQLClusterV2(GetPSQLClusterV2Args.builder()
                .name("cluster_name")
                .location("de/txl")
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: ionoscloud:dbaas:getPSQLClusterV2
          arguments:
            name: cluster_name
            location: de/txl
    
    pulumi {
      required_providers {
        ionoscloud = {
          source = "pulumi/ionoscloud"
        }
      }
    }
    
    data "ionoscloud_dbaas_getpsqlclusterv2" "example" {
      name     = "cluster_name"
      location = "de/txl"
    }
    

    Using getPSQLClusterV2

    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 getPSQLClusterV2(args: GetPSQLClusterV2Args, opts?: InvokeOptions): Promise<GetPSQLClusterV2Result>
    function getPSQLClusterV2Output(args: GetPSQLClusterV2OutputArgs, opts?: InvokeOptions): Output<GetPSQLClusterV2Result>
    def get_psql_cluster_v2(id: Optional[str] = None,
                            location: Optional[str] = None,
                            name: Optional[str] = None,
                            opts: Optional[InvokeOptions] = None) -> GetPSQLClusterV2Result
    def get_psql_cluster_v2_output(id: pulumi.Input[Optional[str]] = None,
                            location: pulumi.Input[Optional[str]] = None,
                            name: pulumi.Input[Optional[str]] = None,
                            opts: Optional[InvokeOptions] = None) -> Output[GetPSQLClusterV2Result]
    func LookupPSQLClusterV2(ctx *Context, args *LookupPSQLClusterV2Args, opts ...InvokeOption) (*LookupPSQLClusterV2Result, error)
    func LookupPSQLClusterV2Output(ctx *Context, args *LookupPSQLClusterV2OutputArgs, opts ...InvokeOption) LookupPSQLClusterV2ResultOutput

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

    public static class GetPSQLClusterV2 
    {
        public static Task<GetPSQLClusterV2Result> InvokeAsync(GetPSQLClusterV2Args args, InvokeOptions? opts = null)
        public static Output<GetPSQLClusterV2Result> Invoke(GetPSQLClusterV2InvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetPSQLClusterV2Result> getPSQLClusterV2(GetPSQLClusterV2Args args, InvokeOptions options)
    public static Output<GetPSQLClusterV2Result> getPSQLClusterV2(GetPSQLClusterV2Args args, InvokeOptions options)
    
    fn::invoke:
      function: ionoscloud:dbaas/getPSQLClusterV2:getPSQLClusterV2
      arguments:
        # arguments dictionary
    data "ionoscloud_dbaas_getpsqlclusterv2" "name" {
        # arguments
    }

    The following arguments are supported:

    Location string

    [string] The region in which to look up the cluster. Available locations: de/fra, de/fra/2, de/txl, es/vit, fr/par, gb/bhx, gb/lhr, us/ewr, us/las, us/mci.

    Either id or name must be provided. If none, or both are provided, the datasource will return an error.

    Id string
    [string] ID of the cluster you want to search for.
    Name string
    [string] The name of an existing cluster that you want to search for.
    Location string

    [string] The region in which to look up the cluster. Available locations: de/fra, de/fra/2, de/txl, es/vit, fr/par, gb/bhx, gb/lhr, us/ewr, us/las, us/mci.

    Either id or name must be provided. If none, or both are provided, the datasource will return an error.

    Id string
    [string] ID of the cluster you want to search for.
    Name string
    [string] The name of an existing cluster that you want to search for.
    location string

    [string] The region in which to look up the cluster. Available locations: de/fra, de/fra/2, de/txl, es/vit, fr/par, gb/bhx, gb/lhr, us/ewr, us/las, us/mci.

    Either id or name must be provided. If none, or both are provided, the datasource will return an error.

    id string
    [string] ID of the cluster you want to search for.
    name string
    [string] The name of an existing cluster that you want to search for.
    location String

    [string] The region in which to look up the cluster. Available locations: de/fra, de/fra/2, de/txl, es/vit, fr/par, gb/bhx, gb/lhr, us/ewr, us/las, us/mci.

    Either id or name must be provided. If none, or both are provided, the datasource will return an error.

    id String
    [string] ID of the cluster you want to search for.
    name String
    [string] The name of an existing cluster that you want to search for.
    location string

    [string] The region in which to look up the cluster. Available locations: de/fra, de/fra/2, de/txl, es/vit, fr/par, gb/bhx, gb/lhr, us/ewr, us/las, us/mci.

    Either id or name must be provided. If none, or both are provided, the datasource will return an error.

    id string
    [string] ID of the cluster you want to search for.
    name string
    [string] The name of an existing cluster that you want to search for.
    location str

    [string] The region in which to look up the cluster. Available locations: de/fra, de/fra/2, de/txl, es/vit, fr/par, gb/bhx, gb/lhr, us/ewr, us/las, us/mci.

    Either id or name must be provided. If none, or both are provided, the datasource will return an error.

    id str
    [string] ID of the cluster you want to search for.
    name str
    [string] The name of an existing cluster that you want to search for.
    location String

    [string] The region in which to look up the cluster. Available locations: de/fra, de/fra/2, de/txl, es/vit, fr/par, gb/bhx, gb/lhr, us/ewr, us/las, us/mci.

    Either id or name must be provided. If none, or both are provided, the datasource will return an error.

    id String
    [string] ID of the cluster you want to search for.
    name String
    [string] The name of an existing cluster that you want to search for.

    getPSQLClusterV2 Result

    The following output properties are available:

    Backup Ionoscloud.GetPSQLClusterV2Backup
    Backup configuration of the cluster.
    ConnectionPooler string
    How database connections are managed and reused.
    Connections Ionoscloud.GetPSQLClusterV2Connections
    Connection information of the PostgreSQL cluster.
    Description string
    Human-readable description of the cluster.
    DnsName string
    The DNS name used to access the cluster.
    Id string
    The ID (UUID) of the cluster.
    Instances Ionoscloud.GetPSQLClusterV2Instances
    The instance configuration for the PostgreSQL cluster.
    Location string
    The Object Storage location where the backups are stored.
    LogsEnabled bool
    Whether the collection and reporting of logs is enabled for this cluster.
    MaintenanceWindow Ionoscloud.GetPSQLClusterV2MaintenanceWindow
    A weekly 4 hour-long window, during which maintenance might occur.
    MetricsEnabled bool
    Whether the collection and reporting of metrics is enabled for this cluster.
    Name string
    The name of the PostgreSQL cluster.
    ReplicationMode string
    Replication mode across the instances.
    Version string
    The PostgreSQL version of the cluster.
    Backup GetPSQLClusterV2Backup
    Backup configuration of the cluster.
    ConnectionPooler string
    How database connections are managed and reused.
    Connections GetPSQLClusterV2Connections
    Connection information of the PostgreSQL cluster.
    Description string
    Human-readable description of the cluster.
    DnsName string
    The DNS name used to access the cluster.
    Id string
    The ID (UUID) of the cluster.
    Instances GetPSQLClusterV2Instances
    The instance configuration for the PostgreSQL cluster.
    Location string
    The Object Storage location where the backups are stored.
    LogsEnabled bool
    Whether the collection and reporting of logs is enabled for this cluster.
    MaintenanceWindow GetPSQLClusterV2MaintenanceWindow
    A weekly 4 hour-long window, during which maintenance might occur.
    MetricsEnabled bool
    Whether the collection and reporting of metrics is enabled for this cluster.
    Name string
    The name of the PostgreSQL cluster.
    ReplicationMode string
    Replication mode across the instances.
    Version string
    The PostgreSQL version of the cluster.
    backup object
    Backup configuration of the cluster.
    connection_pooler string
    How database connections are managed and reused.
    connections object
    Connection information of the PostgreSQL cluster.
    description string
    Human-readable description of the cluster.
    dns_name string
    The DNS name used to access the cluster.
    id string
    The ID (UUID) of the cluster.
    instances object
    The instance configuration for the PostgreSQL cluster.
    location string
    The Object Storage location where the backups are stored.
    logs_enabled bool
    Whether the collection and reporting of logs is enabled for this cluster.
    maintenance_window object
    A weekly 4 hour-long window, during which maintenance might occur.
    metrics_enabled bool
    Whether the collection and reporting of metrics is enabled for this cluster.
    name string
    The name of the PostgreSQL cluster.
    replication_mode string
    Replication mode across the instances.
    version string
    The PostgreSQL version of the cluster.
    backup GetPSQLClusterV2Backup
    Backup configuration of the cluster.
    connectionPooler String
    How database connections are managed and reused.
    connections GetPSQLClusterV2Connections
    Connection information of the PostgreSQL cluster.
    description String
    Human-readable description of the cluster.
    dnsName String
    The DNS name used to access the cluster.
    id String
    The ID (UUID) of the cluster.
    instances GetPSQLClusterV2Instances
    The instance configuration for the PostgreSQL cluster.
    location String
    The Object Storage location where the backups are stored.
    logsEnabled Boolean
    Whether the collection and reporting of logs is enabled for this cluster.
    maintenanceWindow GetPSQLClusterV2MaintenanceWindow
    A weekly 4 hour-long window, during which maintenance might occur.
    metricsEnabled Boolean
    Whether the collection and reporting of metrics is enabled for this cluster.
    name String
    The name of the PostgreSQL cluster.
    replicationMode String
    Replication mode across the instances.
    version String
    The PostgreSQL version of the cluster.
    backup GetPSQLClusterV2Backup
    Backup configuration of the cluster.
    connectionPooler string
    How database connections are managed and reused.
    connections GetPSQLClusterV2Connections
    Connection information of the PostgreSQL cluster.
    description string
    Human-readable description of the cluster.
    dnsName string
    The DNS name used to access the cluster.
    id string
    The ID (UUID) of the cluster.
    instances GetPSQLClusterV2Instances
    The instance configuration for the PostgreSQL cluster.
    location string
    The Object Storage location where the backups are stored.
    logsEnabled boolean
    Whether the collection and reporting of logs is enabled for this cluster.
    maintenanceWindow GetPSQLClusterV2MaintenanceWindow
    A weekly 4 hour-long window, during which maintenance might occur.
    metricsEnabled boolean
    Whether the collection and reporting of metrics is enabled for this cluster.
    name string
    The name of the PostgreSQL cluster.
    replicationMode string
    Replication mode across the instances.
    version string
    The PostgreSQL version of the cluster.
    backup GetPSQLClusterV2Backup
    Backup configuration of the cluster.
    connection_pooler str
    How database connections are managed and reused.
    connections GetPSQLClusterV2Connections
    Connection information of the PostgreSQL cluster.
    description str
    Human-readable description of the cluster.
    dns_name str
    The DNS name used to access the cluster.
    id str
    The ID (UUID) of the cluster.
    instances GetPSQLClusterV2Instances
    The instance configuration for the PostgreSQL cluster.
    location str
    The Object Storage location where the backups are stored.
    logs_enabled bool
    Whether the collection and reporting of logs is enabled for this cluster.
    maintenance_window GetPSQLClusterV2MaintenanceWindow
    A weekly 4 hour-long window, during which maintenance might occur.
    metrics_enabled bool
    Whether the collection and reporting of metrics is enabled for this cluster.
    name str
    The name of the PostgreSQL cluster.
    replication_mode str
    Replication mode across the instances.
    version str
    The PostgreSQL version of the cluster.
    backup Property Map
    Backup configuration of the cluster.
    connectionPooler String
    How database connections are managed and reused.
    connections Property Map
    Connection information of the PostgreSQL cluster.
    description String
    Human-readable description of the cluster.
    dnsName String
    The DNS name used to access the cluster.
    id String
    The ID (UUID) of the cluster.
    instances Property Map
    The instance configuration for the PostgreSQL cluster.
    location String
    The Object Storage location where the backups are stored.
    logsEnabled Boolean
    Whether the collection and reporting of logs is enabled for this cluster.
    maintenanceWindow Property Map
    A weekly 4 hour-long window, during which maintenance might occur.
    metricsEnabled Boolean
    Whether the collection and reporting of metrics is enabled for this cluster.
    name String
    The name of the PostgreSQL cluster.
    replicationMode String
    Replication mode across the instances.
    version String
    The PostgreSQL version of the cluster.

    Supporting Types

    GetPSQLClusterV2Backup

    Location string

    [string] The region in which to look up the cluster. Available locations: de/fra, de/fra/2, de/txl, es/vit, fr/par, gb/bhx, gb/lhr, us/ewr, us/las, us/mci.

    Either id or name must be provided. If none, or both are provided, the datasource will return an error.

    RetentionDays int
    How many days cluster backups are retained.
    Location string

    [string] The region in which to look up the cluster. Available locations: de/fra, de/fra/2, de/txl, es/vit, fr/par, gb/bhx, gb/lhr, us/ewr, us/las, us/mci.

    Either id or name must be provided. If none, or both are provided, the datasource will return an error.

    RetentionDays int
    How many days cluster backups are retained.
    location string

    [string] The region in which to look up the cluster. Available locations: de/fra, de/fra/2, de/txl, es/vit, fr/par, gb/bhx, gb/lhr, us/ewr, us/las, us/mci.

    Either id or name must be provided. If none, or both are provided, the datasource will return an error.

    retention_days number
    How many days cluster backups are retained.
    location String

    [string] The region in which to look up the cluster. Available locations: de/fra, de/fra/2, de/txl, es/vit, fr/par, gb/bhx, gb/lhr, us/ewr, us/las, us/mci.

    Either id or name must be provided. If none, or both are provided, the datasource will return an error.

    retentionDays Integer
    How many days cluster backups are retained.
    location string

    [string] The region in which to look up the cluster. Available locations: de/fra, de/fra/2, de/txl, es/vit, fr/par, gb/bhx, gb/lhr, us/ewr, us/las, us/mci.

    Either id or name must be provided. If none, or both are provided, the datasource will return an error.

    retentionDays number
    How many days cluster backups are retained.
    location str

    [string] The region in which to look up the cluster. Available locations: de/fra, de/fra/2, de/txl, es/vit, fr/par, gb/bhx, gb/lhr, us/ewr, us/las, us/mci.

    Either id or name must be provided. If none, or both are provided, the datasource will return an error.

    retention_days int
    How many days cluster backups are retained.
    location String

    [string] The region in which to look up the cluster. Available locations: de/fra, de/fra/2, de/txl, es/vit, fr/par, gb/bhx, gb/lhr, us/ewr, us/las, us/mci.

    Either id or name must be provided. If none, or both are provided, the datasource will return an error.

    retentionDays Number
    How many days cluster backups are retained.

    GetPSQLClusterV2Connections

    DatacenterId string
    The datacenter the cluster is connected to.
    LanId string
    The numeric LAN ID the cluster is connected to.
    PrimaryInstanceAddress string
    The IP and netmask assigned to the cluster primary instance.
    DatacenterId string
    The datacenter the cluster is connected to.
    LanId string
    The numeric LAN ID the cluster is connected to.
    PrimaryInstanceAddress string
    The IP and netmask assigned to the cluster primary instance.
    datacenter_id string
    The datacenter the cluster is connected to.
    lan_id string
    The numeric LAN ID the cluster is connected to.
    primary_instance_address string
    The IP and netmask assigned to the cluster primary instance.
    datacenterId String
    The datacenter the cluster is connected to.
    lanId String
    The numeric LAN ID the cluster is connected to.
    primaryInstanceAddress String
    The IP and netmask assigned to the cluster primary instance.
    datacenterId string
    The datacenter the cluster is connected to.
    lanId string
    The numeric LAN ID the cluster is connected to.
    primaryInstanceAddress string
    The IP and netmask assigned to the cluster primary instance.
    datacenter_id str
    The datacenter the cluster is connected to.
    lan_id str
    The numeric LAN ID the cluster is connected to.
    primary_instance_address str
    The IP and netmask assigned to the cluster primary instance.
    datacenterId String
    The datacenter the cluster is connected to.
    lanId String
    The numeric LAN ID the cluster is connected to.
    primaryInstanceAddress String
    The IP and netmask assigned to the cluster primary instance.

    GetPSQLClusterV2Instances

    Cores int
    The number of CPU cores per instance.
    Count int
    The total number of instances in the cluster (one primary and n-1 secondary).
    Ram int
    The amount of memory per instance in gigabytes (GB).
    StorageSize int
    The amount of storage per instance in gigabytes (GB).
    Cores int
    The number of CPU cores per instance.
    Count int
    The total number of instances in the cluster (one primary and n-1 secondary).
    Ram int
    The amount of memory per instance in gigabytes (GB).
    StorageSize int
    The amount of storage per instance in gigabytes (GB).
    cores number
    The number of CPU cores per instance.
    count number
    The total number of instances in the cluster (one primary and n-1 secondary).
    ram number
    The amount of memory per instance in gigabytes (GB).
    storage_size number
    The amount of storage per instance in gigabytes (GB).
    cores Integer
    The number of CPU cores per instance.
    count Integer
    The total number of instances in the cluster (one primary and n-1 secondary).
    ram Integer
    The amount of memory per instance in gigabytes (GB).
    storageSize Integer
    The amount of storage per instance in gigabytes (GB).
    cores number
    The number of CPU cores per instance.
    count number
    The total number of instances in the cluster (one primary and n-1 secondary).
    ram number
    The amount of memory per instance in gigabytes (GB).
    storageSize number
    The amount of storage per instance in gigabytes (GB).
    cores int
    The number of CPU cores per instance.
    count int
    The total number of instances in the cluster (one primary and n-1 secondary).
    ram int
    The amount of memory per instance in gigabytes (GB).
    storage_size int
    The amount of storage per instance in gigabytes (GB).
    cores Number
    The number of CPU cores per instance.
    count Number
    The total number of instances in the cluster (one primary and n-1 secondary).
    ram Number
    The amount of memory per instance in gigabytes (GB).
    storageSize Number
    The amount of storage per instance in gigabytes (GB).

    GetPSQLClusterV2MaintenanceWindow

    DayOfTheWeek string
    The name of the week day.
    Time string
    Start of the maintenance window in UTC time.
    DayOfTheWeek string
    The name of the week day.
    Time string
    Start of the maintenance window in UTC time.
    day_of_the_week string
    The name of the week day.
    time string
    Start of the maintenance window in UTC time.
    dayOfTheWeek String
    The name of the week day.
    time String
    Start of the maintenance window in UTC time.
    dayOfTheWeek string
    The name of the week day.
    time string
    Start of the maintenance window in UTC time.
    day_of_the_week str
    The name of the week day.
    time str
    Start of the maintenance window in UTC time.
    dayOfTheWeek String
    The name of the week day.
    time String
    Start of the maintenance window in UTC time.

    Package Details

    Repository
    ionoscloud ionos-cloud/pulumi-ionoscloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the ionoscloud Terraform Provider.
    ionoscloud logo
    Viewing docs for IonosCloud v0.3.1
    published on Wednesday, Jun 10, 2026 by ionos-cloud

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial