microsoft-foundry / microsoft-foundry/foundry-samples

Private endpoint resources don't use provided location/region

Open
#657 5 comments 0 reactions 5 assignees View on GitHub

@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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.