Skip to content

Commit c5093d7

Browse files
committed
updates6
1 parent ca2d7a2 commit c5093d7

11 files changed

+91
-91
lines changed

learn-pr/azure/build-first-bicep-file/1-introduction.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: Introduction
44
metadata:
55
unitType: introduction
66
title: Introduction
7-
description: Learn how to create Bicep files and create reusable infrastructure as code.
7+
description: Learn how to create Bicep files and reusable infrastructure as code.
88
ms.date: 01/31/2025
99
author: mumian
1010
ms.author: jgao

learn-pr/azure/build-first-bicep-file/3-define-resources.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: Define resources
44
metadata:
55
unitType: learning-content
66
title: Define Azure resources in a Bicep file
7-
description: Learn how to define resources in Bicep and understand how Bicep treats dependencies between resources.
7+
description: Learn how to define resources in Bicep, and understand how Bicep treats dependencies between resources.
88
ms.date: 01/31/2025
99
author: mumian
1010
ms.author: jgao

learn-pr/azure/build-first-bicep-file/9-knowledge-check.yml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -20,36 +20,36 @@ quiz:
2020
choices:
2121
- content: Create a Bicep file that deploys all of the resources for the manufacturing application. Add template parameters for the values that might change between environments.
2222
isCorrect: true
23-
explanation: Correct. File parameters are a great way to manage multiple environments. You can specify different values for the parameters when you deploy the file into the test and production environments.
23+
explanation: Correct. Bicep file parameters are a great way to manage multiple environments. You can specify different values for the parameters when you deploy the file into the test and production environments.
2424
- content: Create a module that deploys all of the resources for the manufacturing application. Create separate Bicep files for each environment, and add the shared module to each environment's file.
2525
isCorrect: false
2626
explanation: Incorrect. Modules can be a great way to reuse your Bicep code, but when you're deploying multiple environments, there's usually a simpler way to keep track of the different configurations for each deployment.
27-
- content: Create a file that deploys all of the resources required for the manufacturing application. Add variables for the values that might change between environments.
27+
- content: Create a Bicep file that deploys all of the resources required for the manufacturing application. Add variables for the values that might change between environments.
2828
isCorrect: false
2929
explanation: Incorrect. Variables have the same value, so you don't usually need to consider them when you deploy multiple environments.
3030
- content: |
31-
The file that the team has developed includes this line:<br />
31+
The Bicep file that the team has developed includes this line:<br />
3232
`param siteName string = 'mysite-${uniqueString(resourceGroup().id)}'`<br />
3333
Which of these statements is true?
3434
choices:
35-
- content: Whoever deploys the file must specify a value for the `siteName` parameter.
35+
- content: Whoever deploys the Bicep file must specify a value for the `siteName` parameter.
3636
isCorrect: false
3737
explanation: Incorrect. The `siteName` parameter has a _default value_ specified, which means that deployments don't have to specify the parameter value. If they don't, the parameter's default value is used.
38-
- content: The `siteName` parameter will have a different default value every time the file is deployed.
38+
- content: The `siteName` parameter will have a different default value every time the Bicep file is deployed.
3939
isCorrect: false
40-
explanation: Incorrect. The parameter's default value is set through the `uniqueString()` function, which has been seeded with the resource group's ID. Therefore, the value that the `uniqueString()` function returns is the same whenever the file is deployed in the same resource group in the same Azure subscription.
41-
- content: When the file is deployed to the same resource group in the same subscription repeatedly, the `siteName` parameter's default value will be the same each time.
40+
explanation: Incorrect. The parameter's default value is set through the `uniqueString()` function, which has been seeded with the resource group's ID. Therefore, the value that the `uniqueString()` function returns is the same whenever the Bicep file is deployed in the same resource group in the same Azure subscription.
41+
- content: When the Bicep file is deployed to the same resource group in the same subscription repeatedly, the `siteName` parameter's default value will be the same each time.
4242
isCorrect: true
43-
explanation: Correct. The `siteName` parameter's default value uses string interpolation to combine the string prefix `mysite-` with a value from the `uniqueString()` function, which is seeded with the resource group ID. The value that the `uniqueString()` function returns is the same whenever the file is deployed in the same resource group in the same Azure subscription.
43+
explanation: Correct. The `siteName` parameter's default value uses string interpolation to combine the string prefix `mysite-` with a value from the `uniqueString()` function, which is seeded with the resource group ID. The value that the `uniqueString()` function returns is the same whenever the Bicep file is deployed in the same resource group in the same Azure subscription.
4444
- content: The Bicep file that the IT department wrote has two modules in it. Which of these statements is true?
4545
choices:
46-
- content: If an output is added to one of the modules, it's automatically published as an output from the parent file too.
46+
- content: If an output is added to one of the modules, it's automatically published as an output from the parent Bicep file too.
4747
isCorrect: false
48-
explanation: Incorrect. Outputs that Bicep modules define are available to the parent file, but they aren't automatically available to the file deployer. However, you can define an output in your file and pass the value through.
49-
- content: If an output is added to one of the modules, it will automatically be available for the parent file to use.
48+
explanation: Incorrect. Outputs that Bicep modules define are available to the parent Bicep file, but they aren't automatically available to the file deployer. However, you can define an output in your Bicep file, and pass the value through.
49+
- content: If an output is added to one of the modules, it will automatically be available for the parent Bicep file to use.
5050
isCorrect: true
51-
explanation: Correct. The outputs from modules are automatically made available for the parent file to use, such as in defining input parameter values for other modules or in setting the properties on resources.
52-
- content: Modules can't have outputs; only files can.
51+
explanation: Correct. The outputs from modules are automatically made available for the parent Bicep file to use, such as in defining input parameter values for other modules or in setting the properties on resources.
52+
- content: Modules can't have outputs; only Bicep files can.
5353
isCorrect: false
54-
explanation: Incorrect. Modules can define outputs. The outputs from modules are automatically made available to the parent file.
54+
explanation: Incorrect. Modules can define outputs. The outputs from modules are automatically made available to the parent Bicep file.
5555

learn-pr/azure/build-first-bicep-file/includes/1-introduction.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,17 @@ You'll host the website in Azure using Azure App Service. You'll incorporate a s
88

99
:::image type="content" source="../media/1-architecture-diagram.png" alt-text="Architecture diagram that shows a resource group containing an App Service plan, App Service app, and storage account." border="false":::
1010

11-
You decide to build the resources using infrastructure as code (IaC) techniques so you can reuse the file for future product launches.
11+
You decide to build the resources using infrastructure as code (IaC) techniques so you can reuse the Bicep file for future product launches.
1212

1313
## What will we learn?
1414

1515
In this module, you'll create a reusable Bicep file to deploy a set of Azure resources for new product launches. You'll use many elements of the Bicep language, including:
1616

1717
- Resource definitions to deploy your Azure resources from your Bicep code.
18-
- Parameters to make your file reusable.
19-
- Variables and expressions to make it easier to write and deploy your file.
20-
- Modules to help structure your file into multiple files.
21-
- Outputs to send data from your file and modules back to whoever or whatever is deploying your infrastructure.
18+
- Parameters to make your Bicep file reusable.
19+
- Variables and expressions to make it easier to write and deploy your Bicep file.
20+
- Modules to help structure your Bicep file into multiple files.
21+
- Outputs to send data from your Bicep file and modules back to whoever or whatever is deploying your infrastructure.
2222

2323
## What is the main goal?
2424

learn-pr/azure/build-first-bicep-file/includes/3-define-resources.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,13 @@ Let's look closely at some key parts of this resource definition:
4141
- You'll then set other details of the resource, such as its location, SKU (pricing tier), and kind. There are also properties you can define that are different for each resource type. Different API versions might introduce different properties, too. In this example, we're setting the storage account's access tier to `Hot`.
4242

4343
> [!TIP]
44-
> Resource names often have rules you must follow, like maximum lengths, allowed characters, and uniqueness across all of Azure. The requirements for resource names are different for each Azure resource type. Be sure to understand the naming restrictions and requirements before you add them to your file.
44+
> Resource names often have rules you must follow, like maximum lengths, allowed characters, and uniqueness across all of Azure. The requirements for resource names are different for each Azure resource type. Be sure to understand the naming restrictions and requirements before you add them to your Bicep file.
4545
4646
## What happens when resources depend on each other?
4747

4848
A Bicep file usually includes several resources. Often, you need a resource to depend on another resource. You might have to extract some information from one resource to be able to define another. If you're deploying a web application, you'll have to create the server infrastructure before you can add an application to it. These relationships are called _dependencies_.
4949

50-
You'll need to deploy an App Service app for the file that will help launch the toy product, but to create an App Service app, you first need to create an App Service plan. The App Service plan represents the server-hosting resources, and it's declared like this example:
50+
You'll need to deploy an App Service app for the Bicep file that will help launch the toy product, but to create an App Service app, you first need to create an App Service plan. The App Service plan represents the server-hosting resources, and it's declared like this example:
5151

5252
```bicep
5353
resource appServicePlan 'Microsoft.Web/serverFarms@2023-12-01' = {
@@ -74,7 +74,7 @@ resource appServiceApp 'Microsoft.Web/sites@2023-12-01' = {
7474
}
7575
```
7676

77-
This file instructs Azure to host the app on the plan you created. Notice that the plan's definition includes the App Service plan's symbolic name on this line: `serverFarmId: appServicePlan.id`. This line means that Bicep will get the App Service plan's _resource ID_ using the `id` property. It's effectively saying: _this app's server-farm ID is the ID of the App Service plan defined earlier_.
77+
This Bicep file instructs Azure to host the app on the plan you created. Notice that the plan's definition includes the App Service plan's symbolic name on this line: `serverFarmId: appServicePlan.id`. This line means that Bicep will get the App Service plan's _resource ID_ using the `id` property. It's effectively saying: _this app's server-farm ID is the ID of the App Service plan defined earlier_.
7878

7979
> [!TIP]
8080
> In Azure, a _resource ID_ is a unique identifier for each resource. The resource ID includes the Azure subscription ID, the resource group name, and the resource name, along with some other information.

learn-pr/azure/build-first-bicep-file/includes/4-exercise-define-resources-bicep-file.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ During the process, you'll:
66

77
> [!div class="checklist"]
88
>
9-
> - Create a file that defines a single storage account resource that includes hard-coded values.
9+
> - Create a Bicep file that defines a single storage account resource that includes hard-coded values.
1010
> - Provision your infrastructure and verify the result.
11-
> - Add an App Service plan and app to the file.
11+
> - Add an App Service plan and app to the Bicep file.
1212
> - Provision the infrastructure again to see the new resources.
1313
1414
[!INCLUDE [Install the Bicep extension for Visual Studio Code](../../includes/azure-template-bicep-exercise-vscode-extension.md)]
@@ -17,20 +17,20 @@ During the process, you'll:
1717

1818
1. Open Visual Studio Code.
1919

20-
1. Create a new file called _main.bicep_.
20+
1. Create a new Bicep file called _main.bicep_.
2121

2222
1. Save the empty file so that Visual Studio Code loads the Bicep tooling.
2323

2424
You can either select **File** > **Save As** or select <kbd>Ctrl+S</kbd> in Windows (<kbd>⌘+S</kbd> on macOS). Be sure to remember where you've saved the file. For example, you might want to create a _files_ folder in which to save the file.
2525

26-
1. Add the following Bicep code into the file. You'll deploy the file soon. It's a good idea to type the code yourself instead of copying and pasting so you can see how the tooling helps you to write your Bicep files.
26+
1. Add the following Bicep code into the Bicep file. You'll deploy the file soon. It's a good idea to type the code yourself instead of copying and pasting so you can see how the tooling helps you to write your Bicep files.
2727

2828
:::code language="bicep" source="code/4-template.bicep" range="1-11":::
2929

3030
> [!TIP]
3131
> Bicep is strict about where you put line breaks, so make sure you don't put line breaks in different places than listed here.
3232
33-
Notice that Visual Studio Code automatically suggests property names as you type. The Bicep extension for Visual Studio Code understands the resources you're defining in your file, and it lists the available properties and values that you can use.
33+
Notice that Visual Studio Code automatically suggests property names as you type. The Bicep extension for Visual Studio Code understands the resources you're defining in your Bicep file, and it lists the available properties and values that you can use.
3434

3535
1. Update the name of the storage account from `toylaunchstorage` to something that's likely to be unique, because every storage account needs a globally unique name. Make sure the name is 3 to 24 characters and includes only lowercase letters and numbers.
3636

@@ -45,7 +45,7 @@ During the process, you'll:
4545

4646
[!INCLUDE [Bootstrapping instructions for first Bicep exercise - CLI](../../includes/azure-template-bicep-exercise-sandbox-deploy-cli.md)]
4747

48-
### Deploy the file to Azure
48+
### Deploy the Bicep file to Azure
4949

5050
Run the following command from the terminal in Visual Studio Code to deploy the Bicep file to Azure. The command can take a minute or two to complete, and then you'll see a successful deployment. If you see a warning about the location being hard-coded, you can ignore it. You'll fix the location later in the module. It's safe to proceed and the deployment will succeed.
5151

@@ -61,9 +61,9 @@ You'll see `Running...` in the terminal.
6161

6262
[!INCLUDE [Bootstrapping instructions for first Bicep exercise - PowerShell](../../includes/azure-template-bicep-exercise-sandbox-deploy-powershell.md)]
6363

64-
### Deploy the file to Azure
64+
### Deploy the Bicep file to Azure
6565

66-
Deploy the file to Azure by using the following Azure PowerShell command in the terminal. The command can take a minute or two to complete, and you'll see a successful deployment. If you see a warning about the location being hard-coded, you can ignore it. You'll fix the location later in the module. It's safe to proceed and the deployment will succeed.
66+
Deploy the Bicep file to Azure by using the following Azure PowerShell command in the terminal. The command can take a minute or two to complete, and you'll see a successful deployment. If you see a warning about the location being hard-coded, you can ignore it. You'll fix the location later in the module. It's safe to proceed and the deployment will succeed.
6767

6868
```azurepowershell
6969
New-AzResourceGroupDeployment -Name main -TemplateFile main.bicep
@@ -120,7 +120,7 @@ Get-AzResourceGroupDeployment -ResourceGroupName <rgn>[sandbox resource group na
120120

121121
## Add an App Service plan and app to your Bicep file
122122

123-
In the previous task, you learned how to create a file that contains a single resource and deploy it. Now you're ready to deploy more resources, including a dependency. In this task, you'll add an App Service plan and app to the Bicep file.
123+
In the previous task, you learned how to create a Bicep file that contains a single resource and deploy it. Now you're ready to deploy more resources, including a dependency. In this task, you'll add an App Service plan and app to the Bicep file.
124124

125125
1. In the _main.bicep_ file in Visual Studio Code, add the following code to the bottom of the file:
126126

0 commit comments

Comments
 (0)