published on Monday, Mar 9, 2026 by Pulumi
published on Monday, Mar 9, 2026 by Pulumi
Note Please switch to databricks.Grants with Unity Catalog to manage data access, which provides better and faster way for managing data security.
databricks.Grantsresource doesn’t require a technical cluster to perform operations.databricks.SqlPermissionswill be removed, once Unity Catalog is Generally Available.
This resource manages data object access control lists in Databricks workspaces for things like tables, views, databases, and more. In order to enable Table Access control, you have to login to the workspace as administrator, go to Admin Console, pick Access Control tab, click on Enable button in Table Access Control section, and click Confirm. The security guarantees of table access control will only be effective if cluster access control is also turned on. Please make sure that no users can create clusters in your workspace and all databricks.Cluster have approximately the following configuration:
import * as pulumi from "@pulumi/pulumi";
import * as databricks from "@pulumi/databricks";
// ...
const clusterWithTableAccessControl = new databricks.Cluster("clusterWithTableAccessControl", {sparkConf: {
"spark.databricks.acl.dfAclsEnabled": "true",
"spark.databricks.repl.allowedLanguages": "python,sql",
}});
import pulumi
import pulumi_databricks as databricks
# ...
cluster_with_table_access_control = databricks.Cluster("clusterWithTableAccessControl", spark_conf={
"spark.databricks.acl.dfAclsEnabled": "true",
"spark.databricks.repl.allowedLanguages": "python,sql",
})
using Pulumi;
using Databricks = Pulumi.Databricks;
class MyStack : Stack
{
public MyStack()
{
// ...
var clusterWithTableAccessControl = new Databricks.Cluster("clusterWithTableAccessControl", new Databricks.ClusterArgs
{
SparkConf =
{
{ "spark.databricks.acl.dfAclsEnabled", "true" },
{ "spark.databricks.repl.allowedLanguages", "python,sql" },
},
});
}
}
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.NewCluster(ctx, "clusterWithTableAccessControl", &databricks.ClusterArgs{
SparkConf: pulumi.AnyMap{
"spark.databricks.acl.dfAclsEnabled": pulumi.Any("true"),
"spark.databricks.repl.allowedLanguages": pulumi.Any("python,sql"),
},
})
if err != nil {
return err
}
return nil
})
}
It could be combined with creation of High-Concurrency and Single-Node clusters - in this case it should have corresponding custom_tags and spark.databricks.cluster.profile in Spark configuration as described in documentation for databricks.Cluster resource.
The created cluster could be referred to by providing its ID as cluster_id property.
import * as pulumi from "@pulumi/pulumi";
import * as databricks from "@pulumi/databricks";
const fooTable = new databricks.SqlPermissions("fooTable", {clusterId: databricks_cluster.cluster_name.id});
//...
import pulumi
import pulumi_databricks as databricks
foo_table = databricks.SqlPermissions("fooTable", cluster_id=databricks_cluster["cluster_name"]["id"])
#...
using Pulumi;
using Databricks = Pulumi.Databricks;
class MyStack : Stack
{
public MyStack()
{
var fooTable = new Databricks.SqlPermissions("fooTable", new Databricks.SqlPermissionsArgs
{
ClusterId = databricks_cluster.Cluster_name.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.NewSqlPermissions(ctx, "fooTable", &databricks.SqlPermissionsArgs{
ClusterId: pulumi.Any(databricks_cluster.Cluster_name.Id),
})
if err != nil {
return err
}
return nil
})
}
Related Resources
The following resources are often used in the same context:
- End to end workspace management guide.
- databricks.Group to manage groups in Databricks Workspace or Account Console (for AWS deployments).
- databricks.Grants to manage data access in Unity Catalog.
- databricks.Permissions to manage access control in Databricks workspace.
- databricks.User to manage users, that could be added to databricks.Group within the workspace.
Example Usage
The following resource definition will enforce access control on a table by executing the following SQL queries on a special auto-terminating cluster it would create for this operation
using Pulumi;
using Databricks = Pulumi.Databricks;
class MyStack : Stack
{
public MyStack()
{
var fooTable = new Databricks.SqlPermissions("fooTable", new Databricks.SqlPermissionsArgs
{
PrivilegeAssignments =
{
new Databricks.Inputs.SqlPermissionsPrivilegeAssignmentArgs
{
Principal = "serge@example.com",
Privileges =
{
"SELECT",
"MODIFY",
},
},
new Databricks.Inputs.SqlPermissionsPrivilegeAssignmentArgs
{
Principal = "special group",
Privileges =
{
"SELECT",
},
},
},
Table = "foo",
});
}
}
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.NewSqlPermissions(ctx, "fooTable", &databricks.SqlPermissionsArgs{
PrivilegeAssignments: SqlPermissionsPrivilegeAssignmentArray{
&SqlPermissionsPrivilegeAssignmentArgs{
Principal: pulumi.String("serge@example.com"),
Privileges: pulumi.StringArray{
pulumi.String("SELECT"),
pulumi.String("MODIFY"),
},
},
&SqlPermissionsPrivilegeAssignmentArgs{
Principal: pulumi.String("special group"),
Privileges: pulumi.StringArray{
pulumi.String("SELECT"),
},
},
},
Table: pulumi.String("foo"),
})
if err != nil {
return err
}
return nil
})
}
Example coming soon!
import * as pulumi from "@pulumi/pulumi";
import * as databricks from "@pulumi/databricks";
const fooTable = new databricks.SqlPermissions("foo_table", {
privilegeAssignments: [
{
principal: "serge@example.com",
privileges: [
"SELECT",
"MODIFY",
],
},
{
principal: "special group",
privileges: ["SELECT"],
},
],
table: "foo",
});
import pulumi
import pulumi_databricks as databricks
foo_table = databricks.SqlPermissions("fooTable",
privilege_assignments=[
databricks.SqlPermissionsPrivilegeAssignmentArgs(
principal="serge@example.com",
privileges=[
"SELECT",
"MODIFY",
],
),
databricks.SqlPermissionsPrivilegeAssignmentArgs(
principal="special group",
privileges=["SELECT"],
),
],
table="foo")
Example coming soon!
Create SqlPermissions Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new SqlPermissions(name: string, args?: SqlPermissionsArgs, opts?: CustomResourceOptions);@overload
def SqlPermissions(resource_name: str,
args: Optional[SqlPermissionsArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def SqlPermissions(resource_name: str,
opts: Optional[ResourceOptions] = None,
anonymous_function: Optional[bool] = None,
any_file: Optional[bool] = None,
catalog: Optional[bool] = None,
cluster_id: Optional[str] = None,
database: Optional[str] = None,
privilege_assignments: Optional[Sequence[SqlPermissionsPrivilegeAssignmentArgs]] = None,
table: Optional[str] = None,
view: Optional[str] = None)func NewSqlPermissions(ctx *Context, name string, args *SqlPermissionsArgs, opts ...ResourceOption) (*SqlPermissions, error)public SqlPermissions(string name, SqlPermissionsArgs? args = null, CustomResourceOptions? opts = null)
public SqlPermissions(String name, SqlPermissionsArgs args)
public SqlPermissions(String name, SqlPermissionsArgs args, CustomResourceOptions options)
type: databricks:SqlPermissions
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 SqlPermissionsArgs
- 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 SqlPermissionsArgs
- 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 SqlPermissionsArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SqlPermissionsArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args SqlPermissionsArgs
- 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 sqlPermissionsResource = new Databricks.SqlPermissions("sqlPermissionsResource", new()
{
AnonymousFunction = false,
AnyFile = false,
Catalog = false,
ClusterId = "string",
Database = "string",
PrivilegeAssignments = new[]
{
new Databricks.Inputs.SqlPermissionsPrivilegeAssignmentArgs
{
Principal = "string",
Privileges = new[]
{
"string",
},
},
},
Table = "string",
View = "string",
});
example, err := databricks.NewSqlPermissions(ctx, "sqlPermissionsResource", &databricks.SqlPermissionsArgs{
AnonymousFunction: pulumi.Bool(false),
AnyFile: pulumi.Bool(false),
Catalog: pulumi.Bool(false),
ClusterId: pulumi.String("string"),
Database: pulumi.String("string"),
PrivilegeAssignments: databricks.SqlPermissionsPrivilegeAssignmentArray{
&databricks.SqlPermissionsPrivilegeAssignmentArgs{
Principal: pulumi.String("string"),
Privileges: pulumi.StringArray{
pulumi.String("string"),
},
},
},
Table: pulumi.String("string"),
View: pulumi.String("string"),
})
var sqlPermissionsResource = new SqlPermissions("sqlPermissionsResource", SqlPermissionsArgs.builder()
.anonymousFunction(false)
.anyFile(false)
.catalog(false)
.clusterId("string")
.database("string")
.privilegeAssignments(SqlPermissionsPrivilegeAssignmentArgs.builder()
.principal("string")
.privileges("string")
.build())
.table("string")
.view("string")
.build());
sql_permissions_resource = databricks.SqlPermissions("sqlPermissionsResource",
anonymous_function=False,
any_file=False,
catalog=False,
cluster_id="string",
database="string",
privilege_assignments=[{
"principal": "string",
"privileges": ["string"],
}],
table="string",
view="string")
const sqlPermissionsResource = new databricks.SqlPermissions("sqlPermissionsResource", {
anonymousFunction: false,
anyFile: false,
catalog: false,
clusterId: "string",
database: "string",
privilegeAssignments: [{
principal: "string",
privileges: ["string"],
}],
table: "string",
view: "string",
});
type: databricks:SqlPermissions
properties:
anonymousFunction: false
anyFile: false
catalog: false
clusterId: string
database: string
privilegeAssignments:
- principal: string
privileges:
- string
table: string
view: string
SqlPermissions 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 SqlPermissions resource accepts the following input properties:
- Anonymous
Function bool - If this access control for using anonymous function. Defaults to
false. - Any
File bool - If this access control for reading any file. Defaults to
false. - Catalog bool
- If this access control for the entire catalog. Defaults to
false. - Cluster
Id string - Database string
- Name of the database. Has default value of
default. - Privilege
Assignments List<SqlPermissions Privilege Assignment> - Table string
- Name of the table. Can be combined with
database. - View string
- Name of the view. Can be combined with
database.
- Anonymous
Function bool - If this access control for using anonymous function. Defaults to
false. - Any
File bool - If this access control for reading any file. Defaults to
false. - Catalog bool
- If this access control for the entire catalog. Defaults to
false. - Cluster
Id string - Database string
- Name of the database. Has default value of
default. - Privilege
Assignments []SqlPermissions Privilege Assignment Args - Table string
- Name of the table. Can be combined with
database. - View string
- Name of the view. Can be combined with
database.
- anonymous
Function Boolean - If this access control for using anonymous function. Defaults to
false. - any
File Boolean - If this access control for reading any file. Defaults to
false. - catalog Boolean
- If this access control for the entire catalog. Defaults to
false. - cluster
Id String - database String
- Name of the database. Has default value of
default. - privilege
Assignments List<SqlPermissions Privilege Assignment> - table String
- Name of the table. Can be combined with
database. - view String
- Name of the view. Can be combined with
database.
- anonymous
Function boolean - If this access control for using anonymous function. Defaults to
false. - any
File boolean - If this access control for reading any file. Defaults to
false. - catalog boolean
- If this access control for the entire catalog. Defaults to
false. - cluster
Id string - database string
- Name of the database. Has default value of
default. - privilege
Assignments SqlPermissions Privilege Assignment[] - table string
- Name of the table. Can be combined with
database. - view string
- Name of the view. Can be combined with
database.
- anonymous_
function bool - If this access control for using anonymous function. Defaults to
false. - any_
file bool - If this access control for reading any file. Defaults to
false. - catalog bool
- If this access control for the entire catalog. Defaults to
false. - cluster_
id str - database str
- Name of the database. Has default value of
default. - privilege_
assignments Sequence[SqlPermissions Privilege Assignment Args] - table str
- Name of the table. Can be combined with
database. - view str
- Name of the view. Can be combined with
database.
- anonymous
Function Boolean - If this access control for using anonymous function. Defaults to
false. - any
File Boolean - If this access control for reading any file. Defaults to
false. - catalog Boolean
- If this access control for the entire catalog. Defaults to
false. - cluster
Id String - database String
- Name of the database. Has default value of
default. - privilege
Assignments List<Property Map> - table String
- Name of the table. Can be combined with
database. - view String
- Name of the view. Can be combined with
database.
Outputs
All input properties are implicitly available as output properties. Additionally, the SqlPermissions resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing SqlPermissions Resource
Get an existing SqlPermissions 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?: SqlPermissionsState, opts?: CustomResourceOptions): SqlPermissions@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
anonymous_function: Optional[bool] = None,
any_file: Optional[bool] = None,
catalog: Optional[bool] = None,
cluster_id: Optional[str] = None,
database: Optional[str] = None,
privilege_assignments: Optional[Sequence[SqlPermissionsPrivilegeAssignmentArgs]] = None,
table: Optional[str] = None,
view: Optional[str] = None) -> SqlPermissionsfunc GetSqlPermissions(ctx *Context, name string, id IDInput, state *SqlPermissionsState, opts ...ResourceOption) (*SqlPermissions, error)public static SqlPermissions Get(string name, Input<string> id, SqlPermissionsState? state, CustomResourceOptions? opts = null)public static SqlPermissions get(String name, Output<String> id, SqlPermissionsState state, CustomResourceOptions options)resources: _: type: databricks:SqlPermissions 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.
- Anonymous
Function bool - If this access control for using anonymous function. Defaults to
false. - Any
File bool - If this access control for reading any file. Defaults to
false. - Catalog bool
- If this access control for the entire catalog. Defaults to
false. - Cluster
Id string - Database string
- Name of the database. Has default value of
default. - Privilege
Assignments List<SqlPermissions Privilege Assignment> - Table string
- Name of the table. Can be combined with
database. - View string
- Name of the view. Can be combined with
database.
- Anonymous
Function bool - If this access control for using anonymous function. Defaults to
false. - Any
File bool - If this access control for reading any file. Defaults to
false. - Catalog bool
- If this access control for the entire catalog. Defaults to
false. - Cluster
Id string - Database string
- Name of the database. Has default value of
default. - Privilege
Assignments []SqlPermissions Privilege Assignment Args - Table string
- Name of the table. Can be combined with
database. - View string
- Name of the view. Can be combined with
database.
- anonymous
Function Boolean - If this access control for using anonymous function. Defaults to
false. - any
File Boolean - If this access control for reading any file. Defaults to
false. - catalog Boolean
- If this access control for the entire catalog. Defaults to
false. - cluster
Id String - database String
- Name of the database. Has default value of
default. - privilege
Assignments List<SqlPermissions Privilege Assignment> - table String
- Name of the table. Can be combined with
database. - view String
- Name of the view. Can be combined with
database.
- anonymous
Function boolean - If this access control for using anonymous function. Defaults to
false. - any
File boolean - If this access control for reading any file. Defaults to
false. - catalog boolean
- If this access control for the entire catalog. Defaults to
false. - cluster
Id string - database string
- Name of the database. Has default value of
default. - privilege
Assignments SqlPermissions Privilege Assignment[] - table string
- Name of the table. Can be combined with
database. - view string
- Name of the view. Can be combined with
database.
- anonymous_
function bool - If this access control for using anonymous function. Defaults to
false. - any_
file bool - If this access control for reading any file. Defaults to
false. - catalog bool
- If this access control for the entire catalog. Defaults to
false. - cluster_
id str - database str
- Name of the database. Has default value of
default. - privilege_
assignments Sequence[SqlPermissions Privilege Assignment Args] - table str
- Name of the table. Can be combined with
database. - view str
- Name of the view. Can be combined with
database.
- anonymous
Function Boolean - If this access control for using anonymous function. Defaults to
false. - any
File Boolean - If this access control for reading any file. Defaults to
false. - catalog Boolean
- If this access control for the entire catalog. Defaults to
false. - cluster
Id String - database String
- Name of the database. Has default value of
default. - privilege
Assignments List<Property Map> - table String
- Name of the table. Can be combined with
database. - view String
- Name of the view. Can be combined with
database.
Supporting Types
SqlPermissionsPrivilegeAssignment, SqlPermissionsPrivilegeAssignmentArgs
- Principal string
display_nameof databricks.Group or databricks_user.- Privileges List<string>
- set of available privilege names in upper case.
- Principal string
display_nameof databricks.Group or databricks_user.- Privileges []string
- set of available privilege names in upper case.
- principal String
display_nameof databricks.Group or databricks_user.- privileges List<String>
- set of available privilege names in upper case.
- principal string
display_nameof databricks.Group or databricks_user.- privileges string[]
- set of available privilege names in upper case.
- principal str
display_nameof databricks.Group or databricks_user.- privileges Sequence[str]
- set of available privilege names in upper case.
- principal String
display_nameof databricks.Group or databricks_user.- privileges List<String>
- set of available privilege names in upper case.
Import
The resource can be imported using a synthetic identifier. Examples of valid synthetic identifiers are* table/default.foo - table foo in a default database. Database is always mandatory. * view/bar.foo - view foo in bar database. * database/bar - bar database. * catalog/ - entire catalog. / suffix is mandatory. * any file/ - direct access to any file. / suffix is mandatory. * anonymous function/ - anonymous function. / suffix is mandatory. bash
$ pulumi import databricks:index/sqlPermissions:SqlPermissions foo /<object-type>/<object-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
databricksTerraform Provider.
published on Monday, Mar 9, 2026 by Pulumi
