-
Notifications
You must be signed in to change notification settings - Fork 16.2k
/
Copy pathmain.bicep
110 lines (101 loc) · 2.24 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
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
@description('The globally unique name of the SignalR resource to create.')
param name string = uniqueString(resourceGroup().id)
@description('Location for the SignalR resource.')
param location string = resourceGroup().location
@description('The pricing tier of the SignalR resource.')
@allowed([
'Free_F1'
'Standard_S1'
'Premium_P1'
])
param pricingTier string = 'Standard_S1'
@description('The number of SignalR Unit.')
@allowed([
1
2
5
10
20
50
100
])
param capacity int = 1
@description('Visit https://github.com/Azure/azure-signalr/blob/dev/docs/faq.md#service-mode to understand SignalR Service Mode.')
@allowed([
'Default'
'Serverless'
'Classic'
])
param serviceMode string = 'Default'
param enableConnectivityLogs bool = true
param enableMessagingLogs bool = true
param enableLiveTrace bool = true
@description('Set the list of origins that should be allowed to make cross-origin calls.')
param allowedOrigins array = [
'https://foo.com'
'https://bar.com'
]
resource signalR 'Microsoft.SignalRService/signalR@2022-02-01' = {
name: name
location: location
sku: {
capacity: capacity
name: pricingTier
}
kind: 'SignalR'
identity: {
type: 'SystemAssigned'
}
properties: {
tls: {
clientCertEnabled: false
}
features: [
{
flag: 'ServiceMode'
value: serviceMode
}
{
flag: 'EnableConnectivityLogs'
value: string(enableConnectivityLogs)
}
{
flag: 'EnableMessagingLogs'
value: string(enableMessagingLogs)
}
{
flag: 'EnableLiveTrace'
value: string(enableLiveTrace)
}
]
cors: {
allowedOrigins: allowedOrigins
}
networkACLs: {
defaultAction: 'Deny'
publicNetwork: {
allow: [
'ClientConnection'
]
}
privateEndpoints: [
{
name: 'mySignalRService.1fa229cd-bf3f-47f0-8c49-afb36723997e'
allow: [
'ServerConnection'
]
}
]
}
upstream: {
templates: [
{
categoryPattern: '*'
eventPattern: 'connect,disconnect'
hubPattern: '*'
urlTemplate: 'https://example.com/chat/api/connect'
}
]
}
}
}