Introduction
If you’re working with Azure, you might have seen an error like this:
“Failure sending request: StatusCode=0 — Original Error: Code=‘ReferencedResourceNotProvisioned’ Message=‘Cannot proceed with operation because resource used by resource is not in Succeeded state. Resource is in Updating state and the last operation that updated/is updating the resource is PutSubnetOperation.’”
It looks worse than it is. Here’s what it means and how to fix it.
Why Does This Error Occur?
A related resource is stuck in an ‘Updating’ state, so Azure won’t let the operation proceed. This usually means another operation is still running on that resource or one it depends on.
The Fix
Limit parallel operations by setting -parallelism=1:
terraform apply -parallelism=1
This forces Terraform to complete one operation at a time, letting in-flight updates finish before moving on. The resource reaches ‘Succeeded’ and the error clears.