question

MartinRendell-5344 avatar image
0 Votes"
MartinRendell-5344 asked timleyden-msft answered

Azure Bicep Deployment Dependencies

I have an Azure DevOps pipeline using YAML to deploy resources with Azure Bicep. The Bicep structure is a main.bicep file calling out to module bicep files for resource creation.

I am setting up a vnet/subnet for a Databricks workspace, storage account and private endpoint (storage account to subnet)

The endpoint is the final resource being created but the deployment fails with an error stating that the vnet can not be found. The vnet definitely been created and a rerun of the pipeline completes successfully and the endpoint is now created.

What would cause this behavior? Is there a resource creation lag and a way to delay dependent modules?

Thanks

not-supported
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

timleyden-msft avatar image
0 Votes"
timleyden-msft answered

You need to use a property called dependsOn . You can use it for resources and modules. If this was in a single file it would likely be covered by implicit dependency but because you are using modules you will need to be explicit. You will need to make the module that creates the endpoint depend on the module that creates the network.

Tim


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.