Files
web/apps/redis-api/ci/bicep/app/main.bicep
Joakim Jäderberg fde77a06ce Merged in feature/redis-api-get-all-keys-endopoint (pull request #3306)
feature: Add getAllKeys endpoint

* feature: Add getAllKeys endpoint

* rename DELETE_BATCH_SIZE to SCAN_BATCH_SIZE


Approved-by: Anton Gunnarsson
2025-12-10 09:36:53 +00:00

57 lines
1.7 KiB
Bicep

import { Environment, EnvironmentVar } from '../types.bicep'
targetScope = 'subscription'
param version string
param environment Environment
param containerImageTag string
param redisConnection string
param primaryApiKey string
param secondaryApiKey string
param sentryEnvironment string
param sentryDSN string
param sentryEnabled string
param sentryTraceSampleRate string
param scanBatchSize string
param timestamp string = utcNow()
@description('The location for the resource group')
param location string = 'westeurope'
resource rgRedisApi 'Microsoft.Resources/resourceGroups@2021-04-01' existing = {
name: 'rg-redis-api-${environment}'
}
resource mi 'Microsoft.ManagedIdentity/userAssignedIdentities@2023-01-31' existing = {
name: 'mi-redis-api-${environment}'
scope: rgRedisApi
}
module containerApp 'containerApp.bicep' = {
name: 'containerApp'
scope: rgRedisApi
params: {
location: location
environment: environment
userAssignedIdentityId: mi.id
containerAppName: 'ca-redis-api-${environment}'
containerImage: 'acrscandicfrontend.azurecr.io/redis-api:${containerImageTag}'
containerPort: 3001
envVars: [
{ name: 'REDIS_CONNECTION', value: redisConnection }
{ name: 'PRIMARY_API_KEY', value: primaryApiKey }
{ name: 'SECONDARY_API_KEY', value: secondaryApiKey }
{ name: 'SENTRY_ENVIRONMENT', value: sentryEnvironment }
{ name: 'SENTRY_DSN', value: sentryDSN }
{ name: 'SENTRY_ENABLED', value: sentryEnabled }
{ name: 'SENTRY_TRACE_SAMPLE_RATE', value: sentryTraceSampleRate }
{ name: 'VERSION', value: version }
{ name: 'SCAN_BATCH_SIZE', value: scanBatchSize }
{ name: 'timestamp', value: timestamp }
]
}
}