Create and Deploy a templateSpec
This sample shows how to create and deploy templatesSpecs from a template. There are 2 steps to complete the use of this sample. The steps are disctinct because the lifecycle of the two steps are different. Typically, a templateSpec version is created/updated a few times but will be deployed many times.
- Create the templateSpec by deploying the template in the prereqs folder, this creates the templateSpec version and makes it available to the tenant. You can deploy the prereq template using the deploy buttons in the prereq readme.
- Deploy the templateSpec using azuredeploy.json. This deploys the template stored in the indicated version of the templateSpec, creating the resources defined in the templateSpec's template.
When you create the templateSpec (using the prereq template) note the name of the subscription, resourceGroup, templateSpec name and templateSpec version. This information creates the resourceId and is needed for deployment.
If you create and deploy the templateSpec in the same resourceGroup clean up will be simple, but in practice templateSpecs (create) and resources created by them (deploy) will be placed in separate resourceGroups.
See the templateSpec documentation for more information on how to use templateSpecs in Azure.
Tags: Microsoft.Resources/deployments, Microsoft.Resources/templateSpecs, versions, Microsoft.Compute/disks