-
Notifications
You must be signed in to change notification settings - Fork 0
/
deploy.bicep
62 lines (55 loc) · 1.56 KB
/
deploy.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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
param location string = resourceGroup().location
var resourceGroupName = split(resourceGroup().name, '-') //d-az1-projabc-modulexyz-rg
var environment = resourceGroupName[0]
var locationPrefix = resourceGroupName[1]
var project = resourceGroupName[2]
var applicationName = resourceGroupName[3]
var baseNamePrefix = '${environment}-${locationPrefix}-${project}-${applicationName}'
var functionAppName = '${baseNamePrefix}-func'
var logicAppName = '${baseNamePrefix}-http-logic'
var serviceBusName = '${baseNamePrefix}-msgbrkr-sbus'
var queueName = 'email'
// Configuration
module Config 'modules/config.bicep' = {
name: 'Fetch Configuration'
dependsOn: []
params: {
environmentIdentifier: environment
}
}
var config = Config.outputs.config
// Service Bus
module ServiceBus 'modules/service-bus.bicep' = {
name: 'Deploying Service Bus'
dependsOn: []
params: {
serviceBusNamespaceName: serviceBusName
serviceBusQueueName: queueName
location: location
properties: config.serviceBus.properties
sku: config.serviceBus.sku
}
}
// Logic app
module LogicAppImplementation 'utility/sample-logic-app.bicep' = {
name: 'Fetch Logic App Implementation'
dependsOn: []
params: {
frequency: 'Hour'
interval: '1'
type: 'recurrence'
}
}
module LogicApp 'modules/logic-app.bicep' = {
name: 'Deploying Logic App'
dependsOn: [
LogicAppImplementation
ServiceBus
]
params: {
logicAppName: logicAppName
trigger: LogicAppImplementation.outputs.trigger
actions: LogicAppImplementation.outputs.actions
location: location
}
}