Remediation
From Azure Portal
- Open the
Storage Accountsblade. - For each listed Storage Account, perform the following:
- Under the
Security + networkingheading, click onNetworking. - Click on the
Private Endpoint Connectionstab at the top of the networking window. - Click the
+ Private endpointbutton. - In the
1 - Basicstab/step:Enter a namethat will be easily recognizable as associated with the Storage Account (Note: The "Network Interface Name" will be automatically completed, but you can customize it if needed.).- Ensure that the
Regionmatches the region of the Storage Account. - Click
Next.
- In the
2 - Resourcetab/step:- Select the
target sub-resourcebased on what type of storage resource is being made available. - Click
Next.
- Select the
- In the
3 - Virtual Networktab/step:- Select the
Virtual networkthat your Storage Account will be connecting to. - Select the
Subnetthat your Storage Account will be connecting to. - (Optional) Select other network settings as appropriate for your environment.
- Click
Next.
- Select the
- In the
4 - DNStab/step:- (Optional) Select other DNS settings as appropriate for your environment.
- Click
Next.
- In the
5 - Tagstab/step:- (Optional) Set any tags that are relevant to your organization.
- Click
Next.
- In the
6 - Review + createtab/step:- A validation attempt will be made and after a few moments it should indicate
Validation Passed- if it does not pass, double-check your settings before beginning more in depth troubleshooting. - If validation has passed, click
Createthen wait for a few minutes for the scripted deployment to complete.
- A validation attempt will be made and after a few moments it should indicate
Repeat the above procedure for each Private Endpoint required within every Storage Account.
From PowerShell
$storageAccount = Get-AzStorageAccount `
-ResourceGroupName "{{resource-group-name}}" `
-Name "{{storage-account-name}}"
$privateEndpointConnection = @{
Name = "{{connection-name}}"
PrivateLinkServiceId = $storageAccount.Id
GroupID = "blob|blob_secondary|file|file_secondary|table|table_secondary|queue|queue_secondary|web|web_secondary|dfs|dfs_secondary"
}
$privateLinkServiceConnection = New-AzPrivateLinkServiceConnection @privateEndpointConnection
$virtualNetDetails = Get-AzVirtualNetwork `
-ResourceGroupName "{{vnet-resource-group-name}}" `
-Name "{{vnet-name}}"
$privateEndpoint = @{
ResourceGroupName = "{{resource-group-name}}"
Name = "{{private-endpoint-name}}"
Location = "{{location}}"
Subnet = $virtualNetDetails.Subnets[0]
PrivateLinkServiceConnection = $privateLinkServiceConnection
}
New-AzPrivateEndpoint @privateEndpoint
From Azure CLI
az network private-endpoint create \
--resource-group {{resource-group-name}} \
--location {{location}} \
--name {{private-endpoint-name}} \
--vnet-name {{vnet-name}} \
--subnet {{subnet-name}} \
--private-connection-resource-id {{storage-account-id}} \
--connection-name {{private-link-service-connection-name}} \
--group-id {{blob|blob_secondary|file|file_secondary|table|table_secondary|queue|queue_secondary|web|web_secondary|dfs|dfs_secondary}}