Viewing docs for Databricks v1.90.0
published on Thursday, Mar 19, 2026 by Pulumi
published on Thursday, Mar 19, 2026 by Pulumi
Viewing docs for Databricks v1.90.0
published on Thursday, Mar 19, 2026 by Pulumi
published on Thursday, Mar 19, 2026 by Pulumi
Retrieves information about databricks_cluster_policy.
This data source can only be used with a workspace-level provider!
Example Usage
Referring to a cluster policy by name:
import * as pulumi from "@pulumi/pulumi";
import * as databricks from "@pulumi/databricks";
const personal = databricks.getClusterPolicy({
name: "Personal Compute",
});
const myCluster = new databricks.Cluster("my_cluster", {policyId: personal.then(personal => personal.id)});
import pulumi
import pulumi_databricks as databricks
personal = databricks.get_cluster_policy(name="Personal Compute")
my_cluster = databricks.Cluster("my_cluster", policy_id=personal.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 {
personal, err := databricks.LookupClusterPolicy(ctx, &databricks.LookupClusterPolicyArgs{
Name: pulumi.StringRef("Personal Compute"),
}, nil)
if err != nil {
return err
}
_, err = databricks.NewCluster(ctx, "my_cluster", &databricks.ClusterArgs{
PolicyId: pulumi.String(personal.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 personal = Databricks.GetClusterPolicy.Invoke(new()
{
Name = "Personal Compute",
});
var myCluster = new Databricks.Cluster("my_cluster", new()
{
PolicyId = personal.Apply(getClusterPolicyResult => getClusterPolicyResult.Id),
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.databricks.DatabricksFunctions;
import com.pulumi.databricks.inputs.GetClusterPolicyArgs;
import com.pulumi.databricks.Cluster;
import com.pulumi.databricks.ClusterArgs;
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 personal = DatabricksFunctions.getClusterPolicy(GetClusterPolicyArgs.builder()
.name("Personal Compute")
.build());
var myCluster = new Cluster("myCluster", ClusterArgs.builder()
.policyId(personal.id())
.build());
}
}
resources:
myCluster:
type: databricks:Cluster
name: my_cluster
properties:
policyId: ${personal.id}
variables:
personal:
fn::invoke:
function: databricks:getClusterPolicy
arguments:
name: Personal Compute
Using getClusterPolicy
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 getClusterPolicy(args: GetClusterPolicyArgs, opts?: InvokeOptions): Promise<GetClusterPolicyResult>
function getClusterPolicyOutput(args: GetClusterPolicyOutputArgs, opts?: InvokeOptions): Output<GetClusterPolicyResult>def get_cluster_policy(definition: Optional[str] = None,
description: Optional[str] = None,
id: Optional[str] = None,
is_default: Optional[bool] = None,
max_clusters_per_user: Optional[int] = None,
name: Optional[str] = None,
policy_family_definition_overrides: Optional[str] = None,
policy_family_id: Optional[str] = None,
provider_config: Optional[GetClusterPolicyProviderConfig] = None,
opts: Optional[InvokeOptions] = None) -> GetClusterPolicyResult
def get_cluster_policy_output(definition: Optional[pulumi.Input[str]] = None,
description: Optional[pulumi.Input[str]] = None,
id: Optional[pulumi.Input[str]] = None,
is_default: Optional[pulumi.Input[bool]] = None,
max_clusters_per_user: Optional[pulumi.Input[int]] = None,
name: Optional[pulumi.Input[str]] = None,
policy_family_definition_overrides: Optional[pulumi.Input[str]] = None,
policy_family_id: Optional[pulumi.Input[str]] = None,
provider_config: Optional[pulumi.Input[GetClusterPolicyProviderConfigArgs]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetClusterPolicyResult]func LookupClusterPolicy(ctx *Context, args *LookupClusterPolicyArgs, opts ...InvokeOption) (*LookupClusterPolicyResult, error)
func LookupClusterPolicyOutput(ctx *Context, args *LookupClusterPolicyOutputArgs, opts ...InvokeOption) LookupClusterPolicyResultOutput> Note: This function is named LookupClusterPolicy in the Go SDK.
public static class GetClusterPolicy
{
public static Task<GetClusterPolicyResult> InvokeAsync(GetClusterPolicyArgs args, InvokeOptions? opts = null)
public static Output<GetClusterPolicyResult> Invoke(GetClusterPolicyInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetClusterPolicyResult> getClusterPolicy(GetClusterPolicyArgs args, InvokeOptions options)
public static Output<GetClusterPolicyResult> getClusterPolicy(GetClusterPolicyArgs args, InvokeOptions options)
fn::invoke:
function: databricks:index/getClusterPolicy:getClusterPolicy
arguments:
# arguments dictionaryThe following arguments are supported:
- Definition string
- Policy definition: JSON document expressed in Databricks Policy Definition Language.
- Description string
- Additional human-readable description of the cluster policy.
- Id string
- The id of the cluster policy.
- Is
Default bool - If true, policy is a default policy created and managed by Databricks.
- Max
Clusters intPer User - Max number of clusters per user that can be active using this policy.
- Name string
- Name of the cluster policy. The cluster policy must exist before this resource can be planned.
- Policy
Family stringDefinition Overrides - Policy definition JSON document expressed in Databricks Policy Definition Language.
- Policy
Family stringId - ID of the policy family.
- Provider
Config GetCluster Policy Provider Config - Configure the provider for management through account provider. This block consists of the following fields:
- Definition string
- Policy definition: JSON document expressed in Databricks Policy Definition Language.
- Description string
- Additional human-readable description of the cluster policy.
- Id string
- The id of the cluster policy.
- Is
Default bool - If true, policy is a default policy created and managed by Databricks.
- Max
Clusters intPer User - Max number of clusters per user that can be active using this policy.
- Name string
- Name of the cluster policy. The cluster policy must exist before this resource can be planned.
- Policy
Family stringDefinition Overrides - Policy definition JSON document expressed in Databricks Policy Definition Language.
- Policy
Family stringId - ID of the policy family.
- Provider
Config GetCluster Policy Provider Config - Configure the provider for management through account provider. This block consists of the following fields:
- definition String
- Policy definition: JSON document expressed in Databricks Policy Definition Language.
- description String
- Additional human-readable description of the cluster policy.
- id String
- The id of the cluster policy.
- is
Default Boolean - If true, policy is a default policy created and managed by Databricks.
- max
Clusters IntegerPer User - Max number of clusters per user that can be active using this policy.
- name String
- Name of the cluster policy. The cluster policy must exist before this resource can be planned.
- policy
Family StringDefinition Overrides - Policy definition JSON document expressed in Databricks Policy Definition Language.
- policy
Family StringId - ID of the policy family.
- provider
Config GetCluster Policy Provider Config - Configure the provider for management through account provider. This block consists of the following fields:
- definition string
- Policy definition: JSON document expressed in Databricks Policy Definition Language.
- description string
- Additional human-readable description of the cluster policy.
- id string
- The id of the cluster policy.
- is
Default boolean - If true, policy is a default policy created and managed by Databricks.
- max
Clusters numberPer User - Max number of clusters per user that can be active using this policy.
- name string
- Name of the cluster policy. The cluster policy must exist before this resource can be planned.
- policy
Family stringDefinition Overrides - Policy definition JSON document expressed in Databricks Policy Definition Language.
- policy
Family stringId - ID of the policy family.
- provider
Config GetCluster Policy Provider Config - Configure the provider for management through account provider. This block consists of the following fields:
- definition str
- Policy definition: JSON document expressed in Databricks Policy Definition Language.
- description str
- Additional human-readable description of the cluster policy.
- id str
- The id of the cluster policy.
- is_
default bool - If true, policy is a default policy created and managed by Databricks.
- max_
clusters_ intper_ user - Max number of clusters per user that can be active using this policy.
- name str
- Name of the cluster policy. The cluster policy must exist before this resource can be planned.
- policy_
family_ strdefinition_ overrides - Policy definition JSON document expressed in Databricks Policy Definition Language.
- policy_
family_ strid - ID of the policy family.
- provider_
config GetCluster Policy Provider Config - Configure the provider for management through account provider. This block consists of the following fields:
- definition String
- Policy definition: JSON document expressed in Databricks Policy Definition Language.
- description String
- Additional human-readable description of the cluster policy.
- id String
- The id of the cluster policy.
- is
Default Boolean - If true, policy is a default policy created and managed by Databricks.
- max
Clusters NumberPer User - Max number of clusters per user that can be active using this policy.
- name String
- Name of the cluster policy. The cluster policy must exist before this resource can be planned.
- policy
Family StringDefinition Overrides - Policy definition JSON document expressed in Databricks Policy Definition Language.
- policy
Family StringId - ID of the policy family.
- provider
Config Property Map - Configure the provider for management through account provider. This block consists of the following fields:
getClusterPolicy Result
The following output properties are available:
- Definition string
- Policy definition: JSON document expressed in Databricks Policy Definition Language.
- Description string
- Additional human-readable description of the cluster policy.
- Id string
- The id of the cluster policy.
- Is
Default bool - If true, policy is a default policy created and managed by Databricks.
- Max
Clusters intPer User - Max number of clusters per user that can be active using this policy.
- Name string
- Policy
Family stringDefinition Overrides - Policy definition JSON document expressed in Databricks Policy Definition Language.
- Policy
Family stringId - ID of the policy family.
- Provider
Config GetCluster Policy Provider Config
- Definition string
- Policy definition: JSON document expressed in Databricks Policy Definition Language.
- Description string
- Additional human-readable description of the cluster policy.
- Id string
- The id of the cluster policy.
- Is
Default bool - If true, policy is a default policy created and managed by Databricks.
- Max
Clusters intPer User - Max number of clusters per user that can be active using this policy.
- Name string
- Policy
Family stringDefinition Overrides - Policy definition JSON document expressed in Databricks Policy Definition Language.
- Policy
Family stringId - ID of the policy family.
- Provider
Config GetCluster Policy Provider Config
- definition String
- Policy definition: JSON document expressed in Databricks Policy Definition Language.
- description String
- Additional human-readable description of the cluster policy.
- id String
- The id of the cluster policy.
- is
Default Boolean - If true, policy is a default policy created and managed by Databricks.
- max
Clusters IntegerPer User - Max number of clusters per user that can be active using this policy.
- name String
- policy
Family StringDefinition Overrides - Policy definition JSON document expressed in Databricks Policy Definition Language.
- policy
Family StringId - ID of the policy family.
- provider
Config GetCluster Policy Provider Config
- definition string
- Policy definition: JSON document expressed in Databricks Policy Definition Language.
- description string
- Additional human-readable description of the cluster policy.
- id string
- The id of the cluster policy.
- is
Default boolean - If true, policy is a default policy created and managed by Databricks.
- max
Clusters numberPer User - Max number of clusters per user that can be active using this policy.
- name string
- policy
Family stringDefinition Overrides - Policy definition JSON document expressed in Databricks Policy Definition Language.
- policy
Family stringId - ID of the policy family.
- provider
Config GetCluster Policy Provider Config
- definition str
- Policy definition: JSON document expressed in Databricks Policy Definition Language.
- description str
- Additional human-readable description of the cluster policy.
- id str
- The id of the cluster policy.
- is_
default bool - If true, policy is a default policy created and managed by Databricks.
- max_
clusters_ intper_ user - Max number of clusters per user that can be active using this policy.
- name str
- policy_
family_ strdefinition_ overrides - Policy definition JSON document expressed in Databricks Policy Definition Language.
- policy_
family_ strid - ID of the policy family.
- provider_
config GetCluster Policy Provider Config
- definition String
- Policy definition: JSON document expressed in Databricks Policy Definition Language.
- description String
- Additional human-readable description of the cluster policy.
- id String
- The id of the cluster policy.
- is
Default Boolean - If true, policy is a default policy created and managed by Databricks.
- max
Clusters NumberPer User - Max number of clusters per user that can be active using this policy.
- name String
- policy
Family StringDefinition Overrides - Policy definition JSON document expressed in Databricks Policy Definition Language.
- policy
Family StringId - ID of the policy family.
- provider
Config Property Map
Supporting Types
GetClusterPolicyProviderConfig
- 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.
Package Details
- Repository
- databricks pulumi/pulumi-databricks
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
databricksTerraform Provider.
Viewing docs for Databricks v1.90.0
published on Thursday, Mar 19, 2026 by Pulumi
published on Thursday, Mar 19, 2026 by Pulumi
