Azure / Azure/azure-cli

Creating Container Instance in a Vnet causes a missing python module error

Open
#15,372 4 comments 2 reactions 0 assignees View on GitHub
act-observability-squad Container Instances Service Attention
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

### **This is autogenerated. Please review and update as needed.**

Attempting to create a container instance in a vnet generates a missing python module error

**Command Name**
az container create

**Errors:**
```
No module named 'azure.mgmt.network.v2018_08_01'
Traceback (most recent call last):
Temp\pip-unpacked-wheel-tuw8_17y\knack\cli.py, ln 215, in invoke
cli\core\commands\__init__.py, ln 654, in execute
cli\core\commands\__init__.py, ln 718, in _run_jobs_serially
cli\core\commands\__init__.py, ln 711, in _run_job
Local\Temp\pip-unpacked-wheel-cpn0gwyu\six.py, ln 703, in reraise
cli\core\commands\__init__.py, ln 688, in _run_job
cli\core\commands\__init__.py, ln 325, in __call__
azure\cli\core\__init__.py, ln 784, in default_command_handler
cli\command_modules\container\custom.py, ln 190, in create_container
cli\command_modules\container\custom.py, ln 286, in _get_vnet_network_profile
azure\mgmt\network\_network_management_client.py, ln 5336, in subnets
ModuleNotFoundError: No module named 'azure.mgmt.network.v2018_08_01'
```

## To Reproduce:
Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

- Configure a vnet, subnet, container registry and image
- `az container create --name {} --resource-group {} --registry-username {} --registry-password {} --image {} --location {} --vnet {} --subnet {}`

## Expected Behavior
create the container instance without an errror

## Environment Summary
```
Windows-10-10.0.18362-SP0
Python 3.6.8
Installer: MSI

azure-cli 2.12.1

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.