microsoft-foundry / microsoft-foundry/foundry-samples
Private endpoint resources don't use provided location/region
Open
@aprilk-ms is already working on this.
Since Aug 6, 2026.
bug
- Dominant language
- Bicep
- Stars
- 445
- Forks
- 494
- Avg merge
- 11h 35m
- Merged PRs (30d)
- 38
Description
When deploying to a resource group that has a different region than where the resources are being created, the deployment fails when trying to create private endpoints with the following error:
{
"code": "InvalidResourceReference",
"message": "Resource /subscriptions/my-subscription/resourceGroups/my-rg/providers/Microsoft.Network/virtualNetworks/my-vnet referenced by resource /subscriptions/my-subscription/resourceGroups/my-rg/providers/Microsoft.Network/privateEndpoints/my-private-endpoint was not found. Please make sure that the referenced resource exists, and that both resources are in the same region.",
"details": [
{
"code": "NotFound",
"message": "Resource /subscriptions/my-subscription/resourceGroups/my-rg/providers/Microsoft.Network/virtualNetworks/my-vnet not found."
}
]
}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.