-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Description
Describe the bug
We have a lot of deployments running at night, starting from 0:00. Since today, deployments are failing with the following error:
azure.core.exceptions.HttpResponseError: (LocationNotAvailableForDeployment) The provided location 'West Europe' is not available for deployment. List of available regions is 'WESTEUROPE,NORTHEUROPE'.
We're initiating the deployment using the following Azure CLI command:
az deployment tenant validate `
--name ALZ-management-groups-4542.1.1 `
--location westeurope `
--template-file /home/vsts/work/1/s/Infrastructure/LandingZone/ALZ/ManagementGroups/main.bicep `
--parameters @/home/vsts/work/1/s/Infrastructure/LandingZone/ALZ/ManagementGroups/parameters/managementGroups.parameters.json `
--output json `
--debug
As you can see, we do not provide the faulty value 'West Europe'.
Related command
az deployment tenant validate `
--name ALZ-management-groups-4542.1.1 `
--location westeurope `
--template-file /home/vsts/work/1/s/Infrastructure/LandingZone/ALZ/ManagementGroups/main.bicep `
--parameters @/home/vsts/work/1/s/Infrastructure/LandingZone/ALZ/ManagementGroups/parameters/managementGroups.parameters.json `
--output json `
--debug
Errors
azure.core.exceptions.HttpResponseError: (LocationNotAvailableForDeployment) The provided location 'West Europe' is not available for deployment. List of available regions is 'WESTEUROPE,NORTHEUROPE'.
Issue script & Debug output
DEBUG: Command arguments: ['deployment', 'tenant', 'validate', '--name', 'ALZ-management-groups-XXXX.X.X', '--location', 'westeurope', '--template-file', 'Infrastructure/LandingZone/ALZ/ManagementGroups/main.bicep', '--parameters',
'@Infrastructure/LandingZone/ALZ/ManagementGroups/parameters/managementGroups.parameters.json', '--output', 'json', '--debug']
DEBUG: init debug log:
Cannot enable color.
DEBUG: Event: Cli.PreExecute []
DEBUG: Event: CommandParser.OnGlobalArgumentsCreate [...]
DEBUG: attempting to read file Infrastructure/LandingZone/ALZ/ManagementGroups/parameters/managementGroups.parameters.json as utf-8-sig
DEBUG: Event: CommandInvoker.OnPreCommandTableCreate []
DEBUG: Modules found from index for 'deployment': ['azure.cli.command_modules.resource']
DEBUG: Loading command modules...
DEBUG: Loaded command modules in parallel:
DEBUG: Name Load Time Groups Commands
DEBUG: resource 0.172 52 234
DEBUG: Total (1) 0.173 52 234
DEBUG: These extensions are not installed and will be skipped: ['azext_ai_examples', 'azext_next']
DEBUG: Loading extensions:
DEBUG: Name Load Time Groups Commands Directory
DEBUG: Total (0) 0.000 0 0
DEBUG: Loaded 52 groups, 234 commands.
DEBUG: Found a match in the command table.
DEBUG: Raw command : deployment tenant validate
DEBUG: Command table: deployment tenant validate
DEBUG: Event: CommandInvoker.OnPreCommandTableTruncate [...]
INFO: command args: deployment tenant validate --name {} --location {} --template-file {} --parameters {} --output {} --debug
DEBUG: Event: CommandInvoker.OnPreArgumentLoad [...]
DEBUG: Event: CommandInvoker.OnPostArgumentLoad []
DEBUG: Event: CommandInvoker.OnPostCommandTableCreate [...]
DEBUG: Event: CommandInvoker.OnCommandTableLoaded []
DEBUG: Event: CommandInvoker.OnPreParseArgs []
DEBUG: Event: CommandInvoker.OnPostParseArgs [...]
DEBUG: Current value of "use_binary_from_path": if_found_in_ci.
DEBUG: Running in a CI environment. Bicep CLI available on PATH: True.
DEBUG: Using Bicep CLI from PATH. Bicep CLI version 0.41.2 (3e403ea7c1)
WARNING: main.bicep(38,7) : Warning no-unused-params: Parameter "parTelemetryOptOut" is declared but never used.
main.bicep(105,5) : Warning no-unused-vars: Variable "varCuaid" is declared but never used.
DEBUG: Getting management service client client_type=DeploymentsMgmtClient
DEBUG: Converted retries value: 1 -> Retry(total=1, connect=None, read=None, redirect=None, status=None)
DEBUG: Broker enabled? None
DEBUG: Region to be used: None
DEBUG: CredentialAdaptor.get_token_info: scopes=('https://management.core.windows.net//.default',), options={}
DEBUG: ServicePrincipalCredential.acquire_token: scopes=['https://management.core.windows.net//.default'], kwargs={}
DEBUG: Cache hit an AT
DEBUG: Request URL: 'https://management.azure.com/providers/Microsoft.Resources/deployments/ALZ-management-groups-XXXX.X.X/validate?api-version=2025-04-01'
DEBUG: Request method: 'POST'
DEBUG: Request headers:
DEBUG: 'Content-Type': 'application/json'
DEBUG: 'Content-Length': '15446'
DEBUG: 'Accept': 'application/json'
DEBUG: 'x-ms-client-request-id': 'REDACTED'
DEBUG: 'CommandName': 'deployment tenant validate'
DEBUG: 'ParameterSetName': '--name --location --template-file --parameters --output --debug'
DEBUG: 'User-Agent': 'AZURECLI/2.84.0 (DEB) azsdk-python-core/1.38.0 Python/3.13.11 (Linux-6.14.0-1017-azure-x86_64-with-glibc2.39)'
DEBUG: 'Authorization': '*****'
DEBUG: Request body:
DEBUG: {"location": "westeurope", "properties": {"template": "<TEMPLATE_CONTENT_OMITTED>", "parameters": {"parTopLevelManagementGroupPrefix": {"value": "alz"}, "parTopLevelManagementGroupSuffix": {"value": ""}, "parTopLevelManagementGroupDisplayName": {"value": "
Landing Zones"}, "parTopLevelManagementGroupParentId": {"value": ""}, "parLandingZoneMgAlzDefaultsEnable": {"value": true}, "parPlatformMgAlzDefaultsEnable": {"value": true}, "parLandingZoneMgConfidentialEnable": {"value": false}, "parLandingZoneMgChildren": {"value":
{"Non-Production": {"displayName": "Non-Production"}, "Production": {"displayName": "Production"}}}, "parPlatformMgChildren": {"value": {}}, "parTelemetryOptOut": {"value": true}}, "mode": "Incremental"}}
DEBUG: HTTP content is being overwritten to preserve template whitepace accurately. The request body logging may not accurately represent this.
DEBUG: Starting new HTTPS connection (1): management.azure.com:443
DEBUG: https://management.azure.com:443 "POST /providers/Microsoft.Resources/deployments/ALZ-management-groups-XXXX.X.X/validate?api-version=2025-04-01 HTTP/1.1" 400 190
DEBUG: Response status: 400
DEBUG: Response headers:
DEBUG: 'Cache-Control': 'no-cache'
DEBUG: 'Pragma': 'no-cache'
DEBUG: 'Content-Length': '190'
DEBUG: 'Content-Type': 'application/json; charset=utf-8'
DEBUG: 'Expires': '-1'
DEBUG: 'x-ms-failure-cause': 'gateway'
DEBUG: 'x-ms-request-id': 'REDACTED'
DEBUG: 'x-ms-correlation-request-id': 'REDACTED'
DEBUG: 'x-ms-routing-request-id': 'WESTEUROPE:20260315T230118Z:REDACTED'
DEBUG: 'x-ms-operation-identifier': ''
DEBUG: 'x-ms-ratelimit-remaining-tenant-writes': '199'
DEBUG: 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains'
DEBUG: 'X-Content-Type-Options': 'nosniff'
DEBUG: 'X-Cache': 'CONFIG_NOCACHE'
DEBUG: 'X-MSEdge-Ref': 'REDACTED'
DEBUG: 'Date': 'Sun, 15 Mar 2026 23:01:18 GMT'
DEBUG: Response content:
DEBUG: Body is streamable
DEBUG: Traceback (most recent call last):
File "/opt/az/lib/python3.13/site-packages/azure/core/polling/base_polling.py", line 694, in initialize
_raise_if_bad_http_status_and_method(self._initial_response.http_response)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.13/site-packages/azure/core/polling/base_polling.py", line 214, in _raise_if_bad_http_status_and_method
raise BadStatus("Invalid return status {!r} for {!r} operation".format(code, response.request.method))
azure.core.polling.base_polling.BadStatus: Invalid return status 400 for 'POST' operation
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/opt/az/lib/python3.13/site-packages/azure/cli/command_modules/resource/custom.py", line 827, in _deploy_arm_template_at_tenant_scope
validation_poller = mgmt_client.begin_validate_at_tenant_scope(deployment_name=deployment_name,
parameters=deployment)
File "/opt/az/lib/python3.13/site-packages/azure/core/tracing/decorator.py", line 119, in wrapper_use_tracer
return func(*args, **kwargs)
File "/opt/az/lib/python3.13/site-packages/azure/mgmt/resource/deployments/operations/_deployments_operations.py", line 2856, in begin_validate_at_tenant_scope
return LROPoller[_models.DeploymentValidateResult](
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
self._client, raw_result, get_long_running_output, polling_method
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/opt/az/lib/python3.13/typing.py", line 1329, in call
result = self.origin(*args, **kwargs)
File "/opt/az/lib/python3.13/site-packages/azure/core/polling/_poller.py", line 226, in init
self._polling_method.initialize(client, initial_response, deserialization_callback)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.13/site-packages/azure/core/polling/base_polling.py", line 699, in initialize
raise HttpResponseError(response=initial_response.http_response, error=err) from err
azure.core.exceptions.HttpResponseError: (LocationNotAvailableForDeployment) The provided location 'West Europe' is not available for deployment. List of available regions is 'WESTEUROPE,NORTHEUROPE'.
Code: LocationNotAvailableForDeployment
Message: The provided location 'West Europe' is not available for deployment. List of available regions is 'WESTEUROPE,NORTHEUROPE'.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/az/lib/python3.13/site-packages/azure/cli/core/commands/init.py", line 781, in _run_job
result = cmd_copy(params)
File "/opt/az/lib/python3.13/site-packages/azure/cli/core/commands/init.py", line 336, in call
return self.handler(*args, **kwargs)
~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.13/site-packages/azure/cli/core/commands/command_operation.py", line 120, in handler
return op(**command_args)
File "/opt/az/lib/python3.13/site-packages/azure/cli/command_modules/resource/custom.py", line 802, in validate_arm_template_at_tenant_scope
return _deploy_arm_template_at_tenant_scope(cmd=cmd,
template_file=template_file, template_uri=template_uri, parameters=parameters,
...<2 lines>...
template_spec=template_spec, query_string=query_string,
validation_level=validation_level)
File "/opt/az/lib/python3.13/site-packages/azure/cli/command_modules/resource/custom.py", line 831, in _deploy_arm_template_at_tenant_scope
raise_subdivision_deployment_error(err_message, err.error.code if err.error else None)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.13/site-packages/azure/cli/core/commands/arm.py", line 104, in raise_subdivision_deployment_error
raise DeploymentError(error_message)
azure.cli.core.azclierror.DeploymentError: {"code": "LocationNotAvailableForDeployment", "message": "The provided location 'West Europe' is not available for deployment. List of available regions is 'WESTEUROPE,NORTHEUROPE'."}
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/az/lib/python3.13/site-packages/azure/cli/core/commands/arm.py", line 109, in handle_template_based_exception
raise CLIError(ex.inner_exception.error.message)
^^^^^^^^^^^^^^^^^^
AttributeError: 'DeploymentError' object has no attribute 'inner_exception'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/az/lib/python3.13/site-packages/knack/cli.py", line 233, in invoke
cmd_result = self.invocation.execute(args)
File "/opt/az/lib/python3.13/site-packages/azure/cli/core/commands/init.py", line 682, in execute
raise ex
File "/opt/az/lib/python3.13/site-packages/azure/cli/core/commands/init.py", line 812, in _run_jobs_serially
results.append(self._run_job(expanded_arg, cmd_copy))
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.13/site-packages/azure/cli/core/commands/init.py", line 804, in _run_job
return cmd_copy.exception_handler(ex)
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^
File "/opt/az/lib/python3.13/site-packages/azure/cli/core/commands/arm.py", line 114, in handle_template_based_exception
raise CLIError(ex)
knack.util.CLIError: {"code": "LocationNotAvailableForDeployment", "message": "The provided location 'West Europe' is not available for deployment. List of available regions is 'WESTEUROPE,NORTHEUROPE'."}
ERROR: {"code": "LocationNotAvailableForDeployment", "message": "The provided location 'West Europe' is not available for deployment. List of available regions is 'WESTEUROPE,NORTHEUROPE'."}
ERROR: {"code": "LocationNotAvailableForDeployment", "message": "The provided location 'West Europe' is not available for deployment. List of available regions is 'WESTEUROPE,NORTHEUROPE'."}
INFO: exit code: 1
INFO: Command ran in 7.803 seconds (init: 0.132, invoke: 7.671)
Expected behavior
Deployment running as normal. Yesterday this was working fine and there we're no changes on our end.
Environment Summary
/usr/bin/az version
{
"azure-cli": "2.84.0",
"azure-cli-core": "2.84.0",
"azure-cli-telemetry": "1.1.0",
"extensions": {
"azure-devops": "1.0.2"
}
}
Additional context
No response