Skip to content

Commit ca16d1b

Browse files
authored
Merge pull request #51749 from edburns/edburns-MSFT-template-function-nits
Add emphasis on the importance of the apiVersion.
2 parents 70dd065 + e33a654 commit ca16d1b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

articles/azure-resource-manager/templates/template-functions-resource.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -438,12 +438,12 @@ Returns an object representing a resource's runtime state.
438438
| Parameter | Required | Type | Description |
439439
|:--- |:--- |:--- |:--- |
440440
| 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-
| 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/). |
441+
| apiVersion |No |string |API version of the specified resource. **This parameter is required 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/). |
442442
| '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. |
443443

444444
### Return value
445445

446-
Every resource type returns different properties for the reference function. The function doesn't return a single, predefined format. Also, the returned value differs based on whether you specified the full object. To see the properties for a resource type, return the object in the outputs section as shown in the example.
446+
Every resource type returns different properties for the reference function. The function doesn't return a single, predefined format. Also, the returned value differs based on the value of the `'Full'` argument. To see the properties for a resource type, return the object in the outputs section as shown in the example.
447447

448448
### Remarks
449449

@@ -508,7 +508,7 @@ When referencing a resource that is deployed in the same template, provide the n
508508
"value": "[reference(parameters('storageAccountName'))]"
509509
```
510510

511-
When referencing a resource that isn't deployed in the same template, provide the resource ID.
511+
When referencing a resource that isn't deployed in the same template, provide the resource ID and `apiVersion`.
512512

513513
```json
514514
"value": "[reference(resourceId(parameters('storageResourceGroup'), 'Microsoft.Storage/storageAccounts', parameters('storageAccountName')), '2018-07-01')]"

0 commit comments

Comments
 (0)