Knowledge check

Completed

Consider the following Bicep files:

main.bicep:

targetScope = 'managementGroup'

module myModule 'module.bicep' = {
  scope: subscription('f0750bbe-ea75-4ae5-b24d-a92ca601da2c')
  name: 'my-module'
}

module.bicep:

targetScope = 'subscription'

resource policyDefinition 'Microsoft.Authorization/policyDefinitions@2020-09-01' = {
  name: 'my-policy'
  // (other properties related to the policy definition)
}
1.

When you submit a deployment for the main.bicep file, what will happen?

2.

You need to create a role definition that will work throughout your whole organization. You decide to deploy it by using a Bicep template. Which targetScope value should you use for the file?

3.

Which of these statements is true?