Azure Bastion configuration via CLI or ARM template

Marcel Kornegoor 21 Reputation points
2022-08-13T20:33:40.353+00:00

Hello, first ever question on this platform....

I'm writing a deployment script for an application in Azure and as best practice I want to deploy a Bastion service as part of it. Via Bastion I want to ssh into a Linux VM.

All works fine: deploying a vnet, subnet, public IP and the Bastian itself with az network bastion create but it seems ssh to a host in the private vnet only works when you manually check a box in the Azure Portal. Can anybody confirm? I cannot find any ARM parameter for this.... Just opened an issue on GitHub (https://github.com/Azure/azure-cli/issues/23525)

With az network bastion show you can see the parameter (and change after checking the box in the portal). The parameter is:

 `"enableTunneling": true,`  

which with the az CLI deployment can only be done with the "default" value which is false. there is no way (at least not according to documention) how to change this parameter.

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.
293 questions
{count} votes

Accepted answer
  1. risolis 8,741 Reputation points
    2022-08-15T04:17:01.073+00:00

    Hello @Marcel Kornegoor

    Thank you for your answer.

    Let me share with you what I just found so see it below please:

    231085-image.png

    Here it is the link as well:

    https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/bastion_host

    Looking forward to your feedback,

    Cheers

    Please "Accept the answer" if the information helped you. This will help us and others in the community as well.


0 additional answers

Sort by: Most helpful

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.