DatabaseReplica

Provides a DigitalOcean database replica resource.

Example Usage

Create a new PostgreSQL database replica

using Pulumi;
using DigitalOcean = Pulumi.DigitalOcean;

class MyStack : Stack
{
    public MyStack()
    {
        var postgres_example = new DigitalOcean.DatabaseCluster("postgres-example", new DigitalOcean.DatabaseClusterArgs
        {
            Engine = "pg",
            Version = "11",
            Size = "db-s-1vcpu-1gb",
            Region = "nyc1",
            NodeCount = 1,
        });
        var read_replica = new DigitalOcean.DatabaseReplica("read-replica", new DigitalOcean.DatabaseReplicaArgs
        {
            ClusterId = postgres_example.Id,
            Size = "db-s-1vcpu-1gb",
            Region = "nyc1",
        });
    }

}

Coming soon!

import pulumi
import pulumi_digitalocean as digitalocean

postgres_example = digitalocean.DatabaseCluster("postgres-example",
    engine="pg",
    version="11",
    size="db-s-1vcpu-1gb",
    region="nyc1",
    node_count=1)
read_replica = digitalocean.DatabaseReplica("read-replica",
    cluster_id=postgres_example.id,
    size="db-s-1vcpu-1gb",
    region="nyc1")
import * as pulumi from "@pulumi/pulumi";
import * as digitalocean from "@pulumi/digitalocean";

const postgres_example = new digitalocean.DatabaseCluster("postgres-example", {
    engine: "pg",
    version: "11",
    size: "db-s-1vcpu-1gb",
    region: "nyc1",
    nodeCount: 1,
});
const read_replica = new digitalocean.DatabaseReplica("read-replica", {
    clusterId: postgres_example.id,
    size: "db-s-1vcpu-1gb",
    region: "nyc1",
});

Create a DatabaseReplica Resource

def DatabaseReplica(resource_name, opts=None, cluster_id=None, name=None, private_network_uuid=None, region=None, size=None, tags=None, __props__=None);
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.
opts ResourceOptions
A bag of options that control this 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.

DatabaseReplica Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

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
Region string

DigitalOcean region where the replica will reside.

Size string

Database Droplet size associated with the replica (ex. db-s-1vcpu-1gb).

Tags List<string>
ClusterId string

The ID of the original source database cluster.

Name string

The name for the database replica.

PrivateNetworkUuid string
Region string

DigitalOcean region where the replica will reside.

Size string

Database Droplet size associated with the replica (ex. db-s-1vcpu-1gb).

Tags []string
clusterId string

The ID of the original source database cluster.

name string

The name for the database replica.

privateNetworkUuid string
region Region

DigitalOcean region where the replica will reside.

size DatabaseSlug

Database Droplet size associated with the replica (ex. db-s-1vcpu-1gb).

tags string[]
cluster_id str

The ID of the original source database cluster.

name str

The name for the database replica.

private_network_uuid str
region str

DigitalOcean region where the replica will reside.

size str

Database Droplet size associated with the replica (ex. db-s-1vcpu-1gb).

tags List[str]

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.

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.

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.

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 float

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.

Look up an 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
static get(resource_name, id, opts=None, cluster_id=None, database=None, host=None, name=None, password=None, port=None, private_host=None, private_network_uuid=None, private_uri=None, region=None, size=None, tags=None, uri=None, user=None, __props__=None);
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)
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.

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
PrivateUri string

Same as uri, but only accessible from resources within the account and in the same region.

Region string

DigitalOcean region where the replica will reside.

Size string

Database Droplet size associated with the replica (ex. db-s-1vcpu-1gb).

Tags List<string>
Uri string

The full URI for connecting to the database replica.

User string

Username for the replica’s default user.

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
PrivateUri string

Same as uri, but only accessible from resources within the account and in the same region.

Region string

DigitalOcean region where the replica will reside.

Size string

Database Droplet size associated with the replica (ex. db-s-1vcpu-1gb).

Tags []string
Uri string

The full URI for connecting to the database replica.

User string

Username for the replica’s default user.

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
privateUri string

Same as uri, but only accessible from resources within the account and in the same region.

region Region

DigitalOcean region where the replica will reside.

size DatabaseSlug

Database Droplet size associated with the replica (ex. db-s-1vcpu-1gb).

tags string[]
uri string

The full URI for connecting to the database replica.

user string

Username for the replica’s default user.

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 float

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
private_uri str

Same as uri, but only accessible from resources within the account and in the same region.

region str

DigitalOcean region where the replica will reside.

size str

Database Droplet size associated with the replica (ex. db-s-1vcpu-1gb).

tags List[str]
uri str

The full URI for connecting to the database replica.

user str

Username for the replica’s default user.

Package Details

Repository
https://github.com/pulumi/pulumi-digitalocean
License
Apache-2.0
Notes
This Pulumi package is based on the digitalocean Terraform Provider.