@pulumi/databricks
Version:
A Pulumi package for creating and managing databricks cloud resources.
191 lines (190 loc) • 7.93 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* > **Note** If you have a fully automated setup with workspaces created by databricks.MwsWorkspaces or azurerm_databricks_workspace, please make sure to add dependsOn attribute in order to prevent _default auth: cannot configure default credentials_ errors.
*
* Retrieves information about databricks_service_principal.
*
* ## Example Usage
*
* Adding service principal `11111111-2222-3333-4444-555666777888` to administrative group
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as databricks from "@pulumi/databricks";
*
* const admins = databricks.getGroup({
* displayName: "admins",
* });
* const spn = databricks.getServicePrincipal({
* applicationId: "11111111-2222-3333-4444-555666777888",
* });
* const myMemberA = new databricks.GroupMember("my_member_a", {
* groupId: admins.then(admins => admins.id),
* memberId: spn.then(spn => spn.id),
* });
* ```
*
* ## Related Resources
*
* The following resources are used in the same context:
*
* - End to end workspace management guide.
* - databricks.getCurrentUser data to retrieve information about databricks.User or databricks_service_principal, that is calling Databricks REST API.
* - databricks.Group to manage [groups in Databricks Workspace](https://docs.databricks.com/administration-guide/users-groups/groups.html) or [Account Console](https://accounts.cloud.databricks.com/) (for AWS deployments).
* - databricks.Group data to retrieve information about databricks.Group members, entitlements and instance profiles.
* - databricks.GroupInstanceProfile to attach databricks.InstanceProfile (AWS) to databricks_group.
* - databricks.GroupMember to attach users and groups as group members.
* - databricks.Permissions to manage [access control](https://docs.databricks.com/security/access-control/index.html) in Databricks workspace.
* - databricksService principal to manage service principals
*/
export declare function getServicePrincipal(args?: GetServicePrincipalArgs, opts?: pulumi.InvokeOptions): Promise<GetServicePrincipalResult>;
/**
* A collection of arguments for invoking getServicePrincipal.
*/
export interface GetServicePrincipalArgs {
/**
* identifier for use in databricks_access_control_rule_set, e.g. `servicePrincipals/00000000-0000-0000-0000-000000000000`.
*/
aclPrincipalId?: string;
/**
* Whether service principal is active or not.
*/
active?: boolean;
/**
* ID of the service principal. The service principal must exist before this resource can be retrieved.
*/
applicationId?: string;
/**
* Exact display name of the service principal. The service principal must exist before this resource can be retrieved. In case if there are several service principals with the same name, an error is thrown.
*/
displayName?: string;
/**
* ID of the service principal in an external identity provider.
*/
externalId?: string;
/**
* Home folder of the service principal, e.g. `/Users/11111111-2222-3333-4444-555666777888`.
*/
home?: string;
/**
* The id of the service principal.
*/
id?: string;
/**
* Repos location of the service principal, e.g. `/Repos/11111111-2222-3333-4444-555666777888`.
*/
repos?: string;
spId?: string;
}
/**
* A collection of values returned by getServicePrincipal.
*/
export interface GetServicePrincipalResult {
/**
* identifier for use in databricks_access_control_rule_set, e.g. `servicePrincipals/00000000-0000-0000-0000-000000000000`.
*/
readonly aclPrincipalId: string;
/**
* Whether service principal is active or not.
*/
readonly active: boolean;
readonly applicationId: string;
/**
* Display name of the service principal, e.g. `Foo SPN`.
*/
readonly displayName: string;
/**
* ID of the service principal in an external identity provider.
*/
readonly externalId: string;
/**
* Home folder of the service principal, e.g. `/Users/11111111-2222-3333-4444-555666777888`.
*/
readonly home: string;
/**
* The id of the service principal.
*/
readonly id: string;
/**
* Repos location of the service principal, e.g. `/Repos/11111111-2222-3333-4444-555666777888`.
*/
readonly repos: string;
readonly spId: string;
}
/**
* > **Note** If you have a fully automated setup with workspaces created by databricks.MwsWorkspaces or azurerm_databricks_workspace, please make sure to add dependsOn attribute in order to prevent _default auth: cannot configure default credentials_ errors.
*
* Retrieves information about databricks_service_principal.
*
* ## Example Usage
*
* Adding service principal `11111111-2222-3333-4444-555666777888` to administrative group
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as databricks from "@pulumi/databricks";
*
* const admins = databricks.getGroup({
* displayName: "admins",
* });
* const spn = databricks.getServicePrincipal({
* applicationId: "11111111-2222-3333-4444-555666777888",
* });
* const myMemberA = new databricks.GroupMember("my_member_a", {
* groupId: admins.then(admins => admins.id),
* memberId: spn.then(spn => spn.id),
* });
* ```
*
* ## Related Resources
*
* The following resources are used in the same context:
*
* - End to end workspace management guide.
* - databricks.getCurrentUser data to retrieve information about databricks.User or databricks_service_principal, that is calling Databricks REST API.
* - databricks.Group to manage [groups in Databricks Workspace](https://docs.databricks.com/administration-guide/users-groups/groups.html) or [Account Console](https://accounts.cloud.databricks.com/) (for AWS deployments).
* - databricks.Group data to retrieve information about databricks.Group members, entitlements and instance profiles.
* - databricks.GroupInstanceProfile to attach databricks.InstanceProfile (AWS) to databricks_group.
* - databricks.GroupMember to attach users and groups as group members.
* - databricks.Permissions to manage [access control](https://docs.databricks.com/security/access-control/index.html) in Databricks workspace.
* - databricksService principal to manage service principals
*/
export declare function getServicePrincipalOutput(args?: GetServicePrincipalOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetServicePrincipalResult>;
/**
* A collection of arguments for invoking getServicePrincipal.
*/
export interface GetServicePrincipalOutputArgs {
/**
* identifier for use in databricks_access_control_rule_set, e.g. `servicePrincipals/00000000-0000-0000-0000-000000000000`.
*/
aclPrincipalId?: pulumi.Input<string>;
/**
* Whether service principal is active or not.
*/
active?: pulumi.Input<boolean>;
/**
* ID of the service principal. The service principal must exist before this resource can be retrieved.
*/
applicationId?: pulumi.Input<string>;
/**
* Exact display name of the service principal. The service principal must exist before this resource can be retrieved. In case if there are several service principals with the same name, an error is thrown.
*/
displayName?: pulumi.Input<string>;
/**
* ID of the service principal in an external identity provider.
*/
externalId?: pulumi.Input<string>;
/**
* Home folder of the service principal, e.g. `/Users/11111111-2222-3333-4444-555666777888`.
*/
home?: pulumi.Input<string>;
/**
* The id of the service principal.
*/
id?: pulumi.Input<string>;
/**
* Repos location of the service principal, e.g. `/Repos/11111111-2222-3333-4444-555666777888`.
*/
repos?: pulumi.Input<string>;
spId?: pulumi.Input<string>;
}