databricks.MwsStorageConfigurations
Explore with Pulumi AI
Example Usage
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("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,
});
import pulumi
import pulumi_aws as aws
import pulumi_databricks as databricks
config = pulumi.Config()
# Account Id that could be found in the top right corner of https://accounts.cloud.databricks.com/
databricks_account_id = config.require_object("databricksAccountId")
root_storage_bucket = aws.s3.BucketV2("root_storage_bucket",
bucket=f"{prefix}-rootbucket",
acl="private")
root_versioning = aws.s3.BucketVersioningV2("root_versioning",
bucket=root_storage_bucket.id,
versioning_configuration={
"status": "Disabled",
})
this = databricks.MwsStorageConfigurations("this",
account_id=databricks_account_id,
storage_configuration_name=f"{prefix}-storage",
bucket_name=root_storage_bucket.bucket)
package main
import (
"fmt"
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3"
"github.com/pulumi/pulumi-databricks/sdk/go/databricks"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
// Account Id that could be found in the top right corner of https://accounts.cloud.databricks.com/
databricksAccountId := cfg.RequireObject("databricksAccountId")
rootStorageBucket, err := s3.NewBucketV2(ctx, "root_storage_bucket", &s3.BucketV2Args{
Bucket: pulumi.Sprintf("%v-rootbucket", prefix),
Acl: pulumi.String("private"),
})
if err != nil {
return err
}
_, err = s3.NewBucketVersioningV2(ctx, "root_versioning", &s3.BucketVersioningV2Args{
Bucket: rootStorageBucket.ID(),
VersioningConfiguration: &s3.BucketVersioningV2VersioningConfigurationArgs{
Status: pulumi.String("Disabled"),
},
})
if err != nil {
return err
}
_, err = databricks.NewMwsStorageConfigurations(ctx, "this", &databricks.MwsStorageConfigurationsArgs{
AccountId: pulumi.Any(databricksAccountId),
StorageConfigurationName: pulumi.Sprintf("%v-storage", prefix),
BucketName: rootStorageBucket.Bucket,
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
using Databricks = Pulumi.Databricks;
return await Deployment.RunAsync(() =>
{
var config = new Config();
// Account Id that could be found in the top right corner of https://accounts.cloud.databricks.com/
var databricksAccountId = config.RequireObject<dynamic>("databricksAccountId");
var rootStorageBucket = new Aws.S3.BucketV2("root_storage_bucket", new()
{
Bucket = $"{prefix}-rootbucket",
Acl = "private",
});
var rootVersioning = new Aws.S3.BucketVersioningV2("root_versioning", new()
{
Bucket = rootStorageBucket.Id,
VersioningConfiguration = new Aws.S3.Inputs.BucketVersioningV2VersioningConfigurationArgs
{
Status = "Disabled",
},
});
var @this = new Databricks.MwsStorageConfigurations("this", new()
{
AccountId = databricksAccountId,
StorageConfigurationName = $"{prefix}-storage",
BucketName = rootStorageBucket.Bucket,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.s3.BucketV2;
import com.pulumi.aws.s3.BucketV2Args;
import com.pulumi.aws.s3.BucketVersioningV2;
import com.pulumi.aws.s3.BucketVersioningV2Args;
import com.pulumi.aws.s3.inputs.BucketVersioningV2VersioningConfigurationArgs;
import com.pulumi.databricks.MwsStorageConfigurations;
import com.pulumi.databricks.MwsStorageConfigurationsArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var config = ctx.config();
final var databricksAccountId = config.get("databricksAccountId");
var rootStorageBucket = new BucketV2("rootStorageBucket", BucketV2Args.builder()
.bucket(String.format("%s-rootbucket", prefix))
.acl("private")
.build());
var rootVersioning = new BucketVersioningV2("rootVersioning", BucketVersioningV2Args.builder()
.bucket(rootStorageBucket.id())
.versioningConfiguration(BucketVersioningV2VersioningConfigurationArgs.builder()
.status("Disabled")
.build())
.build());
var this_ = new MwsStorageConfigurations("this", MwsStorageConfigurationsArgs.builder()
.accountId(databricksAccountId)
.storageConfigurationName(String.format("%s-storage", prefix))
.bucketName(rootStorageBucket.bucket())
.build());
}
}
configuration:
databricksAccountId:
type: dynamic
resources:
rootStorageBucket:
type: aws:s3:BucketV2
name: root_storage_bucket
properties:
bucket: ${prefix}-rootbucket
acl: private
rootVersioning:
type: aws:s3:BucketVersioningV2
name: root_versioning
properties:
bucket: ${rootStorageBucket.id}
versioningConfiguration:
status: Disabled
this:
type: databricks:MwsStorageConfigurations
properties:
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 and audit logs.
- databricks.MwsNetworks to configure VPC & subnets for new workspaces within AWS.
- databricks.MwsWorkspaces to set up AWS and GCP workspaces.
Create MwsStorageConfigurations Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new MwsStorageConfigurations(name: string, args: MwsStorageConfigurationsArgs, opts?: CustomResourceOptions);
@overload
def MwsStorageConfigurations(resource_name: str,
args: MwsStorageConfigurationsArgs,
opts: Optional[ResourceOptions] = None)
@overload
def MwsStorageConfigurations(resource_name: str,
opts: Optional[ResourceOptions] = None,
account_id: Optional[str] = None,
bucket_name: Optional[str] = None,
storage_configuration_name: Optional[str] = None)
func NewMwsStorageConfigurations(ctx *Context, name string, args MwsStorageConfigurationsArgs, opts ...ResourceOption) (*MwsStorageConfigurations, error)
public MwsStorageConfigurations(string name, MwsStorageConfigurationsArgs args, CustomResourceOptions? opts = null)
public MwsStorageConfigurations(String name, MwsStorageConfigurationsArgs args)
public MwsStorageConfigurations(String name, MwsStorageConfigurationsArgs args, CustomResourceOptions options)
type: databricks:MwsStorageConfigurations
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args MwsStorageConfigurationsArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args MwsStorageConfigurationsArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args MwsStorageConfigurationsArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args MwsStorageConfigurationsArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args MwsStorageConfigurationsArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var mwsStorageConfigurationsResource = new Databricks.MwsStorageConfigurations("mwsStorageConfigurationsResource", new()
{
AccountId = "string",
BucketName = "string",
StorageConfigurationName = "string",
});
example, err := databricks.NewMwsStorageConfigurations(ctx, "mwsStorageConfigurationsResource", &databricks.MwsStorageConfigurationsArgs{
AccountId: pulumi.String("string"),
BucketName: pulumi.String("string"),
StorageConfigurationName: pulumi.String("string"),
})
var mwsStorageConfigurationsResource = new MwsStorageConfigurations("mwsStorageConfigurationsResource", MwsStorageConfigurationsArgs.builder()
.accountId("string")
.bucketName("string")
.storageConfigurationName("string")
.build());
mws_storage_configurations_resource = databricks.MwsStorageConfigurations("mwsStorageConfigurationsResource",
account_id="string",
bucket_name="string",
storage_configuration_name="string")
const mwsStorageConfigurationsResource = new databricks.MwsStorageConfigurations("mwsStorageConfigurationsResource", {
accountId: "string",
bucketName: "string",
storageConfigurationName: "string",
});
type: databricks:MwsStorageConfigurations
properties:
accountId: string
bucketName: string
storageConfigurationName: string
MwsStorageConfigurations Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The MwsStorageConfigurations resource accepts the following input properties:
- Account
Id string - Account Id that could be found in the top right corner of Accounts Console
- Bucket
Name string - name of AWS S3 bucket
- Storage
Configuration stringName - name under which this storage configuration is stored
- Account
Id string - Account Id that could be found in the top right corner of Accounts Console
- Bucket
Name string - name of AWS S3 bucket
- Storage
Configuration stringName - name under which this storage configuration is stored
- account
Id String - Account Id that could be found in the top right corner of Accounts Console
- bucket
Name String - name of AWS S3 bucket
- storage
Configuration StringName - name under which this storage configuration is stored
- account
Id string - Account Id that could be found in the top right corner of Accounts Console
- bucket
Name string - name of AWS S3 bucket
- storage
Configuration stringName - name under which this storage configuration is stored
- account_
id str - Account Id that could be found in the top right corner of Accounts Console
- bucket_
name str - name of AWS S3 bucket
- storage_
configuration_ strname - name under which this storage configuration is stored
- account
Id String - Account Id that could be found in the top right corner of Accounts Console
- bucket
Name String - name of AWS S3 bucket
- storage
Configuration StringName - name under which this storage configuration is stored
Outputs
All input properties are implicitly available as output properties. Additionally, the MwsStorageConfigurations resource produces the following output properties:
- Creation
Time int - Id string
- The provider-assigned unique ID for this managed resource.
- Storage
Configuration stringId - (String) id of storage config to be used for
databricks_mws_workspace
resource.
- Creation
Time int - Id string
- The provider-assigned unique ID for this managed resource.
- Storage
Configuration stringId - (String) id of storage config to be used for
databricks_mws_workspace
resource.
- creation
Time Integer - id String
- The provider-assigned unique ID for this managed resource.
- storage
Configuration StringId - (String) id of storage config to be used for
databricks_mws_workspace
resource.
- creation
Time number - id string
- The provider-assigned unique ID for this managed resource.
- storage
Configuration stringId - (String) id of storage config to be used for
databricks_mws_workspace
resource.
- creation_
time int - id str
- The provider-assigned unique ID for this managed resource.
- storage_
configuration_ strid - (String) id of storage config to be used for
databricks_mws_workspace
resource.
- creation
Time Number - id String
- The provider-assigned unique ID for this managed resource.
- storage
Configuration StringId - (String) id of storage config to be used for
databricks_mws_workspace
resource.
Look up Existing MwsStorageConfigurations Resource
Get an existing MwsStorageConfigurations resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: MwsStorageConfigurationsState, opts?: CustomResourceOptions): MwsStorageConfigurations
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
account_id: Optional[str] = None,
bucket_name: Optional[str] = None,
creation_time: Optional[int] = None,
storage_configuration_id: Optional[str] = None,
storage_configuration_name: Optional[str] = None) -> MwsStorageConfigurations
func GetMwsStorageConfigurations(ctx *Context, name string, id IDInput, state *MwsStorageConfigurationsState, opts ...ResourceOption) (*MwsStorageConfigurations, error)
public static MwsStorageConfigurations Get(string name, Input<string> id, MwsStorageConfigurationsState? state, CustomResourceOptions? opts = null)
public static MwsStorageConfigurations get(String name, Output<String> id, MwsStorageConfigurationsState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Account
Id string - Account Id that could be found in the top right corner of Accounts Console
- Bucket
Name string - name of AWS S3 bucket
- Creation
Time int - Storage
Configuration stringId - (String) id of storage config to be used for
databricks_mws_workspace
resource. - Storage
Configuration stringName - name under which this storage configuration is stored
- Account
Id string - Account Id that could be found in the top right corner of Accounts Console
- Bucket
Name string - name of AWS S3 bucket
- Creation
Time int - Storage
Configuration stringId - (String) id of storage config to be used for
databricks_mws_workspace
resource. - Storage
Configuration stringName - name under which this storage configuration is stored
- account
Id String - Account Id that could be found in the top right corner of Accounts Console
- bucket
Name String - name of AWS S3 bucket
- creation
Time Integer - storage
Configuration StringId - (String) id of storage config to be used for
databricks_mws_workspace
resource. - storage
Configuration StringName - name under which this storage configuration is stored
- account
Id string - Account Id that could be found in the top right corner of Accounts Console
- bucket
Name string - name of AWS S3 bucket
- creation
Time number - storage
Configuration stringId - (String) id of storage config to be used for
databricks_mws_workspace
resource. - storage
Configuration stringName - name under which this storage configuration is stored
- account_
id str - Account Id that could be found in the top right corner of Accounts Console
- bucket_
name str - name of AWS S3 bucket
- creation_
time int - storage_
configuration_ strid - (String) id of storage config to be used for
databricks_mws_workspace
resource. - storage_
configuration_ strname - name under which this storage configuration is stored
- account
Id String - Account Id that could be found in the top right corner of Accounts Console
- bucket
Name String - name of AWS S3 bucket
- creation
Time Number - storage
Configuration StringId - (String) id of storage config to be used for
databricks_mws_workspace
resource. - storage
Configuration StringName - name under which this storage configuration is stored
Import
!> Importing this resource is not currently supported.
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- databricks pulumi/pulumi-databricks
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
databricks
Terraform Provider.