|
1 | | -param name string |
2 | | -param location string = resourceGroup().location |
3 | | -param tags object = {} |
4 | | - |
5 | | -param identityName string |
6 | | -param containerAppsEnvironmentName string |
7 | | -param containerRegistryName string |
8 | | -param serviceName string = 'aca' |
9 | | -param exists bool |
10 | | -param aiServicesDeploymentName string |
11 | | -param aiServicesEndpoint string |
12 | | - |
13 | | -resource acaIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2023-01-31' = { |
14 | | - name: identityName |
15 | | - location: location |
16 | | -} |
17 | | - |
18 | | -var env = [ |
19 | | - { |
20 | | - name: 'AZURE_DEEPSEEK_DEPLOYMENT' |
21 | | - value: aiServicesDeploymentName |
22 | | - } |
23 | | - { |
24 | | - name: 'AZURE_INFERENCE_ENDPOINT' |
25 | | - value: aiServicesEndpoint |
26 | | - } |
27 | | - { |
28 | | - name: 'RUNNING_IN_PRODUCTION' |
29 | | - value: 'true' |
30 | | - } |
31 | | - { |
32 | | - // DefaultAzureCredential will look for an environment variable with this name: |
33 | | - name: 'AZURE_CLIENT_ID' |
34 | | - value: acaIdentity.properties.clientId |
35 | | - } |
36 | | -] |
37 | | - |
38 | | -module app 'core/host/container-app-upsert.bicep' = { |
39 | | - name: '${serviceName}-container-app-module' |
40 | | - params: { |
41 | | - name: name |
42 | | - location: location |
43 | | - tags: union(tags, { 'azd-service-name': serviceName }) |
44 | | - identityName: acaIdentity.name |
45 | | - exists: exists |
46 | | - containerAppsEnvironmentName: containerAppsEnvironmentName |
47 | | - containerRegistryName: containerRegistryName |
48 | | - env: env |
49 | | - targetPort: 50505 |
50 | | - } |
51 | | -} |
52 | | - |
53 | | -output identityPrincipalId string = acaIdentity.properties.principalId |
54 | | -output name string = app.outputs.name |
55 | | -output uri string = app.outputs.uri |
56 | | -output imageName string = app.outputs.imageName |
| 1 | +param name string |
| 2 | +param location string = resourceGroup().location |
| 3 | +param tags object = {} |
| 4 | + |
| 5 | +param identityName string |
| 6 | +param containerAppsEnvironmentName string |
| 7 | +param containerRegistryName string |
| 8 | +param serviceName string = 'aca' |
| 9 | +param exists bool |
| 10 | +param aiServicesDeploymentName string |
| 11 | +param aiServicesEndpoint string |
| 12 | + |
| 13 | +resource acaIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2023-01-31' = { |
| 14 | + name: identityName |
| 15 | + location: location |
| 16 | +} |
| 17 | + |
| 18 | +var env = [ |
| 19 | + { |
| 20 | + name: 'AZURE_DEEPSEEK_DEPLOYMENT' |
| 21 | + value: aiServicesDeploymentName |
| 22 | + } |
| 23 | + { |
| 24 | + name: 'AZURE_INFERENCE_ENDPOINT' |
| 25 | + value: aiServicesEndpoint |
| 26 | + } |
| 27 | + { |
| 28 | + name: 'RUNNING_IN_PRODUCTION' |
| 29 | + value: 'true' |
| 30 | + } |
| 31 | + { |
| 32 | + // DefaultAzureCredential will look for an environment variable with this name: |
| 33 | + name: 'AZURE_CLIENT_ID' |
| 34 | + value: acaIdentity.properties.clientId |
| 35 | + } |
| 36 | +] |
| 37 | + |
| 38 | +module app 'core/host/container-app-upsert.bicep' = { |
| 39 | + name: '${serviceName}-container-app-module' |
| 40 | + params: { |
| 41 | + name: name |
| 42 | + location: location |
| 43 | + tags: union(tags, { 'azd-service-name': serviceName }) |
| 44 | + identityName: acaIdentity.name |
| 45 | + exists: exists |
| 46 | + containerAppsEnvironmentName: containerAppsEnvironmentName |
| 47 | + containerRegistryName: containerRegistryName |
| 48 | + env: env |
| 49 | + targetPort: 50505 |
| 50 | + } |
| 51 | +} |
| 52 | + |
| 53 | +output identityPrincipalId string = acaIdentity.properties.principalId |
| 54 | +output name string = app.outputs.name |
| 55 | +output uri string = app.outputs.uri |
| 56 | +output imageName string = app.outputs.imageName |
0 commit comments