You have a Bicep module that deploys a storage account and outputs its resource ID. What will be the value of storageAccountId after deployment?
module storageModule './storage.bicep' = {
name: 'storageDeploy'
params: {
storageName: 'mystorage123'
}
}
var storageAccountId = storageModule.outputs.storageAccountIdModule outputs are accessed using moduleName.outputs.outputName and usually contain full resource IDs if defined that way.
The module storageModule outputs the full resource ID of the storage account. Accessing storageModule.outputs.storageAccountId returns the full resource ID string, not just the name.
Which of the following Bicep module declarations is syntactically correct to deploy a module named network.bicep with a parameter vnetName set to myVnet?
Remember the module declaration syntax requires the module keyword, a symbolic name, the path in quotes, an equals sign, and a block with name and params.
Option D correctly uses the syntax: module symbolicName 'path' = { name: 'deploymentName' params: { ... } }. Other options miss the equals sign or have incorrect structure.
You want to deploy the same Bicep module for multiple environments (dev, test, prod) with different parameters. Which approach ensures clean, maintainable code?
Think about how to avoid duplication and manual changes while keeping deployments consistent.
Using a single module file with parameterization allows reuse and cleaner management. Passing parameters from a main Bicep file per environment avoids duplication and errors.
You need to pass a database password to a Bicep module. Which method is the most secure to handle this secret?
Consider how to avoid exposing secrets in code or parameters.
Using Azure Key Vault references allows secure retrieval of secrets during deployment without exposing them in code or parameters.
Consider a Bicep module declared with scope set to a subscription level. What is the effect on resources declared inside this module?
Think about how scope changes the deployment target of resources inside modules.
Setting scope on a module changes the deployment target for all resources inside it to that scope, such as subscription or management group, overriding the main deployment's resource group.