databricks.MwsStorageConfigurations

Explore with Pulumi AI

The following resources are used in the same context:

  • Provisioning Databricks on AWS guide.
  • Provisioning Databricks on AWS with PrivateLink 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 workspaces in E2 architecture on AWS.

Example Usage

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();
    var databricksAccountId = config.RequireObject<dynamic>("databricksAccountId");
    var rootStorageBucket = new Aws.S3.BucketV2("rootStorageBucket", new()
    {
        Acl = "private",
        Versionings = new[]
        {
            new Aws.S3.Inputs.BucketV2VersioningArgs
            {
                Enabled = false,
            },
        },
    });

    var @this = new Databricks.MwsStorageConfigurations("this", new()
    {
        AccountId = databricksAccountId,
        StorageConfigurationName = $"{@var.Prefix}-storage",
        BucketName = rootStorageBucket.Bucket,
    }, new CustomResourceOptions
    {
        Provider = databricks.Mws,
    });

});
package main

import (
	"fmt"

	"github.com/pulumi/pulumi-aws/sdk/v5/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, "")
		databricksAccountId := cfg.RequireObject("databricksAccountId")
		rootStorageBucket, err := s3.NewBucketV2(ctx, "rootStorageBucket", &s3.BucketV2Args{
			Acl: pulumi.String("private"),
			Versionings: s3.BucketV2VersioningArray{
				&s3.BucketV2VersioningArgs{
					Enabled: pulumi.Bool(false),
				},
			},
		})
		if err != nil {
			return err
		}
		_, err = databricks.NewMwsStorageConfigurations(ctx, "this", &databricks.MwsStorageConfigurationsArgs{
			AccountId:                pulumi.Any(databricksAccountId),
			StorageConfigurationName: pulumi.String(fmt.Sprintf("%v-storage", _var.Prefix)),
			BucketName:               rootStorageBucket.Bucket,
		}, pulumi.Provider(databricks.Mws))
		if err != nil {
			return err
		}
		return nil
	})
}
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.inputs.BucketV2VersioningArgs;
import com.pulumi.databricks.MwsStorageConfigurations;
import com.pulumi.databricks.MwsStorageConfigurationsArgs;
import com.pulumi.resources.CustomResourceOptions;
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()        
            .acl("private")
            .versionings(BucketV2VersioningArgs.builder()
                .enabled(false)
                .build())
            .build());

        var this_ = new MwsStorageConfigurations("this", MwsStorageConfigurationsArgs.builder()        
            .accountId(databricksAccountId)
            .storageConfigurationName(String.format("%s-storage", var_.prefix()))
            .bucketName(rootStorageBucket.bucket())
            .build(), CustomResourceOptions.builder()
                .provider(databricks.mws())
                .build());

    }
}
import pulumi
import pulumi_aws as aws
import pulumi_databricks as databricks

config = pulumi.Config()
databricks_account_id = config.require_object("databricksAccountId")
root_storage_bucket = aws.s3.BucketV2("rootStorageBucket",
    acl="private",
    versionings=[aws.s3.BucketV2VersioningArgs(
        enabled=False,
    )])
this = databricks.MwsStorageConfigurations("this",
    account_id=databricks_account_id,
    storage_configuration_name=f"{var['prefix']}-storage",
    bucket_name=root_storage_bucket.bucket,
    opts=pulumi.ResourceOptions(provider=databricks["mws"]))
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
import * as databricks from "@pulumi/databricks";

const config = new pulumi.Config();
const databricksAccountId = config.requireObject("databricksAccountId");
const rootStorageBucket = new aws.s3.BucketV2("rootStorageBucket", {
    acl: "private",
    versionings: [{
        enabled: false,
    }],
});
const _this = new databricks.MwsStorageConfigurations("this", {
    accountId: databricksAccountId,
    storageConfigurationName: `${_var.prefix}-storage`,
    bucketName: rootStorageBucket.bucket,
}, {
    provider: databricks.mws,
});
configuration:
  databricksAccountId:
    type: dynamic
resources:
  rootStorageBucket:
    type: aws:s3:BucketV2
    properties:
      acl: private
      versionings:
        - enabled: false
  this:
    type: databricks:MwsStorageConfigurations
    properties:
      accountId: ${databricksAccountId}
      storageConfigurationName: ${var.prefix}-storage
      bucketName: ${rootStorageBucket.bucket}
    options:
      provider: ${databricks.mws}

Create MwsStorageConfigurations Resource

new MwsStorageConfigurations(name: string, args: MwsStorageConfigurationsArgs, opts?: CustomResourceOptions);
@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)
@overload
def MwsStorageConfigurations(resource_name: str,
                             args: MwsStorageConfigurationsArgs,
                             opts: Optional[ResourceOptions] = 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.

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.

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

The MwsStorageConfigurations resource accepts the following input properties:

AccountId string

Account Id that could be found in the bottom left corner of Accounts Console

BucketName string

name of AWS S3 bucket

StorageConfigurationName string

name under which this storage configuration is stored

AccountId string

Account Id that could be found in the bottom left corner of Accounts Console

BucketName string

name of AWS S3 bucket

StorageConfigurationName string

name under which this storage configuration is stored

accountId String

Account Id that could be found in the bottom left corner of Accounts Console

bucketName String

name of AWS S3 bucket

storageConfigurationName String

name under which this storage configuration is stored

accountId string

Account Id that could be found in the bottom left corner of Accounts Console

bucketName string

name of AWS S3 bucket

storageConfigurationName string

name under which this storage configuration is stored

account_id str

Account Id that could be found in the bottom left corner of Accounts Console

bucket_name str

name of AWS S3 bucket

storage_configuration_name str

name under which this storage configuration is stored

accountId String

Account Id that could be found in the bottom left corner of Accounts Console

bucketName String

name of AWS S3 bucket

storageConfigurationName String

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:

CreationTime int
Id string

The provider-assigned unique ID for this managed resource.

StorageConfigurationId string

(String) id of storage config to be used for databricks_mws_workspace resource.

CreationTime int
Id string

The provider-assigned unique ID for this managed resource.

StorageConfigurationId string

(String) id of storage config to be used for databricks_mws_workspace resource.

creationTime Integer
id String

The provider-assigned unique ID for this managed resource.

storageConfigurationId String

(String) id of storage config to be used for databricks_mws_workspace resource.

creationTime number
id string

The provider-assigned unique ID for this managed resource.

storageConfigurationId string

(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_id str

(String) id of storage config to be used for databricks_mws_workspace resource.

creationTime Number
id String

The provider-assigned unique ID for this managed resource.

storageConfigurationId String

(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.
The following state arguments are supported:
AccountId string

Account Id that could be found in the bottom left corner of Accounts Console

BucketName string

name of AWS S3 bucket

CreationTime int
StorageConfigurationId string

(String) id of storage config to be used for databricks_mws_workspace resource.

StorageConfigurationName string

name under which this storage configuration is stored

AccountId string

Account Id that could be found in the bottom left corner of Accounts Console

BucketName string

name of AWS S3 bucket

CreationTime int
StorageConfigurationId string

(String) id of storage config to be used for databricks_mws_workspace resource.

StorageConfigurationName string

name under which this storage configuration is stored

accountId String

Account Id that could be found in the bottom left corner of Accounts Console

bucketName String

name of AWS S3 bucket

creationTime Integer
storageConfigurationId String

(String) id of storage config to be used for databricks_mws_workspace resource.

storageConfigurationName String

name under which this storage configuration is stored

accountId string

Account Id that could be found in the bottom left corner of Accounts Console

bucketName string

name of AWS S3 bucket

creationTime number
storageConfigurationId string

(String) id of storage config to be used for databricks_mws_workspace resource.

storageConfigurationName string

name under which this storage configuration is stored

account_id str

Account Id that could be found in the bottom left corner of Accounts Console

bucket_name str

name of AWS S3 bucket

creation_time int
storage_configuration_id str

(String) id of storage config to be used for databricks_mws_workspace resource.

storage_configuration_name str

name under which this storage configuration is stored

accountId String

Account Id that could be found in the bottom left corner of Accounts Console

bucketName String

name of AWS S3 bucket

creationTime Number
storageConfigurationId String

(String) id of storage config to be used for databricks_mws_workspace resource.

storageConfigurationName String

name under which this storage configuration is stored

Import

-> Note Importing this resource is not currently supported.

Package Details

Repository
databricks pulumi/pulumi-databricks
License
Apache-2.0
Notes

This Pulumi package is based on the databricks Terraform Provider.