You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/azure-resource-manager/templates/template-expressions.md
+50-1Lines changed: 50 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ title: Template syntax and expressions
3
3
description: Describes the declarative JSON syntax for Azure Resource Manager templates (ARM templates).
4
4
ms.topic: article
5
5
ms.custom: devx-track-arm-template
6
-
ms.date: 04/28/2025
6
+
ms.date: 01/09/2026
7
7
---
8
8
9
9
# Syntax and expressions in ARM templates
@@ -12,6 +12,55 @@ The basic syntax of the Azure Resource Manager template (ARM template) is JavaSc
12
12
13
13
A template expression can't exceed 24,576 characters.
14
14
15
+
## Compile-time constrains
16
+
17
+
Template expressions are evaluated at runtime, but certain properties in ARM templates must be known at compile time and therefore cannot use expressions. These properties must be specified as literal strings so the deployment engine and compiler can validate resource schemas, dependencies, and supported properties before any expressions are evaluated.
18
+
19
+
Properties that must be compile-time literals include:
20
+
21
+
- The `type` and `apiVersion` of a resource.
22
+
- The `name` of variables, parameters, and outputs.
23
+
- Extension references.
24
+
25
+
The following ARM template failed because the `type` property of the resource uses an expression:
Azure Resource Manager provides [functions](template-functions.md) that you can use in a template. The following example shows an expression that uses a function in the default value of a parameter:
0 commit comments