Skip to content

Exception calling "GetBicepResources" with "3" argument(s): "Unable to expand resources because the source file #1581

Answered by BernieWhite
oxbo-andre asked this question in Q&A
Discussion options

You must be logged in to vote

@oxbo-andre Thanks for reporting the issue.

Expansion requires a parameter file or other bicep deployment referencing the module to provide required parameters.

If you have a parameter file as the post from @aavdberg may suggest then try this:

  1. Double check that the Bicep module main.bicep is excluded. You can do this by setting the Input.PathIgnore option. This is because expansion occurs from the parameter file or other bicep file, so the referenced module needs to be excluded.

Details here: https://azure.github.io/PSRule.Rules.Azure/using-bicep/#configuringpathexclusions

  1. Alternatively, you may consider setting default values (via AZURE_PARAMETER_DEFAULTS) for testing, but that is mos…

Replies: 15 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by BernieWhite
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@aavdberg
Comment options

@BernieWhite
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #1580 on August 17, 2022 13:29.