cluster_policy_compliance
Operations on a cluster_policy_compliance
resource.
Overview
Name | cluster_policy_compliance |
Type | Resource |
Id | databricks_workspace.compute.cluster_policy_compliance |
Fields
Name | Datatype |
---|---|
is_compliant | boolean |
violations | object |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
getcompliance | SELECT | cluster_id, deployment_name | 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. |
enforcecompliance | REPLACE | deployment_name | Updates 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 }}';