You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/active-directory/managed-service-identity/msi-tutorial-linux-vm-access-arm.md
+19-19Lines changed: 19 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -69,29 +69,29 @@ For this tutorial, you first create a new Linux VM. You can also opt to use an e
69
69
70
70
2. Create a user-assigned identity using [az identity create](/cli/azure/identity#az_identity_create). The `-g` parameter specifies the resource group where the MSI is created, and the `-n` parameter specifies its name. Be sure to replace the `<RESOURCE GROUP>` and `<MSI NAME>` parameter values with your own values:
az identity create -g <RESOURCE GROUP> -n <MSI NAME>
77
-
```
75
+
```azurecli-interactive
76
+
az identity create -g <RESOURCE GROUP> -n <MSI NAME>
77
+
```
78
78
79
-
The response contains details for the user assigned identity created, similar to the following example. Note the `id` value for your user assigned identity, as it will be used in the next step:
79
+
The response contains details for the user assigned identity created, similar to the following example. Note the `id` value for your user assigned identity, as it will be used in the next step:
az identity create -g myResourceGroup -n myUserAssignedIdentity
121
-
```
119
+
```azurecli-interactive
120
+
az identity create -g myResourceGroup -n myUserAssignedIdentity
121
+
```
122
122
The response contains details for the user assigned identity created, similar to the following. The resource id value assigned to the user assigned identity is used in the following step.
3. Create a VM using [az vm create](/cli/azure/vm/#az_vm_create). The following example creates a VM associated with the new user assigned identity, as specified by the `--assign-identity` parameter. Be sure to replace the `<RESOURCE GROUP>`, `<VM NAME>`, `<USER NAME>`, `<PASSWORD>`, and `<MSI ID>` parameter values with your own values. For `<MSI ID>`, use the user assigned identity's resource `id` property created in the previous step:
140
140
141
-
```azurecli-interactive
142
-
az vm create --resource-group <RESOURCE GROUP> --name <VM NAME> --image UbuntuLTS --admin-username <USER NAME> --admin-password <PASSWORD> --assign-identity <MSI ID>
143
-
```
141
+
```azurecli-interactive
142
+
az vm create --resource-group <RESOURCE GROUP> --name <VM NAME> --image UbuntuLTS --admin-username <USER NAME> --admin-password <PASSWORD> --assign-identity <MSI ID>
143
+
```
144
144
145
145
### Assign a user assigned identity to an existing Azure VM
0 commit comments