Show / Hide Table of Contents

Class DatabaseCluster

Provides a DigitalOcean database cluster resource.

Example Usage

Create a new PostgreSQL database cluster

using Pulumi;
using DigitalOcean = Pulumi.DigitalOcean;

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

}

Create a new MySQL database cluster

using Pulumi;
using DigitalOcean = Pulumi.DigitalOcean;

class MyStack : Stack
{
public MyStack()
{
    var mysql_example = new DigitalOcean.DatabaseCluster("mysql-example", new DigitalOcean.DatabaseClusterArgs
    {
        Engine = "mysql",
        NodeCount = 1,
        Region = "nyc1",
        Size = "db-s-1vcpu-1gb",
        Version = "8",
    });
}

}

Create a new Redis database cluster

using Pulumi;
using DigitalOcean = Pulumi.DigitalOcean;

class MyStack : Stack
{
public MyStack()
{
    var redis_example = new DigitalOcean.DatabaseCluster("redis-example", new DigitalOcean.DatabaseClusterArgs
    {
        Engine = "redis",
        NodeCount = 1,
        Region = "nyc1",
        Size = "db-s-1vcpu-1gb",
        Version = "5",
    });
}

}
Inheritance
System.Object
Resource
CustomResource
DatabaseCluster
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
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 DatabaseCluster : CustomResource

Constructors

View Source

DatabaseCluster(String, DatabaseClusterArgs, CustomResourceOptions)

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

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

The unique name of the resource

DatabaseClusterArgs 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

Database

Name of the cluster's default database.

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

Engine

Database engine used by the cluster (ex. pg for PostreSQL, mysql for MySQL, or redis for Redis).

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

EvictionPolicy

A string specifying the eviction policy for a Redis cluster. Valid values are: noeviction, allkeys_lru, allkeys_random, volatile_lru, volatile_random, or volatile_ttl.

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

Host

Database cluster's hostname.

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

MaintenanceWindows

Defines when the automatic maintenance should be performed for the database cluster.

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

Name

The name of the database cluster.

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

NodeCount

Number of nodes that will be included in the cluster.

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

Password

Password for the cluster's default user.

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

Port

Network port that the database cluster 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

PrivateNetworkUuid

The ID of the VPC where the database cluster will be located.

Declaration
public Output<string> PrivateNetworkUuid { 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 cluster will reside.

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

Size

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

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

SqlMode

A comma separated string specifying the SQL modes for a MySQL cluster.

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

Tags

A list of tag names to be applied to the database cluster.

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 cluster.

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

Urn

The uniform resource name of the database cluster.

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

User

Username for the cluster's default user.

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

Version

Engine version used by the cluster (ex. 11 for PostgreSQL 11).

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

Methods

View Source

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

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

Declaration
public static DatabaseCluster Get(string name, Input<string> id, DatabaseClusterState 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.

DatabaseClusterState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

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