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-functions-resource.md
+11-9Lines changed: 11 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -437,7 +437,7 @@ Returns an object representing a resource's runtime state.
437
437
438
438
| Parameter | Required | Type | Description |
439
439
|:--- |:--- |:--- |:--- |
440
-
| resourceName or resourceIdentifier |Yes |string |Name or unique identifier of a resource. When referencing a resource in the current template, provide only the resource name as a parameter. When referencing a previously deployed resource, provide the resource ID. |
440
+
| resourceName or resourceIdentifier |Yes |string |Name or unique identifier of a resource. When referencing a resource in the current template, provide only the resource name as a parameter. When referencing a previously deployed resource or when the name of the resource is ambiguous, provide the resource ID. |
441
441
| apiVersion |No |string |API version of the specified resource. Include this parameter when the resource isn't provisioned within same template. Typically, in the format, **yyyy-mm-dd**. For valid API versions for your resource, see [template reference](/azure/templates/). |
442
442
| 'Full' |No |string |Value that specifies whether to return the full resource object. If you don't specify `'Full'`, only the properties object of the resource is returned. The full object includes values such as the resource ID and location. |
443
443
@@ -454,11 +454,11 @@ Typically, you use the **reference** function to return a particular value from
When constructing a fully qualified reference to a resource, the order to combine segments from the type and name isn't simply a concatenation of the two. Instead, after the namespace, use a sequence of *type/name* pairs from least specific to most specific:
@@ -529,14 +529,16 @@ For example:
529
529
`Microsoft.Compute/virtualMachines/myVM/extensions/myExt` is correct
530
530
`Microsoft.Compute/virtualMachines/extensions/myVM/myExt` is not correct
531
531
532
+
To simplify the creation of any resource ID, use the `resourceId()` functions described in this document instead of the `concat()` function.
533
+
532
534
### Get managed identity
533
535
534
536
[Managed identities for Azure resources](../../active-directory/managed-identities-azure-resources/overview.md) are [extension resource types](../management/extension-resource-types.md) that are created implicitly for some resources. Because the managed identity isn't explicitly defined in the template, you must reference the resource that the identity is applied to. Use `Full` to get all of the properties, including the implicitly created identity.
535
537
536
538
For example, to get the tenant ID for a managed identity that is applied to a virtual machine scale set, use:
0 commit comments