We recommend using Azure Native.
azure.synapse.WorkspaceKey
Explore with Pulumi AI
Manages Synapse Workspace keys
Note: Keys that are actively protecting a workspace cannot be deleted. When the keys resource is deleted, if the key is inactive it will be deleted, if it is active it will not be deleted.
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new()
{
Location = "West Europe",
});
var exampleAccount = new Azure.Storage.Account("exampleAccount", new()
{
ResourceGroupName = exampleResourceGroup.Name,
Location = exampleResourceGroup.Location,
AccountTier = "Standard",
AccountReplicationType = "LRS",
AccountKind = "StorageV2",
IsHnsEnabled = true,
});
var exampleDataLakeGen2Filesystem = new Azure.Storage.DataLakeGen2Filesystem("exampleDataLakeGen2Filesystem", new()
{
StorageAccountId = exampleAccount.Id,
});
var current = Azure.Core.GetClientConfig.Invoke();
var exampleKeyVault = new Azure.KeyVault.KeyVault("exampleKeyVault", new()
{
Location = exampleResourceGroup.Location,
ResourceGroupName = exampleResourceGroup.Name,
TenantId = current.Apply(getClientConfigResult => getClientConfigResult.TenantId),
SkuName = "standard",
PurgeProtectionEnabled = true,
});
var deployer = new Azure.KeyVault.AccessPolicy("deployer", new()
{
KeyVaultId = exampleKeyVault.Id,
TenantId = current.Apply(getClientConfigResult => getClientConfigResult.TenantId),
ObjectId = current.Apply(getClientConfigResult => getClientConfigResult.ObjectId),
KeyPermissions = new[]
{
"Create",
"Get",
"Delete",
"Purge",
"GetRotationPolicy",
},
});
var exampleKey = new Azure.KeyVault.Key("exampleKey", new()
{
KeyVaultId = exampleKeyVault.Id,
KeyType = "RSA",
KeySize = 2048,
KeyOpts = new[]
{
"unwrapKey",
"wrapKey",
},
}, new CustomResourceOptions
{
DependsOn = new[]
{
deployer,
},
});
var exampleWorkspace = new Azure.Synapse.Workspace("exampleWorkspace", new()
{
ResourceGroupName = exampleResourceGroup.Name,
Location = exampleResourceGroup.Location,
StorageDataLakeGen2FilesystemId = exampleDataLakeGen2Filesystem.Id,
SqlAdministratorLogin = "sqladminuser",
SqlAdministratorLoginPassword = "H@Sh1CoR3!",
CustomerManagedKey = new Azure.Synapse.Inputs.WorkspaceCustomerManagedKeyArgs
{
KeyVersionlessId = exampleKey.VersionlessId,
KeyName = "enckey",
},
Identity = new Azure.Synapse.Inputs.WorkspaceIdentityArgs
{
Type = "SystemAssigned",
},
Tags =
{
{ "Env", "production" },
},
});
var workspacePolicy = new Azure.KeyVault.AccessPolicy("workspacePolicy", new()
{
KeyVaultId = exampleKeyVault.Id,
TenantId = exampleWorkspace.Identity.Apply(identity => identity?.TenantId),
ObjectId = exampleWorkspace.Identity.Apply(identity => identity?.PrincipalId),
KeyPermissions = new[]
{
"Get",
"WrapKey",
"UnwrapKey",
},
});
var exampleWorkspaceKey = new Azure.Synapse.WorkspaceKey("exampleWorkspaceKey", new()
{
CustomerManagedKeyVersionlessId = exampleKey.VersionlessId,
SynapseWorkspaceId = exampleWorkspace.Id,
Active = true,
CustomerManagedKeyName = "enckey",
}, new CustomResourceOptions
{
DependsOn = new[]
{
workspacePolicy,
},
});
});
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/keyvault"
"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/storage"
"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/synapse"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
exampleResourceGroup, err := core.NewResourceGroup(ctx, "exampleResourceGroup", &core.ResourceGroupArgs{
Location: pulumi.String("West Europe"),
})
if err != nil {
return err
}
exampleAccount, err := storage.NewAccount(ctx, "exampleAccount", &storage.AccountArgs{
ResourceGroupName: exampleResourceGroup.Name,
Location: exampleResourceGroup.Location,
AccountTier: pulumi.String("Standard"),
AccountReplicationType: pulumi.String("LRS"),
AccountKind: pulumi.String("StorageV2"),
IsHnsEnabled: pulumi.Bool(true),
})
if err != nil {
return err
}
exampleDataLakeGen2Filesystem, err := storage.NewDataLakeGen2Filesystem(ctx, "exampleDataLakeGen2Filesystem", &storage.DataLakeGen2FilesystemArgs{
StorageAccountId: exampleAccount.ID(),
})
if err != nil {
return err
}
current, err := core.GetClientConfig(ctx, nil, nil)
if err != nil {
return err
}
exampleKeyVault, err := keyvault.NewKeyVault(ctx, "exampleKeyVault", &keyvault.KeyVaultArgs{
Location: exampleResourceGroup.Location,
ResourceGroupName: exampleResourceGroup.Name,
TenantId: *pulumi.String(current.TenantId),
SkuName: pulumi.String("standard"),
PurgeProtectionEnabled: pulumi.Bool(true),
})
if err != nil {
return err
}
deployer, err := keyvault.NewAccessPolicy(ctx, "deployer", &keyvault.AccessPolicyArgs{
KeyVaultId: exampleKeyVault.ID(),
TenantId: *pulumi.String(current.TenantId),
ObjectId: *pulumi.String(current.ObjectId),
KeyPermissions: pulumi.StringArray{
pulumi.String("Create"),
pulumi.String("Get"),
pulumi.String("Delete"),
pulumi.String("Purge"),
pulumi.String("GetRotationPolicy"),
},
})
if err != nil {
return err
}
exampleKey, err := keyvault.NewKey(ctx, "exampleKey", &keyvault.KeyArgs{
KeyVaultId: exampleKeyVault.ID(),
KeyType: pulumi.String("RSA"),
KeySize: pulumi.Int(2048),
KeyOpts: pulumi.StringArray{
pulumi.String("unwrapKey"),
pulumi.String("wrapKey"),
},
}, pulumi.DependsOn([]pulumi.Resource{
deployer,
}))
if err != nil {
return err
}
exampleWorkspace, err := synapse.NewWorkspace(ctx, "exampleWorkspace", &synapse.WorkspaceArgs{
ResourceGroupName: exampleResourceGroup.Name,
Location: exampleResourceGroup.Location,
StorageDataLakeGen2FilesystemId: exampleDataLakeGen2Filesystem.ID(),
SqlAdministratorLogin: pulumi.String("sqladminuser"),
SqlAdministratorLoginPassword: pulumi.String("H@Sh1CoR3!"),
CustomerManagedKey: &synapse.WorkspaceCustomerManagedKeyArgs{
KeyVersionlessId: exampleKey.VersionlessId,
KeyName: pulumi.String("enckey"),
},
Identity: &synapse.WorkspaceIdentityArgs{
Type: pulumi.String("SystemAssigned"),
},
Tags: pulumi.StringMap{
"Env": pulumi.String("production"),
},
})
if err != nil {
return err
}
workspacePolicy, err := keyvault.NewAccessPolicy(ctx, "workspacePolicy", &keyvault.AccessPolicyArgs{
KeyVaultId: exampleKeyVault.ID(),
TenantId: exampleWorkspace.Identity.ApplyT(func(identity synapse.WorkspaceIdentity) (*string, error) {
return &identity.TenantId, nil
}).(pulumi.StringPtrOutput),
ObjectId: exampleWorkspace.Identity.ApplyT(func(identity synapse.WorkspaceIdentity) (*string, error) {
return &identity.PrincipalId, nil
}).(pulumi.StringPtrOutput),
KeyPermissions: pulumi.StringArray{
pulumi.String("Get"),
pulumi.String("WrapKey"),
pulumi.String("UnwrapKey"),
},
})
if err != nil {
return err
}
_, err = synapse.NewWorkspaceKey(ctx, "exampleWorkspaceKey", &synapse.WorkspaceKeyArgs{
CustomerManagedKeyVersionlessId: exampleKey.VersionlessId,
SynapseWorkspaceId: exampleWorkspace.ID(),
Active: pulumi.Bool(true),
CustomerManagedKeyName: pulumi.String("enckey"),
}, pulumi.DependsOn([]pulumi.Resource{
workspacePolicy,
}))
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.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.storage.Account;
import com.pulumi.azure.storage.AccountArgs;
import com.pulumi.azure.storage.DataLakeGen2Filesystem;
import com.pulumi.azure.storage.DataLakeGen2FilesystemArgs;
import com.pulumi.azure.core.CoreFunctions;
import com.pulumi.azure.keyvault.KeyVault;
import com.pulumi.azure.keyvault.KeyVaultArgs;
import com.pulumi.azure.keyvault.AccessPolicy;
import com.pulumi.azure.keyvault.AccessPolicyArgs;
import com.pulumi.azure.keyvault.Key;
import com.pulumi.azure.keyvault.KeyArgs;
import com.pulumi.azure.synapse.Workspace;
import com.pulumi.azure.synapse.WorkspaceArgs;
import com.pulumi.azure.synapse.inputs.WorkspaceCustomerManagedKeyArgs;
import com.pulumi.azure.synapse.inputs.WorkspaceIdentityArgs;
import com.pulumi.azure.synapse.WorkspaceKey;
import com.pulumi.azure.synapse.WorkspaceKeyArgs;
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) {
var exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()
.location("West Europe")
.build());
var exampleAccount = new Account("exampleAccount", AccountArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.location(exampleResourceGroup.location())
.accountTier("Standard")
.accountReplicationType("LRS")
.accountKind("StorageV2")
.isHnsEnabled("true")
.build());
var exampleDataLakeGen2Filesystem = new DataLakeGen2Filesystem("exampleDataLakeGen2Filesystem", DataLakeGen2FilesystemArgs.builder()
.storageAccountId(exampleAccount.id())
.build());
final var current = CoreFunctions.getClientConfig();
var exampleKeyVault = new KeyVault("exampleKeyVault", KeyVaultArgs.builder()
.location(exampleResourceGroup.location())
.resourceGroupName(exampleResourceGroup.name())
.tenantId(current.applyValue(getClientConfigResult -> getClientConfigResult.tenantId()))
.skuName("standard")
.purgeProtectionEnabled(true)
.build());
var deployer = new AccessPolicy("deployer", AccessPolicyArgs.builder()
.keyVaultId(exampleKeyVault.id())
.tenantId(current.applyValue(getClientConfigResult -> getClientConfigResult.tenantId()))
.objectId(current.applyValue(getClientConfigResult -> getClientConfigResult.objectId()))
.keyPermissions(
"Create",
"Get",
"Delete",
"Purge",
"GetRotationPolicy")
.build());
var exampleKey = new Key("exampleKey", KeyArgs.builder()
.keyVaultId(exampleKeyVault.id())
.keyType("RSA")
.keySize(2048)
.keyOpts(
"unwrapKey",
"wrapKey")
.build(), CustomResourceOptions.builder()
.dependsOn(deployer)
.build());
var exampleWorkspace = new Workspace("exampleWorkspace", WorkspaceArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.location(exampleResourceGroup.location())
.storageDataLakeGen2FilesystemId(exampleDataLakeGen2Filesystem.id())
.sqlAdministratorLogin("sqladminuser")
.sqlAdministratorLoginPassword("H@Sh1CoR3!")
.customerManagedKey(WorkspaceCustomerManagedKeyArgs.builder()
.keyVersionlessId(exampleKey.versionlessId())
.keyName("enckey")
.build())
.identity(WorkspaceIdentityArgs.builder()
.type("SystemAssigned")
.build())
.tags(Map.of("Env", "production"))
.build());
var workspacePolicy = new AccessPolicy("workspacePolicy", AccessPolicyArgs.builder()
.keyVaultId(exampleKeyVault.id())
.tenantId(exampleWorkspace.identity().applyValue(identity -> identity.tenantId()))
.objectId(exampleWorkspace.identity().applyValue(identity -> identity.principalId()))
.keyPermissions(
"Get",
"WrapKey",
"UnwrapKey")
.build());
var exampleWorkspaceKey = new WorkspaceKey("exampleWorkspaceKey", WorkspaceKeyArgs.builder()
.customerManagedKeyVersionlessId(exampleKey.versionlessId())
.synapseWorkspaceId(exampleWorkspace.id())
.active(true)
.customerManagedKeyName("enckey")
.build(), CustomResourceOptions.builder()
.dependsOn(workspacePolicy)
.build());
}
}
import pulumi
import pulumi_azure as azure
example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe")
example_account = azure.storage.Account("exampleAccount",
resource_group_name=example_resource_group.name,
location=example_resource_group.location,
account_tier="Standard",
account_replication_type="LRS",
account_kind="StorageV2",
is_hns_enabled=True)
example_data_lake_gen2_filesystem = azure.storage.DataLakeGen2Filesystem("exampleDataLakeGen2Filesystem", storage_account_id=example_account.id)
current = azure.core.get_client_config()
example_key_vault = azure.keyvault.KeyVault("exampleKeyVault",
location=example_resource_group.location,
resource_group_name=example_resource_group.name,
tenant_id=current.tenant_id,
sku_name="standard",
purge_protection_enabled=True)
deployer = azure.keyvault.AccessPolicy("deployer",
key_vault_id=example_key_vault.id,
tenant_id=current.tenant_id,
object_id=current.object_id,
key_permissions=[
"Create",
"Get",
"Delete",
"Purge",
"GetRotationPolicy",
])
example_key = azure.keyvault.Key("exampleKey",
key_vault_id=example_key_vault.id,
key_type="RSA",
key_size=2048,
key_opts=[
"unwrapKey",
"wrapKey",
],
opts=pulumi.ResourceOptions(depends_on=[deployer]))
example_workspace = azure.synapse.Workspace("exampleWorkspace",
resource_group_name=example_resource_group.name,
location=example_resource_group.location,
storage_data_lake_gen2_filesystem_id=example_data_lake_gen2_filesystem.id,
sql_administrator_login="sqladminuser",
sql_administrator_login_password="H@Sh1CoR3!",
customer_managed_key=azure.synapse.WorkspaceCustomerManagedKeyArgs(
key_versionless_id=example_key.versionless_id,
key_name="enckey",
),
identity=azure.synapse.WorkspaceIdentityArgs(
type="SystemAssigned",
),
tags={
"Env": "production",
})
workspace_policy = azure.keyvault.AccessPolicy("workspacePolicy",
key_vault_id=example_key_vault.id,
tenant_id=example_workspace.identity.tenant_id,
object_id=example_workspace.identity.principal_id,
key_permissions=[
"Get",
"WrapKey",
"UnwrapKey",
])
example_workspace_key = azure.synapse.WorkspaceKey("exampleWorkspaceKey",
customer_managed_key_versionless_id=example_key.versionless_id,
synapse_workspace_id=example_workspace.id,
active=True,
customer_managed_key_name="enckey",
opts=pulumi.ResourceOptions(depends_on=[workspace_policy]))
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {location: "West Europe"});
const exampleAccount = new azure.storage.Account("exampleAccount", {
resourceGroupName: exampleResourceGroup.name,
location: exampleResourceGroup.location,
accountTier: "Standard",
accountReplicationType: "LRS",
accountKind: "StorageV2",
isHnsEnabled: true,
});
const exampleDataLakeGen2Filesystem = new azure.storage.DataLakeGen2Filesystem("exampleDataLakeGen2Filesystem", {storageAccountId: exampleAccount.id});
const current = azure.core.getClientConfig({});
const exampleKeyVault = new azure.keyvault.KeyVault("exampleKeyVault", {
location: exampleResourceGroup.location,
resourceGroupName: exampleResourceGroup.name,
tenantId: current.then(current => current.tenantId),
skuName: "standard",
purgeProtectionEnabled: true,
});
const deployer = new azure.keyvault.AccessPolicy("deployer", {
keyVaultId: exampleKeyVault.id,
tenantId: current.then(current => current.tenantId),
objectId: current.then(current => current.objectId),
keyPermissions: [
"Create",
"Get",
"Delete",
"Purge",
"GetRotationPolicy",
],
});
const exampleKey = new azure.keyvault.Key("exampleKey", {
keyVaultId: exampleKeyVault.id,
keyType: "RSA",
keySize: 2048,
keyOpts: [
"unwrapKey",
"wrapKey",
],
}, {
dependsOn: [deployer],
});
const exampleWorkspace = new azure.synapse.Workspace("exampleWorkspace", {
resourceGroupName: exampleResourceGroup.name,
location: exampleResourceGroup.location,
storageDataLakeGen2FilesystemId: exampleDataLakeGen2Filesystem.id,
sqlAdministratorLogin: "sqladminuser",
sqlAdministratorLoginPassword: "H@Sh1CoR3!",
customerManagedKey: {
keyVersionlessId: exampleKey.versionlessId,
keyName: "enckey",
},
identity: {
type: "SystemAssigned",
},
tags: {
Env: "production",
},
});
const workspacePolicy = new azure.keyvault.AccessPolicy("workspacePolicy", {
keyVaultId: exampleKeyVault.id,
tenantId: exampleWorkspace.identity.apply(identity => identity?.tenantId),
objectId: exampleWorkspace.identity.apply(identity => identity?.principalId),
keyPermissions: [
"Get",
"WrapKey",
"UnwrapKey",
],
});
const exampleWorkspaceKey = new azure.synapse.WorkspaceKey("exampleWorkspaceKey", {
customerManagedKeyVersionlessId: exampleKey.versionlessId,
synapseWorkspaceId: exampleWorkspace.id,
active: true,
customerManagedKeyName: "enckey",
}, {
dependsOn: [workspacePolicy],
});
resources:
exampleResourceGroup:
type: azure:core:ResourceGroup
properties:
location: West Europe
exampleAccount:
type: azure:storage:Account
properties:
resourceGroupName: ${exampleResourceGroup.name}
location: ${exampleResourceGroup.location}
accountTier: Standard
accountReplicationType: LRS
accountKind: StorageV2
isHnsEnabled: 'true'
exampleDataLakeGen2Filesystem:
type: azure:storage:DataLakeGen2Filesystem
properties:
storageAccountId: ${exampleAccount.id}
exampleKeyVault:
type: azure:keyvault:KeyVault
properties:
location: ${exampleResourceGroup.location}
resourceGroupName: ${exampleResourceGroup.name}
tenantId: ${current.tenantId}
skuName: standard
purgeProtectionEnabled: true
deployer:
type: azure:keyvault:AccessPolicy
properties:
keyVaultId: ${exampleKeyVault.id}
tenantId: ${current.tenantId}
objectId: ${current.objectId}
keyPermissions:
- Create
- Get
- Delete
- Purge
- GetRotationPolicy
exampleKey:
type: azure:keyvault:Key
properties:
keyVaultId: ${exampleKeyVault.id}
keyType: RSA
keySize: 2048
keyOpts:
- unwrapKey
- wrapKey
options:
dependson:
- ${deployer}
exampleWorkspace:
type: azure:synapse:Workspace
properties:
resourceGroupName: ${exampleResourceGroup.name}
location: ${exampleResourceGroup.location}
storageDataLakeGen2FilesystemId: ${exampleDataLakeGen2Filesystem.id}
sqlAdministratorLogin: sqladminuser
sqlAdministratorLoginPassword: H@Sh1CoR3!
customerManagedKey:
keyVersionlessId: ${exampleKey.versionlessId}
keyName: enckey
identity:
type: SystemAssigned
tags:
Env: production
workspacePolicy:
type: azure:keyvault:AccessPolicy
properties:
keyVaultId: ${exampleKeyVault.id}
tenantId: ${exampleWorkspace.identity.tenantId}
objectId: ${exampleWorkspace.identity.principalId}
keyPermissions:
- Get
- WrapKey
- UnwrapKey
exampleWorkspaceKey:
type: azure:synapse:WorkspaceKey
properties:
customerManagedKeyVersionlessId: ${exampleKey.versionlessId}
synapseWorkspaceId: ${exampleWorkspace.id}
active: true
customerManagedKeyName: enckey
options:
dependson:
- ${workspacePolicy}
variables:
current:
fn::invoke:
Function: azure:core:getClientConfig
Arguments: {}
Create WorkspaceKey Resource
new WorkspaceKey(name: string, args: WorkspaceKeyArgs, opts?: CustomResourceOptions);
@overload
def WorkspaceKey(resource_name: str,
opts: Optional[ResourceOptions] = None,
active: Optional[bool] = None,
customer_managed_key_name: Optional[str] = None,
customer_managed_key_versionless_id: Optional[str] = None,
synapse_workspace_id: Optional[str] = None)
@overload
def WorkspaceKey(resource_name: str,
args: WorkspaceKeyArgs,
opts: Optional[ResourceOptions] = None)
func NewWorkspaceKey(ctx *Context, name string, args WorkspaceKeyArgs, opts ...ResourceOption) (*WorkspaceKey, error)
public WorkspaceKey(string name, WorkspaceKeyArgs args, CustomResourceOptions? opts = null)
public WorkspaceKey(String name, WorkspaceKeyArgs args)
public WorkspaceKey(String name, WorkspaceKeyArgs args, CustomResourceOptions options)
type: azure:synapse:WorkspaceKey
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args WorkspaceKeyArgs
- 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 WorkspaceKeyArgs
- 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 WorkspaceKeyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args WorkspaceKeyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args WorkspaceKeyArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
WorkspaceKey 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 WorkspaceKey resource accepts the following input properties:
- Active bool
Specifies if the workspace should be encrypted with this key.
Note: Only one key can actively encrypt a workspace. When performing a key rotation, setting a new key as the active key will disable existing keys.
- Customer
Managed stringKey Name Specifies the name of the workspace key. Should match the name of the key in the synapse workspace.
- Synapse
Workspace stringId The ID of the Synapse Workspace where the encryption key should be configured.
- Customer
Managed stringKey Versionless Id The Azure Key Vault Key Versionless ID to be used as the Customer Managed Key (CMK) for double encryption
- Active bool
Specifies if the workspace should be encrypted with this key.
Note: Only one key can actively encrypt a workspace. When performing a key rotation, setting a new key as the active key will disable existing keys.
- Customer
Managed stringKey Name Specifies the name of the workspace key. Should match the name of the key in the synapse workspace.
- Synapse
Workspace stringId The ID of the Synapse Workspace where the encryption key should be configured.
- Customer
Managed stringKey Versionless Id The Azure Key Vault Key Versionless ID to be used as the Customer Managed Key (CMK) for double encryption
- active Boolean
Specifies if the workspace should be encrypted with this key.
Note: Only one key can actively encrypt a workspace. When performing a key rotation, setting a new key as the active key will disable existing keys.
- customer
Managed StringKey Name Specifies the name of the workspace key. Should match the name of the key in the synapse workspace.
- synapse
Workspace StringId The ID of the Synapse Workspace where the encryption key should be configured.
- customer
Managed StringKey Versionless Id The Azure Key Vault Key Versionless ID to be used as the Customer Managed Key (CMK) for double encryption
- active boolean
Specifies if the workspace should be encrypted with this key.
Note: Only one key can actively encrypt a workspace. When performing a key rotation, setting a new key as the active key will disable existing keys.
- customer
Managed stringKey Name Specifies the name of the workspace key. Should match the name of the key in the synapse workspace.
- synapse
Workspace stringId The ID of the Synapse Workspace where the encryption key should be configured.
- customer
Managed stringKey Versionless Id The Azure Key Vault Key Versionless ID to be used as the Customer Managed Key (CMK) for double encryption
- active bool
Specifies if the workspace should be encrypted with this key.
Note: Only one key can actively encrypt a workspace. When performing a key rotation, setting a new key as the active key will disable existing keys.
- customer_
managed_ strkey_ name Specifies the name of the workspace key. Should match the name of the key in the synapse workspace.
- synapse_
workspace_ strid The ID of the Synapse Workspace where the encryption key should be configured.
- customer_
managed_ strkey_ versionless_ id The Azure Key Vault Key Versionless ID to be used as the Customer Managed Key (CMK) for double encryption
- active Boolean
Specifies if the workspace should be encrypted with this key.
Note: Only one key can actively encrypt a workspace. When performing a key rotation, setting a new key as the active key will disable existing keys.
- customer
Managed StringKey Name Specifies the name of the workspace key. Should match the name of the key in the synapse workspace.
- synapse
Workspace StringId The ID of the Synapse Workspace where the encryption key should be configured.
- customer
Managed StringKey Versionless Id The Azure Key Vault Key Versionless ID to be used as the Customer Managed Key (CMK) for double encryption
Outputs
All input properties are implicitly available as output properties. Additionally, the WorkspaceKey resource produces the following output properties:
- Id string
The provider-assigned unique ID for this managed resource.
- Id string
The provider-assigned unique ID for this managed resource.
- id String
The provider-assigned unique ID for this managed resource.
- id string
The provider-assigned unique ID for this managed resource.
- id str
The provider-assigned unique ID for this managed resource.
- id String
The provider-assigned unique ID for this managed resource.
Look up Existing WorkspaceKey Resource
Get an existing WorkspaceKey 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?: WorkspaceKeyState, opts?: CustomResourceOptions): WorkspaceKey
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
active: Optional[bool] = None,
customer_managed_key_name: Optional[str] = None,
customer_managed_key_versionless_id: Optional[str] = None,
synapse_workspace_id: Optional[str] = None) -> WorkspaceKey
func GetWorkspaceKey(ctx *Context, name string, id IDInput, state *WorkspaceKeyState, opts ...ResourceOption) (*WorkspaceKey, error)
public static WorkspaceKey Get(string name, Input<string> id, WorkspaceKeyState? state, CustomResourceOptions? opts = null)
public static WorkspaceKey get(String name, Output<String> id, WorkspaceKeyState 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.
- Active bool
Specifies if the workspace should be encrypted with this key.
Note: Only one key can actively encrypt a workspace. When performing a key rotation, setting a new key as the active key will disable existing keys.
- Customer
Managed stringKey Name Specifies the name of the workspace key. Should match the name of the key in the synapse workspace.
- Customer
Managed stringKey Versionless Id The Azure Key Vault Key Versionless ID to be used as the Customer Managed Key (CMK) for double encryption
- Synapse
Workspace stringId The ID of the Synapse Workspace where the encryption key should be configured.
- Active bool
Specifies if the workspace should be encrypted with this key.
Note: Only one key can actively encrypt a workspace. When performing a key rotation, setting a new key as the active key will disable existing keys.
- Customer
Managed stringKey Name Specifies the name of the workspace key. Should match the name of the key in the synapse workspace.
- Customer
Managed stringKey Versionless Id The Azure Key Vault Key Versionless ID to be used as the Customer Managed Key (CMK) for double encryption
- Synapse
Workspace stringId The ID of the Synapse Workspace where the encryption key should be configured.
- active Boolean
Specifies if the workspace should be encrypted with this key.
Note: Only one key can actively encrypt a workspace. When performing a key rotation, setting a new key as the active key will disable existing keys.
- customer
Managed StringKey Name Specifies the name of the workspace key. Should match the name of the key in the synapse workspace.
- customer
Managed StringKey Versionless Id The Azure Key Vault Key Versionless ID to be used as the Customer Managed Key (CMK) for double encryption
- synapse
Workspace StringId The ID of the Synapse Workspace where the encryption key should be configured.
- active boolean
Specifies if the workspace should be encrypted with this key.
Note: Only one key can actively encrypt a workspace. When performing a key rotation, setting a new key as the active key will disable existing keys.
- customer
Managed stringKey Name Specifies the name of the workspace key. Should match the name of the key in the synapse workspace.
- customer
Managed stringKey Versionless Id The Azure Key Vault Key Versionless ID to be used as the Customer Managed Key (CMK) for double encryption
- synapse
Workspace stringId The ID of the Synapse Workspace where the encryption key should be configured.
- active bool
Specifies if the workspace should be encrypted with this key.
Note: Only one key can actively encrypt a workspace. When performing a key rotation, setting a new key as the active key will disable existing keys.
- customer_
managed_ strkey_ name Specifies the name of the workspace key. Should match the name of the key in the synapse workspace.
- customer_
managed_ strkey_ versionless_ id The Azure Key Vault Key Versionless ID to be used as the Customer Managed Key (CMK) for double encryption
- synapse_
workspace_ strid The ID of the Synapse Workspace where the encryption key should be configured.
- active Boolean
Specifies if the workspace should be encrypted with this key.
Note: Only one key can actively encrypt a workspace. When performing a key rotation, setting a new key as the active key will disable existing keys.
- customer
Managed StringKey Name Specifies the name of the workspace key. Should match the name of the key in the synapse workspace.
- customer
Managed StringKey Versionless Id The Azure Key Vault Key Versionless ID to be used as the Customer Managed Key (CMK) for double encryption
- synapse
Workspace StringId The ID of the Synapse Workspace where the encryption key should be configured.
Import
Synapse Workspace Keys can be imported using the resource id
, e.g.
$ pulumi import azure:synapse/workspaceKey:WorkspaceKey example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Synapse/workspaces/workspace1/keys/key1
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
azurerm
Terraform Provider.