Skip to content

[Issue] When customizing container resources, error message is generic #107

Description

@brunoborges

I've updated the Bicep configuration to include memory and CPU requests for Azure Container Apps.

Accidentally (yay YAML) the value inputed was ' 2Gi' (with a whitespace in the beginning of the value).

The command and provision fails with the following error:

$ azd provision
Provisioning Azure resources can take some time.

You can view detailed progress in the Azure Portal:
https://portal.azure.com/#blade/HubsExtension/DeploymentDetailsBlade/overview/id/%2Fsubscriptions%2F<redacted>%2Fproviders%2FMicrosoft.Resources%2Fdeployments%2Ftodo-nodejs-mongo

Created Azure resources

Error: deployment failed: failed deploying: failed running az deployment sub create: 

Deployment Error Details:
InvalidTemplateDeployment: The template deployment 'todo-nodejs-mongo' is not valid according to the validation procedure. The tracking id is 'f4288268-3e40-4521-a2f9-69d8385f3a04'. See inner errors for details.

Only after enabling --debug I could identify the real problem:

Inner Errors: 
{"code": "ContainerAppInvalidMemoryResource", "message": "Container with name 'main' has an invalid memory resource request: ' 2Gi'. The 'memory' field for each container, if provided, must contain a decimal value to no more than 2 decimal places followed by 'Gi' to denote the unit (Gibibytes). Example: '1.25Gi' or '2Gi'."}

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions