Skip to content
This repository was archived by the owner on Jun 25, 2026. It is now read-only.
This repository was archived by the owner on Jun 25, 2026. It is now read-only.

create and edit cluster policy / accept real dict for definition instead of pure string #554

Description

@copdips

The API needs a pure string with espace on quotes for the value of the definition key:
https://docs.databricks.com/dev-tools/api/latest/policies.html#example

image

it would be nice in databricks cluster-policies [create|edit], in the given json file, if the value of the definition key is a dict, then databricks-cli converts it to a pure string directly with escape. because adding quotes escape is not easy, and especially when saving the code in git, a definition in pure string is very unreadable,

hereunder, an example of pure dict policy, but we need to pre-convert the definition part to string.

{
  "policy_id": "foo",
  "name": "bar",
  "definition": {
    "cluster_type": {
      "type": "fixed",
      "value": "job"
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew enhancement or feature request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions