1. Packages
  2. Databricks Provider
  3. API Docs
  4. DatabaseInstance
Databricks v1.73.0 published on Monday, Jul 14, 2025 by Pulumi

databricks.DatabaseInstance

Explore with Pulumi AI

databricks logo
Databricks v1.73.0 published on Monday, Jul 14, 2025 by Pulumi

    Database Instances are managed Postgres instances, composed of a primary Postgres compute instance and 0 or more read replica instances.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as databricks from "@pulumi/databricks";
    
    const _this = new databricks.DatabaseInstance("this", {
        name: "my-database-instance",
        capacity: "CU_2",
    });
    
    import pulumi
    import pulumi_databricks as databricks
    
    this = databricks.DatabaseInstance("this",
        name="my-database-instance",
        capacity="CU_2")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-databricks/sdk/go/databricks"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := databricks.NewDatabaseInstance(ctx, "this", &databricks.DatabaseInstanceArgs{
    			Name:     pulumi.String("my-database-instance"),
    			Capacity: pulumi.String("CU_2"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Databricks = Pulumi.Databricks;
    
    return await Deployment.RunAsync(() => 
    {
        var @this = new Databricks.DatabaseInstance("this", new()
        {
            Name = "my-database-instance",
            Capacity = "CU_2",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.databricks.DatabaseInstance;
    import com.pulumi.databricks.DatabaseInstanceArgs;
    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 this_ = new DatabaseInstance("this", DatabaseInstanceArgs.builder()
                .name("my-database-instance")
                .capacity("CU_2")
                .build());
    
        }
    }
    
    resources:
      this:
        type: databricks:DatabaseInstance
        properties:
          name: my-database-instance
          capacity: CU_2
    

    Create DatabaseInstance Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new DatabaseInstance(name: string, args?: DatabaseInstanceArgs, opts?: CustomResourceOptions);
    @overload
    def DatabaseInstance(resource_name: str,
                         args: Optional[DatabaseInstanceArgs] = None,
                         opts: Optional[ResourceOptions] = None)
    
    @overload
    def DatabaseInstance(resource_name: str,
                         opts: Optional[ResourceOptions] = None,
                         capacity: Optional[str] = None,
                         name: Optional[str] = None,
                         stopped: Optional[bool] = None)
    func NewDatabaseInstance(ctx *Context, name string, args *DatabaseInstanceArgs, opts ...ResourceOption) (*DatabaseInstance, error)
    public DatabaseInstance(string name, DatabaseInstanceArgs? args = null, CustomResourceOptions? opts = null)
    public DatabaseInstance(String name, DatabaseInstanceArgs args)
    public DatabaseInstance(String name, DatabaseInstanceArgs args, CustomResourceOptions options)
    
    type: databricks:DatabaseInstance
    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 DatabaseInstanceArgs
    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 DatabaseInstanceArgs
    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 DatabaseInstanceArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args DatabaseInstanceArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args DatabaseInstanceArgs
    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 databaseInstanceResource = new Databricks.DatabaseInstance("databaseInstanceResource", new()
    {
        Capacity = "string",
        Name = "string",
        Stopped = false,
    });
    
    example, err := databricks.NewDatabaseInstance(ctx, "databaseInstanceResource", &databricks.DatabaseInstanceArgs{
    	Capacity: pulumi.String("string"),
    	Name:     pulumi.String("string"),
    	Stopped:  pulumi.Bool(false),
    })
    
    var databaseInstanceResource = new DatabaseInstance("databaseInstanceResource", DatabaseInstanceArgs.builder()
        .capacity("string")
        .name("string")
        .stopped(false)
        .build());
    
    database_instance_resource = databricks.DatabaseInstance("databaseInstanceResource",
        capacity="string",
        name="string",
        stopped=False)
    
    const databaseInstanceResource = new databricks.DatabaseInstance("databaseInstanceResource", {
        capacity: "string",
        name: "string",
        stopped: false,
    });
    
    type: databricks:DatabaseInstance
    properties:
        capacity: string
        name: string
        stopped: false
    

    DatabaseInstance 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 DatabaseInstance resource accepts the following input properties:

    Capacity string
    The sku of the instance. Valid values are "CU_1", "CU_2", "CU_4", "CU_8"
    Name string
    The name of the instance. This is the unique identifier for the instance
    Stopped bool
    Whether the instance is stopped
    Capacity string
    The sku of the instance. Valid values are "CU_1", "CU_2", "CU_4", "CU_8"
    Name string
    The name of the instance. This is the unique identifier for the instance
    Stopped bool
    Whether the instance is stopped
    capacity String
    The sku of the instance. Valid values are "CU_1", "CU_2", "CU_4", "CU_8"
    name String
    The name of the instance. This is the unique identifier for the instance
    stopped Boolean
    Whether the instance is stopped
    capacity string
    The sku of the instance. Valid values are "CU_1", "CU_2", "CU_4", "CU_8"
    name string
    The name of the instance. This is the unique identifier for the instance
    stopped boolean
    Whether the instance is stopped
    capacity str
    The sku of the instance. Valid values are "CU_1", "CU_2", "CU_4", "CU_8"
    name str
    The name of the instance. This is the unique identifier for the instance
    stopped bool
    Whether the instance is stopped
    capacity String
    The sku of the instance. Valid values are "CU_1", "CU_2", "CU_4", "CU_8"
    name String
    The name of the instance. This is the unique identifier for the instance
    stopped Boolean
    Whether the instance is stopped

    Outputs

    All input properties are implicitly available as output properties. Additionally, the DatabaseInstance resource produces the following output properties:

    CreationTime string
    (string) - The timestamp when the instance was created
    Creator string
    (string) - The email of the creator of the instance
    EffectiveStopped bool
    (boolean) - xref AIP-129. stopped is owned by the client, while effective_stopped is owned by the server. stopped will only be set in Create/Update response messages if and only if the user provides the field via the request. effective_stopped on the other hand will always bet set in all response messages (Create/Update/Get/List)
    Id string
    The provider-assigned unique ID for this managed resource.
    PgVersion string
    (string) - The version of Postgres running on the instance
    ReadWriteDns string
    (string) - The DNS endpoint to connect to the instance for read+write access
    State string
    (string) - The current state of the instance. Possible values are: AVAILABLE, DELETING, FAILING_OVER, STARTING, STOPPED, UPDATING
    Uid string
    (string) - An immutable UUID identifier for the instance
    CreationTime string
    (string) - The timestamp when the instance was created
    Creator string
    (string) - The email of the creator of the instance
    EffectiveStopped bool
    (boolean) - xref AIP-129. stopped is owned by the client, while effective_stopped is owned by the server. stopped will only be set in Create/Update response messages if and only if the user provides the field via the request. effective_stopped on the other hand will always bet set in all response messages (Create/Update/Get/List)
    Id string
    The provider-assigned unique ID for this managed resource.
    PgVersion string
    (string) - The version of Postgres running on the instance
    ReadWriteDns string
    (string) - The DNS endpoint to connect to the instance for read+write access
    State string
    (string) - The current state of the instance. Possible values are: AVAILABLE, DELETING, FAILING_OVER, STARTING, STOPPED, UPDATING
    Uid string
    (string) - An immutable UUID identifier for the instance
    creationTime String
    (string) - The timestamp when the instance was created
    creator String
    (string) - The email of the creator of the instance
    effectiveStopped Boolean
    (boolean) - xref AIP-129. stopped is owned by the client, while effective_stopped is owned by the server. stopped will only be set in Create/Update response messages if and only if the user provides the field via the request. effective_stopped on the other hand will always bet set in all response messages (Create/Update/Get/List)
    id String
    The provider-assigned unique ID for this managed resource.
    pgVersion String
    (string) - The version of Postgres running on the instance
    readWriteDns String
    (string) - The DNS endpoint to connect to the instance for read+write access
    state String
    (string) - The current state of the instance. Possible values are: AVAILABLE, DELETING, FAILING_OVER, STARTING, STOPPED, UPDATING
    uid String
    (string) - An immutable UUID identifier for the instance
    creationTime string
    (string) - The timestamp when the instance was created
    creator string
    (string) - The email of the creator of the instance
    effectiveStopped boolean
    (boolean) - xref AIP-129. stopped is owned by the client, while effective_stopped is owned by the server. stopped will only be set in Create/Update response messages if and only if the user provides the field via the request. effective_stopped on the other hand will always bet set in all response messages (Create/Update/Get/List)
    id string
    The provider-assigned unique ID for this managed resource.
    pgVersion string
    (string) - The version of Postgres running on the instance
    readWriteDns string
    (string) - The DNS endpoint to connect to the instance for read+write access
    state string
    (string) - The current state of the instance. Possible values are: AVAILABLE, DELETING, FAILING_OVER, STARTING, STOPPED, UPDATING
    uid string
    (string) - An immutable UUID identifier for the instance
    creation_time str
    (string) - The timestamp when the instance was created
    creator str
    (string) - The email of the creator of the instance
    effective_stopped bool
    (boolean) - xref AIP-129. stopped is owned by the client, while effective_stopped is owned by the server. stopped will only be set in Create/Update response messages if and only if the user provides the field via the request. effective_stopped on the other hand will always bet set in all response messages (Create/Update/Get/List)
    id str
    The provider-assigned unique ID for this managed resource.
    pg_version str
    (string) - The version of Postgres running on the instance
    read_write_dns str
    (string) - The DNS endpoint to connect to the instance for read+write access
    state str
    (string) - The current state of the instance. Possible values are: AVAILABLE, DELETING, FAILING_OVER, STARTING, STOPPED, UPDATING
    uid str
    (string) - An immutable UUID identifier for the instance
    creationTime String
    (string) - The timestamp when the instance was created
    creator String
    (string) - The email of the creator of the instance
    effectiveStopped Boolean
    (boolean) - xref AIP-129. stopped is owned by the client, while effective_stopped is owned by the server. stopped will only be set in Create/Update response messages if and only if the user provides the field via the request. effective_stopped on the other hand will always bet set in all response messages (Create/Update/Get/List)
    id String
    The provider-assigned unique ID for this managed resource.
    pgVersion String
    (string) - The version of Postgres running on the instance
    readWriteDns String
    (string) - The DNS endpoint to connect to the instance for read+write access
    state String
    (string) - The current state of the instance. Possible values are: AVAILABLE, DELETING, FAILING_OVER, STARTING, STOPPED, UPDATING
    uid String
    (string) - An immutable UUID identifier for the instance

    Look up Existing DatabaseInstance Resource

    Get an existing DatabaseInstance 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?: DatabaseInstanceState, opts?: CustomResourceOptions): DatabaseInstance
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            capacity: Optional[str] = None,
            creation_time: Optional[str] = None,
            creator: Optional[str] = None,
            effective_stopped: Optional[bool] = None,
            name: Optional[str] = None,
            pg_version: Optional[str] = None,
            read_write_dns: Optional[str] = None,
            state: Optional[str] = None,
            stopped: Optional[bool] = None,
            uid: Optional[str] = None) -> DatabaseInstance
    func GetDatabaseInstance(ctx *Context, name string, id IDInput, state *DatabaseInstanceState, opts ...ResourceOption) (*DatabaseInstance, error)
    public static DatabaseInstance Get(string name, Input<string> id, DatabaseInstanceState? state, CustomResourceOptions? opts = null)
    public static DatabaseInstance get(String name, Output<String> id, DatabaseInstanceState state, CustomResourceOptions options)
    resources:  _:    type: databricks:DatabaseInstance    get:      id: ${id}
    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:
    Capacity string
    The sku of the instance. Valid values are "CU_1", "CU_2", "CU_4", "CU_8"
    CreationTime string
    (string) - The timestamp when the instance was created
    Creator string
    (string) - The email of the creator of the instance
    EffectiveStopped bool
    (boolean) - xref AIP-129. stopped is owned by the client, while effective_stopped is owned by the server. stopped will only be set in Create/Update response messages if and only if the user provides the field via the request. effective_stopped on the other hand will always bet set in all response messages (Create/Update/Get/List)
    Name string
    The name of the instance. This is the unique identifier for the instance
    PgVersion string
    (string) - The version of Postgres running on the instance
    ReadWriteDns string
    (string) - The DNS endpoint to connect to the instance for read+write access
    State string
    (string) - The current state of the instance. Possible values are: AVAILABLE, DELETING, FAILING_OVER, STARTING, STOPPED, UPDATING
    Stopped bool
    Whether the instance is stopped
    Uid string
    (string) - An immutable UUID identifier for the instance
    Capacity string
    The sku of the instance. Valid values are "CU_1", "CU_2", "CU_4", "CU_8"
    CreationTime string
    (string) - The timestamp when the instance was created
    Creator string
    (string) - The email of the creator of the instance
    EffectiveStopped bool
    (boolean) - xref AIP-129. stopped is owned by the client, while effective_stopped is owned by the server. stopped will only be set in Create/Update response messages if and only if the user provides the field via the request. effective_stopped on the other hand will always bet set in all response messages (Create/Update/Get/List)
    Name string
    The name of the instance. This is the unique identifier for the instance
    PgVersion string
    (string) - The version of Postgres running on the instance
    ReadWriteDns string
    (string) - The DNS endpoint to connect to the instance for read+write access
    State string
    (string) - The current state of the instance. Possible values are: AVAILABLE, DELETING, FAILING_OVER, STARTING, STOPPED, UPDATING
    Stopped bool
    Whether the instance is stopped
    Uid string
    (string) - An immutable UUID identifier for the instance
    capacity String
    The sku of the instance. Valid values are "CU_1", "CU_2", "CU_4", "CU_8"
    creationTime String
    (string) - The timestamp when the instance was created
    creator String
    (string) - The email of the creator of the instance
    effectiveStopped Boolean
    (boolean) - xref AIP-129. stopped is owned by the client, while effective_stopped is owned by the server. stopped will only be set in Create/Update response messages if and only if the user provides the field via the request. effective_stopped on the other hand will always bet set in all response messages (Create/Update/Get/List)
    name String
    The name of the instance. This is the unique identifier for the instance
    pgVersion String
    (string) - The version of Postgres running on the instance
    readWriteDns String
    (string) - The DNS endpoint to connect to the instance for read+write access
    state String
    (string) - The current state of the instance. Possible values are: AVAILABLE, DELETING, FAILING_OVER, STARTING, STOPPED, UPDATING
    stopped Boolean
    Whether the instance is stopped
    uid String
    (string) - An immutable UUID identifier for the instance
    capacity string
    The sku of the instance. Valid values are "CU_1", "CU_2", "CU_4", "CU_8"
    creationTime string
    (string) - The timestamp when the instance was created
    creator string
    (string) - The email of the creator of the instance
    effectiveStopped boolean
    (boolean) - xref AIP-129. stopped is owned by the client, while effective_stopped is owned by the server. stopped will only be set in Create/Update response messages if and only if the user provides the field via the request. effective_stopped on the other hand will always bet set in all response messages (Create/Update/Get/List)
    name string
    The name of the instance. This is the unique identifier for the instance
    pgVersion string
    (string) - The version of Postgres running on the instance
    readWriteDns string
    (string) - The DNS endpoint to connect to the instance for read+write access
    state string
    (string) - The current state of the instance. Possible values are: AVAILABLE, DELETING, FAILING_OVER, STARTING, STOPPED, UPDATING
    stopped boolean
    Whether the instance is stopped
    uid string
    (string) - An immutable UUID identifier for the instance
    capacity str
    The sku of the instance. Valid values are "CU_1", "CU_2", "CU_4", "CU_8"
    creation_time str
    (string) - The timestamp when the instance was created
    creator str
    (string) - The email of the creator of the instance
    effective_stopped bool
    (boolean) - xref AIP-129. stopped is owned by the client, while effective_stopped is owned by the server. stopped will only be set in Create/Update response messages if and only if the user provides the field via the request. effective_stopped on the other hand will always bet set in all response messages (Create/Update/Get/List)
    name str
    The name of the instance. This is the unique identifier for the instance
    pg_version str
    (string) - The version of Postgres running on the instance
    read_write_dns str
    (string) - The DNS endpoint to connect to the instance for read+write access
    state str
    (string) - The current state of the instance. Possible values are: AVAILABLE, DELETING, FAILING_OVER, STARTING, STOPPED, UPDATING
    stopped bool
    Whether the instance is stopped
    uid str
    (string) - An immutable UUID identifier for the instance
    capacity String
    The sku of the instance. Valid values are "CU_1", "CU_2", "CU_4", "CU_8"
    creationTime String
    (string) - The timestamp when the instance was created
    creator String
    (string) - The email of the creator of the instance
    effectiveStopped Boolean
    (boolean) - xref AIP-129. stopped is owned by the client, while effective_stopped is owned by the server. stopped will only be set in Create/Update response messages if and only if the user provides the field via the request. effective_stopped on the other hand will always bet set in all response messages (Create/Update/Get/List)
    name String
    The name of the instance. This is the unique identifier for the instance
    pgVersion String
    (string) - The version of Postgres running on the instance
    readWriteDns String
    (string) - The DNS endpoint to connect to the instance for read+write access
    state String
    (string) - The current state of the instance. Possible values are: AVAILABLE, DELETING, FAILING_OVER, STARTING, STOPPED, UPDATING
    stopped Boolean
    Whether the instance is stopped
    uid String
    (string) - An immutable UUID identifier for the instance

    Import

    As of Pulumi v1.5, resources can be imported through configuration.

    hcl

    import {

    id = name

    to = databricks_database_instance.this

    }

    If you are using an older version of Pulumi, import the resource using the pulumi import command as follows:

    $ pulumi import databricks:index/databaseInstance:DatabaseInstance databricks_database_instance name
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    databricks pulumi/pulumi-databricks
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the databricks Terraform Provider.
    databricks logo
    Databricks v1.73.0 published on Monday, Jul 14, 2025 by Pulumi