VMSize not recognised when it's in a variable (possible regression of #695)
- Dominant language
- PowerShell
- Stars
- 468
- Forks
- 208
- PR merge metrics
- No merged PRs in 30d
Description
The following Bicep;
`
var referenceImage = {
windows: {
publisher: 'MicrosoftWindowsServer'
offer: 'WindowsServer'
sku: '2019-Datacenter'
version: 'latest'
VMsize: 'Standard_D4s_v3'
}
}
.
.
.
resource ImageReferenceVM 'Microsoft.Compute/virtualMachines@2022-08-01' = {
name: 'prdaueimagevm01'
location: location
properties: {
hardwareProfile: {
vmSize: referenceImage.windows.VMsize
}
osProfile: {
computerName: 'prdaueimagevm01'
adminUsername: vmAdminUsername
adminPassword: vmAdminPassword
}
storageProfile: {
imageReference: {
publisher: referenceImage.windows.publisher
offer: referenceImage.windows.offer
sku: referenceImage.windows.sku
version: referenceImage.windows.version
}
osDisk: {
createOption: 'FromImage'
managedDisk: {
storageAccountType: 'StandardSSD_LRS'
}
`
Raises an error with the latest arm-ttk (0.22) that
_VM Size for resourceType ' ' named ' ' must be a parameter_
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the reported ARM-TTK 0.22 validation error with the Bicep example, focusing on the VMSize value supplied through referenceImage.windows.VMsize. Trace the VM size validation entry point and its existing tests. Done means a VM size held in a variable is recognised without the erroneous parameter-required message, while direct values remain validated.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- powershell
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100