microsoft-foundry / microsoft-foundry/foundry-samples
15-private-network-standard-agent-setup - Failing with existing VNET during template validation
Nobody has claimed this yet.
- Dominant language
- Bicep
- Stars
- 445
- Forks
- 494
- Avg merge
- 11h 35m
- Merged PRs (30d)
- 38
Description
15-private-network-standard-agent-setup bicep is failing with the following error message. Existing VNET + Subnets are being used. This is error during template validation. The deployment does not start.
`"submissionTimestamp": "2025-07-31T11:35:58Z",
"subscriptionId": "YYYYYYYYY",
"tenantId": "YYYYYYYYY",
"properties": {
"statusCode": "BadRequest",
"serviceRequestId": null,
"statusMessage": "{"error":{"code":"MultipleErrorsOccurred","message":"Multiple error occurred: BadRequest,BadRequest. Please see details.","details":[{"code":"InvalidTemplate","target":"/subscriptions/YYYYYYYYY/resourceGroups/YYYYYYYYY-ai-d/providers/Microsoft.Resources/deployments/sbn-YYY-YYYYY-foundry-agent-d","message":"Deployment template validation failed: 'The template resource '/sbn-YYY-YYYYY-foundry-agent-d' for type 'Microsoft.Network/virtualNetworks/subnets' at line '1' and column '1288' has incorrect segment lengths. A nested resource type must have identical number of segments as its resource name. A root resource type must have segment length one greater than its resource name. Please see https://aka.ms/arm-syntax-resources for usage details.'.","additionalInfo":[{"type":"TemplateViolation",
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.
Research direction
Start with the Bicep sample at samples/microsoft/infrastructure-setup/15-private-network-standard-agent-setup and inspect how the existing VNET and subnets are referenced during template validation. Reproduce validation with existing VNET and subnet inputs; done means the template validates without the incorrect segment-length error and deployment can start.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure
- Domain
- cloud, infrastructure
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100