[Microsoft.App/containerApps@2023-05-01]: The property "cpu" expected a value of type "int | null" but the provided value is of type "'0.5'".
- Dominant language
- TypeScript
- Stars
- 108
- Forks
- 44
- Avg merge
- 18h 53m
- Merged PRs (30d)
- 29
Description
### Resource Type
Microsoft.App/containerApps
### Api Version
2023-05-01
### Issue Type
Inaccurate property type(s)
### Other Notes
Maybe this type should just be a string, since Bicep doesn't support double?
At the very least, the value is valid so the warning should not appear.
### Bicep Repro
```
resource containerApp 'Microsoft.App/containerApps@2023-05-01' = {
name: 'TodoApp'
location: location
identity: {
type: 'SystemAssigned'
}
properties: {
managedEnvironmentId: ace.id
configuration: {
dapr: {
enabled: false
}
}
template: {
containers: [
{
name: 'TodoAppContainer'
image: 'mcr.microsoft.com/azuredocs/containerapps-helloworld:latest'
resources: {
cpu: '0.5'
memory: '1Gi'
}
}
]
}
}
```
### Confirm
- [X] I have read the troubleshooting guide and looked for duplicates.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the Microsoft.App/containerApps@2023-05-01 definition and the supplied Bicep repro, checking how the cpu property is typed. Confirm the expected behavior for the '0.5' value and update the definition so the valid repro no longer produces the warning; verify with the same repro.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, typescript
- Domain
- cloud, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100