bicep
bicep copied to clipboard
Bicep Decompile edits names of Artifact Parameters
Bicep version Bicep CLI version 0.9.1 (a2950a16df)
Describe the bug
When using az bicep decompile, when the parameters _artifactsLocation and _artifactsLocationSasToken are present they are converted to artifactsLocation and artifactsLocationSasToken which produces The artifacts parameter 'artifactsLocation' must start with an underscore.bicep corehttps://aka.ms/bicep/linter/artifacts-parameters
To Reproduce
Decompile the following ARM template.
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"location": {
"type": "string",
"defaultValue": "[resourceGroup().location]",
"metadata": {
"description": "Deployment Location"
}
},
"_artifactsLocation": {
"type": "string",
"defaultValue": "[deployment().properties.templateLink.uri]",
"metadata": {
"description": "The base URI where artifacts required by this template are located including a trailing '/'"
}
},
"_artifactsLocationSasToken": {
"type": "secureString",
"defaultValue": "",
"metadata": {
"description": "The sasToken required to access _artifactsLocation."
}
}
},
"resources": []
}
Additional context Values should not be converted when it would cause linting errors. https://docs.microsoft.com/en-us/azure/azure-resource-manager/bicep/linter-rule-artifacts-parameters