UNPKG

@pulumi/databricks

Version:

A Pulumi package for creating and managing databricks cloud resources.

134 lines 5.31 kB
"use strict"; // *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.getCurrentConfigOutput = exports.getCurrentConfig = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * Retrieves information about the currently configured provider to make a decision, for example, add a dynamic block based on the specific cloud. * * ## Example Usage * * Create cloud-specific databricks_storage_credential: * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as databricks from "@pulumi/databricks"; * * function singleOrNone<T>(elements: pulumi.Input<T>[]): pulumi.Input<T> { * if (elements.length != 1) { * throw new Error("singleOrNone expected input list to have a single element"); * } * return elements[0]; * } * * const _this = databricks.getCurrentConfig({}); * const external = new databricks.StorageCredential("external", { * awsIamRole: singleOrNone(.map(entry => ({ * roleArn: cloudCredentialId, * }))), * azureManagedIdentity: singleOrNone(.map(entry => ({ * accessConnectorId: cloudCredentialId, * }))), * databricksGcpServiceAccount: singleOrNone(.map(entry => ({}))), * name: "storage_cred", * comment: "Managed by TF", * }); * ``` * * ## Exported attributes * * Data source exposes the following attributes: * * * `isAccount` - Whether the provider is configured at account-level * * `accountId` - Account Id if provider is configured at account-level * * `host` - Host of the Databricks workspace or account console * * `cloudType` - Cloud type specified in the provider * * `authType` - Auth type used by the provider * * ## Related Resources * * The following resources are used in the same context: * * * End to end workspace management guide * * databricks.Directory to manage directories in [Databricks Workpace](https://docs.databricks.com/workspace/workspace-objects.html). * * databricks.Notebook to manage [Databricks Notebooks](https://docs.databricks.com/notebooks/index.html). * * databricks.Repo to manage [Databricks Repos](https://docs.databricks.com/repos.html). */ function getCurrentConfig(args, opts) { args = args || {}; opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invoke("databricks:index/getCurrentConfig:getCurrentConfig", { "accountId": args.accountId, "authType": args.authType, "cloudType": args.cloudType, "host": args.host, "isAccount": args.isAccount, }, opts); } exports.getCurrentConfig = getCurrentConfig; /** * Retrieves information about the currently configured provider to make a decision, for example, add a dynamic block based on the specific cloud. * * ## Example Usage * * Create cloud-specific databricks_storage_credential: * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as databricks from "@pulumi/databricks"; * * function singleOrNone<T>(elements: pulumi.Input<T>[]): pulumi.Input<T> { * if (elements.length != 1) { * throw new Error("singleOrNone expected input list to have a single element"); * } * return elements[0]; * } * * const _this = databricks.getCurrentConfig({}); * const external = new databricks.StorageCredential("external", { * awsIamRole: singleOrNone(.map(entry => ({ * roleArn: cloudCredentialId, * }))), * azureManagedIdentity: singleOrNone(.map(entry => ({ * accessConnectorId: cloudCredentialId, * }))), * databricksGcpServiceAccount: singleOrNone(.map(entry => ({}))), * name: "storage_cred", * comment: "Managed by TF", * }); * ``` * * ## Exported attributes * * Data source exposes the following attributes: * * * `isAccount` - Whether the provider is configured at account-level * * `accountId` - Account Id if provider is configured at account-level * * `host` - Host of the Databricks workspace or account console * * `cloudType` - Cloud type specified in the provider * * `authType` - Auth type used by the provider * * ## Related Resources * * The following resources are used in the same context: * * * End to end workspace management guide * * databricks.Directory to manage directories in [Databricks Workpace](https://docs.databricks.com/workspace/workspace-objects.html). * * databricks.Notebook to manage [Databricks Notebooks](https://docs.databricks.com/notebooks/index.html). * * databricks.Repo to manage [Databricks Repos](https://docs.databricks.com/repos.html). */ function getCurrentConfigOutput(args, opts) { args = args || {}; opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invokeOutput("databricks:index/getCurrentConfig:getCurrentConfig", { "accountId": args.accountId, "authType": args.authType, "cloudType": args.cloudType, "host": args.host, "isAccount": args.isAccount, }, opts); } exports.getCurrentConfigOutput = getCurrentConfigOutput; //# sourceMappingURL=getCurrentConfig.js.map