Skip to content

Commit 832489a

Browse files
Merge pull request #220805 from asudbring/pl-ddos-posh
Added DDoS info for virtual network creates in QS for Private Link Service - Powershell
2 parents 2bef414 + 321a67b commit 832489a

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

articles/private-link/create-private-link-service-powershell.md

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,19 @@ New-AzResourceGroup -Name 'CreatePrivLinkService-rg' -Location 'eastus2'
3232
3333
```
3434

35+
### Create a DDoS Protection plan
36+
37+
Create a DDoS Protection plan with [New-AzDdosProtectionPlan](/powershell/module/az.network/new-azddosprotectionplan) to associate with the virtual network. This example creates a DDoS Protection plan named **myDDoSPlan** in the **EastUS** location:
38+
39+
```azurepowershell-interactive
40+
$ddosplan = @{
41+
Name = 'myDDoSPlan'
42+
ResourceGroupName = 'CreatePrivateEndpointQS-rg'
43+
Location = 'eastus2'
44+
}
45+
New-AzDdosProtectionPlan @ddosplan
46+
```
47+
3548
## Create an internal load balancer
3649

3750
In this section, you'll create a virtual network and an internal Azure Load Balancer.
@@ -43,6 +56,9 @@ In this section, you create a virtual network and subnet to host the load balanc
4356
* Create a virtual network with [New-AzVirtualNetwork](/powershell/module/az.network/new-azvirtualnetwork).
4457

4558
```azurepowershell-interactive
59+
## Place DDoS plan created previously into a variable. ##
60+
$ddosplan = Get-AzDdosProtectionPlan -ResourceGroupName CreatePrivateEndpointQS-rg -Name myDDosPlan
61+
4662
## Create backend subnet config ##
4763
$subnet = @{
4864
Name = 'mySubnet'
@@ -58,6 +74,7 @@ $net = @{
5874
Location = 'eastus2'
5975
AddressPrefix = '10.1.0.0/16'
6076
Subnet = $subnetConfig
77+
DDoSProtectionPlan = $ddosplan.Id
6178
}
6279
$vnet = New-AzVirtualNetwork @net
6380
@@ -181,6 +198,9 @@ In this section, you'll map the private link service to a private endpoint. A vi
181198
* Create a virtual network with [New-AzVirtualNetwork](/powershell/module/az.network/new-azvirtualnetwork).
182199

183200
```azurepowershell-interactive
201+
## Place DDoS plan created previously into a variable. ##
202+
$ddosplan = Get-AzDdosProtectionPlan -ResourceGroupName CreatePrivateEndpointQS-rg -Name myDDosPlan
203+
184204
## Create backend subnet config ##
185205
$subnet = @{
186206
Name = 'mySubnetPE'
@@ -196,6 +216,7 @@ $net = @{
196216
Location = 'eastus2'
197217
AddressPrefix = '11.1.0.0/16'
198218
Subnet = $subnetConfig
219+
DDoSProtectionPlan = $ddosplan.Id
199220
}
200221
$vnetpe = New-AzVirtualNetwork @net
201222
@@ -288,7 +309,7 @@ $pe = Get-AzPrivateEndpoint @par1
288309
$pe.NetworkInterfaces[0].IpConfigurations[0].PrivateIpAddress
289310
```
290311

291-
```bash
312+
```powershell
292313
❯ $pe.NetworkInterfaces[0].IpConfigurations[0].PrivateIpAddress
293314
11.1.0.4
294315
```
@@ -306,6 +327,7 @@ Remove-AzResourceGroup -Name 'CreatePrivLinkService-rg'
306327
In this quickstart, you:
307328

308329
* Created a virtual network and internal Azure Load Balancer.
330+
309331
* Created a private link service
310332

311333
To learn more about Azure Private endpoint, continue to:

0 commit comments

Comments
 (0)