Skip to content

Commit f916056

Browse files
Refactor parameter names for consistency and clarity across Bicep and JSON files
1 parent 8090ef3 commit f916056

File tree

7 files changed

+2124
-120
lines changed

7 files changed

+2124
-120
lines changed

.github/workflows/deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ jobs:
142142
--parameters \
143143
solutionName="${{ env.SOLUTION_PREFIX }}" \
144144
azureAiServiceLocation='${{ env.AZURE_LOCATION }}' \
145-
imageVersion="${IMAGE_TAG}" \
145+
imageTag="${IMAGE_TAG}" \
146146
createdBy="Pipeline" \
147147
tags="{'Purpose':'Deploying and Cleaning Up Resources for Validation','CreatedDate':'$current_date'}"
148148

docs/CustomizingAzdParameters.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,17 @@ By default this template will use the environment name as the prefix to prevent
1212
| `AZURE_LOCATION` | string | `<User selects during deployment>` | Location of the Azure resources. Controls where the infrastructure will be deployed. |
1313
| `AZURE_ENV_AI_SERVICE_LOCATION` | string | `<User selects during deployment>` | Location of the Azure resources. Controls where the Azure AI Services will be deployed. |
1414
| `AZURE_ENV_MODEL_DEPLOYMENT_TYPE` | string | `GlobalStandard` | Change the Model Deployment Type (allowed values: Standard, GlobalStandard). |
15-
| `AZURE_ENV_MODEL_NAME` | string | `gpt-4o` | Set the Model Name (allowed values: gpt-4o). |
16-
| `AZURE_ENV_MODEL_VERSION` | string | `2024-08-06` | Set the Azure model version (allowed values: 2024-08-06) |
17-
| `AZURE_ENV_MODEL_CAPACITY` | integer | `150` | Set the Model Capacity (choose a number based on available GPT model capacity in your subscription). |
18-
| `AZURE_ENV_LOG_ANALYTICS_WORKSPACE_ID` | string | Guide to get your [Existing Workspace ID](/docs/re-use-log-analytics.md) | Set this if you want to reuse an existing Log Analytics Workspace instead of creating a new one. |
15+
| `AZURE_ENV_GPT_MODEL_NAME` | string | `gpt-4o` | Set the Model Name (allowed values: gpt-4o). |
16+
| `AZURE_ENV_GPT_MODEL_VERSION` | string | `2024-08-06` | Set the Azure model version (allowed values: 2024-08-06) |
17+
| `AZURE_ENV_GPT_MODEL_CAPACITY` | integer | `150` | Set the Model Capacity (choose a number based on available GPT model capacity in your subscription). |
18+
| `AZURE_ENV_LOG_ANALYTICS_WORKSPACE_RID`| string | Guide to get your [Existing Workspace ID](/docs/re-use-log-analytics.md) | Set this if you want to reuse an existing Log Analytics Workspace instead of creating a new one. |
1919
| `AZURE_ENV_IMAGETAG` | string | `latest` | Set the Image tag Like (allowed values: latest, dev, hotfix) |
20-
| `AZURE_ENV_JUMPBOX_SIZE` | string | `Standard_DS2_v2` | Specifies the size of the Jumpbox Virtual Machine. Set a custom value if `enablePrivateNetworking` is `true`. |
21-
| `AZURE_ENV_JUMPBOX_ADMIN_USERNAME` | string | `JumpboxAdminUser` | Specifies the administrator username for the Jumpbox Virtual Machine. |
22-
| `AZURE_ENV_JUMPBOX_ADMIN_PASSWORD` | string | `JumpboxAdminP@ssw0rd1234!` | Specifies the administrator password for the Jumpbox Virtual Machine. |
23-
| `AZURE_ENV_COSMOS_SECONDARY_LOCATION` | string | *(not set by default)* | Specifies the secondary region for Cosmos DB. Required if `enableRedundancy` is `true`. |
24-
| `AZURE_EXISTING_AI_PROJECT_RESOURCE_ID` | string | *(not set by default)* | Specifies the existing AI Foundry Project Resource ID if it needs to be reused. |
25-
| `AZURE_ENV_ACR_NAME` | string | `cmsacontainerreg.azurecr.io` | Specifies the Azure Container Registry name to use for container images. |
20+
| `AZURE_ENV_VM_SIZE` | string | `Standard_DS2_v2` | Specifies the size of the Jumpbox Virtual Machine. Set a custom value if `enablePrivateNetworking` is `true`. |
21+
| `AZURE_ENV_VM_ADMIN_USERNAME` | string | `JumpboxAdminUser` | Specifies the administrator username for the Jumpbox Virtual Machine. |
22+
| `AZURE_ENV_VM_ADMIN_PASSWORD` | string | `JumpboxAdminP@ssw0rd1234!` | Specifies the administrator password for the Jumpbox Virtual Machine. |
23+
| `AZURE_ENV_SECONDARY_LOCATION` | string | *(not set by default)* | Specifies the secondary region for Cosmos DB. Required if `enableRedundancy` is `true`. |
24+
| `AZURE_ENV_FOUNDRY_PROJECT_RID` | string | *(not set by default)* | Specifies the existing AI Foundry Project Resource ID if it needs to be reused. |
25+
| `AZURE_ENV_CONTAINER_REGISTRY_ENDPOINT`| string | `cmsacontainerreg.azurecr.io` | Specifies the Azure Container Registry endpoint to use for container images. |
2626

2727
---
2828

@@ -36,12 +36,12 @@ azd env set <PARAMETER_NAME> <VALUE>
3636

3737
Set the Log Analytics Workspace Id if you need to reuse the existing workspace
3838
```shell
39-
azd env set AZURE_ENV_LOG_ANALYTICS_WORKSPACE_ID '/subscriptions/<subscription-id>/resourceGroups/<resource-group>/providers/Microsoft.OperationalInsights/workspaces/<workspace-name>'
39+
azd env set AZURE_ENV_LOG_ANALYTICS_WORKSPACE_RID '/subscriptions/<subscription-id>/resourceGroups/<resource-group>/providers/Microsoft.OperationalInsights/workspaces/<workspace-name>'
4040
```
4141

4242
Set the Azure Existing AI Foundry Project Resource ID if you need to reuse the existing AI Foundry Project
4343
```shell
44-
azd env set AZURE_EXISTING_AI_PROJECT_RESOURCE_ID '/subscriptions/<subscription-id>/resourceGroups/<resource-group>/providers/Microsoft.CognitiveServices/accounts/<account-name>/projects/<project-name>'
44+
azd env set AZURE_ENV_FOUNDRY_PROJECT_RID '/subscriptions/<subscription-id>/resourceGroups/<resource-group>/providers/Microsoft.CognitiveServices/accounts/<account-name>/projects/<project-name>'
4545
```
4646

4747
**Example:**

infra/main.bicep

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,13 @@ var replicaRegionPairs = {
5757
var replicaLocation = replicaRegionPairs[resourceGroup().location]
5858

5959
@description('Optional. AI model deployment token capacity. Defaults to 150K tokens per minute.')
60-
param gptModelCapacity int = 150
60+
param gptDeploymentCapacity int = 150
6161

6262
@description('Optional. Enable monitoring for the resources. This will enable Application Insights and Log Analytics. Defaults to false.')
6363
param enableMonitoring bool = false
6464

6565
@description('Optional. Enable scaling for the container apps. Defaults to false.')
66-
param enableScaling bool = false
66+
param enableScalability bool = false
6767

6868
@description('Optional. Enable redundancy for applicable resources. Defaults to false.')
6969
param enableRedundancy bool = false
@@ -95,25 +95,25 @@ param enableTelemetry bool = true
9595

9696
@minLength(1)
9797
@description('Optional. GPT model deployment type. Defaults to GlobalStandard.')
98-
param gptModelDeploymentType string = 'GlobalStandard'
98+
param deploymentType string = 'GlobalStandard'
9999

100100
@minLength(1)
101101
@description('Optional. Name of the GPT model to deploy. Defaults to gpt-4o.')
102102
param gptModelName string = 'gpt-4o'
103103

104104
@minLength(1)
105105
@description('Optional. Set the Image tag. Defaults to latest_2025-11-10_599.')
106-
param imageVersion string = 'latest_2025-11-10_599'
106+
param imageTag string = 'latest_2025-11-10_599'
107107

108-
@description('Optional. Azure Container Registry name. Defaults to cmsacontainerreg.azurecr.io')
109-
param acrName string = 'cmsacontainerreg.azurecr.io'
108+
@description('Optional. Azure Container Registry endpoint. Defaults to cmsacontainerreg.azurecr.io')
109+
param containerRegistryEndpoint string = 'cmsacontainerreg.azurecr.io'
110110

111111
@minLength(1)
112112
@description('Optional. Version of the GPT model to deploy. Defaults to 2024-08-06.')
113113
param gptModelVersion string = '2024-08-06'
114114

115115
@description('Optional. Use this parameter to use an existing AI project resource ID. Defaults to empty string.')
116-
param azureExistingAIProjectResourceId string = ''
116+
param existingFoundryProjectResourceId string = ''
117117

118118
@description('Optional. Use this parameter to use an existing Log Analytics workspace resource ID. Defaults to empty string.')
119119
param existingLogAnalyticsWorkspaceId string = ''
@@ -145,8 +145,8 @@ var modelDeployment = {
145145
version: gptModelVersion
146146
}
147147
sku: {
148-
name: gptModelDeploymentType
149-
capacity: gptModelCapacity
148+
name: deploymentType
149+
capacity: gptDeploymentCapacity
150150
}
151151
raiPolicyName: 'Microsoft.Default'
152152
}
@@ -751,7 +751,7 @@ module aiServices 'modules/ai-foundry/aifoundry.bicep' = {
751751
aiServicesPrivateDnsZoneResourceId: avmPrivateDnsZones[dnsZoneIndex.aiServices]!.outputs.resourceId
752752
}
753753
: null
754-
existingFoundryProjectResourceId: azureExistingAIProjectResourceId
754+
existingFoundryProjectResourceId: existingFoundryProjectResourceId
755755
disableLocalAuth: true //Should be set to true for WAF aligned configuration
756756
customSubDomainName: 'aif-${solutionSuffix}'
757757
apiProperties: {
@@ -937,7 +937,7 @@ module containerAppBackend 'br/public:avm/res/app/container-app:0.19.0' = {
937937
containers: [
938938
{
939939
name: 'cmsabackend'
940-
image: '${acrName}/cmsabackend:${imageVersion}'
940+
image: '${containerRegistryEndpoint}/cmsabackend:${imageTag}'
941941
env: concat(
942942
[
943943
{
@@ -1081,10 +1081,10 @@ module containerAppBackend 'br/public:avm/res/app/container-app:0.19.0' = {
10811081
ingressTargetPort: 8000
10821082
ingressExternal: true
10831083
scaleSettings: {
1084-
// maxReplicas: enableScaling ? 3 : 1
1084+
// maxReplicas: enableScalability ? 3 : 1
10851085
maxReplicas: 1 // maxReplicas set to 1 (not 3) due to multiple agents created per type during WAF deployment
10861086
minReplicas: 1
1087-
rules: enableScaling
1087+
rules: enableScalability
10881088
? [
10891089
{
10901090
name: 'http-scaler'
@@ -1125,7 +1125,7 @@ module containerAppFrontend 'br/public:avm/res/app/container-app:0.19.0' = {
11251125
value: 'prod'
11261126
}
11271127
]
1128-
image: '${acrName}/cmsafrontend:${imageVersion}'
1128+
image: '${containerRegistryEndpoint}/cmsafrontend:${imageTag}'
11291129
name: 'cmsafrontend'
11301130
resources: {
11311131
cpu: 1
@@ -1136,9 +1136,9 @@ module containerAppFrontend 'br/public:avm/res/app/container-app:0.19.0' = {
11361136
ingressTargetPort: 3000
11371137
ingressExternal: true
11381138
scaleSettings: {
1139-
maxReplicas: enableScaling ? 3 : 1
1139+
maxReplicas: enableScalability ? 3 : 1
11401140
minReplicas: 1
1141-
rules: enableScaling
1141+
rules: enableScalability
11421142
? [
11431143
{
11441144
name: 'http-scaler'

0 commit comments

Comments
 (0)