import { Environment } from '../types.bicep'

param location string = 'westeurope'
param environment Environment
param userAssignedIdentityId string

resource containerEnv 'Microsoft.App/managedEnvironments@2024-02-02-preview' = {
  name: 'cae-redis-api-${environment}'
  location: location
  identity: {
    type: 'UserAssigned'
    userAssignedIdentities: {
      '${userAssignedIdentityId}': {}
    }
  }
  properties: {
    publicNetworkAccess: 'Enabled'
    workloadProfiles: [
      {
        name: 'Consumption'
        workloadProfileType: 'Consumption'
      }
    ]
    zoneRedundant: false
  }
}
