Skip to main content

instance_profiles

Creates, updates, deletes, gets or lists an instance_profiles resource.

Overview

Nameinstance_profiles
TypeResource
Iddatabricks_workspace.compute.instance_profiles

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
iam_role_arnstringThe AWS IAM role ARN of the role associated with the instance profile. This field is required if your role name and instance profile name do not match and you want to use the instance profile with [Databricks SQL Serverless]. Otherwise, this field is optional. [Databricks SQL Serverless]: https://docs.databricks.com/sql/admin/serverless.html
instance_profile_arnstring
is_meta_instance_profilebooleanBoolean flag indicating whether the instance profile should only be used in credential passthrough scenarios. If true, it means the instance profile contains an meta IAM role which could assume a wide range of roles. Therefore it should always be used with authorization. This field is optional, the default value is `false`.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectdeployment_nameList the instance profiles that the calling user can use to launch a cluster.
addinsertdeployment_name, instance_profile_arnRegisters an instance profile in Databricks. In the UI, you can then give users the permission to use
editreplacedeployment_name, instance_profile_arnThe only supported field to change is the optional IAM role ARN associated with the instance profile.
removedeletedeployment_nameRemove the instance profile with the provided ARN. Existing clusters with this instance profile will

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
deployment_namestringThe Databricks Workspace Deployment Name (default: dbc-abcd0123-a1bc)

SELECT examples

List the instance profiles that the calling user can use to launch a cluster.

SELECT
iam_role_arn,
instance_profile_arn,
is_meta_instance_profile
FROM databricks_workspace.compute.instance_profiles
WHERE deployment_name = '{{ deployment_name }}' -- required
;

INSERT examples

Registers an instance profile in Databricks. In the UI, you can then give users the permission to use

INSERT INTO databricks_workspace.compute.instance_profiles (
instance_profile_arn,
iam_role_arn,
is_meta_instance_profile,
skip_validation,
deployment_name
)
SELECT
'{{ instance_profile_arn }}' /* required */,
'{{ iam_role_arn }}',
{{ is_meta_instance_profile }},
{{ skip_validation }},
'{{ deployment_name }}'
;

REPLACE examples

The only supported field to change is the optional IAM role ARN associated with the instance profile.

REPLACE databricks_workspace.compute.instance_profiles
SET
instance_profile_arn = '{{ instance_profile_arn }}',
iam_role_arn = '{{ iam_role_arn }}',
is_meta_instance_profile = {{ is_meta_instance_profile }}
WHERE
deployment_name = '{{ deployment_name }}' --required
AND instance_profile_arn = '{{ instance_profile_arn }}' --required;

DELETE examples

Remove the instance profile with the provided ARN. Existing clusters with this instance profile will

DELETE FROM databricks_workspace.compute.instance_profiles
WHERE deployment_name = '{{ deployment_name }}' --required
;