Launch price: every exam for $29.99 a year, for the first 300 buyers. See the price

CertStreak
Menu

Implement a configuration management strategy for application infrastructure

A worked example

Complete the statement

A team is adding an Azure Files share named workloadshare to a storage account through Bicep. The share must be represented as a nested resource inside the account's default file service, using the hierarchy shown in the template.

Complete the nested resource declaration to create the required share.

resource account 'Microsoft.Storage/storageAccounts@2023-01-01' = {
  name: 'stconfig${uniqueString(resourceGroup().id)}'
  location: resourceGroup().location
  sku: {
    name: 'Standard_LRS'
  }
  kind: 'StorageV2'
  properties: {}

  resource fileService 'fileServices' = {
    name: 'default'

    resource workload '' = {
      name: 'workloadshare'
    }
  }
}
  • Blank 1: shares (correct answer)

    shares declares the requested resource within the file service. containers and queues do not declare an Azure Files share and therefore fail "adding an Azure Files share named workloadshare".

Why

The nested declaration uses a resource type relative to its containing resource. Within fileServices, the shares child type represents the Azure Files share.

Practise this topic until it's automatic.

Ten questions a day, every answer explained, and misses that come back until you beat them.

Start free