forked from solita/logicapps-bicep-github-actions-demo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtemplate.bicep
93 lines (82 loc) · 2.46 KB
/
template.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
param sqlserver_name string
param sqlserver_database_name string
param attachment_storage_name string
param expensereports_storage_name string
param location string = resourceGroup().location
@secure()
param sqlUser string
@secure()
param sqlPass string
resource sqlserver 'Microsoft.Sql/servers@2021-11-01-preview' = {
name: '${sqlserver_name}-${uniqueString(resourceGroup().id)}'
location: location
properties: {
administratorLogin: sqlUser
administratorLoginPassword: sqlPass
publicNetworkAccess: 'Enabled'
}
}
resource sqlserver_database 'Microsoft.Sql/servers/databases@2021-11-01-preview' = {
parent: sqlserver
name: sqlserver_database_name
location: location
sku: {
name: 'Basic'
tier: 'Basic'
capacity: 5
}
}
resource sqlserver_firewall_rules 'Microsoft.Sql/servers/firewallRules@2021-11-01-preview' = {
parent: sqlserver
name: 'AllowAllWindowsAzureIps'
properties: {
endIpAddress: '0.0.0.0'
startIpAddress: '0.0.0.0'
}
}
var random_attachment_storage_name = substring('${attachment_storage_name}${uniqueString(resourceGroup().id)}', 0, 24)
resource attachment_storage 'Microsoft.Storage/storageAccounts@2021-09-01' = {
name: random_attachment_storage_name
location: location
sku: {
name: 'Standard_LRS'
}
kind: 'StorageV2'
properties: {
allowBlobPublicAccess: false
isHnsEnabled: true
accessTier: 'Hot'
}
}
resource attachment_storage_blob 'Microsoft.Storage/storageAccounts/blobServices@2021-09-01' = {
parent: attachment_storage
name: 'default'
}
resource attachment_storage_blob_container 'Microsoft.Storage/storageAccounts/blobServices/containers@2021-09-01' = {
parent: attachment_storage_blob
name: 'files'
}
var random_expensereports_storage_name = substring('${expensereports_storage_name}${uniqueString(resourceGroup().id)}', 0, 24)
resource expensereports_storage 'Microsoft.Storage/storageAccounts@2021-09-01' = {
name: random_expensereports_storage_name
location: location
sku: {
name: 'Standard_LRS'
}
kind: 'StorageV2'
properties: {
allowBlobPublicAccess: true
accessTier: 'Hot'
}
}
resource expensereports_storage_blob 'Microsoft.Storage/storageAccounts/blobServices@2021-09-01' = {
parent: expensereports_storage
name: 'default'
}
resource expensereports_storage_blob_container 'Microsoft.Storage/storageAccounts/blobServices/containers@2021-09-01' = {
parent: expensereports_storage_blob
name: 'api'
properties: {
publicAccess: 'Blob'
}
}