UNPKG

@pulumi/databricks

Version:

A Pulumi package for creating and managing databricks cloud resources.

155 lines 7.91 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.MwsPrivateAccessSettings = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * Allows you to create a Private Access Setting resource that can be used as part of a databricks.MwsWorkspaces resource to create a [Databricks Workspace that leverages AWS PrivateLink](https://docs.databricks.com/administration-guide/cloud-configurations/aws/privatelink.html) or [GCP Private Service Connect](https://docs.gcp.databricks.com/administration-guide/cloud-configurations/gcp/private-service-connect.html) * * It is strongly recommended that customers read the [Enable AWS Private Link](https://docs.databricks.com/administration-guide/cloud-configurations/aws/privatelink.html) [Enable GCP Private Service Connect](https://docs.gcp.databricks.com/administration-guide/cloud-configurations/gcp/private-service-connect.html) documentation before trying to leverage this resource. * * ## Databricks on AWS usage * * > Initialize provider with `alias = "mws"`, `host = "https://accounts.cloud.databricks.com"` and use `provider = databricks.mws` * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as databricks from "@pulumi/databricks"; * * const pas = new databricks.MwsPrivateAccessSettings("pas", { * accountId: databricksAccountId, * privateAccessSettingsName: `Private Access Settings for ${prefix}`, * region: region, * publicAccessEnabled: true, * }); * ``` * * The `databricks_mws_private_access_settings.pas.private_access_settings_id` can then be used as part of a databricks.MwsWorkspaces resource: * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as databricks from "@pulumi/databricks"; * * const _this = new databricks.MwsWorkspaces("this", { * awsRegion: region, * workspaceName: prefix, * credentialsId: thisDatabricksMwsCredentials.credentialsId, * storageConfigurationId: thisDatabricksMwsStorageConfigurations.storageConfigurationId, * networkId: thisDatabricksMwsNetworks.networkId, * privateAccessSettingsId: pas.privateAccessSettingsId, * pricingTier: "ENTERPRISE", * }, { * dependsOn: [thisDatabricksMwsNetworks], * }); * ``` * * ## Databricks on GCP usage * * > Initialize provider with `alias = "mws"`, `host = "https://accounts.gcp.databricks.com"` and use `provider = databricks.mws` * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as databricks from "@pulumi/databricks"; * * const _this = new databricks.MwsWorkspaces("this", { * workspaceName: "gcp-workspace", * location: subnetRegion, * cloudResourceContainer: { * gcp: { * projectId: googleProject, * }, * }, * gkeConfig: { * connectivityType: "PRIVATE_NODE_PUBLIC_MASTER", * masterIpRange: "10.3.0.0/28", * }, * networkId: thisDatabricksMwsNetworks.networkId, * privateAccessSettingsId: pas.privateAccessSettingsId, * pricingTier: "PREMIUM", * }, { * dependsOn: [thisDatabricksMwsNetworks], * }); * ``` * * ## Related Resources * * The following resources are used in the same context: * * * Provisioning Databricks on AWS guide. * * Provisioning Databricks on AWS with Private Link guide. * * Provisioning AWS Databricks workspaces with a Hub & Spoke firewall for data exfiltration protection guide. * * Provisioning Databricks workspaces on GCP with Private Service Connect guide. * * databricks.MwsVpcEndpoint to register awsVpcEndpoint resources with Databricks such that they can be used as part of a databricks.MwsNetworks configuration. * * 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 private access settings ID. * * ```sh * $ pulumi import databricks:index/mwsPrivateAccessSettings:MwsPrivateAccessSettings this '<account_id>/<private_access_settings_id>' * ``` */ class MwsPrivateAccessSettings extends pulumi.CustomResource { /** * Get an existing MwsPrivateAccessSettings 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 MwsPrivateAccessSettings(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of MwsPrivateAccessSettings. 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'] === MwsPrivateAccessSettings.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["accountId"] = state ? state.accountId : undefined; resourceInputs["allowedVpcEndpointIds"] = state ? state.allowedVpcEndpointIds : undefined; resourceInputs["privateAccessLevel"] = state ? state.privateAccessLevel : undefined; resourceInputs["privateAccessSettingsId"] = state ? state.privateAccessSettingsId : undefined; resourceInputs["privateAccessSettingsName"] = state ? state.privateAccessSettingsName : undefined; resourceInputs["publicAccessEnabled"] = state ? state.publicAccessEnabled : undefined; resourceInputs["region"] = state ? state.region : undefined; } else { const args = argsOrState; if ((!args || args.privateAccessSettingsName === undefined) && !opts.urn) { throw new Error("Missing required property 'privateAccessSettingsName'"); } if ((!args || args.region === undefined) && !opts.urn) { throw new Error("Missing required property 'region'"); } resourceInputs["accountId"] = args ? args.accountId : undefined; resourceInputs["allowedVpcEndpointIds"] = args ? args.allowedVpcEndpointIds : undefined; resourceInputs["privateAccessLevel"] = args ? args.privateAccessLevel : undefined; resourceInputs["privateAccessSettingsId"] = args ? args.privateAccessSettingsId : undefined; resourceInputs["privateAccessSettingsName"] = args ? args.privateAccessSettingsName : undefined; resourceInputs["publicAccessEnabled"] = args ? args.publicAccessEnabled : undefined; resourceInputs["region"] = args ? args.region : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(MwsPrivateAccessSettings.__pulumiType, name, resourceInputs, opts); } } exports.MwsPrivateAccessSettings = MwsPrivateAccessSettings; /** @internal */ MwsPrivateAccessSettings.__pulumiType = 'databricks:index/mwsPrivateAccessSettings:MwsPrivateAccessSettings'; //# sourceMappingURL=mwsPrivateAccessSettings.js.map