Skip to content

Commit aabb0d3

Browse files
authored
Merge pull request #295777 from mbender-ms/nsp-quicstart-arm-bicep
network security perimeter | New Documents | Bicep quickstart article
2 parents f8a32bc + 19cfbc8 commit aabb0d3

10 files changed

+122
-21
lines changed
Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
---
2+
title: Quickstart - Create a network security perimeter - Bicep
3+
titleSuffix: Azure Private Link
4+
description: Learn how to create a network security perimeter for an Azure resource using Bicep. This example demonstrates the creation of a network security perimeter for an Azure Key Vault.
5+
author: mbender-ms
6+
ms.author: mbender
7+
ms.service: azure-private-link
8+
ms.topic: quickstart
9+
ms.date: 03/07/2025
10+
ms.custom: subject-armqs, mode-arm, template-concept, devx-track-bicep
11+
#CustomerIntent: As a network administrator, I want to create a network security perimeter for an Azure resource in the Bicep, so that I can control the network traffic to and from the resource.
12+
---
13+
14+
# Quickstart - Create a network security perimeter - Bicep
15+
16+
Get started with network security perimeter by creating a network security perimeter for an Azure Key Vault using Bicep. A [network security perimeter](network-security-perimeter-concepts.md) allows [Azure Platform as a Service (PaaS)](./network-security-perimeter-concepts.md#onboarded-private-link-resources) resources to communicate within an explicit trusted boundary. You create and update a PaaS resource's association in a network security perimeter profile. Then you create and update network security perimeter access rules. When you're finished, you delete all resources created in this quickstart.
17+
18+
[!INCLUDE [About Bicep](~/reusable-content/ce-skilling/azure/includes/resource-manager-quickstart-bicep-introduction.md)]
19+
20+
You can also create a network security perimeter by using the [Azure portal](create-network-security-perimeter-portal.md), [Azure PowerShell](create-network-security-perimeter-powershell.md), or the [Azure CLI](create-network-security-perimeter-cli.md).
21+
22+
[!INCLUDE [network-security-perimeter-preview-message](../../includes/network-security-perimeter-preview-message.md)]
23+
24+
## Prerequisites
25+
26+
- An Azure account with an active subscription. If you don't already have an Azure account, [create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
27+
28+
[!INCLUDE [network-security-perimeter-add-preview](../../includes/network-security-perimeter-add-preview.md)]
29+
30+
## Review the Bicep file
31+
32+
This Bicep file creates a network security perimeter for an instance of Azure Key Vault.
33+
34+
The Bicep file that this quickstart uses is from [Azure Quickstart Templates](https://azure.microsoft.com/resources/templates/network-security-perimeter-create/).
35+
36+
:::code language="bicep" source="~/quickstart-templates/quickstarts/microsoft.network/network-security-perimeter-create/main.bicep":::
37+
38+
39+
The Bicep file defines multiple Azure resources:
40+
41+
- [**Microsoft.KeyVault/vaults**](/azure/templates/microsoft.keyvault/vaults): The instance of Key Vault with the sample database.
42+
- [**Microsoft.Network/networkSecurityPerimeters**](/azure/templates/microsoft.network/networksecurityperimeters): The network security perimeter that you use to access the instance of Key Vault.
43+
- [**Microsoft.Network/networkSecurityPerimeters/profiles**](/azure/templates/microsoft.network/networksecurityperimeters/profiles): The network security perimeter profile that you use to access the instance of Key Vault.
44+
- [**Microsoft.Network/networkSecurityPerimeters/profiles/accessRules**](/azure/templates/microsoft.network/networksecurityperimeters/profiles/accessrules): The access rules that you use to access the instance of Key Vault.
45+
- [**Microsoft.Network/networkSecurityPerimeters/resourceAssociations**](/azure/templates/microsoft.network/networksecurityperimeters/resourceassociations): The resource associations that you use to access the instance of Key Vault.
46+
47+
## Deploy the Bicep file
48+
49+
1. Save the Bicep file as **main.bicep** to your local computer.
50+
1. Deploy the Bicep file using either Azure CLI or Azure PowerShell.
51+
52+
# [CLI](#tab/CLI)
53+
54+
```azurecli
55+
az group create --name resource-group --location eastus
56+
az deployment group create --resource-group resource-group --template-file main.bicep --parameters
57+
networkSecurityPerimeterName=<network-security-perimeter-name>
58+
```
59+
# [PowerShell](#tab/PowerShell)
60+
61+
```powershell
62+
New-AzResourceGroup -Name resource-group -Location eastus
63+
New-AzResourceGroupDeployment -ResourceGroupName resource-group -TemplateFile main.bicep
64+
```
65+
66+
When the deployment finishes, you should see a message indicating the deployment succeeded.
67+
68+
## Validate the deployment
69+
70+
1. Sign into the Azure portal.
71+
1. Enter **Network security perimeter** in the search box at the top of the portal. Select **Network security perimeters** in the search results.
72+
1. Select the **networkPerimeter** resource from the list of network security perimeters.
73+
1. Verify that the **networkPerimeter** resource is created successfully. The **Overview** page shows the details of the network security perimeter, including the profiles, associated resources, and Policy assignments.
74+
75+
## Clean up resources
76+
77+
When you no longer need the resources that you created with the network security perimeter service, delete the resource group. This removes the network security perimeter service and all the related resources.
78+
79+
# [CLI](#tab/CLI)
80+
81+
```azurecli-interactive
82+
az group delete --name resource-group
83+
```
84+
85+
# [PowerShell](#tab/PowerShell)
86+
87+
```azurepowershell-interactive
88+
Remove-AzResourceGroup -Name resource-group
89+
```
90+
---
91+
92+
[!INCLUDE [network-security-perimeter-delete-resources](../../includes/network-security-perimeter-delete-resources.md)]
93+
94+
## Next steps
95+
96+
> [!div class="nextstepaction"]
97+
> [Diagnostic logging for Azure Network Security Perimeter](./network-security-perimeter-diagnostic-logs.md)

articles/private-link/create-network-security-perimeter-cli.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
title: Quickstart - Create a network security perimeter - Azure CLI
3+
titleSuffix: Azure Private Link
34
description: Learn how to create a network security perimeter for an Azure resource using Azure CLI. This example demonstrates the creation of a network security perimeter for an Azure Key Vault.
45
author: mbender-ms
56
ms.author: mbender

articles/private-link/create-network-security-perimeter-portal.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
title: Quickstart - Create a network security perimeter - Azure portal
3+
titleSuffix: Azure Private Link
34
description: Learn how to create a network security perimeter for an Azure resource using the Azure portal. This example demonstrates the creation of a network security perimeter for an Azure Key Vault.
45
author: mbender-ms
56
ms.author: mbender
@@ -96,14 +97,14 @@ Once you create a key vault, you can proceed to create a network security perime
9697

9798
## Delete a network security perimeter
9899

99-
When you no longer need a network security perimeter, you remove any resources associated with the network security perimeter and then remove the perimeter following these steps:
100+
When you no longer need a network security perimeter and associated resources, you can delete the resource group that contains the network security perimeter and all associated resources. This action removes the network security perimeter and all resources within it.
100101

101-
1. From your network security perimeter, select **Associated resources** under **Settings**.
102-
2. Select **key-vault-YYYYDDMM** from the list of associated resources.
103-
3. From the action bar, select **Settings ** and then select **Remove** in the confirmation window.
104-
4. Navigate back to the **Overview** page of your network security perimeter.
105-
5. Select **Delete** and confirm the deletion by entering **network-security-perimeter** in the text box for the name of the resource.
106-
6. Browse to the **resource-group** and select **Delete** to remove the resource group and all resources within it.
102+
1. In the Azure portal, select **Resource groups** from the left-hand menu.
103+
1. Select **resource-group** from the list of resource groups.
104+
1. In the **resource-group** window, select **Delete resource group** from the action bar.
105+
1. In the **Delete a resource group** window, enter the name of the resource group to confirm the deletion.
106+
1. Select **Delete** to remove the resource group and all resources within it.
107+
1. Verify the resource group is no longer listed in the **Resource groups** window.
107108

108109
[!INCLUDE [network-security-perimeter-delete-resources](../../includes/network-security-perimeter-delete-resources.md)]
109110

articles/private-link/create-network-security-perimeter-powershell.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
---
22
title: Quickstart - Create a network security perimeter - Azure PowerShell
3+
titleSuffix: Azure Private Link
34
description: Learn how to create a network security perimeter for an Azure resource using Azure PowerShell. This example demonstrates the creation of a network security perimeter for an Azure Key Vault.
45
author: mbender-ms
56
ms.author: mbender
67
ms.service: azure-private-link
7-
ms.custom:
8-
- ignite-2024
98
ms.topic: quickstart
10-
ms.date: 11/06/2024
9+
ms.date: 03/05/2024
1110
#CustomerIntent: As a network administrator, I want to create a network security perimeter for an Azure resource using Azure PowerShell, so that I can control the network traffic to and from the resource.
1211
---
1312

articles/private-link/network-security-perimeter-concepts.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
title: What is a network security perimeter?
3+
titleSuffix: Azure Private Link
34
description: Learn about the components of network security perimeter, a feature that allows Azure PaaS resources to communicate within an explicit trusted boundary, or perimeter.
45
author: mbender-ms
56
ms.author: mbender

articles/private-link/network-security-perimeter-diagnostic-logs.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
title: 'Diagnostic logs for Network Security Perimeter'
3+
titleSuffix: Azure Private Link
34
description: Learn the options for storing diagnostic logs for Network Security Perimeter and how to enable logging through the Azure portal.
45
author: mbender-ms
56
ms.author: mbender

articles/private-link/network-security-perimeter-role-based-access-control-requirements.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
title: Azure role-based access control permissions required for Azure Network Security Perimeter usage
3+
titleSuffix: Azure Private Link
34
description: Learn about the Azure role-based access control permissions required to use Azure Network Security Perimeter.
45
author: mbender-ms
56
ms.author: mbender

articles/private-link/network-security-perimeter-transition.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
title: Transition to a network security perimeter in Azure
3+
titleSuffix: Azure Private Link
34
description: Learn about the different access modes and how to transition to a network security perimeter in Azure.
45
author: mbender-ms
56
ms.author: mbender

articles/private-link/toc.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,8 @@
99
href: private-endpoint-overview.md
1010
- name: Private Link service
1111
href: private-link-service-overview.md
12-
- name: Network security perimeter
13-
items:
14-
- name: What is a network security perimeter?
15-
href: network-security-perimeter-concepts.md
12+
- name: What is a network security perimeter?
13+
href: network-security-perimeter-concepts.md
1614
- name: Configure
1715
items:
1816
- name: Create a private endpoint
@@ -53,6 +51,8 @@
5351
href: create-network-security-perimeter-powershell.md
5452
- name: Create a network security perimeter - Azure CLI
5553
href: create-network-security-perimeter-cli.md
54+
- name: Create a network security perimeter - Bicep
55+
href: create-network-security-perimeter-bicep.md
5656
- name: Transition to a network security perimeter
5757
href: network-security-perimeter-transition.md
5858
- name: DNS

includes/network-security-perimeter-add-preview.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
author: mbender
66
ms.service: azure-private-link
77
ms.topic: include
8-
ms.date: 11/04/2024
9-
ms.author: mbender> -ms
8+
ms.date: 03/05/2025
9+
ms.author: mbender-ms
1010
ms.custom: include file, ignite-2024
1111
---
1212

@@ -22,17 +22,16 @@ ms.custom: include file, ignite-2024
2222

2323
- To re-register the `Microsoft.Network` resource provider, use the following Azure PowerShell command:
2424

25-
```azurepowershell-interactive
26-
# Register the Microsoft.Network resource provider
27-
Register-AzResourceProvider -ProviderNamespace Microsoft.Network
28-
```
25+
```azurepowershell-interactive
26+
# Register the Microsoft.Network resource provider
27+
Register-AzResourceProvider -ProviderNamespace Microsoft.Network
28+
```
2929
3030
- To re-register the `Microsoft.Network` resource provider, use the following Azure CLI command:
3131
3232
```azurecli-interactive
3333
# Register the Microsoft.Network resource provider
3434
az provider register --namespace Microsoft.Network
3535
```
36-
3736
3837
For more information on re-registering resource providers, see [Azure resource providers and types](/azure/azure-resource-manager/management/resource-providers-and-types).

0 commit comments

Comments
 (0)