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

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.

主站蜘蛛池模板: 徐闻县| 普兰店市| 常德市| 龙岩市| 阳朔县| 定远县| 银川市| 彭州市| 成武县| 镇康县| 精河县| 武义县| 罗田县| 扎赉特旗| 衡阳市| 乌鲁木齐县| 富顺县| 疏勒县| 东城区| 筠连县| 徐水县| 三穗县| 日照市| 自治县| 朝阳市| 湖口县| 阳泉市| 大宁县| 蒙阴县| 德州市| 信阳市| 宁明县| 东城区| 大关县| 海原县| 阜康市| 宁海县| 昌都县| 汉寿县| 龙门县| 淄博市|