Knowledge check

Completed

Consider the following two Bicep files.

main.bicep:

module storage1 'modules/stor.bicep' = {
  name: 'my-storage'
}

modules/stor.bicep:

resource storageAccount 'Microsoft.Storage/storageAccounts@2023-05-01' = {
  name: 'mystorageaccount'
  location: resourceGroup().location
  kind: 'StorageV2'
  sku: {
    name: 'Premium_LRS'
  }
}
1.

You deploy the main.bicep file with the default settings. You open the Azure portal and look at the deployment history for the resource group. What do you see?

2.

You plan to update the main.bicep file to add another resource. The new resource needs access to the key of the storage account created in the module. What should you do?

3.

Your colleague has created a large Bicep file that you want to decompose into modules. You want to identify the resources that should be defined together in each module. Which tool can you consider using to help you achieve this task?