Fix autogenerated ARM templates for VMs (remove hardcoded RG name)
In Azure portal when you create a VM you can download the template and parameters (for e.g. right before clicking "Create" button to create VM, you can click on "Download template and parameters").
The template contains hardcoded resource group name inside the resourceId() function. This breaks things when you try to download and use the template. You cannot deploy this template even directly in the portal (since when you try to deploy template you're asked to enter resource group name, but a value is already hardcoded in the template).