Skip to content
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

Building bicep parameterfiles with compile-time imported variables linked to UDF, exception is thrown #12910

Closed
peter-de-wit opened this issue Jan 4, 2024 · 4 comments

Comments

@peter-de-wit
Copy link

peter-de-wit commented Jan 4, 2024

Bicep version
Bicep CLI version 0.24.24 (5646341)

Describe the bug
When building a bicep parameter file that is referring a compile-time imported variable, which is linked to a UDF, the following compilation error is thrown:
Unhandled exception during evaluating template language function 'variables' is not handled.

To Reproduce
I've included a project as attachment to reproduce the situation.

build.ps1 --> main.bicepparam --> throws the error

Additional context
See attachment:
bicep-udt-compiletimeimport-bicepparam-variables.zip

@anthony-c-martin
Copy link
Member

Thank you for sharing the detailed repro! I believe this has been fixed with #12900.

Tested with the following:

cd bicep-udt-compiletimeimport-bicepparam-variables
# Install the latest nightly release
iex "& { $(irm https://aka.ms/bicep/nightly-cli.ps1) } -BinaryPath ."
# Run the repro with the nightly build
& ./bicep build-params main.bicepparam --outfile main.parameters.json

@peter-de-wit
Copy link
Author

Awesome, will test it soon!

@peter-de-wit
Copy link
Author

peter-de-wit commented Jan 8, 2024

Bicep CLI version 0.24.148 (03476cc)
Yes, works as expected! Thanks

@anthony-c-martin
Copy link
Member

Thanks for confirming!

Closed by #12900

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

2 participants