Skip to content

Commit 96bfee6

Browse files
committed
cleanup and edits
1 parent bee4f39 commit 96bfee6

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

articles/storage/files/storage-files-configure-s2s-vpn.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Learn how to configure a site-to-site (S2S) VPN for use with Azure
44
author: khdownie
55
ms.service: azure-file-storage
66
ms.topic: how-to
7-
ms.date: 09/04/2024
7+
ms.date: 09/05/2024
88
ms.author: kendownie
99
---
1010

@@ -74,19 +74,21 @@ To add a new or existing virtual network to your storage account, follow these s
7474
# Define parameters
7575
$storageAccount = "<storage-account-name>"
7676
$resourceGroup = "<resource-group>"
77-
$location = "East US"
77+
$location = "East US" # Change to desired Azure region
7878
$vnetName = "myVNet"
7979
# Virtual network gateway can only be created in subnet with name 'GatewaySubnet'.
8080
$subnetName = "GatewaySubnet"
81+
$vnetAddressPrefix = "10.0.0.0/16" # Update this address as per your requirements
82+
$subnetAddressPrefix = "10.0.0.0/24" # Update this address as per your requirements
8183
8284
# Set current storage account
83-
Set-AzCurrentStorageAccount -ResourceGroupName "<resource-group>" -Name $storageAccount
85+
Set-AzCurrentStorageAccount -ResourceGroupName $resourceGroup -Name $storageAccount
8486
8587
# Define subnet configuration
86-
$subnetConfig = New-AzVirtualNetworkSubnetConfig -Name $subnetName -AddressPrefix 10.0.0.0/24
88+
$subnetConfig = New-AzVirtualNetworkSubnetConfig -Name $subnetName -AddressPrefix $subnetAddressPrefix
8789
8890
# Create a virtual network
89-
New-AzVirtualNetwork -Name $vnetName -ResourceGroupName $resourceGroup -Location $location -AddressPrefix 10.0.0.0/16 -Subnet $subnetConfig
91+
New-AzVirtualNetwork -Name $vnetName -ResourceGroupName $resourceGroup -Location $location -AddressPrefix $vnetAddressPrefix -Subnet $subnetConfig
9092
```
9193

9294
1. If you created a new virtual network and subnet in the previous step, then skip this step. If you have an existing virtual network you want to use, you must first create a [gateway subnet](../../vpn-gateway/vpn-gateway-about-vpn-gateway-settings.md#gwsub) on the virtual network before you can deploy a virtual network gateway.
@@ -148,7 +150,7 @@ To add a new or existing virtual network to your storage account, follow these s
148150
az login
149151
```
150152

151-
1. If you want to add a new virtual network and gateway subnet, run the following script. If you have an existing virtual network that you want to use, then skip this step and proceed to step 3. Be sure to replace `<your-subscription-id>`, `<resource-group>`, and `<storage-account-name>` with your own values. Replace `<virtual-network-name>` with the name of the new virtual network you want to create. The `-AddressPrefix` parameter defines the IP address blocks for the virtual network and the subnet, so replace those with your respective values. The virtual network will be created in the same region as the resource group.
153+
1. If you want to add a new virtual network and gateway subnet, run the following script. If you have an existing virtual network that you want to use, then skip this step and proceed to step 3. Be sure to replace `<your-subscription-id>`, `<resource-group>`, and `<storage-account-name>` with your own values. Replace `<virtual-network-name>` with the name of the new virtual network you want to create. The `--address-prefix` and `--subnet-prefix` parameters define the IP address blocks for the virtual network and the subnet, so replace those with your respective values. The virtual network will be created in the same region as the resource group.
152154

153155
```azurecli-interactive
154156
# Set your subscription
@@ -162,7 +164,7 @@ To add a new or existing virtual network to your storage account, follow these s
162164

163165
If you haven't enabled public network access to the virtual network previously, the Microsoft.Storage service endpoint will need to be added to the virtual network subnet. This can take up to 15 minutes to complete, although in most cases it will complete much faster. Until this operation has completed, you won't be able to access the Azure file shares within that storage account, including via the VPN connection.
164166

165-
To add a gateway subnet to an existing virtual network, run the following script. Be sure to replace `<your-subscription-id>`, `<resource-group>` and `<virtual-network-name>` with your own values. The `$subnetAddressPrefix` parameter defines the IP address block for the subnet, so replace the IP address block as needed.
167+
To add a gateway subnet to an existing virtual network, run the following script. Be sure to replace `<your-subscription-id>`, `<resource-group>` and `<virtual-network-name>` with your own values. The `--address-prefixes` parameter defines the IP address block for the subnet, so replace the IP address block as needed.
166168

167169
```azurecli-interactive
168170
# Set your subscription
@@ -174,7 +176,7 @@ To add a new or existing virtual network to your storage account, follow these s
174176
vnetName="<virtual-network-name>"
175177
# Virtual network gateway can only be created in subnet with name 'GatewaySubnet'.
176178
subnetName="GatewaySubnet"
177-
subnetAddressPrefix="10.0.0.0/24" # Update this address as per your requirements
179+
subnetAddressPrefix="10.0.0.0/24" # Update this address per your requirements
178180
179181
# Create the gateway subnet
180182
az network vnet subnet create \

0 commit comments

Comments
 (0)