I attempted to create a bastion to allow me to connect to my VM and I received an error message

Abdulkareem Masha 0 Reputation points
2024-08-07T19:32:24.18+00:00

I have successfully created multiple bastions in the past but this it failed to deploy. Here is the error code/message. I don't know how to update the API version or remove the private only from the request body:

{
    "status": "Failed",
    "error": {
        "code": "ResourcePropertyNotSupportedApiVersionTooOld",
        "message": "Specified api-version 2022-09-01 does not support property PrivateOnly on resource /subscriptions/b0370367-aba7-45f0-a1e6-e319d07b2c19/resourceGroups/RG-CK/providers/Microsoft.Network/bastionHosts/bastionrgck. Use at least api-version 2023-09-01 or remove property PrivateOnly from the request body.",
        "details": []
    }
}
Azure Bastion
Azure Bastion
An Azure service that provides private and fully managed Remote Desktop Protocol (RDP) and Secure Shell (SSH) access to virtual machines.
268 questions
{count} votes

1 answer

Sort by: Most helpful
  1. akinbade abiola 21,040 Reputation points
    2024-08-07T21:07:09.9266667+00:00

    Hello Abdulkareem Masha,

    Thanks for your question.

    It appears the issue is related to API version compatibility.

    Try the steps below:

    • Modify your Bastion creation command or template to use API version 2023-09-01 or later.
    • If you don't need the 'PrivateOnly' feature, remove it from your configuration.
    • Retry creating the Bastion host.

    See: https://learn.microsoft.com/en-us/azure/bastion/troubleshoot?source=recommendations

    You can mark it 'Accept Answer' and 'Upvote' if this helped you

    Regards,

    Abiola

    0 comments No comments

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.