Microsoft.App/containerApps@2022-10-01: JSON string not understood
- Dominant language
- TypeScript
- Stars
- 108
- Forks
- 44
- Avg merge
- 18h 53m
- Merged PRs (30d)
- 29
Description
### Resource Type
Microsoft.App/containerApps
### Api Version
2022-10-01
### Issue Type
Inaccurate property type(s)
### Other Notes
See https://learn.microsoft.com/en-us/azure/templates/microsoft.app/2022-10-01/containerapps?pivots=deployment-language-bicep.
Property CPU:
```
resources: {
cpu: json('decimal-as-string')
memory: 'string'
}
```
CPU can be decimal or string but when we use decimal-as-string in VS Code, it complains with warning:
> The property "cpu" expected a value of type "int | null" but the provided value is of type "'0.25'".
The resource provider actually accepts it.
### Bicep Repro
_No response_
### Confirm
- [X] I have read the troubleshooting guide and looked for duplicates.
Contributor guide
No contributing guide indexed for this repository
Research direction
Search the type definition for Microsoft.App/containerApps at API version 2022-10-01 and inspect the CPU property declaration. Confirm the accepted resource-provider values against the linked Azure template documentation, then update the definition and verify that the VS Code warning no longer rejects a decimal-as-string value.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100