Files
web/apps/redis-api/ci/bicep/main.bicep
Joakim Jäderberg 3ea26259df Merged in fix/redis-api-model-validation (pull request #2000)
* fix: model response validation for 204
* log: add more logging when deleting keys
* add version to health endpoint


Approved-by: Anton Gunnarsson
2025-05-07 13:45:35 +00:00

58 lines
1.4 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
@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
}
}