Show / Hide Table of Contents

Class 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",
    });
}

}
Inheritance
System.Object
Resource
CustomResource
DatabaseReplica
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.DigitalOcean
Assembly: Pulumi.DigitalOcean.dll
Syntax
public class DatabaseReplica : CustomResource

Constructors

View Source

DatabaseReplica(String, DatabaseReplicaArgs, CustomResourceOptions)

Create a DatabaseReplica resource with the given unique name, arguments, and options.

Declaration
public DatabaseReplica(string name, DatabaseReplicaArgs args, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resource

DatabaseReplicaArgs args

The arguments used to populate this resource's properties

CustomResourceOptions options

A bag of options that control this resource's behavior

Properties

View Source

ClusterId

The ID of the original source database cluster.

Declaration
public Output<string> ClusterId { get; }
Property Value
Type Description
Output<System.String>
View Source

Database

Name of the replica's default database.

Declaration
public Output<string> Database { get; }
Property Value
Type Description
Output<System.String>
View Source

Host

Database replica's hostname.

Declaration
public Output<string> Host { get; }
Property Value
Type Description
Output<System.String>
View Source

Name

The name for the database replica.

Declaration
public Output<string> Name { get; }
Property Value
Type Description
Output<System.String>
View Source

Password

Password for the replica's default user.

Declaration
public Output<string> Password { get; }
Property Value
Type Description
Output<System.String>
View Source

Port

Network port that the database replica is listening on.

Declaration
public Output<int> Port { get; }
Property Value
Type Description
Output<System.Int32>
View Source

PrivateHost

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

Declaration
public Output<string> PrivateHost { get; }
Property Value
Type Description
Output<System.String>
View Source

PrivateUri

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

Declaration
public Output<string> PrivateUri { get; }
Property Value
Type Description
Output<System.String>
View Source

Region

DigitalOcean region where the replica will reside.

Declaration
public Output<string> Region { get; }
Property Value
Type Description
Output<System.String>
View Source

Size

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

Declaration
public Output<string> Size { get; }
Property Value
Type Description
Output<System.String>
View Source

Tags

Declaration
public Output<ImmutableArray<string>> Tags { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableArray<System.String>>
View Source

Uri

The full URI for connecting to the database replica.

Declaration
public Output<string> Uri { get; }
Property Value
Type Description
Output<System.String>
View Source

User

Username for the replica's default user.

Declaration
public Output<string> User { get; }
Property Value
Type Description
Output<System.String>

Methods

View Source

Get(String, Input<String>, DatabaseReplicaState, CustomResourceOptions)

Get an existing DatabaseReplica resource's state with the given name, ID, and optional extra properties used to qualify the lookup.

Declaration
public static DatabaseReplica Get(string name, Input<string> id, DatabaseReplicaState state = null, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resulting resource.

Input<System.String> id

The unique provider ID of the resource to lookup.

DatabaseReplicaState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

Returns
Type Description
DatabaseReplica
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.