-
-
Notifications
You must be signed in to change notification settings - Fork 27
/
smart-accounting-infrastructure.bicep
184 lines (169 loc) · 4.2 KB
/
smart-accounting-infrastructure.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
param location string = resourceGroup().location
param nameSuffix string ='dev'
param tenantId string = ''
param sqlAdministratorLogin string = ''
param sqlAdministratorPassword string = ''
param publisherName string = ''
param publisherEmail string = ''
resource storageAccount 'Microsoft.Storage/storageAccounts@2019-06-01' = {
name: 'stsmartaccounting${nameSuffix}'
location: location
kind: 'StorageV2'
sku: {
name: 'Standard_ZRS'
}
properties: {
accessTier: 'Hot'
supportsHttpsTrafficOnly: true
}
}
resource containerRegistry 'Microsoft.ContainerRegistry/registries@2019-05-01' = {
name: 'acrsmartaccounting${nameSuffix}'
location: location
sku: {
name: 'Basic'
}
}
resource keyVault 'Microsoft.KeyVault/vaults@2019-09-01' = {
name: 'kv-smart-accounting-${nameSuffix}'
location: location
properties:{
sku: {
name: 'standard'
family: 'A'
}
tenantId: tenantId
accessPolicies:[]
}
}
resource formRecognizer 'Microsoft.CognitiveServices/accounts@2021-04-30' = {
name: 'formrec-smart-accounting-${nameSuffix}'
location: location
sku: {
name: 'S0'
tier: 'Standard'
}
kind:'FormRecognizer'
properties: {
customSubDomainName: 'formrec-smart-accounting-${nameSuffix}'
networkAcls: {
defaultAction: 'Allow'
virtualNetworkRules: []
ipRules: []
}
publicNetworkAccess: 'Enabled'
restore: false
}
}
resource applicationInsights 'Microsoft.Insights/components@2015-05-01' = {
name: 'appi-smart-accounting-${nameSuffix}'
location: location
kind: 'web'
properties: {
Application_Type: 'web'
Flow_Type: 'Bluefield'
Request_Source: 'rest'
IngestionMode: 'ApplicationInsights'
}
}
resource cosmosDatabase 'Microsoft.DocumentDB/databaseAccounts@2021-04-15' = {
name: 'cosmos-smart-accounting-${nameSuffix}'
location: location
kind: 'GlobalDocumentDB'
properties:{
publicNetworkAccess: 'Enabled'
enableAutomaticFailover: false
enableMultipleWriteLocations: false
databaseAccountOfferType: 'Standard'
consistencyPolicy: {
defaultConsistencyLevel: 'Session'
maxIntervalInSeconds: 5
maxStalenessPrefix: 100
}
locations: [
{
locationName: 'West Europe'
provisioningState: 'Succeeded'
failoverPriority: 0
isZoneRedundant: false
}
]
}
}
resource sqlDatabaseServer 'Microsoft.Sql/servers@2021-02-01-preview' ={
name: 'sql-smart-accounting-${nameSuffix}'
location: location
properties:{
administratorLogin: sqlAdministratorLogin
administratorLoginPassword: sqlAdministratorPassword
}
}
resource sqlDatabase 'Microsoft.Sql/servers/databases@2021-02-01-preview'= {
name: 'sqldb-smart-accounting-${nameSuffix}'
location: location
sku: {
name: 'Standard'
tier: 'Standard'
}
parent: sqlDatabaseServer
}
resource serviceBus 'Microsoft.ServiceBus/namespaces@2021-01-01-preview' ={
name: 'sb-smart-accounting-${nameSuffix}'
location: location
sku: {
name: 'Standard'
tier: 'Standard'
}
}
resource serviceBusTopic 'Microsoft.ServiceBus/namespaces/topics@2018-01-01-preview'={
name: 'smart-accounting-events'
parent: serviceBus
}
resource signalrService 'Microsoft.SignalRService/signalR@2021-04-01-preview' ={
name: 'signalr-smart-accounting-${nameSuffix}'
location: location
sku:{
name: 'Free_F1'
tier: 'Free'
capacity: 1
}
kind: 'SignalR'
properties:{
features: [
{
flag: 'ServiceMode'
value: 'Default'
}
]
}
}
resource apiManagementService 'Microsoft.ApiManagement/service@2020-12-01' = {
name: 'apim-smart-accounting-${nameSuffix}'
location: location
sku: {
name: 'Developer'
capacity: 1
}
properties: {
publisherEmail: publisherEmail
publisherName: publisherName
}
}
resource appServicePlan 'Microsoft.Web/serverfarms@2021-01-15' = {
name: 'plan-smart-accounting-${nameSuffix}'
location: resourceGroup().location
sku: {
name: 'B1'
capacity: 1
}
}
resource azureWebApp 'Microsoft.Web/sites@2021-01-15'= {
name: 'app-smart-accounting-${nameSuffix}'
location: location
properties:{
serverFarmId: appServicePlan.id
}
identity: {
type: 'SystemAssigned'
}
}