Skip to content

[BUG] AppContainerResources.Cpu is serialized as string where Bicep expects a number #49687

Open
@sebastienros

Description

@sebastienros

Library name and version

Azure.Provisioning.AppContainers 1.0.0

Describe the bug

ContainerAppContainer container = app.Template.Containers.Single().Value!;
container.Resources.Cpu = 0.26;
container.Resources.Memory = "200Mi";

Will produce this Bicep

  resources: {
    cpu: '0.26'
    memory: '200Mi'
  }

Also, the decimal separator is dependent on the current culture where I believe all bicep serialization code should be culture-insensitive.

Expected behavior

Use a number instead of a string

Actual behavior

Serializes a string instead of a number

Reproduction Steps

Generate the bicep for a container app with a Cpu value other than the default.

Environment

No response

Metadata

Metadata

Assignees

Labels

ClientThis issue points to a problem in the data-plane of the library.Provisioningcustomer-reportedIssues that are reported by GitHub users external to the Azure organization.needs-team-attentionWorkflow: This issue needs attention from Azure service team or SDK teamquestionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions