Skip to content

Commit 8e1c0a9

Browse files
committed
Remove whitespace change
1 parent e818815 commit 8e1c0a9

File tree

2 files changed

+113
-113
lines changed

2 files changed

+113
-113
lines changed

infra/aca.bicep

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -11,43 +11,43 @@ param aiServicesDeploymentName string
1111
param aiServicesEndpoint string
1212

1313
resource acaIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2023-01-31' = {
14-
name: identityName
15-
location: location
14+
name: identityName
15+
location: location
1616
}
1717

1818
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-
}
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+
}
3636
]
3737

3838
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-
}
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+
}
5151
}
5252

5353
output identityPrincipalId string = acaIdentity.properties.principalId

infra/main.bicep

Lines changed: 82 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,17 @@ param acaExists bool = false
1818
@description('Location for the Azure AI resource')
1919
// https://learn.microsoft.com/azure/ai-studio/how-to/deploy-models-serverless-availability#deepseek-models-from-microsoft
2020
@allowed([
21-
'eastus'
22-
'eastus2'
23-
'northcentralus'
24-
'southcentralus'
25-
'westus'
26-
'westus3'
21+
'eastus'
22+
'eastus2'
23+
'northcentralus'
24+
'southcentralus'
25+
'westus'
26+
'westus3'
2727
])
2828
@metadata({
29-
azd: {
30-
type: 'location'
31-
}
29+
azd: {
30+
type: 'location'
31+
}
3232
})
3333
param aiServicesResourceLocation string
3434
param disableKeyBasedAuth bool = true
@@ -40,99 +40,99 @@ var resourceToken = toLower(uniqueString(subscription().id, name, location))
4040
var tags = { 'azd-env-name': name }
4141

4242
resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
43-
name: '${name}-rg'
44-
location: location
45-
tags: tags
43+
name: '${name}-rg'
44+
location: location
45+
tags: tags
4646
}
4747

4848
var prefix = '${name}-${resourceToken}'
4949

5050
var aiServicesNameAndSubdomain = '${resourceToken}-aiservices'
5151
module aiServices 'br/public:avm/res/cognitive-services/account:0.7.2' = {
52-
name: 'deepseek'
53-
scope: resourceGroup
54-
params: {
55-
name: aiServicesNameAndSubdomain
56-
location: aiServicesResourceLocation
57-
tags: tags
58-
kind: 'AIServices'
59-
customSubDomainName: aiServicesNameAndSubdomain
60-
sku: 'S0'
61-
publicNetworkAccess: 'Enabled'
62-
deployments: [
63-
{
64-
name: aiServicesDeploymentName
65-
model: {
66-
format: 'DeepSeek'
67-
name: 'DeepSeek-R1'
68-
version: '1'
69-
}
70-
sku: {
71-
name: 'GlobalStandard'
72-
capacity: 1
73-
}
74-
}
75-
]
76-
disableLocalAuth: disableKeyBasedAuth
77-
roleAssignments: [
78-
{
79-
principalId: principalId
80-
principalType: 'User'
81-
roleDefinitionIdOrName: 'Cognitive Services User'
82-
}
83-
]
84-
}
52+
name: 'deepseek'
53+
scope: resourceGroup
54+
params: {
55+
name: aiServicesNameAndSubdomain
56+
location: aiServicesResourceLocation
57+
tags: tags
58+
kind: 'AIServices'
59+
customSubDomainName: aiServicesNameAndSubdomain
60+
sku: 'S0'
61+
publicNetworkAccess: 'Enabled'
62+
deployments: [
63+
{
64+
name: aiServicesDeploymentName
65+
model: {
66+
format: 'DeepSeek'
67+
name: 'DeepSeek-R1'
68+
version: '1'
69+
}
70+
sku: {
71+
name: 'GlobalStandard'
72+
capacity: 1
73+
}
74+
}
75+
]
76+
disableLocalAuth: disableKeyBasedAuth
77+
roleAssignments: [
78+
{
79+
principalId: principalId
80+
principalType: 'User'
81+
roleDefinitionIdOrName: 'Cognitive Services User'
82+
}
83+
]
84+
}
8585
}
8686

8787
module logAnalyticsWorkspace 'core/monitor/loganalytics.bicep' = {
88-
name: 'loganalytics'
89-
scope: resourceGroup
90-
params: {
91-
name: '${prefix}-loganalytics'
92-
location: location
93-
tags: tags
94-
}
88+
name: 'loganalytics'
89+
scope: resourceGroup
90+
params: {
91+
name: '${prefix}-loganalytics'
92+
location: location
93+
tags: tags
94+
}
9595
}
9696

9797
// Container apps host (including container registry)
9898
module containerApps 'core/host/container-apps.bicep' = {
99-
name: 'container-apps'
100-
scope: resourceGroup
101-
params: {
102-
name: 'app'
103-
location: location
104-
tags: tags
105-
containerAppsEnvironmentName: '${prefix}-containerapps-env'
106-
containerRegistryName: '${replace(prefix, '-', '')}registry'
107-
logAnalyticsWorkspaceName: logAnalyticsWorkspace.outputs.name
108-
}
99+
name: 'container-apps'
100+
scope: resourceGroup
101+
params: {
102+
name: 'app'
103+
location: location
104+
tags: tags
105+
containerAppsEnvironmentName: '${prefix}-containerapps-env'
106+
containerRegistryName: '${replace(prefix, '-', '')}registry'
107+
logAnalyticsWorkspaceName: logAnalyticsWorkspace.outputs.name
108+
}
109109
}
110110

111111
// Container app frontend
112112
module aca 'aca.bicep' = {
113-
name: 'aca'
114-
scope: resourceGroup
115-
params: {
116-
name: replace('${take(prefix,19)}-ca', '--', '-')
117-
location: location
118-
tags: tags
119-
identityName: '${prefix}-id-aca'
120-
containerAppsEnvironmentName: containerApps.outputs.environmentName
121-
containerRegistryName: containerApps.outputs.registryName
122-
aiServicesDeploymentName: aiServicesDeploymentName
123-
aiServicesEndpoint: 'https://${aiServices.outputs.name}.services.ai.azure.com/models'
124-
exists: acaExists
125-
}
113+
name: 'aca'
114+
scope: resourceGroup
115+
params: {
116+
name: replace('${take(prefix,19)}-ca', '--', '-')
117+
location: location
118+
tags: tags
119+
identityName: '${prefix}-id-aca'
120+
containerAppsEnvironmentName: containerApps.outputs.environmentName
121+
containerRegistryName: containerApps.outputs.registryName
122+
aiServicesDeploymentName: aiServicesDeploymentName
123+
aiServicesEndpoint: 'https://${aiServices.outputs.name}.services.ai.azure.com/models'
124+
exists: acaExists
125+
}
126126
}
127127

128128
module aiServicesRoleBackend 'core/security/role.bicep' = {
129-
scope: resourceGroup
130-
name: 'aiservices-role-backend'
131-
params: {
132-
principalId: aca.outputs.identityPrincipalId
133-
roleDefinitionId: 'a97b65f3-24c7-4388-baec-2e87135dc908'
134-
principalType: 'ServicePrincipal'
135-
}
129+
scope: resourceGroup
130+
name: 'aiservices-role-backend'
131+
params: {
132+
principalId: aca.outputs.identityPrincipalId
133+
roleDefinitionId: 'a97b65f3-24c7-4388-baec-2e87135dc908'
134+
principalType: 'ServicePrincipal'
135+
}
136136
}
137137

138138
output AZURE_LOCATION string = location

0 commit comments

Comments
 (0)