Reverse engineering a template
Writing an ARM template from scratch can be a tedious and time-consuming task. Luckily, there are two approaches available to generate an ARM template from existing infrastructure:
- Using Export template
- Using Resource Explorer
Let’s discuss both of these in the upcoming subsections.
Using Export template
The first approach is using the Export template option, which can be found on every resource and resource group in the Azure portal. This will generate an ARM template of the current state of the resource (group), as shown in the following screenshot:
Figure 8.4 – Exporting an ARM template
Please note that not every service currently supports reverse engineering an ARM template using this approach. For any service not supported, there will be a warning at the top of the screen. To work around this limitation for retrieving the JSON template for an individual resource, there is another approach...