1. Packages
  2. DigitalOcean
  3. API Docs
  4. DatabaseCluster
DigitalOcean v4.27.0 published on Wednesday, Mar 13, 2024 by Pulumi

digitalocean.DatabaseCluster

Explore with Pulumi AI

digitalocean logo
DigitalOcean v4.27.0 published on Wednesday, Mar 13, 2024 by Pulumi

    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", {
        engine: "pg",
        nodeCount: 1,
        region: "nyc1",
        size: "db-s-1vcpu-1gb",
        version: "15",
    });
    
    import pulumi
    import pulumi_digitalocean as digitalocean
    
    postgres_example = digitalocean.DatabaseCluster("postgres-example",
        engine="pg",
        node_count=1,
        region="nyc1",
        size="db-s-1vcpu-1gb",
        version="15")
    
    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{
    			Engine:    pulumi.String("pg"),
    			NodeCount: pulumi.Int(1),
    			Region:    pulumi.String("nyc1"),
    			Size:      pulumi.String("db-s-1vcpu-1gb"),
    			Version:   pulumi.String("15"),
    		})
    		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()
        {
            Engine = "pg",
            NodeCount = 1,
            Region = "nyc1",
            Size = "db-s-1vcpu-1gb",
            Version = "15",
        });
    
    });
    
    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()        
                .engine("pg")
                .nodeCount(1)
                .region("nyc1")
                .size("db-s-1vcpu-1gb")
                .version("15")
                .build());
    
        }
    }
    
    resources:
      postgres-example:
        type: digitalocean:DatabaseCluster
        properties:
          engine: pg
          nodeCount: 1
          region: nyc1
          size: db-s-1vcpu-1gb
          version: '15'
    

    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", {
        engine: "mysql",
        nodeCount: 1,
        region: "nyc1",
        size: "db-s-1vcpu-1gb",
        version: "8",
    });
    
    import pulumi
    import pulumi_digitalocean as digitalocean
    
    mysql_example = digitalocean.DatabaseCluster("mysql-example",
        engine="mysql",
        node_count=1,
        region="nyc1",
        size="db-s-1vcpu-1gb",
        version="8")
    
    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{
    			Engine:    pulumi.String("mysql"),
    			NodeCount: pulumi.Int(1),
    			Region:    pulumi.String("nyc1"),
    			Size:      pulumi.String("db-s-1vcpu-1gb"),
    			Version:   pulumi.String("8"),
    		})
    		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()
        {
            Engine = "mysql",
            NodeCount = 1,
            Region = "nyc1",
            Size = "db-s-1vcpu-1gb",
            Version = "8",
        });
    
    });
    
    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()        
                .engine("mysql")
                .nodeCount(1)
                .region("nyc1")
                .size("db-s-1vcpu-1gb")
                .version("8")
                .build());
    
        }
    }
    
    resources:
      mysql-example:
        type: digitalocean:DatabaseCluster
        properties:
          engine: mysql
          nodeCount: 1
          region: nyc1
          size: db-s-1vcpu-1gb
          version: '8'
    

    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", {
        engine: "redis",
        nodeCount: 1,
        region: "nyc1",
        size: "db-s-1vcpu-1gb",
        version: "7",
    });
    
    import pulumi
    import pulumi_digitalocean as digitalocean
    
    redis_example = digitalocean.DatabaseCluster("redis-example",
        engine="redis",
        node_count=1,
        region="nyc1",
        size="db-s-1vcpu-1gb",
        version="7")
    
    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{
    			Engine:    pulumi.String("redis"),
    			NodeCount: pulumi.Int(1),
    			Region:    pulumi.String("nyc1"),
    			Size:      pulumi.String("db-s-1vcpu-1gb"),
    			Version:   pulumi.String("7"),
    		})
    		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()
        {
            Engine = "redis",
            NodeCount = 1,
            Region = "nyc1",
            Size = "db-s-1vcpu-1gb",
            Version = "7",
        });
    
    });
    
    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()        
                .engine("redis")
                .nodeCount(1)
                .region("nyc1")
                .size("db-s-1vcpu-1gb")
                .version("7")
                .build());
    
        }
    }
    
    resources:
      redis-example:
        type: digitalocean:DatabaseCluster
        properties:
          engine: redis
          nodeCount: 1
          region: nyc1
          size: db-s-1vcpu-1gb
          version: '7'
    

    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", {
        engine: "kafka",
        nodeCount: 3,
        region: "nyc1",
        size: "db-s-2vcpu-2gb",
        version: "3.5",
    });
    
    import pulumi
    import pulumi_digitalocean as digitalocean
    
    kafka_example = digitalocean.DatabaseCluster("kafka-example",
        engine="kafka",
        node_count=3,
        region="nyc1",
        size="db-s-2vcpu-2gb",
        version="3.5")
    
    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{
    			Engine:    pulumi.String("kafka"),
    			NodeCount: pulumi.Int(3),
    			Region:    pulumi.String("nyc1"),
    			Size:      pulumi.String("db-s-2vcpu-2gb"),
    			Version:   pulumi.String("3.5"),
    		})
    		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()
        {
            Engine = "kafka",
            NodeCount = 3,
            Region = "nyc1",
            Size = "db-s-2vcpu-2gb",
            Version = "3.5",
        });
    
    });
    
    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()        
                .engine("kafka")
                .nodeCount(3)
                .region("nyc1")
                .size("db-s-2vcpu-2gb")
                .version("3.5")
                .build());
    
        }
    }
    
    resources:
      kafka-example:
        type: digitalocean:DatabaseCluster
        properties:
          engine: kafka
          nodeCount: 3
          region: nyc1
          size: db-s-2vcpu-2gb
          version: '3.5'
    

    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", {
        engine: "mongodb",
        nodeCount: 1,
        region: "nyc3",
        size: "db-s-1vcpu-1gb",
        version: "6",
    });
    
    import pulumi
    import pulumi_digitalocean as digitalocean
    
    mongodb_example = digitalocean.DatabaseCluster("mongodb-example",
        engine="mongodb",
        node_count=1,
        region="nyc3",
        size="db-s-1vcpu-1gb",
        version="6")
    
    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{
    			Engine:    pulumi.String("mongodb"),
    			NodeCount: pulumi.Int(1),
    			Region:    pulumi.String("nyc3"),
    			Size:      pulumi.String("db-s-1vcpu-1gb"),
    			Version:   pulumi.String("6"),
    		})
    		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()
        {
            Engine = "mongodb",
            NodeCount = 1,
            Region = "nyc3",
            Size = "db-s-1vcpu-1gb",
            Version = "6",
        });
    
    });
    
    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()        
                .engine("mongodb")
                .nodeCount(1)
                .region("nyc3")
                .size("db-s-1vcpu-1gb")
                .version("6")
                .build());
    
        }
    }
    
    resources:
      mongodb-example:
        type: digitalocean:DatabaseCluster
        properties:
          engine: mongodb
          nodeCount: 1
          region: nyc3
          size: db-s-1vcpu-1gb
          version: '6'
    

    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", {
        engine: "pg",
        version: "11",
        size: "db-s-1vcpu-2gb",
        region: "nyc1",
        nodeCount: 1,
        tags: ["production"],
    });
    const dobyBackup = new digitalocean.DatabaseCluster("dobyBackup", {
        engine: "pg",
        version: "11",
        size: "db-s-1vcpu-2gb",
        region: "nyc1",
        nodeCount: 1,
        tags: ["production"],
        backupRestore: {
            databaseName: "dobydb",
        },
    }, {
        dependsOn: [doby],
    });
    
    import pulumi
    import pulumi_digitalocean as digitalocean
    
    doby = digitalocean.DatabaseCluster("doby",
        engine="pg",
        version="11",
        size="db-s-1vcpu-2gb",
        region="nyc1",
        node_count=1,
        tags=["production"])
    doby_backup = digitalocean.DatabaseCluster("dobyBackup",
        engine="pg",
        version="11",
        size="db-s-1vcpu-2gb",
        region="nyc1",
        node_count=1,
        tags=["production"],
        backup_restore=digitalocean.DatabaseClusterBackupRestoreArgs(
            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{
    			Engine:    pulumi.String("pg"),
    			Version:   pulumi.String("11"),
    			Size:      pulumi.String("db-s-1vcpu-2gb"),
    			Region:    pulumi.String("nyc1"),
    			NodeCount: pulumi.Int(1),
    			Tags: pulumi.StringArray{
    				pulumi.String("production"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = digitalocean.NewDatabaseCluster(ctx, "dobyBackup", &digitalocean.DatabaseClusterArgs{
    			Engine:    pulumi.String("pg"),
    			Version:   pulumi.String("11"),
    			Size:      pulumi.String("db-s-1vcpu-2gb"),
    			Region:    pulumi.String("nyc1"),
    			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()
        {
            Engine = "pg",
            Version = "11",
            Size = "db-s-1vcpu-2gb",
            Region = "nyc1",
            NodeCount = 1,
            Tags = new[]
            {
                "production",
            },
        });
    
        var dobyBackup = new DigitalOcean.DatabaseCluster("dobyBackup", new()
        {
            Engine = "pg",
            Version = "11",
            Size = "db-s-1vcpu-2gb",
            Region = "nyc1",
            NodeCount = 1,
            Tags = new[]
            {
                "production",
            },
            BackupRestore = new DigitalOcean.Inputs.DatabaseClusterBackupRestoreArgs
            {
                DatabaseName = "dobydb",
            },
        }, new CustomResourceOptions
        {
            DependsOn = new[]
            {
                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()        
                .engine("pg")
                .version("11")
                .size("db-s-1vcpu-2gb")
                .region("nyc1")
                .nodeCount(1)
                .tags("production")
                .build());
    
            var dobyBackup = new DatabaseCluster("dobyBackup", DatabaseClusterArgs.builder()        
                .engine("pg")
                .version("11")
                .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:
          engine: pg
          version: '11'
          size: db-s-1vcpu-2gb
          region: nyc1
          nodeCount: 1
          tags:
            - production
      dobyBackup:
        type: digitalocean:DatabaseCluster
        properties:
          engine: pg
          version: '11'
          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.

    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=[digitalocean.DatabaseClusterMaintenanceWindowArgs(
            day="string",
            hour="string",
        )],
        name="string",
        private_network_uuid="string",
        project_id="string",
        backup_restore=digitalocean.DatabaseClusterBackupRestoreArgs(
            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

    The DatabaseCluster resource accepts the following input properties:

    Engine string
    Database engine used by the cluster (ex. pg for PostreSQL, mysql for MySQL, redis for Redis, mongodb for MongoDB, or kafka for Kafka).
    NodeCount int
    Number of nodes that will be included in the cluster. For kafka clusters, this must be 3.
    Region string | Pulumi.DigitalOcean.Region
    DigitalOcean region where the cluster will reside.
    Size string | Pulumi.DigitalOcean.DatabaseSlug
    Database Droplet size associated with the cluster (ex. db-s-1vcpu-1gb). See here for a list of valid size slugs.
    BackupRestore Pulumi.DigitalOcean.Inputs.DatabaseClusterBackupRestore
    Create a new database cluster based on a backup of an existing cluster.
    EvictionPolicy string
    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.
    MaintenanceWindows List<Pulumi.DigitalOcean.Inputs.DatabaseClusterMaintenanceWindow>
    Defines when the automatic maintenance should be performed for the database cluster.
    Name string
    The name of the database cluster.
    PrivateNetworkUuid string
    The ID of the VPC where the database cluster will be located.
    ProjectId 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.
    SqlMode string
    A comma separated string specifying the SQL modes for a MySQL cluster.
    StorageSizeMib string
    Defines the disk size, in MiB, allocated to the cluster. This can be adjusted on MySQL and PostreSQL clusters based on predefined ranges for each slug/droplet size.
    Tags 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 PostreSQL, mysql for MySQL, redis for Redis, mongodb for MongoDB, or kafka for Kafka).
    NodeCount 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 | DatabaseSlug
    Database Droplet size associated with the cluster (ex. db-s-1vcpu-1gb). See here for a list of valid size slugs.
    BackupRestore DatabaseClusterBackupRestoreArgs
    Create a new database cluster based on a backup of an existing cluster.
    EvictionPolicy string
    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.
    MaintenanceWindows []DatabaseClusterMaintenanceWindowArgs
    Defines when the automatic maintenance should be performed for the database cluster.
    Name string
    The name of the database cluster.
    PrivateNetworkUuid string
    The ID of the VPC where the database cluster will be located.
    ProjectId 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.
    SqlMode string
    A comma separated string specifying the SQL modes for a MySQL cluster.
    StorageSizeMib string
    Defines the disk size, in MiB, allocated to the cluster. This can be adjusted on MySQL and PostreSQL clusters based on predefined ranges for each slug/droplet size.
    Tags []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 PostreSQL, mysql for MySQL, redis for Redis, mongodb for MongoDB, or kafka for Kafka).
    nodeCount 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 | DatabaseSlug
    Database Droplet size associated with the cluster (ex. db-s-1vcpu-1gb). See here for a list of valid size slugs.
    backupRestore DatabaseClusterBackupRestore
    Create a new database cluster based on a backup of an existing cluster.
    evictionPolicy String
    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.
    maintenanceWindows List<DatabaseClusterMaintenanceWindow>
    Defines when the automatic maintenance should be performed for the database cluster.
    name String
    The name of the database cluster.
    privateNetworkUuid String
    The ID of the VPC where the database cluster will be located.
    projectId 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.
    sqlMode String
    A comma separated string specifying the SQL modes for a MySQL cluster.
    storageSizeMib String
    Defines the disk size, in MiB, allocated to the cluster. This can be adjusted on MySQL and PostreSQL clusters based on predefined ranges for each slug/droplet size.
    tags 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 PostreSQL, mysql for MySQL, redis for Redis, mongodb for MongoDB, or kafka for Kafka).
    nodeCount 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 | DatabaseSlug
    Database Droplet size associated with the cluster (ex. db-s-1vcpu-1gb). See here for a list of valid size slugs.
    backupRestore DatabaseClusterBackupRestore
    Create a new database cluster based on a backup of an existing cluster.
    evictionPolicy string
    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.
    maintenanceWindows DatabaseClusterMaintenanceWindow[]
    Defines when the automatic maintenance should be performed for the database cluster.
    name string
    The name of the database cluster.
    privateNetworkUuid string
    The ID of the VPC where the database cluster will be located.
    projectId 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.
    sqlMode string
    A comma separated string specifying the SQL modes for a MySQL cluster.
    storageSizeMib string
    Defines the disk size, in MiB, allocated to the cluster. This can be adjusted on MySQL and PostreSQL clusters based on predefined ranges for each slug/droplet size.
    tags 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 PostreSQL, mysql for MySQL, redis for Redis, mongodb for MongoDB, or kafka 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 | DatabaseSlug
    Database Droplet size associated with the cluster (ex. db-s-1vcpu-1gb). See here for a list of valid size slugs.
    backup_restore DatabaseClusterBackupRestoreArgs
    Create a new database cluster based on a backup of an existing cluster.
    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, or volatile_ttl.
    maintenance_windows Sequence[DatabaseClusterMaintenanceWindowArgs]
    Defines when the automatic maintenance should be performed for the database cluster.
    name str
    The name of the database cluster.
    private_network_uuid str
    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_mib str
    Defines the disk size, in MiB, allocated to the cluster. This can be adjusted on MySQL and PostreSQL clusters based on predefined ranges for each slug/droplet size.
    tags 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 PostreSQL, mysql for MySQL, redis for Redis, mongodb for MongoDB, or kafka for Kafka).
    nodeCount 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.
    backupRestore Property Map
    Create a new database cluster based on a backup of an existing cluster.
    evictionPolicy String
    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.
    maintenanceWindows List<Property Map>
    Defines when the automatic maintenance should be performed for the database cluster.
    name String
    The name of the database cluster.
    privateNetworkUuid String
    The ID of the VPC where the database cluster will be located.
    projectId 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.
    sqlMode String
    A comma separated string specifying the SQL modes for a MySQL cluster.
    storageSizeMib String
    Defines the disk size, in MiB, allocated to the cluster. This can be adjusted on MySQL and PostreSQL clusters based on predefined ranges for each slug/droplet size.
    tags 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:

    ClusterUrn 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.
    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 cluster.
    User string
    Username for the cluster's default user.
    ClusterUrn 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.
    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 cluster.
    User string
    Username for the cluster's default user.
    clusterUrn 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.
    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 cluster.
    user String
    Username for the cluster's default user.
    clusterUrn 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.
    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 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.
    uri str
    The full URI for connecting to the database cluster.
    user str
    Username for the cluster's default user.
    clusterUrn 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.
    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 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,
            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.
    The following state arguments are supported:
    BackupRestore Pulumi.DigitalOcean.Inputs.DatabaseClusterBackupRestore
    Create a new database cluster based on a backup of an existing cluster.
    ClusterUrn 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 PostreSQL, mysql for MySQL, redis for Redis, mongodb for MongoDB, or kafka for Kafka).
    EvictionPolicy string
    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.
    Host string
    Database cluster's hostname.
    MaintenanceWindows List<Pulumi.DigitalOcean.Inputs.DatabaseClusterMaintenanceWindow>
    Defines when the automatic maintenance should be performed for the database cluster.
    Name string
    The name of the database cluster.
    NodeCount 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.
    PrivateHost string
    Same as host, but only accessible from resources within the account and in the same region.
    PrivateNetworkUuid string
    The ID of the VPC where the database cluster will be located.
    PrivateUri string
    Same as uri, but only accessible from resources within the account and in the same region.
    ProjectId 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.DigitalOcean.Region
    DigitalOcean region where the cluster will reside.
    Size string | Pulumi.DigitalOcean.DatabaseSlug
    Database Droplet size associated with the cluster (ex. db-s-1vcpu-1gb). See here for a list of valid size slugs.
    SqlMode string
    A comma separated string specifying the SQL modes for a MySQL cluster.
    StorageSizeMib string
    Defines the disk size, in MiB, allocated to the cluster. This can be adjusted on MySQL and PostreSQL clusters based on predefined ranges for each slug/droplet size.
    Tags List<string>
    A list of tag names to be applied to the database cluster.
    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.
    BackupRestore DatabaseClusterBackupRestoreArgs
    Create a new database cluster based on a backup of an existing cluster.
    ClusterUrn 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 PostreSQL, mysql for MySQL, redis for Redis, mongodb for MongoDB, or kafka for Kafka).
    EvictionPolicy string
    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.
    Host string
    Database cluster's hostname.
    MaintenanceWindows []DatabaseClusterMaintenanceWindowArgs
    Defines when the automatic maintenance should be performed for the database cluster.
    Name string
    The name of the database cluster.
    NodeCount 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.
    PrivateHost string
    Same as host, but only accessible from resources within the account and in the same region.
    PrivateNetworkUuid string
    The ID of the VPC where the database cluster will be located.
    PrivateUri string
    Same as uri, but only accessible from resources within the account and in the same region.
    ProjectId 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 | DatabaseSlug
    Database Droplet size associated with the cluster (ex. db-s-1vcpu-1gb). See here for a list of valid size slugs.
    SqlMode string
    A comma separated string specifying the SQL modes for a MySQL cluster.
    StorageSizeMib string
    Defines the disk size, in MiB, allocated to the cluster. This can be adjusted on MySQL and PostreSQL clusters based on predefined ranges for each slug/droplet size.
    Tags []string
    A list of tag names to be applied to the database cluster.
    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.
    backupRestore DatabaseClusterBackupRestore
    Create a new database cluster based on a backup of an existing cluster.
    clusterUrn 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 PostreSQL, mysql for MySQL, redis for Redis, mongodb for MongoDB, or kafka for Kafka).
    evictionPolicy String
    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.
    host String
    Database cluster's hostname.
    maintenanceWindows List<DatabaseClusterMaintenanceWindow>
    Defines when the automatic maintenance should be performed for the database cluster.
    name String
    The name of the database cluster.
    nodeCount 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.
    privateHost String
    Same as host, but only accessible from resources within the account and in the same region.
    privateNetworkUuid String
    The ID of the VPC where the database cluster will be located.
    privateUri String
    Same as uri, but only accessible from resources within the account and in the same region.
    projectId 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 | DatabaseSlug
    Database Droplet size associated with the cluster (ex. db-s-1vcpu-1gb). See here for a list of valid size slugs.
    sqlMode String
    A comma separated string specifying the SQL modes for a MySQL cluster.
    storageSizeMib String
    Defines the disk size, in MiB, allocated to the cluster. This can be adjusted on MySQL and PostreSQL clusters based on predefined ranges for each slug/droplet size.
    tags List<String>
    A list of tag names to be applied to the database cluster.
    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.
    backupRestore DatabaseClusterBackupRestore
    Create a new database cluster based on a backup of an existing cluster.
    clusterUrn 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 PostreSQL, mysql for MySQL, redis for Redis, mongodb for MongoDB, or kafka for Kafka).
    evictionPolicy string
    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.
    host string
    Database cluster's hostname.
    maintenanceWindows DatabaseClusterMaintenanceWindow[]
    Defines when the automatic maintenance should be performed for the database cluster.
    name string
    The name of the database cluster.
    nodeCount 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.
    privateHost string
    Same as host, but only accessible from resources within the account and in the same region.
    privateNetworkUuid string
    The ID of the VPC where the database cluster will be located.
    privateUri string
    Same as uri, but only accessible from resources within the account and in the same region.
    projectId 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 | DatabaseSlug
    Database Droplet size associated with the cluster (ex. db-s-1vcpu-1gb). See here for a list of valid size slugs.
    sqlMode string
    A comma separated string specifying the SQL modes for a MySQL cluster.
    storageSizeMib string
    Defines the disk size, in MiB, allocated to the cluster. This can be adjusted on MySQL and PostreSQL clusters based on predefined ranges for each slug/droplet size.
    tags string[]
    A list of tag names to be applied to the database cluster.
    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 DatabaseClusterBackupRestoreArgs
    Create a new database cluster based on a backup of an existing cluster.
    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 PostreSQL, mysql for MySQL, redis for Redis, mongodb for MongoDB, or kafka 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, or volatile_ttl.
    host str
    Database cluster's hostname.
    maintenance_windows Sequence[DatabaseClusterMaintenanceWindowArgs]
    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_uuid str
    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 | DatabaseSlug
    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_mib str
    Defines the disk size, in MiB, allocated to the cluster. This can be adjusted on MySQL and PostreSQL clusters based on predefined ranges for each slug/droplet size.
    tags Sequence[str]
    A list of tag names to be applied to the database cluster.
    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.
    backupRestore Property Map
    Create a new database cluster based on a backup of an existing cluster.
    clusterUrn 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 PostreSQL, mysql for MySQL, redis for Redis, mongodb for MongoDB, or kafka for Kafka).
    evictionPolicy String
    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.
    host String
    Database cluster's hostname.
    maintenanceWindows List<Property Map>
    Defines when the automatic maintenance should be performed for the database cluster.
    name String
    The name of the database cluster.
    nodeCount 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.
    privateHost String
    Same as host, but only accessible from resources within the account and in the same region.
    privateNetworkUuid String
    The ID of the VPC where the database cluster will be located.
    privateUri String
    Same as uri, but only accessible from resources within the account and in the same region.
    projectId 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.
    sqlMode String
    A comma separated string specifying the SQL modes for a MySQL cluster.
    storageSizeMib String
    Defines the disk size, in MiB, allocated to the cluster. This can be adjusted on MySQL and PostreSQL clusters based on predefined ranges for each slug/droplet size.
    tags List<String>
    A list of tag names to be applied to the database cluster.
    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

    DatabaseName string
    The name of an existing database cluster from which the backup will be restored.
    BackupCreatedAt string

    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.

    DatabaseName string
    The name of an existing database cluster from which the backup will be restored.
    BackupCreatedAt string

    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.

    databaseName String
    The name of an existing database cluster from which the backup will be restored.
    backupCreatedAt String

    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.

    databaseName string
    The name of an existing database cluster from which the backup will be restored.
    backupCreatedAt string

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

    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.

    databaseName String
    The name of an existing database cluster from which the backup will be restored.
    backupCreatedAt String

    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

    Day string
    The day of the week on which to apply maintenance updates.
    Hour string
    The hour in UTC at which maintenance updates will be applied in 24 hour format.
    Day string
    The day of the week on which to apply maintenance updates.
    Hour string
    The hour in UTC at which maintenance updates will be applied in 24 hour format.
    day String
    The day of the week on which to apply maintenance updates.
    hour String
    The hour in UTC at which maintenance updates will be applied in 24 hour format.
    day string
    The day of the week on which to apply maintenance updates.
    hour string
    The hour in UTC at which maintenance updates will be applied in 24 hour format.
    day str
    The day of the week on which to apply maintenance updates.
    hour str
    The hour in UTC at which maintenance updates will be applied in 24 hour format.
    day String
    The day of the week on which to apply maintenance updates.
    hour String
    The hour in UTC at which maintenance updates will be applied in 24 hour format.

    DatabaseSlug, DatabaseSlugArgs

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

    Region, RegionArgs

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

    Import

    Database 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.
    digitalocean logo
    DigitalOcean v4.27.0 published on Wednesday, Mar 13, 2024 by Pulumi