azure-cli: Metadata comments in param file throw an error
az feedback
auto-generates most of the information requested below, as of CLI version 2.0.80
Describe the bug using in param file metadata for validate ARM template will get an error “message”: "The request content was invalid and could not be deserialized: 'Could not find member ‘metadata’ on object of type ‘DeploymentParameterDefinition’. Path ‘properties.parameters.storageAccountType.metadata’
To Reproduce
JSON - ARM Template
JSON - ARM Param File should contains metadata
{
“$schema”: “https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#”,
“contentVersion”: “1.0.0.0”,
“parameters”: {
“storageAccountType”: {
“value”: “Standard_LRS”,
“metadata”: {
“description”: “AAA”
}
}
}
}
run cli command
az group deployment validate -g rg-test -j --template-file storage.json --parameters @storage.param.json
throw error: { “error”: { “additionalInfo”: null, “code”: “InvalidRequestContent”, “details”: null, “message”: “The request content was invalid and could not be deserialized: ‘Could not find member ‘metadata’ on object of type ‘DeploymentParameterDefinition’. Path ‘properties.parameters.storageAccountType.metadata’, line 1, position 90.’.”, “target”: null }, “properties”: null }
Expected behavior No error
Environment summary azure-cli 2.0.80 command-modules-nspkg 2.0.3 core 2.0.80 nspkg 3.0.4 telemetry 1.0.4 Python (Linux) 3.6.5 (default, Jan 13 2020, 05:04:39) [GCC 7.4.0] But I try also with Windows OS same issue
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 15 (4 by maintainers)
I’m getting the same error but according to the schema the metadata should be supported.
https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#
@yonzhan @zhoxing-ms