Skip to content

Commit 3cbe8c4

Browse files
authored
Merge pull request #205440 from johndowns/bicep-scenarios-full-examples
Update Bicep scenarios - Add links to full examples
2 parents 8daf23b + 5b4bf65 commit 3cbe8c4

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

articles/azure-resource-manager/bicep/scenarios-secrets.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Describes how to manage secrets by using Bicep and Azure Key Vault.
44
author: johndowns
55
ms.author: jodowns
66
ms.topic: conceptual
7-
ms.date: 12/01/2021
7+
ms.date: 07/20/2022
88
---
99
# Manage secrets by using Bicep
1010

@@ -30,6 +30,8 @@ Sometimes, you need to access a secret from one resource to configure another re
3030

3131
For example, you might have created a storage account in another deployment, and need to access its primary key to configure an Azure Functions app. You can use the `existing` keyword to obtain a strongly typed reference to the pre-created storage account, and then use the storage account's `listKeys()` method to create a connection string with the primary key:
3232

33+
> The following example is part of a larger example. For a Bicep file that you can deploy, see the [complete file](https://raw.githubusercontent.com/Azure/azure-docs-bicep-samples/main/samples/scenarios-secrets/function-app.bicep).
34+
3335
::: code language="bicep" source="~/azure-docs-bicep-samples/samples/scenarios-secrets/function-app.bicep" range="8-46" highlight="1-3, 5, 22, 34" :::
3436

3537
By using this approach, you avoid passing secrets into or out of your Bicep file.
@@ -48,6 +50,8 @@ When you create a vault, you need to determine who and what can access its data.
4850

4951
Secrets are a [child resource](child-resource-name-type.md) and can be created by using the type [`Microsoft.KeyVault/vaults/secrets`](/azure/templates/microsoft.keyvault/vaults/secrets?tabs=bicep). The following example demonstrates how to create a vault and a secret:
5052

53+
> The following example is part of a larger example. For a Bicep file that you can deploy, see the [complete file](https://raw.githubusercontent.com/Azure/azure-docs-bicep-samples/main/samples/scenarios-secrets/key-vault-secret.bicep).
54+
5155
::: code language="bicep" source="~/azure-docs-bicep-samples/samples/scenarios-secrets/key-vault-secret.bicep" range="4-25" :::
5256

5357
> [!TIP]

articles/azure-resource-manager/bicep/scenarios-virtual-networks.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Describes how to create virtual networks, network security groups,
44
author: johndowns
55
ms.author: jodowns
66
ms.topic: conceptual
7-
ms.date: 12/01/2021
7+
ms.date: 07/20/2022
88
---
99
# Create virtual network resources by using Bicep
1010

@@ -23,6 +23,8 @@ Virtual networks contain subnets, which are logical groups of IP addresses withi
2323
2424
It's best to define your subnets within the virtual network definition, as in this example:
2525

26+
> The following example is part of a larger example. For a Bicep file that you can deploy, [see the complete file](https://raw.githubusercontent.com/Azure/azure-docs-bicep-samples/main/samples/scenarios-virtual-networks/vnet.bicep).
27+
2628
::: code language="bicep" source="~/azure-docs-bicep-samples/samples/scenarios-virtual-networks/vnet.bicep" range="7-30, 39" :::
2729

2830
Although both approaches enable you to define and create your subnets, there is an important difference. When you define subnets by using child resources, the first time your Bicep file is deployed, the virtual network is deployed. Then, after the virtual network deployment is complete, each subnet is deployed. This sequencing occurs because Azure Resource Manager deploys each individual resource separately.
@@ -33,6 +35,8 @@ When you redeploy the same Bicep file, the same deployment sequence occurs. Howe
3335

3436
You often need to refer to a subnet's resource ID. When you use the `subnets` property to define your subnet, [you can use the `existing` keyword](existing-resource.md) to also obtain a strongly typed reference to the subnet, and then access the subnet's `id` property:
3537

38+
> The following example is part of a larger example. For a Bicep file that you can deploy, [see the complete file](https://raw.githubusercontent.com/Azure/azure-docs-bicep-samples/main/samples/scenarios-virtual-networks/vnet.bicep).
39+
3640
::: code language="bicep" source="~/azure-docs-bicep-samples/samples/scenarios-virtual-networks/vnet.bicep" range="7-42" highlight="26-28, 30-32, 35-36" :::
3741

3842
Because this example uses the `existing` keyword to access the subnet resource, instead of defining the complete subnet resource, it doesn't have the risks outlined in the previous section.

0 commit comments

Comments
 (0)