Skip to content

Commit a0a43be

Browse files
committed
Bring visibility of VmSize to main.bicep
1 parent 4dae5f5 commit a0a43be

5 files changed

Lines changed: 37 additions & 11 deletions

File tree

azure.v2.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: modernize-your-code-solution-accelerator
2+
metadata:
3+
template: modernize-your-code-solution-accelerator@1.0
4+
parameters:
5+
AzureAiServiceLocation:
6+
type: string
7+
default: japaneast
8+
Prefix:
9+
type: string
10+
default: azdtemp
11+
baseUrl:
12+
type: string
13+
default: 'https://raw.githubusercontent.com/microsoft/Modernize-your-code-solution-accelerator'
14+
infrastructure:
15+
mode: Incremental
16+
template: ./infra/main.bicep # Path to the main.bicep file inside the 'infrastructure' folder
17+
parameters:
18+
AzureAiServiceLocation: ${{ parameters.AzureAiServiceLocation }}
19+
Prefix: ${{ parameters.Prefix }}
20+
baseUrl: ${{ parameters.baseUrl }}

infra/main.bicep

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ param secondaryLocation string?
6161
@description('Optional. Enable private networking for the resources. Set to true to enable private networking. Defaults to false.')
6262
param enablePrivateNetworking bool = useWafAlignedArchitecture? true : false
6363

64+
@description('Optional. Size of the Jumpbox Virtual Machine when created. Set to custom value if enablePrivateNetworking is true.')
65+
param vmSize string?
66+
6467
@description('Optional. Admin username for the Jumpbox Virtual Machine. Set to custom value if enablePrivateNetworking is true.')
6568
@secure()
6669
//param vmAdminUsername string = take(newGuid(), 20)
@@ -71,15 +74,6 @@ param vmAdminUsername string?
7174
//param vmAdminPassword string = newGuid()
7275
param vmAdminPassword string?
7376

74-
@allowed([
75-
'Standard_B2s'
76-
'Standard_D2s_v3'
77-
'Standard_D4s_v3'
78-
'Standard_DS2_v2'
79-
])
80-
@description('Optional. Size of the Jumpbox Virtual Machine when created. Set to custom value if enablePrivateNetworking is true. Defaults to Standard_B2s.')
81-
param vmSize string?
82-
8377
@description('Optional. Specifies the resource tags for all the resources. Tag "azd-env-name" is automatically added to all resources.')
8478
param tags object = {}
8579

@@ -209,14 +203,15 @@ module applicationInsights 'br/public:avm/res/insights/component:0.6.0' = if (en
209203
}
210204
}
211205

206+
212207
module network 'modules/network.bicep' = if (enablePrivateNetworking) {
213208
name: take('network-${resourcesName}-deployment', 64)
214209
params: {
215210
resourcesName: resourcesName
216211
logAnalyticsWorkSpaceResourceId: logAnalyticsWorkspaceResourceId
217212
vmAdminUsername: vmAdminUsername ?? 'JumpboxAdminUser'
218213
vmAdminPassword: vmAdminPassword ?? 'JumpboxAdminP@ssw0rd1234!'
219-
vmSize: vmSize ?? 'Standard_B2s'
214+
vmSize: vmSize ?? 'Standard_DS2_v2' // Default VM size
220215
location: location
221216
tags: allTags
222217
enableTelemetry: enableTelemetry

infra/main.parameters.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@
2929
"secondaryLocation": {
3030
"value": "${AZURE_ENV_COSMOS_SECONDARY_LOCATION}"
3131
},
32+
"vmSize": {
33+
"value": "${AZURE_ENV_JUMPBOX_SIZE}"
34+
},
3235
"vmAdminUsername": {
3336
"value": "${AZURE_ENV_JUMPBOX_ADMIN_USERNAME}"
3437
},

infra/modules/ai-foundry/ai-services.bicep

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ resource cognitiveService 'Microsoft.CognitiveServices/accounts@2025-04-01-previ
296296
]
297297
: null
298298
// true is not supported today
299-
encryption: null // Customer managed key encryption is used, but the property is required.
299+
encryption: null // Customer managed key encryption is not used, but the property is required.
300300
migrationToken: migrationToken
301301
restore: restore
302302
restrictOutboundNetworkAccess: restrictOutboundNetworkAccess

infra/modules/network.bicep

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,14 @@ param vmAdminPassword string
2626
param vmSize string
2727

2828

29+
// VM Size Notes:
30+
// 1 B-series VMs (like Standard_B2ms) do not support accelerated networking.
31+
// 2 Pick a VM size that does support accelerated networking (the usual jump-box candidates):
32+
// Standard_DS2_v2 (2 vCPU, 7 GiB RAM, Premium SSD) // The most broadly available (it’s a legacy SKU supported in virtually every region).
33+
// Standard_D2s_v3 (2 vCPU, 8 GiB RAM, Premium SSD) // next most common
34+
// Standard_D2s_v4 (2 vCPU, 8 GiB RAM, Premium SSD) // Newest, so fewer regions availabl
35+
36+
2937
// Subnet Classless Inter-Doman Routing (CIDR) Sizing Reference Table (Best Practices)
3038
// | CIDR | # of Addresses | # of /24s | Notes |
3139
// |-----------|---------------|-----------|----------------------------------------|

0 commit comments

Comments
 (0)