官术网_书友最值得收藏!

  • Learn Azure Administration
  • Kamil Mrzyg?ód
  • 293字
  • 2021-06-11 18:14:31

Automation scripts

If you have provisioned resources manually, there is a way to generate an automation script from the whole resource group. To do so, follow these steps:

  1. Go to your resource group and click on the Export template blade:
Figure 2.7: Export template blade
In the newest version of the portal, the Automation script  option has been renamed to Export template.
  1. You will see a new window where you can find the whole ARM template. This can be exported. What's more, this feature generates four additional scripts that can be used if you do not like JSON templates:
    • CLI
    • PowerShell
    • .NET
    • Ruby

All are equally functional, so it is only a matter of preference.

  1. In the following screenshot, we can see that the generated template is much more complex as it contains all the possible parameters that can be set for a resource:
Figure 2.8: ARM template generated from the portal

From my experience, I can tell that using such a generated template is a good starting point, but unfortunately, there are situations where such templates will contain errors (because a parameter was not exported or exported partially). This is why it is a good idea to perform a quick check of it by clicking on the Deploy button that's available on the blade.

Exporting a template for deployed resources is a good idea, especially when starting with a proof-of-concept and proceeding to a more mature solution. In your daily work, this approach may have too many cons and you need a tool that will help you introduce logic or deploy resources in a more flexible way. This is why, in the next section, we will cover some extra tools that may suit your needs.

主站蜘蛛池模板: 乌鲁木齐市| 泽州县| 周宁县| 遂平县| 湘潭市| 石屏县| 宁河县| 雅安市| 乾安县| 临泉县| 宣恩县| 昭通市| 神农架林区| 洪泽县| 绍兴市| 饶河县| 富裕县| 遂宁市| 东乌| 龙里县| 勐海县| 西峡县| 贺兰县| 宜城市| 苍南县| 石楼县| 黔南| 沿河| 镇远县| 白沙| 大连市| 乌鲁木齐县| 正安县| 大同市| 九寨沟县| 桐柏县| 靖西县| 汝州市| 贡嘎县| 石屏县| 修武县|