You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Child and extension resources allow your Azure deployments to access the advanced functionality and power of the Azure platform. You can create these resource types in Bicep by using a clear and understandable template syntax.
1
+
Child and extension resources enable your Azure deployments to access the advanced functionality and power of the Azure platform. You can create these resource types in Bicep by using a clear and understandable template syntax.
2
2
3
-
You can also use Bicep to refer to resources that were created outside the Bicep file itself. For example, you can refer to resources that your colleagues created manually by using the Azure portal, or from within another Bicep template or module, even if they're in a different resource group or subscription. By using these features of Bicep, you can unlock the ability to create powerful templates that deploy all aspects of your Azure infrastructure.
3
+
You can also use Bicep to refer to resources that were created outside of the Bicep file. For example, you can refer to resources that your colleagues created manually by using the Azure portal, or from within another Bicep template or module, even if the resources are in a different resource group or subscription. By using these features of Bicep, you can unlock the ability to create powerful templates that deploy all the components of your Azure infrastructure.
4
4
5
5
## Example scenario
6
6
7
7
Suppose you're responsible for deploying and configuring Azure infrastructure at a toy company. Your company's R&D department contacts you because they're working on a new toy drone that sprays glitter over unsuspecting targets. R&D team members are starting to test the drone. They plan to collect telemetry about the distance the drone can fly, the amount of glitter it can spray, and the battery level.
8
8
9
9
They want you to set up a new Azure Cosmos DB database for storing this valuable and highly sensitive product test data. They need you to log all database-access attempts so that they can feel confident that no competitors are accessing the data.
10
10
11
-
The team created a storage account to store all their product design documents, and they want you to help audit all attempts to access them.
11
+
The team created a storage account to store all their product design documents, and they want you to help audit all attempts to access the documents.
12
12
13
13
:::image type="content" source="../media/1-architecture-diagram.png" alt-text="Architecture diagram showing how logs are sent from the new Azure Cosmos DB account and the storage account to the Log Analytics workspace." border="false":::
14
14
15
-
## What will we be doing?
15
+
## What will you be doing?
16
16
17
17
In this module, you learn about Azure resource types, and how child and extension resources are used throughout Azure. You create a Bicep template that deploys a set of Azure resources, and you use several features of Bicep, including:
18
18
19
-
- Child resource definitions, through nested resources, the `parent` property, and by constructing multipart resource names.
19
+
- Child resource definitions, through nested resources and the `parent` property, and by constructing multipart resource names.
20
20
- Extension resource definitions, by using the `scope` property.
21
21
- Existing resource references, by using the `existing` keyword.
22
22
23
-
## What is the main goal?
23
+
## What's the main goal?
24
24
25
-
By the end of this module, you're able to create Bicep templates that include child and extension resources. You're also able to create Bicep templates that refer to pre-existing Azure resources that were created outside the template file.
25
+
By the end of this module, you'll be able to create Bicep templates that include child and extension resources. You'll also be able to create Bicep templates that refer to pre-existing Azure resources that were created of outside the template file.
26
26
27
27
## Prerequisites
28
28
@@ -31,10 +31,10 @@ You should be familiar with:
31
31
- Creating and deploying basic Bicep templates.
32
32
- Azure, including the Azure portal, subscriptions, resource groups, and resource definitions.
33
33
34
-
To follow along with the exercises in the module, you need:
34
+
To complete the exercises in the module, you need:
35
35
36
36
-[Visual Studio Code](https://code.visualstudio.com), installed locally.
37
37
- The [Bicep extension for Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-bicep), installed.
38
-
-Either:
38
+
-One of the following:
39
39
- The latest [Azure CLI](/cli/azure/install-azure-cli) tools, installed locally.
40
40
- The latest version of [Azure PowerShell](/powershell/azure/install-az-ps), installed locally.
Copy file name to clipboardExpand all lines: learn-pr/azure/child-extension-bicep-templates/includes/2-understand-azure-resources.md
+12-12Lines changed: 12 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@ All Azure resources are deployed with a specific *type*. The type identifies the
2
2
3
3
## Resource providers
4
4
5
-
Azure Resource Manager is designed so that many different *resource providers* can be managed through Resource Manager APIs and ARM templates. A resource provider is a logical grouping of resource types, which usually relate to one or a few Azure services. Examples of resource providers include:
5
+
Azure Resource Manager is designed so that many different *resource providers* can be managed through Resource Manager APIs and Azure Resource Manager (ARM) templates. A resource provider is a logical grouping of resource types that usually relate to one or a few Azure services. Examples of resource providers include:
6
6
7
7
-`Microsoft.Compute`, which is used for virtual machines.
8
8
-`Microsoft.Network`, which is used for networking resources like virtual networks, network security groups, and route tables.
@@ -22,37 +22,37 @@ Resource providers have to be registered for your subscription before you can us
22
22
23
23
A resource provider exposes multiple different types. Each resource type has its own set of properties and behaviors that define the resource and what it can do. For example, within the `Microsoft.Web` resource provider, there are several resource types, including:
24
24
25
-
-`sites`: Defines an App Service application or Azure Functions application. Properties include the environment variables that your application uses, and the supported protocols (HTTP and HTTPS) to access the application.
26
-
-`serverFarms`: Defines an App Service plan, the infrastructure that runs your applications. Properties include the size and SKU of the servers, and the number of instances of your plan that you want to deploy.
25
+
-`sites`. Defines an App Service application or Azure Functions application. Properties include the environment variables that your application uses, and the supported protocols (HTTP and HTTPS) to access the application.
26
+
-`serverFarms`. Defines an App Service plan, the infrastructure that runs your applications. Properties include the size and SKU of the servers, and the number of instances of your plan that you want to deploy.
27
27
28
-
When you define resources in Bicep, you have to specify their resource type and the version of the resource provider's API that you want Bicep to use for the resource. This information helps the Bicep tooling and the Resource Manager understand which properties should be provided with the resource definition.
28
+
When you define resources in Bicep, you have to specify their resource type and the version of the resource provider's API that you want Bicep to use for the resource. This information helps the Bicep tooling and the Resource Manager determine which properties should be provided with the resource definition.
29
29
30
30
> [!TIP]
31
31
> It's a good idea to use a recent API version for each resource. New features in Azure services are sometimes available only in newer API versions.
32
32
33
-
You combine the resource provider and type name to make a fully qualified resource type name. The fully qualified type name consists of the resource provider name, a slash (`/`), and the resource type. For example, a storage account’s fully qualified type name is `Microsoft.Storage/storageAccounts`. In this instance, its resource provider name is `Microsoft.Storage`, and the resource type is `storageAccounts`.
33
+
You combine the resource provider and type name to make a fully qualified resource type name. The fully qualified type name consists of the resource provider name, a slash (`/`), and the resource type. For example, a storage account's fully qualified type name is `Microsoft.Storage/storageAccounts`. In this instance, its resource provider name is `Microsoft.Storage` and the resource type is `storageAccounts`.
34
34
35
35
## Resource IDs
36
36
37
37
Every Azure resource has a unique resource ID. This ID includes information that helps disambiguate the resource from any other resource of the same type, or even from different resources that might share the same name. A resource ID for a storage account looks like this:
Let's look at a visual representation of the same information:
43
+
Here's a visual representation of the same information:
44
44
45
45
:::image type="content" source="../media/2-resource-id.png" alt-text="Resource ID for a storage account, split with key/value pair on a separate line." border="false":::
46
46
47
-
You can see that a resource ID interleaves information about the resource type and the specific resource you deployed. Let's break this example resource ID into its components:
47
+
You can see that a resource ID contains information about the resource type and the specific resource you deployed. Here's a breakdown of this example resource ID into its components:
48
48
49
-
-`subscriptions/A123b4567c-1234-1a2b-2b1a-1234abc12345` indicates that this resource is within the Azure subscription with ID. `A123b4567c-1234-1a2b-2b1a-1234abc12345`.
50
-
-`resourceGroups/ToyDevelopment` indicates that the resource is within the resource group named `ToyDevelopment`.
49
+
-`subscriptions/aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e` indicates that the resource is in the Azure subscription that has ID `aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e`.
50
+
-`resourceGroups/ToyDevelopment` indicates that the resource is in the resource group named `ToyDevelopment`.
51
51
-`providers/Microsoft.Storage` indicates that the resource is using a type from the `Microsoft.Storage` resource provider.
52
52
-`storageAccounts` is the resource type.
53
53
-`secrettoys` is the name of the storage account.
54
54
55
55
> [!TIP]
56
-
> You can access the ID of any resource in Bicep by using the symbolic name and the `id` property. For example, if you define a storage account with the symbolic name `toyDesignDocumentsStorageAccount`, you can access its resource ID by using the expression `toyDesignDocumentsStorageAccount.id`.
56
+
> You can access the ID of any resource in Bicep by using the symbolic name and the `id` property. For example, if you define a storage account that has the symbolic name `toyDesignDocumentsStorageAccount`, you can access its resource ID by using the expression `toyDesignDocumentsStorageAccount.id`.
57
57
58
-
Now that you understand the basics of resource types and resource IDs, let's look at child resources.
58
+
Now that you understand the basics of resource types and resource IDs, you'll look at child resources.
Copy file name to clipboardExpand all lines: learn-pr/azure/child-extension-bicep-templates/index.yml
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -2,8 +2,8 @@
2
2
uid: learn.azure.child-extension-bicep-templates
3
3
metadata:
4
4
moduleType: standard
5
-
title: Deploy child and extension resources by using Bicep
6
-
description: Learn how to deploy child and extension resources, and refer to existing resources, within your Bicep code.
5
+
title: Deploy Child and Extension Resources by Using Bicep
6
+
description: Learn how to deploy child and extension resources, and refer to existing resources, in Bicep code.
7
7
ms.service: azure-resource-manager
8
8
manager: jasongroce
9
9
ms.date: 05/27/2025
@@ -13,7 +13,7 @@ metadata:
13
13
ms.devlang: bicep
14
14
title: Deploy child and extension resources by using Bicep
15
15
summary: |
16
-
Deploy various Azure resources in your Bicep code. Define and use child and extension resources. Work with resources that you created outside a Bicep template or module.
16
+
Deploy various Azure resources in your Bicep code. Define and use child and extension resources. Work with resources that you created outside of a Bicep template or module.
17
17
abstract: |
18
18
After completing this module, you'll be able to:
19
19
- Explain resource types and resource IDs
@@ -24,10 +24,10 @@ prerequisites: |
24
24
- Creating and deploying basic Bicep templates.
25
25
- Azure, including the Azure portal, subscriptions, resource groups, and resource definitions.
26
26
27
-
To follow along with the exercises in the module, you need:
27
+
To complete the exercises in the module, you need:
28
28
- [Visual Studio Code](https://code.visualstudio.com), installed locally.
29
29
- The [Bicep extension for Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-bicep), installed.
30
-
- Either:
30
+
- One of the following:
31
31
- The latest [Azure CLI](/cli/azure/install-azure-cli) tools, installed locally.
32
32
- The latest version of [Azure PowerShell](/powershell/azure/install-az-ps), installed locally.
0 commit comments