1. Packages
  2. Digitalocean Provider
  3. API Docs
  4. DatabaseReplica
DigitalOcean v4.35.0 published on Tuesday, Nov 19, 2024 by Pulumi

digitalocean.DatabaseReplica

Explore with Pulumi AI

digitalocean logo
DigitalOcean v4.35.0 published on Tuesday, Nov 19, 2024 by Pulumi

    Provides a DigitalOcean database replica resource.

    Example Usage

    Create a new PostgreSQL database replica

    import * as pulumi from "@pulumi/pulumi";
    import * as digitalocean from "@pulumi/digitalocean";
    
    const postgres_example = new digitalocean.DatabaseCluster("postgres-example", {
        name: "example-postgres-cluster",
        engine: "pg",
        version: "15",
        size: digitalocean.DatabaseSlug.DB_1VPCU1GB,
        region: digitalocean.Region.NYC1,
        nodeCount: 1,
    });
    const replica_example = new digitalocean.DatabaseReplica("replica-example", {
        clusterId: postgres_example.id,
        name: "replica-example",
        size: digitalocean.DatabaseSlug.DB_1VPCU1GB,
        region: digitalocean.Region.NYC1,
    });
    export const UUID = replica_example.uuid;
    // Create firewall rule for database replica
    const example_fw = new digitalocean.DatabaseFirewall("example-fw", {
        clusterId: replica_example.uuid,
        rules: [{
            type: "ip_addr",
            value: "192.168.1.1",
        }],
    });
    
    import pulumi
    import pulumi_digitalocean as digitalocean
    
    postgres_example = digitalocean.DatabaseCluster("postgres-example",
        name="example-postgres-cluster",
        engine="pg",
        version="15",
        size=digitalocean.DatabaseSlug.D_B_1_VPCU1_GB,
        region=digitalocean.Region.NYC1,
        node_count=1)
    replica_example = digitalocean.DatabaseReplica("replica-example",
        cluster_id=postgres_example.id,
        name="replica-example",
        size=digitalocean.DatabaseSlug.D_B_1_VPCU1_GB,
        region=digitalocean.Region.NYC1)
    pulumi.export("UUID", replica_example.uuid)
    # Create firewall rule for database replica
    example_fw = digitalocean.DatabaseFirewall("example-fw",
        cluster_id=replica_example.uuid,
        rules=[{
            "type": "ip_addr",
            "value": "192.168.1.1",
        }])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-digitalocean/sdk/v4/go/digitalocean"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := digitalocean.NewDatabaseCluster(ctx, "postgres-example", &digitalocean.DatabaseClusterArgs{
    			Name:      pulumi.String("example-postgres-cluster"),
    			Engine:    pulumi.String("pg"),
    			Version:   pulumi.String("15"),
    			Size:      pulumi.String(digitalocean.DatabaseSlug_DB_1VPCU1GB),
    			Region:    pulumi.String(digitalocean.RegionNYC1),
    			NodeCount: pulumi.Int(1),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = digitalocean.NewDatabaseReplica(ctx, "replica-example", &digitalocean.DatabaseReplicaArgs{
    			ClusterId: postgres_example.ID(),
    			Name:      pulumi.String("replica-example"),
    			Size:      pulumi.String(digitalocean.DatabaseSlug_DB_1VPCU1GB),
    			Region:    pulumi.String(digitalocean.RegionNYC1),
    		})
    		if err != nil {
    			return err
    		}
    		ctx.Export("UUID", replica_example.Uuid)
    		// Create firewall rule for database replica
    		_, err = digitalocean.NewDatabaseFirewall(ctx, "example-fw", &digitalocean.DatabaseFirewallArgs{
    			ClusterId: replica_example.Uuid,
    			Rules: digitalocean.DatabaseFirewallRuleArray{
    				&digitalocean.DatabaseFirewallRuleArgs{
    					Type:  pulumi.String("ip_addr"),
    					Value: pulumi.String("192.168.1.1"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using DigitalOcean = Pulumi.DigitalOcean;
    
    return await Deployment.RunAsync(() => 
    {
        var postgres_example = new DigitalOcean.DatabaseCluster("postgres-example", new()
        {
            Name = "example-postgres-cluster",
            Engine = "pg",
            Version = "15",
            Size = DigitalOcean.DatabaseSlug.DB_1VPCU1GB,
            Region = DigitalOcean.Region.NYC1,
            NodeCount = 1,
        });
    
        var replica_example = new DigitalOcean.DatabaseReplica("replica-example", new()
        {
            ClusterId = postgres_example.Id,
            Name = "replica-example",
            Size = DigitalOcean.DatabaseSlug.DB_1VPCU1GB,
            Region = DigitalOcean.Region.NYC1,
        });
    
        // Create firewall rule for database replica
        var example_fw = new DigitalOcean.DatabaseFirewall("example-fw", new()
        {
            ClusterId = replica_example.Uuid,
            Rules = new[]
            {
                new DigitalOcean.Inputs.DatabaseFirewallRuleArgs
                {
                    Type = "ip_addr",
                    Value = "192.168.1.1",
                },
            },
        });
    
        return new Dictionary<string, object?>
        {
            ["UUID"] = replica_example.Uuid,
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.digitalocean.DatabaseCluster;
    import com.pulumi.digitalocean.DatabaseClusterArgs;
    import com.pulumi.digitalocean.DatabaseReplica;
    import com.pulumi.digitalocean.DatabaseReplicaArgs;
    import com.pulumi.digitalocean.DatabaseFirewall;
    import com.pulumi.digitalocean.DatabaseFirewallArgs;
    import com.pulumi.digitalocean.inputs.DatabaseFirewallRuleArgs;
    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) {
            var postgres_example = new DatabaseCluster("postgres-example", DatabaseClusterArgs.builder()
                .name("example-postgres-cluster")
                .engine("pg")
                .version("15")
                .size("db-s-1vcpu-1gb")
                .region("nyc1")
                .nodeCount(1)
                .build());
    
            var replica_example = new DatabaseReplica("replica-example", DatabaseReplicaArgs.builder()
                .clusterId(postgres_example.id())
                .name("replica-example")
                .size("db-s-1vcpu-1gb")
                .region("nyc1")
                .build());
    
            ctx.export("UUID", replica_example.uuid());
            // Create firewall rule for database replica
            var example_fw = new DatabaseFirewall("example-fw", DatabaseFirewallArgs.builder()
                .clusterId(replica_example.uuid())
                .rules(DatabaseFirewallRuleArgs.builder()
                    .type("ip_addr")
                    .value("192.168.1.1")
                    .build())
                .build());
    
        }
    }
    
    resources:
      postgres-example:
        type: digitalocean:DatabaseCluster
        properties:
          name: example-postgres-cluster
          engine: pg
          version: '15'
          size: db-s-1vcpu-1gb
          region: nyc1
          nodeCount: 1
      replica-example:
        type: digitalocean:DatabaseReplica
        properties:
          clusterId: ${["postgres-example"].id}
          name: replica-example
          size: db-s-1vcpu-1gb
          region: nyc1
      # Create firewall rule for database replica
      example-fw:
        type: digitalocean:DatabaseFirewall
        properties:
          clusterId: ${["replica-example"].uuid}
          rules:
            - type: ip_addr
              value: 192.168.1.1
    outputs:
      UUID: ${["replica-example"].uuid}
    

    Create DatabaseReplica Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new DatabaseReplica(name: string, args: DatabaseReplicaArgs, opts?: CustomResourceOptions);
    @overload
    def DatabaseReplica(resource_name: str,
                        args: DatabaseReplicaArgs,
                        opts: Optional[ResourceOptions] = None)
    
    @overload
    def DatabaseReplica(resource_name: str,
                        opts: Optional[ResourceOptions] = None,
                        cluster_id: Optional[str] = None,
                        name: Optional[str] = None,
                        private_network_uuid: Optional[str] = None,
                        region: Optional[Union[str, Region]] = None,
                        size: Optional[Union[str, DatabaseSlug]] = None,
                        storage_size_mib: Optional[str] = None,
                        tags: Optional[Sequence[str]] = None)
    func NewDatabaseReplica(ctx *Context, name string, args DatabaseReplicaArgs, opts ...ResourceOption) (*DatabaseReplica, error)
    public DatabaseReplica(string name, DatabaseReplicaArgs args, CustomResourceOptions? opts = null)
    public DatabaseReplica(String name, DatabaseReplicaArgs args)
    public DatabaseReplica(String name, DatabaseReplicaArgs args, CustomResourceOptions options)
    
    type: digitalocean:DatabaseReplica
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args DatabaseReplicaArgs
    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 DatabaseReplicaArgs
    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 DatabaseReplicaArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args DatabaseReplicaArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args DatabaseReplicaArgs
    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 databaseReplicaResource = new DigitalOcean.DatabaseReplica("databaseReplicaResource", new()
    {
        ClusterId = "string",
        Name = "string",
        PrivateNetworkUuid = "string",
        Region = "string",
        Size = "string",
        StorageSizeMib = "string",
        Tags = new[]
        {
            "string",
        },
    });
    
    example, err := digitalocean.NewDatabaseReplica(ctx, "databaseReplicaResource", &digitalocean.DatabaseReplicaArgs{
    	ClusterId:          pulumi.String("string"),
    	Name:               pulumi.String("string"),
    	PrivateNetworkUuid: pulumi.String("string"),
    	Region:             pulumi.String("string"),
    	Size:               pulumi.String("string"),
    	StorageSizeMib:     pulumi.String("string"),
    	Tags: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    })
    
    var databaseReplicaResource = new DatabaseReplica("databaseReplicaResource", DatabaseReplicaArgs.builder()
        .clusterId("string")
        .name("string")
        .privateNetworkUuid("string")
        .region("string")
        .size("string")
        .storageSizeMib("string")
        .tags("string")
        .build());
    
    database_replica_resource = digitalocean.DatabaseReplica("databaseReplicaResource",
        cluster_id="string",
        name="string",
        private_network_uuid="string",
        region="string",
        size="string",
        storage_size_mib="string",
        tags=["string"])
    
    const databaseReplicaResource = new digitalocean.DatabaseReplica("databaseReplicaResource", {
        clusterId: "string",
        name: "string",
        privateNetworkUuid: "string",
        region: "string",
        size: "string",
        storageSizeMib: "string",
        tags: ["string"],
    });
    
    type: digitalocean:DatabaseReplica
    properties:
        clusterId: string
        name: string
        privateNetworkUuid: string
        region: string
        size: string
        storageSizeMib: string
        tags:
            - string
    

    DatabaseReplica 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 DatabaseReplica resource accepts the following input properties:

    ClusterId string
    The ID of the original source database cluster.
    Name string
    The name for the database replica.
    PrivateNetworkUuid string
    The ID of the VPC where the database replica will be located.
    Region string | Pulumi.DigitalOcean.Region
    DigitalOcean region where the replica will reside.
    Size string | Pulumi.DigitalOcean.DatabaseSlug
    Database Droplet size associated with the replica (ex. db-s-1vcpu-1gb). Note that when resizing an existing replica, its size can only be increased. Decreasing its size is not supported.
    StorageSizeMib string
    Tags List<string>
    A list of tag names to be applied to the database replica.
    ClusterId string
    The ID of the original source database cluster.
    Name string
    The name for the database replica.
    PrivateNetworkUuid string
    The ID of the VPC where the database replica will be located.
    Region string | Region
    DigitalOcean region where the replica will reside.
    Size string | DatabaseSlug
    Database Droplet size associated with the replica (ex. db-s-1vcpu-1gb). Note that when resizing an existing replica, its size can only be increased. Decreasing its size is not supported.
    StorageSizeMib string
    Tags []string
    A list of tag names to be applied to the database replica.
    clusterId String
    The ID of the original source database cluster.
    name String
    The name for the database replica.
    privateNetworkUuid String
    The ID of the VPC where the database replica will be located.
    region String | Region
    DigitalOcean region where the replica will reside.
    size String | DatabaseSlug
    Database Droplet size associated with the replica (ex. db-s-1vcpu-1gb). Note that when resizing an existing replica, its size can only be increased. Decreasing its size is not supported.
    storageSizeMib String
    tags List<String>
    A list of tag names to be applied to the database replica.
    clusterId string
    The ID of the original source database cluster.
    name string
    The name for the database replica.
    privateNetworkUuid string
    The ID of the VPC where the database replica will be located.
    region string | Region
    DigitalOcean region where the replica will reside.
    size string | DatabaseSlug
    Database Droplet size associated with the replica (ex. db-s-1vcpu-1gb). Note that when resizing an existing replica, its size can only be increased. Decreasing its size is not supported.
    storageSizeMib string
    tags string[]
    A list of tag names to be applied to the database replica.
    cluster_id str
    The ID of the original source database cluster.
    name str
    The name for the database replica.
    private_network_uuid str
    The ID of the VPC where the database replica will be located.
    region str | Region
    DigitalOcean region where the replica will reside.
    size str | DatabaseSlug
    Database Droplet size associated with the replica (ex. db-s-1vcpu-1gb). Note that when resizing an existing replica, its size can only be increased. Decreasing its size is not supported.
    storage_size_mib str
    tags Sequence[str]
    A list of tag names to be applied to the database replica.
    clusterId String
    The ID of the original source database cluster.
    name String
    The name for the database replica.
    privateNetworkUuid String
    The ID of the VPC where the database replica will be located.
    region String | "nyc1" | "nyc2" | "nyc3" | "sgp1" | "lon1" | "ams2" | "ams3" | "fra1" | "tor1" | "sfo1" | "sfo2" | "sfo3" | "blr1" | "syd1"
    DigitalOcean region where the replica will reside.
    size String | "db-s-1vcpu-1gb" | "db-s-1vcpu-2gb" | "db-s-2vcpu-4gb" | "db-s-4vcpu-8gb" | "db-s-6vcpu-16gb" | "db-s-8vcpu-32gb" | "db-s-16vcpu-64gb"
    Database Droplet size associated with the replica (ex. db-s-1vcpu-1gb). Note that when resizing an existing replica, its size can only be increased. Decreasing its size is not supported.
    storageSizeMib String
    tags List<String>
    A list of tag names to be applied to the database replica.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the DatabaseReplica resource produces the following output properties:

    Database string
    Name of the replica's default database.
    Host string
    Database replica's hostname.
    Id string
    The provider-assigned unique ID for this managed resource.
    Password string
    Password for the replica's default user.
    Port int
    Network port that the database replica is listening on.
    PrivateHost string
    Same as host, but only accessible from resources within the account and in the same region.
    PrivateUri string
    Same as uri, but only accessible from resources within the account and in the same region.
    Uri string
    The full URI for connecting to the database replica.
    User string
    Username for the replica's default user.
    Uuid string
    The UUID of the database replica. The uuid can be used to reference the database replica as the target database cluster in other resources. See example "Create firewall rule for database replica" above.
    Database string
    Name of the replica's default database.
    Host string
    Database replica's hostname.
    Id string
    The provider-assigned unique ID for this managed resource.
    Password string
    Password for the replica's default user.
    Port int
    Network port that the database replica is listening on.
    PrivateHost string
    Same as host, but only accessible from resources within the account and in the same region.
    PrivateUri string
    Same as uri, but only accessible from resources within the account and in the same region.
    Uri string
    The full URI for connecting to the database replica.
    User string
    Username for the replica's default user.
    Uuid string
    The UUID of the database replica. The uuid can be used to reference the database replica as the target database cluster in other resources. See example "Create firewall rule for database replica" above.
    database String
    Name of the replica's default database.
    host String
    Database replica's hostname.
    id String
    The provider-assigned unique ID for this managed resource.
    password String
    Password for the replica's default user.
    port Integer
    Network port that the database replica is listening on.
    privateHost String
    Same as host, but only accessible from resources within the account and in the same region.
    privateUri String
    Same as uri, but only accessible from resources within the account and in the same region.
    uri String
    The full URI for connecting to the database replica.
    user String
    Username for the replica's default user.
    uuid String
    The UUID of the database replica. The uuid can be used to reference the database replica as the target database cluster in other resources. See example "Create firewall rule for database replica" above.
    database string
    Name of the replica's default database.
    host string
    Database replica's hostname.
    id string
    The provider-assigned unique ID for this managed resource.
    password string
    Password for the replica's default user.
    port number
    Network port that the database replica is listening on.
    privateHost string
    Same as host, but only accessible from resources within the account and in the same region.
    privateUri string
    Same as uri, but only accessible from resources within the account and in the same region.
    uri string
    The full URI for connecting to the database replica.
    user string
    Username for the replica's default user.
    uuid string
    The UUID of the database replica. The uuid can be used to reference the database replica as the target database cluster in other resources. See example "Create firewall rule for database replica" above.
    database str
    Name of the replica's default database.
    host str
    Database replica's hostname.
    id str
    The provider-assigned unique ID for this managed resource.
    password str
    Password for the replica's default user.
    port int
    Network port that the database replica is listening on.
    private_host str
    Same as host, but only accessible from resources within the account and in the same region.
    private_uri str
    Same as uri, but only accessible from resources within the account and in the same region.
    uri str
    The full URI for connecting to the database replica.
    user str
    Username for the replica's default user.
    uuid str
    The UUID of the database replica. The uuid can be used to reference the database replica as the target database cluster in other resources. See example "Create firewall rule for database replica" above.
    database String
    Name of the replica's default database.
    host String
    Database replica's hostname.
    id String
    The provider-assigned unique ID for this managed resource.
    password String
    Password for the replica's default user.
    port Number
    Network port that the database replica is listening on.
    privateHost String
    Same as host, but only accessible from resources within the account and in the same region.
    privateUri String
    Same as uri, but only accessible from resources within the account and in the same region.
    uri String
    The full URI for connecting to the database replica.
    user String
    Username for the replica's default user.
    uuid String
    The UUID of the database replica. The uuid can be used to reference the database replica as the target database cluster in other resources. See example "Create firewall rule for database replica" above.

    Look up Existing DatabaseReplica Resource

    Get an existing DatabaseReplica 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?: DatabaseReplicaState, opts?: CustomResourceOptions): DatabaseReplica
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            cluster_id: Optional[str] = None,
            database: Optional[str] = None,
            host: Optional[str] = None,
            name: Optional[str] = None,
            password: Optional[str] = None,
            port: Optional[int] = None,
            private_host: Optional[str] = None,
            private_network_uuid: Optional[str] = None,
            private_uri: Optional[str] = None,
            region: Optional[Union[str, Region]] = None,
            size: Optional[Union[str, DatabaseSlug]] = None,
            storage_size_mib: Optional[str] = None,
            tags: Optional[Sequence[str]] = None,
            uri: Optional[str] = None,
            user: Optional[str] = None,
            uuid: Optional[str] = None) -> DatabaseReplica
    func GetDatabaseReplica(ctx *Context, name string, id IDInput, state *DatabaseReplicaState, opts ...ResourceOption) (*DatabaseReplica, error)
    public static DatabaseReplica Get(string name, Input<string> id, DatabaseReplicaState? state, CustomResourceOptions? opts = null)
    public static DatabaseReplica get(String name, Output<String> id, DatabaseReplicaState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    ClusterId string
    The ID of the original source database cluster.
    Database string
    Name of the replica's default database.
    Host string
    Database replica's hostname.
    Name string
    The name for the database replica.
    Password string
    Password for the replica's default user.
    Port int
    Network port that the database replica is listening on.
    PrivateHost string
    Same as host, but only accessible from resources within the account and in the same region.
    PrivateNetworkUuid string
    The ID of the VPC where the database replica will be located.
    PrivateUri string
    Same as uri, but only accessible from resources within the account and in the same region.
    Region string | Pulumi.DigitalOcean.Region
    DigitalOcean region where the replica will reside.
    Size string | Pulumi.DigitalOcean.DatabaseSlug
    Database Droplet size associated with the replica (ex. db-s-1vcpu-1gb). Note that when resizing an existing replica, its size can only be increased. Decreasing its size is not supported.
    StorageSizeMib string
    Tags List<string>
    A list of tag names to be applied to the database replica.
    Uri string
    The full URI for connecting to the database replica.
    User string
    Username for the replica's default user.
    Uuid string
    The UUID of the database replica. The uuid can be used to reference the database replica as the target database cluster in other resources. See example "Create firewall rule for database replica" above.
    ClusterId string
    The ID of the original source database cluster.
    Database string
    Name of the replica's default database.
    Host string
    Database replica's hostname.
    Name string
    The name for the database replica.
    Password string
    Password for the replica's default user.
    Port int
    Network port that the database replica is listening on.
    PrivateHost string
    Same as host, but only accessible from resources within the account and in the same region.
    PrivateNetworkUuid string
    The ID of the VPC where the database replica will be located.
    PrivateUri string
    Same as uri, but only accessible from resources within the account and in the same region.
    Region string | Region
    DigitalOcean region where the replica will reside.
    Size string | DatabaseSlug
    Database Droplet size associated with the replica (ex. db-s-1vcpu-1gb). Note that when resizing an existing replica, its size can only be increased. Decreasing its size is not supported.
    StorageSizeMib string
    Tags []string
    A list of tag names to be applied to the database replica.
    Uri string
    The full URI for connecting to the database replica.
    User string
    Username for the replica's default user.
    Uuid string
    The UUID of the database replica. The uuid can be used to reference the database replica as the target database cluster in other resources. See example "Create firewall rule for database replica" above.
    clusterId String
    The ID of the original source database cluster.
    database String
    Name of the replica's default database.
    host String
    Database replica's hostname.
    name String
    The name for the database replica.
    password String
    Password for the replica's default user.
    port Integer
    Network port that the database replica is listening on.
    privateHost String
    Same as host, but only accessible from resources within the account and in the same region.
    privateNetworkUuid String
    The ID of the VPC where the database replica will be located.
    privateUri String
    Same as uri, but only accessible from resources within the account and in the same region.
    region String | Region
    DigitalOcean region where the replica will reside.
    size String | DatabaseSlug
    Database Droplet size associated with the replica (ex. db-s-1vcpu-1gb). Note that when resizing an existing replica, its size can only be increased. Decreasing its size is not supported.
    storageSizeMib String
    tags List<String>
    A list of tag names to be applied to the database replica.
    uri String
    The full URI for connecting to the database replica.
    user String
    Username for the replica's default user.
    uuid String
    The UUID of the database replica. The uuid can be used to reference the database replica as the target database cluster in other resources. See example "Create firewall rule for database replica" above.
    clusterId string
    The ID of the original source database cluster.
    database string
    Name of the replica's default database.
    host string
    Database replica's hostname.
    name string
    The name for the database replica.
    password string
    Password for the replica's default user.
    port number
    Network port that the database replica is listening on.
    privateHost string
    Same as host, but only accessible from resources within the account and in the same region.
    privateNetworkUuid string
    The ID of the VPC where the database replica will be located.
    privateUri string
    Same as uri, but only accessible from resources within the account and in the same region.
    region string | Region
    DigitalOcean region where the replica will reside.
    size string | DatabaseSlug
    Database Droplet size associated with the replica (ex. db-s-1vcpu-1gb). Note that when resizing an existing replica, its size can only be increased. Decreasing its size is not supported.
    storageSizeMib string
    tags string[]
    A list of tag names to be applied to the database replica.
    uri string
    The full URI for connecting to the database replica.
    user string
    Username for the replica's default user.
    uuid string
    The UUID of the database replica. The uuid can be used to reference the database replica as the target database cluster in other resources. See example "Create firewall rule for database replica" above.
    cluster_id str
    The ID of the original source database cluster.
    database str
    Name of the replica's default database.
    host str
    Database replica's hostname.
    name str
    The name for the database replica.
    password str
    Password for the replica's default user.
    port int
    Network port that the database replica is listening on.
    private_host str
    Same as host, but only accessible from resources within the account and in the same region.
    private_network_uuid str
    The ID of the VPC where the database replica will be located.
    private_uri str
    Same as uri, but only accessible from resources within the account and in the same region.
    region str | Region
    DigitalOcean region where the replica will reside.
    size str | DatabaseSlug
    Database Droplet size associated with the replica (ex. db-s-1vcpu-1gb). Note that when resizing an existing replica, its size can only be increased. Decreasing its size is not supported.
    storage_size_mib str
    tags Sequence[str]
    A list of tag names to be applied to the database replica.
    uri str
    The full URI for connecting to the database replica.
    user str
    Username for the replica's default user.
    uuid str
    The UUID of the database replica. The uuid can be used to reference the database replica as the target database cluster in other resources. See example "Create firewall rule for database replica" above.
    clusterId String
    The ID of the original source database cluster.
    database String
    Name of the replica's default database.
    host String
    Database replica's hostname.
    name String
    The name for the database replica.
    password String
    Password for the replica's default user.
    port Number
    Network port that the database replica is listening on.
    privateHost String
    Same as host, but only accessible from resources within the account and in the same region.
    privateNetworkUuid String
    The ID of the VPC where the database replica will be located.
    privateUri String
    Same as uri, but only accessible from resources within the account and in the same region.
    region String | "nyc1" | "nyc2" | "nyc3" | "sgp1" | "lon1" | "ams2" | "ams3" | "fra1" | "tor1" | "sfo1" | "sfo2" | "sfo3" | "blr1" | "syd1"
    DigitalOcean region where the replica will reside.
    size String | "db-s-1vcpu-1gb" | "db-s-1vcpu-2gb" | "db-s-2vcpu-4gb" | "db-s-4vcpu-8gb" | "db-s-6vcpu-16gb" | "db-s-8vcpu-32gb" | "db-s-16vcpu-64gb"
    Database Droplet size associated with the replica (ex. db-s-1vcpu-1gb). Note that when resizing an existing replica, its size can only be increased. Decreasing its size is not supported.
    storageSizeMib String
    tags List<String>
    A list of tag names to be applied to the database replica.
    uri String
    The full URI for connecting to the database replica.
    user String
    Username for the replica's default user.
    uuid String
    The UUID of the database replica. The uuid can be used to reference the database replica as the target database cluster in other resources. See example "Create firewall rule for database replica" above.

    Supporting Types

    DatabaseSlug, DatabaseSlugArgs

    DB_1VPCU1GB
    db-s-1vcpu-1gb
    DB_1VPCU2GB
    db-s-1vcpu-2gb
    DB_2VPCU4GB
    db-s-2vcpu-4gb
    DB_4VPCU8GB
    db-s-4vcpu-8gb
    DB_6VPCU16GB
    db-s-6vcpu-16gb
    DB_8VPCU32GB
    db-s-8vcpu-32gb
    DB_16VPCU64GB
    db-s-16vcpu-64gb
    DatabaseSlug_DB_1VPCU1GB
    db-s-1vcpu-1gb
    DatabaseSlug_DB_1VPCU2GB
    db-s-1vcpu-2gb
    DatabaseSlug_DB_2VPCU4GB
    db-s-2vcpu-4gb
    DatabaseSlug_DB_4VPCU8GB
    db-s-4vcpu-8gb
    DatabaseSlug_DB_6VPCU16GB
    db-s-6vcpu-16gb
    DatabaseSlug_DB_8VPCU32GB
    db-s-8vcpu-32gb
    DatabaseSlug_DB_16VPCU64GB
    db-s-16vcpu-64gb
    DB_1VPCU1GB
    db-s-1vcpu-1gb
    DB_1VPCU2GB
    db-s-1vcpu-2gb
    DB_2VPCU4GB
    db-s-2vcpu-4gb
    DB_4VPCU8GB
    db-s-4vcpu-8gb
    DB_6VPCU16GB
    db-s-6vcpu-16gb
    DB_8VPCU32GB
    db-s-8vcpu-32gb
    DB_16VPCU64GB
    db-s-16vcpu-64gb
    DB_1VPCU1GB
    db-s-1vcpu-1gb
    DB_1VPCU2GB
    db-s-1vcpu-2gb
    DB_2VPCU4GB
    db-s-2vcpu-4gb
    DB_4VPCU8GB
    db-s-4vcpu-8gb
    DB_6VPCU16GB
    db-s-6vcpu-16gb
    DB_8VPCU32GB
    db-s-8vcpu-32gb
    DB_16VPCU64GB
    db-s-16vcpu-64gb
    D_B_1_VPCU1_GB
    db-s-1vcpu-1gb
    D_B_1_VPCU2_GB
    db-s-1vcpu-2gb
    D_B_2_VPCU4_GB
    db-s-2vcpu-4gb
    D_B_4_VPCU8_GB
    db-s-4vcpu-8gb
    D_B_6_VPCU16_GB
    db-s-6vcpu-16gb
    D_B_8_VPCU32_GB
    db-s-8vcpu-32gb
    D_B_16_VPCU64_GB
    db-s-16vcpu-64gb
    "db-s-1vcpu-1gb"
    db-s-1vcpu-1gb
    "db-s-1vcpu-2gb"
    db-s-1vcpu-2gb
    "db-s-2vcpu-4gb"
    db-s-2vcpu-4gb
    "db-s-4vcpu-8gb"
    db-s-4vcpu-8gb
    "db-s-6vcpu-16gb"
    db-s-6vcpu-16gb
    "db-s-8vcpu-32gb"
    db-s-8vcpu-32gb
    "db-s-16vcpu-64gb"
    db-s-16vcpu-64gb

    Region, RegionArgs

    NYC1
    nyc1
    NYC2
    nyc2
    NYC3
    nyc3
    SGP1
    sgp1
    LON1
    lon1
    AMS2
    ams2
    AMS3
    ams3
    FRA1
    fra1
    TOR1
    tor1
    SFO1
    sfo1
    SFO2
    sfo2
    SFO3
    sfo3
    BLR1
    blr1
    SYD1
    syd1
    RegionNYC1
    nyc1
    RegionNYC2
    nyc2
    RegionNYC3
    nyc3
    RegionSGP1
    sgp1
    RegionLON1
    lon1
    RegionAMS2
    ams2
    RegionAMS3
    ams3
    RegionFRA1
    fra1
    RegionTOR1
    tor1
    RegionSFO1
    sfo1
    RegionSFO2
    sfo2
    RegionSFO3
    sfo3
    RegionBLR1
    blr1
    RegionSYD1
    syd1
    NYC1
    nyc1
    NYC2
    nyc2
    NYC3
    nyc3
    SGP1
    sgp1
    LON1
    lon1
    AMS2
    ams2
    AMS3
    ams3
    FRA1
    fra1
    TOR1
    tor1
    SFO1
    sfo1
    SFO2
    sfo2
    SFO3
    sfo3
    BLR1
    blr1
    SYD1
    syd1
    NYC1
    nyc1
    NYC2
    nyc2
    NYC3
    nyc3
    SGP1
    sgp1
    LON1
    lon1
    AMS2
    ams2
    AMS3
    ams3
    FRA1
    fra1
    TOR1
    tor1
    SFO1
    sfo1
    SFO2
    sfo2
    SFO3
    sfo3
    BLR1
    blr1
    SYD1
    syd1
    NYC1
    nyc1
    NYC2
    nyc2
    NYC3
    nyc3
    SGP1
    sgp1
    LON1
    lon1
    AMS2
    ams2
    AMS3
    ams3
    FRA1
    fra1
    TOR1
    tor1
    SFO1
    sfo1
    SFO2
    sfo2
    SFO3
    sfo3
    BLR1
    blr1
    SYD1
    syd1
    "nyc1"
    nyc1
    "nyc2"
    nyc2
    "nyc3"
    nyc3
    "sgp1"
    sgp1
    "lon1"
    lon1
    "ams2"
    ams2
    "ams3"
    ams3
    "fra1"
    fra1
    "tor1"
    tor1
    "sfo1"
    sfo1
    "sfo2"
    sfo2
    "sfo3"
    sfo3
    "blr1"
    blr1
    "syd1"
    syd1

    Import

    Database replicas can be imported using the id of the source database cluster

    and the name of the replica joined with a comma. For example:

    $ pulumi import digitalocean:index/databaseReplica:DatabaseReplica read-replica 245bcfd0-7f31-4ce6-a2bc-475a116cca97,read-replica
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    DigitalOcean pulumi/pulumi-digitalocean
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the digitalocean Terraform Provider.
    digitalocean logo
    DigitalOcean v4.35.0 published on Tuesday, Nov 19, 2024 by Pulumi