Databricks v1.73.0 published on Monday, Jul 14, 2025 by Pulumi
databricks.getDatabaseInstances
Explore with Pulumi AI
This data source can be used to fetch the list of Database Instances within the workspace.
The list can then be accessed via the data object’s database_instances
field.
Example Usage
Getting a list of all Database Instances:
import * as pulumi from "@pulumi/pulumi";
import * as databricks from "@pulumi/databricks";
const all = databricks.getDatabaseInstances({});
export const allDatabaseInstances = all.then(all => all.databaseInstances);
import pulumi
import pulumi_databricks as databricks
all = databricks.get_database_instances()
pulumi.export("allDatabaseInstances", all.database_instances)
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 {
all, err := databricks.GetDatabaseInstances(ctx, map[string]interface{}{}, nil)
if err != nil {
return err
}
ctx.Export("allDatabaseInstances", all.DatabaseInstances)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Databricks = Pulumi.Databricks;
return await Deployment.RunAsync(() =>
{
var all = Databricks.GetDatabaseInstances.Invoke();
return new Dictionary<string, object?>
{
["allDatabaseInstances"] = all.Apply(getDatabaseInstancesResult => getDatabaseInstancesResult.DatabaseInstances),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.databricks.DatabricksFunctions;
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) {
final var all = DatabricksFunctions.getDatabaseInstances(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference);
ctx.export("allDatabaseInstances", all.databaseInstances());
}
}
variables:
all:
fn::invoke:
function: databricks:getDatabaseInstances
arguments: {}
outputs:
allDatabaseInstances: ${all.databaseInstances}
Using getDatabaseInstances
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getDatabaseInstances(opts?: InvokeOptions): Promise<GetDatabaseInstancesResult>
function getDatabaseInstancesOutput(opts?: InvokeOptions): Output<GetDatabaseInstancesResult>
def get_database_instances(opts: Optional[InvokeOptions] = None) -> GetDatabaseInstancesResult
def get_database_instances_output(opts: Optional[InvokeOptions] = None) -> Output[GetDatabaseInstancesResult]
func GetDatabaseInstances(ctx *Context, opts ...InvokeOption) (*GetDatabaseInstancesResult, error)
func GetDatabaseInstancesOutput(ctx *Context, opts ...InvokeOption) GetDatabaseInstancesResultOutput
> Note: This function is named GetDatabaseInstances
in the Go SDK.
public static class GetDatabaseInstances
{
public static Task<GetDatabaseInstancesResult> InvokeAsync(InvokeOptions? opts = null)
public static Output<GetDatabaseInstancesResult> Invoke(InvokeOptions? opts = null)
}
public static CompletableFuture<GetDatabaseInstancesResult> getDatabaseInstances(InvokeOptions options)
public static Output<GetDatabaseInstancesResult> getDatabaseInstances(InvokeOptions options)
fn::invoke:
function: databricks:index/getDatabaseInstances:getDatabaseInstances
arguments:
# arguments dictionary
getDatabaseInstances Result
The following output properties are available:
- Database
Instances List<GetDatabase Instances Database Instance> - Id string
- The provider-assigned unique ID for this managed resource.
- Database
Instances []GetDatabase Instances Database Instance - Id string
- The provider-assigned unique ID for this managed resource.
- database
Instances List<GetDatabase Instances Database Instance> - id String
- The provider-assigned unique ID for this managed resource.
- database
Instances GetDatabase Instances Database Instance[] - id string
- The provider-assigned unique ID for this managed resource.
- database_
instances Sequence[GetDatabase Instances Database Instance] - id str
- The provider-assigned unique ID for this managed resource.
- database
Instances List<Property Map> - id String
- The provider-assigned unique ID for this managed resource.
Supporting Types
GetDatabaseInstancesDatabaseInstance
- Creation
Time string - (string) - The timestamp when the instance was created
- Creator string
- (string) - The email of the creator of the instance
- Effective
Stopped bool - (boolean) - xref AIP-129.
stopped
is owned by the client, whileeffective_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
- (string) - The name of the instance. This is the unique identifier for the instance
- Pg
Version string - (string) - The version of Postgres running on the instance
- Read
Write stringDns - (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
- Capacity string
- (string) - The sku of the instance. Valid values are "CU_1", "CU_2", "CU_4", "CU_8"
- Stopped bool
- (boolean) - Whether the instance is stopped
- Creation
Time string - (string) - The timestamp when the instance was created
- Creator string
- (string) - The email of the creator of the instance
- Effective
Stopped bool - (boolean) - xref AIP-129.
stopped
is owned by the client, whileeffective_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
- (string) - The name of the instance. This is the unique identifier for the instance
- Pg
Version string - (string) - The version of Postgres running on the instance
- Read
Write stringDns - (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
- Capacity string
- (string) - The sku of the instance. Valid values are "CU_1", "CU_2", "CU_4", "CU_8"
- Stopped bool
- (boolean) - Whether the instance is stopped
- creation
Time String - (string) - The timestamp when the instance was created
- creator String
- (string) - The email of the creator of the instance
- effective
Stopped Boolean - (boolean) - xref AIP-129.
stopped
is owned by the client, whileeffective_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
- (string) - The name of the instance. This is the unique identifier for the instance
- pg
Version String - (string) - The version of Postgres running on the instance
- read
Write StringDns - (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
- capacity String
- (string) - The sku of the instance. Valid values are "CU_1", "CU_2", "CU_4", "CU_8"
- stopped Boolean
- (boolean) - Whether the instance is stopped
- creation
Time string - (string) - The timestamp when the instance was created
- creator string
- (string) - The email of the creator of the instance
- effective
Stopped boolean - (boolean) - xref AIP-129.
stopped
is owned by the client, whileeffective_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
- (string) - The name of the instance. This is the unique identifier for the instance
- pg
Version string - (string) - The version of Postgres running on the instance
- read
Write stringDns - (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
- capacity string
- (string) - The sku of the instance. Valid values are "CU_1", "CU_2", "CU_4", "CU_8"
- stopped boolean
- (boolean) - Whether the instance is stopped
- 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, whileeffective_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
- (string) - 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_ strdns - (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
- capacity str
- (string) - The sku of the instance. Valid values are "CU_1", "CU_2", "CU_4", "CU_8"
- stopped bool
- (boolean) - Whether the instance is stopped
- creation
Time String - (string) - The timestamp when the instance was created
- creator String
- (string) - The email of the creator of the instance
- effective
Stopped Boolean - (boolean) - xref AIP-129.
stopped
is owned by the client, whileeffective_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
- (string) - The name of the instance. This is the unique identifier for the instance
- pg
Version String - (string) - The version of Postgres running on the instance
- read
Write StringDns - (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
- capacity String
- (string) - The sku of the instance. Valid values are "CU_1", "CU_2", "CU_4", "CU_8"
- stopped Boolean
- (boolean) - Whether the instance is stopped
Package Details
- Repository
- databricks pulumi/pulumi-databricks
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
databricks
Terraform Provider.