From 17d655a1033818f6861fd205003e60b7cd114518 Mon Sep 17 00:00:00 2001 From: Melony Q Date: Fri, 29 Jun 2018 11:03:49 +0200 Subject: [PATCH] Update best practice with location definiton Update best practice with location definiton --- 1-CONTRIBUTION-GUIDE/best-practices.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/1-CONTRIBUTION-GUIDE/best-practices.md b/1-CONTRIBUTION-GUIDE/best-practices.md index 72a4d0cffa2f..4c52b8e27f1e 100644 --- a/1-CONTRIBUTION-GUIDE/best-practices.md +++ b/1-CONTRIBUTION-GUIDE/best-practices.md @@ -162,7 +162,18 @@ The following example shows how to use the reference function for the `storageUr ``` * Other values in a template configured with a public endpoint, must use the reference function. -* All resources should use the `parameters('location')` expression for the `location` property for all resources. Other expressions may be used for resources that need to be placed in alternate locations, for example a geo-redundant application. Location values must never be hard-coded or use `resourceGroup().location` directly for the location property. +* All resources should use the `parameters('location')` expression for the `location` property for all resources. Other expressions may be used for resources that need to be placed in alternate locations, for example a geo-redundant application. Location values must never be hard-coded or use `resourceGroup().location` directly for the location property.Recommended definition in 'parameters' element as the following : + +```json + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } +``` + * A literal value must not be used for all or part of an endpoint, for example, the following is **never** allowed: ```json