1. Packages
  2. Databricks Provider
  3. API Docs
  4. GlobalInitScript
Databricks v1.63.0 published on Thursday, Mar 13, 2025 by Pulumi

databricks.GlobalInitScript

Explore with Pulumi AI

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

Create GlobalInitScript Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new GlobalInitScript(name: string, args?: GlobalInitScriptArgs, opts?: CustomResourceOptions);
@overload
def GlobalInitScript(resource_name: str,
                     args: Optional[GlobalInitScriptArgs] = None,
                     opts: Optional[ResourceOptions] = None)

@overload
def GlobalInitScript(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     content_base64: Optional[str] = None,
                     enabled: Optional[bool] = None,
                     md5: Optional[str] = None,
                     name: Optional[str] = None,
                     position: Optional[int] = None,
                     source: Optional[str] = None)
func NewGlobalInitScript(ctx *Context, name string, args *GlobalInitScriptArgs, opts ...ResourceOption) (*GlobalInitScript, error)
public GlobalInitScript(string name, GlobalInitScriptArgs? args = null, CustomResourceOptions? opts = null)
public GlobalInitScript(String name, GlobalInitScriptArgs args)
public GlobalInitScript(String name, GlobalInitScriptArgs args, CustomResourceOptions options)
type: databricks:GlobalInitScript
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args GlobalInitScriptArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args GlobalInitScriptArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args GlobalInitScriptArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args GlobalInitScriptArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. GlobalInitScriptArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var globalInitScriptResource = new Databricks.GlobalInitScript("globalInitScriptResource", new()
{
    ContentBase64 = "string",
    Enabled = false,
    Md5 = "string",
    Name = "string",
    Position = 0,
    Source = "string",
});
Copy
example, err := databricks.NewGlobalInitScript(ctx, "globalInitScriptResource", &databricks.GlobalInitScriptArgs{
	ContentBase64: pulumi.String("string"),
	Enabled:       pulumi.Bool(false),
	Md5:           pulumi.String("string"),
	Name:          pulumi.String("string"),
	Position:      pulumi.Int(0),
	Source:        pulumi.String("string"),
})
Copy
var globalInitScriptResource = new GlobalInitScript("globalInitScriptResource", GlobalInitScriptArgs.builder()
    .contentBase64("string")
    .enabled(false)
    .md5("string")
    .name("string")
    .position(0)
    .source("string")
    .build());
Copy
global_init_script_resource = databricks.GlobalInitScript("globalInitScriptResource",
    content_base64="string",
    enabled=False,
    md5="string",
    name="string",
    position=0,
    source="string")
Copy
const globalInitScriptResource = new databricks.GlobalInitScript("globalInitScriptResource", {
    contentBase64: "string",
    enabled: false,
    md5: "string",
    name: "string",
    position: 0,
    source: "string",
});
Copy
type: databricks:GlobalInitScript
properties:
    contentBase64: string
    enabled: false
    md5: string
    name: string
    position: 0
    source: string
Copy

GlobalInitScript Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The GlobalInitScript resource accepts the following input properties:

ContentBase64 string
The base64-encoded source code global init script. Conflicts with source. Use of content_base64 is discouraged, as it's increasing memory footprint of Pulumi state and should only be used in exceptional circumstances
Enabled bool
specifies if the script is enabled for execution, or not
Md5 string
Name string
the name of the script. It should be unique
Position int
the position of a global init script, where 0 represents the first global init script to run, 1 is the second global init script to run, and so on. When omitted, the script gets the last position.
Source string
Path to script's source code on local filesystem. Conflicts with content_base64
ContentBase64 string
The base64-encoded source code global init script. Conflicts with source. Use of content_base64 is discouraged, as it's increasing memory footprint of Pulumi state and should only be used in exceptional circumstances
Enabled bool
specifies if the script is enabled for execution, or not
Md5 string
Name string
the name of the script. It should be unique
Position int
the position of a global init script, where 0 represents the first global init script to run, 1 is the second global init script to run, and so on. When omitted, the script gets the last position.
Source string
Path to script's source code on local filesystem. Conflicts with content_base64
contentBase64 String
The base64-encoded source code global init script. Conflicts with source. Use of content_base64 is discouraged, as it's increasing memory footprint of Pulumi state and should only be used in exceptional circumstances
enabled Boolean
specifies if the script is enabled for execution, or not
md5 String
name String
the name of the script. It should be unique
position Integer
the position of a global init script, where 0 represents the first global init script to run, 1 is the second global init script to run, and so on. When omitted, the script gets the last position.
source String
Path to script's source code on local filesystem. Conflicts with content_base64
contentBase64 string
The base64-encoded source code global init script. Conflicts with source. Use of content_base64 is discouraged, as it's increasing memory footprint of Pulumi state and should only be used in exceptional circumstances
enabled boolean
specifies if the script is enabled for execution, or not
md5 string
name string
the name of the script. It should be unique
position number
the position of a global init script, where 0 represents the first global init script to run, 1 is the second global init script to run, and so on. When omitted, the script gets the last position.
source string
Path to script's source code on local filesystem. Conflicts with content_base64
content_base64 str
The base64-encoded source code global init script. Conflicts with source. Use of content_base64 is discouraged, as it's increasing memory footprint of Pulumi state and should only be used in exceptional circumstances
enabled bool
specifies if the script is enabled for execution, or not
md5 str
name str
the name of the script. It should be unique
position int
the position of a global init script, where 0 represents the first global init script to run, 1 is the second global init script to run, and so on. When omitted, the script gets the last position.
source str
Path to script's source code on local filesystem. Conflicts with content_base64
contentBase64 String
The base64-encoded source code global init script. Conflicts with source. Use of content_base64 is discouraged, as it's increasing memory footprint of Pulumi state and should only be used in exceptional circumstances
enabled Boolean
specifies if the script is enabled for execution, or not
md5 String
name String
the name of the script. It should be unique
position Number
the position of a global init script, where 0 represents the first global init script to run, 1 is the second global init script to run, and so on. When omitted, the script gets the last position.
source String
Path to script's source code on local filesystem. Conflicts with content_base64

Outputs

All input properties are implicitly available as output properties. Additionally, the GlobalInitScript resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing GlobalInitScript Resource

Get an existing GlobalInitScript resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: GlobalInitScriptState, opts?: CustomResourceOptions): GlobalInitScript
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        content_base64: Optional[str] = None,
        enabled: Optional[bool] = None,
        md5: Optional[str] = None,
        name: Optional[str] = None,
        position: Optional[int] = None,
        source: Optional[str] = None) -> GlobalInitScript
func GetGlobalInitScript(ctx *Context, name string, id IDInput, state *GlobalInitScriptState, opts ...ResourceOption) (*GlobalInitScript, error)
public static GlobalInitScript Get(string name, Input<string> id, GlobalInitScriptState? state, CustomResourceOptions? opts = null)
public static GlobalInitScript get(String name, Output<String> id, GlobalInitScriptState state, CustomResourceOptions options)
resources:  _:    type: databricks:GlobalInitScript    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
ContentBase64 string
The base64-encoded source code global init script. Conflicts with source. Use of content_base64 is discouraged, as it's increasing memory footprint of Pulumi state and should only be used in exceptional circumstances
Enabled bool
specifies if the script is enabled for execution, or not
Md5 string
Name string
the name of the script. It should be unique
Position int
the position of a global init script, where 0 represents the first global init script to run, 1 is the second global init script to run, and so on. When omitted, the script gets the last position.
Source string
Path to script's source code on local filesystem. Conflicts with content_base64
ContentBase64 string
The base64-encoded source code global init script. Conflicts with source. Use of content_base64 is discouraged, as it's increasing memory footprint of Pulumi state and should only be used in exceptional circumstances
Enabled bool
specifies if the script is enabled for execution, or not
Md5 string
Name string
the name of the script. It should be unique
Position int
the position of a global init script, where 0 represents the first global init script to run, 1 is the second global init script to run, and so on. When omitted, the script gets the last position.
Source string
Path to script's source code on local filesystem. Conflicts with content_base64
contentBase64 String
The base64-encoded source code global init script. Conflicts with source. Use of content_base64 is discouraged, as it's increasing memory footprint of Pulumi state and should only be used in exceptional circumstances
enabled Boolean
specifies if the script is enabled for execution, or not
md5 String
name String
the name of the script. It should be unique
position Integer
the position of a global init script, where 0 represents the first global init script to run, 1 is the second global init script to run, and so on. When omitted, the script gets the last position.
source String
Path to script's source code on local filesystem. Conflicts with content_base64
contentBase64 string
The base64-encoded source code global init script. Conflicts with source. Use of content_base64 is discouraged, as it's increasing memory footprint of Pulumi state and should only be used in exceptional circumstances
enabled boolean
specifies if the script is enabled for execution, or not
md5 string
name string
the name of the script. It should be unique
position number
the position of a global init script, where 0 represents the first global init script to run, 1 is the second global init script to run, and so on. When omitted, the script gets the last position.
source string
Path to script's source code on local filesystem. Conflicts with content_base64
content_base64 str
The base64-encoded source code global init script. Conflicts with source. Use of content_base64 is discouraged, as it's increasing memory footprint of Pulumi state and should only be used in exceptional circumstances
enabled bool
specifies if the script is enabled for execution, or not
md5 str
name str
the name of the script. It should be unique
position int
the position of a global init script, where 0 represents the first global init script to run, 1 is the second global init script to run, and so on. When omitted, the script gets the last position.
source str
Path to script's source code on local filesystem. Conflicts with content_base64
contentBase64 String
The base64-encoded source code global init script. Conflicts with source. Use of content_base64 is discouraged, as it's increasing memory footprint of Pulumi state and should only be used in exceptional circumstances
enabled Boolean
specifies if the script is enabled for execution, or not
md5 String
name String
the name of the script. It should be unique
position Number
the position of a global init script, where 0 represents the first global init script to run, 1 is the second global init script to run, and so on. When omitted, the script gets the last position.
source String
Path to script's source code on local filesystem. Conflicts with content_base64

Import

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

bash

$ pulumi import databricks:index/globalInitScript:GlobalInitScript this script_id
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
databricks pulumi/pulumi-databricks
License
Apache-2.0
Notes
This Pulumi package is based on the databricks Terraform Provider.