You are viewing a free preview of this lesson.
Subscribe to unlock all 10 lessons in this course and every other course on LearningBro.
ARM templates include a rich library of built-in functions and support conditional resource deployment. In this lesson, you will learn the most important template functions, how to write conditions, and how to use copy loops for creating multiple resources.
ARM template functions follow the syntax:
"[functionName(arg1, arg2)]"
All expressions are enclosed in square brackets. Functions can be nested:
"[format('vm-{0}-{1}', parameters('environment'), uniqueString(resourceGroup().id))]"
| Function | Description | Example |
|---|---|---|
format() | String formatting with placeholders | format('vm-{0}', parameters('env')) |
concat() | Concatenate strings | concat('prefix-', parameters('name')) |
toLower() | Convert to lowercase | toLower(parameters('name')) |
toUpper() | Convert to uppercase | toUpper('hello') |
substring() | Extract part of a string | substring('HelloWorld', 0, 5) → 'Hello' |
replace() | Replace substring | replace('hello-world', '-', '_') |
split() | Split string into array | split('a,b,c', ',') |
trim() | Remove whitespace | trim(' hello ') |
Subscribe to continue reading
Get full access to this lesson and all 10 lessons in this course.