Skip to content

Commit 38816d0

Browse files
committed
Add links to full examples
1 parent 41abf36 commit 38816d0

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

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

Lines changed: 3 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

@@ -31,6 +31,7 @@ Sometimes, you need to access a secret from one resource to configure another re
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

3333
::: code language="bicep" source="~/azure-docs-bicep-samples/samples/scenarios-secrets/function-app.bicep" range="8-46" highlight="1-3, 5, 22, 34" :::
34+
> [This complete Bicep file is available for download.](https://raw.githubusercontent.com/Azure/azure-docs-bicep-samples/main/samples/scenarios-secrets/function-app.bicep)
3435
3536
By using this approach, you avoid passing secrets into or out of your Bicep file.
3637

@@ -49,6 +50,7 @@ When you create a vault, you need to determine who and what can access its data.
4950
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:
5051

5152
::: code language="bicep" source="~/azure-docs-bicep-samples/samples/scenarios-secrets/key-vault-secret.bicep" range="4-25" :::
53+
> [This complete Bicep file is available for download.](https://raw.githubusercontent.com/Azure/azure-docs-bicep-samples/main/samples/scenarios-secrets/key-vault-secret.bicep)
5254
5355
> [!TIP]
5456
> When you use automated deployment pipelines, it can sometimes be challenging to determine how to bootstrap key vault secrets for your deployments. For example, if you've been provided with an API key to use when communicating with an external API, then the secret needs to be added to a vault before it can be used in your deployments.

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

@@ -25,6 +25,8 @@ It's best to define your subnets within the virtual network definition, as in th
2525

2626
::: code language="bicep" source="~/azure-docs-bicep-samples/samples/scenarios-virtual-networks/vnet.bicep" range="7-30, 39" :::
2727

28+
> [This complete Bicep file is available for download.](https://raw.githubusercontent.com/Azure/azure-docs-bicep-samples/main/samples/scenarios-virtual-networks/vnet.bicep)
29+
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.
2931

3032
When you redeploy the same Bicep file, the same deployment sequence occurs. However, the virtual network is deployed without any subnets configured on it because the `subnets` property is effectively empty. Then, after the virtual network is reconfigured, the subnet resources are redeployed, which re-establishes each subnet. In some situations, this behavior causes the resources within your virtual network to lose connectivity during your deployment. In other situations, Azure prevents you from modifying the virtual network and your deployment fails.
@@ -35,6 +37,8 @@ You often need to refer to a subnet's resource ID. When you use the `subnets` pr
3537

3638
::: code language="bicep" source="~/azure-docs-bicep-samples/samples/scenarios-virtual-networks/vnet.bicep" range="7-42" highlight="26-28, 30-32, 35-36" :::
3739

40+
> [This complete Bicep file is available for download.](https://raw.githubusercontent.com/Azure/azure-docs-bicep-samples/main/samples/scenarios-virtual-networks/vnet.bicep)
41+
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.
3943

4044
You can also combine the `existing` and `scope` keywords to refer to a virtual network or subnet resource in another resource group.

0 commit comments

Comments
 (0)