Azure / Azure/azure-cli-extensions

Container Apps are always created in the wrong region (az containerapp compose create)

Open
#7,542 2 comments 0 reactions 0 assignees View on GitHub
Auto-Assign ContainerApp customer-reported question Service Attention
Dominant language
Python
Stars
454
Forks
1.7k
Avg merge
2d 19h
Merged PRs (30d)
64

Description

### Describe the bug

Even though, the location is stated in the az containerapp compose create command with southeastasia, but the Container Apps Environment and its Container Apps are always created in the WEST US 2 region as unexpectedly.

### Related command

az containerapp compose create -g ResourceGroupName --environment ContainerAppEnvName --location southeastasia

_OR_

az containerapp compose create -g ResourceGroupName --environment ContainerAppEnvName -l southeastasia

_OR_

az containerapp compose create -g ResourceGroupName --environment ContainerAppEnvName --location "Southeast Asia"

### Errors

The Container Apps Environment and its Container Apps are always created in the wrong region on Azure portal.

### Issue script & Debug output

cli.knack.cli: Command arguments: ['containerapp', 'compose', 'create', '-g', 'ResourceGroupName', '--environment', 'ContainerAppEnvName', '--location', 'Southeast Asia', '--compose-file-path', './docker-compose.yml', '--registry-server', 'acr.azurecr.io', '--registry-username', 'acr-username', '--registry-password', 'acr-pass', '--debug']
az_command_data_logger: extension name: containerapp
az_command_data_logger: extension version: 0.3.50
cli.azure.cli.core.commands: The behavior of this command has been altered by the following extension: containerapp
cli.azure.cli.core.sdk.policies: Request method: 'GET'
cli.azure.cli.core.sdk.policies: Request headers:
cli.azure.cli.core.sdk.policies: 'Accept': 'application/json'
cli.azure.cli.core.sdk.policies: 'CommandName': 'containerapp compose create'
cli.azure.cli.core.sdk.policies: 'ParameterSetName': '-g --environment --location --compose-file-path --registry-server --registry-username --registry-password --debug'
cli.azure.cli.core.sdk.policies: 'User-Agent': 'AZURECLI/2.59.0 (MSI) azsdk-python-core/1.28.0 Python/3.11.8 (Windows-10-10.0.22631-SP0)'
cli.azure.cli.core.sdk.policies: Request body:
cli.azure.cli.core.sdk.policies: This request has no body
cli.azure.cli.core.util: {"error":{"code":"ResourceNotFound","message":"The Resource 'Microsoft.App/managedEnvironments/ContainerAppEnvName' under resource group 'ResourceGroupName' was not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix"}}
cli.azext_containerapp.custom: Creating the Container Apps managed environment ContainerAppEnvName under ResourceGroupName in southeastasia.

### Expected behavior

The Container Apps Environment and its Container Apps should be created in the Southeast Asia region as stated in the az containerapp compose create command.

### Environment Summary

azure-cli 2.59.0
core 2.59.0
telemetry 1.1.0

**Extensions:**
aks-preview 3.0.0b5
azure-devops 1.0.0
containerapp 0.3.50

**Dependencies:**
msal 1.27.0
azure-mgmt-resource 23.1.0b2

### Additional context

The same issue happens also in Azure DevOps release pipelines.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.