Skip to main content

cluster_policy_compliance

Creates, updates, deletes, gets or lists a cluster_policy_compliance resource.

Overview

Namecluster_policy_compliance
TypeResource
Iddatabricks_workspace.compute.cluster_policy_compliance

Fields

The following fields are returned by SELECT queries:

Request completed successfully.

NameDatatypeDescription
is_compliantboolean
violationsobject

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getcomplianceselectdeployment_nameReturns the policy compliance status of a cluster. Clusters could be out of compliance if their policy was updated after the cluster was last edited.
enforcecompliancereplacedeployment_nameUpdates a cluster to be compliant with the current version of its policy. A cluster can be updated if it is in a

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

Returns the policy compliance status of a cluster. Clusters could be out of compliance if their policy was updated after the cluster was last edited.

SELECT
is_compliant,
violations
FROM databricks_workspace.compute.cluster_policy_compliance
WHERE deployment_name = '{{ deployment_name }}' -- required;

REPLACE examples

Updates a cluster to be compliant with the current version of its policy. A cluster can be updated if it is in a

REPLACE databricks_workspace.compute.cluster_policy_compliance
SET
data__cluster_id = '{{ cluster_id }}',
data__validate_only = '{{ validate_only }}'
WHERE
deployment_name = '{{ deployment_name }}' --required
RETURNING
changes,
has_changes;