Skip to content

Question about how PSRule handles Bicep expansion #3223

Answered by BernieWhite
ThijmenDam asked this question in Q&A
Discussion options

You must be logged in to vote

@ThijmenDam Removing the output to make the expand work is unusual, that doesn't normally work because PSRule requires these parameters to expand just like Azure would if you deployed the code to Azure. So, the 1/2/3 is it depending on your specific case.

For your specific example, the behaviour is a bug. You're getting this only because the module without the output effectively does nothing. An existing resource block is just a reference and if the reference is not used there is no reason to perform any action. As soon as you attempt to use the existing resource (or perform any other deployment in that module) the parameters would be expected to have a value.

The PSRule expansion process…

Replies: 1 comment 2 replies

Comment options

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

@BernieWhite
Comment options

Answer selected by ThijmenDam
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants