Customer feedback | az container create | New required options for az container create command
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 3.5k
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 60
Description
### Type of issue
Other (describe below)
### Reference command name
az container create
### Feedback
This GitHub issue is being moved from MicrosoftDocs/azure-docs-cli [4812](https://github.com/MicrosoftDocs/azure-docs-cli/issues/4812).
**************************************
### Type of issue
Outdated article
### Feedback
We ran into multiple errors this morning while rolling out routine updates to our Azure Container instances. We use the command `az container create` to deploy new sets of containers, and an example of this is below.
```
az container create \
--resource-group \
--name \
--image \
--restart-policy \
--location \
--command-line \
--environment-variables \
--memory \
--registry-username \
--registry-password \
--only-show-errors
```
This morning we got errors for multiple new items needing to be added, which are not documented as `required`.
--os-type
```
ERROR: (InvalidOsType) The 'osType' for container group '' is invalid. The value must be one of 'Windows,Linux'.
Code: InvalidOsType
Message: The 'osType' for container group '' is invalid. The value must be one of 'Windows,Linux'.
```
--cpu
```
ERROR: (ResourceSomeRequestsNotSpecified) The 'Cpu' request is not specified in 'MemoryInGB '6' Cpu ''' in container 'vergesense-analytics-backend-staging-sidekiq-1' of contain group 'vergesense-analytics-backend-staging-sidekiq-1'. It is required since API version '2017-07-01-preview'.
Code: ResourceSomeRequestsNotSpecified
Message: The 'Cpu' request is not specified in 'MemoryInGB '6' Cpu ''' in container 'vergesense-analytics-backend-staging-sidekiq-1' of contain group 'vergesense-analytics-backend-staging-sidekiq-1'. It is required since API version '2017-07-01-preview'.
```
It's worth noting that I was able to run these commands with Azure CLI 2.65.0 without issue, but once upgraded to 2.67.0 I encountered both errors.
### Page URL
https://learn.microsoft.com/en-us/cli/azure/container?view=azure-cli-latest#az_container_create
### Content source URL
https://github.com/MicrosoftDocs/azure-docs-cli/blob/main/latest/docs-ref-autogen/container.yml
### Author
_No response_
### Document Id
ba32e12d-8283-f980-e1d0-1ca2a75a5152
Contributor guide
Assessment
This issue has not been assessed yet.