published on Thursday, Sep 24, 2026 by Pulumi
published on Thursday, Sep 24, 2026 by Pulumi
Provisions and manages a Sandbox: an isolated, pre-configured, low-latency Serverless
compute environment for running code. Creating this resource provisions a sandbox with a
client-supplied id and optional compute and storage configuration; destroying it permanently
deletes the sandbox. Use the spec.compute.inactivity_timeout to have the sandbox
auto-terminate after an idle period.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as databricks from "@pulumi/databricks";
const _this = new databricks.Sandbox("this", {
sandboxId: "my-sandbox",
displayName: "My sandbox",
spec: {
compute: {
inactivityTimeout: "3600s",
},
},
});
import pulumi
import pulumi_databricks as databricks
this = databricks.Sandbox("this",
sandbox_id="my-sandbox",
display_name="My sandbox",
spec={
"compute": {
"inactivity_timeout": "3600s",
},
})
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.NewSandbox(ctx, "this", &databricks.SandboxArgs{
SandboxId: pulumi.String("my-sandbox"),
DisplayName: pulumi.String("My sandbox"),
Spec: &databricks.SandboxSpecArgs{
Compute: &databricks.SandboxSpecComputeArgs{
InactivityTimeout: pulumi.String("3600s"),
},
},
})
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.Sandbox("this", new()
{
SandboxId = "my-sandbox",
DisplayName = "My sandbox",
Spec = new Databricks.Inputs.SandboxSpecArgs
{
Compute = new Databricks.Inputs.SandboxSpecComputeArgs
{
InactivityTimeout = "3600s",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.databricks.Sandbox;
import com.pulumi.databricks.SandboxArgs;
import com.pulumi.databricks.inputs.SandboxSpecArgs;
import com.pulumi.databricks.inputs.SandboxSpecComputeArgs;
import java.util.ArrayList;
import java.util.Arrays;
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 Sandbox("this", SandboxArgs.builder()
.sandboxId("my-sandbox")
.displayName("My sandbox")
.spec(SandboxSpecArgs.builder()
.compute(SandboxSpecComputeArgs.builder()
.inactivityTimeout("3600s")
.build())
.build())
.build());
}
}
resources:
this:
type: databricks:Sandbox
properties:
sandboxId: my-sandbox
displayName: My sandbox
spec:
compute:
inactivityTimeout: 3600s
pulumi {
required_providers {
databricks = {
source = "pulumi/databricks"
}
}
}
resource "databricks_sandbox" "this" {
sandbox_id = "my-sandbox"
display_name = "My sandbox"
spec = {
compute = {
inactivity_timeout = "3600s"
}
}
}
Create Sandbox Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Sandbox(name: string, args: SandboxArgs, opts?: CustomResourceOptions);@overload
def Sandbox(resource_name: str,
args: SandboxArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Sandbox(resource_name: str,
opts: Optional[ResourceOptions] = None,
sandbox_id: Optional[str] = None,
display_name: Optional[str] = None,
provider_config: Optional[SandboxProviderConfigArgs] = None,
spec: Optional[SandboxSpecArgs] = None)func NewSandbox(ctx *Context, name string, args SandboxArgs, opts ...ResourceOption) (*Sandbox, error)public Sandbox(string name, SandboxArgs args, CustomResourceOptions? opts = null)
public Sandbox(String name, SandboxArgs args)
public Sandbox(String name, SandboxArgs args, CustomResourceOptions options)
type: databricks:Sandbox
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "databricks_sandbox" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args SandboxArgs
- 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 SandboxArgs
- 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 SandboxArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SandboxArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args SandboxArgs
- 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 sandboxResource = new Databricks.Sandbox("sandboxResource", new()
{
SandboxId = "string",
DisplayName = "string",
ProviderConfig = new Databricks.Inputs.SandboxProviderConfigArgs
{
WorkspaceId = "string",
},
Spec = new Databricks.Inputs.SandboxSpecArgs
{
Compute = new Databricks.Inputs.SandboxSpecComputeArgs
{
InactivityTimeout = "string",
},
},
});
example, err := databricks.NewSandbox(ctx, "sandboxResource", &databricks.SandboxArgs{
SandboxId: pulumi.String("string"),
DisplayName: pulumi.String("string"),
ProviderConfig: &databricks.SandboxProviderConfigArgs{
WorkspaceId: pulumi.String("string"),
},
Spec: &databricks.SandboxSpecArgs{
Compute: &databricks.SandboxSpecComputeArgs{
InactivityTimeout: pulumi.String("string"),
},
},
})
resource "databricks_sandbox" "sandboxResource" {
lifecycle {
create_before_destroy = true
}
sandbox_id = "string"
display_name = "string"
provider_config = {
workspace_id = "string"
}
spec = {
compute = {
inactivity_timeout = "string"
}
}
}
var sandboxResource = new Sandbox("sandboxResource", SandboxArgs.builder()
.sandboxId("string")
.displayName("string")
.providerConfig(SandboxProviderConfigArgs.builder()
.workspaceId("string")
.build())
.spec(SandboxSpecArgs.builder()
.compute(SandboxSpecComputeArgs.builder()
.inactivityTimeout("string")
.build())
.build())
.build());
sandbox_resource = databricks.Sandbox("sandboxResource",
sandbox_id="string",
display_name="string",
provider_config={
"workspace_id": "string",
},
spec={
"compute": {
"inactivity_timeout": "string",
},
})
const sandboxResource = new databricks.Sandbox("sandboxResource", {
sandboxId: "string",
displayName: "string",
providerConfig: {
workspaceId: "string",
},
spec: {
compute: {
inactivityTimeout: "string",
},
},
});
type: databricks:Sandbox
properties:
displayName: string
providerConfig:
workspaceId: string
sandboxId: string
spec:
compute:
inactivityTimeout: string
Sandbox 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 Sandbox resource accepts the following input properties:
- Sandbox
Id string - Client-supplied ID that becomes the final path segment of the resource name
- Display
Name string - Human-readable display label for the sandbox. At most 256 characters
- Provider
Config SandboxProvider Config - Configure the provider for management through account provider.
- Spec
Sandbox
Spec - The desired configuration of the sandbox, supplied by the caller at creation time
- Sandbox
Id string - Client-supplied ID that becomes the final path segment of the resource name
- Display
Name string - Human-readable display label for the sandbox. At most 256 characters
- Provider
Config SandboxProvider Config Args - Configure the provider for management through account provider.
- Spec
Sandbox
Spec Args - The desired configuration of the sandbox, supplied by the caller at creation time
- sandbox_
id string - Client-supplied ID that becomes the final path segment of the resource name
- display_
name string - Human-readable display label for the sandbox. At most 256 characters
- provider_
config object - Configure the provider for management through account provider.
- spec object
- The desired configuration of the sandbox, supplied by the caller at creation time
- sandbox
Id String - Client-supplied ID that becomes the final path segment of the resource name
- display
Name String - Human-readable display label for the sandbox. At most 256 characters
- provider
Config SandboxProvider Config - Configure the provider for management through account provider.
- spec
Sandbox
Spec - The desired configuration of the sandbox, supplied by the caller at creation time
- sandbox
Id string - Client-supplied ID that becomes the final path segment of the resource name
- display
Name string - Human-readable display label for the sandbox. At most 256 characters
- provider
Config SandboxProvider Config - Configure the provider for management through account provider.
- spec
Sandbox
Spec - The desired configuration of the sandbox, supplied by the caller at creation time
- sandbox_
id str - Client-supplied ID that becomes the final path segment of the resource name
- display_
name str - Human-readable display label for the sandbox. At most 256 characters
- provider_
config SandboxProvider Config Args - Configure the provider for management through account provider.
- spec
Sandbox
Spec Args - The desired configuration of the sandbox, supplied by the caller at creation time
- sandbox
Id String - Client-supplied ID that becomes the final path segment of the resource name
- display
Name String - Human-readable display label for the sandbox. At most 256 characters
- provider
Config Property Map - Configure the provider for management through account provider.
- spec Property Map
- The desired configuration of the sandbox, supplied by the caller at creation time
Outputs
All input properties are implicitly available as output properties. Additionally, the Sandbox resource produces the following output properties:
- Create
Time string - (string) - Output only. The creation time of the sandbox
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- (string) - The sandbox resource name, in the form
sandboxes/{sandbox_id}. Derived fromsandboxId; any value supplied in a create or update request body is ignored - Status
Sandbox
Status - (SandboxStatus) - The observed runtime state of the sandbox, populated by the server
- Update
Time string - (string) - Output only. The last update time of the sandbox metadata and spec
- Create
Time string - (string) - Output only. The creation time of the sandbox
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- (string) - The sandbox resource name, in the form
sandboxes/{sandbox_id}. Derived fromsandboxId; any value supplied in a create or update request body is ignored - Status
Sandbox
Status - (SandboxStatus) - The observed runtime state of the sandbox, populated by the server
- Update
Time string - (string) - Output only. The last update time of the sandbox metadata and spec
- create_
time string - (string) - Output only. The creation time of the sandbox
- id string
- The provider-assigned unique ID for this managed resource.
- name string
- (string) - The sandbox resource name, in the form
sandboxes/{sandbox_id}. Derived fromsandboxId; any value supplied in a create or update request body is ignored - status object
- (SandboxStatus) - The observed runtime state of the sandbox, populated by the server
- update_
time string - (string) - Output only. The last update time of the sandbox metadata and spec
- create
Time String - (string) - Output only. The creation time of the sandbox
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- (string) - The sandbox resource name, in the form
sandboxes/{sandbox_id}. Derived fromsandboxId; any value supplied in a create or update request body is ignored - status
Sandbox
Status - (SandboxStatus) - The observed runtime state of the sandbox, populated by the server
- update
Time String - (string) - Output only. The last update time of the sandbox metadata and spec
- create
Time string - (string) - Output only. The creation time of the sandbox
- id string
- The provider-assigned unique ID for this managed resource.
- name string
- (string) - The sandbox resource name, in the form
sandboxes/{sandbox_id}. Derived fromsandboxId; any value supplied in a create or update request body is ignored - status
Sandbox
Status - (SandboxStatus) - The observed runtime state of the sandbox, populated by the server
- update
Time string - (string) - Output only. The last update time of the sandbox metadata and spec
- create_
time str - (string) - Output only. The creation time of the sandbox
- id str
- The provider-assigned unique ID for this managed resource.
- name str
- (string) - The sandbox resource name, in the form
sandboxes/{sandbox_id}. Derived fromsandboxId; any value supplied in a create or update request body is ignored - status
Sandbox
Status - (SandboxStatus) - The observed runtime state of the sandbox, populated by the server
- update_
time str - (string) - Output only. The last update time of the sandbox metadata and spec
- create
Time String - (string) - Output only. The creation time of the sandbox
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- (string) - The sandbox resource name, in the form
sandboxes/{sandbox_id}. Derived fromsandboxId; any value supplied in a create or update request body is ignored - status Property Map
- (SandboxStatus) - The observed runtime state of the sandbox, populated by the server
- update
Time String - (string) - Output only. The last update time of the sandbox metadata and spec
Look up Existing Sandbox Resource
Get an existing Sandbox 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?: SandboxState, opts?: CustomResourceOptions): Sandbox@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
create_time: Optional[str] = None,
display_name: Optional[str] = None,
name: Optional[str] = None,
provider_config: Optional[SandboxProviderConfigArgs] = None,
sandbox_id: Optional[str] = None,
spec: Optional[SandboxSpecArgs] = None,
status: Optional[SandboxStatusArgs] = None,
update_time: Optional[str] = None) -> Sandboxfunc GetSandbox(ctx *Context, name string, id IDInput, state *SandboxState, opts ...ResourceOption) (*Sandbox, error)public static Sandbox Get(string name, Input<string> id, SandboxState? state, CustomResourceOptions? opts = null)public static Sandbox get(String name, Output<String> id, SandboxState state, CustomResourceOptions options)resources: _: type: databricks:Sandbox get: id: ${id}import {
to = databricks_sandbox.example
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.
- Create
Time string - (string) - Output only. The creation time of the sandbox
- Display
Name string - Human-readable display label for the sandbox. At most 256 characters
- Name string
- (string) - The sandbox resource name, in the form
sandboxes/{sandbox_id}. Derived fromsandboxId; any value supplied in a create or update request body is ignored - Provider
Config SandboxProvider Config - Configure the provider for management through account provider.
- Sandbox
Id string - Client-supplied ID that becomes the final path segment of the resource name
- Spec
Sandbox
Spec - The desired configuration of the sandbox, supplied by the caller at creation time
- Status
Sandbox
Status - (SandboxStatus) - The observed runtime state of the sandbox, populated by the server
- Update
Time string - (string) - Output only. The last update time of the sandbox metadata and spec
- Create
Time string - (string) - Output only. The creation time of the sandbox
- Display
Name string - Human-readable display label for the sandbox. At most 256 characters
- Name string
- (string) - The sandbox resource name, in the form
sandboxes/{sandbox_id}. Derived fromsandboxId; any value supplied in a create or update request body is ignored - Provider
Config SandboxProvider Config Args - Configure the provider for management through account provider.
- Sandbox
Id string - Client-supplied ID that becomes the final path segment of the resource name
- Spec
Sandbox
Spec Args - The desired configuration of the sandbox, supplied by the caller at creation time
- Status
Sandbox
Status Args - (SandboxStatus) - The observed runtime state of the sandbox, populated by the server
- Update
Time string - (string) - Output only. The last update time of the sandbox metadata and spec
- create_
time string - (string) - Output only. The creation time of the sandbox
- display_
name string - Human-readable display label for the sandbox. At most 256 characters
- name string
- (string) - The sandbox resource name, in the form
sandboxes/{sandbox_id}. Derived fromsandboxId; any value supplied in a create or update request body is ignored - provider_
config object - Configure the provider for management through account provider.
- sandbox_
id string - Client-supplied ID that becomes the final path segment of the resource name
- spec object
- The desired configuration of the sandbox, supplied by the caller at creation time
- status object
- (SandboxStatus) - The observed runtime state of the sandbox, populated by the server
- update_
time string - (string) - Output only. The last update time of the sandbox metadata and spec
- create
Time String - (string) - Output only. The creation time of the sandbox
- display
Name String - Human-readable display label for the sandbox. At most 256 characters
- name String
- (string) - The sandbox resource name, in the form
sandboxes/{sandbox_id}. Derived fromsandboxId; any value supplied in a create or update request body is ignored - provider
Config SandboxProvider Config - Configure the provider for management through account provider.
- sandbox
Id String - Client-supplied ID that becomes the final path segment of the resource name
- spec
Sandbox
Spec - The desired configuration of the sandbox, supplied by the caller at creation time
- status
Sandbox
Status - (SandboxStatus) - The observed runtime state of the sandbox, populated by the server
- update
Time String - (string) - Output only. The last update time of the sandbox metadata and spec
- create
Time string - (string) - Output only. The creation time of the sandbox
- display
Name string - Human-readable display label for the sandbox. At most 256 characters
- name string
- (string) - The sandbox resource name, in the form
sandboxes/{sandbox_id}. Derived fromsandboxId; any value supplied in a create or update request body is ignored - provider
Config SandboxProvider Config - Configure the provider for management through account provider.
- sandbox
Id string - Client-supplied ID that becomes the final path segment of the resource name
- spec
Sandbox
Spec - The desired configuration of the sandbox, supplied by the caller at creation time
- status
Sandbox
Status - (SandboxStatus) - The observed runtime state of the sandbox, populated by the server
- update
Time string - (string) - Output only. The last update time of the sandbox metadata and spec
- create_
time str - (string) - Output only. The creation time of the sandbox
- display_
name str - Human-readable display label for the sandbox. At most 256 characters
- name str
- (string) - The sandbox resource name, in the form
sandboxes/{sandbox_id}. Derived fromsandboxId; any value supplied in a create or update request body is ignored - provider_
config SandboxProvider Config Args - Configure the provider for management through account provider.
- sandbox_
id str - Client-supplied ID that becomes the final path segment of the resource name
- spec
Sandbox
Spec Args - The desired configuration of the sandbox, supplied by the caller at creation time
- status
Sandbox
Status Args - (SandboxStatus) - The observed runtime state of the sandbox, populated by the server
- update_
time str - (string) - Output only. The last update time of the sandbox metadata and spec
- create
Time String - (string) - Output only. The creation time of the sandbox
- display
Name String - Human-readable display label for the sandbox. At most 256 characters
- name String
- (string) - The sandbox resource name, in the form
sandboxes/{sandbox_id}. Derived fromsandboxId; any value supplied in a create or update request body is ignored - provider
Config Property Map - Configure the provider for management through account provider.
- sandbox
Id String - Client-supplied ID that becomes the final path segment of the resource name
- spec Property Map
- The desired configuration of the sandbox, supplied by the caller at creation time
- status Property Map
- (SandboxStatus) - The observed runtime state of the sandbox, populated by the server
- update
Time String - (string) - Output only. The last update time of the sandbox metadata and spec
Supporting Types
SandboxProviderConfig, SandboxProviderConfigArgs
- Workspace
Id string - Workspace ID which the resource belongs to. This workspace must be part of the account which the provider is configured with.
- Workspace
Id string - Workspace ID which the resource belongs to. This workspace must be part of the account which the provider is configured with.
- workspace_
id string - Workspace ID which the resource belongs to. This workspace must be part of the account which the provider is configured with.
- workspace
Id String - Workspace ID which the resource belongs to. This workspace must be part of the account which the provider is configured with.
- workspace
Id 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.
- workspace
Id String - Workspace ID which the resource belongs to. This workspace must be part of the account which the provider is configured with.
SandboxSpec, SandboxSpecArgs
- Compute
Sandbox
Spec Compute - Compute configuration (size, inactivity timeout) requested for the sandbox
- Compute
Sandbox
Spec Compute - Compute configuration (size, inactivity timeout) requested for the sandbox
- compute
Sandbox
Spec Compute - Compute configuration (size, inactivity timeout) requested for the sandbox
- compute
Sandbox
Spec Compute - Compute configuration (size, inactivity timeout) requested for the sandbox
- compute
Sandbox
Spec Compute - Compute configuration (size, inactivity timeout) requested for the sandbox
- compute Property Map
- Compute configuration (size, inactivity timeout) requested for the sandbox
SandboxSpecCompute, SandboxSpecComputeArgs
- Inactivity
Timeout string - Idle duration after which the sandbox is automatically terminated
- Inactivity
Timeout string - Idle duration after which the sandbox is automatically terminated
- inactivity_
timeout string - Idle duration after which the sandbox is automatically terminated
- inactivity
Timeout String - Idle duration after which the sandbox is automatically terminated
- inactivity
Timeout string - Idle duration after which the sandbox is automatically terminated
- inactivity_
timeout str - Idle duration after which the sandbox is automatically terminated
- inactivity
Timeout String - Idle duration after which the sandbox is automatically terminated
SandboxStatus, SandboxStatusArgs
- State string
- (string) - Lifecycle state of the sandbox. Possible values are:
SANDBOX_STATE_PENDING,SANDBOX_STATE_RUNNING,SANDBOX_STATE_STOPPED,SANDBOX_STATE_STOPPING
- State string
- (string) - Lifecycle state of the sandbox. Possible values are:
SANDBOX_STATE_PENDING,SANDBOX_STATE_RUNNING,SANDBOX_STATE_STOPPED,SANDBOX_STATE_STOPPING
- state string
- (string) - Lifecycle state of the sandbox. Possible values are:
SANDBOX_STATE_PENDING,SANDBOX_STATE_RUNNING,SANDBOX_STATE_STOPPED,SANDBOX_STATE_STOPPING
- state String
- (string) - Lifecycle state of the sandbox. Possible values are:
SANDBOX_STATE_PENDING,SANDBOX_STATE_RUNNING,SANDBOX_STATE_STOPPED,SANDBOX_STATE_STOPPING
- state string
- (string) - Lifecycle state of the sandbox. Possible values are:
SANDBOX_STATE_PENDING,SANDBOX_STATE_RUNNING,SANDBOX_STATE_STOPPED,SANDBOX_STATE_STOPPING
- state str
- (string) - Lifecycle state of the sandbox. Possible values are:
SANDBOX_STATE_PENDING,SANDBOX_STATE_RUNNING,SANDBOX_STATE_STOPPED,SANDBOX_STATE_STOPPING
- state String
- (string) - Lifecycle state of the sandbox. Possible values are:
SANDBOX_STATE_PENDING,SANDBOX_STATE_RUNNING,SANDBOX_STATE_STOPPED,SANDBOX_STATE_STOPPING
Package Details
- Repository
- databricks pulumi/pulumi-databricks
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
databricksTerraform Provider.
published on Thursday, Sep 24, 2026 by Pulumi