-
Notifications
You must be signed in to change notification settings - Fork 758
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
ARM Parameter file decompilation - fatal error #1603
Comments
Bicep does not have own parameters values file to be used in deployments and therefore decompiler tries to interpret this file as it was a template file, hence the missing type. Perhaps we could check the schema and warn/block decompilation, but that field is not required. |
One option is to tighten up the validation we do on the JSON |
Thanks for the replies everyone. This clears it up for me as to why it doesn't work. Cheers! |
I am also facing same error , can you also please suggest the another approach can be taken for the parameter. json |
Well, you can create a bicep param file if you want. I have... here is an example //this would be C:\temp\biceptemplate-params.bicep //for example below //keyvault params to associate keyvault if needed resource kv 'Microsoft.KeyVault/vaults@2019-09-01' existing = { //module for test |
Then you need to deploy it with something like... New-AzResourceGroupDeployment -ResourceGroupName "RG" -TemplateFile 'C:\temp\biceptemplate-params.bicep' -Verbose This will tie both together .... if you don't have a coding background and this is not easy to understand I am sorry :( I can try and help if needed |
I deployed multiple infrastructures now in BICEP with those param files I mentioned. So I can try and help if needed. Maybe will give Microsoft some ideas. |
Thanks @lukeuhren I will try it update if you how it goes, then we surely give idea to the Microsoft :) |
Bicep version
Bicep CLI version 0.2.328 (a13b032)
Describe the bug
I use separate parameter files in all my json templates in the repo in devops. Running this from vscode.
This is simply an issue where I can't decompile a .json parameter file to .bicep. I can't see where if it's unsupported right now reading.
Example take a simple parameter file like
try to decompile with .... bicep decompile .\param.json
errors out with ... "Decompilation failed with fatal error "[5:13]: Unable to locate 'type' for parameter 'test'"
Fails on the first parameter on all the files I have tried.
To Reproduce
bicep decompile filename
it will error out like so ... Decompilation failed with fatal error "[5:13]: Unable to locate 'type' for parameter 'test'"
Additional context
If it's in the works and not supported yet all good :)
The text was updated successfully, but these errors were encountered: