1. Registry
  2. Packages
  3. Databricks Provider
  4. API Docs
  5. WorkspaceIamServicePrincipalV2
Viewing docs for Databricks v1.109.0
published on Tuesday, Sep 8, 2026 by Pulumi
databricks logo databricks logo
Viewing docs for Databricks v1.109.0
published on Tuesday, Sep 8, 2026 by Pulumi

    Public Beta

    API Documentation

    Manages a service principal using a workspace-scoped provider. Creating the resource provisions the service principal; deleting it removes the service principal. applicationId is immutable — changing it replaces the resource.

    When Automatic Identity Management (AIM) is enabled for the account, this resource manages local service principals only: a service principal cannot be created with externalId set. Service principals that already have an externalId can still be read through this resource, but only their externalId may be updated — their other fields are sourced from the identity provider.

    Example Usage

    Example usage:

    Creates a service principal using a workspace-scoped provider. When AIM is enabled, the service principal cannot be created with externalId set.

    import * as pulumi from "@pulumi/pulumi";
    import * as databricks from "@pulumi/databricks";
    
    const _this = new databricks.WorkspaceIamServicePrincipalV2("this", {
        displayName: "ci-runner",
        accountSpStatus: "ACTIVE",
    });
    
    import pulumi
    import pulumi_databricks as databricks
    
    this = databricks.WorkspaceIamServicePrincipalV2("this",
        display_name="ci-runner",
        account_sp_status="ACTIVE")
    
    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.NewWorkspaceIamServicePrincipalV2(ctx, "this", &databricks.WorkspaceIamServicePrincipalV2Args{
    			DisplayName:     pulumi.String("ci-runner"),
    			AccountSpStatus: pulumi.String("ACTIVE"),
    		})
    		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.WorkspaceIamServicePrincipalV2("this", new()
        {
            DisplayName = "ci-runner",
            AccountSpStatus = "ACTIVE",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.databricks.WorkspaceIamServicePrincipalV2;
    import com.pulumi.databricks.WorkspaceIamServicePrincipalV2Args;
    import java.util.ArrayList;
    import java.util.Arrays;
    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 WorkspaceIamServicePrincipalV2("this", WorkspaceIamServicePrincipalV2Args.builder()
                .displayName("ci-runner")
                .accountSpStatus("ACTIVE")
                .build());
    
        }
    }
    
    resources:
      this:
        type: databricks:WorkspaceIamServicePrincipalV2
        properties:
          displayName: ci-runner
          accountSpStatus: ACTIVE
    
    pulumi {
      required_providers {
        databricks = {
          source = "pulumi/databricks"
        }
      }
    }
    
    resource "databricks_workspaceiamserviceprincipalv2" "this" {
      display_name      = "ci-runner"
      account_sp_status = "ACTIVE"
    }
    

    Create WorkspaceIamServicePrincipalV2 Resource

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

    Constructor syntax

    new WorkspaceIamServicePrincipalV2(name: string, args: WorkspaceIamServicePrincipalV2Args, opts?: CustomResourceOptions);
    @overload
    def WorkspaceIamServicePrincipalV2(resource_name: str,
                                       args: WorkspaceIamServicePrincipalV2Args,
                                       opts: Optional[ResourceOptions] = None)
    
    @overload
    def WorkspaceIamServicePrincipalV2(resource_name: str,
                                       opts: Optional[ResourceOptions] = None,
                                       account_sp_status: Optional[str] = None,
                                       display_name: Optional[str] = None,
                                       application_id: Optional[str] = None,
                                       external_id: Optional[str] = None,
                                       provider_config: Optional[WorkspaceIamServicePrincipalV2ProviderConfigArgs] = None)
    func NewWorkspaceIamServicePrincipalV2(ctx *Context, name string, args WorkspaceIamServicePrincipalV2Args, opts ...ResourceOption) (*WorkspaceIamServicePrincipalV2, error)
    public WorkspaceIamServicePrincipalV2(string name, WorkspaceIamServicePrincipalV2Args args, CustomResourceOptions? opts = null)
    public WorkspaceIamServicePrincipalV2(String name, WorkspaceIamServicePrincipalV2Args args)
    public WorkspaceIamServicePrincipalV2(String name, WorkspaceIamServicePrincipalV2Args args, CustomResourceOptions options)
    
    type: databricks:WorkspaceIamServicePrincipalV2
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "databricks_workspace_iam_service_principal_v2" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args WorkspaceIamServicePrincipalV2Args
    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 WorkspaceIamServicePrincipalV2Args
    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 WorkspaceIamServicePrincipalV2Args
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args WorkspaceIamServicePrincipalV2Args
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args WorkspaceIamServicePrincipalV2Args
    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 workspaceIamServicePrincipalV2Resource = new Databricks.WorkspaceIamServicePrincipalV2("workspaceIamServicePrincipalV2Resource", new()
    {
        AccountSpStatus = "string",
        DisplayName = "string",
        ApplicationId = "string",
        ExternalId = "string",
        ProviderConfig = new Databricks.Inputs.WorkspaceIamServicePrincipalV2ProviderConfigArgs
        {
            WorkspaceId = "string",
        },
    });
    
    example, err := databricks.NewWorkspaceIamServicePrincipalV2(ctx, "workspaceIamServicePrincipalV2Resource", &databricks.WorkspaceIamServicePrincipalV2Args{
    	AccountSpStatus: pulumi.String("string"),
    	DisplayName:     pulumi.String("string"),
    	ApplicationId:   pulumi.String("string"),
    	ExternalId:      pulumi.String("string"),
    	ProviderConfig: &databricks.WorkspaceIamServicePrincipalV2ProviderConfigArgs{
    		WorkspaceId: pulumi.String("string"),
    	},
    })
    
    resource "databricks_workspace_iam_service_principal_v2" "workspaceIamServicePrincipalV2Resource" {
      lifecycle {
        create_before_destroy = true
      }
      account_sp_status = "string"
      display_name      = "string"
      application_id    = "string"
      external_id       = "string"
      provider_config = {
        workspace_id = "string"
      }
    }
    
    var workspaceIamServicePrincipalV2Resource = new WorkspaceIamServicePrincipalV2("workspaceIamServicePrincipalV2Resource", WorkspaceIamServicePrincipalV2Args.builder()
        .accountSpStatus("string")
        .displayName("string")
        .applicationId("string")
        .externalId("string")
        .providerConfig(WorkspaceIamServicePrincipalV2ProviderConfigArgs.builder()
            .workspaceId("string")
            .build())
        .build());
    
    workspace_iam_service_principal_v2_resource = databricks.WorkspaceIamServicePrincipalV2("workspaceIamServicePrincipalV2Resource",
        account_sp_status="string",
        display_name="string",
        application_id="string",
        external_id="string",
        provider_config={
            "workspace_id": "string",
        })
    
    const workspaceIamServicePrincipalV2Resource = new databricks.WorkspaceIamServicePrincipalV2("workspaceIamServicePrincipalV2Resource", {
        accountSpStatus: "string",
        displayName: "string",
        applicationId: "string",
        externalId: "string",
        providerConfig: {
            workspaceId: "string",
        },
    });
    
    type: databricks:WorkspaceIamServicePrincipalV2
    properties:
        accountSpStatus: string
        applicationId: string
        displayName: string
        externalId: string
        providerConfig:
            workspaceId: string
    

    WorkspaceIamServicePrincipalV2 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 WorkspaceIamServicePrincipalV2 resource accepts the following input properties:

    AccountSpStatus string
    The activity status of a service principal in a Databricks account. Possible values are: ACTIVE, INACTIVE
    DisplayName string
    Display name of the service principal
    ApplicationId string
    (string) - Application ID of the service principal. Set at creation time and cannot be changed afterwards; when omitted, the server generates one
    ExternalId string
    ExternalId of the service principal in the customer's IdP
    ProviderConfig WorkspaceIamServicePrincipalV2ProviderConfig
    Configure the provider for management through account provider.
    AccountSpStatus string
    The activity status of a service principal in a Databricks account. Possible values are: ACTIVE, INACTIVE
    DisplayName string
    Display name of the service principal
    ApplicationId string
    (string) - Application ID of the service principal. Set at creation time and cannot be changed afterwards; when omitted, the server generates one
    ExternalId string
    ExternalId of the service principal in the customer's IdP
    ProviderConfig WorkspaceIamServicePrincipalV2ProviderConfigArgs
    Configure the provider for management through account provider.
    account_sp_status string
    The activity status of a service principal in a Databricks account. Possible values are: ACTIVE, INACTIVE
    display_name string
    Display name of the service principal
    application_id string
    (string) - Application ID of the service principal. Set at creation time and cannot be changed afterwards; when omitted, the server generates one
    external_id string
    ExternalId of the service principal in the customer's IdP
    provider_config object
    Configure the provider for management through account provider.
    accountSpStatus String
    The activity status of a service principal in a Databricks account. Possible values are: ACTIVE, INACTIVE
    displayName String
    Display name of the service principal
    applicationId String
    (string) - Application ID of the service principal. Set at creation time and cannot be changed afterwards; when omitted, the server generates one
    externalId String
    ExternalId of the service principal in the customer's IdP
    providerConfig WorkspaceIamServicePrincipalV2ProviderConfig
    Configure the provider for management through account provider.
    accountSpStatus string
    The activity status of a service principal in a Databricks account. Possible values are: ACTIVE, INACTIVE
    displayName string
    Display name of the service principal
    applicationId string
    (string) - Application ID of the service principal. Set at creation time and cannot be changed afterwards; when omitted, the server generates one
    externalId string
    ExternalId of the service principal in the customer's IdP
    providerConfig WorkspaceIamServicePrincipalV2ProviderConfig
    Configure the provider for management through account provider.
    account_sp_status str
    The activity status of a service principal in a Databricks account. Possible values are: ACTIVE, INACTIVE
    display_name str
    Display name of the service principal
    application_id str
    (string) - Application ID of the service principal. Set at creation time and cannot be changed afterwards; when omitted, the server generates one
    external_id str
    ExternalId of the service principal in the customer's IdP
    provider_config WorkspaceIamServicePrincipalV2ProviderConfigArgs
    Configure the provider for management through account provider.
    accountSpStatus String
    The activity status of a service principal in a Databricks account. Possible values are: ACTIVE, INACTIVE
    displayName String
    Display name of the service principal
    applicationId String
    (string) - Application ID of the service principal. Set at creation time and cannot be changed afterwards; when omitted, the server generates one
    externalId String
    ExternalId of the service principal in the customer's IdP
    providerConfig Property Map
    Configure the provider for management through account provider.

    Outputs

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

    AccountId string
    (string) - The parent account ID for the service principal in Databricks
    Id string
    The provider-assigned unique ID for this managed resource.
    ServicePrincipalId string
    (string) - Internal service principal ID of the service principal in Databricks
    AccountId string
    (string) - The parent account ID for the service principal in Databricks
    Id string
    The provider-assigned unique ID for this managed resource.
    ServicePrincipalId string
    (string) - Internal service principal ID of the service principal in Databricks
    account_id string
    (string) - The parent account ID for the service principal in Databricks
    id string
    The provider-assigned unique ID for this managed resource.
    service_principal_id string
    (string) - Internal service principal ID of the service principal in Databricks
    accountId String
    (string) - The parent account ID for the service principal in Databricks
    id String
    The provider-assigned unique ID for this managed resource.
    servicePrincipalId String
    (string) - Internal service principal ID of the service principal in Databricks
    accountId string
    (string) - The parent account ID for the service principal in Databricks
    id string
    The provider-assigned unique ID for this managed resource.
    servicePrincipalId string
    (string) - Internal service principal ID of the service principal in Databricks
    account_id str
    (string) - The parent account ID for the service principal in Databricks
    id str
    The provider-assigned unique ID for this managed resource.
    service_principal_id str
    (string) - Internal service principal ID of the service principal in Databricks
    accountId String
    (string) - The parent account ID for the service principal in Databricks
    id String
    The provider-assigned unique ID for this managed resource.
    servicePrincipalId String
    (string) - Internal service principal ID of the service principal in Databricks

    Look up Existing WorkspaceIamServicePrincipalV2 Resource

    Get an existing WorkspaceIamServicePrincipalV2 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?: WorkspaceIamServicePrincipalV2State, opts?: CustomResourceOptions): WorkspaceIamServicePrincipalV2
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            account_id: Optional[str] = None,
            account_sp_status: Optional[str] = None,
            application_id: Optional[str] = None,
            display_name: Optional[str] = None,
            external_id: Optional[str] = None,
            provider_config: Optional[WorkspaceIamServicePrincipalV2ProviderConfigArgs] = None,
            service_principal_id: Optional[str] = None) -> WorkspaceIamServicePrincipalV2
    func GetWorkspaceIamServicePrincipalV2(ctx *Context, name string, id IDInput, state *WorkspaceIamServicePrincipalV2State, opts ...ResourceOption) (*WorkspaceIamServicePrincipalV2, error)
    public static WorkspaceIamServicePrincipalV2 Get(string name, Input<string> id, WorkspaceIamServicePrincipalV2State? state, CustomResourceOptions? opts = null)
    public static WorkspaceIamServicePrincipalV2 get(String name, Output<String> id, WorkspaceIamServicePrincipalV2State state, CustomResourceOptions options)
    resources:  _:    type: databricks:WorkspaceIamServicePrincipalV2    get:      id: ${id}
    import {
      to = databricks_workspace_iam_service_principal_v2.example
      id = "${id}"
    }
    
    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:
    AccountId string
    (string) - The parent account ID for the service principal in Databricks
    AccountSpStatus string
    The activity status of a service principal in a Databricks account. Possible values are: ACTIVE, INACTIVE
    ApplicationId string
    (string) - Application ID of the service principal. Set at creation time and cannot be changed afterwards; when omitted, the server generates one
    DisplayName string
    Display name of the service principal
    ExternalId string
    ExternalId of the service principal in the customer's IdP
    ProviderConfig WorkspaceIamServicePrincipalV2ProviderConfig
    Configure the provider for management through account provider.
    ServicePrincipalId string
    (string) - Internal service principal ID of the service principal in Databricks
    AccountId string
    (string) - The parent account ID for the service principal in Databricks
    AccountSpStatus string
    The activity status of a service principal in a Databricks account. Possible values are: ACTIVE, INACTIVE
    ApplicationId string
    (string) - Application ID of the service principal. Set at creation time and cannot be changed afterwards; when omitted, the server generates one
    DisplayName string
    Display name of the service principal
    ExternalId string
    ExternalId of the service principal in the customer's IdP
    ProviderConfig WorkspaceIamServicePrincipalV2ProviderConfigArgs
    Configure the provider for management through account provider.
    ServicePrincipalId string
    (string) - Internal service principal ID of the service principal in Databricks
    account_id string
    (string) - The parent account ID for the service principal in Databricks
    account_sp_status string
    The activity status of a service principal in a Databricks account. Possible values are: ACTIVE, INACTIVE
    application_id string
    (string) - Application ID of the service principal. Set at creation time and cannot be changed afterwards; when omitted, the server generates one
    display_name string
    Display name of the service principal
    external_id string
    ExternalId of the service principal in the customer's IdP
    provider_config object
    Configure the provider for management through account provider.
    service_principal_id string
    (string) - Internal service principal ID of the service principal in Databricks
    accountId String
    (string) - The parent account ID for the service principal in Databricks
    accountSpStatus String
    The activity status of a service principal in a Databricks account. Possible values are: ACTIVE, INACTIVE
    applicationId String
    (string) - Application ID of the service principal. Set at creation time and cannot be changed afterwards; when omitted, the server generates one
    displayName String
    Display name of the service principal
    externalId String
    ExternalId of the service principal in the customer's IdP
    providerConfig WorkspaceIamServicePrincipalV2ProviderConfig
    Configure the provider for management through account provider.
    servicePrincipalId String
    (string) - Internal service principal ID of the service principal in Databricks
    accountId string
    (string) - The parent account ID for the service principal in Databricks
    accountSpStatus string
    The activity status of a service principal in a Databricks account. Possible values are: ACTIVE, INACTIVE
    applicationId string
    (string) - Application ID of the service principal. Set at creation time and cannot be changed afterwards; when omitted, the server generates one
    displayName string
    Display name of the service principal
    externalId string
    ExternalId of the service principal in the customer's IdP
    providerConfig WorkspaceIamServicePrincipalV2ProviderConfig
    Configure the provider for management through account provider.
    servicePrincipalId string
    (string) - Internal service principal ID of the service principal in Databricks
    account_id str
    (string) - The parent account ID for the service principal in Databricks
    account_sp_status str
    The activity status of a service principal in a Databricks account. Possible values are: ACTIVE, INACTIVE
    application_id str
    (string) - Application ID of the service principal. Set at creation time and cannot be changed afterwards; when omitted, the server generates one
    display_name str
    Display name of the service principal
    external_id str
    ExternalId of the service principal in the customer's IdP
    provider_config WorkspaceIamServicePrincipalV2ProviderConfigArgs
    Configure the provider for management through account provider.
    service_principal_id str
    (string) - Internal service principal ID of the service principal in Databricks
    accountId String
    (string) - The parent account ID for the service principal in Databricks
    accountSpStatus String
    The activity status of a service principal in a Databricks account. Possible values are: ACTIVE, INACTIVE
    applicationId String
    (string) - Application ID of the service principal. Set at creation time and cannot be changed afterwards; when omitted, the server generates one
    displayName String
    Display name of the service principal
    externalId String
    ExternalId of the service principal in the customer's IdP
    providerConfig Property Map
    Configure the provider for management through account provider.
    servicePrincipalId String
    (string) - Internal service principal ID of the service principal in Databricks

    Supporting Types

    WorkspaceIamServicePrincipalV2ProviderConfig, WorkspaceIamServicePrincipalV2ProviderConfigArgs

    WorkspaceId string
    Workspace ID which the resource belongs to. This workspace must be part of the account which the provider is configured with.
    WorkspaceId string
    Workspace ID which the resource belongs to. This workspace must be part of the account which the provider is configured with.
    workspace_id string
    Workspace ID which the resource belongs to. This workspace must be part of the account which the provider is configured with.
    workspaceId String
    Workspace ID which the resource belongs to. This workspace must be part of the account which the provider is configured with.
    workspaceId string
    Workspace ID which the resource belongs to. This workspace must be part of the account which the provider is configured with.
    workspace_id str
    Workspace ID which the resource belongs to. This workspace must be part of the account which the provider is configured with.
    workspaceId String
    Workspace ID which the resource belongs to. This workspace must be part of the account which the provider is configured with.

    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 logo
    Viewing docs for Databricks v1.109.0
    published on Tuesday, Sep 8, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial