digitalocean.DatabaseCluster
Explore with Pulumi AI
Provides a DigitalOcean database cluster resource.
Example Usage
Create a new PostgreSQL database cluster
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,
});
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)
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
}
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,
});
});
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 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());
}
}
resources:
postgres-example:
type: digitalocean:DatabaseCluster
properties:
name: example-postgres-cluster
engine: pg
version: '15'
size: db-s-1vcpu-1gb
region: nyc1
nodeCount: 1
Create a new MySQL database cluster
import * as pulumi from "@pulumi/pulumi";
import * as digitalocean from "@pulumi/digitalocean";
const mysql_example = new digitalocean.DatabaseCluster("mysql-example", {
name: "example-mysql-cluster",
engine: "mysql",
version: "8",
size: digitalocean.DatabaseSlug.DB_1VPCU1GB,
region: digitalocean.Region.NYC1,
nodeCount: 1,
});
import pulumi
import pulumi_digitalocean as digitalocean
mysql_example = digitalocean.DatabaseCluster("mysql-example",
name="example-mysql-cluster",
engine="mysql",
version="8",
size=digitalocean.DatabaseSlug.D_B_1_VPCU1_GB,
region=digitalocean.Region.NYC1,
node_count=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, "mysql-example", &digitalocean.DatabaseClusterArgs{
Name: pulumi.String("example-mysql-cluster"),
Engine: pulumi.String("mysql"),
Version: pulumi.String("8"),
Size: pulumi.String(digitalocean.DatabaseSlug_DB_1VPCU1GB),
Region: pulumi.String(digitalocean.RegionNYC1),
NodeCount: pulumi.Int(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 mysql_example = new DigitalOcean.DatabaseCluster("mysql-example", new()
{
Name = "example-mysql-cluster",
Engine = "mysql",
Version = "8",
Size = DigitalOcean.DatabaseSlug.DB_1VPCU1GB,
Region = DigitalOcean.Region.NYC1,
NodeCount = 1,
});
});
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 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 mysql_example = new DatabaseCluster("mysql-example", DatabaseClusterArgs.builder()
.name("example-mysql-cluster")
.engine("mysql")
.version("8")
.size("db-s-1vcpu-1gb")
.region("nyc1")
.nodeCount(1)
.build());
}
}
resources:
mysql-example:
type: digitalocean:DatabaseCluster
properties:
name: example-mysql-cluster
engine: mysql
version: '8'
size: db-s-1vcpu-1gb
region: nyc1
nodeCount: 1
Create a new Redis database cluster
import * as pulumi from "@pulumi/pulumi";
import * as digitalocean from "@pulumi/digitalocean";
const redis_example = new digitalocean.DatabaseCluster("redis-example", {
name: "example-redis-cluster",
engine: "redis",
version: "7",
size: digitalocean.DatabaseSlug.DB_1VPCU1GB,
region: digitalocean.Region.NYC1,
nodeCount: 1,
});
import pulumi
import pulumi_digitalocean as digitalocean
redis_example = digitalocean.DatabaseCluster("redis-example",
name="example-redis-cluster",
engine="redis",
version="7",
size=digitalocean.DatabaseSlug.D_B_1_VPCU1_GB,
region=digitalocean.Region.NYC1,
node_count=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, "redis-example", &digitalocean.DatabaseClusterArgs{
Name: pulumi.String("example-redis-cluster"),
Engine: pulumi.String("redis"),
Version: pulumi.String("7"),
Size: pulumi.String(digitalocean.DatabaseSlug_DB_1VPCU1GB),
Region: pulumi.String(digitalocean.RegionNYC1),
NodeCount: pulumi.Int(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 redis_example = new DigitalOcean.DatabaseCluster("redis-example", new()
{
Name = "example-redis-cluster",
Engine = "redis",
Version = "7",
Size = DigitalOcean.DatabaseSlug.DB_1VPCU1GB,
Region = DigitalOcean.Region.NYC1,
NodeCount = 1,
});
});
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 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 redis_example = new DatabaseCluster("redis-example", DatabaseClusterArgs.builder()
.name("example-redis-cluster")
.engine("redis")
.version("7")
.size("db-s-1vcpu-1gb")
.region("nyc1")
.nodeCount(1)
.build());
}
}
resources:
redis-example:
type: digitalocean:DatabaseCluster
properties:
name: example-redis-cluster
engine: redis
version: '7'
size: db-s-1vcpu-1gb
region: nyc1
nodeCount: 1
Create a new Kafka database cluster
import * as pulumi from "@pulumi/pulumi";
import * as digitalocean from "@pulumi/digitalocean";
const kafka_example = new digitalocean.DatabaseCluster("kafka-example", {
name: "example-kafka-cluster",
engine: "kafka",
version: "3.5",
size: "db-s-2vcpu-2gb",
region: digitalocean.Region.NYC1,
nodeCount: 3,
});
import pulumi
import pulumi_digitalocean as digitalocean
kafka_example = digitalocean.DatabaseCluster("kafka-example",
name="example-kafka-cluster",
engine="kafka",
version="3.5",
size="db-s-2vcpu-2gb",
region=digitalocean.Region.NYC1,
node_count=3)
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, "kafka-example", &digitalocean.DatabaseClusterArgs{
Name: pulumi.String("example-kafka-cluster"),
Engine: pulumi.String("kafka"),
Version: pulumi.String("3.5"),
Size: pulumi.String("db-s-2vcpu-2gb"),
Region: pulumi.String(digitalocean.RegionNYC1),
NodeCount: pulumi.Int(3),
})
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 kafka_example = new DigitalOcean.DatabaseCluster("kafka-example", new()
{
Name = "example-kafka-cluster",
Engine = "kafka",
Version = "3.5",
Size = "db-s-2vcpu-2gb",
Region = DigitalOcean.Region.NYC1,
NodeCount = 3,
});
});
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 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 kafka_example = new DatabaseCluster("kafka-example", DatabaseClusterArgs.builder()
.name("example-kafka-cluster")
.engine("kafka")
.version("3.5")
.size("db-s-2vcpu-2gb")
.region("nyc1")
.nodeCount(3)
.build());
}
}
resources:
kafka-example:
type: digitalocean:DatabaseCluster
properties:
name: example-kafka-cluster
engine: kafka
version: '3.5'
size: db-s-2vcpu-2gb
region: nyc1
nodeCount: 3
Create a new MongoDB database cluster
import * as pulumi from "@pulumi/pulumi";
import * as digitalocean from "@pulumi/digitalocean";
const mongodb_example = new digitalocean.DatabaseCluster("mongodb-example", {
name: "example-mongo-cluster",
engine: "mongodb",
version: "6",
size: digitalocean.DatabaseSlug.DB_1VPCU1GB,
region: digitalocean.Region.NYC3,
nodeCount: 1,
});
import pulumi
import pulumi_digitalocean as digitalocean
mongodb_example = digitalocean.DatabaseCluster("mongodb-example",
name="example-mongo-cluster",
engine="mongodb",
version="6",
size=digitalocean.DatabaseSlug.D_B_1_VPCU1_GB,
region=digitalocean.Region.NYC3,
node_count=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, "mongodb-example", &digitalocean.DatabaseClusterArgs{
Name: pulumi.String("example-mongo-cluster"),
Engine: pulumi.String("mongodb"),
Version: pulumi.String("6"),
Size: pulumi.String(digitalocean.DatabaseSlug_DB_1VPCU1GB),
Region: pulumi.String(digitalocean.RegionNYC3),
NodeCount: pulumi.Int(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 mongodb_example = new DigitalOcean.DatabaseCluster("mongodb-example", new()
{
Name = "example-mongo-cluster",
Engine = "mongodb",
Version = "6",
Size = DigitalOcean.DatabaseSlug.DB_1VPCU1GB,
Region = DigitalOcean.Region.NYC3,
NodeCount = 1,
});
});
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 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 mongodb_example = new DatabaseCluster("mongodb-example", DatabaseClusterArgs.builder()
.name("example-mongo-cluster")
.engine("mongodb")
.version("6")
.size("db-s-1vcpu-1gb")
.region("nyc3")
.nodeCount(1)
.build());
}
}
resources:
mongodb-example:
type: digitalocean:DatabaseCluster
properties:
name: example-mongo-cluster
engine: mongodb
version: '6'
size: db-s-1vcpu-1gb
region: nyc3
nodeCount: 1
Create a new OpenSearch database cluster
import * as pulumi from "@pulumi/pulumi";
import * as digitalocean from "@pulumi/digitalocean";
const opensearch_example = new digitalocean.DatabaseCluster("opensearch-example", {
name: "example-opensearch-cluster",
engine: "opensearch",
version: "2",
size: digitalocean.DatabaseSlug.DB_1VPCU2GB,
region: digitalocean.Region.NYC3,
nodeCount: 1,
});
import pulumi
import pulumi_digitalocean as digitalocean
opensearch_example = digitalocean.DatabaseCluster("opensearch-example",
name="example-opensearch-cluster",
engine="opensearch",
version="2",
size=digitalocean.DatabaseSlug.D_B_1_VPCU2_GB,
region=digitalocean.Region.NYC3,
node_count=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, "opensearch-example", &digitalocean.DatabaseClusterArgs{
Name: pulumi.String("example-opensearch-cluster"),
Engine: pulumi.String("opensearch"),
Version: pulumi.String("2"),
Size: pulumi.String(digitalocean.DatabaseSlug_DB_1VPCU2GB),
Region: pulumi.String(digitalocean.RegionNYC3),
NodeCount: pulumi.Int(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 opensearch_example = new DigitalOcean.DatabaseCluster("opensearch-example", new()
{
Name = "example-opensearch-cluster",
Engine = "opensearch",
Version = "2",
Size = DigitalOcean.DatabaseSlug.DB_1VPCU2GB,
Region = DigitalOcean.Region.NYC3,
NodeCount = 1,
});
});
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 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 opensearch_example = new DatabaseCluster("opensearch-example", DatabaseClusterArgs.builder()
.name("example-opensearch-cluster")
.engine("opensearch")
.version("2")
.size("db-s-1vcpu-2gb")
.region("nyc3")
.nodeCount(1)
.build());
}
}
resources:
opensearch-example:
type: digitalocean:DatabaseCluster
properties:
name: example-opensearch-cluster
engine: opensearch
version: '2'
size: db-s-1vcpu-2gb
region: nyc3
nodeCount: 1
Create a new database cluster based on a backup of an existing cluster.
import * as pulumi from "@pulumi/pulumi";
import * as digitalocean from "@pulumi/digitalocean";
const doby = new digitalocean.DatabaseCluster("doby", {
name: "dobydb",
engine: "pg",
version: "15",
size: digitalocean.DatabaseSlug.DB_1VPCU2GB,
region: digitalocean.Region.NYC1,
nodeCount: 1,
tags: ["production"],
});
const dobyBackup = new digitalocean.DatabaseCluster("doby_backup", {
name: "dobydupe",
engine: "pg",
version: "15",
size: digitalocean.DatabaseSlug.DB_1VPCU2GB,
region: digitalocean.Region.NYC1,
nodeCount: 1,
tags: ["production"],
backupRestore: {
databaseName: "dobydb",
},
}, {
dependsOn: [doby],
});
import pulumi
import pulumi_digitalocean as digitalocean
doby = digitalocean.DatabaseCluster("doby",
name="dobydb",
engine="pg",
version="15",
size=digitalocean.DatabaseSlug.D_B_1_VPCU2_GB,
region=digitalocean.Region.NYC1,
node_count=1,
tags=["production"])
doby_backup = digitalocean.DatabaseCluster("doby_backup",
name="dobydupe",
engine="pg",
version="15",
size=digitalocean.DatabaseSlug.D_B_1_VPCU2_GB,
region=digitalocean.Region.NYC1,
node_count=1,
tags=["production"],
backup_restore={
"database_name": "dobydb",
},
opts = pulumi.ResourceOptions(depends_on=[doby]))
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 {
doby, err := digitalocean.NewDatabaseCluster(ctx, "doby", &digitalocean.DatabaseClusterArgs{
Name: pulumi.String("dobydb"),
Engine: pulumi.String("pg"),
Version: pulumi.String("15"),
Size: pulumi.String(digitalocean.DatabaseSlug_DB_1VPCU2GB),
Region: pulumi.String(digitalocean.RegionNYC1),
NodeCount: pulumi.Int(1),
Tags: pulumi.StringArray{
pulumi.String("production"),
},
})
if err != nil {
return err
}
_, err = digitalocean.NewDatabaseCluster(ctx, "doby_backup", &digitalocean.DatabaseClusterArgs{
Name: pulumi.String("dobydupe"),
Engine: pulumi.String("pg"),
Version: pulumi.String("15"),
Size: pulumi.String(digitalocean.DatabaseSlug_DB_1VPCU2GB),
Region: pulumi.String(digitalocean.RegionNYC1),
NodeCount: pulumi.Int(1),
Tags: pulumi.StringArray{
pulumi.String("production"),
},
BackupRestore: &digitalocean.DatabaseClusterBackupRestoreArgs{
DatabaseName: pulumi.String("dobydb"),
},
}, pulumi.DependsOn([]pulumi.Resource{
doby,
}))
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 doby = new DigitalOcean.DatabaseCluster("doby", new()
{
Name = "dobydb",
Engine = "pg",
Version = "15",
Size = DigitalOcean.DatabaseSlug.DB_1VPCU2GB,
Region = DigitalOcean.Region.NYC1,
NodeCount = 1,
Tags = new[]
{
"production",
},
});
var dobyBackup = new DigitalOcean.DatabaseCluster("doby_backup", new()
{
Name = "dobydupe",
Engine = "pg",
Version = "15",
Size = DigitalOcean.DatabaseSlug.DB_1VPCU2GB,
Region = DigitalOcean.Region.NYC1,
NodeCount = 1,
Tags = new[]
{
"production",
},
BackupRestore = new DigitalOcean.Inputs.DatabaseClusterBackupRestoreArgs
{
DatabaseName = "dobydb",
},
}, new CustomResourceOptions
{
DependsOn =
{
doby,
},
});
});
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.inputs.DatabaseClusterBackupRestoreArgs;
import com.pulumi.resources.CustomResourceOptions;
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 doby = new DatabaseCluster("doby", DatabaseClusterArgs.builder()
.name("dobydb")
.engine("pg")
.version("15")
.size("db-s-1vcpu-2gb")
.region("nyc1")
.nodeCount(1)
.tags("production")
.build());
var dobyBackup = new DatabaseCluster("dobyBackup", DatabaseClusterArgs.builder()
.name("dobydupe")
.engine("pg")
.version("15")
.size("db-s-1vcpu-2gb")
.region("nyc1")
.nodeCount(1)
.tags("production")
.backupRestore(DatabaseClusterBackupRestoreArgs.builder()
.databaseName("dobydb")
.build())
.build(), CustomResourceOptions.builder()
.dependsOn(doby)
.build());
}
}
resources:
doby:
type: digitalocean:DatabaseCluster
properties:
name: dobydb
engine: pg
version: '15'
size: db-s-1vcpu-2gb
region: nyc1
nodeCount: 1
tags:
- production
dobyBackup:
type: digitalocean:DatabaseCluster
name: doby_backup
properties:
name: dobydupe
engine: pg
version: '15'
size: db-s-1vcpu-2gb
region: nyc1
nodeCount: 1
tags:
- production
backupRestore:
databaseName: dobydb
options:
dependsOn:
- ${doby}
Create DatabaseCluster Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new DatabaseCluster(name: string, args: DatabaseClusterArgs, opts?: CustomResourceOptions);
@overload
def DatabaseCluster(resource_name: str,
args: DatabaseClusterArgs,
opts: Optional[ResourceOptions] = None)
@overload
def DatabaseCluster(resource_name: str,
opts: Optional[ResourceOptions] = None,
node_count: Optional[int] = None,
engine: Optional[str] = None,
size: Optional[Union[str, DatabaseSlug]] = None,
region: Optional[Union[str, Region]] = None,
maintenance_windows: Optional[Sequence[DatabaseClusterMaintenanceWindowArgs]] = None,
name: Optional[str] = None,
private_network_uuid: Optional[str] = None,
project_id: Optional[str] = None,
backup_restore: Optional[DatabaseClusterBackupRestoreArgs] = None,
eviction_policy: Optional[str] = None,
sql_mode: Optional[str] = None,
storage_size_mib: Optional[str] = None,
tags: Optional[Sequence[str]] = None,
version: Optional[str] = None)
func NewDatabaseCluster(ctx *Context, name string, args DatabaseClusterArgs, opts ...ResourceOption) (*DatabaseCluster, error)
public DatabaseCluster(string name, DatabaseClusterArgs args, CustomResourceOptions? opts = null)
public DatabaseCluster(String name, DatabaseClusterArgs args)
public DatabaseCluster(String name, DatabaseClusterArgs args, CustomResourceOptions options)
type: digitalocean:DatabaseCluster
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 DatabaseClusterArgs
- 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 DatabaseClusterArgs
- 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 DatabaseClusterArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DatabaseClusterArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args DatabaseClusterArgs
- 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 databaseClusterResource = new DigitalOcean.DatabaseCluster("databaseClusterResource", new()
{
NodeCount = 0,
Engine = "string",
Size = "string",
Region = "string",
MaintenanceWindows = new[]
{
new DigitalOcean.Inputs.DatabaseClusterMaintenanceWindowArgs
{
Day = "string",
Hour = "string",
},
},
Name = "string",
PrivateNetworkUuid = "string",
ProjectId = "string",
BackupRestore = new DigitalOcean.Inputs.DatabaseClusterBackupRestoreArgs
{
DatabaseName = "string",
BackupCreatedAt = "string",
},
EvictionPolicy = "string",
SqlMode = "string",
StorageSizeMib = "string",
Tags = new[]
{
"string",
},
Version = "string",
});
example, err := digitalocean.NewDatabaseCluster(ctx, "databaseClusterResource", &digitalocean.DatabaseClusterArgs{
NodeCount: pulumi.Int(0),
Engine: pulumi.String("string"),
Size: pulumi.String("string"),
Region: pulumi.String("string"),
MaintenanceWindows: digitalocean.DatabaseClusterMaintenanceWindowArray{
&digitalocean.DatabaseClusterMaintenanceWindowArgs{
Day: pulumi.String("string"),
Hour: pulumi.String("string"),
},
},
Name: pulumi.String("string"),
PrivateNetworkUuid: pulumi.String("string"),
ProjectId: pulumi.String("string"),
BackupRestore: &digitalocean.DatabaseClusterBackupRestoreArgs{
DatabaseName: pulumi.String("string"),
BackupCreatedAt: pulumi.String("string"),
},
EvictionPolicy: pulumi.String("string"),
SqlMode: pulumi.String("string"),
StorageSizeMib: pulumi.String("string"),
Tags: pulumi.StringArray{
pulumi.String("string"),
},
Version: pulumi.String("string"),
})
var databaseClusterResource = new DatabaseCluster("databaseClusterResource", DatabaseClusterArgs.builder()
.nodeCount(0)
.engine("string")
.size("string")
.region("string")
.maintenanceWindows(DatabaseClusterMaintenanceWindowArgs.builder()
.day("string")
.hour("string")
.build())
.name("string")
.privateNetworkUuid("string")
.projectId("string")
.backupRestore(DatabaseClusterBackupRestoreArgs.builder()
.databaseName("string")
.backupCreatedAt("string")
.build())
.evictionPolicy("string")
.sqlMode("string")
.storageSizeMib("string")
.tags("string")
.version("string")
.build());
database_cluster_resource = digitalocean.DatabaseCluster("databaseClusterResource",
node_count=0,
engine="string",
size="string",
region="string",
maintenance_windows=[{
"day": "string",
"hour": "string",
}],
name="string",
private_network_uuid="string",
project_id="string",
backup_restore={
"database_name": "string",
"backup_created_at": "string",
},
eviction_policy="string",
sql_mode="string",
storage_size_mib="string",
tags=["string"],
version="string")
const databaseClusterResource = new digitalocean.DatabaseCluster("databaseClusterResource", {
nodeCount: 0,
engine: "string",
size: "string",
region: "string",
maintenanceWindows: [{
day: "string",
hour: "string",
}],
name: "string",
privateNetworkUuid: "string",
projectId: "string",
backupRestore: {
databaseName: "string",
backupCreatedAt: "string",
},
evictionPolicy: "string",
sqlMode: "string",
storageSizeMib: "string",
tags: ["string"],
version: "string",
});
type: digitalocean:DatabaseCluster
properties:
backupRestore:
backupCreatedAt: string
databaseName: string
engine: string
evictionPolicy: string
maintenanceWindows:
- day: string
hour: string
name: string
nodeCount: 0
privateNetworkUuid: string
projectId: string
region: string
size: string
sqlMode: string
storageSizeMib: string
tags:
- string
version: string
DatabaseCluster 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 DatabaseCluster resource accepts the following input properties:
- Engine string
- Database engine used by the cluster (ex.
pg
for PostgreSQL,mysql
for MySQL,redis
for Redis,mongodb
for MongoDB, orkafka
for Kafka). - Node
Count int - Number of nodes that will be included in the cluster. For
kafka
clusters, this must be 3. - Region
string | Pulumi.
Digital Ocean. Region - DigitalOcean region where the cluster will reside.
- Size
string | Pulumi.
Digital Ocean. Database Slug - Database Droplet size associated with the cluster (ex.
db-s-1vcpu-1gb
). See here for a list of valid size slugs. - Backup
Restore Pulumi.Digital Ocean. Inputs. Database Cluster Backup Restore - Eviction
Policy string - A string specifying the eviction policy for a Redis cluster. Valid values are:
noeviction
,allkeys_lru
,allkeys_random
,volatile_lru
,volatile_random
, orvolatile_ttl
. - Maintenance
Windows List<Pulumi.Digital Ocean. Inputs. Database Cluster Maintenance Window> - Defines when the automatic maintenance should be performed for the database cluster.
- Name string
- The name of the database cluster.
- Private
Network stringUuid - The ID of the VPC where the database cluster will be located.
- Project
Id string - The ID of the project that the database cluster is assigned to. If excluded when creating a new database cluster, it will be assigned to your default project.
- Sql
Mode string - A comma separated string specifying the SQL modes for a MySQL cluster.
- Storage
Size stringMib - Defines the disk size, in MiB, allocated to the cluster. This can be adjusted on MySQL and PostgreSQL clusters based on predefined ranges for each slug/droplet size.
- List<string>
- A list of tag names to be applied to the database cluster.
- Version string
- Engine version used by the cluster (ex.
14
for PostgreSQL 14). When this value is changed, a call to the Upgrade major Version for a Database API operation is made with the new version.
- Engine string
- Database engine used by the cluster (ex.
pg
for PostgreSQL,mysql
for MySQL,redis
for Redis,mongodb
for MongoDB, orkafka
for Kafka). - Node
Count int - Number of nodes that will be included in the cluster. For
kafka
clusters, this must be 3. - Region string | Region
- DigitalOcean region where the cluster will reside.
- Size
string | Database
Slug - Database Droplet size associated with the cluster (ex.
db-s-1vcpu-1gb
). See here for a list of valid size slugs. - Backup
Restore DatabaseCluster Backup Restore Args - Eviction
Policy string - A string specifying the eviction policy for a Redis cluster. Valid values are:
noeviction
,allkeys_lru
,allkeys_random
,volatile_lru
,volatile_random
, orvolatile_ttl
. - Maintenance
Windows []DatabaseCluster Maintenance Window Args - Defines when the automatic maintenance should be performed for the database cluster.
- Name string
- The name of the database cluster.
- Private
Network stringUuid - The ID of the VPC where the database cluster will be located.
- Project
Id string - The ID of the project that the database cluster is assigned to. If excluded when creating a new database cluster, it will be assigned to your default project.
- Sql
Mode string - A comma separated string specifying the SQL modes for a MySQL cluster.
- Storage
Size stringMib - Defines the disk size, in MiB, allocated to the cluster. This can be adjusted on MySQL and PostgreSQL clusters based on predefined ranges for each slug/droplet size.
- []string
- A list of tag names to be applied to the database cluster.
- Version string
- Engine version used by the cluster (ex.
14
for PostgreSQL 14). When this value is changed, a call to the Upgrade major Version for a Database API operation is made with the new version.
- engine String
- Database engine used by the cluster (ex.
pg
for PostgreSQL,mysql
for MySQL,redis
for Redis,mongodb
for MongoDB, orkafka
for Kafka). - node
Count Integer - Number of nodes that will be included in the cluster. For
kafka
clusters, this must be 3. - region String | Region
- DigitalOcean region where the cluster will reside.
- size
String | Database
Slug - Database Droplet size associated with the cluster (ex.
db-s-1vcpu-1gb
). See here for a list of valid size slugs. - backup
Restore DatabaseCluster Backup Restore - eviction
Policy String - A string specifying the eviction policy for a Redis cluster. Valid values are:
noeviction
,allkeys_lru
,allkeys_random
,volatile_lru
,volatile_random
, orvolatile_ttl
. - maintenance
Windows List<DatabaseCluster Maintenance Window> - Defines when the automatic maintenance should be performed for the database cluster.
- name String
- The name of the database cluster.
- private
Network StringUuid - The ID of the VPC where the database cluster will be located.
- project
Id String - The ID of the project that the database cluster is assigned to. If excluded when creating a new database cluster, it will be assigned to your default project.
- sql
Mode String - A comma separated string specifying the SQL modes for a MySQL cluster.
- storage
Size StringMib - Defines the disk size, in MiB, allocated to the cluster. This can be adjusted on MySQL and PostgreSQL clusters based on predefined ranges for each slug/droplet size.
- List<String>
- A list of tag names to be applied to the database cluster.
- version String
- Engine version used by the cluster (ex.
14
for PostgreSQL 14). When this value is changed, a call to the Upgrade major Version for a Database API operation is made with the new version.
- engine string
- Database engine used by the cluster (ex.
pg
for PostgreSQL,mysql
for MySQL,redis
for Redis,mongodb
for MongoDB, orkafka
for Kafka). - node
Count number - Number of nodes that will be included in the cluster. For
kafka
clusters, this must be 3. - region string | Region
- DigitalOcean region where the cluster will reside.
- size
string | Database
Slug - Database Droplet size associated with the cluster (ex.
db-s-1vcpu-1gb
). See here for a list of valid size slugs. - backup
Restore DatabaseCluster Backup Restore - eviction
Policy string - A string specifying the eviction policy for a Redis cluster. Valid values are:
noeviction
,allkeys_lru
,allkeys_random
,volatile_lru
,volatile_random
, orvolatile_ttl
. - maintenance
Windows DatabaseCluster Maintenance Window[] - Defines when the automatic maintenance should be performed for the database cluster.
- name string
- The name of the database cluster.
- private
Network stringUuid - The ID of the VPC where the database cluster will be located.
- project
Id string - The ID of the project that the database cluster is assigned to. If excluded when creating a new database cluster, it will be assigned to your default project.
- sql
Mode string - A comma separated string specifying the SQL modes for a MySQL cluster.
- storage
Size stringMib - Defines the disk size, in MiB, allocated to the cluster. This can be adjusted on MySQL and PostgreSQL clusters based on predefined ranges for each slug/droplet size.
- string[]
- A list of tag names to be applied to the database cluster.
- version string
- Engine version used by the cluster (ex.
14
for PostgreSQL 14). When this value is changed, a call to the Upgrade major Version for a Database API operation is made with the new version.
- engine str
- Database engine used by the cluster (ex.
pg
for PostgreSQL,mysql
for MySQL,redis
for Redis,mongodb
for MongoDB, orkafka
for Kafka). - node_
count int - Number of nodes that will be included in the cluster. For
kafka
clusters, this must be 3. - region str | Region
- DigitalOcean region where the cluster will reside.
- size
str | Database
Slug - Database Droplet size associated with the cluster (ex.
db-s-1vcpu-1gb
). See here for a list of valid size slugs. - backup_
restore DatabaseCluster Backup Restore Args - eviction_
policy str - A string specifying the eviction policy for a Redis cluster. Valid values are:
noeviction
,allkeys_lru
,allkeys_random
,volatile_lru
,volatile_random
, orvolatile_ttl
. - maintenance_
windows Sequence[DatabaseCluster Maintenance Window Args] - Defines when the automatic maintenance should be performed for the database cluster.
- name str
- The name of the database cluster.
- private_
network_ struuid - The ID of the VPC where the database cluster will be located.
- project_
id str - The ID of the project that the database cluster is assigned to. If excluded when creating a new database cluster, it will be assigned to your default project.
- sql_
mode str - A comma separated string specifying the SQL modes for a MySQL cluster.
- storage_
size_ strmib - Defines the disk size, in MiB, allocated to the cluster. This can be adjusted on MySQL and PostgreSQL clusters based on predefined ranges for each slug/droplet size.
- Sequence[str]
- A list of tag names to be applied to the database cluster.
- version str
- Engine version used by the cluster (ex.
14
for PostgreSQL 14). When this value is changed, a call to the Upgrade major Version for a Database API operation is made with the new version.
- engine String
- Database engine used by the cluster (ex.
pg
for PostgreSQL,mysql
for MySQL,redis
for Redis,mongodb
for MongoDB, orkafka
for Kafka). - node
Count Number - Number of nodes that will be included in the cluster. For
kafka
clusters, this must be 3. - region String | "nyc1" | "nyc2" | "nyc3" | "sgp1" | "lon1" | "ams2" | "ams3" | "fra1" | "tor1" | "sfo1" | "sfo2" | "sfo3" | "blr1" | "syd1"
- DigitalOcean region where the cluster 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 cluster (ex.
db-s-1vcpu-1gb
). See here for a list of valid size slugs. - backup
Restore Property Map - eviction
Policy String - A string specifying the eviction policy for a Redis cluster. Valid values are:
noeviction
,allkeys_lru
,allkeys_random
,volatile_lru
,volatile_random
, orvolatile_ttl
. - maintenance
Windows List<Property Map> - Defines when the automatic maintenance should be performed for the database cluster.
- name String
- The name of the database cluster.
- private
Network StringUuid - The ID of the VPC where the database cluster will be located.
- project
Id String - The ID of the project that the database cluster is assigned to. If excluded when creating a new database cluster, it will be assigned to your default project.
- sql
Mode String - A comma separated string specifying the SQL modes for a MySQL cluster.
- storage
Size StringMib - Defines the disk size, in MiB, allocated to the cluster. This can be adjusted on MySQL and PostgreSQL clusters based on predefined ranges for each slug/droplet size.
- List<String>
- A list of tag names to be applied to the database cluster.
- version String
- Engine version used by the cluster (ex.
14
for PostgreSQL 14). When this value is changed, a call to the Upgrade major Version for a Database API operation is made with the new version.
Outputs
All input properties are implicitly available as output properties. Additionally, the DatabaseCluster resource produces the following output properties:
- Cluster
Urn string - The uniform resource name of the database cluster.
- Database string
- Name of the cluster's default database.
- Host string
- Database cluster's hostname.
- Id string
- The provider-assigned unique ID for this managed resource.
- Password string
- Password for the cluster's default user.
- Port int
- Network port that the database cluster is listening on.
- Private
Host string - Same as
host
, but only accessible from resources within the account and in the same region. - Private
Uri string - Same as
uri
, but only accessible from resources within the account and in the same region. - Ui
Database string - Name of the OpenSearch dashboard db.
- Ui
Host string - Hostname for the OpenSearch dashboard.
- Ui
Password string - Password for the OpenSearch dashboard's default user.
- Ui
Port int - Network port that the OpenSearch dashboard is listening on.
- Ui
Uri string - The full URI for connecting to the OpenSearch dashboard.
- Ui
User string - Username for OpenSearch dashboard's default user.
- Uri string
- The full URI for connecting to the database cluster.
- User string
- Username for the cluster's default user.
- Cluster
Urn string - The uniform resource name of the database cluster.
- Database string
- Name of the cluster's default database.
- Host string
- Database cluster's hostname.
- Id string
- The provider-assigned unique ID for this managed resource.
- Password string
- Password for the cluster's default user.
- Port int
- Network port that the database cluster is listening on.
- Private
Host string - Same as
host
, but only accessible from resources within the account and in the same region. - Private
Uri string - Same as
uri
, but only accessible from resources within the account and in the same region. - Ui
Database string - Name of the OpenSearch dashboard db.
- Ui
Host string - Hostname for the OpenSearch dashboard.
- Ui
Password string - Password for the OpenSearch dashboard's default user.
- Ui
Port int - Network port that the OpenSearch dashboard is listening on.
- Ui
Uri string - The full URI for connecting to the OpenSearch dashboard.
- Ui
User string - Username for OpenSearch dashboard's default user.
- Uri string
- The full URI for connecting to the database cluster.
- User string
- Username for the cluster's default user.
- cluster
Urn String - The uniform resource name of the database cluster.
- database String
- Name of the cluster's default database.
- host String
- Database cluster's hostname.
- id String
- The provider-assigned unique ID for this managed resource.
- password String
- Password for the cluster's default user.
- port Integer
- Network port that the database cluster is listening on.
- private
Host String - Same as
host
, but only accessible from resources within the account and in the same region. - private
Uri String - Same as
uri
, but only accessible from resources within the account and in the same region. - ui
Database String - Name of the OpenSearch dashboard db.
- ui
Host String - Hostname for the OpenSearch dashboard.
- ui
Password String - Password for the OpenSearch dashboard's default user.
- ui
Port Integer - Network port that the OpenSearch dashboard is listening on.
- ui
Uri String - The full URI for connecting to the OpenSearch dashboard.
- ui
User String - Username for OpenSearch dashboard's default user.
- uri String
- The full URI for connecting to the database cluster.
- user String
- Username for the cluster's default user.
- cluster
Urn string - The uniform resource name of the database cluster.
- database string
- Name of the cluster's default database.
- host string
- Database cluster's hostname.
- id string
- The provider-assigned unique ID for this managed resource.
- password string
- Password for the cluster's default user.
- port number
- Network port that the database cluster is listening on.
- private
Host string - Same as
host
, but only accessible from resources within the account and in the same region. - private
Uri string - Same as
uri
, but only accessible from resources within the account and in the same region. - ui
Database string - Name of the OpenSearch dashboard db.
- ui
Host string - Hostname for the OpenSearch dashboard.
- ui
Password string - Password for the OpenSearch dashboard's default user.
- ui
Port number - Network port that the OpenSearch dashboard is listening on.
- ui
Uri string - The full URI for connecting to the OpenSearch dashboard.
- ui
User string - Username for OpenSearch dashboard's default user.
- uri string
- The full URI for connecting to the database cluster.
- user string
- Username for the cluster's default user.
- cluster_
urn str - The uniform resource name of the database cluster.
- database str
- Name of the cluster's default database.
- host str
- Database cluster's hostname.
- id str
- The provider-assigned unique ID for this managed resource.
- password str
- Password for the cluster's default user.
- port int
- Network port that the database cluster 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. - ui_
database str - Name of the OpenSearch dashboard db.
- ui_
host str - Hostname for the OpenSearch dashboard.
- ui_
password str - Password for the OpenSearch dashboard's default user.
- ui_
port int - Network port that the OpenSearch dashboard is listening on.
- ui_
uri str - The full URI for connecting to the OpenSearch dashboard.
- ui_
user str - Username for OpenSearch dashboard's default user.
- uri str
- The full URI for connecting to the database cluster.
- user str
- Username for the cluster's default user.
- cluster
Urn String - The uniform resource name of the database cluster.
- database String
- Name of the cluster's default database.
- host String
- Database cluster's hostname.
- id String
- The provider-assigned unique ID for this managed resource.
- password String
- Password for the cluster's default user.
- port Number
- Network port that the database cluster is listening on.
- private
Host String - Same as
host
, but only accessible from resources within the account and in the same region. - private
Uri String - Same as
uri
, but only accessible from resources within the account and in the same region. - ui
Database String - Name of the OpenSearch dashboard db.
- ui
Host String - Hostname for the OpenSearch dashboard.
- ui
Password String - Password for the OpenSearch dashboard's default user.
- ui
Port Number - Network port that the OpenSearch dashboard is listening on.
- ui
Uri String - The full URI for connecting to the OpenSearch dashboard.
- ui
User String - Username for OpenSearch dashboard's default user.
- uri String
- The full URI for connecting to the database cluster.
- user String
- Username for the cluster's default user.
Look up Existing DatabaseCluster Resource
Get an existing DatabaseCluster 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?: DatabaseClusterState, opts?: CustomResourceOptions): DatabaseCluster
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
backup_restore: Optional[DatabaseClusterBackupRestoreArgs] = None,
cluster_urn: Optional[str] = None,
database: Optional[str] = None,
engine: Optional[str] = None,
eviction_policy: Optional[str] = None,
host: Optional[str] = None,
maintenance_windows: Optional[Sequence[DatabaseClusterMaintenanceWindowArgs]] = None,
name: Optional[str] = None,
node_count: Optional[int] = 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,
project_id: Optional[str] = None,
region: Optional[Union[str, Region]] = None,
size: Optional[Union[str, DatabaseSlug]] = None,
sql_mode: Optional[str] = None,
storage_size_mib: Optional[str] = None,
tags: Optional[Sequence[str]] = None,
ui_database: Optional[str] = None,
ui_host: Optional[str] = None,
ui_password: Optional[str] = None,
ui_port: Optional[int] = None,
ui_uri: Optional[str] = None,
ui_user: Optional[str] = None,
uri: Optional[str] = None,
user: Optional[str] = None,
version: Optional[str] = None) -> DatabaseCluster
func GetDatabaseCluster(ctx *Context, name string, id IDInput, state *DatabaseClusterState, opts ...ResourceOption) (*DatabaseCluster, error)
public static DatabaseCluster Get(string name, Input<string> id, DatabaseClusterState? state, CustomResourceOptions? opts = null)
public static DatabaseCluster get(String name, Output<String> id, DatabaseClusterState 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.
- Backup
Restore Pulumi.Digital Ocean. Inputs. Database Cluster Backup Restore - Cluster
Urn string - The uniform resource name of the database cluster.
- Database string
- Name of the cluster's default database.
- Engine string
- Database engine used by the cluster (ex.
pg
for PostgreSQL,mysql
for MySQL,redis
for Redis,mongodb
for MongoDB, orkafka
for Kafka). - Eviction
Policy string - A string specifying the eviction policy for a Redis cluster. Valid values are:
noeviction
,allkeys_lru
,allkeys_random
,volatile_lru
,volatile_random
, orvolatile_ttl
. - Host string
- Database cluster's hostname.
- Maintenance
Windows List<Pulumi.Digital Ocean. Inputs. Database Cluster Maintenance Window> - Defines when the automatic maintenance should be performed for the database cluster.
- Name string
- The name of the database cluster.
- Node
Count int - Number of nodes that will be included in the cluster. For
kafka
clusters, this must be 3. - Password string
- Password for the cluster's default user.
- Port int
- Network port that the database cluster is listening on.
- Private
Host string - Same as
host
, but only accessible from resources within the account and in the same region. - Private
Network stringUuid - The ID of the VPC where the database cluster will be located.
- Private
Uri string - Same as
uri
, but only accessible from resources within the account and in the same region. - Project
Id string - The ID of the project that the database cluster is assigned to. If excluded when creating a new database cluster, it will be assigned to your default project.
- Region
string | Pulumi.
Digital Ocean. Region - DigitalOcean region where the cluster will reside.
- Size
string | Pulumi.
Digital Ocean. Database Slug - Database Droplet size associated with the cluster (ex.
db-s-1vcpu-1gb
). See here for a list of valid size slugs. - Sql
Mode string - A comma separated string specifying the SQL modes for a MySQL cluster.
- Storage
Size stringMib - Defines the disk size, in MiB, allocated to the cluster. This can be adjusted on MySQL and PostgreSQL clusters based on predefined ranges for each slug/droplet size.
- List<string>
- A list of tag names to be applied to the database cluster.
- Ui
Database string - Name of the OpenSearch dashboard db.
- Ui
Host string - Hostname for the OpenSearch dashboard.
- Ui
Password string - Password for the OpenSearch dashboard's default user.
- Ui
Port int - Network port that the OpenSearch dashboard is listening on.
- Ui
Uri string - The full URI for connecting to the OpenSearch dashboard.
- Ui
User string - Username for OpenSearch dashboard's default user.
- Uri string
- The full URI for connecting to the database cluster.
- User string
- Username for the cluster's default user.
- Version string
- Engine version used by the cluster (ex.
14
for PostgreSQL 14). When this value is changed, a call to the Upgrade major Version for a Database API operation is made with the new version.
- Backup
Restore DatabaseCluster Backup Restore Args - Cluster
Urn string - The uniform resource name of the database cluster.
- Database string
- Name of the cluster's default database.
- Engine string
- Database engine used by the cluster (ex.
pg
for PostgreSQL,mysql
for MySQL,redis
for Redis,mongodb
for MongoDB, orkafka
for Kafka). - Eviction
Policy string - A string specifying the eviction policy for a Redis cluster. Valid values are:
noeviction
,allkeys_lru
,allkeys_random
,volatile_lru
,volatile_random
, orvolatile_ttl
. - Host string
- Database cluster's hostname.
- Maintenance
Windows []DatabaseCluster Maintenance Window Args - Defines when the automatic maintenance should be performed for the database cluster.
- Name string
- The name of the database cluster.
- Node
Count int - Number of nodes that will be included in the cluster. For
kafka
clusters, this must be 3. - Password string
- Password for the cluster's default user.
- Port int
- Network port that the database cluster is listening on.
- Private
Host string - Same as
host
, but only accessible from resources within the account and in the same region. - Private
Network stringUuid - The ID of the VPC where the database cluster will be located.
- Private
Uri string - Same as
uri
, but only accessible from resources within the account and in the same region. - Project
Id string - The ID of the project that the database cluster is assigned to. If excluded when creating a new database cluster, it will be assigned to your default project.
- Region string | Region
- DigitalOcean region where the cluster will reside.
- Size
string | Database
Slug - Database Droplet size associated with the cluster (ex.
db-s-1vcpu-1gb
). See here for a list of valid size slugs. - Sql
Mode string - A comma separated string specifying the SQL modes for a MySQL cluster.
- Storage
Size stringMib - Defines the disk size, in MiB, allocated to the cluster. This can be adjusted on MySQL and PostgreSQL clusters based on predefined ranges for each slug/droplet size.
- []string
- A list of tag names to be applied to the database cluster.
- Ui
Database string - Name of the OpenSearch dashboard db.
- Ui
Host string - Hostname for the OpenSearch dashboard.
- Ui
Password string - Password for the OpenSearch dashboard's default user.
- Ui
Port int - Network port that the OpenSearch dashboard is listening on.
- Ui
Uri string - The full URI for connecting to the OpenSearch dashboard.
- Ui
User string - Username for OpenSearch dashboard's default user.
- Uri string
- The full URI for connecting to the database cluster.
- User string
- Username for the cluster's default user.
- Version string
- Engine version used by the cluster (ex.
14
for PostgreSQL 14). When this value is changed, a call to the Upgrade major Version for a Database API operation is made with the new version.
- backup
Restore DatabaseCluster Backup Restore - cluster
Urn String - The uniform resource name of the database cluster.
- database String
- Name of the cluster's default database.
- engine String
- Database engine used by the cluster (ex.
pg
for PostgreSQL,mysql
for MySQL,redis
for Redis,mongodb
for MongoDB, orkafka
for Kafka). - eviction
Policy String - A string specifying the eviction policy for a Redis cluster. Valid values are:
noeviction
,allkeys_lru
,allkeys_random
,volatile_lru
,volatile_random
, orvolatile_ttl
. - host String
- Database cluster's hostname.
- maintenance
Windows List<DatabaseCluster Maintenance Window> - Defines when the automatic maintenance should be performed for the database cluster.
- name String
- The name of the database cluster.
- node
Count Integer - Number of nodes that will be included in the cluster. For
kafka
clusters, this must be 3. - password String
- Password for the cluster's default user.
- port Integer
- Network port that the database cluster is listening on.
- private
Host String - Same as
host
, but only accessible from resources within the account and in the same region. - private
Network StringUuid - The ID of the VPC where the database cluster will be located.
- private
Uri String - Same as
uri
, but only accessible from resources within the account and in the same region. - project
Id String - The ID of the project that the database cluster is assigned to. If excluded when creating a new database cluster, it will be assigned to your default project.
- region String | Region
- DigitalOcean region where the cluster will reside.
- size
String | Database
Slug - Database Droplet size associated with the cluster (ex.
db-s-1vcpu-1gb
). See here for a list of valid size slugs. - sql
Mode String - A comma separated string specifying the SQL modes for a MySQL cluster.
- storage
Size StringMib - Defines the disk size, in MiB, allocated to the cluster. This can be adjusted on MySQL and PostgreSQL clusters based on predefined ranges for each slug/droplet size.
- List<String>
- A list of tag names to be applied to the database cluster.
- ui
Database String - Name of the OpenSearch dashboard db.
- ui
Host String - Hostname for the OpenSearch dashboard.
- ui
Password String - Password for the OpenSearch dashboard's default user.
- ui
Port Integer - Network port that the OpenSearch dashboard is listening on.
- ui
Uri String - The full URI for connecting to the OpenSearch dashboard.
- ui
User String - Username for OpenSearch dashboard's default user.
- uri String
- The full URI for connecting to the database cluster.
- user String
- Username for the cluster's default user.
- version String
- Engine version used by the cluster (ex.
14
for PostgreSQL 14). When this value is changed, a call to the Upgrade major Version for a Database API operation is made with the new version.
- backup
Restore DatabaseCluster Backup Restore - cluster
Urn string - The uniform resource name of the database cluster.
- database string
- Name of the cluster's default database.
- engine string
- Database engine used by the cluster (ex.
pg
for PostgreSQL,mysql
for MySQL,redis
for Redis,mongodb
for MongoDB, orkafka
for Kafka). - eviction
Policy string - A string specifying the eviction policy for a Redis cluster. Valid values are:
noeviction
,allkeys_lru
,allkeys_random
,volatile_lru
,volatile_random
, orvolatile_ttl
. - host string
- Database cluster's hostname.
- maintenance
Windows DatabaseCluster Maintenance Window[] - Defines when the automatic maintenance should be performed for the database cluster.
- name string
- The name of the database cluster.
- node
Count number - Number of nodes that will be included in the cluster. For
kafka
clusters, this must be 3. - password string
- Password for the cluster's default user.
- port number
- Network port that the database cluster is listening on.
- private
Host string - Same as
host
, but only accessible from resources within the account and in the same region. - private
Network stringUuid - The ID of the VPC where the database cluster will be located.
- private
Uri string - Same as
uri
, but only accessible from resources within the account and in the same region. - project
Id string - The ID of the project that the database cluster is assigned to. If excluded when creating a new database cluster, it will be assigned to your default project.
- region string | Region
- DigitalOcean region where the cluster will reside.
- size
string | Database
Slug - Database Droplet size associated with the cluster (ex.
db-s-1vcpu-1gb
). See here for a list of valid size slugs. - sql
Mode string - A comma separated string specifying the SQL modes for a MySQL cluster.
- storage
Size stringMib - Defines the disk size, in MiB, allocated to the cluster. This can be adjusted on MySQL and PostgreSQL clusters based on predefined ranges for each slug/droplet size.
- string[]
- A list of tag names to be applied to the database cluster.
- ui
Database string - Name of the OpenSearch dashboard db.
- ui
Host string - Hostname for the OpenSearch dashboard.
- ui
Password string - Password for the OpenSearch dashboard's default user.
- ui
Port number - Network port that the OpenSearch dashboard is listening on.
- ui
Uri string - The full URI for connecting to the OpenSearch dashboard.
- ui
User string - Username for OpenSearch dashboard's default user.
- uri string
- The full URI for connecting to the database cluster.
- user string
- Username for the cluster's default user.
- version string
- Engine version used by the cluster (ex.
14
for PostgreSQL 14). When this value is changed, a call to the Upgrade major Version for a Database API operation is made with the new version.
- backup_
restore DatabaseCluster Backup Restore Args - cluster_
urn str - The uniform resource name of the database cluster.
- database str
- Name of the cluster's default database.
- engine str
- Database engine used by the cluster (ex.
pg
for PostgreSQL,mysql
for MySQL,redis
for Redis,mongodb
for MongoDB, orkafka
for Kafka). - eviction_
policy str - A string specifying the eviction policy for a Redis cluster. Valid values are:
noeviction
,allkeys_lru
,allkeys_random
,volatile_lru
,volatile_random
, orvolatile_ttl
. - host str
- Database cluster's hostname.
- maintenance_
windows Sequence[DatabaseCluster Maintenance Window Args] - Defines when the automatic maintenance should be performed for the database cluster.
- name str
- The name of the database cluster.
- node_
count int - Number of nodes that will be included in the cluster. For
kafka
clusters, this must be 3. - password str
- Password for the cluster's default user.
- port int
- Network port that the database cluster is listening on.
- private_
host str - Same as
host
, but only accessible from resources within the account and in the same region. - private_
network_ struuid - The ID of the VPC where the database cluster will be located.
- private_
uri str - Same as
uri
, but only accessible from resources within the account and in the same region. - project_
id str - The ID of the project that the database cluster is assigned to. If excluded when creating a new database cluster, it will be assigned to your default project.
- region str | Region
- DigitalOcean region where the cluster will reside.
- size
str | Database
Slug - Database Droplet size associated with the cluster (ex.
db-s-1vcpu-1gb
). See here for a list of valid size slugs. - sql_
mode str - A comma separated string specifying the SQL modes for a MySQL cluster.
- storage_
size_ strmib - Defines the disk size, in MiB, allocated to the cluster. This can be adjusted on MySQL and PostgreSQL clusters based on predefined ranges for each slug/droplet size.
- Sequence[str]
- A list of tag names to be applied to the database cluster.
- ui_
database str - Name of the OpenSearch dashboard db.
- ui_
host str - Hostname for the OpenSearch dashboard.
- ui_
password str - Password for the OpenSearch dashboard's default user.
- ui_
port int - Network port that the OpenSearch dashboard is listening on.
- ui_
uri str - The full URI for connecting to the OpenSearch dashboard.
- ui_
user str - Username for OpenSearch dashboard's default user.
- uri str
- The full URI for connecting to the database cluster.
- user str
- Username for the cluster's default user.
- version str
- Engine version used by the cluster (ex.
14
for PostgreSQL 14). When this value is changed, a call to the Upgrade major Version for a Database API operation is made with the new version.
- backup
Restore Property Map - cluster
Urn String - The uniform resource name of the database cluster.
- database String
- Name of the cluster's default database.
- engine String
- Database engine used by the cluster (ex.
pg
for PostgreSQL,mysql
for MySQL,redis
for Redis,mongodb
for MongoDB, orkafka
for Kafka). - eviction
Policy String - A string specifying the eviction policy for a Redis cluster. Valid values are:
noeviction
,allkeys_lru
,allkeys_random
,volatile_lru
,volatile_random
, orvolatile_ttl
. - host String
- Database cluster's hostname.
- maintenance
Windows List<Property Map> - Defines when the automatic maintenance should be performed for the database cluster.
- name String
- The name of the database cluster.
- node
Count Number - Number of nodes that will be included in the cluster. For
kafka
clusters, this must be 3. - password String
- Password for the cluster's default user.
- port Number
- Network port that the database cluster is listening on.
- private
Host String - Same as
host
, but only accessible from resources within the account and in the same region. - private
Network StringUuid - The ID of the VPC where the database cluster will be located.
- private
Uri String - Same as
uri
, but only accessible from resources within the account and in the same region. - project
Id String - The ID of the project that the database cluster is assigned to. If excluded when creating a new database cluster, it will be assigned to your default project.
- region String | "nyc1" | "nyc2" | "nyc3" | "sgp1" | "lon1" | "ams2" | "ams3" | "fra1" | "tor1" | "sfo1" | "sfo2" | "sfo3" | "blr1" | "syd1"
- DigitalOcean region where the cluster 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 cluster (ex.
db-s-1vcpu-1gb
). See here for a list of valid size slugs. - sql
Mode String - A comma separated string specifying the SQL modes for a MySQL cluster.
- storage
Size StringMib - Defines the disk size, in MiB, allocated to the cluster. This can be adjusted on MySQL and PostgreSQL clusters based on predefined ranges for each slug/droplet size.
- List<String>
- A list of tag names to be applied to the database cluster.
- ui
Database String - Name of the OpenSearch dashboard db.
- ui
Host String - Hostname for the OpenSearch dashboard.
- ui
Password String - Password for the OpenSearch dashboard's default user.
- ui
Port Number - Network port that the OpenSearch dashboard is listening on.
- ui
Uri String - The full URI for connecting to the OpenSearch dashboard.
- ui
User String - Username for OpenSearch dashboard's default user.
- uri String
- The full URI for connecting to the database cluster.
- user String
- Username for the cluster's default user.
- version String
- Engine version used by the cluster (ex.
14
for PostgreSQL 14). When this value is changed, a call to the Upgrade major Version for a Database API operation is made with the new version.
Supporting Types
DatabaseClusterBackupRestore, DatabaseClusterBackupRestoreArgs
- Database
Name string - The name of an existing database cluster from which the backup will be restored.
- Backup
Created stringAt The timestamp of an existing database cluster backup in ISO8601 combined date and time format. The most recent backup will be used if excluded.
This resource supports customized create timeouts. The default timeout is 30 minutes.
- Database
Name string - The name of an existing database cluster from which the backup will be restored.
- Backup
Created stringAt The timestamp of an existing database cluster backup in ISO8601 combined date and time format. The most recent backup will be used if excluded.
This resource supports customized create timeouts. The default timeout is 30 minutes.
- database
Name String - The name of an existing database cluster from which the backup will be restored.
- backup
Created StringAt The timestamp of an existing database cluster backup in ISO8601 combined date and time format. The most recent backup will be used if excluded.
This resource supports customized create timeouts. The default timeout is 30 minutes.
- database
Name string - The name of an existing database cluster from which the backup will be restored.
- backup
Created stringAt The timestamp of an existing database cluster backup in ISO8601 combined date and time format. The most recent backup will be used if excluded.
This resource supports customized create timeouts. The default timeout is 30 minutes.
- database_
name str - The name of an existing database cluster from which the backup will be restored.
- backup_
created_ strat The timestamp of an existing database cluster backup in ISO8601 combined date and time format. The most recent backup will be used if excluded.
This resource supports customized create timeouts. The default timeout is 30 minutes.
- database
Name String - The name of an existing database cluster from which the backup will be restored.
- backup
Created StringAt The timestamp of an existing database cluster backup in ISO8601 combined date and time format. The most recent backup will be used if excluded.
This resource supports customized create timeouts. The default timeout is 30 minutes.
DatabaseClusterMaintenanceWindow, DatabaseClusterMaintenanceWindowArgs
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
- Database
Slug_DB_1VPCU1GB - db-s-1vcpu-1gb
- Database
Slug_DB_1VPCU2GB - db-s-1vcpu-2gb
- Database
Slug_DB_2VPCU4GB - db-s-2vcpu-4gb
- Database
Slug_DB_4VPCU8GB - db-s-4vcpu-8gb
- Database
Slug_DB_6VPCU16GB - db-s-6vcpu-16gb
- Database
Slug_DB_8VPCU32GB - db-s-8vcpu-32gb
- Database
Slug_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
- Region
NYC1 - nyc1
- Region
NYC2 - nyc2
- Region
NYC3 - nyc3
- Region
SGP1 - sgp1
- Region
LON1 - lon1
- Region
AMS2 - ams2
- Region
AMS3 - ams3
- Region
FRA1 - fra1
- Region
TOR1 - tor1
- Region
SFO1 - sfo1
- Region
SFO2 - sfo2
- Region
SFO3 - sfo3
- Region
BLR1 - blr1
- Region
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
- "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 clusters can be imported using the id
returned from DigitalOcean, e.g.
$ pulumi import digitalocean:index/databaseCluster:DatabaseCluster mycluster 245bcfd0-7f31-4ce6-a2bc-475a116cca97
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.