instance_profiles
Creates, updates, deletes, gets or lists an instance_profiles resource.
Overviewβ
| Name | instance_profiles |
| Type | Resource |
| Id | databricks_workspace.compute.instance_profiles |
Fieldsβ
The following fields are returned by SELECT queries:
- list
| Name | Datatype | Description |
|---|---|---|
iam_role_arn | string | The 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 <https://docs.databricks.com/sql/admin/serverless.html>`__. Otherwise, this field is optional. |
instance_profile_arn | string | |
is_meta_instance_profile | boolean | Boolean 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:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list | select | deployment_name, workspace_domain | List the instance profiles that the calling user can use to launch a cluster. | |
add | insert | deployment_name, workspace_domain, instance_profile_arn | Registers an instance profile in Databricks. In the UI, you can then give users the permission to use | |
edit | replace | deployment_name, workspace_domain, instance_profile_arn | The only supported field to change is the optional IAM role ARN associated with the instance profile. | |
remove | delete | deployment_name, workspace_domain | Remove 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.
| Name | Datatype | Description |
|---|---|---|
deployment_name | string | The Databricks workspace deployment name: the host prefix of the workspace URL (dbc-abcd0123-a1bc on AWS, adb-1234567890123456.7 on Azure, 1234567890123456.7 on GCP). Set DATABRICKS_DEPLOYMENT_NAME to default it for the session. (default: dbc-abcd0123-a1bc, x-stackQL-envVar: DATABRICKS_DEPLOYMENT_NAME) |
workspace_domain | string | The Databricks workspace domain suffix for the cloud. Selected by DATABRICKS_CLOUD (aws, azure or gcp; default aws). (default: cloud.databricks.com, x-stackQL-envVarSelector: {"envVar":"DATABRICKS_CLOUD","default":"aws","values":{"aws":"cloud.databricks.com","azure":"azuredatabricks.net","gcp":"gcp.databricks.com"}}) |
SELECT examplesβ
- list
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
AND workspace_domain = '{{ workspace_domain }}' -- required
;
INSERT examplesβ
- add
- Manifest
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,
workspace_domain
)
SELECT
'{{ instance_profile_arn }}' /* required */,
'{{ iam_role_arn }}',
{{ is_meta_instance_profile }},
{{ skip_validation }},
'{{ deployment_name }}',
'{{ workspace_domain }}'
;
# Description fields are for documentation purposes
- name: instance_profiles
props:
- name: deployment_name
value: "{{ deployment_name }}"
description: Required parameter for the instance_profiles resource.
- name: workspace_domain
value: "{{ workspace_domain }}"
description: Required parameter for the instance_profiles resource.
- name: instance_profile_arn
value: "{{ instance_profile_arn }}"
description: |
The AWS ARN of the instance profile to register with Databricks. This field is required.
- name: iam_role_arn
value: "{{ iam_role_arn }}"
description: |
The 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 <https://docs.databricks.com/sql/admin/serverless.html>`__. Otherwise, this field is optional.
- name: is_meta_instance_profile
value: {{ is_meta_instance_profile }}
description: |
Boolean 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``.
- name: skip_validation
value: {{ skip_validation }}
description: |
By default, Databricks validates that it has sufficient permissions to launch instances with the instance profile. This validation uses AWS dry-run mode for the RunInstances API. If validation fails with an error message that does not indicate an IAM related permission issue, (e.g. βYour requested instance type is not supported in your requested availability zoneβ), you can pass this flag to skip the validation and forcibly add the instance profile.
REPLACE examplesβ
- edit
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 workspace_domain = '{{ workspace_domain }}' --required
AND instance_profile_arn = '{{ instance_profile_arn }}' --required;
DELETE examplesβ
- remove
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
AND workspace_domain = '{{ workspace_domain }}' --required
;