1. Packages
  2. Ionoscloud
  3. API Docs
  4. dbaas
  5. getPSQLCluster
IonosCloud v0.2.3 published on Tuesday, May 13, 2025 by ionos-cloud

ionoscloud.dbaas.getPSQLCluster

Explore with Pulumi AI

ionoscloud logo
IonosCloud v0.2.3 published on Tuesday, May 13, 2025 by ionos-cloud

    The DbaaS Postgres Cluster data source can be used to search for and return an existing DbaaS Postgres 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 "@pulumi/ionoscloud";
    
    const example = ionoscloud.dbaas.getPSQLCluster({
        id: "cluster_id",
    });
    
    import pulumi
    import pulumi_ionoscloud as ionoscloud
    
    example = ionoscloud.dbaas.get_psql_cluster(id="cluster_id")
    
    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.LookupPSQLCluster(ctx, &dbaas.LookupPSQLClusterArgs{
    			Id: pulumi.StringRef("cluster_id"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ionoscloud = Pulumi.Ionoscloud;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Ionoscloud.Dbaas.GetPSQLCluster.Invoke(new()
        {
            Id = "cluster_id",
        });
    
    });
    
    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.GetPSQLClusterArgs;
    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 example = DbaasFunctions.getPSQLCluster(GetPSQLClusterArgs.builder()
                .id("cluster_id")
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: ionoscloud:dbaas:getPSQLCluster
          arguments:
            id: cluster_id
    

    By Name

    import * as pulumi from "@pulumi/pulumi";
    import * as ionoscloud from "@pulumi/ionoscloud";
    
    const example = ionoscloud.dbaas.getPSQLCluster({
        displayName: "PostgreSQL_cluster",
    });
    
    import pulumi
    import pulumi_ionoscloud as ionoscloud
    
    example = ionoscloud.dbaas.get_psql_cluster(display_name="PostgreSQL_cluster")
    
    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.LookupPSQLCluster(ctx, &dbaas.LookupPSQLClusterArgs{
    			DisplayName: pulumi.StringRef("PostgreSQL_cluster"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ionoscloud = Pulumi.Ionoscloud;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Ionoscloud.Dbaas.GetPSQLCluster.Invoke(new()
        {
            DisplayName = "PostgreSQL_cluster",
        });
    
    });
    
    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.GetPSQLClusterArgs;
    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 example = DbaasFunctions.getPSQLCluster(GetPSQLClusterArgs.builder()
                .displayName("PostgreSQL_cluster")
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: ionoscloud:dbaas:getPSQLCluster
          arguments:
            displayName: PostgreSQL_cluster
    

    Using getPSQLCluster

    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 getPSQLCluster(args: GetPSQLClusterArgs, opts?: InvokeOptions): Promise<GetPSQLClusterResult>
    function getPSQLClusterOutput(args: GetPSQLClusterOutputArgs, opts?: InvokeOptions): Output<GetPSQLClusterResult>
    def get_psql_cluster(display_name: Optional[str] = None,
                         id: Optional[str] = None,
                         opts: Optional[InvokeOptions] = None) -> GetPSQLClusterResult
    def get_psql_cluster_output(display_name: Optional[pulumi.Input[str]] = None,
                         id: Optional[pulumi.Input[str]] = None,
                         opts: Optional[InvokeOptions] = None) -> Output[GetPSQLClusterResult]
    func LookupPSQLCluster(ctx *Context, args *LookupPSQLClusterArgs, opts ...InvokeOption) (*LookupPSQLClusterResult, error)
    func LookupPSQLClusterOutput(ctx *Context, args *LookupPSQLClusterOutputArgs, opts ...InvokeOption) LookupPSQLClusterResultOutput

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

    public static class GetPSQLCluster 
    {
        public static Task<GetPSQLClusterResult> InvokeAsync(GetPSQLClusterArgs args, InvokeOptions? opts = null)
        public static Output<GetPSQLClusterResult> Invoke(GetPSQLClusterInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetPSQLClusterResult> getPSQLCluster(GetPSQLClusterArgs args, InvokeOptions options)
    public static Output<GetPSQLClusterResult> getPSQLCluster(GetPSQLClusterArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ionoscloud:dbaas/getPSQLCluster:getPSQLCluster
      arguments:
        # arguments dictionary

    The following arguments are supported:

    DisplayName string
    Display Name of an existing cluster that you want to search for.
    Id string

    ID of the cluster you want to search for.

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

    DisplayName string
    Display Name of an existing cluster that you want to search for.
    Id string

    ID of the cluster you want to search for.

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

    displayName String
    Display Name of an existing cluster that you want to search for.
    id String

    ID of the cluster you want to search for.

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

    displayName string
    Display Name of an existing cluster that you want to search for.
    id string

    ID of the cluster you want to search for.

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

    display_name str
    Display Name of an existing cluster that you want to search for.
    id str

    ID of the cluster you want to search for.

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

    displayName String
    Display Name of an existing cluster that you want to search for.
    id String

    ID of the cluster you want to search for.

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

    getPSQLCluster Result

    The following output properties are available:

    BackupLocation string
    The IONOS Object Storage location where the backups will be stored.
    ConnectionPoolers List<Ionoscloud.GetPSQLClusterConnectionPooler>
    Details about the connection pooler.
    Connections List<Ionoscloud.GetPSQLClusterConnection>
    Details about the network connection for your cluster.
    Cores int
    The number of CPU cores per replica.
    DisplayName string
    The friendly name of your cluster.
    DnsName string
    The DNS name pointing to your cluster.
    FromBackups List<Ionoscloud.GetPSQLClusterFromBackup>
    The unique ID of the backup you want to restore.
    Id string
    Instances int
    The total number of instances in the cluster (one master and n-1 standbys)
    Location string
    The physical location where the cluster will be created. This will be where all of your instances live.
    MaintenanceWindows List<Ionoscloud.GetPSQLClusterMaintenanceWindow>
    A weekly 4 hour-long window, during which maintenance might occur
    PostgresVersion string
    The PostgreSQL version of your cluster.
    Ram int
    The amount of memory per instance in megabytes.
    StorageSize int
    The amount of storage per instance in MB.
    StorageType string
    The storage type used in your cluster.
    SynchronizationMode string
    Represents different modes of replication.
    BackupLocation string
    The IONOS Object Storage location where the backups will be stored.
    ConnectionPoolers []GetPSQLClusterConnectionPooler
    Details about the connection pooler.
    Connections []GetPSQLClusterConnection
    Details about the network connection for your cluster.
    Cores int
    The number of CPU cores per replica.
    DisplayName string
    The friendly name of your cluster.
    DnsName string
    The DNS name pointing to your cluster.
    FromBackups []GetPSQLClusterFromBackup
    The unique ID of the backup you want to restore.
    Id string
    Instances int
    The total number of instances in the cluster (one master and n-1 standbys)
    Location string
    The physical location where the cluster will be created. This will be where all of your instances live.
    MaintenanceWindows []GetPSQLClusterMaintenanceWindow
    A weekly 4 hour-long window, during which maintenance might occur
    PostgresVersion string
    The PostgreSQL version of your cluster.
    Ram int
    The amount of memory per instance in megabytes.
    StorageSize int
    The amount of storage per instance in MB.
    StorageType string
    The storage type used in your cluster.
    SynchronizationMode string
    Represents different modes of replication.
    backupLocation String
    The IONOS Object Storage location where the backups will be stored.
    connectionPoolers List<GetPSQLClusterConnectionPooler>
    Details about the connection pooler.
    connections List<GetPSQLClusterConnection>
    Details about the network connection for your cluster.
    cores Integer
    The number of CPU cores per replica.
    displayName String
    The friendly name of your cluster.
    dnsName String
    The DNS name pointing to your cluster.
    fromBackups List<GetPSQLClusterFromBackup>
    The unique ID of the backup you want to restore.
    id String
    instances Integer
    The total number of instances in the cluster (one master and n-1 standbys)
    location String
    The physical location where the cluster will be created. This will be where all of your instances live.
    maintenanceWindows List<GetPSQLClusterMaintenanceWindow>
    A weekly 4 hour-long window, during which maintenance might occur
    postgresVersion String
    The PostgreSQL version of your cluster.
    ram Integer
    The amount of memory per instance in megabytes.
    storageSize Integer
    The amount of storage per instance in MB.
    storageType String
    The storage type used in your cluster.
    synchronizationMode String
    Represents different modes of replication.
    backupLocation string
    The IONOS Object Storage location where the backups will be stored.
    connectionPoolers GetPSQLClusterConnectionPooler[]
    Details about the connection pooler.
    connections GetPSQLClusterConnection[]
    Details about the network connection for your cluster.
    cores number
    The number of CPU cores per replica.
    displayName string
    The friendly name of your cluster.
    dnsName string
    The DNS name pointing to your cluster.
    fromBackups GetPSQLClusterFromBackup[]
    The unique ID of the backup you want to restore.
    id string
    instances number
    The total number of instances in the cluster (one master and n-1 standbys)
    location string
    The physical location where the cluster will be created. This will be where all of your instances live.
    maintenanceWindows GetPSQLClusterMaintenanceWindow[]
    A weekly 4 hour-long window, during which maintenance might occur
    postgresVersion string
    The PostgreSQL version of your cluster.
    ram number
    The amount of memory per instance in megabytes.
    storageSize number
    The amount of storage per instance in MB.
    storageType string
    The storage type used in your cluster.
    synchronizationMode string
    Represents different modes of replication.
    backup_location str
    The IONOS Object Storage location where the backups will be stored.
    connection_poolers Sequence[GetPSQLClusterConnectionPooler]
    Details about the connection pooler.
    connections Sequence[GetPSQLClusterConnection]
    Details about the network connection for your cluster.
    cores int
    The number of CPU cores per replica.
    display_name str
    The friendly name of your cluster.
    dns_name str
    The DNS name pointing to your cluster.
    from_backups Sequence[GetPSQLClusterFromBackup]
    The unique ID of the backup you want to restore.
    id str
    instances int
    The total number of instances in the cluster (one master and n-1 standbys)
    location str
    The physical location where the cluster will be created. This will be where all of your instances live.
    maintenance_windows Sequence[GetPSQLClusterMaintenanceWindow]
    A weekly 4 hour-long window, during which maintenance might occur
    postgres_version str
    The PostgreSQL version of your cluster.
    ram int
    The amount of memory per instance in megabytes.
    storage_size int
    The amount of storage per instance in MB.
    storage_type str
    The storage type used in your cluster.
    synchronization_mode str
    Represents different modes of replication.
    backupLocation String
    The IONOS Object Storage location where the backups will be stored.
    connectionPoolers List<Property Map>
    Details about the connection pooler.
    connections List<Property Map>
    Details about the network connection for your cluster.
    cores Number
    The number of CPU cores per replica.
    displayName String
    The friendly name of your cluster.
    dnsName String
    The DNS name pointing to your cluster.
    fromBackups List<Property Map>
    The unique ID of the backup you want to restore.
    id String
    instances Number
    The total number of instances in the cluster (one master and n-1 standbys)
    location String
    The physical location where the cluster will be created. This will be where all of your instances live.
    maintenanceWindows List<Property Map>
    A weekly 4 hour-long window, during which maintenance might occur
    postgresVersion String
    The PostgreSQL version of your cluster.
    ram Number
    The amount of memory per instance in megabytes.
    storageSize Number
    The amount of storage per instance in MB.
    storageType String
    The storage type used in your cluster.
    synchronizationMode String
    Represents different modes of replication.

    Supporting Types

    GetPSQLClusterConnection

    Cidr string
    The IP and subnet for the database.
    DatacenterId string
    The datacenter to connect your cluster to.
    LanId string
    The LAN to connect your cluster to.
    Cidr string
    The IP and subnet for the database.
    DatacenterId string
    The datacenter to connect your cluster to.
    LanId string
    The LAN to connect your cluster to.
    cidr String
    The IP and subnet for the database.
    datacenterId String
    The datacenter to connect your cluster to.
    lanId String
    The LAN to connect your cluster to.
    cidr string
    The IP and subnet for the database.
    datacenterId string
    The datacenter to connect your cluster to.
    lanId string
    The LAN to connect your cluster to.
    cidr str
    The IP and subnet for the database.
    datacenter_id str
    The datacenter to connect your cluster to.
    lan_id str
    The LAN to connect your cluster to.
    cidr String
    The IP and subnet for the database.
    datacenterId String
    The datacenter to connect your cluster to.
    lanId String
    The LAN to connect your cluster to.

    GetPSQLClusterConnectionPooler

    Enabled bool
    PoolMode string
    Represents different modes of connection pooling for the connection pooler.
    Enabled bool
    PoolMode string
    Represents different modes of connection pooling for the connection pooler.
    enabled Boolean
    poolMode String
    Represents different modes of connection pooling for the connection pooler.
    enabled boolean
    poolMode string
    Represents different modes of connection pooling for the connection pooler.
    enabled bool
    pool_mode str
    Represents different modes of connection pooling for the connection pooler.
    enabled Boolean
    poolMode String
    Represents different modes of connection pooling for the connection pooler.

    GetPSQLClusterFromBackup

    BackupId string
    The PostgreSQL version of your cluster.
    RecoveryTargetTime string
    If this value is supplied as ISO 8601 timestamp, the backup will be replayed up until the given timestamp.
    BackupId string
    The PostgreSQL version of your cluster.
    RecoveryTargetTime string
    If this value is supplied as ISO 8601 timestamp, the backup will be replayed up until the given timestamp.
    backupId String
    The PostgreSQL version of your cluster.
    recoveryTargetTime String
    If this value is supplied as ISO 8601 timestamp, the backup will be replayed up until the given timestamp.
    backupId string
    The PostgreSQL version of your cluster.
    recoveryTargetTime string
    If this value is supplied as ISO 8601 timestamp, the backup will be replayed up until the given timestamp.
    backup_id str
    The PostgreSQL version of your cluster.
    recovery_target_time str
    If this value is supplied as ISO 8601 timestamp, the backup will be replayed up until the given timestamp.
    backupId String
    The PostgreSQL version of your cluster.
    recoveryTargetTime String
    If this value is supplied as ISO 8601 timestamp, the backup will be replayed up until the given timestamp.

    GetPSQLClusterMaintenanceWindow

    DayOfTheWeek string
    Time string
    DayOfTheWeek string
    Time string
    dayOfTheWeek String
    time String
    dayOfTheWeek string
    time string
    dayOfTheWeek String
    time String

    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
    IonosCloud v0.2.3 published on Tuesday, May 13, 2025 by ionos-cloud