Skip to content

Commit edaad80

Browse files
committed
Reorganized article
1 parent 9fc0559 commit edaad80

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

articles/key-vault/tutorial-net-windows-virtual-machine.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ When you enable MSI for an Azure service, such as Azure Virtual Machines, Azure
4949

5050
Next, to get an access token, your code calls a local metadata service that's available on the Azure resource. To authenticate to an Azure Key Vault service, your code uses the access token that it gets from the local MSI endpoint.
5151

52-
## Set up the project
52+
## Create resources and assign permissions
5353

54-
Before you start coding you need to create some resources, put a secret into your key vault, and set up the .NET project.
54+
Before you start coding you need to create some resources, put a secret into your key vault, and assign permissions.
5555

5656
### Log in to Azure
5757

@@ -61,9 +61,7 @@ To log in to Azure by using the Azure CLI, enter:
6161
az login
6262
```
6363

64-
### Create resources and assign permissions
65-
66-
#### Create a resource group
64+
### Create a resource group
6765

6866
An Azure resource group is a logical container into which Azure resources are deployed and managed. Create a resource group by using the [az group create](/cli/azure/group#az-group-create) command.
6967

@@ -76,7 +74,7 @@ az group create --name "<YourResourceGroupName>" --location "West US"
7674

7775
Your newly created resource group will be used throughout this tutorial.
7876

79-
#### Create a key vault and populate it with a secret
77+
### Create a key vault and populate it with a secret
8078

8179
Create a key vault in your resource group by providing the [az keyvault create](/cli/azure/keyvault?view=azure-cli-latest#az-keyvault-create) command with the following information:
8280

@@ -100,14 +98,14 @@ az keyvault secret set --vault-name "<YourKeyVaultName>" --name "AppSecret" --va
10098

10199
This secret stores the value **MySecret**.
102100

103-
#### Create a virtual machine
101+
### Create a virtual machine
104102
Create a virtual machine by using one of the following methods:
105103

106104
* [The Azure CLI](https://docs.microsoft.com/azure/virtual-machines/windows/quick-create-cli)
107105
* [PowerShell](https://docs.microsoft.com/azure/virtual-machines/windows/quick-create-powershell)
108106
* [The Azure portal](https://docs.microsoft.com/azure/virtual-machines/windows/quick-create-portal)
109107

110-
#### Assign an identity to the VM
108+
### Assign an identity to the VM
111109
Create a system-assigned identity for the virtual machine bwith the [az vm identity assign]/cli/azure/vm/identity?view=azure-cli-latest#az-vm-identity-assign) command:
112110

113111
```azurecli
@@ -123,24 +121,26 @@ Note the system-assigned identity that's displayed in the following code. The ou
123121
}
124122
```
125123

126-
#### Assign permissions to the VM identity
124+
### Assign permissions to the VM identity
127125
Assign the previously created identity permissions to your key vault with the [az keyvault set-policy](/cli/azure/keyvault?view=azure-cli-latest#az-keyvault-set-policy) command:
128126

129127
```azurecli
130128
az keyvault set-policy --name '<YourKeyVaultName>' --object-id <VMSystemAssignedIdentity> --secret-permissions get list
131129
```
132130

133-
#### Log on to the virtual machine
131+
### Log on to the virtual machine
134132

135133
To log on to the virtual machine, follow the instructions in [Connect and log on to an Azure virtual machine running Windows](https://docs.microsoft.com/azure/virtual-machines/windows/connect-logon).
136134

137135
## Set up the console app
138136

139-
## Install .NET Core
137+
Create a console app and install the required packages using the `dotnet` command.
138+
139+
### Install .NET Core
140140

141141
To install .NET Core, go to the [.NET downloads](https://www.microsoft.com/net/download) page.
142142

143-
## Create and run a sample .NET app
143+
### Create and run a sample .NET app
144144

145145
Open a command prompt.
146146

0 commit comments

Comments
 (0)