Skip to content

Commit 4e8d2fa

Browse files
committed
update ARM template user-defined functions article
1 parent 35f1a8f commit 4e8d2fa

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

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

Lines changed: 3 additions & 5 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
}

0 commit comments

Comments
 (0)