Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New required options for az container create command #4812

Open
estokes-vs opened this issue Nov 26, 2024 · 1 comment
Open

New required options for az container create command #4812

estokes-vs opened this issue Nov 26, 2024 · 1 comment

Comments

@estokes-vs
Copy link

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 '<null>' is invalid. The value must be one of 'Windows,Linux'.
Code: InvalidOsType
Message: The 'osType' for container group '<null>' 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

@dbradish-microsoft

Document Id

ba32e12d-8283-f980-e1d0-1ca2a75a5152

@PesalaPavan
Copy link

@estokes-vs
Thanks for your feedback! We will investigate and update as appropriate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants