Skip to content

Commit 4904b19

Browse files
authored
Merge pull request #102385 from mumian/0127-highlight-tutorials
update the out-of-repo snippet links
2 parents 5761b40 + 4ee8445 commit 4904b19

8 files changed

+18
-18
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ You must have Visual Studio Code with the Resource Manager Tools extension, and
2121

2222
At the end of the previous tutorial, your template had the following JSON:
2323

24-
[!code-json[](~/resourcemanager-templates/get-started-with-templates/add-sku/azuredeploy.json)]
24+
:::code language="json" source="~/resourcemanager-templates/get-started-with-templates/add-sku/azuredeploy.json":::
2525

2626
The location of the storage account is hard-coded to **East US**. However, you may need to deploy the storage account to other regions. You're again facing an issue of your template lacking flexibility. You could add a parameter for location, but it would be great if its default value made more sense than just a hard-coded value.
2727

@@ -35,7 +35,7 @@ The following example highlights the changes to add a parameter called **locatio
3535

3636
Copy the whole file and replace your template with its contents.
3737

38-
[!code-json[](~/resourcemanager-templates/get-started-with-templates/add-location/azuredeploy.json?range=1-44&highlight=24-27,34)]
38+
:::code language="json" source="~/resourcemanager-templates/get-started-with-templates/add-location/azuredeploy.json" range="1-44" highlight="24-27,34":::
3939

4040
## Deploy template
4141

articles/azure-resource-manager/templates/template-tutorial-add-outputs.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ You must have Visual Studio Code with the Resource Manager Tools extension, and
2121

2222
At the end of the previous tutorial, your template had the following JSON:
2323

24-
[!code-json[](~/resourcemanager-templates/get-started-with-templates/add-variable/azuredeploy.json)]
24+
:::code language="json" source="~/resourcemanager-templates/get-started-with-templates/add-variable/azuredeploy.json":::
2525

2626
It deploys a storage account, but it doesn't return any information about the storage account. You might need to capture properties from a new resource so they're available later for reference.
2727

@@ -31,7 +31,7 @@ You can use outputs to return values from the template. For example, it might be
3131

3232
The following example highlights the change to your template to add an output value. Copy the whole file and replace your template with its contents.
3333

34-
[!code-json[](~/resourcemanager-templates/get-started-with-templates/add-outputs/azuredeploy.json?range=1-53&highlight=47-52)]
34+
:::code language="json" source="~/resourcemanager-templates/get-started-with-templates/add-outputs/azuredeploy.json" range="1-53" highlight="47-52":::
3535

3636
There are some important items to note about the output value you added.
3737

articles/azure-resource-manager/templates/template-tutorial-add-parameters.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ You must have Visual Studio Code with the Resource Manager Tools extension, and
2121

2222
At the end of the previous tutorial, your template had the following JSON:
2323

24-
[!code-json[](~/resourcemanager-templates/get-started-with-templates/add-storage/azuredeploy.json)]
24+
:::code language="json" source="~/resourcemanager-templates/get-started-with-templates/add-storage/azuredeploy.json":::
2525

2626
You may have noticed that there's a problem with this template. The storage account name is hard-coded. You can only use this template to deploy the same storage account every time. To deploy a storage account with a different name, you would have to create a new template, which obviously isn't a practical way to automate your deployments.
2727

@@ -31,7 +31,7 @@ To make your template reusable, let's add a parameter that you can use to pass i
3131

3232
Copy the whole file and replace your template with its contents.
3333

34-
[!code-json[](~/resourcemanager-templates/get-started-with-templates/add-name/azuredeploy.json?range=1-26&highlight=4-10,15)]
34+
:::code language="json" source="~/resourcemanager-templates/get-started-with-templates/add-name/azuredeploy.json" range="1-26" highlight="4-10,15":::
3535

3636
## Deploy template
3737

@@ -75,7 +75,7 @@ Parameters enable you to customize the deployment by providing values that are t
7575

7676
The previous template always deployed a Standard_LRS storage account. You might want the flexibility to deploy different SKUs depending on the environment. The following example shows the changes to add a parameter for SKU. Copy the whole file and paste over your template.
7777

78-
[!code-json[](~/resourcemanager-templates/get-started-with-templates/add-sku/azuredeploy.json?range=1-40&highlight=10-23,32)]
78+
:::code language="json" source="~/resourcemanager-templates/get-started-with-templates/add-sku/azuredeploy.json" range="1-40" highlight="10-23,32":::
7979

8080
The **storageSKU** parameter has a default value. This value is used when a value isn't specified during the deployment. It also has a list of allowed values. These values match the values that are needed to create a storage account. You don't want users of your template to pass in SKUs that don't work.
8181

@@ -173,4 +173,4 @@ If you're stopping now, you might want to clean up the resources you deployed by
173173
You improved the template created in the [first tutorial](template-tutorial-create-first-template.md) by adding parameters. In the next tutorial, you'll learn about template functions.
174174

175175
> [!div class="nextstepaction"]
176-
> [Add template functions](template-tutorial-add-functions.md)
176+
> [Add template functions](template-tutorial-add-functions.md)

articles/azure-resource-manager/templates/template-tutorial-add-resource.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ To add a storage account definition to the existing template, look at the highli
2323

2424
Replace **{provide-unique-name}** with a unique storage account name. The storage account name must be unique across Azure. The name must have only lowercase letters or numbers. It can be no longer than 24 characters. You might try a naming pattern like using **store1** as a prefix and then adding your initials and today's date. For example, the name you use could look like **store1abc09092019**.
2525

26-
[!code-json[](~/resourcemanager-templates/get-started-with-templates/add-storage/azuredeploy.json?range=1-19&highlight=5-17)]
26+
:::code language="json" source="~/resourcemanager-templates/get-started-with-templates/add-storage/azuredeploy.json" range="1-19" highlight="5-17":::
2727

2828
Guessing a unique name for a storage account isn't easy and doesn't work well for automating large deployments. Later in this tutorial series, you'll use template features that make it easier to create a unique name.
2929

articles/azure-resource-manager/templates/template-tutorial-add-variables.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@ You must have Visual Studio Code with the Resource Manager Tools extension, and
2121

2222
At the end of the previous tutorial, your template had the following JSON:
2323

24-
[!code-json[](~/resourcemanager-templates/get-started-with-templates/add-location/azuredeploy.json)]
24+
:::code language="json" source="~/resourcemanager-templates/get-started-with-templates/add-location/azuredeploy.json":::
2525

2626
The parameter for the storage account name is hard-to-use because you have to provide a unique name. If you've completed the earlier tutorials in this series, you're probably tired of guessing a unique name. You solve this problem by adding a variable that constructs a unique name for the storage account.
2727

2828
## Use variable
2929

3030
The following example highlights the changes to add a variable to your template that creates a unique storage account name. Copy the whole file and replace your template with its contents.
3131

32-
[!code-json[](~/resourcemanager-templates/get-started-with-templates/add-variable/azuredeploy.json?range=1-47&highlight=5-9,29-31,36)]
32+
:::code language="json" source="~/resourcemanager-templates/get-started-with-templates/add-variable/azuredeploy.json" range="1-47" highlight="5-9,29-31,36":::
3333

3434
Notice that it includes a variable named **uniqueStorageName**. This variable uses four functions to construct a string value.
3535

articles/azure-resource-manager/templates/template-tutorial-export-template.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ You must have Visual Studio Code with the Resource Manager Tools extension, and
2121

2222
At the end of the previous tutorial, your template had the following JSON:
2323

24-
[!code-json[](~/resourcemanager-templates/get-started-with-templates/add-outputs/azuredeploy.json)]
24+
:::code language="json" source="~/resourcemanager-templates/get-started-with-templates/add-outputs/azuredeploy.json":::
2525

2626
This template works well for deploying storage accounts, but you might want to add more resources to it. You can export a template from an existing resource to quickly get the JSON for that resource.
2727

@@ -71,7 +71,7 @@ The following example highlights the additions to your template. It contains the
7171

7272
Copy the whole file and replace your template with its contents.
7373

74-
[!code-json[](~/resourcemanager-templates/get-started-with-templates/export-template/azuredeploy.json?range=1-77&highlight=28-31,50-69)]
74+
:::code language="json" source="~/resourcemanager-templates/get-started-with-templates/export-template/azuredeploy.json" range="1-77" highlight="28-31,50-69":::
7575

7676
## Deploy template
7777

articles/azure-resource-manager/templates/template-tutorial-quickstart-template.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ You must have Visual Studio Code with the Resource Manager Tools extension, and
2121

2222
At the end of the previous tutorial, your template had the following JSON:
2323

24-
[!code-json[](~/resourcemanager-templates/get-started-with-templates/export-template/azuredeploy.json)]
24+
:::code language="json" source="~/resourcemanager-templates/get-started-with-templates/export-template/azuredeploy.json":::
2525

2626
This template works for deploying storage accounts and app service plans, but you might want to add a website to it. You can use pre-built templates to quickly discover the JSON required for deploying a resource.
2727

@@ -40,7 +40,7 @@ This template works for deploying storage accounts and app service plans, but yo
4040

4141
Merge the quickstart template with the existing template:
4242

43-
[!code-json[](~/resourcemanager-templates/get-started-with-templates/quickstart-template/azuredeploy.json?range=1-108&highlight=32-45,49,85-100)]
43+
:::code language="json" source="~/resourcemanager-templates/get-started-with-templates/quickstart-template/azuredeploy.json" range="1-108" highlight="32-45,49,85-100":::
4444

4545
The web app name needs to be unique across Azure. To prevent having duplicate names, the **webAppPortalName** variable has been updated from **"webAppPortalName": "[concat(parameters('webAppName'), '-webapp')]"** to **"webAppPortalName": "[concat(parameters('webAppName'), uniqueString(resourceGroup().id))]"**.
4646

articles/azure-resource-manager/templates/template-tutorial-use-parameter-file.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ You must have Visual Studio Code with the Resource Manager Tools extension, and
2121

2222
Your template has many parameters you can provide during deployment. At the end of the previous tutorial, your template looked like:
2323

24-
[!code-json[](~/resourcemanager-templates/get-started-with-templates/add-tags/azuredeploy.json)]
24+
:::code language="json" source="~/resourcemanager-templates/get-started-with-templates/add-tags/azuredeploy.json":::
2525

2626
This template works well, but now you want to easily manage the parameters that you pass in for the template.
2727

@@ -31,13 +31,13 @@ Parameter files are JSON files with a structure that is similar to your template
3131

3232
In VS Code, create a new file with following content. Save the file with the name **azuredeploy.parameters.dev.json**.
3333

34-
[!code-json[](~/resourcemanager-templates/get-started-with-templates/add-tags/azuredeploy.parameters.dev.json)]
34+
:::code language="json" source="~/resourcemanager-templates/get-started-with-templates/add-tags/azuredeploy.parameters.dev.json":::
3535

3636
This file is your parameter file for the development environment. Notice that it uses Standard_LRS for the storage account, names resources with a **dev** prefix, and sets the **Environment** tag to **Dev**.
3737

3838
Again, create a new file with the following content. Save the file with the name **azuredeploy.parameters.prod.json**.
3939

40-
[!code-json[](~/resourcemanager-templates/get-started-with-templates/add-tags/azuredeploy.parameters.prod.json)]
40+
:::code language="json" source="~/resourcemanager-templates/get-started-with-templates/add-tags/azuredeploy.parameters.prod.json":::
4141

4242
This file is your parameter file for the production environment. Notice that it uses Standard_GRS for the storage account, names resources with a **contoso** prefix, and sets the **Environment** tag to **Production**. In a real production environment, you would also want to use an app service with a SKU other than free, but we'll continue to use that SKU for this tutorial.
4343

0 commit comments

Comments
 (0)