@@ -22,9 +22,10 @@ Get started with network security perimeter by creating a network security perim
22
22
[ !INCLUDE [ network-security-perimeter-add-preview] ( ../../includes/network-security-perimeter-add-preview.md )]
23
23
24
24
- The latest version of the Azure PowerShell module with tools for network security perimeter.
25
- ``` azurepowershell
26
- Install-Module -Name Az.Tools.Installer -Repository PSGallery
27
- ```
25
+
26
+ ``` azurepowershell
27
+ Install-Module -Name Az.Tools.Installer -Repository PSGallery
28
+ ```
28
29
29
30
- Use `Az.Tools.Installer` to install the preview build of the `Az.Network`:
30
31
@@ -121,47 +122,47 @@ In this step, you create a new profile and associate the PaaS resource, the Azur
121
122
122
123
1 . Create a new profile for your network security perimeter with the following command:
123
124
124
- ``` azurepowershell-interactive
125
- # Create a new profile
126
-
127
- $nspProfile = @{
128
- Name = 'nsp-profile'
129
- ResourceGroupName = $rgParams.name
130
- SecurityPerimeterName = $nsp.name
131
- }
132
-
133
- $demoProfileNSP=New-AzNetworkSecurityPerimeterProfile @nspprofile
134
- ```
125
+ ``` azurepowershell-interactive
126
+ # Create a new profile
127
+
128
+ $nspProfile = @{
129
+ Name = 'nsp-profile'
130
+ ResourceGroupName = $rgParams.name
131
+ SecurityPerimeterName = $nsp.name
132
+ }
133
+
134
+ $demoProfileNSP=New-AzNetworkSecurityPerimeterProfile @nspprofile
135
+ ```
135
136
136
137
2. Associate the Azure Key Vault (PaaS resource) with the network security perimeter profile with the following command:
137
138
138
- ``` azurepowershell-interactive
139
- # Associate the PaaS resource with the above created profile
139
+ ```azurepowershell-interactive
140
+ # Associate the PaaS resource with the above created profile
141
+
142
+ $nspAssociation = @{
143
+ AssociationName = 'nsp-association'
144
+ ResourceGroupName = $rgParams.name
145
+ SecurityPerimeterName = $nsp.name
146
+ AccessMode = 'Learning'
147
+ ProfileId = $demoProfileNSP.Id
148
+ PrivateLinkResourceId = $keyVault.ResourceID
149
+ }
140
150
141
- $nspAssociation = @{
142
- AssociationName = 'nsp-association'
143
- ResourceGroupName = $rgParams.name
144
- SecurityPerimeterName = $nsp.name
145
- AccessMode = 'Learning'
146
- ProfileId = $demoProfileNSP.Id
147
- PrivateLinkResourceId = $keyVault.ResourceID
148
- }
149
-
150
- New-AzNetworkSecurityPerimeterAssociation @nspassociation | format-list
151
- ```
151
+ New-AzNetworkSecurityPerimeterAssociation @nspassociation | format-list
152
+ ```
152
153
153
154
3. Update association by changing the access mode to `enforced` with the `Update-AzNetworkSecurityPerimeterAssociation` command as follows:
154
155
155
- ``` azurepowershell-interactive
156
- # Update the association to enforce the access mode
157
- $updateAssociation = @{
158
- AssociationName = $nspassociation.AssociationName
159
- ResourceGroupName = $rgParams.name
160
- SecurityPerimeterName = $nsp.name
161
- AccessMode = 'Enforced'
162
- }
163
- Update-AzNetworkSecurityPerimeterAssociation @updateAssociation | format-list
164
- ```
156
+ ```azurepowershell-interactive
157
+ # Update the association to enforce the access mode
158
+ $updateAssociation = @{
159
+ AssociationName = $nspassociation.AssociationName
160
+ ResourceGroupName = $rgParams.name
161
+ SecurityPerimeterName = $nsp.name
162
+ AccessMode = 'Enforced'
163
+ }
164
+ Update-AzNetworkSecurityPerimeterAssociation @updateAssociation | format-list
165
+ ```
165
166
166
167
## Create and update network security perimeter access rules
167
168
0 commit comments