Skip to content

Commit d45997a

Browse files
committed
acrolinx
1 parent 652612b commit d45997a

File tree

1 file changed

+27
-28
lines changed

1 file changed

+27
-28
lines changed

articles/virtual-network/virtual-network-service-endpoint-policies.md

Lines changed: 27 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ Service endpoint policies enable you to filter virtual network traffic to specif
2424
> [!div class="checklist"]
2525
* Create a virtual network.
2626
* Add a subnet and enable service endpoint for Azure Storage.
27-
* Create two Azure Storage accounts and allow network access to it from the subnet created above.
27+
* Create two Azure Storage accounts and allow network access to it from the subnet in the virtual network.
2828
* Create a service endpoint policy to allow access only to one of the storage accounts.
2929
* Deploy a virtual machine (VM) to the subnet.
3030
* Confirm access to the allowed storage account from the subnet.
31-
* Confirm access is denied to the non-allowed storage account from the subnet.
31+
* Confirm access is denied to the nonallowed storage account from the subnet.
3232

3333
## Prerequisites
3434

@@ -70,7 +70,7 @@ Create a virtual network to contain the resources you create in this tutorial.
7070
| -------| ------- |
7171
| **Project details** | |
7272
| Subscription | Select your subscription. |
73-
| Resource group | Select **Create new**. </br> Enter **test-rg** in **Name**. </br> Select **OK**. |
73+
| Resource group | Select **Create new**.</br> Enter **test-rg** in **Name**.</br> Select **OK**. |
7474
| Name | Enter **vnet-1**. |
7575
| Region | Select **West US 2**. |
7676

@@ -152,7 +152,7 @@ az network vnet create \
152152
--subnet-prefix 10.0.0.0/24
153153
```
154154

155-
In this example, a service endpoint for *Microsoft.Storage* is created for the subnet *subnet-1*:
155+
In this example, a service endpoint for `Microsoft.Storage` is created for the subnet *subnet-1*:
156156

157157
```azurecli-interactive
158158
az network vnet subnet create \
@@ -163,12 +163,11 @@ az network vnet subnet create \
163163
--service-endpoints Microsoft.Storage
164164
```
165165

166-
167166
---
168167

169168
## Restrict network access for the subnet
170169

171-
Create a network security group and rules to restrict network access for the subnet.
170+
Create a network security group and rules that restrict network access for the subnet.
172171

173172
### Create a network security group
174173

@@ -178,7 +177,7 @@ Create a network security group and rules to restrict network access for the sub
178177

179178
1. Select **+ Create** to create a new network security group.
180179

181-
1. In the **Basics** tab of **Create network security group**, enter or select the following information.
180+
1. In the **Basics** tab of **Create network security group**, enter, or select the following information.
182181

183182
| Setting | Value |
184183
| -------| ------- |
@@ -394,7 +393,7 @@ The steps necessary to restrict network access to resources created through Azur
394393
| Subscription | Select your subscription. |
395394
| Resource group | Select **test-rg**. |
396395
| **Instance details** | |
397-
| Storage account name | Enter **allowedaccount(random-number)**. </br> **Note: The storage account name must be unique. Add a random number to the end of the name allowedaccount**. |
396+
| Storage account name | Enter **allowedaccount(random-number)**.</br> **Note: The storage account name must be unique. Add a random number to the end of the name `allowedaccount`**. |
398397
| Region | Select **West US 2**. |
399398
| Performance | Select **Standard**. |
400399
| Redundancy | Select **Locally-redundant storage (LRS)**. |
@@ -407,7 +406,7 @@ The steps necessary to restrict network access to resources created through Azur
407406

408407
1. Select **Create**.
409408

410-
1. Repeat the steps above to create another storage account with the following information.
409+
1. Repeat the previous steps to create another storage account with the following information.
411410

412411
| Setting | Value |
413412
| -------| ------- |
@@ -428,7 +427,7 @@ $storageAcctParams = @{
428427
New-AzStorageAccount @storageAcctParams
429428
```
430429

431-
Use the same command to create the denied Azure storage account, but change the name to *deniedaccount*.
430+
Use the same command to create the denied Azure storage account, but change the name to `deniedaccount`.
432431

433432
```azurepowershell-interactive
434433
$storageAcctParams = @{
@@ -455,7 +454,7 @@ az storage account create \
455454
--kind StorageV2
456455
```
457456

458-
Use the same command to create the denied Azure storage account, but change the name to *deniedaccount*.
457+
Use the same command to create the denied Azure storage account, but change the name to `deniedaccount`.
459458

460459
```azurecli-interactive
461460
storageAcctName2="deniedaccount"
@@ -491,13 +490,13 @@ az storage account create \
491490

492491
1. Select **Create**.
493492

494-
1. Repeat the steps above to create a file share in **deniedaccount(random-number)**.
493+
1. Repeat the previous steps to create a file share in **deniedaccount(random-number)**.
495494

496495
### [PowerShell](#tab/powershell)
497496

498497
### Create allowed storage account file share
499498

500-
Use [Get-AzStorageAccountKey](/powershell/module/az.storage/get-azstorageaccountkey) to get the storage account key for the allowed storage account. You will use this key in the next step to create a file share in the allowed storage account.
499+
Use [Get-AzStorageAccountKey](/powershell/module/az.storage/get-azstorageaccountkey) to get the storage account key for the allowed storage account. You'll use this key in the next step to create a file share in the allowed storage account.
501500

502501
```azurepowershell-interactive
503502
$storageAcctName1 = "allowedaccount"
@@ -522,7 +521,7 @@ $share1 = New-AzStorageShare file-share -Context $storageContext1
522521

523522
### Create denied storage account file share
524523

525-
Use [Get-AzStorageAccountKey](/powershell/module/az.storage/get-azstorageaccountkey) to get the storage account key for the allowed storage account. You will use this key in the next step to create a file share in the denied storage account.
524+
Use [Get-AzStorageAccountKey](/powershell/module/az.storage/get-azstorageaccountkey) to get the storage account key for the allowed storage account. You'll use this key in the next step to create a file share in the denied storage account.
526525

527526
```azurepowershell-interactive
528527
$storageAcctName2 = "deniedaccount"
@@ -619,11 +618,11 @@ By default, storage accounts accept network connections from clients in any netw
619618

620619
1. Select **Save**.
621620

622-
1. Repeat the steps above to deny network access to **deniedaccount(random-number)**.
621+
1. Repeat the previous steps to deny network access to **deniedaccount(random-number)**.
623622

624623
### [PowerShell](#tab/powershell)
625624

626-
Use [Update-AzStorageAccountNetworkRuleSet](/powershell/module/az.storage/update-azstorageaccountnetworkruleset) to deny access to the storage accounts except from the virtual network and subnet you created eariler. Once network access is denied, the storage account is not accessible from any network.
625+
Use [Update-AzStorageAccountNetworkRuleSet](/powershell/module/az.storage/update-azstorageaccountnetworkruleset) to deny access to the storage accounts except from the virtual network and subnet you created earlier. Once network access is denied, the storage account isn't accessible from any network.
627626

628627
```azurepowershell-interactive
629628
$storageAcctParams1 = @{
@@ -673,7 +672,7 @@ Add-AzStorageAccountNetworkRule @networkRuleParams2
673672

674673
### [CLI](#tab/cli)
675674

676-
By default, storage accounts accept network connections from clients in any network. To limit access to selected networks, change the default action to *Deny* with [az storage account update](/cli/azure/storage/account). Once network access is denied, the storage account is not accessible from any network.
675+
By default, storage accounts accept network connections from clients in any network. To limit access to selected networks, change the default action to *Deny* with [az storage account update](/cli/azure/storage/account). Once network access is denied, the storage account isn't accessible from any network.
677676

678677
```azurecli-interactive
679678
az storage account update \
@@ -709,7 +708,7 @@ az storage account network-rule add \
709708

710709
## Apply policy to allow access to valid storage account
711710

712-
To make sure the users in the virtual network can only access the Azure Storage accounts that are safe and allowed, you can create a service endpoint policy with the list of allowed storage accounts in the definition. This policy is then applied to the virtual network subnet which is connected to storage via service endpoints.
711+
You can create a service endpoint policy. The policy ensures users in the virtual network can only access safe and allowed Azure Storage accounts. This policy contains a list of allowed storage accounts applied to the virtual network subnet that is connected to storage via service endpoints.
713712

714713
### Create a service endpoint policy
715714

@@ -754,7 +753,7 @@ This section creates the policy definition with the list of allowed resources fo
754753

755754
### [PowerShell](#tab/powershell)
756755

757-
Use [Get-AzStorageAccount](/powershell/module/az.storage/get-azstorageaccount) to retrieve the resource ID for the first (allowed) storage account.
756+
To retrieve the resource ID for the first (allowed) storage account, use [Get-AzStorageAccount](/powershell/module/az.storage/get-azstorageaccount).
758757

759758
```azurepowershell-interactive
760759
$storageAcctParams1 = @{
@@ -764,7 +763,7 @@ $storageAcctParams1 = @{
764763
$resourceId = (Get-AzStorageAccount @storageAcctParams1).id
765764
```
766765

767-
Use [New-AzServiceEndpointPolicyDefinition](/powershell/module/az.network/new-azserviceendpointpolicydefinition) to create the policy definition to allow the above resource.
766+
To create the policy definition to allow the previous resource, use [New-AzServiceEndpointPolicyDefinition](/powershell/module/az.network/new-azserviceendpointpolicydefinition) .
768767

769768
```azurepowershell-interactive
770769
$policyDefinitionParams = @{
@@ -790,7 +789,7 @@ $sepolicy = New-AzServiceEndpointPolicy @sepolicyParams
790789

791790
### [CLI](#tab/cli)
792791

793-
Service endpoint policies are applied over service endpoints. We will start by creating a service endpoint policy. We will then create the policy definitions under this policy for Azure Storage accounts to be approved for this subnet
792+
Service endpoint policies are applied over service endpoints. Start by creating a service endpoint policy. Then create the policy definitions under this policy for Azure Storage accounts to be approved for this subnet
794793

795794
Use [az storage account show](/cli/azure/storage/account) to get the resource ID for the storage account that is allowed.
796795

@@ -888,7 +887,7 @@ To test network access to a storage account, deploy a VM in the subnet.
888887

889888
1. In the search box in the portal, enter **Virtual machines**. Select **Virtual machines** in the search results.
890889

891-
1. In the **Basics** tab of **Create a virtual machine**, enter or select the following information:
890+
1. In the **Basics** tab of **Create a virtual machine**, enter, or select the following information:
892891

893892
| Setting | Value |
894893
| -------| ------- |
@@ -900,7 +899,7 @@ To test network access to a storage account, deploy a VM in the subnet.
900899
| Region | Select **(US) West US 2**. |
901900
| Availability options | Select **No infrastructure redundancy required**. |
902901
| Security type | Select **Standard**. |
903-
| Image | Select **Windows Server 2022 Datacenter** - x64 Gen2**. |
902+
| Image | Select **Windows Server 2022 Datacenter - x64 Gen2**. |
904903
| Size | Select a size. |
905904
| **Administrator account** | |
906905
| Username | Enter a username. |
@@ -916,7 +915,7 @@ To test network access to a storage account, deploy a VM in the subnet.
916915
| -------| ------- |
917916
| **Network interface** | |
918917
| Virtual network | Select **vnet-1**. |
919-
| Subnet | Select **subnet-1* (10.0.0.0/24)*. |
918+
| Subnet | Select **subnet-1 (10.0.0.0/24)**. |
920919
| Public IP | Select **None**. |
921920
| NIC network security group | Select **None**. |
922921

@@ -926,7 +925,7 @@ To test network access to a storage account, deploy a VM in the subnet.
926925

927926
### [PowerShell](#tab/powershell)
928927

929-
Create a virtual machine in the *subnet-1* subnet with [New-AzVM](/powershell/module/az.compute/new-azvm). When running the command that follows, you are prompted for credentials. The values that you enter are configured as the user name and password for the VM. The `-AsJob` option creates the VM in the background, so that you can continue to the next step.
928+
Create a virtual machine in the *subnet-1* subnet with [New-AzVM](/powershell/module/az.compute/new-azvm). When running the command that follows, you're prompted for credentials. The values that you enter are configured as the user name and password for the VM. The `-AsJob` option creates the VM in the background, so that you can continue to the next step.
930929

931930
```azurepowershell-interactive
932931
$vmParams = @{
@@ -967,7 +966,7 @@ az vm create \
967966

968967
1. Expand **Security + networking** and select **Access keys**.
969968

970-
1. Copy the **key1** value. You will use this key to map a drive to the storage account from the virtual machine you created earlier.
969+
1. Copy the **key1** value. You use this key to map a drive to the storage account from the virtual machine you created earlier.
971970

972971
1. In the search box in the portal, enter **Virtual machines**. Select **Virtual machines** in the search results.
973972

@@ -1007,7 +1006,7 @@ az vm create \
10071006
10081007
1. Expand **Security + networking** and select **Access keys**.
10091008
1010-
1. Copy the **key1** value. You will use this key to map a drive to the storage account from the virtual machine you created earlier.
1009+
1. Copy the **key1** value. You use this key to map a drive to the storage account from the virtual machine you created earlier.
10111010
10121011
1. In the search box in the portal, enter **Virtual machines**. Select **Virtual machines** in the search results.
10131012
@@ -1031,7 +1030,7 @@ az vm create \
10311030
10321031
1. Select **Run**.
10331032
1034-
1. You will receive the following error message in the **Output** box:
1033+
1. You receive the following error message in the **Output** box:
10351034
10361035
```output
10371036
New-PSDrive : Access is denied

0 commit comments

Comments
 (0)