Skip to content

Commit d616d8c

Browse files
committed
update images for CMK
1 parent 2f3147a commit d616d8c

File tree

3 files changed

+34
-19
lines changed

3 files changed

+34
-19
lines changed

articles/storage/common/customer-managed-keys-configure-new-account.md

Lines changed: 34 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ To configure customer-managed keys for a new storage account with automatic upda
126126

127127
:::image type="content" source="media/customer-managed-keys-configure-new-account/portal-new-account-configure-cmk.png" alt-text="Screenshot showing how to configure customer-managed keys for a new storage account in Azure portal":::
128128

129-
1. Select **Review + create** to validate and create the new account.
129+
1. Select the **Review** button to validate and create the account.
130130

131131
You can also configure customer-managed keys with manual updating of the key version when you create a new storage account. Follow the steps described in [Configure encryption for manual updating of key versions](#configure-encryption-for-manual-updating-of-key-versions).
132132

@@ -170,48 +170,57 @@ az storage account create \
170170

171171
### Configure encryption for manual updating of key versions
172172

173-
If you prefer to manually update the key version, then explicitly specify the version at the time that you configure encryption with customer-managed keys. In this case, Azure Storage will not automatically update the key version when a new version is created in the key vault. To use a new key version, you must manually update the version used for Azure Storage encryption.
173+
If you prefer to manually update the key version, then explicitly specify the version when you configure encryption with customer-managed keys while creating the storage account. In this case, Azure Storage will not automatically update the key version when a new version is created in the key vault. To use a new key version, you must manually update the version used for Azure Storage encryption.
174174

175-
???update with create steps???
175+
You must use an existing user-assigned managed identity to authorize access to the key vault when you configure customer-managed keys while creating the storage account. The user-assigned managed identity must have appropriate permissions to access the key vault. For more information, see [Authenticate to Azure Key Vault](../../key-vault/general/authentication.md).
176176

177177
# [Azure portal](#tab/portal)
178178

179-
To configure customer-managed keys with manual updating of the key version in the Azure portal, specify the key URI, including the version. To specify a key as a URI, follow these steps:
179+
To configure customer-managed keys with manual updating of the key version in the Azure portal, specify the key URI, including the version, while creating the storage account. To specify a key as a URI, follow these steps:
180180

181+
1. In the Azure portal, navigate to the **Storage accounts** page, and select the **Create** button to create a new account.
182+
1. Follow the steps outlined in [Create a storage account](storage-account-create.md) to fill out the fields on the **Basics**, **Advanced**, **Networking**, and **Data Protection** tabs.
183+
1. On the **Encryption** tab, indicate for which services you want to enable support for customer-managed keys in the **Enable support for customer-managed keys** field.
184+
1. In the **Encryption type** field, select **Customer-managed keys (CMK)**.
181185
1. To locate the key URI in the Azure portal, navigate to your key vault, and select the **Keys** setting. Select the desired key, then click the key to view its versions. Select a key version to view the settings for that version.
182186
1. Copy the value of the **Key Identifier** field, which provides the URI.
183187

184188
:::image type="content" source="media/customer-managed-keys-configure-new-account/portal-copy-key-identifier.png" alt-text="Screenshot showing key vault key URI in Azure portal":::
185189

186190
1. In the **Encryption key** settings for your storage account, choose the **Enter key URI** option.
187-
1. Paste the URI that you copied into the **Key URI** field. Omit the key version from the URI to enable automatic updating of the key version.
191+
1. Paste the URI that you copied into the **Key URI** field. Include the key version on the URI to configure manual updating of the key version.
192+
1. Specify a user-assigned managed identity by choosing the **Select an identity** link.
188193

189194
:::image type="content" source="media/customer-managed-keys-configure-new-account/portal-specify-key-uri.png" alt-text="Screenshot showing how to enter key URI in Azure portal":::
190195

191-
1. Specify the subscription that contains the key vault.
192-
1. Specify either a system-assigned or user-assigned managed identity.
193-
1. Save your changes.
196+
1. Select the **Review** button to validate and create the account.
194197

195198
# [PowerShell](#tab/powershell)
196199

197-
To configure customer-managed keys with manual updating of the key version, explicitly provide the key version when you configure encryption for the storage account. Call [Set-AzStorageAccount](/powershell/module/az.storage/set-azstorageaccount) to update the storage account's encryption settings, as shown in the following example, and include the **-KeyvaultEncryption** option to enable customer-managed keys for the storage account.
200+
To configure customer-managed keys with manual updating of the key version, explicitly provide the key version when you configure encryption while creating the storage account. Call [Set-AzStorageAccount](/powershell/module/az.storage/set-azstorageaccount) to update the storage account's encryption settings, as shown in the following example, and include the **-KeyvaultEncryption** option to enable customer-managed keys for the storage account.
198201

199202
Remember to replace the placeholder values in brackets with your own values and to use the variables defined in the previous examples.
200203

201204
```azurepowershell
202-
Set-AzStorageAccount -ResourceGroupName $storageAccount.ResourceGroupName `
203-
-AccountName $storageAccount.StorageAccountName `
204-
-KeyvaultEncryption `
205+
New-AzStorageAccount -ResourceGroupName <resource-group> `
206+
-Name <storage-account> `
207+
-Kind StorageV2 `
208+
-SkuName Standard_LRS `
209+
-Location $location `
210+
-IdentityType SystemAssignedUserAssigned `
211+
-UserIdentityId $userIdentityId `
212+
-KeyVaultUri $keyVault.VaultUri `
205213
-KeyName $key.Name `
206214
-KeyVersion $key.Version `
207-
-KeyVaultUri $keyVault.VaultUri
215+
-KeyVaultUserAssignedIdentityId $userIdentityId
208216
```
209217

218+
210219
When you manually update the key version, you will need to update the storage account's encryption settings to use the new version. First, call [Get-AzKeyVaultKey](/powershell/module/az.keyvault/get-azkeyvaultkey) to get the latest version of the key. Then call [Set-AzStorageAccount](/powershell/module/az.storage/set-azstorageaccount) to update the storage account's encryption settings to use the new version of the key, as shown in the previous example.
211220

212221
# [Azure CLI](#tab/azure-cli)
213222

214-
To configure customer-managed keys with manual updating of the key version, explicitly provide the key version when you configure encryption for the storage account. Call [az storage account update](/cli/azure/storage/account#az-storage-account-update) to update the storage account's encryption settings, as shown in the following example. Include the `--encryption-key-source` parameter and set it to `Microsoft.Keyvault` to enable customer-managed keys for the account.
223+
To configure customer-managed keys with manual updating of the key version, explicitly provide the key version when you configure encryption while creating the storage account. Call [az storage account update](/cli/azure/storage/account#az-storage-account-update) to update the storage account's encryption settings, as shown in the following example. Include the `--encryption-key-source` parameter and set it to `Microsoft.Keyvault` to enable customer-managed keys for the account.
215224

216225
Remember to replace the placeholder values in brackets with your own values.
217226

@@ -226,13 +235,19 @@ key_version=$(az keyvault key list-versions \
226235
--vault-name <key-vault> \
227236
--query [-1].kid \
228237
--output tsv | cut -d '/' -f 6)
229-
az storage account update
238+
az storage account create \
230239
--name <storage-account> \
231-
--resource-group <resource_group> \
232-
--encryption-key-name <key> \
233-
--encryption-key-version $key_version \
240+
--resource-group <resource-group> \
241+
--location <location> \
242+
--sku Standard_LRS \
243+
--kind StorageV2 \
244+
--identity-type SystemAssigned,UserAssigned \
245+
--user-identity-id <user-assigned-managed-identity> \
246+
--encryption-key-vault $key_vault_uri \
247+
--encryption-key-name <key-name> \
234248
--encryption-key-source Microsoft.Keyvault \
235-
--encryption-key-vault $key_vault_uri
249+
--encryption-key-version $key_version \
250+
--key-vault-user-identity-id <user-assigned-managed-identity>
236251
```
237252

238253
When you manually update the key version, you will need to update the storage account's encryption settings to use the new version. First, query for the key vault URI by calling [az keyvault show](/cli/azure/keyvault#az-keyvault-show), and for the key version by calling [az keyvault key list-versions](/cli/azure/keyvault/key#az-keyvault-key-list-versions). Then call [az storage account update](/cli/azure/storage/account#az-storage-account-update) to update the storage account's encryption settings to use the new version of the key, as shown in the previous example.
-1.39 KB
Loading
8.34 KB
Loading

0 commit comments

Comments
 (0)