Skip to content
This repository was archived by the owner on Jan 21, 2026. It is now read-only.

Commit 4f02428

Browse files
committed
Update instructions and remove tasks
1 parent 7d4a42e commit 4f02428

1 file changed

Lines changed: 7 additions & 72 deletions

File tree

Instructions/Labs/AZ400_M05_L12_Deployments_using_Azure_Bicep_templates.md

Lines changed: 7 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -33,19 +33,19 @@ After you complete this lab, you will be able to:
3333

3434
## Instructions
3535

36-
### Exercise 0: Configure the lab prerequisites
36+
### Exercise 0: (skip if done) Configure the lab prerequisites
3737

3838
In this exercise, you will set up the prerequisites for the lab, which consist of a new Azure DevOps project with a repository based on the [eShopOnWeb](https://github.com/MicrosoftLearning/eShopOnWeb).
3939

40-
#### Task 1: (skip if done) Create and configure the team project
40+
#### Task 1: (skip if done) Create and configure the team project
4141

4242
In this task, you will create an **eShopOnWeb** Azure DevOps project to be used by several labs.
4343

4444
1. On your lab computer, in a browser window open your Azure DevOps organization. Click on **New Project**. Give your project the name **eShopOnWeb** and leave the other fields with defaults. Click on **Create**.
4545

4646
![Screenshot of the create new project panel.](images/create-project.png)
4747

48-
#### Task 2: (skip if done) Import eShopOnWeb Git Repository
48+
#### Task 2: (skip if done) Import eShopOnWeb Git Repository
4949

5050
In this task you will import the eShopOnWeb Git repository that will be used by several labs.
5151

@@ -179,64 +179,9 @@ In this task, you will modify the main template to reference the template module
179179

180180
### Exercise 2: Deploying the templates to Azure using YAML pipelines
181181

182-
In this lab, you will create a service connection and use it in an Azure DevOps YAML pipeline to deploy your template to your Azure environment.
182+
In this lab, you will use an Azure DevOps YAML pipeline to deploy your template to your Azure environment.
183183

184-
#### Task 1: (skip if done) Create a Service Connection for deployment
185-
186-
In this task, you will create a Service Principal by using the Azure CLI, which will allow Azure DevOps to:
187-
188-
- Deploy resources on your Azure subscription.
189-
- Have read access on the later created Key Vault secrets.
190-
191-
> **Note**: If you do already have a Service Principal, you can proceed directly to the next task.
192-
193-
You will need a Service Principal to deploy Azure resources from Azure Pipelines. Since we are going to retrieve secrets in a pipeline, we will need to grant permission to the service when we create the Azure Key Vault.
194-
195-
A Service Principal is automatically created by Azure Pipelines, when you connect to an Azure subscription from inside a pipeline definition or when you create a new Service Connection from the project settings page (automatic option). You can also manually create the Service Principal from the portal or using Azure CLI and re-use it across projects.
196-
197-
1. From the lab computer, start a web browser, navigate to the [**Azure Portal**](https://portal.azure.com), and sign in with the user account that has the Owner role in the Azure subscription you will be using in this lab and has the role of the Global Administrator in the Microsoft Entra tenant associated with this subscription.
198-
1. In the Azure portal, click on the **Cloud Shell** icon, located directly to the right of the search textbox at the top of the page.
199-
1. If prompted to select either **Bash** or **PowerShell**, select **Bash**.
200-
201-
> **Note**: If this is the first time you are starting **Cloud Shell** and you are presented with the **You have no storage mounted** message, select the subscription you are using in this lab, and select **Create storage**.
202-
203-
1. From the **Bash** prompt, in the **Cloud Shell** pane, run the following commands to retrieve the values of the Azure subscription ID and subscription name attributes:
204-
205-
```bash
206-
az account show --query id --output tsv
207-
az account show --query name --output tsv
208-
```
209-
210-
> **Note**: Copy both values to a text file. You will need them later in this lab.
211-
212-
1. From the **Bash** prompt, in the **Cloud Shell** pane, run the following command to create a Service Principal (replace the **myServicePrincipalName** with any unique string of characters consisting of letters and digits) and **mySubscriptionID** with your Azure subscriptionId :
213-
214-
```bash
215-
az ad sp create-for-rbac --name myServicePrincipalName \
216-
--role contributor \
217-
--scopes /subscriptions/mySubscriptionID
218-
```
219-
220-
> **Note**: The command will generate a JSON output. Copy the output to text file. You will need it later in this lab.
221-
222-
1. Next, from the lab computer, start a web browser, navigate to the Azure DevOps **eShopOnWeb** project. Click on **Project Settings > Service Connections (under Pipelines)** and **New Service Connection**.
223-
224-
![Screenshot of the new service connection button.](images/new-service-connection.png)
225-
226-
1. On the **New service connection** blade, select **Azure Resource Manager** and **Next** (may need to scroll down).
227-
228-
1. The choose **Service Principal (manual)** and click on **Next**.
229-
230-
1. Fill in the empty fields using the information gathered during previous steps:
231-
- Subscription Id and Name.
232-
- Service Principal Id (appId), Service principal key (password) and Tenant ID (tenant).
233-
- In **Service connection name** type **`azure subs`**. This name will be referenced in YAML pipelines when needing an Azure DevOps Service Connection to communicate with your Azure subscription.
234-
235-
![Screenshot of the Azure service connection panel.](images/azure-service-connection.png)
236-
237-
1. Click on **Verify and Save**.
238-
239-
#### Task 2: Deploy resources to Azure by YAML pipelines
184+
#### Task 1: Deploy resources to Azure by YAML pipelines
240185

241186
1. Navigate back to the **Pipelines** pane in of the **Pipelines** hub.
242187
1. In the **Create your first Pipeline** window, click **Create pipeline**.
@@ -258,18 +203,8 @@ A Service Principal is automatically created by Azure Pipelines, when you connec
258203
1. Wait for the deployment to finish and review the results.
259204
![Screenshot of the successful resource deployment to Azure using YAML pipelines.](./images/m06/deploy.png)
260205

261-
#### Task 3: Remove the Azure lab resources
262-
263-
In this task, you will use Azure Cloud Shell to remove the Azure resources provisioned in this lab to eliminate unnecessary charges.
264-
265-
1. In the Azure portal, open the **Bash** shell session within the **Cloud Shell** pane.
266-
1. Delete all resource groups you created throughout the labs of this module by running the following command (replace the resource group name with what you chose):
267-
268-
```bash
269-
az group list --query "[?starts_with(name,'AZ400-EWebShop-NAME')].[name]" --output tsv | xargs -L1 bash -c 'az group delete --name $0 --no-wait --yes'
270-
```
271-
272-
> **Note**: The command executes asynchronously (as determined by the --nowait parameter), so while you will be able to run another Azure CLI command immediately afterwards within the same Bash session, it will take a few minutes before the resource groups are actually removed.
206+
> [!IMPORTANT]
207+
> Remember to delete the resources created in the Azure portal to avoid unnecessary charges.
273208
274209
## Review
275210

0 commit comments

Comments
 (0)