az network bastion create fails
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 3.5k
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 60
Description
### Describe the bug
#/bin/bash
RG='**azcy001**'
source conf/config.cfg
echo "Creating Public IP in resource group: $RG "
az network public-ip create --resource-group $RG --name $RG-bastion-ip --sku Standard --location westeurope -o table
echo ""
echo -e "Creating Bastion in $RG with "
az network bastion create --name $RG-bastion --public-ip-address $RG-bastion-ip --resource-group $RG --vnet-name **per001-vn001** --location westeurope -o table
echo ""
Fails with the following issues
/providers/Microsoft.Network/virtualNetworks/PER001-VN001
For som reason az network bastion, creates the request in all CAPS for the VNet name and the resource group.
### Related command
RG='azcy001'
az network bastion create --name $RG-bastion --public-ip-address $RG-bastion-ip --resource-group $RG --vnet-name per001-vn001 --location westeurope -o table
### Errors
(InvalidResourceReference) Resource /subscriptions/removed/resourceGroups/AZCY001/providers/Microsoft.Network/virtualNetworks/PER001-VN001 referenced by resource /subscriptions/removed/resourceGroups/azcy001/providers/Microsoft.Network/bastionHosts/azcy001-bastion was not found. Please make sure that the referenced resource exists, and that both resources are in the same region.
Code: InvalidResourceReference
Message: Resource /subscriptions/removed/resourceGroups/AZCY001/providers/Microsoft.Network/virtualNetworks/PER001-VN001 referenced by resource /subscriptions/removed/resourceGroups/azcy001/providers/Microsoft.Network/bastionHosts/azcy001-bastion was not found. Please make sure that the referenced resource exists, and that both resources are in the same region.
Exception Details: (NotFound) Resource /subscriptions/removed/resourceGroups/AZCY001/providers/Microsoft.Network/virtualNetworks/PER001-VN001 not found.
Code: NotFound
Message: Resource /subscriptions/removed/resourceGroups/**AZCY001**/providers/Microsoft.Network/virtualNetworks**/PER001-VN001 n**ot found.
### Issue script & Debug output
RG='azcy001'
az network bastion create --name $RG-bastion --public-ip-address $RG-bastion-ip --resource-group $RG --vnet-name per001-vn001 --location westeurope -o table
### Expected behavior
That resource group and vnet does not get all caps when running the command
### Environment Summary
azure-cli 2.49.0
core 2.49.0
telemetry 1.0.8
Extensions:
bastion 0.2.4
Dependencies:
msal 1.20.0
azure-mgmt-resource 22.0.0
### Additional context
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.