-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.bicep
31 lines (23 loc) · 1.11 KB
/
main.bicep
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
param location string = resourceGroup().location
var paramsVB = loadJsonContent('./parameters/account/vb.json')
var paramsIM = loadJsonContent('./parameters/account/im.json')
var paramsPB = loadJsonContent('./parameters/account/pb.json')
var paramsGEN = loadJsonContent('./parameters/account/gen.json')
param account string = 'pb' //replaced by pipeline, see https://stackoverflow.com/questions/77181479/how-to-pass-parameters-from-an-azure-devops-pipeline-into-a-bicep-template
var accountParams = (account == 'vb') ? paramsVB : (account == 'im' ? paramsIM : (account == 'pb' ? paramsPB : (account == 'gen' ? paramsGEN : null)))
resource storageaccount 'Microsoft.Storage/storageAccounts@2021-02-01' = {
name: 'mybicepdjstorage'
location: location
kind: 'StorageV2'
sku: {
name: 'Premium_LRS'
}
}
resource strorageblobservices 'Microsoft.Storage/storageAccounts/blobServices@2023-04-01' = {
name: 'default'
parent: storageaccount
}
resource container 'Microsoft.Storage/storageAccounts/blobServices/containers@2023-04-01' = [for name in accountParams.containers: {
name: name
parent: strorageblobservices
}]