I understand that VM's in Azure will be charged if it just exists and even if we dont use it.
To Minimize cost I want to automate the VM creation and deletion so that VM is not available/idle when not n use.
I want the VM to be deleted after my usage session/scheduled time (just VM only, drives can be intact in storage account) and similarly next time when I want to start using VM, i want to create it and attach the storage (drives) to VM.
I want to automate (e.g Create/Delete on pre-scheduled time or just in one click) this creation and deletion with minimal intervention/user interaction.
How to achieve this? Any pointers to articles?