For implementing Disable public and private access-
Perhaps I need to :
1.remove the following lines of code
<Under parameters>
"diskAccessId": {
"type": "String",
"metadata": {
"displayName": "Resource Id for the DiskAccess in the given location to which the disk resource needs to be linked",
"strongType": "Microsoft.Compute/diskAccesses",
"description": "Disk access resources enable exporting managed disks securely via private endpoints. Learn more at: https://aka.ms/disksprivatelinksdoc"
}
}
<Under effect/operations>
{
"operation": "addOrReplace",
"field": "Microsoft.Compute/disks/diskAccessId",
"value": "[parameters('diskAccessId')]"
},
2.And modify the other operations as:
{
"operation": "addOrReplace",
"field": "Microsoft.Compute/disks/networkAccessPolicy",
"value": "DenyAll"
},
{
"operation": "addOrReplace",
"field": "Microsoft.Compute/disks/publicNetworkAccess",
"value": "Disabled"
}