<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Ángel Pérez</title>
    <description>The latest articles on DEV Community by Ángel Pérez (@azcloudfarmer).</description>
    <link>https://dev.to/azcloudfarmer</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F538517%2F24991428-5a6e-417b-a6e0-767007ca2a5a.jpg</url>
      <title>DEV Community: Ángel Pérez</title>
      <link>https://dev.to/azcloudfarmer</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/azcloudfarmer"/>
    <language>en</language>
    <item>
      <title>ARM Template Specs now GA!</title>
      <dc:creator>Ángel Pérez</dc:creator>
      <pubDate>Thu, 06 May 2021 17:08:55 +0000</pubDate>
      <link>https://dev.to/azure/arm-template-specs-now-ga-161a</link>
      <guid>https://dev.to/azure/arm-template-specs-now-ga-161a</guid>
      <description>&lt;p&gt;&lt;strong&gt;TL;DR&lt;/strong&gt; – Template Specs is a new resource type for storing ARM templates in your resource groups for faster sharing, deployment, and role-based access control (RBAC) on those Templates shared within an organization. Template Specs addresses today's biggest challenges around ARM template management, storage, and access.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Problem:&lt;/strong&gt; Sharing ARM templates across an organization is challenging, requiring more management steps of the external or internal storage from which they are shared.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Sharing:&lt;/strong&gt; ensuring the right teams within your organization have access becomes very tedious as you cannot leverage Azure RBAC on the ARM templates you want to share.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Management:&lt;/strong&gt; providing teams with the latest ARM templates in a consistent and versioned way.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Why Template Specs?
&lt;/h2&gt;

&lt;p&gt;As a native solution, &lt;a href="https://docs.microsoft.com/en-us/azure/azure-resource-manager/templates/template-specs?tabs=azure-cli"&gt;Template Specs&lt;/a&gt; will enable users to bring all their ARM templates to Azure as a resource and securely store and share them within an Azure tenant. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Solution:&lt;/strong&gt; 1st Party secure storage and management of ARM templates within Azure.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Sharing:&lt;/strong&gt; Who can access a Template Spec can be defined using Azure RBAC.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Management:&lt;/strong&gt; Template Specs can be versioned within the same resource, ensuring users can always access the latest iterations of an ARM template (or templates) stored in a Template Spec.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What's New Since Public Preview?
&lt;/h2&gt;

&lt;p&gt;New API version 2021-05-01. Thanks to all the customer feedback during our public preview, we were able to close &lt;a href="https://github.com/Azure/template-specs/issues?q=is%3Aissue+is%3Aclosed"&gt;3 issues&lt;/a&gt;, fix 5 bugs, and make the decision to change the names of the &lt;code&gt;template&lt;/code&gt; and &lt;code&gt;artifacts&lt;/code&gt; properties:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fejs98bfudh8vlzx4etp9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fejs98bfudh8vlzx4etp9.png" alt="Alt Text" width="800" height="344"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What's Coming Soon Post-GA?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Bicep integration: &lt;code&gt;az ts create&lt;/code&gt; with bicep files.&lt;/li&gt;
&lt;li&gt;Built-in template specs support.&lt;/li&gt;
&lt;li&gt;Support for UI Forms – UI Forms will replace createUIDefinition going forward.&lt;/li&gt;
&lt;li&gt;GA version of Azure CLI and PowerShell with breaking changes being released by end of May.

&lt;ul&gt;
&lt;li&gt;Due to the property renames highlighted above, you will see new property names when you GET a Template Spec version. This could be a breaking change if you are dependent on querying these properties in a script. This will not change how Template Specs are created or updated when using Azure Portal, Azure CLI, and PowerShell, but it will change how they are created via REST/ARM Templates/Bicep.&lt;/li&gt;
&lt;li&gt;If you’d like to test the latest Az PowerShell cmdlets early, they are available in &lt;a href="https://www.powershellgallery.com/packages/Az.Resources/3.5.1-preview"&gt;PowerShell Gallery&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Template Spec Reference and Docs:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://docs.microsoft.com/en-us/azure/azure-resource-manager/templates/template-specs?tabs=azure-powershell"&gt;Template specs overview - Microsoft Docs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.microsoft.com/en-us/azure/azure-resource-manager/templates/template-specs-create-linked?tabs=azure-powershell"&gt;Create a template spec with linked templates - Microsoft Docs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.microsoft.com/en-us/azure/azure-resource-manager/templates/template-specs-deploy-linked-template?tabs=azure-powershell"&gt;Deploy a template spec as a linked template - Microsoft Docs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.microsoft.com/en-us/azure/azure-resource-manager/templates/linked-templates?tabs=azure-powershell#use-relative-path-for-linked-templates"&gt;Link templates for deployment - Microsoft Docs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.microsoft.com/en-us/azure/azure-resource-manager/templates/linked-templates?tabs=azure-powershell#use-relative-path-for-linked-templates"&gt;Convert portal template to template spec - Microsoft Docs&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; Template Specs can be created with an ARM template, but we strongly recommend using Portal, PowerShell or CLI for creating Template Specs. &lt;a href="https://docs.microsoft.com/en-us/azure/templates/microsoft.resources/templatespecs/versions"&gt;Microsoft.Resources/templateSpecs/versions - ARM template reference | Microsoft Docs&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Creating and Deploying a Template Spec Resource
&lt;/h2&gt;

&lt;p&gt;A Template Spec is a resource that contains an array of Template Spec versions which consists of a &lt;strong&gt;root template and any number of linked templates&lt;/strong&gt;. A Template Spec can be created using the Portal, PowerShell, Azure CLI, REST API, or ARM Template. To help visualize a Template Spec create, here are some examples of what it would look like in the Azure CLI:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Creating a Template Spec using Azure CLI&lt;/strong&gt;&lt;br&gt;
To create a Template Spec, use the &lt;a href="https://docs.microsoft.com/en-us/cli/azure/ts?view=azure-cli-latest#az_ts_create"&gt;az ts create&lt;/a&gt; command to package an ARM into the Template Spec resource.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;az ts create --name webAppSpec --version "v1.0" --resource-group rgName --location "westus2" --template-file "azuredeploy.json"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Required properties:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;--name&lt;/code&gt;: The name for the Template Spec resource.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;--version&lt;/code&gt;: The version number or name of the version being + created.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;--location&lt;/code&gt;: The Azure region for the Template Spec resource.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;--template-file&lt;/code&gt;: The ARM template to be packaged into a template spec.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Creating and Deploying a Template Spec with Linked Templates using Azure CLI&lt;/strong&gt;&lt;br&gt;
To create a Template Spec with artifacts inside it, we need the following:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Create main template (e.g. &lt;em&gt;azuredeploy.json&lt;/em&gt;) that deploys linked templates, to be passed into the &lt;strong&gt;az ts create&lt;/strong&gt; command as a template file.&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Create N number of &lt;a href="https://docs.microsoft.com/en-us/azure/templates/microsoft.resources/deployments"&gt;deployment resources&lt;/a&gt; with linked templates referenced using the &lt;strong&gt;relativePath&lt;/strong&gt; property within the &lt;strong&gt;templateLink&lt;/strong&gt; object.&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5m0wtqp0kafy3jmmh6to.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5m0wtqp0kafy3jmmh6to.png" alt="Alt Text" width="800" height="629"&gt;&lt;/a&gt;&lt;br&gt;
In this example the linked templates are stored in a subfolder called &lt;strong&gt;linkedTemplates&lt;/strong&gt;, which is in the same path as the main template file. The relativePath property is relative to the template file where relativePath is declared. The relativePath property can take any of the following values:&lt;br&gt;
&lt;code&gt;./linkedTemplates/storagelinkedTemplate.json&lt;/code&gt;&lt;br&gt;
&lt;code&gt;/linkedTemplates/storagelinkedTemplate.json&lt;/code&gt;&lt;br&gt;
&lt;code&gt;linkedTemplates/storagelinkedTemplate.json&lt;/code&gt;&lt;br&gt;
&lt;strong&gt;Note:&lt;/strong&gt; relativePath can also be used deploy remote linked templates given all template files are staged together and available via remote URI, such as GitHub or Azure storage. The main template is called by using URI and all linked templates referenced as relative to that main template will have a URI constructed using the main template URI and the relativePath specified. This feature requires api version 2020-10-01 or greater. To learn more about this feature, please refer to &lt;a href="https://docs.microsoft.com/en-us/azure/azure-resource-manager/templates/linked-templates?tabs=azure-powershell#use-relative-path-for-linked-templates"&gt;Link templates for deployment - Microsoft Docs&lt;/a&gt;. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Run the &lt;a href="https://docs.microsoft.com/en-us/cli/azure/ts?view=azure-cli-latest#az_ts_create"&gt;az ts create&lt;/a&gt; command to create or update a template spec version. This command packages the linked templates added via templateLink as linked templates in your Template Spec version.&lt;br&gt;
&lt;code&gt;az ts create --name webAppSpec --version "v1.0" --resource-group rgName --location "westus2" --template-file "azuredeploy.json"&lt;/code&gt;&lt;br&gt;
This command packages the template file azuredeploy.json into the main template of the Template Spec version webAppSpec-v1.0 and all linked templates specified into the &lt;code&gt;linkedTemplates[]&lt;/code&gt; array of the Template Spec object.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Deploy the Template Spec by passing in its resource ID using the  &lt;a href="https://docs.microsoft.com/en-us/cli/azure/deployment/group?view=azure-cli-latest#az_deployment_group_create"&gt;az deployment group create&lt;/a&gt; command. First, we need to get the ID of the Template Spec resource created, and this can be done easily in the Azure CLI by using the &lt;a href="https://docs.microsoft.com/en-us/cli/azure/ts?view=azure-cli-latest#az_ts_show"&gt;az ts show&lt;/a&gt; command:&lt;br&gt;
&lt;code&gt;id=$(az ts show --name webAppSpec --version "v1.0" --resource-group rgName --query "id")&lt;/code&gt; &lt;br&gt;
After storing the resource ID of the template spec into a variable, run the command &lt;code&gt;az deployment group create&lt;/code&gt; and pass in the variable to the &lt;code&gt;--template-spec&lt;/code&gt; input parameter:&lt;br&gt;
&lt;code&gt;az deployment group create --resource-group rgName --template-spec $id&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Verify the contents of a Template Spec by running the &lt;a href="https://docs.microsoft.com/en-us/cli/azure/ts?view=azure-cli-latest#az_ts_export"&gt;az ts export&lt;/a&gt; command that downloads a specified Template Spec version into an &lt;strong&gt;--output-folder&lt;/strong&gt; in your local file system.&lt;br&gt;
&lt;code&gt;az ts export --output-folder "C:\\exported-template-specs" -s "template-spec-version-ID"&lt;/code&gt;&lt;br&gt;
This command exports the specified Template Spec’s main template (e.g. &lt;em&gt;webAppSpec.JSON&lt;/em&gt;) and an artifacts folder with all of its corresponding linked templates. &lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fchsybp59gbhh4gch2d7x.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fchsybp59gbhh4gch2d7x.png" alt="Alt Text" width="312" height="119"&gt;&lt;/a&gt;&lt;br&gt;
The contents of a Template Spec version can also be seen using the Azure Portal.&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxc3hu203gy5povme0gbf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxc3hu203gy5povme0gbf.png" alt="Alt Text" width="800" height="368"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Deploying a Template Spec as Linked Template using ARM Template with ID Reference&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A Template Spec resource can also be referenced using the &lt;strong&gt;templateLink&lt;/strong&gt; property and specifying the &lt;strong&gt;id&lt;/strong&gt; of the template spec:&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyxf9px38f9xnftgp31ry.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyxf9px38f9xnftgp31ry.png" alt="Alt Text" width="800" height="534"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Template Specs in National Clouds&lt;/strong&gt;&lt;br&gt;
Please note that Template Specs is not yet GA in National Clouds. The target GA date for National Clouds is end of July.&lt;/p&gt;

&lt;h2&gt;
  
  
  References and Docs
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://docs.microsoft.com/en-us/cli/azure/ts?view=azure-cli-latest"&gt;Template Spec CLI reference&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.microsoft.com/en-us/azure/templates/microsoft.resources/templatespecs/versions"&gt;Template Spec ARM reference&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.microsoft.com/en-us/powershell/module/az.resources/?view=azps-5.4.0#resources"&gt;Template Spec PowerShell reference&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.microsoft.com/en-us/rest/api/resources/templatespecversions"&gt;Template Spec REST API reference&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.microsoft.com/en-us/azure/azure-resource-manager/templates/quickstart-create-template-specs?tabs=azure-powershell"&gt;Template Spec Quick Start Tutorial&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.microsoft.com/en-us/azure/azure-resource-manager/templates/template-specs?tabs=azure-powershell"&gt;Template specs overview - Microsoft Docs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.microsoft.com/en-us/azure/azure-resource-manager/templates/template-specs-create-linked?tabs=azure-powershell"&gt;Create a template spec with linked templates - Microsoft Docs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.microsoft.com/en-us/azure/azure-resource-manager/templates/template-specs-deploy-linked-template?tabs=azure-powershell"&gt;Deploy a template spec as a linked template - Microsoft Docs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.microsoft.com/en-us/azure/azure-resource-manager/templates/linked-templates?tabs=azure-powershell#use-relative-path-for-linked-templates"&gt;Link templates for deployment - Microsoft Docs&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>azure</category>
      <category>devops</category>
      <category>cloud</category>
      <category>infrastructure</category>
    </item>
    <item>
      <title>ARM Template Specs now Public Preview!</title>
      <dc:creator>Ángel Pérez</dc:creator>
      <pubDate>Thu, 28 Jan 2021 00:36:34 +0000</pubDate>
      <link>https://dev.to/azure/arm-template-specs-now-public-preview-5ap5</link>
      <guid>https://dev.to/azure/arm-template-specs-now-public-preview-5ap5</guid>
      <description>&lt;p&gt;&lt;strong&gt;TL;DR&lt;/strong&gt; – Template Specs is a new resource type for storing ARM templates in your resource groups for faster sharing, deployment, and role-based access control (RBAC) on those Templates shared within an organization. Template Specs addresses today's biggest challenges around ARM template management, storage, and access.&lt;/p&gt;

&lt;p&gt;The Problem: Sharing ARM templates across an organization is challenging, requiring more management steps of the external or internal storage from which they are shared.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Sharing:&lt;/strong&gt; ensuring the right teams within your organization have access becomes very tedious as you cannot leverage Azure RBAC on the ARM templates you want to share.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Management:&lt;/strong&gt; providing teams with the latest ARM templates in a consistent and versioned way.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Why Template Specs?
&lt;/h2&gt;

&lt;p&gt;As a native solution, &lt;a href="https://docs.microsoft.com/en-us/azure/azure-resource-manager/templates/template-specs?tabs=azure-cli"&gt;Template Specs&lt;/a&gt; will enable users to bring all their ARM templates to Azure as a resource and securely store and share them within an Azure tenant. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Solution:&lt;/strong&gt; 1st Party secure storage and management of ARM templates within Azure.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Sharing:&lt;/strong&gt; Who can access a Template Spec can be defined using Azure RBAC.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Management:&lt;/strong&gt; Template Specs can be versioned within the same resource, ensuring users can always access the latest iterations of an ARM template (or templates) stored in a Template Spec.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Template Spec Reference and Docs:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://docs.microsoft.com/en-us/azure/azure-resource-manager/templates/template-specs?tabs=azure-powershell"&gt;Template specs overview - Microsoft Docs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.microsoft.com/en-us/azure/azure-resource-manager/templates/template-specs-create-linked?tabs=azure-powershell"&gt;Create a template spec with linked templates - Microsoft Docs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.microsoft.com/en-us/azure/azure-resource-manager/templates/template-specs-deploy-linked-template?tabs=azure-powershell"&gt;Deploy a template spec as a linked template - Microsoft Docs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.microsoft.com/en-us/azure/azure-resource-manager/templates/linked-templates?tabs=azure-powershell#use-relative-path-for-linked-templates"&gt;Link templates for deployment - Microsoft Docs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.microsoft.com/en-us/azure/azure-resource-manager/templates/linked-templates?tabs=azure-powershell#use-relative-path-for-linked-templates"&gt;Convert portal template to template spec - Microsoft Docs&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; Below references show how Template Specs can be created with an ARM template, but we strongly recommend using Portal, PowerShell or CLI for creating Template Specs.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://docs.microsoft.com/en-us/azure/templates/microsoft.resources/templatespecs/versions"&gt;Microsoft.Resources/templateSpecs/versions - ARM template reference | Microsoft Docs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/Azure/azure-quickstart-templates/tree/master/101-templatespec-create"&gt;Azure-Quickstart-Template&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Creating and Deploying a Template Spec Resource
&lt;/h2&gt;

&lt;p&gt;A Template Spec is a resource that contains an array of Template Spec versions which consists of a &lt;strong&gt;root template and any number of linked templates&lt;/strong&gt;. A Template Spec can be created using the Portal, PowerShell, Azure CLI, REST API, or ARM Template. To help visualize a Template Spec create, here are some examples of what it would look like in the Azure CLI:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Creating a Template Spec using Azure CLI&lt;/strong&gt;&lt;br&gt;
To create a Template Spec, use the &lt;a href="https://docs.microsoft.com/en-us/cli/azure/ts?view=azure-cli-latest#az_ts_create"&gt;az ts create&lt;/a&gt; command to package an ARM into the Template Spec resource.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;az ts create --name webAppSpec --version "1.0" --resource-group rgName --location "westus2" --template-file "azuredeploy.json"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Required properties:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;--name: The name for the Template Spec resource.&lt;/li&gt;
&lt;li&gt;--version: The version number or name of the version being + created.&lt;/li&gt;
&lt;li&gt;--location: The Azure region for the Template Spec resource.&lt;/li&gt;
&lt;li&gt;--template-file: The ARM template to be packaged into a template spec.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Creating and Deploying a Template Spec with Linked Templates using Azure CLI&lt;/strong&gt;&lt;br&gt;
To create a Template Spec with artifacts inside it, we need the following:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Create main template (e.g. &lt;em&gt;azuredeploy.json&lt;/em&gt;) that deploys linked templates, to be passed into the &lt;strong&gt;az ts create&lt;/strong&gt; command as a template file.&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Create N number of &lt;a href="https://docs.microsoft.com/en-us/azure/templates/microsoft.resources/deployments"&gt;deployment resources&lt;/a&gt; with linked templates referenced using the &lt;strong&gt;relativePath&lt;/strong&gt; property within the &lt;strong&gt;templateLink&lt;/strong&gt; object.&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fqmlrtb96vvp1a4x73y43.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fqmlrtb96vvp1a4x73y43.png" alt="Alt Text" width="800" height="629"&gt;&lt;/a&gt;&lt;br&gt;
In this example the linked templates are stored in a subfolder called &lt;strong&gt;artifacts&lt;/strong&gt;, which is in the same path as the main template file. The relativePath property is relative to the template file where relativePath is declared. The relativePath property can take any of the following values:&lt;br&gt;
&lt;code&gt;./artifacts/storagelinkedTemplate.json&lt;/code&gt;&lt;br&gt;
&lt;code&gt;/artifacts/storagelinkedTemplate.json&lt;/code&gt;&lt;br&gt;
&lt;code&gt;artifacts/storagelinkedTemplate.json&lt;/code&gt;&lt;br&gt;
&lt;strong&gt;Note:&lt;/strong&gt; relativePath can also be used deploy remote linked templates given all template files are staged together and available via remote URI, such as GitHub or Azure storage. The main template is called by using URI and all linked templates referenced as relative to that main template will have a URI constructed using the main template URI and the relativePath specified. This feature requires api version 2020-10-01 or greater. To learn more about this feature, please refer to &lt;a href="https://docs.microsoft.com/en-us/azure/azure-resource-manager/templates/linked-templates?tabs=azure-powershell#use-relative-path-for-linked-templates"&gt;Link templates for deployment - Microsoft Docs&lt;/a&gt;. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Run the &lt;a href="https://docs.microsoft.com/en-us/cli/azure/ts?view=azure-cli-latest#az_ts_create"&gt;az ts create&lt;/a&gt; command to create or update a template spec version. This command packages the linked templates added via templateLink as artifacts in your Template Spec version.&lt;br&gt;
&lt;code&gt;az ts create --name webAppSpec --version "1.0" --resource-group rgName --location "westus2" --template-file "azuredeploy.json"&lt;/code&gt;&lt;br&gt;
This command packages the template file azuredeploy.json into the main template of the Template Spec version webAppSpec-1.0 and all linked templates specified into the artifacts[] array of the Template Spec object.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Deploy the Template Spec by passing in its resource ID using the  &lt;a href="https://docs.microsoft.com/en-us/cli/azure/deployment/group?view=azure-cli-latest#az_deployment_group_create"&gt;az deployment group create&lt;/a&gt; command. First, we need to get the ID of the Template Spec resource created, and this can be done easily in the Azure CLI by using the &lt;a href="https://docs.microsoft.com/en-us/cli/azure/ts?view=azure-cli-latest#az_ts_show"&gt;az ts show&lt;/a&gt; command:&lt;br&gt;
&lt;code&gt;id=$(az ts show --name webAppSpec --version "1.0" --resource-group rgName --query "id")&lt;/code&gt;&lt;br&gt;
After storing the resource ID of the template spec into a variable, run the command &lt;code&gt;az deployment group create&lt;/code&gt; and pass in the variable to the &lt;code&gt;--template-spec&lt;/code&gt; input parameter:&lt;br&gt;
&lt;code&gt;az deployment group create --resource-group rgName --template-spec $id&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Verify the contents of a Template Spec by running the &lt;a href="https://docs.microsoft.com/en-us/cli/azure/ts?view=azure-cli-latest#az_ts_export"&gt;az ts export&lt;/a&gt; command that downloads a specified Template Spec version into an &lt;strong&gt;--output-folder&lt;/strong&gt; in your local file system.&lt;br&gt;
&lt;code&gt;az ts export --output-folder "C:\\exported-template-specs" -s "template-spec-version-ID"&lt;/code&gt;&lt;br&gt;
This command exports the specified Template Spec’s main template (e.g. &lt;em&gt;webAppSpec.JSON&lt;/em&gt;) and an artifacts folder with all of its corresponding template artifacts. The contents of a Template Spec version can also be seen using the Azure Portal.&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fmo0wvmryxcjrhpyxvvsl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fmo0wvmryxcjrhpyxvvsl.png" alt="Alt Text" width="800" height="412"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Deploying a Template Spec as Linked Template using ARM Template with ID Reference&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A Template Spec resource can also be referenced using the &lt;strong&gt;templateLink&lt;/strong&gt; property and specifying the &lt;strong&gt;id&lt;/strong&gt; of the template spec:&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fadeuzq3nbogwtotg7mut.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fadeuzq3nbogwtotg7mut.png" alt="Alt Text" width="800" height="534"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  References and Docs
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://docs.microsoft.com/en-us/cli/azure/ts?view=azure-cli-latest"&gt;Template Spec CLI reference&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.microsoft.com/en-us/azure/templates/microsoft.resources/templatespecs/versions"&gt;Template Spec ARM reference&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.microsoft.com/en-us/powershell/module/az.resources/?view=azps-5.4.0#resources"&gt;Template Spec PowerShell reference&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.microsoft.com/en-us/rest/api/resources/templatespecversions"&gt;Template Spec REST API reference&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.microsoft.com/en-us/azure/azure-resource-manager/templates/quickstart-create-template-specs?tabs=azure-powershell"&gt;Template Spec Quick Start Tutorial&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.microsoft.com/en-us/azure/azure-resource-manager/templates/template-specs?tabs=azure-powershell"&gt;Template specs overview - Microsoft Docs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.microsoft.com/en-us/azure/azure-resource-manager/templates/template-specs-create-linked?tabs=azure-powershell"&gt;Create a template spec with linked templates - Microsoft Docs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.microsoft.com/en-us/azure/azure-resource-manager/templates/template-specs-deploy-linked-template?tabs=azure-powershell"&gt;Deploy a template spec as a linked template - Microsoft Docs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.microsoft.com/en-us/azure/azure-resource-manager/templates/linked-templates?tabs=azure-powershell#use-relative-path-for-linked-templates"&gt;Link templates for deployment - Microsoft Docs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.microsoft.com/en-us/azure/azure-resource-manager/templates/linked-templates?tabs=azure-powershell#use-relative-path-for-linked-templates"&gt;Convert portal template to template spec - Microsoft Docs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/Azure/azure-quickstart-templates/tree/master/101-templatespec-create"&gt;Azure-Quickstart-Template&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We look forward to feedback and seeing you succeed on Azure with ARM Template Specs. Please feel free to reach out with any questions on &lt;a href="https://twitter.com/apclouds"&gt;Twitter&lt;/a&gt; or &lt;a href="https://github.com/apclouds"&gt;GitHub&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>azure</category>
      <category>devops</category>
      <category>cloud</category>
      <category>infrastructure</category>
    </item>
    <item>
      <title>Learn to manage Azure resources using ARM templates, with these 6 LEARN modules</title>
      <dc:creator>Ángel Pérez</dc:creator>
      <pubDate>Fri, 11 Dec 2020 19:35:13 +0000</pubDate>
      <link>https://dev.to/azure/managing-azure-resources-using-arm-templates-1e3i</link>
      <guid>https://dev.to/azure/managing-azure-resources-using-arm-templates-1e3i</guid>
      <description>&lt;p&gt;Today more and more businesses are moving their workloads to the cloud. To achieve this, a variety of career disciplines come together to create products that are reliable and that can be deployed in an easily repeatable manner. &lt;/p&gt;

&lt;p&gt;Let’s take an e-commerce company as an example. A developer might work on some front-end and back-end components, whereas a DevOps engineer might focus more on the integration and delivery setup of the entire app, and the Cloud Architect and Project Manager work on the architecture layout for development and production environments.  &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Consistent and repeatable deployments require extensive communication across teams.    &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Consistent and repeatable deployments require extensive communication across teams when using a REST API or other imperative clients to create and update the resources in each deployment. A failure in clear communication can lead to a divergence in an environment configuration.&lt;br&gt;&lt;br&gt;
To solve the &lt;em&gt;divergence problem&lt;/em&gt;, businesses make use of Infrastructure-as-Code (IaC), which enables teams to describe their cloud environments into text files using a declarative syntax. Azure Resource Manager (ARM) is the name of Azure’s cloud native declarative syntax and the files used to describe a cloud resource (or resources) is called an ARM template. Using ARM templates provides some key benefits:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Centralized Resource Configurations:&lt;/strong&gt; Rather than having different cloud resource configurations stored in each different team’s source control, requiring constant sharing, DevOps, Cloud Architects, and Developers teams can store their latest cloud resource configurations into the ARM templates that are used to describe that resource. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Reliable and Repeatable Deployments:&lt;/strong&gt; By describing your cloud resource configurations into an ARM template, anyone with access to that template can deploy and get the exact same cloud resource.  &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Simplified Resource Management:&lt;/strong&gt; Before IaC, users had to use GUIs and other clients to view and manage their resources, making it easier for teams to lose track of what resources they have and how they are configured. By using ARM templates, teams have a better picture of what resources are present and how they are setup.  &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Managed Orchestration:&lt;/strong&gt; Ensuring the correct order of operations occur on deployment is complex. Azure Resource Manage takes care of that for you by orchestrating the deployment of interdependent resources so that they get created in the right order. When possible, ARM deploys resources in parallel to finish deployments faster. By using ARM templates, you deploy the template through one command, instead of through multiple imperative commands.  &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  ARM Template Learn Path
&lt;/h3&gt;

&lt;p&gt;The &lt;a href="https://docs.microsoft.com/en-us/learn/paths/deploy-manage-resource-manager-templates/"&gt;ARM Template Learning Path&lt;/a&gt; provides you with a &lt;strong&gt;FREE&lt;/strong&gt; Azure sandbox environment to test out ARM template concepts, features and best practices. This learn path is designed for beginner to advanced users, looking to learn about ARM templates with scenarios that build on top of each other. The ARM template learn path consists of the following modules:&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Module 1:&lt;/strong&gt; &lt;a href="https://docs.microsoft.com/en-us/learn/modules/create-azure-resource-manager-template-vs-code/"&gt;Deploy Azure infrastructure by using ARM templates&lt;/a&gt;
&lt;/h4&gt;

&lt;p&gt;This module will teach you how to author your own ARM template using Visual Studio Code. You will learn how to declare resources and customize your ARM template by adding multiple resources, parameters, and outputs.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Module 2:&lt;/strong&gt; &lt;a href="https://docs.microsoft.com/en-us/learn/modules/modify-azure-resource-manager-template-reuse/"&gt;Deploy to multiple Azure environments by using ARM template features&lt;/a&gt;
&lt;/h4&gt;

&lt;p&gt;In this module you will learn how to use ARM template language expressions to generate unique values and how to reuse the expression used by storing it into a variable. This module will also cover the basics in how to use tags to organize your resources and how to separate parameters into its own file.  &lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Module 3:&lt;/strong&gt; &lt;a href="https://docs.microsoft.com/en-us/learn/modules/arm-template-test/"&gt;Preview changes and validate Azure resources by using what-if and the ARM template test toolkit&lt;/a&gt;
&lt;/h4&gt;

&lt;p&gt;In this module you will learn how to preview changes to your ARM template before deploying them by using the what-if capability, enabling you identify any creation, update, or deletion of resources before deploying those changes. You will also learn how to validate your ARM template using the ARM template test toolkit.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Module 4:&lt;/strong&gt; &lt;a href="https://docs.microsoft.com/en-us/learn/modules/deploy-templates-command-line-github-actions/"&gt;Automate the deployment of ARM templates by using GitHub Actions&lt;/a&gt;
&lt;/h4&gt;

&lt;p&gt;This module walks through the different ways ARM templates can be deployed based on your needs and automate the deployment using GitHub actions (CI/CD). Lastly, you will learn how to break down complex templates into multiple smaller linked templates.  &lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Module 5:&lt;/strong&gt; &lt;a href="https://docs.microsoft.com/en-us/learn/modules/extend-resource-manager-template-deployment-scripts/"&gt;Extend ARM templates by using deployment scripts&lt;/a&gt;
&lt;/h4&gt;

&lt;p&gt;In this module you will learn how to setup custom steps in your ARM template by using deployment scripts to integrate with external systems.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Module 6:&lt;/strong&gt; &lt;a href="https://docs.microsoft.com/en-us/learn/modules/manage-deployments-advanced-arm-template-features/"&gt;Manage complex cloud deployments by using advanced ARM template features&lt;/a&gt;
&lt;/h4&gt;

&lt;p&gt;This module walks through how to use more advanced ARM template features like the &lt;em&gt;dependsOn&lt;/em&gt;, &lt;em&gt;copy&lt;/em&gt;, and &lt;em&gt;condition&lt;/em&gt; constructs, for managing secrets in conditional deployments.&lt;/p&gt;

&lt;h3&gt;
  
  
  Resources
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://azure.microsoft.com/en-us/free/"&gt;Get your FREE AZURE account today!&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.microsoft.com/en-us/learn/paths/deploy-manage-resource-manager-templates/"&gt;ARM Template LEARN Path&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.microsoft.com/en-us/azure/azure-resource-manager/templates/overview"&gt;What are ARM templates?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.microsoft.com/en-us/azure/azure-resource-manager/templates/overview#why-choose-arm-templates"&gt;Why ARM templates?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.microsoft.com/en-us/azure/azure-resource-manager/templates/template-tutorial-create-first-template?tabs=azure-powershell"&gt;Tutorial: Create and Deploy your first ARM template&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.microsoft.com/en-us/azure/templates/microsoft.resources/deployments"&gt;ARM Template Reference&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://aka.ms/armmeet"&gt;Join the ARM templates Community&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>azure</category>
      <category>tutorial</category>
      <category>devops</category>
      <category>cloud</category>
    </item>
  </channel>
</rss>
