From aebc48ad3f3fae0355bdf90e61cfb2d6c3252d82 Mon Sep 17 00:00:00 2001 From: staleycyn <45440075+staleycyn@users.noreply.github.com> Date: Fri, 5 Jan 2024 14:34:37 -0800 Subject: [PATCH] Update LAB_03-Manage_Azure_Resources_by_Using_ARM_Templates.md --- ..._Azure_Resources_by_Using_ARM_Templates.md | 121 +++++++++--------- 1 file changed, 61 insertions(+), 60 deletions(-) diff --git a/New Instructions/Lab/LAB_03-Manage_Azure_Resources_by_Using_ARM_Templates.md b/New Instructions/Lab/LAB_03-Manage_Azure_Resources_by_Using_ARM_Templates.md index 5af043a9..574676a2 100644 --- a/New Instructions/Lab/LAB_03-Manage_Azure_Resources_by_Using_ARM_Templates.md +++ b/New Instructions/Lab/LAB_03-Manage_Azure_Resources_by_Using_ARM_Templates.md @@ -35,9 +35,10 @@ Your team has explored the basic Azure administrative capabilities such as provi + Task 1: Create an Azure Resource Manager template for deployment of an Azure managed disk. + Task 2: Edit an Azure Resource Manager template and then create an Azure managed disk by using the template. + Task 3: Review the Azure Resource Manager template-based deployment of the managed disk. -+ Task 4: Deploy a managed disk by using Azure Bicep. -+ Task 5: Deploy a template with Azure PowerShell (option 1). -+ Task 6: Deploy a template with the CLI (option 2). ++ Task 4: Deploy a template with Azure PowerShell (option 1). ++ Task 5: Deploy a template with the CLI (option 2). ++ Task 6: Deploy a managed disk by using Azure Bicep. + ## Task 1: Create an Azure Resource Manager template for deployment of an Azure managed disk @@ -151,7 +152,63 @@ In this task, you verify that the deployment has finished successfully. All prio >**Note:** You can also deploy templates from the command line. Task 5 shows how to deploy using PowerShell. Task 6 shows how to deploy using the CLI. -## Task 4: Deploy a resource by using Azure Bicep + +## Task 4. Deploy a template with Azure PowerShell (option 1). + +1. Open the Cloud Shell and select **PowerShell**. + +1. If necessary, use the **Advanced** settings to create disk storage for the Cloud Shell. + +1. In the Cloud Shell, use the **Upload** icon to upload the template and parameters files. You will need to upload each file separately. + +1. Verify your files are available in the Cloud Shell storage. + + ```powershell + dir + ``` + +1. In the Cloud Shell, select the **Editor** icon and navigate to the parameters JSON file. + +1. Make a change. For example, change the disk name to **az104-disk2**. + + >**Note**: You can target your template deployment to a resource group, subscription, management group, or tenant. Depending on the scope of the deployment, you use different commands. + +1. To deploy to a resource group, use **New-AzResourceGroupDeployment**. + + ```powershell + New-AzResourceGroupDeployment -ResourceGroupName az104-rg3 -TemplateFile template.json -TemplateParameterFile parameters.json + ``` +1. Ensure the command completes and the ProvisioningState is **Succeeded**. + +## Task 5: Deploy a template with the CLI (option 2) + +1. Open the Cloud Shell and select **Bash**. + +1. If necessary, use the **Advanced** settings to create disk storage for the Cloud Shell. + +1. In the Cloud Shell, use the **Upload** icon to upload the template and parameters files. You will need to upload each file separately. + +1. Verify your files are available in the Cloud Shell storage. + + ```sh + dir + ``` + +1. In the Cloud Shell, select the **Editor** icon and navigate to the parameters JSON file. + +1. Make a change. For example, change the disk name to **az104-disk2**. + + >**Note**: You can target your template deployment to a resource group, subscription, management group, or tenant. Depending on the scope of the deployment, you use different commands. + +1. To deploy to a resource group, use **az deployment group create**. + + ```sh + az deployment group create --resource-group az104-rg3 --template-file template.json --parameters parameters.json + ``` +1. Ensure the command completes and the ProvisioningState is **Succeeded**. + + +## Task 6: Deploy a resource by using Azure Bicep In this task, you will use a Bicep file to deploy a storage account to your resource group. Bicep is a declarative automation tool that is built on ARM templates, but are easier to read and work with. @@ -181,62 +238,6 @@ In this task, you will use a Bicep file to deploy a storage account to your reso 1. Search for and select **Storage Accounts**. Verify that a storage account named **az104** has been created in the **az104-rg3** resource group. -## Task 5. Deploy a template with Azure PowerShell (option 1). - -1. Open the Cloud Shell and select **PowerShell**. - -1. If necessary, use the **Advanced** settings to create disk storage for the Cloud Shell. - -1. In the Cloud Shell, use the **Upload** icon to upload the template and parameters files. You will need to upload each file separately. - -1. Verify your files are available in the Cloud Shell storage. - - ```powershell - dir - ``` - -1. In the Cloud Shell, select the **Editor** icon and navigate to the parameters JSON file. - -1. Make a change. For example, change the disk name to **az104-disk2**. - - >**Note**: You can target your template deployment to a resource group, subscription, management group, or tenant. Depending on the scope of the deployment, you use different commands. - -1. To deploy to a resource group, use **New-AzResourceGroupDeployment**. - - ```powershell - New-AzResourceGroupDeployment -ResourceGroupName az104-rg3 -TemplateFile template.json -TemplateParameterFile parameters.json - ``` -1. Ensure the command completes and the ProvisioningState is **Succeeded**. - -## Task 6: Deploy a template with the CLI (option 2) - -1. Open the Cloud Shell and select **Bash**. - -1. If necessary, use the **Advanced** settings to create disk storage for the Cloud Shell. - -1. In the Cloud Shell, use the **Upload** icon to upload the template and parameters files. You will need to upload each file separately. - -1. Verify your files are available in the Cloud Shell storage. - - ```sh - dir - ``` - -1. In the Cloud Shell, select the **Editor** icon and navigate to the parameters JSON file. - -1. Make a change. For example, change the disk name to **az104-disk2**. - - >**Note**: You can target your template deployment to a resource group, subscription, management group, or tenant. Depending on the scope of the deployment, you use different commands. - -1. To deploy to a resource group, use **az deployment group create**. - - ```sh - az deployment group create --resource-group az104-rg3 --template-file template.json --parameters parameters.json - ``` -1. Ensure the command completes and the ProvisioningState is **Succeeded**. - - - ## Key takeaways Congratulations on completing the lab. Here are the main takeaways for this lab.