Skip to content

Commit

Permalink
feat(azure): add azure service bus (#601)
Browse files Browse the repository at this point in the history
Creates the ServiceBus resource in Azure. This would be the place to
define queues/topics/subscriptions as well, so we need to figure out
pattern/queues/subscriptions/topics as well later. I can take that with
@MagnusSandgren next time he's on :)
  • Loading branch information
arealmaas authored Apr 10, 2024
1 parent 8819b98 commit 4b008e1
Show file tree
Hide file tree
Showing 6 changed files with 58 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .azure/infrastructure/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ param slackNotifierSku SlackNotifierSku
import { Sku as PostgresSku } from '../modules/postgreSql/create.bicep'
param postgresSku PostgresSku

import { Sku as ServiceBusSku } from '../modules/serviceBus/main.bicep'
param serviceBusSku ServiceBusSku

import { Sku as RedisSku } from '../modules/redis/main.bicep'
param redisSku RedisSku
@minLength(1)
Expand Down Expand Up @@ -84,6 +87,16 @@ module appInsights '../modules/applicationInsights/create.bicep' = {
}
}

module serviceBus '../modules/serviceBus/main.bicep' = {
scope: resourceGroup
name: 'serviceBus'
params: {
namePrefix: namePrefix
location: location
sku: serviceBusSku
}
}

// #######################################
// Create references to existing resources
// #######################################
Expand Down
6 changes: 6 additions & 0 deletions .azure/infrastructure/production.bicepparam
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,9 @@ param redisSku = {
family: 'C'
capacity: 1
}

param serviceBusSku = {
name: 'Standard'
tier: 'Standard'
capacity: 1
}
6 changes: 6 additions & 0 deletions .azure/infrastructure/soak.bicepparam
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,9 @@ param redisSku = {
family: 'C'
capacity: 1
}

param serviceBusSku = {
name: 'Standard'
tier: 'Standard'
capacity: 1
}
6 changes: 6 additions & 0 deletions .azure/infrastructure/staging.bicepparam
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,9 @@ param redisSku = {
family: 'C'
capacity: 1
}

param serviceBusSku = {
name: 'Standard'
tier: 'Standard'
capacity: 1
}
6 changes: 6 additions & 0 deletions .azure/infrastructure/test.bicepparam
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,9 @@ param redisSku = {
family: 'C'
capacity: 1
}

param serviceBusSku = {
name: 'Standard'
tier: 'Standard'
capacity: 1
}
21 changes: 21 additions & 0 deletions .azure/modules/serviceBus/main.bicep
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
param namePrefix string
param location string

@export()
type Sku = {
name: 'Basic' | 'Standard' | 'Premium'
tier: 'Basic' | 'Standard' | 'Premium'
@minValue(1)
capacity: int
}
param sku Sku

resource serviceBusNamespace 'Microsoft.ServiceBus/namespaces@2022-10-01-preview' = {
name: '${namePrefix}-service-bus'
location: location
sku: sku
identity: {
type: 'SystemAssigned'
}
properties: {}
}

0 comments on commit 4b008e1

Please sign in to comment.