知识检查

已完成

请看以下两个 Bicep 文件。

main.bicep:

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

modules/stor.bicep:

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

使用默认设置部署 main.bicep 文件。 打开 Azure 门户,然后查看资源组的部署历史记录。 会显示什么?

2.

你计划更新 main.bicep 文件以添加其他资源。 新资源需要访问模块中创建的存储帐户的密钥。 你应该如何操作?

3.

你的同事创建了一个大型 Bicep 文件,你需要将该文件分解为模块。 你需要确定应在每个模块中一起定义的资源。 可考虑使用哪种工具来帮助你完成此任务?