Skip to content

Commit 20e18bc

Browse files
committed
CLI samples
1 parent dc544c6 commit 20e18bc

File tree

2 files changed

+3
-31
lines changed

2 files changed

+3
-31
lines changed

articles/storage/common/customer-managed-keys-configure-cross-tenant-existing-account.md

Lines changed: 2 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ author: tamram
77

88
ms.service: storage
99
ms.topic: how-to
10-
ms.date: 10/04/2022
10+
ms.date: 10/14/2022
1111
ms.author: tamram
1212
ms.reviewer: ozgun
1313
ms.subservice: common
@@ -144,35 +144,7 @@ Set-AzStorageAccount -ResourceGroupName $rgName `
144144

145145
### [Azure CLI](#tab/azure-cli)
146146

147-
To configure cross-tenant customer-managed keys for a new storage account with Azure CLI, first install the [storage-preview](https://github.com/Azure/azure-cli-extensions/tree/main/src/storage-preview) extension. For more information about installing Azure CLI extensions, see [How to install and manage Azure CLI extensions](/cli/azure/azure-cli-extensions-overview).
148-
149-
Next, call [az storage account create](/cli/azure/storage/account#az-storage-account-create), providing the resource ID for the user-assigned managed identity that you configured previously in the ISV's subscription, and the application (client) ID for the multi-tenant application that you configured previously in the ISV's subscription. Provide the key vault URI and key name from the customer's key vault.
150-
151-
Remember to replace the placeholder values in brackets with your own values and to use the variables defined in the previous examples.
152-
153-
```azurecli
154-
accountName="<storage-account>"
155-
kvUri="<key-vault-uri>"
156-
keyName="<key-name>"
157-
multiTenantAppId="<multi-tenant-app-id>"
158-
159-
principalId=$(az identity show --name $managedIdentity --resource-group $isvRgName --query principalId --output tsv)
160-
identityResourceId=$(az identity show --name $managedIdentity --resource-group $isvRgName --query id --output tsv)
161-
162-
az storage account create \
163-
--name $accountName \
164-
--resource-group $isvRgName \
165-
--location $isvLocation \
166-
--sku Standard_LRS \
167-
--kind StorageV2 \
168-
--identity-type SystemAssigned,UserAssigned \
169-
--user-identity-id $identityResourceId \
170-
--encryption-key-vault $kvUri \
171-
--encryption-key-name $keyName \
172-
--encryption-key-source Microsoft.Keyvault \
173-
--key-vault-user-identity-id $identityResourceId \
174-
--key-vault-federated-client-id $multiTenantAppId
175-
```
147+
N/A
176148

177149
---
178150

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ author: tamram
77

88
ms.service: storage
99
ms.topic: how-to
10-
ms.date: 10/04/2022
10+
ms.date: 10/14/2022
1111
ms.author: tamram
1212
ms.reviewer: ozgun
1313
ms.subservice: common

0 commit comments

Comments
 (0)