# Ch4: deploy main.bicep that calls modules/storage.bicep
# Repo root must contain main.bicep and modules/storage.bicep
$ ls -la main.bicep modules/storage.bicep
main.bicep
modules/storage.bicep
$ export CLASS_RG=rg-hyf-students
$ az deployment group create \
--resource-group "$CLASS_RG" \
--template-file main.bicep \
--parameters storageName=sthyfyourname \
--query "{provisioningState:properties.provisioningState, outputs:properties.outputs}" \
-o json
# Compiles Bicep → ARM, then creates the nested module deployment storageDeploy
{
"outputs": {
"storageId": {
"type": "String",
"value": "/subscriptions/.../resourceGroups/rg-hyf-students/providers/Microsoft.Storage/storageAccounts/sthyfyourname"
}
},
"provisioningState": "Succeeded"
}
# Same Succeeded signal as Ch3; the account now comes from the module