Files
web/apps/redis-api/ci/bicep/main.bicep
Joakim Jäderberg bb98c2652e Merged in fix/missing-batchsize-bicep-config (pull request #2385)
add missing bicep setup for deleteBatchSize

* add missing bicep setup for deleteBatchSize
2025-06-18 07:47:25 +00:00

60 lines
1.5 KiB
Bicep

import { Environment, EnvironmentVar } from 'types.bicep'
targetScope = 'subscription'
param environment Environment
param containerImageTag string = 'latest'
param version string
param primaryApiKey string
param secondaryApiKey string
param sentryDSN string
param sentryEnabled string
param sentryTraceSampleRate string
param deleteBatchSize int = 2000
@description('The location for the resource group')
param location string = 'westeurope'
resource rgRedisApi 'Microsoft.Resources/resourceGroups@2021-04-01' = {
name: 'rg-redis-api-${environment}'
location: location
}
module mi 'managedIdentity.bicep' = {
name: 'mi-redis-api-${environment}'
scope: rgRedisApi
params: {
principalName: 'mi-redis-api-${environment}'
location: location
}
}
module redis 'cache/redis.bicep' = {
name: 'redisCache'
scope: rgRedisApi
params: {
location: location
environment: environment
}
}
module containerApp 'app/main.bicep' = {
name: 'containerApp'
params: {
location: location
environment: environment
containerImageTag: containerImageTag
redisConnection: 'default:${redis.outputs.primaryAccessKey}@${redis.outputs.hostname}:6380'
primaryApiKey: primaryApiKey
secondaryApiKey: secondaryApiKey
sentryEnvironment: environment == 'prod' ? 'production' : 'test'
sentryDSN: sentryDSN
sentryEnabled: sentryEnabled
sentryTraceSampleRate: sentryTraceSampleRate
version: version
deleteBatchSize: string(deleteBatchSize)
}
}