-
Notifications
You must be signed in to change notification settings - Fork 774
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Decompile - Unrecognized top-level resource property 'id' #6279
Comments
Has this code changed since you filed the issue? I don't see an "id" property anywhere in the template, which would make this error even more confusing if you can still reproduce. |
It has not. The link points the exact version I'm testing on that still exist. I couldn't find any ID property either so not sure why it spits out the warning. |
We are not sure what is happening here, but will investigate. Thanks for providing the repro. |
From reviewing this template, I can see that it contains several nested deployments. Curently we don't support the module imageDefinitionsDeploy '?' /*TODO: replace with correct path to [variables('imageDefinitionUrl')]*/ = { There is also 1 particular item that is now unsupported in Bicep, that will not likely be 'fixed'. In Bicep you can no longer use a variable to represent the bicep file path used for a Bicep Module. https://docs.microsoft.com/en-us/azure/azure-resource-manager/bicep/modules#definition-syntax Currently that template does use variables for the nested template deployment paths. "imageDefinitionUrl": "[uri(deployment().properties.templateLink.uri, 'nested/imageDefinition.json')]", In short/summary...It should be very easy to remediate the issue within this decompile, however it will require some manual work.
"workspaceUrl": "[uri(deployment().properties.templateLink.uri, 'nested/workspace.json')]",
"workspaceDashboardUrl": "[uri(deployment().properties.templateLink.uri, 'nested/dashboard.json')]",
"managedIdentityUrl": "[uri(deployment().properties.templateLink.uri, 'nested/managedIdentity.json')]",
"imageGalleryUrl": "[uri(deployment().properties.templateLink.uri, 'nested/imageGallery.json')]",
"win10mageTemplateUrl": "[uri(deployment().properties.templateLink.uri, 'imageTemplates/windows10Evd.json')]",
"srv2016imageTemplateUrl": "[uri(deployment().properties.templateLink.uri, 'imageTemplates/windows2016.json')]",
"srv2019imageTemplateUrl": "[uri(deployment().properties.templateLink.uri, 'imageTemplates/windows2019.json')]",
|
@wsmelton are you able to confirm that the decompile error is related to nested deployments ? |
Yes, seems to be the nested deployments. |
Bicep version
Bicep CLI version 0.4.1318 (ee0d808)
Describe the bug
Attempted decompiling this azuredeploy.json from another GitHub repo.
To Reproduce
Downloaded repo and ran `bicep decompile .\azuredeploy.json
Received following output
The text was updated successfully, but these errors were encountered: