UNPKG

@pulumi/databricks

Version:

A Pulumi package for creating and managing databricks cloud resources.

293 lines (292 loc) 11.8 kB
import * as pulumi from "@pulumi/pulumi"; import * as inputs from "./types/input"; import * as outputs from "./types/output"; /** * > This resource can only be used with a workspace-level provider! * * To work with external tables, Unity Catalog introduces two new objects to access and work with external cloud storage: * * - databricks.StorageCredential represent authentication methods to access cloud storage (e.g. an IAM role for Amazon S3 or a service principal for Azure Storage). Storage credentials are access-controlled to determine which users can use the credential. * - `databricks.ExternalLocation` are objects that combine a cloud storage path with a Storage Credential that can be used to access the location. * * ## Example Usage * * For AWS * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as databricks from "@pulumi/databricks"; * * const external = new databricks.StorageCredential("external", { * name: externalDataAccess.name, * awsIamRole: { * roleArn: externalDataAccess.arn, * }, * comment: "Managed by TF", * }); * const some = new databricks.ExternalLocation("some", { * name: "external", * url: `s3://${externalAwsS3Bucket.id}/some`, * credentialName: external.id, * comment: "Managed by TF", * }); * const someGrants = new databricks.Grants("some", { * externalLocation: some.id, * grants: [{ * principal: "Data Engineers", * privileges: [ * "CREATE_EXTERNAL_TABLE", * "READ_FILES", * ], * }], * }); * ``` * * For Azure * * ## Import * * This resource can be imported by `name`: * * bash * * ```sh * $ pulumi import databricks:index/externalLocation:ExternalLocation this <name> * ``` */ export declare class ExternalLocation extends pulumi.CustomResource { /** * Get an existing ExternalLocation resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input<pulumi.ID>, state?: ExternalLocationState, opts?: pulumi.CustomResourceOptions): ExternalLocation; /** * Returns true if the given object is an instance of ExternalLocation. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is ExternalLocation; /** * The ARN of the s3 access point to use with the external location (AWS). */ readonly accessPoint: pulumi.Output<string | undefined>; readonly browseOnly: pulumi.Output<boolean>; /** * User-supplied free-form text. */ readonly comment: pulumi.Output<string | undefined>; /** * Time at which this external location was created, in epoch milliseconds. */ readonly createdAt: pulumi.Output<number>; /** * Username of external location creator. */ readonly createdBy: pulumi.Output<string>; /** * Unique ID of the location's storage credential. */ readonly credentialId: pulumi.Output<string>; /** * Name of the databricks.StorageCredential to use with this external location. */ readonly credentialName: pulumi.Output<string>; /** * The options for Server-Side Encryption to be used by each Databricks s3 client when connecting to S3 cloud storage (AWS). */ readonly encryptionDetails: pulumi.Output<outputs.ExternalLocationEncryptionDetails | undefined>; /** * Indicates whether fallback mode is enabled for this external location. When fallback mode is enabled (disabled by default), the access to the location falls back to cluster credentials if UC credentials are not sufficient. */ readonly fallback: pulumi.Output<boolean | undefined>; /** * Destroy external location regardless of its dependents. */ readonly forceDestroy: pulumi.Output<boolean | undefined>; /** * Update external location regardless of its dependents. */ readonly forceUpdate: pulumi.Output<boolean | undefined>; /** * Whether the external location is accessible from all workspaces or a specific set of workspaces. Can be `ISOLATION_MODE_ISOLATED` or `ISOLATION_MODE_OPEN`. Setting the external location to `ISOLATION_MODE_ISOLATED` will automatically allow access from the current workspace. */ readonly isolationMode: pulumi.Output<string>; readonly metastoreId: pulumi.Output<string>; /** * Name of External Location, which must be unique within the databricks_metastore. Change forces creation of a new resource. */ readonly name: pulumi.Output<string>; /** * Username/groupname/sp applicationId of the external location owner. */ readonly owner: pulumi.Output<string>; /** * Indicates whether the external location is read-only. */ readonly readOnly: pulumi.Output<boolean | undefined>; /** * Suppress validation errors if any & force save the external location */ readonly skipValidation: pulumi.Output<boolean | undefined>; /** * Time at which external location this was last modified, in epoch milliseconds. */ readonly updatedAt: pulumi.Output<number>; /** * Username of user who last modified the external location. */ readonly updatedBy: pulumi.Output<string>; /** * Path URL in cloud storage, of the form: `s3://[bucket-host]/[bucket-dir]` (AWS), `abfss://[user]@[host]/[path]` (Azure), `gs://[bucket-host]/[bucket-dir]` (GCP). */ readonly url: pulumi.Output<string>; /** * Create a ExternalLocation resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: ExternalLocationArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering ExternalLocation resources. */ export interface ExternalLocationState { /** * The ARN of the s3 access point to use with the external location (AWS). */ accessPoint?: pulumi.Input<string>; browseOnly?: pulumi.Input<boolean>; /** * User-supplied free-form text. */ comment?: pulumi.Input<string>; /** * Time at which this external location was created, in epoch milliseconds. */ createdAt?: pulumi.Input<number>; /** * Username of external location creator. */ createdBy?: pulumi.Input<string>; /** * Unique ID of the location's storage credential. */ credentialId?: pulumi.Input<string>; /** * Name of the databricks.StorageCredential to use with this external location. */ credentialName?: pulumi.Input<string>; /** * The options for Server-Side Encryption to be used by each Databricks s3 client when connecting to S3 cloud storage (AWS). */ encryptionDetails?: pulumi.Input<inputs.ExternalLocationEncryptionDetails>; /** * Indicates whether fallback mode is enabled for this external location. When fallback mode is enabled (disabled by default), the access to the location falls back to cluster credentials if UC credentials are not sufficient. */ fallback?: pulumi.Input<boolean>; /** * Destroy external location regardless of its dependents. */ forceDestroy?: pulumi.Input<boolean>; /** * Update external location regardless of its dependents. */ forceUpdate?: pulumi.Input<boolean>; /** * Whether the external location is accessible from all workspaces or a specific set of workspaces. Can be `ISOLATION_MODE_ISOLATED` or `ISOLATION_MODE_OPEN`. Setting the external location to `ISOLATION_MODE_ISOLATED` will automatically allow access from the current workspace. */ isolationMode?: pulumi.Input<string>; metastoreId?: pulumi.Input<string>; /** * Name of External Location, which must be unique within the databricks_metastore. Change forces creation of a new resource. */ name?: pulumi.Input<string>; /** * Username/groupname/sp applicationId of the external location owner. */ owner?: pulumi.Input<string>; /** * Indicates whether the external location is read-only. */ readOnly?: pulumi.Input<boolean>; /** * Suppress validation errors if any & force save the external location */ skipValidation?: pulumi.Input<boolean>; /** * Time at which external location this was last modified, in epoch milliseconds. */ updatedAt?: pulumi.Input<number>; /** * Username of user who last modified the external location. */ updatedBy?: pulumi.Input<string>; /** * Path URL in cloud storage, of the form: `s3://[bucket-host]/[bucket-dir]` (AWS), `abfss://[user]@[host]/[path]` (Azure), `gs://[bucket-host]/[bucket-dir]` (GCP). */ url?: pulumi.Input<string>; } /** * The set of arguments for constructing a ExternalLocation resource. */ export interface ExternalLocationArgs { /** * The ARN of the s3 access point to use with the external location (AWS). */ accessPoint?: pulumi.Input<string>; /** * User-supplied free-form text. */ comment?: pulumi.Input<string>; /** * Name of the databricks.StorageCredential to use with this external location. */ credentialName: pulumi.Input<string>; /** * The options for Server-Side Encryption to be used by each Databricks s3 client when connecting to S3 cloud storage (AWS). */ encryptionDetails?: pulumi.Input<inputs.ExternalLocationEncryptionDetails>; /** * Indicates whether fallback mode is enabled for this external location. When fallback mode is enabled (disabled by default), the access to the location falls back to cluster credentials if UC credentials are not sufficient. */ fallback?: pulumi.Input<boolean>; /** * Destroy external location regardless of its dependents. */ forceDestroy?: pulumi.Input<boolean>; /** * Update external location regardless of its dependents. */ forceUpdate?: pulumi.Input<boolean>; /** * Whether the external location is accessible from all workspaces or a specific set of workspaces. Can be `ISOLATION_MODE_ISOLATED` or `ISOLATION_MODE_OPEN`. Setting the external location to `ISOLATION_MODE_ISOLATED` will automatically allow access from the current workspace. */ isolationMode?: pulumi.Input<string>; metastoreId?: pulumi.Input<string>; /** * Name of External Location, which must be unique within the databricks_metastore. Change forces creation of a new resource. */ name?: pulumi.Input<string>; /** * Username/groupname/sp applicationId of the external location owner. */ owner?: pulumi.Input<string>; /** * Indicates whether the external location is read-only. */ readOnly?: pulumi.Input<boolean>; /** * Suppress validation errors if any & force save the external location */ skipValidation?: pulumi.Input<boolean>; /** * Path URL in cloud storage, of the form: `s3://[bucket-host]/[bucket-dir]` (AWS), `abfss://[user]@[host]/[path]` (Azure), `gs://[bucket-host]/[bucket-dir]` (GCP). */ url: pulumi.Input<string>; }