File tree Expand file tree Collapse file tree 2 files changed +63
-0
lines changed Expand file tree Collapse file tree 2 files changed +63
-0
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,9 @@ param openAiDeployments array = []
1818@description ('Specifies the name of the Azure Cognitive Services resource.' )
1919param cognitiveServicesName string = '${prefix }cognitiveServices'
2020
21+ @description ('Specifies the name of the Azure Storage Account resource.' )
22+ param storageAccountName string = '${prefix }sa'
23+
2124module openAi './modules/openAi.bicep' = {
2225 name : 'openAi'
2326 params : {
@@ -44,3 +47,16 @@ module cognitiveServices './modules/cognitiveServices.bicep' = {
4447 tags : tags
4548 }
4649}
50+
51+ module storageAccount './modules/storageAccount.bicep' = {
52+ name : 'storageAccount'
53+ params : {
54+ name : storageAccountName
55+ containerNames : [
56+ 'dev'
57+ 'prod'
58+ ]
59+ location : location
60+ tags : tags
61+ }
62+ }
Original file line number Diff line number Diff line change 1+ // Parameters
2+ @description ('Specifies the name of the storage account.' )
3+ param name string
4+
5+ @description ('Specifies an array of containers to create.' )
6+ param containerNames array = []
7+
8+ @description ('Specifies the location.' )
9+ param location string = resourceGroup ().location
10+
11+ @description ('Specifies the resource tags.' )
12+ param tags object = {}
13+
14+ // Resources
15+ resource storageAccount 'Microsoft.Storage/storageAccounts@2023-04-01' = {
16+ name : name
17+ location : location
18+ tags : tags
19+ sku : {
20+ name : 'Standard_LRS'
21+ }
22+ kind : 'StorageV2'
23+
24+ // Containers live inside of a blob service
25+ resource blobService 'blobServices' = {
26+ name : 'default'
27+ properties : {
28+ deleteRetentionPolicy : {
29+ enabled : false
30+ allowPermanentDelete : false
31+ }
32+ }
33+ // Creating containers with provided names
34+ resource containers 'containers' = [for containerName in containerNames : {
35+ name : containerName
36+ properties : {
37+ publicAccess : 'None'
38+ defaultEncryptionScope :'$account-encryption-key'
39+ denyEncryptionScopeOverride : false
40+ }
41+ }]
42+ }
43+ }
44+
45+ // Outputs
46+ output id string = storageAccount .id
47+ output name string = storageAccount .name
You can’t perform that action at this time.
0 commit comments