1. Packages
  2. Databricks Provider
  3. API Docs
  4. WarehousesDefaultWarehouseOverride
Databricks v1.83.0 published on Friday, Jan 23, 2026 by Pulumi
databricks logo
Databricks v1.83.0 published on Friday, Jan 23, 2026 by Pulumi

    Private Preview

    The Default Warehouse Override resource allows you to configure a user’s default warehouse selection behavior in Databricks SQL. This resource enables customization of how a user’s default warehouse is selected for SQL operations.

    Users can configure their default warehouse to either:

    • Remember their last-selected warehouse (LAST_SELECTED type)
    • Use a specific warehouse (CUSTOM type with a warehouse ID)

    Note The default_warehouse_override_id field represents the user ID of the user whose default warehouse behavior is being configured.

    Example Usage

    Basic Example with Last Selected Type

    This example creates a default warehouse override that remembers the user’s last-selected warehouse. The default_warehouse_override_id represents the user ID of the target user:

    import * as pulumi from "@pulumi/pulumi";
    import * as databricks from "@pulumi/databricks";
    
    const lastSelected = new databricks.index.DefaultWarehouseOverride("last_selected", {
        defaultWarehouseOverrideId: example.id,
        type: "LAST_SELECTED",
    });
    
    import pulumi
    import pulumi_databricks as databricks
    
    last_selected = databricks.index.DefaultWarehouseOverride("last_selected",
        default_warehouse_override_id=example.id,
        type=LAST_SELECTED)
    
    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.NewDefaultWarehouseOverride(ctx, "last_selected", &databricks.DefaultWarehouseOverrideArgs{
    			DefaultWarehouseOverrideId: example.Id,
    			Type:                       "LAST_SELECTED",
    		})
    		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 lastSelected = new Databricks.Index.DefaultWarehouseOverride("last_selected", new()
        {
            DefaultWarehouseOverrideId = example.Id,
            Type = "LAST_SELECTED",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.databricks.DefaultWarehouseOverride;
    import com.pulumi.databricks.DefaultWarehouseOverrideArgs;
    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 lastSelected = new DefaultWarehouseOverride("lastSelected", DefaultWarehouseOverrideArgs.builder()
                .defaultWarehouseOverrideId(example.id())
                .type("LAST_SELECTED")
                .build());
    
        }
    }
    
    resources:
      lastSelected:
        type: databricks:DefaultWarehouseOverride
        name: last_selected
        properties:
          defaultWarehouseOverrideId: ${example.id}
          type: LAST_SELECTED
    

    Custom Warehouse Example

    This example creates a default warehouse override that always uses a specific warehouse:

    import * as pulumi from "@pulumi/pulumi";
    import * as databricks from "@pulumi/databricks";
    
    const custom = new databricks.index.DefaultWarehouseOverride("custom", {
        defaultWarehouseOverrideId: example.id,
        type: "CUSTOM",
        warehouseId: exampleDatabricksSqlEndpoint.id,
    });
    
    import pulumi
    import pulumi_databricks as databricks
    
    custom = databricks.index.DefaultWarehouseOverride("custom",
        default_warehouse_override_id=example.id,
        type=CUSTOM,
        warehouse_id=example_databricks_sql_endpoint.id)
    
    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.NewDefaultWarehouseOverride(ctx, "custom", &databricks.DefaultWarehouseOverrideArgs{
    			DefaultWarehouseOverrideId: example.Id,
    			Type:                       "CUSTOM",
    			WarehouseId:                exampleDatabricksSqlEndpoint.Id,
    		})
    		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 custom = new Databricks.Index.DefaultWarehouseOverride("custom", new()
        {
            DefaultWarehouseOverrideId = example.Id,
            Type = "CUSTOM",
            WarehouseId = exampleDatabricksSqlEndpoint.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.databricks.DefaultWarehouseOverride;
    import com.pulumi.databricks.DefaultWarehouseOverrideArgs;
    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 custom = new DefaultWarehouseOverride("custom", DefaultWarehouseOverrideArgs.builder()
                .defaultWarehouseOverrideId(example.id())
                .type("CUSTOM")
                .warehouseId(exampleDatabricksSqlEndpoint.id())
                .build());
    
        }
    }
    
    resources:
      custom:
        type: databricks:DefaultWarehouseOverride
        properties:
          defaultWarehouseOverrideId: ${example.id}
          type: CUSTOM
          warehouseId: ${exampleDatabricksSqlEndpoint.id}
    

    Create WarehousesDefaultWarehouseOverride Resource

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

    Constructor syntax

    new WarehousesDefaultWarehouseOverride(name: string, args: WarehousesDefaultWarehouseOverrideArgs, opts?: CustomResourceOptions);
    @overload
    def WarehousesDefaultWarehouseOverride(resource_name: str,
                                           args: WarehousesDefaultWarehouseOverrideArgs,
                                           opts: Optional[ResourceOptions] = None)
    
    @overload
    def WarehousesDefaultWarehouseOverride(resource_name: str,
                                           opts: Optional[ResourceOptions] = None,
                                           default_warehouse_override_id: Optional[str] = None,
                                           type: Optional[str] = None,
                                           warehouse_id: Optional[str] = None)
    func NewWarehousesDefaultWarehouseOverride(ctx *Context, name string, args WarehousesDefaultWarehouseOverrideArgs, opts ...ResourceOption) (*WarehousesDefaultWarehouseOverride, error)
    public WarehousesDefaultWarehouseOverride(string name, WarehousesDefaultWarehouseOverrideArgs args, CustomResourceOptions? opts = null)
    public WarehousesDefaultWarehouseOverride(String name, WarehousesDefaultWarehouseOverrideArgs args)
    public WarehousesDefaultWarehouseOverride(String name, WarehousesDefaultWarehouseOverrideArgs args, CustomResourceOptions options)
    
    type: databricks:WarehousesDefaultWarehouseOverride
    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 WarehousesDefaultWarehouseOverrideArgs
    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 WarehousesDefaultWarehouseOverrideArgs
    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 WarehousesDefaultWarehouseOverrideArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args WarehousesDefaultWarehouseOverrideArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args WarehousesDefaultWarehouseOverrideArgs
    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 warehousesDefaultWarehouseOverrideResource = new Databricks.WarehousesDefaultWarehouseOverride("warehousesDefaultWarehouseOverrideResource", new()
    {
        DefaultWarehouseOverrideId = "string",
        Type = "string",
        WarehouseId = "string",
    });
    
    example, err := databricks.NewWarehousesDefaultWarehouseOverride(ctx, "warehousesDefaultWarehouseOverrideResource", &databricks.WarehousesDefaultWarehouseOverrideArgs{
    	DefaultWarehouseOverrideId: pulumi.String("string"),
    	Type:                       pulumi.String("string"),
    	WarehouseId:                pulumi.String("string"),
    })
    
    var warehousesDefaultWarehouseOverrideResource = new WarehousesDefaultWarehouseOverride("warehousesDefaultWarehouseOverrideResource", WarehousesDefaultWarehouseOverrideArgs.builder()
        .defaultWarehouseOverrideId("string")
        .type("string")
        .warehouseId("string")
        .build());
    
    warehouses_default_warehouse_override_resource = databricks.WarehousesDefaultWarehouseOverride("warehousesDefaultWarehouseOverrideResource",
        default_warehouse_override_id="string",
        type="string",
        warehouse_id="string")
    
    const warehousesDefaultWarehouseOverrideResource = new databricks.WarehousesDefaultWarehouseOverride("warehousesDefaultWarehouseOverrideResource", {
        defaultWarehouseOverrideId: "string",
        type: "string",
        warehouseId: "string",
    });
    
    type: databricks:WarehousesDefaultWarehouseOverride
    properties:
        defaultWarehouseOverrideId: string
        type: string
        warehouseId: string
    

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

    DefaultWarehouseOverrideId string
    The ID component of the resource name (user ID)
    Type string
    The type of override behavior. Possible values are: CUSTOM, LAST_SELECTED
    WarehouseId string
    The specific warehouse ID when type is CUSTOM. Not set for LAST_SELECTED type
    DefaultWarehouseOverrideId string
    The ID component of the resource name (user ID)
    Type string
    The type of override behavior. Possible values are: CUSTOM, LAST_SELECTED
    WarehouseId string
    The specific warehouse ID when type is CUSTOM. Not set for LAST_SELECTED type
    defaultWarehouseOverrideId String
    The ID component of the resource name (user ID)
    type String
    The type of override behavior. Possible values are: CUSTOM, LAST_SELECTED
    warehouseId String
    The specific warehouse ID when type is CUSTOM. Not set for LAST_SELECTED type
    defaultWarehouseOverrideId string
    The ID component of the resource name (user ID)
    type string
    The type of override behavior. Possible values are: CUSTOM, LAST_SELECTED
    warehouseId string
    The specific warehouse ID when type is CUSTOM. Not set for LAST_SELECTED type
    default_warehouse_override_id str
    The ID component of the resource name (user ID)
    type str
    The type of override behavior. Possible values are: CUSTOM, LAST_SELECTED
    warehouse_id str
    The specific warehouse ID when type is CUSTOM. Not set for LAST_SELECTED type
    defaultWarehouseOverrideId String
    The ID component of the resource name (user ID)
    type String
    The type of override behavior. Possible values are: CUSTOM, LAST_SELECTED
    warehouseId String
    The specific warehouse ID when type is CUSTOM. Not set for LAST_SELECTED type

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    (string) - The resource name of the default warehouse override. Format: default-warehouse-overrides/{default_warehouse_override_id}
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    (string) - The resource name of the default warehouse override. Format: default-warehouse-overrides/{default_warehouse_override_id}
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    (string) - The resource name of the default warehouse override. Format: default-warehouse-overrides/{default_warehouse_override_id}
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    (string) - The resource name of the default warehouse override. Format: default-warehouse-overrides/{default_warehouse_override_id}
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    (string) - The resource name of the default warehouse override. Format: default-warehouse-overrides/{default_warehouse_override_id}
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    (string) - The resource name of the default warehouse override. Format: default-warehouse-overrides/{default_warehouse_override_id}

    Look up Existing WarehousesDefaultWarehouseOverride Resource

    Get an existing WarehousesDefaultWarehouseOverride 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?: WarehousesDefaultWarehouseOverrideState, opts?: CustomResourceOptions): WarehousesDefaultWarehouseOverride
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            default_warehouse_override_id: Optional[str] = None,
            name: Optional[str] = None,
            type: Optional[str] = None,
            warehouse_id: Optional[str] = None) -> WarehousesDefaultWarehouseOverride
    func GetWarehousesDefaultWarehouseOverride(ctx *Context, name string, id IDInput, state *WarehousesDefaultWarehouseOverrideState, opts ...ResourceOption) (*WarehousesDefaultWarehouseOverride, error)
    public static WarehousesDefaultWarehouseOverride Get(string name, Input<string> id, WarehousesDefaultWarehouseOverrideState? state, CustomResourceOptions? opts = null)
    public static WarehousesDefaultWarehouseOverride get(String name, Output<String> id, WarehousesDefaultWarehouseOverrideState state, CustomResourceOptions options)
    resources:  _:    type: databricks:WarehousesDefaultWarehouseOverride    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:
    DefaultWarehouseOverrideId string
    The ID component of the resource name (user ID)
    Name string
    (string) - The resource name of the default warehouse override. Format: default-warehouse-overrides/{default_warehouse_override_id}
    Type string
    The type of override behavior. Possible values are: CUSTOM, LAST_SELECTED
    WarehouseId string
    The specific warehouse ID when type is CUSTOM. Not set for LAST_SELECTED type
    DefaultWarehouseOverrideId string
    The ID component of the resource name (user ID)
    Name string
    (string) - The resource name of the default warehouse override. Format: default-warehouse-overrides/{default_warehouse_override_id}
    Type string
    The type of override behavior. Possible values are: CUSTOM, LAST_SELECTED
    WarehouseId string
    The specific warehouse ID when type is CUSTOM. Not set for LAST_SELECTED type
    defaultWarehouseOverrideId String
    The ID component of the resource name (user ID)
    name String
    (string) - The resource name of the default warehouse override. Format: default-warehouse-overrides/{default_warehouse_override_id}
    type String
    The type of override behavior. Possible values are: CUSTOM, LAST_SELECTED
    warehouseId String
    The specific warehouse ID when type is CUSTOM. Not set for LAST_SELECTED type
    defaultWarehouseOverrideId string
    The ID component of the resource name (user ID)
    name string
    (string) - The resource name of the default warehouse override. Format: default-warehouse-overrides/{default_warehouse_override_id}
    type string
    The type of override behavior. Possible values are: CUSTOM, LAST_SELECTED
    warehouseId string
    The specific warehouse ID when type is CUSTOM. Not set for LAST_SELECTED type
    default_warehouse_override_id str
    The ID component of the resource name (user ID)
    name str
    (string) - The resource name of the default warehouse override. Format: default-warehouse-overrides/{default_warehouse_override_id}
    type str
    The type of override behavior. Possible values are: CUSTOM, LAST_SELECTED
    warehouse_id str
    The specific warehouse ID when type is CUSTOM. Not set for LAST_SELECTED type
    defaultWarehouseOverrideId String
    The ID component of the resource name (user ID)
    name String
    (string) - The resource name of the default warehouse override. Format: default-warehouse-overrides/{default_warehouse_override_id}
    type String
    The type of override behavior. Possible values are: CUSTOM, LAST_SELECTED
    warehouseId String
    The specific warehouse ID when type is CUSTOM. Not set for LAST_SELECTED type

    Import

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

    hcl

    import {

    id = “name”

    to = databricks_warehouses_default_warehouse_override.this

    }

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

    $ pulumi import databricks:index/warehousesDefaultWarehouseOverride:WarehousesDefaultWarehouseOverride this "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.83.0 published on Friday, Jan 23, 2026 by Pulumi
      Meet Neo: Your AI Platform Teammate