Skip to main content

cluster_policy_compliance

Operations on a cluster_policy_compliance resource.

Overview

Namecluster_policy_compliance
TypeResource
Iddatabricks_workspace.compute.cluster_policy_compliance

Fields

NameDatatype
is_compliantboolean
violationsobject

Methods

NameAccessible byRequired ParamsDescription
getcomplianceSELECTcluster_id, deployment_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

SELECT examples

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

REPLACE example

Replaces a cluster_policy_compliance resource.

/*+ update */
-- replace field1, field2, etc. with the fields you want to update
REPLACE databricks_workspace.compute.cluster_policy_compliance
SET field1 = '{ value1 }',
field2 = '{ value2 }', ...
WHERE deployment_name = '{{ deployment_name }}';