Azure / Azure/azure-quickstart-templates
additionalUnattendContent schema is invalid
- Dominant language
- Bicep
- Stars
- 14.9k
- Forks
- 16.2k
- Avg merge
- 6d 21h
- Merged PRs (30d)
- 6
Description
The public Json schema for resource `Microsoft.Compute/virtualMachines` is invalid and causes spurious validation errors.
### Repro steps
1. Create a template with a resource of type `Microsoft.Compute/virtualMachines` with a `additionalUnattendContent` configuration field as follows:
```
"windowsConfiguration": {
"additionalUnattendContent": [
{
"passName": "oobeSystem",
"componentName": "Microsoft-Windows-Shell-Setup",
"settingName": "AutoLogon",
"content": "[parameters('autologonBlob')]"
}
]
}
```
2. Validate the JSON template against the official ARM schemas (for instance by loading the template file in VS Code or Visual Studio)
3. The IDE suggests to rename `passName` and `componentName` to `pass` and `component` as per following screenshot:

4. Fix the template as suggested
5. Deploy to Azure
6. You get the following deployment error
```
{
"error": {
"details": [
{
"target": "vm.properties.osProfile.windowsConfiguration.additionalUnattendContent[0].pass",
"message": "Could not find member 'pass' on object of type 'AdditionalUnattendContent'. Path 'properties.osProfile.windowsConfiguration.additionalUnattendContent[0].pass', line 1, position 1585."
},
{
"target": "vm.properties.osProfile.windowsConfiguration.additionalUnattendContent[0].component",
"message": "Could not find member 'component' on object of type 'AdditionalUnattendContent'. Path 'properties.osProfile.windowsConfiguration.additionalUnattendContent[0].component', line 1, position 1610."
}
],
"code": "BadRequest",
"message": "The request message is invalid."
}
}
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Locate the public JSON schema for Microsoft.Compute/virtualMachines and inspect the additionalUnattendContent definition. Reproduce the validation with the template example, then verify that passName, componentName, settingName, and content are accepted and the deployed resource uses the same property names.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure
- Domain
- cloud
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100