Managed app ARM templates failing while validation with latest version of ARM-TTK
- Dominant language
- PowerShell
- Stars
- 468
- Forks
- 208
- PR merge metrics
- No merged PRs in 30d
Description
Hi Team, Hope you are doing good.
Since the upgrade of ARM-TTK our template validation is failing. If I remember it correctly with v0.15 I never encountered this issue.
Also, I believe the reason is wrong or misleading since we already are using the practices which are shared over the documentation.
**_Ref: https://learn.microsoft.com/en-us/azure/azure-resource-manager/templates/template-test-cases_**
**_Section: VM size uses parameter_**
**Error:**
```
VM Size Should Be A Parameter
[-] VM Size Should Be A Parameter (140 ms)
VMSize parameter must be declared for the parent template
```
We are already using vmSize as a parameter, please find below snippets from our respective arm templates:
**createUiDefinition.json [Ref: https://learn.microsoft.com/en-us/azure/azure-resource-manager/managed-applications/microsoft-compute-sizeselector]**
```
{
"name": "nodeSize",
"type": "Microsoft.Compute.SizeSelector",
"label": "Size",
"toolTip": "The size of VMs to be used as worker nodes in the AKS cluster",
"recommendedSizes": [
"Standard_B4ms",
"Standard_DS3_v2",
"Standard_D4s_v3"
],
"options": {
"hideDiskTypeFilter": false
},
"osPlatform": "Linux",
"imageReference": {
"publisher": "Canonical",
"offer": "UbuntuServer",
"sku": "18.04"
},
"count": 1,
"visible": true
},
```
**mainTemplate's parameters:**
```
"nodeSize": {
"type": "string",
"defaultValue": "Standard_B4ms",
"metadata": {
"description": "Node Size"
}
},
```
**mainTemplate's resources (this is a part of AKS agent pool):**
```
"agentPoolProfiles": [
{
"name": "agentpool",
"count": "[parameters('nodeCount')]",
"vmSize": "[parameters('nodeSize')]",
"enableAutoScaling": true,
"minCount": "[parameters('nodeCount')]",
"maxCount": "[parameters('nodeMaxCount')]",
"osType": "Linux",
"storageProfile": "ManagedDisks",
"type": "VirtualMachineScaleSets",
"mode": "System",
"vnetSubnetID": "[variables('aksSubnetId')]",
"maxPods": 50
}
],
```
Could you please suggest OR correct me if I am doing something wrong?
Thank you,
Sunny
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.