Skip to content

Commit c659dc1

Browse files
Merge pull request #239413 from mumian/0526-ts-module
deploy template specs by deploying linked module
2 parents d476cef + 8a40c17 commit c659dc1

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

articles/azure-resource-manager/bicep/template-specs.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Create & deploy template specs in Bicep
33
description: Describes how to create template specs in Bicep and share them with other users in your organization.
44
ms.topic: conceptual
55
ms.custom: ignite-2022, devx-track-azurepowershell, devx-track-azurecli, devx-track-arm-template, devx-track-bicep
6-
ms.date: 11/17/2022
6+
ms.date: 05/26/2023
77
---
88

99
# Azure Resource Manager template specs in Bicep
@@ -43,10 +43,10 @@ In addition, you also need the permissions for deploying a Bicep file. See [Depl
4343

4444
Template specs provide the following benefits:
4545

46-
* You use standard ARM templates or Bicep files for your template spec.
47-
* You manage access through Azure RBAC, rather than SAS tokens.
48-
* Users can deploy the template spec without having write access to the Bicep file.
49-
* You can integrate the template spec into existing deployment process, such as PowerShell script or DevOps pipeline.
46+
- You use standard ARM templates or Bicep files for your template spec.
47+
- You manage access through Azure RBAC, rather than SAS tokens.
48+
- Users can deploy the template spec without having write access to the Bicep file.
49+
- You can integrate the template spec into existing deployment process, such as PowerShell script or DevOps pipeline.
5050

5151
Template specs enable you to create canonical templates and share them with teams in your organization. The template specs are secure because they're available to Azure Resource Manager for deployment, but not accessible to users without the correct permission. Users only need read access to the template spec to deploy its template, so you can share the template without allowing others to modify it.
5252

@@ -154,11 +154,11 @@ resource createTemplateSpecVersion 'Microsoft.Resources/templateSpecs/versions@2
154154

155155
The JSON template embedded in the Bicep file needs to make these changes:
156156

157-
* Remove the commas at the end of the lines.
158-
* Replace double quotes to single quotes.
159-
* Escape the single quotes within the expressions. For example, **'name': '[parameters(\'storageAccountType\')]'**.
160-
* To access the parameters and variables defined in the Bicep file, you can directly use the parameter names and the variable names. To access the parameters and variables defined in `mainTemplate`, you still need to use the ARM JSON template syntax. For example, **'name': '[parameters(\'storageAccountType\')]'**.
161-
* Use the Bicep syntax to call Bicep functions. For example, **'location': resourceGroup().location**.
157+
- Remove the commas at the end of the lines.
158+
- Replace double quotes to single quotes.
159+
- Escape the single quotes within the expressions. For example, **'name': '[parameters(\'storageAccountType\')]'**.
160+
- To access the parameters and variables defined in the Bicep file, you can directly use the parameter names and the variable names. To access the parameters and variables defined in `mainTemplate`, you still need to use the ARM JSON template syntax. For example, **'name': '[parameters(\'storageAccountType\')]'**.
161+
- Use the Bicep syntax to call Bicep functions. For example, **'location': resourceGroup().location**.
162162

163163
The size of a template spec is limited to approximated 2 MB. If a template spec size exceeds the limit, you'll get the **TemplateSpecTooLarge** error code. The error message says:
164164

@@ -205,7 +205,7 @@ az ts show \
205205

206206
After you've created the template spec, users with the [Template Specs Reader](#required-permissions) role can deploy it. In addition, you also need the permissions for deploying an ARM template. See [Deploy - CLI](./deploy-cli.md#required-permissions) or [Deploy - PowerShell](./deploy-powershell.md#required-permissions).
207207

208-
Template specs can be deployed through the portal, PowerShell, Azure CLI, or as a Bicep module in a larger template deployment. Users in an organization can deploy a template spec to any scope in Azure (resource group, subscription, management group, or tenant).
208+
Template specs can be deployed through the portal, PowerShell, Azure CLI, or as a [Bicep module](#link-to-template-specs) in a larger template deployment. Users in an organization can deploy a template spec to any scope in Azure (resource group, subscription, management group, or tenant).
209209

210210
Instead of passing in a path or URI for a Bicep file, you deploy a template spec by providing its resource ID. The resource ID has the following format:
211211

@@ -403,7 +403,7 @@ Both the template and its versions can have tags. The tags are applied or inheri
403403

404404
## Link to template specs
405405

406-
After creating a template spec, you can link to that template spec in a Bicep module. For more information, see [File in template spec](./modules.md#path-to-module).
406+
After creating a template spec, you can link to that template spec in a Bicep module. The template spec is deployed when you deploy the Bicep file containing that module. For more information, see [File in template spec](./modules.md#path-to-module).
407407

408408
## Next steps
409409

0 commit comments

Comments
 (0)