Create ACI with new VNET and new subnet may fail with invalid subnet range
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 3.5k
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 60
Description
**Describe the bug**
In a brand new resource group, run:
az container create -g demo1 -n australia-vnet --image yangl/netutils --vnet acivnet --subnet aci --vnet-address-prefix 10.0.188.0/24 --ip-address Private -l australiaeast
the CLI command assumed the subnet range to 10.0.0.0/24, and it won’t be accepted by NRP since the vnet has 10.0.188.0/24 ip range. It seems the command should require --subnet-address-prefix if --vnet-address-prefix is specified.
**To Reproduce**
In a brand new resource group, run:
az container create -g demo1 -n australia-vnet --image yangl/netutils --vnet acivnet --subnet aci --vnet-address-prefix 10.0.188.0/24 --ip-address Private -l australiaeast
**Expected behavior**
Fail with validation, since we cannot guess subnet range.
**Environment summary**
Cloud Shell
**Additional context**
Add any other context about the problem here.
Contributor guide
Assessment
This issue has not been assessed yet.