Azure / Azure/bicep-types-az

Microsoft.Search/searchServices RegionNotMatched issue when template try to create instances at different locations

Open
#2,273 5 comments 0 reactions 0 assignees View on GitHub
Needs: Triage :mag:
Dominant language
TypeScript
Stars
108
Forks
44
Avg merge
18h 53m
Merged PRs (30d)
29

Description

**Bicep version**

Bicep CLI version 0.29.47 (132ade51bc)

**Describe the bug**
Strange behavior with the issue_main.bicep which attempt to create Cognitive Search instances in two different Resource Groups at two different target locations.

Error Reported:

InvalidTemplateDeployment - The template deployment 'aef4bbd2-636a-4a7b-8793-7c376fff78aa' is not valid according to the validation procedure. The tracking id is '8cfce851-0cdd-4c08-bf90-a3b05c541f56'. See inner errors for details.
RegionNotMatched - Location 'West US' is not matched to the locations supported by current RP
RegionNotMatched - Location 'West US 2' is not matched to the locations supported by current RP

Validation pass with the working_main.bicep which attempt to create Cognitive Search instances in two different Resource Group but same target location.

Validation pass with the storage_main.bicep which attempt to create Storage Account instances in two different Resource Group and different target locations (Same as the issue_main.bicep).

Seems something special is happening for Microsoft.Search/searchServices.

**To Reproduce**

[example.zip](https://github.com/user-attachments/files/16808595/example.zip)

Test-AzDeployment -TemplateFile C:\WORKSPACE\TEMP\Bicep\issue_main.bicep -Location 'West US'
Test-AzDeployment -TemplateFile C:\WORKSPACE\TEMP\Bicep\working_main.bicep -Location 'West US'
Test-AzDeployment -TemplateFile C:\WORKSPACE\TEMP\Bicep\storage_main.bicep -Location 'West US'

**Additional context**

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the attached example.zip and the issue_main.bicep, working_main.bicep, and storage_main.bicep templates. Run the three Test-AzDeployment commands from the report and compare the validation results for Microsoft.Search/searchServices and storage accounts across resource groups and locations. Done means identifying the cause of the differing RegionNotMatched behavior and recording or implementing a verified resolution.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure
Domain
cloud
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.