Issue with creating Bastion under my vnet for logging cloudtest VM

Shivangi Rana 0 Reputation points Microsoft Employee
2024-12-26T21:45:28.8633333+00:00

while creating bastion under my vnet I am getting this issue-

Failed to obtain lease. Specified api-version 2022-09-01 does not support property PrivateOnly on resource. Use at least api-version 2023-09-01

 

I am using azure portal to perform this. Can you please help me with the resolution?

I see that the api-version is already greater than 2022-09-01 in the json and I don't see any option to edit the api-version or to remove the Private Bastion param.

Azure Virtual Network
Azure Virtual Network
An Azure networking service that is used to provision private networks and optionally to connect to on-premises datacenters.
2,584 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Ganesh Patapati 2,825 Reputation points Microsoft Vendor
    2024-12-27T13:17:53.26+00:00

    @Shivangi Rana

    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 the PrivateOnly 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

    User's image

    Refer: https://zcusa.951200.xyz/en-us/rest/api/virtualnetwork/bastion-hosts?view=rest-virtualnetwork-2024-05-01

    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


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.