Azure / bicep-types-az

Bicep type definitions for ARM resources
MIT License
84 stars 27 forks source link

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

Open softnado opened 2 weeks ago

softnado commented 2 weeks ago

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

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

stephaniezyen commented 1 week ago

This looks to be an issue with the Microsoft.Search RP. Please open a support ticket with that team to get this fixed.

softnado commented 1 week ago

@stephaniezyen Do you have contact information regarding the team of the Microsoft.Search RP?