published on Tuesday, Sep 8, 2026 by Pulumi
published on Tuesday, Sep 8, 2026 by Pulumi
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:
- Account
Sp stringStatus - 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 WorkspaceIam Service Principal V2Provider Config - Configure the provider for management through account provider.
- Account
Sp stringStatus - 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 WorkspaceIam Service Principal V2Provider Config Args - Configure the provider for management through account provider.
- account_
sp_ stringstatus - 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.
- account
Sp StringStatus - 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 WorkspaceIam Service Principal V2Provider Config - Configure the provider for management through account provider.
- account
Sp stringStatus - 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 WorkspaceIam Service Principal V2Provider Config - Configure the provider for management through account provider.
- account_
sp_ strstatus - 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 WorkspaceIam Service Principal V2Provider Config Args - Configure the provider for management through account provider.
- account
Sp StringStatus - 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 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:
- 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 stringId - (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 stringId - (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_ stringid - (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 StringId - (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 stringId - (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_ strid - (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 StringId - (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) -> WorkspaceIamServicePrincipalV2func 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.
- Account
Id string - (string) - The parent account ID for the service principal in Databricks
- Account
Sp stringStatus - 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 WorkspaceIam Service Principal V2Provider Config - Configure the provider for management through account provider.
- Service
Principal stringId - (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 stringStatus - 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 WorkspaceIam Service Principal V2Provider Config Args - Configure the provider for management through account provider.
- Service
Principal stringId - (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_ stringstatus - 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_ stringid - (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 StringStatus - 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 WorkspaceIam Service Principal V2Provider Config - Configure the provider for management through account provider.
- service
Principal StringId - (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 stringStatus - 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 WorkspaceIam Service Principal V2Provider Config - Configure the provider for management through account provider.
- service
Principal stringId - (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_ strstatus - 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 WorkspaceIam Service Principal V2Provider Config Args - Configure the provider for management through account provider.
- service_
principal_ strid - (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 StringStatus - 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 Property Map - Configure the provider for management through account provider.
- service
Principal StringId - (string) - Internal service principal ID of the service principal in Databricks
Supporting Types
WorkspaceIamServicePrincipalV2ProviderConfig, WorkspaceIamServicePrincipalV2ProviderConfigArgs
- Workspace
Id 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.
- workspace_
id 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.
- workspace
Id 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.
- workspace
Id 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
databricksTerraform Provider.
published on Tuesday, Sep 8, 2026 by Pulumi