Azure / bicep-types-az

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

Azure Containee groups: MemoryInGb should support decimal values #1369

Open geckodesalpes opened 1 year ago

geckodesalpes commented 1 year ago

Resource Type

Microsoft.ContainerInstance/containerGroups

Api Version

2022-09-01

Issue Type

Inaccurate property type(s)

Other Notes

properties.containers. properties.resources.requests.memoryInGB schema should - I believe - support string type as requested memory can also be a decimal. i.e. 1.5Gb

Bicep Repro

resource apiContainerGroup 'Microsoft.ContainerInstance/containerGroups@2022-09-01' = {
...
  properties: {
    containers: [
      {
        ...
        properties: {
         ...
          resources: {
            requests: {
              memoryInGB: '1.5'
            }
          }
         }
       }
    ]
...
  }
}

Confirm

ghost commented 1 year ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @macolso. Please see https://aka.ms/biceptypesinfo for troubleshooting help.

Issue Details
### Resource Type Microsoft.ContainerInstance/containerGroups ### Api Version 2022-09-01 ### Issue Type Inaccurate property type(s) ### Other Notes `properties.containers. properties.resources.requests.memoryInGB` schema should - I believe - support `string` type as requested memory can also be a decimal. i.e. `1.5Gb` ### Bicep Repro ``` resource apiContainerGroup 'Microsoft.ContainerInstance/containerGroups@2022-09-01' = { ... properties: { containers: [ { ... properties: { ... resources: { requests: { memoryInGB: '1.5' } } } } ] ... } } ``` ### Confirm - [X] I have searched this repository and have not found similar issue reports.
Author: geckodesalpes
Assignees: -
Labels: `inaccuracy`, `RP: Microsoft.ContainerInstance`, `Service Attention`, `Container Instances`
Milestone: -
lawrencek76 commented 1 year ago

Note this also occurs for resource limits want to ensure that is also fixed with this one.

  properties: {
    containers: [
      {
        ...
        properties: {
         ...
          resources: {
            limits: {
              memoryInGB: '1.5'
            }
          }
         }
       }
    ]
LXBdev commented 2 weeks ago

Same for cpu cores, this supports decimal values as well. I used containerGroups@2024-05-01-preview

          resources: {
            requests: {
              memoryInGB: '0.2'
              cpu: '0.1'
            }
          }

Warning BCP036: The property "cpu" expected a value of type "int" but the provided value is of type "'0.1'". If this is an inaccuracy in the documentation, please report it to the Bicep Team.

Warning BCP036: The property "memoryInGB" expected a value of type "int" but the provided value is of type "'0.2'". If this is an inaccuracy in the documentation, please report it to the Bicep Team.