Microsoft.Resources templateSpecs
Bicep resource definition
The templateSpecs resource type can be deployed with operations that target:
- Resource groups - See resource group deployment commands
For a list of changed properties in each API version, see change log.
Remarks
Instead of using an ARM template or Bicep file to define the template spec, we recommend that you use New-AzTemplateSpec in Azure PowerShell or az ts create in Azure CLI to create your template spec. Those commands automatically convert linked templates to artifacts connected to your main template. When you use an ARM template to create the template spec, you must manually add those linked templates as artifacts, which can be complicated. For more information, see Quickstart: Create and deploy template spec.
Resource format
To create a Microsoft.Resources/templateSpecs resource, add the following Bicep to your template.
resource symbolicname 'Microsoft.Resources/templateSpecs@2022-02-01' = {
name: 'string'
location: 'string'
tags: {
tagName1: 'tagValue1'
tagName2: 'tagValue2'
}
properties: {
description: 'string'
displayName: 'string'
metadata: any()
}
}
Property values
templateSpecs
Name | Description | Value |
---|---|---|
name | The resource name | string (required) Character limit: 1-90 Valid characters: Alphanumerics, underscores, parentheses, hyphens, and periods. |
location | The location of the Template Spec. It cannot be changed after Template Spec creation. It must be one of the supported Azure locations. | string (required) |
tags | Resource tags. | Dictionary of tag names and values. See Tags in templates |
properties | Template Spec properties. | TemplateSpecProperties |
TemplateSpecProperties
Name | Description | Value |
---|---|---|
description | Template Spec description. | string Constraints: Max length = 4096 |
displayName | Template Spec display name. | string Constraints: Max length = 64 |
metadata | The Template Spec metadata. Metadata is an open-ended object and is typically a collection of key-value pairs. | For Bicep, you can use the any() function. |
ARM template resource definition
The templateSpecs resource type can be deployed with operations that target:
- Resource groups - See resource group deployment commands
For a list of changed properties in each API version, see change log.
Remarks
Instead of using an ARM template or Bicep file to define the template spec, we recommend that you use New-AzTemplateSpec in Azure PowerShell or az ts create in Azure CLI to create your template spec. Those commands automatically convert linked templates to artifacts connected to your main template. When you use an ARM template to create the template spec, you must manually add those linked templates as artifacts, which can be complicated. For more information, see Quickstart: Create and deploy template spec.
Resource format
To create a Microsoft.Resources/templateSpecs resource, add the following JSON to your template.
{
"type": "Microsoft.Resources/templateSpecs",
"apiVersion": "2022-02-01",
"name": "string",
"location": "string",
"tags": {
"tagName1": "tagValue1",
"tagName2": "tagValue2"
},
"properties": {
"description": "string",
"displayName": "string",
"metadata": {}
}
}
Property values
templateSpecs
Name | Description | Value |
---|---|---|
type | The resource type | 'Microsoft.Resources/templateSpecs' |
apiVersion | The resource api version | '2022-02-01' |
name | The resource name | string (required) Character limit: 1-90 Valid characters: Alphanumerics, underscores, parentheses, hyphens, and periods. |
location | The location of the Template Spec. It cannot be changed after Template Spec creation. It must be one of the supported Azure locations. | string (required) |
tags | Resource tags. | Dictionary of tag names and values. See Tags in templates |
properties | Template Spec properties. | TemplateSpecProperties |
TemplateSpecProperties
Name | Description | Value |
---|---|---|
description | Template Spec description. | string Constraints: Max length = 4096 |
displayName | Template Spec display name. | string Constraints: Max length = 64 |
metadata | The Template Spec metadata. Metadata is an open-ended object and is typically a collection of key-value pairs. |
Terraform (AzAPI provider) resource definition
The templateSpecs resource type can be deployed with operations that target:
- Resource groups
For a list of changed properties in each API version, see change log.
Resource format
To create a Microsoft.Resources/templateSpecs resource, add the following Terraform to your template.
resource "azapi_resource" "symbolicname" {
type = "Microsoft.Resources/templateSpecs@2022-02-01"
name = "string"
location = "string"
parent_id = "string"
tags = {
tagName1 = "tagValue1"
tagName2 = "tagValue2"
}
body = jsonencode({
properties = {
description = "string"
displayName = "string"
}
})
}
Property values
templateSpecs
Name | Description | Value |
---|---|---|
type | The resource type | "Microsoft.Resources/templateSpecs@2022-02-01" |
name | The resource name | string (required) Character limit: 1-90 Valid characters: Alphanumerics, underscores, parentheses, hyphens, and periods. |
location | The location of the Template Spec. It cannot be changed after Template Spec creation. It must be one of the supported Azure locations. | string (required) |
parent_id | To deploy to a resource group, use the ID of that resource group. | string (required) |
tags | Resource tags. | Dictionary of tag names and values. |
properties | Template Spec properties. | TemplateSpecProperties |
TemplateSpecProperties
Name | Description | Value |
---|---|---|
description | Template Spec description. | string Constraints: Max length = 4096 |
displayName | Template Spec display name. | string Constraints: Max length = 64 |
metadata | The Template Spec metadata. Metadata is an open-ended object and is typically a collection of key-value pairs. |