Skip to content

Commit 4f4f5c7

Browse files
Merge pull request #302919 from mumian/0717-bouncerate-udf
update ARM template user-defined functions article
2 parents bd5d273 + c174e69 commit 4f4f5c7

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

articles/azure-resource-manager/templates/user-defined-functions.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,12 @@ title: User-defined functions in templates
33
description: Describes how to define and use user-defined functions in an Azure Resource Manager template (ARM template).
44
ms.topic: conceptual
55
ms.custom: devx-track-arm-template
6-
ms.date: 04/28/2025
6+
ms.date: 07/17/2025
77
---
88

99
# User-defined functions in ARM template
1010

11-
Within your template, you can create your own functions. These functions are available for use in your template. User-defined functions are separate from the [standard template functions](template-functions.md) that are automatically available within your template. Create your own functions when you have complicated expressions that are used repeatedly in your template.
12-
13-
This article describes how to add user-defined functions in your Azure Resource Manager template (ARM template).
11+
User-defined functions help simplify and reuse complex expressions in your ARM templates. By encapsulating logic in custom functions, you can improve template readability, maintainability, and scalability—especially when the same logic appears in multiple places. These functions are distinct from the [built-in template functions](template-functions.md) that are always available. To define user-defined functions in Bicep, see [User-defined functions in Bicep](../bicep/user-defined-functions.md).
1412

1513
## Define the function
1614

@@ -65,7 +63,7 @@ The following example shows a template that includes a user-defined function to
6563
],
6664
"output": {
6765
"type": "string",
68-
"value": "[concat(toLower(parameters('namePrefix')), uniqueString(resourceGroup().id))]"
66+
"value": "[format('{0}{1}', toLower(parameters('namePrefix')), uniqueString(resourceGroup().id))]"
6967
}
7068
}
7169
}
@@ -74,7 +72,7 @@ The following example shows a template that includes a user-defined function to
7472
"resources": [
7573
{
7674
"type": "Microsoft.Storage/storageAccounts",
77-
"apiVersion": "2022-09-01",
75+
"apiVersion": "2025-01-01",
7876
"name": "[contoso.uniqueName(parameters('storageNamePrefix'))]",
7977
"location": "South Central US",
8078
"sku": {

0 commit comments

Comments
 (0)