
Although this is obviously ‘quick and dirty’, it can be useful in restoring things that aren’t easily backed up such as e.g. Logic Apps, and it can aid in change detection/tracking (git change/history). It only requires Azure DevOps which is basically free in this scenario.
The result is a bunch of .json arm templates, the same as would result in using the Export to Template function in the Azure Portal.
Yaml code with inline PS:
https://github.com/jflieben/assortedFunctionsV2/blob/main/backup-rsgstoarm.yml