Debian Codegraph @

tests/inputs/sample.bicep

raw
1 /*
2 https://learn.microsoft.com/en-us/azure/azure-resource-manager/bicep/file
3 */
4 metadata description = 'Creates a storage account and a web app'
5
6 @description('The prefix to use for the storage account name.')
7 @minLength(3)
8 @maxLength(11)
9 param storagePrefix string
10
11 param storageSKU string = 'Standard_LRS'
12 param location string = resourceGroup().location
13
14 // Generate a unique name for the storage account
15 var uniqueStorageName = '${storagePrefix}${uniqueString(resourceGroup().id)}'
16
17 // Create a storage account
18 resource stg 'Microsoft.Storage/storageAccounts@2025-01-01' = {
19 name: uniqueStorageName
20 location: location
21 sku: {
22 name: storageSKU
23 }
24 kind: 'StorageV2'
25 properties: {
26 supportsHttpsTrafficOnly: true
27 }
28 }
29
30 // Deploy the web app module
31 module webModule './webApp.bicep' = {
32 name: 'webDeploy'
33 params: {
34 skuName: 'S1'
35 location: location
36 }
37 }