Hi,
I have a requirement to use Azure bicep to create a virtual machine, where the OS disk's networking needs to set to private
In Bicep: it is defined under the disk resource with property 'networkAccessPolicy' set to 'AllowPrivate'
In portal: it is defined under disk resource page -> networking -> Private endpoint (through disk access)
Approaches:
Create the OS disk within virtual machine resource, however there is no option for me to set the networkAccesPolicy
Create the OS disk in disk resource, and then attach to the virtual machine resource, however this way I am not allowed to specific 'osProfile' which I need to specify them
osProfile: {
computerName: 'string'
adminUsername: 'string'
adminPassword: 'string'
windowsConfiguration: {
provisionVMAgent: bool
}
}
Any guidance would be helpful to resolve this problem.
Thanks