Can not use "--network-profile" with IP address type "Public"
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 3.5k
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 60
Description
## Describe the bug
Even with `--ip-address Private` i'm getting error message that IP address type is "Public"
Location: West Europe
**Command Name**
`az container create`
**Errors:**
```
Can not use "--network-profile" with IP address type "Public".
```
## To Reproduce:
- Create or have an existing networking profile pointing to a specific subnet inside VNET
- `az container create --resource-group myresourcegroup --ip-address Private --name testcli --image nginx --network-profile profilename`
## Expected Behavior
Container is created.
## Environment Summary
```
Windows-10-10.0.19041-SP0
Python 3.6.8
Installer: MSI
azure-cli 2.18.0
Extensions:
azure-devops 0.18.0
```
## Additional Context
I swear this used to work. Below is the details of the networking profile.
```
[
{
"containerNetworkInterfaceConfigurations": [
{
"containerNetworkInterfaces": [
{
"id": "***",
"resourceGroup": "myresourcegroup"
},
{
"id": "***",
"resourceGroup": "myresourcegroup"
}
],
"etag": "W/\"f993fb7a-d846-48f4-9fb7-4cc70b9f8691\"",
"id": "***",
"ipConfigurations": [
{
"etag": "W/\"f993fb7a-d846-48f4-9fb7-4cc70b9f8691\"",
"id": "***",
"name": "ci_subnet_ipconf",
"provisioningState": "Succeeded",
"resourceGroup": "myresourcegroup",
"subnet": {
"addressPrefix": null,
"addressPrefixes": null,
"delegations": null,
"etag": null,
"id": "***",
"ipAllocations": null,
"ipConfigurationProfiles": null,
"ipConfigurations": null,
"name": null,
"natGateway": null,
"networkSecurityGroup": null,
"privateEndpointNetworkPolicies": null,
"privateEndpoints": null,
"privateLinkServiceNetworkPolicies": null,
"provisioningState": null,
"purpose": null,
"resourceGroup": "vnet-resource-group",
"resourceNavigationLinks": null,
"routeTable": null,
"serviceAssociationLinks": null,
"serviceEndpointPolicies": null,
"serviceEndpoints": null
},
"type": "Microsoft.Network/networkProfiles/containerNetworkInterfaceConfigurations/ipConfigurations"
}
],
"name": "ci_subnet_cni",
"provisioningState": "Succeeded",
"resourceGroup": "myresourcegroup",
"type": "Microsoft.Network/networkProfiles/containerNetworkInterfaceConfigurations"
}
],
"containerNetworkInterfaces": [
{
"container": {
"id": "",
"resourceGroup": "myresourcegroup"
},
"containerNetworkInterfaceConfiguration": {
"containerNetworkInterfaces": null,
"etag": null,
"id": "***",
"ipConfigurations": null,
"name": null,
"provisioningState": null,
"resourceGroup": "myresourcegroup",
"type": null
},
"etag": "W/\"f993fb7a-d846-48f4-9fb7-4cc70b9f8691\"",
"id": "***",
"ipConfigurations": [],
"name": "bec970e9-3411-4377-9960-ef1492f790d2_ci_subnet_cni",
"provisioningState": "Succeeded",
"resourceGroup": "myresourcegroup",
"type": "Microsoft.Network/networkProfiles/containerNetworkInterfaces"
},
{
"container": {
"id": "***",
"resourceGroup": "myresourcegroup"
},
"containerNetworkInterfaceConfiguration": {
"containerNetworkInterfaces": null,
"etag": null,
"id": "***",
"ipConfigurations": null,
"name": null,
"provisioningState": null,
"resourceGroup": "myresourcegroup",
"type": null
},
"etag": "W/\"f993fb7a-d846-48f4-9fb7-4cc70b9f8691\"",
"id": "***",
"ipConfigurations": [],
"name": "63beb899-e461-4a7b-a70e-20e9fc4ccd40_ci_subnet_cni",
"provisioningState": "Succeeded",
"resourceGroup": "myresourcegroup",
"type": "Microsoft.Network/networkProfiles/containerNetworkInterfaces"
}
],
"etag": "W/\"f993fb7a-d846-48f4-9fb7-4cc70b9f8691\"",
"id": "***",
"location": "westeurope",
"name": "profilename",
"provisioningState": "Succeeded",
"resourceGroup": "myresourcegroup",
"resourceGuid": "***",
"tags": {},
"type": "Microsoft.Network/networkProfiles"
}
]
```
Contributor guide
Assessment
This issue has not been assessed yet.