1. Packages
  2. Databricks
  3. API Docs
  4. WorkspaceConf
Databricks v1.50.2 published on Tuesday, Sep 24, 2024 by Pulumi

databricks.WorkspaceConf

Explore with Pulumi AI

databricks logo
Databricks v1.50.2 published on Tuesday, Sep 24, 2024 by Pulumi

    Note This resource has an evolving API, which may change in future versions of the provider.

    Manages workspace configuration for expert usage. Currently, more than one instance of resource can exist in Pulumi state, though there’s no deterministic behavior, when they manage the same property. We strongly recommend to use a single databricks.WorkspaceConf per workspace.

    Note Deleting databricks.WorkspaceConf resources may fail depending on the configuration properties set, including but not limited to enableIpAccessLists, enableGp3, and maxTokenLifetimeDays. The provider will print a warning if this occurs. You can verify the workspace configuration by reviewing the workspace settings in the UI.

    Example Usage

    Allows specification of custom configuration properties for expert usage:

    • enableIpAccessLists - enables the use of databricks.IpAccessList resources
    • maxTokenLifetimeDays - (string) Maximum token lifetime of new tokens in days, as an integer. If zero, new tokens are permitted to have no lifetime limit. Negative numbers are unsupported. WARNING: This limit only applies to new tokens, so there may be tokens with lifetimes longer than this value, including unlimited lifetime. Such tokens may have been created before the current maximum token lifetime was set.
    • enableTokensConfig - (boolean) Enable or disable personal access tokens for this workspace.
    • enableDeprecatedClusterNamedInitScripts - (boolean) Enable or disable legacy cluster-named init scripts for this workspace.
    • enableDeprecatedGlobalInitScripts - (boolean) Enable or disable legacy global init scripts for this workspace.
    import * as pulumi from "@pulumi/pulumi";
    import * as databricks from "@pulumi/databricks";
    
    const _this = new databricks.WorkspaceConf("this", {customConfig: {
        enableIpAccessLists: "true",
    }});
    
    import pulumi
    import pulumi_databricks as databricks
    
    this = databricks.WorkspaceConf("this", custom_config={
        "enableIpAccessLists": "true",
    })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-databricks/sdk/go/databricks"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := databricks.NewWorkspaceConf(ctx, "this", &databricks.WorkspaceConfArgs{
    			CustomConfig: pulumi.StringMap{
    				"enableIpAccessLists": pulumi.String("true"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Databricks = Pulumi.Databricks;
    
    return await Deployment.RunAsync(() => 
    {
        var @this = new Databricks.WorkspaceConf("this", new()
        {
            CustomConfig = 
            {
                { "enableIpAccessLists", "true" },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.databricks.WorkspaceConf;
    import com.pulumi.databricks.WorkspaceConfArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var this_ = new WorkspaceConf("this", WorkspaceConfArgs.builder()
                .customConfig(Map.of("enableIpAccessLists", true))
                .build());
    
        }
    }
    
    resources:
      this:
        type: databricks:WorkspaceConf
        properties:
          customConfig:
            enableIpAccessLists: true
    

    Create WorkspaceConf Resource

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

    Constructor syntax

    new WorkspaceConf(name: string, args?: WorkspaceConfArgs, opts?: CustomResourceOptions);
    @overload
    def WorkspaceConf(resource_name: str,
                      args: Optional[WorkspaceConfArgs] = None,
                      opts: Optional[ResourceOptions] = None)
    
    @overload
    def WorkspaceConf(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      custom_config: Optional[Mapping[str, str]] = None)
    func NewWorkspaceConf(ctx *Context, name string, args *WorkspaceConfArgs, opts ...ResourceOption) (*WorkspaceConf, error)
    public WorkspaceConf(string name, WorkspaceConfArgs? args = null, CustomResourceOptions? opts = null)
    public WorkspaceConf(String name, WorkspaceConfArgs args)
    public WorkspaceConf(String name, WorkspaceConfArgs args, CustomResourceOptions options)
    
    type: databricks:WorkspaceConf
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args WorkspaceConfArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args WorkspaceConfArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args WorkspaceConfArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args WorkspaceConfArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args WorkspaceConfArgs
    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 workspaceConfResource = new Databricks.WorkspaceConf("workspaceConfResource", new()
    {
        CustomConfig = 
        {
            { "string", "string" },
        },
    });
    
    example, err := databricks.NewWorkspaceConf(ctx, "workspaceConfResource", &databricks.WorkspaceConfArgs{
    	CustomConfig: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    })
    
    var workspaceConfResource = new WorkspaceConf("workspaceConfResource", WorkspaceConfArgs.builder()
        .customConfig(Map.of("string", "string"))
        .build());
    
    workspace_conf_resource = databricks.WorkspaceConf("workspaceConfResource", custom_config={
        "string": "string",
    })
    
    const workspaceConfResource = new databricks.WorkspaceConf("workspaceConfResource", {customConfig: {
        string: "string",
    }});
    
    type: databricks:WorkspaceConf
    properties:
        customConfig:
            string: string
    

    WorkspaceConf Resource Properties

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

    Inputs

    The WorkspaceConf resource accepts the following input properties:

    CustomConfig Dictionary<string, string>
    Key-value map of strings that represent workspace configuration. Upon resource deletion, properties that start with enable or enforce will be reset to false value, regardless of initial default one.
    CustomConfig map[string]string
    Key-value map of strings that represent workspace configuration. Upon resource deletion, properties that start with enable or enforce will be reset to false value, regardless of initial default one.
    customConfig Map<String,String>
    Key-value map of strings that represent workspace configuration. Upon resource deletion, properties that start with enable or enforce will be reset to false value, regardless of initial default one.
    customConfig {[key: string]: string}
    Key-value map of strings that represent workspace configuration. Upon resource deletion, properties that start with enable or enforce will be reset to false value, regardless of initial default one.
    custom_config Mapping[str, str]
    Key-value map of strings that represent workspace configuration. Upon resource deletion, properties that start with enable or enforce will be reset to false value, regardless of initial default one.
    customConfig Map<String>
    Key-value map of strings that represent workspace configuration. Upon resource deletion, properties that start with enable or enforce will be reset to false value, regardless of initial default one.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the WorkspaceConf 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 WorkspaceConf Resource

    Get an existing WorkspaceConf 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?: WorkspaceConfState, opts?: CustomResourceOptions): WorkspaceConf
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            custom_config: Optional[Mapping[str, str]] = None) -> WorkspaceConf
    func GetWorkspaceConf(ctx *Context, name string, id IDInput, state *WorkspaceConfState, opts ...ResourceOption) (*WorkspaceConf, error)
    public static WorkspaceConf Get(string name, Input<string> id, WorkspaceConfState? state, CustomResourceOptions? opts = null)
    public static WorkspaceConf get(String name, Output<String> id, WorkspaceConfState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    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
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    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
    The unique name of the resulting resource.
    id
    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
    The unique name of the resulting resource.
    id
    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:
    CustomConfig Dictionary<string, string>
    Key-value map of strings that represent workspace configuration. Upon resource deletion, properties that start with enable or enforce will be reset to false value, regardless of initial default one.
    CustomConfig map[string]string
    Key-value map of strings that represent workspace configuration. Upon resource deletion, properties that start with enable or enforce will be reset to false value, regardless of initial default one.
    customConfig Map<String,String>
    Key-value map of strings that represent workspace configuration. Upon resource deletion, properties that start with enable or enforce will be reset to false value, regardless of initial default one.
    customConfig {[key: string]: string}
    Key-value map of strings that represent workspace configuration. Upon resource deletion, properties that start with enable or enforce will be reset to false value, regardless of initial default one.
    custom_config Mapping[str, str]
    Key-value map of strings that represent workspace configuration. Upon resource deletion, properties that start with enable or enforce will be reset to false value, regardless of initial default one.
    customConfig Map<String>
    Key-value map of strings that represent workspace configuration. Upon resource deletion, properties that start with enable or enforce will be reset to false value, regardless of initial default one.

    Import

    -> Note Importing this resource is not currently supported.

    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.
    databricks logo
    Databricks v1.50.2 published on Tuesday, Sep 24, 2024 by Pulumi