@pulumi/databricks
Version:
A Pulumi package for creating and managing databricks cloud resources.
136 lines • 6.23 kB
JavaScript
;
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.MwsStorageConfigurations = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
* import * as databricks from "@pulumi/databricks";
*
* const config = new pulumi.Config();
* // Account Id that could be found in the top right corner of https://accounts.cloud.databricks.com/
* const databricksAccountId = config.requireObject<any>("databricksAccountId");
* const rootStorageBucket = new aws.s3.BucketV2("root_storage_bucket", {
* bucket: `${prefix}-rootbucket`,
* acl: "private",
* });
* const rootVersioning = new aws.s3.BucketVersioningV2("root_versioning", {
* bucket: rootStorageBucket.id,
* versioningConfiguration: {
* status: "Disabled",
* },
* });
* const _this = new databricks.MwsStorageConfigurations("this", {
* accountId: databricksAccountId,
* storageConfigurationName: `${prefix}-storage`,
* bucketName: rootStorageBucket.bucket,
* });
* ```
*
* ## Related Resources
*
* The following resources are used in the same context:
*
* * Provisioning Databricks on AWS guide.
* * Provisioning Databricks on AWS with Private Link guide.
* * databricks.MwsCredentials to configure the cross-account role for creation of new workspaces within AWS.
* * databricks.MwsCustomerManagedKeys to configure KMS keys for new workspaces within AWS.
* * databricks.MwsLogDelivery to configure delivery of [billable usage logs](https://docs.databricks.com/administration-guide/account-settings/billable-usage-delivery.html) and [audit logs](https://docs.databricks.com/administration-guide/account-settings/audit-logs.html).
* * databricks.MwsNetworks to [configure VPC](https://docs.databricks.com/administration-guide/cloud-configurations/aws/customer-managed-vpc.html) & subnets for new workspaces within AWS.
* * databricks.MwsWorkspaces to set up [AWS and GCP workspaces](https://docs.databricks.com/getting-started/overview.html#e2-architecture-1).
*
* ## Import
*
* This resource can be imported by Databricks account ID and storage configuration ID.
*
* hcl
*
* import {
*
* to = databricks_mws_storage_configurations.this
*
* id = "<account_id>/<storage_configuration_id>"
*
* }
*
* Alternatively, when using `terraform` version 1.4 or earlier, import using the `pulumi import` command:
*
* bash
*
* ```sh
* $ pulumi import databricks:index/mwsStorageConfigurations:MwsStorageConfigurations this "<account_id>/<storage_configuration_id>"
* ```
*
* ~> This resource does not support updates. If your configuration does not match the existing resource,
*
* the next `pulumi up` will cause the resource to be destroyed and recreated. After importing,
*
* verify that the configuration matches the existing resource by running `pulumi preview`.
*/
class MwsStorageConfigurations extends pulumi.CustomResource {
/**
* Get an existing MwsStorageConfigurations 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, id, state, opts) {
return new MwsStorageConfigurations(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of MwsStorageConfigurations. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj) {
if (obj === undefined || obj === null) {
return false;
}
return obj['__pulumiType'] === MwsStorageConfigurations.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["accountId"] = state?.accountId;
resourceInputs["bucketName"] = state?.bucketName;
resourceInputs["creationTime"] = state?.creationTime;
resourceInputs["storageConfigurationId"] = state?.storageConfigurationId;
resourceInputs["storageConfigurationName"] = state?.storageConfigurationName;
}
else {
const args = argsOrState;
if (args?.accountId === undefined && !opts.urn) {
throw new Error("Missing required property 'accountId'");
}
if (args?.bucketName === undefined && !opts.urn) {
throw new Error("Missing required property 'bucketName'");
}
if (args?.storageConfigurationName === undefined && !opts.urn) {
throw new Error("Missing required property 'storageConfigurationName'");
}
resourceInputs["accountId"] = args?.accountId ? pulumi.secret(args.accountId) : undefined;
resourceInputs["bucketName"] = args?.bucketName;
resourceInputs["storageConfigurationName"] = args?.storageConfigurationName;
resourceInputs["creationTime"] = undefined /*out*/;
resourceInputs["storageConfigurationId"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
const secretOpts = { additionalSecretOutputs: ["accountId"] };
opts = pulumi.mergeOptions(opts, secretOpts);
super(MwsStorageConfigurations.__pulumiType, name, resourceInputs, opts);
}
}
exports.MwsStorageConfigurations = MwsStorageConfigurations;
/** @internal */
MwsStorageConfigurations.__pulumiType = 'databricks:index/mwsStorageConfigurations:MwsStorageConfigurations';
//# sourceMappingURL=mwsStorageConfigurations.js.map