How to idle S2S VPN ?

Gongya Yu 190 Reputation points
2024-05-28T08:14:37.8533333+00:00

As Azure charges VPN services, and I just need to learn and do some tests. Now I have to delete all the configurations every time I need to stay away for a while, then I have to re-configure all for further tests.

Any good way, such like EC2 which I can shutdown.
thanks !!

Azure VPN Gateway
Azure VPN Gateway
An Azure service that enables the connection of on-premises networks to Azure through site-to-site virtual private networks.
1,554 questions
{count} votes

1 answer

Sort by: Most helpful
  1. GitaraniSharma-MSFT 49,651 Reputation points Microsoft Employee
    2024-05-28T10:08:24.62+00:00

    Hello @Gongya Yu ,

    Welcome to Microsoft Q&A Platform. Thank you for reaching out & hope you are doing well.

    I understand that you would like to know if there is a way to stop Azure VPN gateway, when it is not needed or used.

    As of today, there is no feature available to stop/start Azure VPN gateway. So, the only option is to delete and recreate the gateway.

    This feature ask is already under review for global release but no ETA as of yet. You can upvote the feature in the below feedback forum:

    https://feedback.azure.com/d365community/idea/4a70d8e3-8926-ec11-b6e6-000d3a4f0789

    The only workaround that I can suggest is that you could delete the resource group using PowerShell/CLI and automate the VPN gateway creation via ARM templates or Bicep (considering the time required to create the resource).

    Refer: https://learn.microsoft.com/en-us/cli/azure/deployment/group?view=azure-cli-latest#az-deployment-group-delete

    https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/delete-resource-group?tabs=azure-powershell#delete-resource-group

    https://learn.microsoft.com/en-us/azure/azure-resource-manager/templates/template-tutorial-create-first-template?tabs=azure-powershell

    https://learn.microsoft.com/en-us/azure/automation/automation-deploy-template-runbook

    https://learn.microsoft.com/en-us/azure/templates/microsoft.network/vpngateways?pivots=deployment-language-arm-template

    Kindly let us know if the above helps or you need further assistance on this issue.


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

    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.