Skip to content

Calling module output generates a deployment resource. #12810

Closed Answered by johnlokerse
Kolbasz12 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @Kolbasz12, I have had this issue before. On my blog I have written down why this occurs and how to fix it: https://johnlokerse.dev/2023/01/23/deploymentnotfound-error-using-azure-bicep-modules/

In short, the dependency during transpilation (converting Bicep to ARM) is still evaluated in the reference() function. This dependency is pointed to a module that is not deployed and the Azure Resource Manager cannot find this deployment. This is how the "DeploymentNotFound" error occurs. To fix the problem you can use a condition at the location where the dependency is written.

Hope this works for you! If not, let me know so I can help you further 👍

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by Kolbasz12
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
2 participants