WorkspaceRootDbfsCustomerManagedKeyArgs

data class WorkspaceRootDbfsCustomerManagedKeyArgs(val keyVaultKeyId: Output<String>? = null, val workspaceId: Output<String>? = null) : ConvertibleToJava<WorkspaceRootDbfsCustomerManagedKeyArgs>

Manages a Customer Managed Key for the Databricks Workspaces root Databricks File System(DBFS)

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.core.CoreFunctions;
import com.pulumi.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.databricks.Workspace;
import com.pulumi.azure.databricks.WorkspaceArgs;
import com.pulumi.azure.keyvault.KeyVault;
import com.pulumi.azure.keyvault.KeyVaultArgs;
import com.pulumi.azure.keyvault.Key;
import com.pulumi.azure.keyvault.KeyArgs;
import com.pulumi.azure.databricks.WorkspaceRootDbfsCustomerManagedKey;
import com.pulumi.azure.databricks.WorkspaceRootDbfsCustomerManagedKeyArgs;
import com.pulumi.azure.keyvault.AccessPolicy;
import com.pulumi.azure.keyvault.AccessPolicyArgs;
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 current = CoreFunctions.getClientConfig();
var example = new ResourceGroup("example", ResourceGroupArgs.builder()
.name("example-resources")
.location("West Europe")
.build());
var exampleWorkspace = new Workspace("exampleWorkspace", WorkspaceArgs.builder()
.name("databricks-test")
.resourceGroupName(example.name())
.location(example.location())
.sku("premium")
.customerManagedKeyEnabled(true)
.tags(Map.of("Environment", "Production"))
.build());
var exampleKeyVault = new KeyVault("exampleKeyVault", KeyVaultArgs.builder()
.name("examplekeyvault")
.location(example.location())
.resourceGroupName(example.name())
.tenantId(current.applyValue(getClientConfigResult -> getClientConfigResult.tenantId()))
.skuName("premium")
.purgeProtectionEnabled(true)
.softDeleteRetentionDays(7)
.build());
var exampleKey = new Key("exampleKey", KeyArgs.builder()
.name("example-certificate")
.keyVaultId(exampleKeyVault.id())
.keyType("RSA")
.keySize(2048)
.keyOpts(
"decrypt",
"encrypt",
"sign",
"unwrapKey",
"verify",
"wrapKey")
.build());
var exampleWorkspaceRootDbfsCustomerManagedKey = new WorkspaceRootDbfsCustomerManagedKey("exampleWorkspaceRootDbfsCustomerManagedKey", WorkspaceRootDbfsCustomerManagedKeyArgs.builder()
.workspaceId(exampleWorkspace.id())
.keyVaultKeyId(exampleKey.id())
.build());
var terraform = new AccessPolicy("terraform", AccessPolicyArgs.builder()
.keyVaultId(exampleKeyVault.id())
.tenantId(exampleKeyVault.tenantId())
.objectId(current.applyValue(getClientConfigResult -> getClientConfigResult.objectId()))
.keyPermissions(
"Create",
"Delete",
"Get",
"Purge",
"Recover",
"Update",
"List",
"Decrypt",
"Sign",
"GetRotationPolicy")
.build());
var databricks = new AccessPolicy("databricks", AccessPolicyArgs.builder()
.keyVaultId(exampleKeyVault.id())
.tenantId(exampleWorkspace.storageAccountIdentities().applyValue(storageAccountIdentities -> storageAccountIdentities[0].tenantId()))
.objectId(exampleWorkspace.storageAccountIdentities().applyValue(storageAccountIdentities -> storageAccountIdentities[0].principalId()))
.keyPermissions(
"Create",
"Delete",
"Get",
"Purge",
"Recover",
"Update",
"List",
"Decrypt",
"Sign")
.build());
}
}

Example HCL Configurations

  • Databricks Workspace with Root Databricks File System Customer Managed Keys

  • Databricks Workspace with Customer Managed Keys for Managed Services

  • Databricks Workspace with Private Endpoint, Customer Managed Keys for Managed Services and Root Databricks File System Customer Managed Keys

Import

Databricks Workspace Root DBFS Customer Managed Key can be imported using the resource id, e.g.

$ pulumi import azure:databricks/workspaceRootDbfsCustomerManagedKey:WorkspaceRootDbfsCustomerManagedKey workspace1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Databricks/workspaces/workspace1

Constructors

Link copied to clipboard
fun WorkspaceRootDbfsCustomerManagedKeyArgs(keyVaultKeyId: Output<String>? = null, workspaceId: Output<String>? = null)

Functions

Link copied to clipboard
open override fun toJava(): WorkspaceRootDbfsCustomerManagedKeyArgs

Properties

Link copied to clipboard
val keyVaultKeyId: Output<String>? = null

The resource ID of the Key Vault Key to be used.

Link copied to clipboard
val workspaceId: Output<String>? = null

The resource ID of the Databricks Workspace.