published on Thursday, Nov 12, 2026 by planetscale
published on Thursday, Nov 12, 2026 by planetscale
PostgresDedicatedReadReplica Resource
Create PostgresDedicatedReadReplica Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new PostgresDedicatedReadReplica(name: string, args: PostgresDedicatedReadReplicaArgs, opts?: CustomResourceOptions);@overload
def PostgresDedicatedReadReplica(resource_name: str,
args: PostgresDedicatedReadReplicaArgs,
opts: Optional[ResourceOptions] = None)
@overload
def PostgresDedicatedReadReplica(resource_name: str,
opts: Optional[ResourceOptions] = None,
branch: Optional[str] = None,
database: Optional[str] = None,
organization: Optional[str] = None,
region: Optional[str] = None,
cluster_size: Optional[str] = None,
name: Optional[str] = None,
replicas: Optional[float] = None)func NewPostgresDedicatedReadReplica(ctx *Context, name string, args PostgresDedicatedReadReplicaArgs, opts ...ResourceOption) (*PostgresDedicatedReadReplica, error)public PostgresDedicatedReadReplica(string name, PostgresDedicatedReadReplicaArgs args, CustomResourceOptions? opts = null)
public PostgresDedicatedReadReplica(String name, PostgresDedicatedReadReplicaArgs args)
public PostgresDedicatedReadReplica(String name, PostgresDedicatedReadReplicaArgs args, CustomResourceOptions options)
type: planetscale:PostgresDedicatedReadReplica
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "planetscale_postgres_dedicated_read_replica" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args PostgresDedicatedReadReplicaArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args PostgresDedicatedReadReplicaArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args PostgresDedicatedReadReplicaArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args PostgresDedicatedReadReplicaArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args PostgresDedicatedReadReplicaArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var postgresDedicatedReadReplicaResource = new Planetscale.PostgresDedicatedReadReplica("postgresDedicatedReadReplicaResource", new()
{
Branch = "string",
Database = "string",
Organization = "string",
Region = "string",
ClusterSize = "string",
Name = "string",
Replicas = 0.0,
});
example, err := planetscale.NewPostgresDedicatedReadReplica(ctx, "postgresDedicatedReadReplicaResource", &planetscale.PostgresDedicatedReadReplicaArgs{
Branch: pulumi.String("string"),
Database: pulumi.String("string"),
Organization: pulumi.String("string"),
Region: pulumi.String("string"),
ClusterSize: pulumi.String("string"),
Name: pulumi.String("string"),
Replicas: pulumi.Float64(0),
})
resource "planetscale_postgres_dedicated_read_replica" "postgresDedicatedReadReplicaResource" {
lifecycle {
create_before_destroy = true
}
branch = "string"
database = "string"
organization = "string"
region = "string"
cluster_size = "string"
name = "string"
replicas = 0
}
var postgresDedicatedReadReplicaResource = new PostgresDedicatedReadReplica("postgresDedicatedReadReplicaResource", PostgresDedicatedReadReplicaArgs.builder()
.branch("string")
.database("string")
.organization("string")
.region("string")
.clusterSize("string")
.name("string")
.replicas(0.0)
.build());
postgres_dedicated_read_replica_resource = planetscale.PostgresDedicatedReadReplica("postgresDedicatedReadReplicaResource",
branch="string",
database="string",
organization="string",
region="string",
cluster_size="string",
name="string",
replicas=float(0))
const postgresDedicatedReadReplicaResource = new planetscale.PostgresDedicatedReadReplica("postgresDedicatedReadReplicaResource", {
branch: "string",
database: "string",
organization: "string",
region: "string",
clusterSize: "string",
name: "string",
replicas: 0,
});
type: planetscale:PostgresDedicatedReadReplica
properties:
branch: string
clusterSize: string
database: string
name: string
organization: string
region: string
replicas: 0
PostgresDedicatedReadReplica Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The PostgresDedicatedReadReplica resource accepts the following input properties:
- Branch string
- Branch name from
list_branches. Example:main. - Database string
- Database name slug from
list_databases. Example:app-db. - Organization string
- Organization name slug from
list_organizations. Example:acme. - 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. Requires replacement if changed. - Cluster
Size string - The cluster size SKU, e.g.
PS_10_AWS_ARM. Defaults to the primary's cluster size. - Name string
- The name of the dedicated read replica. Requires replacement if changed.
- Replicas double
- The number of instances serving reads. Defaults to 1.
- Branch string
- Branch name from
list_branches. Example:main. - Database string
- Database name slug from
list_databases. Example:app-db. - Organization string
- Organization name slug from
list_organizations. Example:acme. - 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. Requires replacement if changed. - Cluster
Size string - The cluster size SKU, e.g.
PS_10_AWS_ARM. Defaults to the primary's cluster size. - Name string
- The name of the dedicated read replica. Requires replacement if changed.
- Replicas float64
- The number of instances serving reads. Defaults to 1.
- branch string
- Branch name from
list_branches. Example:main. - database string
- Database name slug from
list_databases. Example:app-db. - organization string
- Organization name slug from
list_organizations. Example:acme. - 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. Requires replacement if changed. - cluster_
size string - The cluster size SKU, e.g.
PS_10_AWS_ARM. Defaults to the primary's cluster size. - name string
- The name of the dedicated read replica. Requires replacement if changed.
- replicas number
- The number of instances serving reads. Defaults to 1.
- branch String
- Branch name from
list_branches. Example:main. - database String
- Database name slug from
list_databases. Example:app-db. - organization String
- Organization name slug from
list_organizations. Example:acme. - 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. Requires replacement if changed. - cluster
Size String - The cluster size SKU, e.g.
PS_10_AWS_ARM. Defaults to the primary's cluster size. - name String
- The name of the dedicated read replica. Requires replacement if changed.
- replicas Double
- The number of instances serving reads. Defaults to 1.
- branch string
- Branch name from
list_branches. Example:main. - database string
- Database name slug from
list_databases. Example:app-db. - organization string
- Organization name slug from
list_organizations. Example:acme. - 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. Requires replacement if changed. - cluster
Size string - The cluster size SKU, e.g.
PS_10_AWS_ARM. Defaults to the primary's cluster size. - name string
- The name of the dedicated read replica. Requires replacement if changed.
- replicas number
- The number of instances serving reads. Defaults to 1.
- branch str
- Branch name from
list_branches. Example:main. - database str
- Database name slug from
list_databases. Example:app-db. - organization str
- Organization name slug from
list_organizations. Example:acme. - 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. Requires replacement if changed. - cluster_
size str - The cluster size SKU, e.g.
PS_10_AWS_ARM. Defaults to the primary's cluster size. - name str
- The name of the dedicated read replica. Requires replacement if changed.
- replicas float
- The number of instances serving reads. Defaults to 1.
- branch String
- Branch name from
list_branches. Example:main. - database String
- Database name slug from
list_databases. Example:app-db. - organization String
- Organization name slug from
list_organizations. Example:acme. - 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. Requires replacement if changed. - cluster
Size String - The cluster size SKU, e.g.
PS_10_AWS_ARM. Defaults to the primary's cluster size. - name String
- The name of the dedicated read replica. Requires replacement if changed.
- replicas Number
- The number of instances serving reads. Defaults to 1.
Outputs
All input properties are implicitly available as output properties. Additionally, the PostgresDedicatedReadReplica resource produces the following output properties:
- Access
Host stringUrl - The database connection host for the dedicated read replica.
- Id string
- The provider-assigned unique ID for this managed resource.
- Private
Access stringHost Url - The private database connection host for the dedicated read replica.
- Private
Connection stringService Name - The service name to set up private connectivity for the dedicated read replica.
- Access
Host stringUrl - The database connection host for the dedicated read replica.
- Id string
- The provider-assigned unique ID for this managed resource.
- Private
Access stringHost Url - The private database connection host for the dedicated read replica.
- Private
Connection stringService Name - The service name to set up private connectivity for the dedicated read replica.
- access_
host_ stringurl - The database connection host for the dedicated read replica.
- id string
- The provider-assigned unique ID for this managed resource.
- private_
access_ stringhost_ url - The private database connection host for the dedicated read replica.
- private_
connection_ stringservice_ name - The service name to set up private connectivity for the dedicated read replica.
- access
Host StringUrl - The database connection host for the dedicated read replica.
- id String
- The provider-assigned unique ID for this managed resource.
- private
Access StringHost Url - The private database connection host for the dedicated read replica.
- private
Connection StringService Name - The service name to set up private connectivity for the dedicated read replica.
- access
Host stringUrl - The database connection host for the dedicated read replica.
- id string
- The provider-assigned unique ID for this managed resource.
- private
Access stringHost Url - The private database connection host for the dedicated read replica.
- private
Connection stringService Name - The service name to set up private connectivity for the dedicated read replica.
- access_
host_ strurl - The database connection host for the dedicated read replica.
- id str
- The provider-assigned unique ID for this managed resource.
- private_
access_ strhost_ url - The private database connection host for the dedicated read replica.
- private_
connection_ strservice_ name - The service name to set up private connectivity for the dedicated read replica.
- access
Host StringUrl - The database connection host for the dedicated read replica.
- id String
- The provider-assigned unique ID for this managed resource.
- private
Access StringHost Url - The private database connection host for the dedicated read replica.
- private
Connection StringService Name - The service name to set up private connectivity for the dedicated read replica.
Look up Existing PostgresDedicatedReadReplica Resource
Get an existing PostgresDedicatedReadReplica resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: PostgresDedicatedReadReplicaState, opts?: CustomResourceOptions): PostgresDedicatedReadReplica@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
access_host_url: Optional[str] = None,
branch: Optional[str] = None,
cluster_size: Optional[str] = None,
database: Optional[str] = None,
name: Optional[str] = None,
organization: Optional[str] = None,
private_access_host_url: Optional[str] = None,
private_connection_service_name: Optional[str] = None,
region: Optional[str] = None,
replicas: Optional[float] = None) -> PostgresDedicatedReadReplicafunc GetPostgresDedicatedReadReplica(ctx *Context, name string, id IDInput, state *PostgresDedicatedReadReplicaState, opts ...ResourceOption) (*PostgresDedicatedReadReplica, error)public static PostgresDedicatedReadReplica Get(string name, Input<string> id, PostgresDedicatedReadReplicaState? state, CustomResourceOptions? opts = null)public static PostgresDedicatedReadReplica get(String name, Output<String> id, PostgresDedicatedReadReplicaState state, CustomResourceOptions options)resources: existingPostgresDedicatedReadReplica: type: planetscale:PostgresDedicatedReadReplica get: id: ${id}import {
to = planetscale_postgres_dedicated_read_replica.example
id = "${id}"
}
- name string
- The unique name of the resulting resource.
- id Input<ID>
- The unique provider ID of the resource to look up.
- state PostgresDedicatedReadReplicaState
- Known property values the provider needs, along with the ID, to find the resource. Usually not required.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resulting resource.
- id str
- The unique provider ID of the resource to look up.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resulting resource.
- id IDInput
- The unique provider ID of the resource to look up.
- state PostgresDedicatedReadReplicaState
- Known property values the provider needs, along with the ID, to find the resource. Usually not required.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resulting resource.
- id Input<string>
- The unique provider ID of the resource to look up.
- state PostgresDedicatedReadReplicaState
- Known property values the provider needs, along with the ID, to find the resource. Usually not required.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resulting resource.
- id Output<String>
- The unique provider ID of the resource to look up.
- state PostgresDedicatedReadReplicaState
- Known property values the provider needs, along with the ID, to find the resource. Usually not required.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
- Access
Host stringUrl - 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. - Name string
- The name of the dedicated read replica. Requires replacement if changed.
- Organization string
- Organization name slug from
list_organizations. Example:acme. - Private
Access stringHost Url - The private database connection host for the dedicated read replica.
- Private
Connection stringService Name - 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. Requires replacement if changed. - Replicas double
- The number of instances serving reads. Defaults to 1.
- Access
Host stringUrl - 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. - Name string
- The name of the dedicated read replica. Requires replacement if changed.
- Organization string
- Organization name slug from
list_organizations. Example:acme. - Private
Access stringHost Url - The private database connection host for the dedicated read replica.
- Private
Connection stringService Name - 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. Requires replacement if changed. - Replicas float64
- The number of instances serving reads. Defaults to 1.
- access_
host_ stringurl - 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. - name string
- The name of the dedicated read replica. Requires replacement if changed.
- organization string
- Organization name slug from
list_organizations. Example:acme. - private_
access_ stringhost_ url - The private database connection host for the dedicated read replica.
- private_
connection_ stringservice_ name - 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. Requires replacement if changed. - replicas number
- The number of instances serving reads. Defaults to 1.
- access
Host StringUrl - 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. - name String
- The name of the dedicated read replica. Requires replacement if changed.
- organization String
- Organization name slug from
list_organizations. Example:acme. - private
Access StringHost Url - The private database connection host for the dedicated read replica.
- private
Connection StringService Name - 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. Requires replacement if changed. - replicas Double
- The number of instances serving reads. Defaults to 1.
- access
Host stringUrl - 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. - name string
- The name of the dedicated read replica. Requires replacement if changed.
- organization string
- Organization name slug from
list_organizations. Example:acme. - private
Access stringHost Url - The private database connection host for the dedicated read replica.
- private
Connection stringService Name - 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. Requires replacement if changed. - replicas number
- The number of instances serving reads. Defaults to 1.
- access_
host_ strurl - 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. - name str
- The name of the dedicated read replica. Requires replacement if changed.
- organization str
- Organization name slug from
list_organizations. Example:acme. - private_
access_ strhost_ url - The private database connection host for the dedicated read replica.
- private_
connection_ strservice_ name - 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. Requires replacement if changed. - replicas float
- The number of instances serving reads. Defaults to 1.
- access
Host StringUrl - 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. - name String
- The name of the dedicated read replica. Requires replacement if changed.
- organization String
- Organization name slug from
list_organizations. Example:acme. - private
Access StringHost Url - The private database connection host for the dedicated read replica.
- private
Connection StringService Name - 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. Requires replacement if changed. - replicas Number
- The number of instances serving reads. Defaults to 1.
Import
In Terraform v1.5.0 and later, the import block can be used with the id attribute, for example:
terraform
import {
to = planetscale_postgres_dedicated_read_replica.my_planetscale_postgres_dedicated_read_replica
id = jsonencode({
branch = "..."
database = "..."
name = "..."
organization = "..."
})
}
The pulumi import command can be used, for example:
$ pulumi import planetscale:index/postgresDedicatedReadReplica:PostgresDedicatedReadReplica my_planetscale_postgres_dedicated_read_replica '{"branch": "...", "database": "...", "name": "...", "organization": "..."}'
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- planetscale planetscale/terraform-provider-planetscale
- License
- Notes
- This Pulumi package is based on the
planetscaleTerraform Provider.
published on Thursday, Nov 12, 2026 by planetscale