Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/CustomizingAzdParameters.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ By default this template will use the environment name as the prefix to prevent
| `AZURE_ENV_MODEL_CAPACITY` | integer | `150` | Set the Model Capacity (choose a number based on available GPT model capacity in your subscription). |
| `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. |
| `AZURE_ENV_IMAGETAG` | string | `latest` | Set the Image tag Like (allowed values: latest, dev, hotfix) |
| `AZURE_ENV_JUMPBOX_SIZE` | string | `Standard_DS2_v2` | Specifies the size of the Jumpbox Virtual Machine. Set a custom value if `enablePrivateNetworking` is `true`. |
| `AZURE_ENV_VM_SIZE` | string | `Standard_D2s_v5` | Specifies the size of the Jumpbox Virtual Machine (e.g., `Standard_D2s_v5`, `Standard_D2s_v4`). Set a custom value if `enablePrivateNetworking` is `true`. |
| `AZURE_ENV_JUMPBOX_ADMIN_USERNAME` | string | `JumpboxAdminUser` | Specifies the administrator username for the Jumpbox Virtual Machine. |
| `AZURE_ENV_JUMPBOX_ADMIN_PASSWORD` | string | `JumpboxAdminP@ssw0rd1234!` | Specifies the administrator password for the Jumpbox Virtual Machine. |
| `AZURE_ENV_COSMOS_SECONDARY_LOCATION` | string | *(not set by default)* | Specifies the secondary region for Cosmos DB. Required if `enableRedundancy` is `true`. |
Expand Down
4 changes: 2 additions & 2 deletions docs/DeploymentGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,8 @@ Copy the contents from the production configuration file to your main parameters
By default, random GUIDs are generated for VM credentials. To set custom credentials:

```shell
azd env set AZURE_ENV_VM_ADMIN_USERNAME <your-username>
azd env set AZURE_ENV_VM_ADMIN_PASSWORD <your-password>
azd env set AZURE_ENV_JUMPBOX_ADMIN_USERNAME <your-username>
azd env set AZURE_ENV_JUMPBOX_ADMIN_PASSWORD <your-password>
```
Comment on lines 205 to 210
Copy link

Copilot AI Mar 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This section says “By default, random GUIDs are generated for VM credentials”, but the actual Bicep fallbacks are hard-coded (JumpboxAdminUser / JumpboxAdminP@ssw0rd1234!) when the parameters are null. Update the guide to match the real behavior, or change the template/parameterization to actually generate random credentials by default.

Copilot uses AI. Check for mistakes.

### 3.3 Advanced Configuration (Optional)
Expand Down
6 changes: 3 additions & 3 deletions docs/TroubleShootingSteps.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion infra/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,7 @@ module virtualMachine 'br/public:avm/res/compute/virtual-machine:0.20.0' = if (e
enableTelemetry: enableTelemetry
computerName: take(virtualMachineResourceName, 15)
osType: 'Windows'
vmSize: vmSize ?? 'Standard_D2s_v3'
vmSize: vmSize ?? 'Standard_D2s_v5'
adminUsername: vmAdminUsername ?? 'JumpboxAdminUser'
adminPassword: vmAdminPassword ?? 'JumpboxAdminP@ssw0rd1234!'
Comment on lines +640 to 642
Copy link

Copilot AI Mar 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

vmSize (and the VM admin creds) are optional params, but here the template falls back using null-coalescing (vmSize ?? ...). If infra/main.waf.parameters.json substitutes an unset env var to an empty string (a pattern this repo already accounts for via empty() checks elsewhere), this will bypass the fallback and pass an invalid empty VM size to the AVM module. Consider using !empty(vmSize) ? vmSize : 'Standard_D2s_v5' (and the same pattern for username/password) so unset/empty values still resolve to defaults.

Suggested change
vmSize: vmSize ?? 'Standard_D2s_v5'
adminUsername: vmAdminUsername ?? 'JumpboxAdminUser'
adminPassword: vmAdminPassword ?? 'JumpboxAdminP@ssw0rd1234!'
vmSize: !empty(vmSize) ? vmSize : 'Standard_D2s_v5'
adminUsername: !empty(vmAdminUsername) ? vmAdminUsername : 'JumpboxAdminUser'
adminPassword: !empty(vmAdminPassword) ? vmAdminPassword : 'JumpboxAdminP@ssw0rd1234!'

Copilot uses AI. Check for mistakes.
managedIdentities: {
Expand Down
14 changes: 7 additions & 7 deletions infra/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
"_generator": {
"name": "bicep",
"version": "0.41.2.15936",
"templateHash": "9733680305260753032"
"templateHash": "18262017557117529046"
},
"name": "Modernize Your Code Solution Accelerator",
"description": "CSA CTO Gold Standard Solution Accelerator for Modernize Your Code. \n"
"description": "CSA CTO Gold Standard Solution Accelerator for Modernize Your Code. \r\n"
},
"parameters": {
"solutionName": {
Expand Down Expand Up @@ -12902,11 +12902,11 @@
},
"dependsOn": [
"applicationInsights",
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').ods)]",
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').agentSvc)]",
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').storageBlob)]",
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').oms)]",
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').monitor)]",
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').ods)]",
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').agentSvc)]",
"dataCollectionEndpoint",
"logAnalyticsWorkspace",
"virtualNetwork"
Expand Down Expand Up @@ -16625,7 +16625,7 @@
"value": "Windows"
},
"vmSize": {
"value": "[coalesce(parameters('vmSize'), 'Standard_D2s_v3')]"
"value": "[coalesce(parameters('vmSize'), 'Standard_D2s_v5')]"
},
"adminUsername": {
"value": "[coalesce(parameters('vmAdminUsername'), 'JumpboxAdminUser')]"
Expand Down Expand Up @@ -31929,9 +31929,9 @@
},
"dependsOn": [
"aiServices",
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').openAI)]",
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').aiServices)]",
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').cognitiveServices)]",
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').openAI)]",
"virtualNetwork"
]
},
Expand Down Expand Up @@ -40182,8 +40182,8 @@
},
"dependsOn": [
"appIdentity",
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').storageBlob)]",
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').storageFile)]",
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').storageBlob)]",
"logAnalyticsWorkspace",
"virtualNetwork"
]
Expand Down
9 changes: 0 additions & 9 deletions infra/main.parameters.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,6 @@
"azureAiServiceLocation": {
"value": "${AZURE_ENV_AI_SERVICE_LOCATION}"
},
"vmSize": {
"value": "${AZURE_ENV_JUMPBOX_SIZE}"
},
"vmAdminUsername": {
"value": "${AZURE_ENV_JUMPBOX_ADMIN_USERNAME}"
},
"vmAdminPassword": {
"value": "${AZURE_ENV_JUMPBOX_ADMIN_PASSWORD}"
},
"backendExists": {
"value": "${SERVICE_BACKEND_RESOURCE_EXISTS=false}"
},
Expand Down
6 changes: 3 additions & 3 deletions infra/main.waf.parameters.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@
"azureAiServiceLocation": {
"value": "${AZURE_ENV_AI_SERVICE_LOCATION}"
},
"vmSize": {
"value": "${AZURE_ENV_JUMPBOX_SIZE}"
},
"vmAdminUsername": {
"value": "${AZURE_ENV_JUMPBOX_ADMIN_USERNAME}"
},
"vmAdminPassword": {
"value": "${AZURE_ENV_JUMPBOX_ADMIN_PASSWORD}"
},
"vmSize": {
"value": "${AZURE_ENV_VM_SIZE}"
},
Comment on lines +47 to +49
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This changes the environment variable used to drive the jumpbox VM size from AZURE_ENV_JUMPBOX_SIZE to AZURE_ENV_VM_SIZE. Since the old name is no longer referenced anywhere in the repo, this is a breaking change for existing azd env set AZURE_ENV_JUMPBOX_SIZE ... setups, which conflicts with the PR’s “No breaking change” checkbox. Consider keeping the original env var name, or explicitly documenting this as a breaking change and providing a compatibility path (e.g., accept both names).

Copilot uses AI. Check for mistakes.
"backendExists": {
"value": "${SERVICE_BACKEND_RESOURCE_EXISTS=false}"
},
Expand Down
2 changes: 1 addition & 1 deletion infra/main_custom.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,7 @@ module virtualMachine 'br/public:avm/res/compute/virtual-machine:0.20.0' = if (e
enableTelemetry: enableTelemetry
computerName: take(virtualMachineResourceName, 15)
osType: 'Windows'
vmSize: vmSize ?? 'Standard_D2s_v3'
vmSize: vmSize ?? 'Standard_D2s_v5'
adminUsername: vmAdminUsername ?? 'JumpboxAdminUser'
adminPassword: vmAdminPassword ?? 'JumpboxAdminP@ssw0rd1234!'
Comment on lines +569 to 571
Copy link

Copilot AI Mar 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same issue as infra/main.bicep: vmSize is defaulted via null-coalescing, which won't apply if the parameter comes through as an empty string from env-var substitution in the parameters file. Use an empty()-based fallback (!empty(vmSize) ? vmSize : 'Standard_D2s_v5') (and likewise for username/password) to avoid passing invalid empty values to the VM module.

Suggested change
vmSize: vmSize ?? 'Standard_D2s_v5'
adminUsername: vmAdminUsername ?? 'JumpboxAdminUser'
adminPassword: vmAdminPassword ?? 'JumpboxAdminP@ssw0rd1234!'
vmSize: !empty(vmSize) ? vmSize : 'Standard_D2s_v5'
adminUsername: !empty(vmAdminUsername) ? vmAdminUsername : 'JumpboxAdminUser'
adminPassword: !empty(vmAdminPassword) ? vmAdminPassword : 'JumpboxAdminP@ssw0rd1234!'

Copilot uses AI. Check for mistakes.
managedIdentities: {
Expand Down
10 changes: 6 additions & 4 deletions infra/modules/virtualNetwork.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -170,10 +170,12 @@ param resourceSuffix string

// VM Size Notes:
// 1 B-series VMs (like Standard_B2ms) do not support accelerated networking.
// 2 Pick a VM size that does support accelerated networking (the usual jump-box candidates):
// Standard_DS2_v2 (2 vCPU, 7 GiB RAM, Premium SSD) // The most broadly available (it’s a legacy SKU supported in virtually every region).
// Standard_D2s_v3 (2 vCPU, 8 GiB RAM, Premium SSD) // next most common
// Standard_D2s_v4 (2 vCPU, 8 GiB RAM, Premium SSD) // Newest, so fewer regions available
// 2 Pick a VM size that supports accelerated networking + Premium SSD (the usual jump-box candidates):
// Standard_D2s_v5 (2 vCPU, 8 GiB RAM, Premium SSD/v2/Ultra) // DEFAULT - current-gen Intel, broad regional availability.
// Standard_D2as_v5 (2 vCPU, 8 GiB RAM, Premium SSD/Ultra) // AMD alternative, typically ~15% cheaper.
// Standard_D2s_v4 (2 vCPU, 8 GiB RAM, Premium SSD) // Previous gen, also broadly available.
// Standard_DS2_v2 (2 vCPU, 7 GiB RAM, Premium SSD) // Legacy SKU, being retired from some regions - avoid for new deployments.
// 3 A-series (Av2) is NOT suitable: no Premium SSD support, no accelerated networking.

// Subnet Classless Inter-Domain Routing (CIDR) Sizing Reference Table (Best Practices)
// | CIDR | # of Addresses | # of /24s | Notes |
Expand Down
2 changes: 1 addition & 1 deletion infra/samples/network-subnet-design.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ import { jumpBoxConfigurationType } from 'network/jumpbox.bicep'
@description('Optional. Configuration for the Jumpbox VM. Leave null to omit Jumpbox creation.')
param jumpboxConfiguration jumpBoxConfigurationType = {
name: 'vm-jumpbox-${resourcesName}'
size: 'Standard_D2s_v3' // Default size, can be overridden
size: 'Standard_D2s_v5' // Default size, can be overridden
username: vmAdminUsername
password: vmAdminPassword
subnet: {
Expand Down
2 changes: 1 addition & 1 deletion infra/samples/network/network-resources.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ module jumpbox 'jumpbox.bicep' = if (!empty(jumpboxConfiguration)) {
params: {
name: jumpboxConfiguration.?name ?? 'vm-jumpbox-${resourcesName}'
vnetName: virtualNetwork.outputs.name
size: jumpboxConfiguration.?size ?? 'Standard_D2s_v3'
size: jumpboxConfiguration.?size ?? 'Standard_D2s_v5'
logAnalyticsWorkspaceId: logAnalyticsWorkSpaceResourceId
location: location
subnet: jumpboxConfiguration.?subnet
Expand Down
Loading