Azure / Azure/azure-cli

Customer feedback | az container create | New required options for az container create command

Open
#30,496 9 comments 0 reactions 0 assignees View on GitHub
act-observability-squad Auto-Assign Container Instances needs-triage Service Attention
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.