Skip to content

Commit 6de68d7

Browse files
committed
Adding ARM and REST to tabs
1 parent 7136bcb commit 6de68d7

File tree

1 file changed

+88
-0
lines changed

1 file changed

+88
-0
lines changed

articles/virtual-machines/disks-cross-tenant-customer-managed-keys.md

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,94 @@ In the command below, `myAssignedId` should be the resource ID of the user-assig
8282
az disk-encryption-set create --resource-group MyResourceGroup --name MyDiskEncryptionSet --key-url MyKey --mi-user-assigned myAssignedId --federated-client-id myFederatedClientId --location westcentralus
8383
```
8484

85+
# [ARM](#tab/arm)
86+
87+
```json
88+
{
89+
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
90+
"contentVersion": "1.0.0.0",
91+
"parameters": {
92+
"desname": {
93+
"defaultValue": "<Enter ISV disk encryption set name>",
94+
"type": "String"
95+
},
96+
"region": {
97+
"defaultValue": "WestCentralUS",
98+
"type": "String"
99+
},
100+
"userassignedmicmk": {
101+
"defaultValue": "/subscriptions/<Enter ISV Subscription Id>/resourceGroups/<Enter ISV resource group name>/providers/Microsoft.ManagedIdentity/userAssignedIdentities/<Enter ISV User Assigned Identity Name>",
102+
"type": "String"
103+
},
104+
"cmkfederatedclientId": {
105+
"defaultValue": "<Enter ISV Multi-Tenant App Id>",
106+
"type": "String"
107+
},
108+
"keyVaultURL": {
109+
"defaultValue": "<Enter Client Key URL>",
110+
"type": "String"
111+
},
112+
"encryptionType": {
113+
"defaultValue": "EncryptionAtRestWithCustomerKey",
114+
"type": "String"
115+
}
116+
},
117+
"variables": {},
118+
"resources": [
119+
{
120+
"type": "Microsoft.Compute/diskEncryptionSets",
121+
"apiVersion": "2021-12-01",
122+
"name": "[parameters('desname')]",
123+
"location": "[parameters('region')]",
124+
"identity": {
125+
"type": "UserAssigned",
126+
"userAssignedIdentities": {
127+
"[parameters('userassignedmicmk')]": {}
128+
}
129+
},
130+
"properties": {
131+
"activeKey": {
132+
"keyUrl": "[parameters('keyVaultURL')]"
133+
},
134+
"federatedClientId": "[parameters('cmkfederatedclientId')]",
135+
"encryptionType": "[parameters('encryptionType')]"
136+
}
137+
}
138+
]
139+
}
140+
```
141+
142+
# [REST API](#tab/rest)
143+
144+
Use bearer token as authorization header and application/JSON as content type in BODY. (Network tab, filter to management.azure while performing any ARM request on portal.)
145+
146+
```rest
147+
PUT https://management.azure.com/subscriptions/<Enter ISV Subscription Id>/resourceGroups/<Enter ISV Resource Group Name>/providers/Microsoft.Compute/diskEncryptionSets/<Enter ISV Disk Encryption Set Name>?api-version=2021-12-01
148+
Authorization: Bearer ...
149+
Content-Type: application/json
150+
151+
{
152+
"name": "<Enter ISV disk encryption set name>",
153+
"id": "/subscriptions/<Enter ISV Subscription Id>/resourceGroups/<Enter ISV resource group name>/providers/Microsoft.Compute/diskEncryptionSets/<Enter ISV disk encryption set name>/",
154+
"type": "Microsoft.Compute/diskEncryptionSets",
155+
"location": "westcentralus",
156+
"identity": {
157+
"type": "UserAssigned",
158+
"userAssignedIdentities": {
159+
"/subscriptions/<Enter ISV Subscription Id>/resourceGroups/<Enter ISV resource group name>/providers/Microsoft.ManagedIdentity/userAssignedIdentities/<Enter ISV User Assigned Identity Name>
160+
": {}
161+
}
162+
},
163+
"properties": {
164+
"activeKey": {
165+
"keyUrl": "<Enter Client Key URL>"
166+
},
167+
"encryptionType": "EncryptionAtRestWithCustomerKey",
168+
"federatedClientId": "<Enter ISV Multi-Tenant App Id>"
169+
}
170+
}
171+
```
172+
85173
---
86174

87175
### ARM

0 commit comments

Comments
 (0)