Skip to content

Commit 8f1134d

Browse files
committed
Resource templates for tests
1 parent 69f7363 commit 8f1134d

File tree

5 files changed

+91
-0
lines changed

5 files changed

+91
-0
lines changed

tests/templates/cosmosdb.bicep

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
param python_version string
2+
param location string = resourceGroup().location
3+
4+
var cosmosdb_name = 'python-worker-${python_version}-cdb'
5+
6+
resource cosmosdb 'Microsoft.DocumentDB/databaseAccounts@2022-08-15' = {
7+
name: cosmosdb_name
8+
kind: 'GlobalDocumentDB'
9+
location: location
10+
properties: {
11+
consistencyPolicy: { defaultConsistencyLevel: 'Session' }
12+
locations: [
13+
{
14+
locationName: location
15+
failoverPriority: 0
16+
isZoneRedundant: false
17+
}
18+
]
19+
databaseAccountOfferType: 'Standard'
20+
enableAutomaticFailover: false
21+
enableMultipleWriteLocations: false
22+
apiProperties: {}
23+
capabilities: [ { name: 'EnableServerless' } ]
24+
}
25+
}

tests/templates/eventgrid.bicep

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
param python_version string
2+
param location string = resourceGroup().location
3+
4+
var eventgrid_name = 'python-worker-${python_version}-egt'
5+
6+
resource eventgrid 'Microsoft.EventGrid/topics@2023-12-15-preview' = {
7+
name: eventgrid_name
8+
location: location
9+
sku: {
10+
name: 'Basic'
11+
}
12+
kind: 'Azure'
13+
}

tests/templates/eventhub.bicep

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
param python_version string
2+
param location string = resourceGroup().location
3+
4+
var eventhubname = 'python-worker-${python_version}-ehns'
5+
6+
resource eventhub 'Microsoft.EventHub/namespaces@2022-10-01-preview' = {
7+
name: eventhubname
8+
location: location
9+
sku: {
10+
name: 'Standard'
11+
tier: 'Standard'
12+
}
13+
}

tests/templates/servicebus.bicep

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
param python_version string
2+
param location string = resourceGroup().location
3+
4+
5+
var serviceBusNamespaceName = 'python-worker-${python_version}-sbns'
6+
7+
resource serviceBusNamespace 'Microsoft.ServiceBus/namespaces@2022-01-01-preview' = {
8+
name: serviceBusNamespaceName
9+
location: location
10+
sku: {
11+
name: 'Standard'
12+
}
13+
properties: {}
14+
}
15+

tests/templates/storage_account.bicep

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
param location string = resourceGroup().location
2+
param python_version string
3+
4+
var storage_account_name = 'pythonworker${python_version}sa'
5+
6+
resource storageAccount_input 'Microsoft.Storage/storageAccounts@2022-09-01' = {
7+
name: storage_account_name
8+
location: location
9+
sku: {
10+
name: 'Standard_LRS'
11+
}
12+
kind: 'StorageV2'
13+
properties: {
14+
networkAcls: {
15+
bypass: 'AzureServices'
16+
defaultAction: 'Allow'
17+
}
18+
accessTier: 'Hot'
19+
publicNetworkAccess: 'Enabled'
20+
dnsEndpointType: 'Standard'
21+
allowBlobPublicAccess: true
22+
minimumTlsVersion: 'TLS1_2'
23+
allowSharedKeyAccess: true
24+
}
25+
}

0 commit comments

Comments
 (0)