Thanks for your question.
It appears the issue is related to API version compatibility.
- The error message indicates that the API version
2022-09-01
does not support thePrivateOnly
property. - You need to use at least API version
2023-09-01
or higher to support this property.
Items to consider:
- Private-only Bastion is configured at the time of deployment and requires the Premium SKU Tier.
- You can't change from a regular Bastion deployment to a private-only deployment.
- To deploy private-only Bastion to a virtual network that already has a Bastion deployment, first remove Bastion from your virtual network, then deploy Bastion back to the virtual network as private-only. You don't need to delete and recreate the AzureBastionSubnet.
- If you want to create end-to-end private connectivity, connect using the native client instead of connecting via the Azure portal.
- If your client machine is on-premises and non-Azure, you will need to deploy an ExpressRoute or VPN and enable IP-based connection on the Bastion resource
Deploy private-only Bastion please refer the below Docs.
Refer: https://zcusa.951200.xyz/en-us/azure/bastion/private-only-deployment#createhost
See: https://zcusa.951200.xyz/en-us/azure/bastion/troubleshoot?source=recommendations
If above is unclear and/or you are unsure about something add a comment below.
You can mark it 'Accept Answer' and 'Upvote' if this helped you
Please don’t forget to close the thread by clicking "Accept the answer" wherever the information provided helps you, as this can be beneficial to other community members.
Regards,
Ganesh