Skip to content

Commit 0e80505

Browse files
committed
Image and other issues
1 parent af28ca0 commit 0e80505

File tree

3 files changed

+31
-31
lines changed

3 files changed

+31
-31
lines changed

articles/virtual-machines/linux/disk-encryption.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -100,26 +100,26 @@ For now, customer-managed keys have the following restrictions:
100100
101101
1. Create an instance of a DiskEncryptionSet.
102102
103-
```azurecli
104-
keyVaultId=$(az keyvault show --name $keyVaultName --query [id] -o tsv)
105-
106-
keyVaultKeyUrl=$(az keyvault key show --vault-name $keyVaultName --name $keyName --query [key.kid] -o tsv)
107-
108-
az disk-encryption-set create -n $diskEncryptionSetName -l $location -g $rgName --source-vault $keyVaultId --key-url $keyVaultKeyUrl
109-
```
103+
```azurecli
104+
keyVaultId=$(az keyvault show --name $keyVaultName --query [id] -o tsv)
105+
106+
keyVaultKeyUrl=$(az keyvault key show --vault-name $keyVaultName --name $keyName --query [key.kid] -o tsv)
107+
108+
az disk-encryption-set create -n $diskEncryptionSetName -l $location -g $rgName --source-vault $keyVaultId --key-url $keyVaultKeyUrl
109+
```
110110
111111
1. Grant the DiskEncryptionSet resource access to the key vault.
112112
113-
> [!NOTE]
114-
> It may take few minutes for Azure to create the identity of your DiskEncryptionSet in your Azure Active Directory. If you get an error like "Cannot find the Active Directory object" when running the following command, wait a few minutes and try again.
113+
> [!NOTE]
114+
> It may take few minutes for Azure to create the identity of your DiskEncryptionSet in your Azure Active Directory. If you get an error like "Cannot find the Active Directory object" when running the following command, wait a few minutes and try again.
115115
116-
```azurecli
117-
desIdentity=$(az disk-encryption-set show -n $diskEncryptionSetName -g $rgName --query [identity.principalId] -o tsv)
118-
119-
az keyvault set-policy -n $keyVaultName -g $rgName --object-id $desIdentity --key-permissions wrapkey unwrapkey get
120-
121-
az role assignment create --assignee $desIdentity --role Reader --scope $keyVaultId
122-
```
116+
```azurecli
117+
desIdentity=$(az disk-encryption-set show -n $diskEncryptionSetName -g $rgName --query [identity.principalId] -o tsv)
118+
119+
az keyvault set-policy -n $keyVaultName -g $rgName --object-id $desIdentity --key-permissions wrapkey unwrapkey get
120+
121+
az role assignment create --assignee $desIdentity --role Reader --scope $keyVaultId
122+
```
123123
124124
#### Create a VM using a Marketplace image, encrypting the OS and data disks with customer-managed keys
125125

articles/virtual-machines/windows/disk-encryption.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -98,24 +98,24 @@ For now, customer-managed keys have the following restrictions:
9898
9999
1. Create an instance of a DiskEncryptionSet.
100100
101-
```powershell
102-
$desConfig=New-AzDiskEncryptionSetConfig -Location $LocationName -SourceVaultId $keyVault.ResourceId -KeyUrl $key.Key.Kid -IdentityType SystemAssigned
103-
104-
$des=New-AzDiskEncryptionSet -Name $diskEncryptionSetName -ResourceGroupName $ResourceGroupName -InputObject $desConfig
105-
```
101+
```powershell
102+
$desConfig=New-AzDiskEncryptionSetConfig -Location $LocationName -SourceVaultId $keyVault.ResourceId -KeyUrl $key.Key.Kid -IdentityType SystemAssigned
103+
104+
$des=New-AzDiskEncryptionSet -Name $diskEncryptionSetName -ResourceGroupName $ResourceGroupName -InputObject $desConfig
105+
```
106106
107107
1. Grant the DiskEncryptionSet resource access to the key vault.
108108
109-
> [!NOTE]
110-
> It may take few minutes for Azure to create the identity of your DiskEncryptionSet in your Azure Active Directory. If you get an error like "Cannot find the Active Directory object" when running the following command, wait a few minutes and try again.
111-
112-
```powershell
113-
$identity = Get-AzADServicePrincipal -DisplayName myDiskEncryptionSet1
114-
115-
Set-AzKeyVaultAccessPolicy -VaultName $keyVaultName -ObjectId $des.Identity.PrincipalId -PermissionsToKeys wrapkey,unwrapkey,get
116-
117-
New-AzRoleAssignment -ResourceName $keyVaultName -ResourceGroupName $ResourceGroupName -ResourceType "Microsoft.KeyVault/vaults" -ObjectId $des.Identity.PrincipalId -RoleDefinitionName "Reader"
118-
```
109+
> [!NOTE]
110+
> It may take few minutes for Azure to create the identity of your DiskEncryptionSet in your Azure Active Directory. If you get an error like "Cannot find the Active Directory object" when running the following command, wait a few minutes and try again.
111+
112+
```powershell
113+
$identity = Get-AzADServicePrincipal -DisplayName myDiskEncryptionSet1
114+
115+
Set-AzKeyVaultAccessPolicy -VaultName $keyVaultName -ObjectId $des.Identity.PrincipalId -PermissionsToKeys wrapkey,unwrapkey,get
116+
117+
New-AzRoleAssignment -ResourceName $keyVaultName -ResourceGroupName $ResourceGroupName -ResourceType "Microsoft.KeyVault/vaults" -ObjectId $des.Identity.PrincipalId -RoleDefinitionName "Reader"
118+
```
119119
120120
#### Create a VM using a Marketplace image, encrypting the OS and data disks with customer-managed keys
121121
-13.1 KB
Loading

0 commit comments

Comments
 (0)