Welcome to the Microsoft Q&A Platform. Thank you for reaching out & I hope you are doing well.
I understand that you would like to keep the costs of using a VPN Gateway to minimum.
I wouldn't suggest creating and deleting a VPN Gateway daily as a good option.
The best way is to make sure you select an SKU at better matches your requirement.
- Refer : SKU Comparison and pricing
You can still go ahead with deleting and recreating the VPN Gateway everyday.
- But you must make sure you use the same Public IP to be associated to the VPN Gateway
- For Bicep/ARM/Terraform templates,
- VPN Gateway : https://learn.microsoft.com/en-us/azure/templates/microsoft.network/virtualnetworkgateways?pivots=deployment-language-arm-template
- VPN Connection in a VPN gateway : https://learn.microsoft.com/en-us/azure/templates/microsoft.network/connections?pivots=deployment-language-arm-template
- How to use Automation account : https://learn.microsoft.com/en-us/azure/automation/learn/automation-tutorial-runbook-textual
- How to create a VPN Gateway with Powershell : https://learn.microsoft.com/en-us/azure/vpn-gateway/create-routebased-vpn-gateway-powershell
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.