Skip to content

Commit 6160776

Browse files
authored
Merge pull request #187713 from tfitzmac/0207guid
changed note about param order
2 parents a1d956c + adbfdb3 commit 6160776

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

articles/azure-resource-manager/bicep/bicep-functions-string.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Describes the functions to use in a Bicep file to work with strings
44
author: mumian
55
ms.author: jgao
66
ms.topic: conceptual
7-
ms.date: 10/29/2021
7+
ms.date: 02/07/2022
88
---
99

1010
# String functions for Bicep
@@ -471,6 +471,13 @@ This function is helpful when you need to create a value in the format of a glob
471471

472472
The returned value isn't a random string, but rather the result of a hash function on the parameters. The returned value is 36 characters long. It isn't globally unique. To create a new GUID that isn't based on that hash value of the parameters, use the [newGuid](#newguid) function.
473473

474+
> [!NOTE]
475+
> The order of the parameters affects the returned value. For example:
476+
>
477+
> `guid('hello', 'world')` and `guid('world', 'hello')`
478+
>
479+
> don't return the same value.
480+
474481
The following examples show how to use guid to create a unique value for commonly used levels.
475482

476483
Unique scoped to subscription
@@ -495,9 +502,6 @@ guid(resourceGroup().id, deployment().name)
495502

496503
A string containing 36 characters in the format of a globally unique identifier.
497504

498-
> [!NOTE]
499-
> Importance of order: It is not just the same parameters, they need to be in the same order. For example: `guid('hello', 'world') != guid('world', 'hello')`
500-
501505
### Examples
502506

503507
The following example returns results from guid:

0 commit comments

Comments
 (0)