databricks_global_init_script Resource

This resource allows you to manage global init scripts, which are run on all databricks_cluster and databricks_job.

Example Usage

You can declare Terraform-managed global init script by specifying source attribute of corresponding local file.

resource "databricks_global_init_script" "init1" {
  source = "${path.module}/init.sh"
  name   = "my init script"
}

You can also create a managed global init script with inline sources through content_base64 attribute.

resource "databricks_global_init_script" "init2" {
  content_base64 = base64encode(<<-EOT
    #!/bin/bash
    echo "hello world"
    EOT
  )
  name = "hello script"
}

Argument Reference

The size of a global init script source code must not exceed 64Kb. The following arguments are supported:

Attribute Reference

In addition to all arguments above, the following attributes are exported:

Access Control

Global init scripts are available only for administrators, so you can't change permissions for it.

Import

The resource global init script can be imported using script ID:

terraform import databricks_global_init_script.this script_id

The following resources are often used in the same context: