-
Notifications
You must be signed in to change notification settings - Fork 754
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
Unhandled exception. System.NotImplementedException: Cannot emit unexpected expression of type ResourceFunctionCallExpression #14357
Comments
The error message could certainly use some improvement/be a diagnostic and not an unhandled exception, but I believe the root cause is using |
@jeskew, I can confirm that the following work-around does not throw the exception: Module:
Usage.
But it feels less clear from a consumer perspective in using the module. You need to know that you need to provide the multiple parameters. |
Additionaly, I've also found that it is impossible to define multiple custom URLs with a different certificate each in the bicep module, so if you define this in the usage of the original module (supposing that the customUrlInfo is an array):
It would complain that the output of the KeyVault.getSecret method can only be used for properties that have the secure attribute on them and because we are just creating JSON objects here (that match the type definition of urlInfo, but are not instances of that type) the secure attribute is not on them. Do you know if there is a better way for providing multiple custom URLs to APIM with different certificates? |
But please give this also back in the validation in Bicep language service that a "KeyVault.getSecret" isn't allowed in a params type object. |
Bicep version
Bicep CLI version 0.28.1 (ba1e9f8)
Describe the bug
When building the bicep template in which an existing KeyVault is used in order to retrieve secrets that are passed to a module via parameters, an exception with the following message: Unhandled exception. System.NotImplementedException: Cannot emit unexpected expression of type ResourceFunctionCallExpression is thrown.
To Reproduce
Additional context
Exception with message and complete stacktrace:
The text was updated successfully, but these errors were encountered: