1. Registry
  2. Packages
  3. Planetscale Provider
  4. API Docs
  5. getPostgresDedicatedReadReplica
Viewing docs for planetscale 1.20.0
published on Thursday, Nov 12, 2026 by planetscale
planetscale
Viewing docs for planetscale 1.20.0
published on Thursday, Nov 12, 2026 by planetscale

    PostgresDedicatedReadReplica DataSource

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as planetscale from "@pulumi/planetscale";
    
    const myPostgresdedicatedreadreplica = planetscale.getPostgresDedicatedReadReplica({
        branch: "...my_branch...",
        database: "...my_database...",
        name: "...my_name...",
        organization: "...my_organization...",
    });
    
    import pulumi
    import pulumi_planetscale as planetscale
    
    my_postgresdedicatedreadreplica = planetscale.get_postgres_dedicated_read_replica(branch="...my_branch...",
        database="...my_database...",
        name="...my_name...",
        organization="...my_organization...")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/planetscale/planetscale"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := planetscale.LookupPostgresDedicatedReadReplica(ctx, &planetscale.LookupPostgresDedicatedReadReplicaArgs{
    			Branch:       "...my_branch...",
    			Database:     "...my_database...",
    			Name:         "...my_name...",
    			Organization: "...my_organization...",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Planetscale = Pulumi.Planetscale;
    
    return await Deployment.RunAsync(() => 
    {
        var myPostgresdedicatedreadreplica = Planetscale.GetPostgresDedicatedReadReplica.Invoke(new()
        {
            Branch = "...my_branch...",
            Database = "...my_database...",
            Name = "...my_name...",
            Organization = "...my_organization...",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.planetscale.PlanetscaleFunctions;
    import com.pulumi.planetscale.inputs.GetPostgresDedicatedReadReplicaArgs;
    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 myPostgresdedicatedreadreplica = PlanetscaleFunctions.getPostgresDedicatedReadReplica(GetPostgresDedicatedReadReplicaArgs.builder()
                .branch("...my_branch...")
                .database("...my_database...")
                .name("...my_name...")
                .organization("...my_organization...")
                .build());
    
        }
    }
    
    variables:
      myPostgresdedicatedreadreplica:
        fn::invoke:
          function: planetscale:getPostgresDedicatedReadReplica
          arguments:
            branch: '...my_branch...'
            database: '...my_database...'
            name: '...my_name...'
            organization: '...my_organization...'
    
    Example coming soon!
    

    Using getPostgresDedicatedReadReplica

    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 getPostgresDedicatedReadReplica(args: GetPostgresDedicatedReadReplicaArgs, opts?: InvokeOptions): Promise<GetPostgresDedicatedReadReplicaResult>
    function getPostgresDedicatedReadReplicaOutput(args: GetPostgresDedicatedReadReplicaOutputArgs, opts?: InvokeOutputOptions): Output<GetPostgresDedicatedReadReplicaResult>
    def get_postgres_dedicated_read_replica(branch: Optional[str] = None,
                                            database: Optional[str] = None,
                                            name: Optional[str] = None,
                                            organization: Optional[str] = None,
                                            opts: Optional[InvokeOptions] = None) -> GetPostgresDedicatedReadReplicaResult
    def get_postgres_dedicated_read_replica_output(branch: pulumi.Input[Optional[str]] = None,
                                            database: pulumi.Input[Optional[str]] = None,
                                            name: pulumi.Input[Optional[str]] = None,
                                            organization: pulumi.Input[Optional[str]] = None,
                                            opts: Optional[InvokeOutputOptions] = None) -> Output[GetPostgresDedicatedReadReplicaResult]
    func LookupPostgresDedicatedReadReplica(ctx *Context, args *LookupPostgresDedicatedReadReplicaArgs, opts ...InvokeOption) (*LookupPostgresDedicatedReadReplicaResult, error)
    func LookupPostgresDedicatedReadReplicaOutput(ctx *Context, args *LookupPostgresDedicatedReadReplicaOutputArgs, opts ...InvokeOption) LookupPostgresDedicatedReadReplicaResultOutput

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

    public static class GetPostgresDedicatedReadReplica 
    {
        public static Task<GetPostgresDedicatedReadReplicaResult> InvokeAsync(GetPostgresDedicatedReadReplicaArgs args, InvokeOptions? opts = null)
        public static Output<GetPostgresDedicatedReadReplicaResult> Invoke(GetPostgresDedicatedReadReplicaInvokeArgs args, InvokeOptions? opts = null)
        public static Output<GetPostgresDedicatedReadReplicaResult> Invoke(GetPostgresDedicatedReadReplicaInvokeArgs args, InvokeOutputOptions opts)
    }
    public static CompletableFuture<GetPostgresDedicatedReadReplicaResult> getPostgresDedicatedReadReplica(GetPostgresDedicatedReadReplicaArgs args, InvokeOptions options)
    public static Output<GetPostgresDedicatedReadReplicaResult> getPostgresDedicatedReadReplica(GetPostgresDedicatedReadReplicaArgs args, InvokeOptions options)
    public static Output<GetPostgresDedicatedReadReplicaResult> getPostgresDedicatedReadReplica(GetPostgresDedicatedReadReplicaArgs args, InvokeOutputOptions options)
    
    fn::invoke:
      function: planetscale:index/getPostgresDedicatedReadReplica:getPostgresDedicatedReadReplica
      arguments:
        # arguments dictionary
    data "planetscale_get_postgres_dedicated_read_replica" "name" {
        # arguments
    }

    The following arguments are supported:

    Branch string
    Branch name from list_branches. Example: main.
    Database string
    Database name slug from list_databases. Example: app-db.
    Name string
    The name of the dedicated read replica.
    Organization string
    Organization name slug from list_organizations. Example: acme.
    Branch string
    Branch name from list_branches. Example: main.
    Database string
    Database name slug from list_databases. Example: app-db.
    Name string
    The name of the dedicated read replica.
    Organization string
    Organization name slug from list_organizations. Example: acme.
    branch string
    Branch name from list_branches. Example: main.
    database string
    Database name slug from list_databases. Example: app-db.
    name string
    The name of the dedicated read replica.
    organization string
    Organization name slug from list_organizations. Example: acme.
    branch String
    Branch name from list_branches. Example: main.
    database String
    Database name slug from list_databases. Example: app-db.
    name String
    The name of the dedicated read replica.
    organization String
    Organization name slug from list_organizations. Example: acme.
    branch string
    Branch name from list_branches. Example: main.
    database string
    Database name slug from list_databases. Example: app-db.
    name string
    The name of the dedicated read replica.
    organization string
    Organization name slug from list_organizations. Example: acme.
    branch str
    Branch name from list_branches. Example: main.
    database str
    Database name slug from list_databases. Example: app-db.
    name str
    The name of the dedicated read replica.
    organization str
    Organization name slug from list_organizations. Example: acme.
    branch String
    Branch name from list_branches. Example: main.
    database String
    Database name slug from list_databases. Example: app-db.
    name String
    The name of the dedicated read replica.
    organization String
    Organization name slug from list_organizations. Example: acme.

    getPostgresDedicatedReadReplica Result

    The following output properties are available:

    AccessHostUrl string
    The database connection host for the dedicated read replica.
    Branch string
    Branch name from list_branches. Example: main.
    ClusterSize string
    The cluster size SKU, e.g. PS_10_AWS_ARM. Defaults to the primary's cluster size.
    Database string
    Database name slug from list_databases. Example: app-db.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    The name of the dedicated read replica.
    Organization string
    Organization name slug from list_organizations. Example: acme.
    PrivateAccessHostUrl string
    The private database connection host for the dedicated read replica.
    PrivateConnectionServiceName string
    The service name to set up private connectivity for the dedicated read replica.
    Region string
    The region slug for the dedicated read replica, e.g. us-east. The dedicated read replica can run in a different region than the primary.
    Replicas double
    The number of instances serving reads in this dedicated read replica.
    AccessHostUrl string
    The database connection host for the dedicated read replica.
    Branch string
    Branch name from list_branches. Example: main.
    ClusterSize string
    The cluster size SKU, e.g. PS_10_AWS_ARM. Defaults to the primary's cluster size.
    Database string
    Database name slug from list_databases. Example: app-db.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    The name of the dedicated read replica.
    Organization string
    Organization name slug from list_organizations. Example: acme.
    PrivateAccessHostUrl string
    The private database connection host for the dedicated read replica.
    PrivateConnectionServiceName string
    The service name to set up private connectivity for the dedicated read replica.
    Region string
    The region slug for the dedicated read replica, e.g. us-east. The dedicated read replica can run in a different region than the primary.
    Replicas float64
    The number of instances serving reads in this dedicated read replica.
    access_host_url string
    The database connection host for the dedicated read replica.
    branch string
    Branch name from list_branches. Example: main.
    cluster_size string
    The cluster size SKU, e.g. PS_10_AWS_ARM. Defaults to the primary's cluster size.
    database string
    Database name slug from list_databases. Example: app-db.
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    The name of the dedicated read replica.
    organization string
    Organization name slug from list_organizations. Example: acme.
    private_access_host_url string
    The private database connection host for the dedicated read replica.
    private_connection_service_name string
    The service name to set up private connectivity for the dedicated read replica.
    region string
    The region slug for the dedicated read replica, e.g. us-east. The dedicated read replica can run in a different region than the primary.
    replicas number
    The number of instances serving reads in this dedicated read replica.
    accessHostUrl String
    The database connection host for the dedicated read replica.
    branch String
    Branch name from list_branches. Example: main.
    clusterSize String
    The cluster size SKU, e.g. PS_10_AWS_ARM. Defaults to the primary's cluster size.
    database String
    Database name slug from list_databases. Example: app-db.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    The name of the dedicated read replica.
    organization String
    Organization name slug from list_organizations. Example: acme.
    privateAccessHostUrl String
    The private database connection host for the dedicated read replica.
    privateConnectionServiceName String
    The service name to set up private connectivity for the dedicated read replica.
    region String
    The region slug for the dedicated read replica, e.g. us-east. The dedicated read replica can run in a different region than the primary.
    replicas Double
    The number of instances serving reads in this dedicated read replica.
    accessHostUrl string
    The database connection host for the dedicated read replica.
    branch string
    Branch name from list_branches. Example: main.
    clusterSize string
    The cluster size SKU, e.g. PS_10_AWS_ARM. Defaults to the primary's cluster size.
    database string
    Database name slug from list_databases. Example: app-db.
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    The name of the dedicated read replica.
    organization string
    Organization name slug from list_organizations. Example: acme.
    privateAccessHostUrl string
    The private database connection host for the dedicated read replica.
    privateConnectionServiceName string
    The service name to set up private connectivity for the dedicated read replica.
    region string
    The region slug for the dedicated read replica, e.g. us-east. The dedicated read replica can run in a different region than the primary.
    replicas number
    The number of instances serving reads in this dedicated read replica.
    access_host_url str
    The database connection host for the dedicated read replica.
    branch str
    Branch name from list_branches. Example: main.
    cluster_size str
    The cluster size SKU, e.g. PS_10_AWS_ARM. Defaults to the primary's cluster size.
    database str
    Database name slug from list_databases. Example: app-db.
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    The name of the dedicated read replica.
    organization str
    Organization name slug from list_organizations. Example: acme.
    private_access_host_url str
    The private database connection host for the dedicated read replica.
    private_connection_service_name str
    The service name to set up private connectivity for the dedicated read replica.
    region str
    The region slug for the dedicated read replica, e.g. us-east. The dedicated read replica can run in a different region than the primary.
    replicas float
    The number of instances serving reads in this dedicated read replica.
    accessHostUrl String
    The database connection host for the dedicated read replica.
    branch String
    Branch name from list_branches. Example: main.
    clusterSize String
    The cluster size SKU, e.g. PS_10_AWS_ARM. Defaults to the primary's cluster size.
    database String
    Database name slug from list_databases. Example: app-db.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    The name of the dedicated read replica.
    organization String
    Organization name slug from list_organizations. Example: acme.
    privateAccessHostUrl String
    The private database connection host for the dedicated read replica.
    privateConnectionServiceName String
    The service name to set up private connectivity for the dedicated read replica.
    region String
    The region slug for the dedicated read replica, e.g. us-east. The dedicated read replica can run in a different region than the primary.
    replicas Number
    The number of instances serving reads in this dedicated read replica.

    Package Details

    Repository
    planetscale planetscale/terraform-provider-planetscale
    License
    Notes
    This Pulumi package is based on the planetscale Terraform Provider.
    planetscale
    Viewing docs for planetscale 1.20.0
    published on Thursday, Nov 12, 2026 by planetscale

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial