1. Packages
  2. Databricks Provider
  3. API Docs
  4. WarehousesDefaultWarehouseOverride
Viewing docs for Databricks v1.90.0
published on Thursday, Mar 19, 2026 by Pulumi
databricks logo
Viewing docs for Databricks v1.90.0
published on Thursday, Mar 19, 2026 by Pulumi

    Public Beta

    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.WarehousesDefaultWarehouseOverride("last_selected", {
        defaultWarehouseOverrideId: example.id,
        type: "LAST_SELECTED",
    });
    
    import pulumi
    import pulumi_databricks as databricks
    
    last_selected = databricks.WarehousesDefaultWarehouseOverride("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.NewWarehousesDefaultWarehouseOverride(ctx, "last_selected", &databricks.WarehousesDefaultWarehouseOverrideArgs{
    			DefaultWarehouseOverrideId: pulumi.Any(example.Id),
    			Type:                       pulumi.String("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.WarehousesDefaultWarehouseOverride("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.WarehousesDefaultWarehouseOverride;
    import com.pulumi.databricks.WarehousesDefaultWarehouseOverrideArgs;
    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 WarehousesDefaultWarehouseOverride("lastSelected", WarehousesDefaultWarehouseOverrideArgs.builder()
                .defaultWarehouseOverrideId(example.id())
                .type("LAST_SELECTED")
                .build());
    
        }
    }
    
    resources:
      lastSelected:
        type: databricks:WarehousesDefaultWarehouseOverride
        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.WarehousesDefaultWarehouseOverride("custom", {
        defaultWarehouseOverrideId: example.id,
        type: "CUSTOM",
        warehouseId: exampleDatabricksSqlEndpoint.id,
    });
    
    import pulumi
    import pulumi_databricks as databricks
    
    custom = databricks.WarehousesDefaultWarehouseOverride("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.NewWarehousesDefaultWarehouseOverride(ctx, "custom", &databricks.WarehousesDefaultWarehouseOverrideArgs{
    			DefaultWarehouseOverrideId: pulumi.Any(example.Id),
    			Type:                       pulumi.String("CUSTOM"),
    			WarehouseId:                pulumi.Any(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.WarehousesDefaultWarehouseOverride("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.WarehousesDefaultWarehouseOverride;
    import com.pulumi.databricks.WarehousesDefaultWarehouseOverrideArgs;
    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 WarehousesDefaultWarehouseOverride("custom", WarehousesDefaultWarehouseOverrideArgs.builder()
                .defaultWarehouseOverrideId(example.id())
                .type("CUSTOM")
                .warehouseId(exampleDatabricksSqlEndpoint.id())
                .build());
    
        }
    }
    
    resources:
      custom:
        type: databricks:WarehousesDefaultWarehouseOverride
        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,
                                           provider_config: Optional[WarehousesDefaultWarehouseOverrideProviderConfigArgs] = 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",
        ProviderConfig = new Databricks.Inputs.WarehousesDefaultWarehouseOverrideProviderConfigArgs
        {
            WorkspaceId = "string",
        },
        WarehouseId = "string",
    });
    
    example, err := databricks.NewWarehousesDefaultWarehouseOverride(ctx, "warehousesDefaultWarehouseOverrideResource", &databricks.WarehousesDefaultWarehouseOverrideArgs{
    	DefaultWarehouseOverrideId: pulumi.String("string"),
    	Type:                       pulumi.String("string"),
    	ProviderConfig: &databricks.WarehousesDefaultWarehouseOverrideProviderConfigArgs{
    		WorkspaceId: pulumi.String("string"),
    	},
    	WarehouseId: pulumi.String("string"),
    })
    
    var warehousesDefaultWarehouseOverrideResource = new WarehousesDefaultWarehouseOverride("warehousesDefaultWarehouseOverrideResource", WarehousesDefaultWarehouseOverrideArgs.builder()
        .defaultWarehouseOverrideId("string")
        .type("string")
        .providerConfig(WarehousesDefaultWarehouseOverrideProviderConfigArgs.builder()
            .workspaceId("string")
            .build())
        .warehouseId("string")
        .build());
    
    warehouses_default_warehouse_override_resource = databricks.WarehousesDefaultWarehouseOverride("warehousesDefaultWarehouseOverrideResource",
        default_warehouse_override_id="string",
        type="string",
        provider_config={
            "workspace_id": "string",
        },
        warehouse_id="string")
    
    const warehousesDefaultWarehouseOverrideResource = new databricks.WarehousesDefaultWarehouseOverride("warehousesDefaultWarehouseOverrideResource", {
        defaultWarehouseOverrideId: "string",
        type: "string",
        providerConfig: {
            workspaceId: "string",
        },
        warehouseId: "string",
    });
    
    type: databricks:WarehousesDefaultWarehouseOverride
    properties:
        defaultWarehouseOverrideId: string
        providerConfig:
            workspaceId: 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
    ProviderConfig WarehousesDefaultWarehouseOverrideProviderConfig
    Configure the provider for management through account provider.
    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
    ProviderConfig WarehousesDefaultWarehouseOverrideProviderConfigArgs
    Configure the provider for management through account provider.
    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
    providerConfig WarehousesDefaultWarehouseOverrideProviderConfig
    Configure the provider for management through account provider.
    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
    providerConfig WarehousesDefaultWarehouseOverrideProviderConfig
    Configure the provider for management through account provider.
    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
    provider_config WarehousesDefaultWarehouseOverrideProviderConfigArgs
    Configure the provider for management through account provider.
    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
    providerConfig Property Map
    Configure the provider for management through account provider.
    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,
            provider_config: Optional[WarehousesDefaultWarehouseOverrideProviderConfigArgs] = 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}
    ProviderConfig WarehousesDefaultWarehouseOverrideProviderConfig
    Configure the provider for management through account provider.
    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}
    ProviderConfig WarehousesDefaultWarehouseOverrideProviderConfigArgs
    Configure the provider for management through account provider.
    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}
    providerConfig WarehousesDefaultWarehouseOverrideProviderConfig
    Configure the provider for management through account provider.
    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}
    providerConfig WarehousesDefaultWarehouseOverrideProviderConfig
    Configure the provider for management through account provider.
    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}
    provider_config WarehousesDefaultWarehouseOverrideProviderConfigArgs
    Configure the provider for management through account provider.
    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}
    providerConfig Property Map
    Configure the provider for management through account provider.
    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

    Supporting Types

    WarehousesDefaultWarehouseOverrideProviderConfig, WarehousesDefaultWarehouseOverrideProviderConfigArgs

    WorkspaceId string
    Workspace ID which the resource belongs to. This workspace must be part of the account which the provider is configured with.
    WorkspaceId string
    Workspace ID which the resource belongs to. This workspace must be part of the account which the provider is configured with.
    workspaceId String
    Workspace ID which the resource belongs to. This workspace must be part of the account which the provider is configured with.
    workspaceId string
    Workspace ID which the resource belongs to. This workspace must be part of the account which the provider is configured with.
    workspace_id str
    Workspace ID which the resource belongs to. This workspace must be part of the account which the provider is configured with.
    workspaceId String
    Workspace ID which the resource belongs to. This workspace must be part of the account which the provider is configured with.

    Package Details

    Repository
    databricks pulumi/pulumi-databricks
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the databricks Terraform Provider.
    databricks logo
    Viewing docs for Databricks v1.90.0
    published on Thursday, Mar 19, 2026 by Pulumi
      Try Pulumi Cloud free. Your team will thank you.