03/31/2020, 6:12 AM
I wonder, is there a way to tell pulumi "it's okay to create these resources here in parallel" or rather "please create these resources here in parallel"? Example: Creating a VPN Gateway and an ExpressRoute Gateway. Pulumi just decided to create them one after the other (no dependencies between them) which means the deployment will now take around an hour. Same goes for "delete" operation.


03/31/2020, 7:32 AM
Hmm, everything should be in parallel by default unless there are dependencies.


03/31/2020, 7:35 AM
That was my assumption. I'll test one / two more times. It might've been a fluke. Maybe. The Azure APIs are a bit "slow" today.


04/01/2020, 2:03 AM
I've had more of a problem with contention within Azure when deploying VPN Gateway, ExpressRoute Gateway and Azure Firewall at the same time as trying to associate subnets and route tables. So I have been experimenting with introducing dependencies in order to reduce contention.
I have found that strategically adding depends_on prevents all the retryable errors I was seeing previously in Azure Activity Log e.g. gateways and firewalls depends_on both the gateway and firewall subnet, and other subnets depends_on gateways and firewalls. Without this contention I have 50 odd resources deploy in less than half an hour - times out otherwise