I am using the Azure CLI to create a Container App Environment, and a virtual network.
I followed the instructions here
https://video2.skills-academy.com/en-us/azure/container-apps/vnet-custom?tabs=bash%2Cazure-cli&pivots=azure-cli
These are the commands I used...
az network vnet create --resource-group rg-block-trucks --name vnet-block-trucks --location westus2 --address-prefix 10.0.0.0/16
az network vnet subnet create --resource-group rg-block-trucks --vnet-name vnet-block-trucks --name subnet-block-trucks --address-prefixes 10.0.0.0/21
az containerapp env create --name cae-block-trucks --resource-group rg-block-trucks --location westus2 --infrastructure-subnet-resource-id /subscriptions/0baece7a-8562-4d41-b4f9-bd83f016df1f/resourceGroups/rg-block-trucks/providers/Microsoft.Network/virtualNetworks/vnet-block-trucks/subnets/subnet-block-trucks
As you can see, I am specifying a resource group rg-block-trucks
, every time, I would assume Azure would create any associated resources in this same resource group?
I also set the default resource group using az configure
, so my az config get defaults
returns...
[
{
"name": "group",
"source": "C:\\Users\\greg\\.azure\\config",
"value": "rg-block-trucks"
},
{
"name": "location",
"source": "C:\\Users\\greg\\.azure\\config",
"value": "westus2"
}
]
But Azure creates the following two resources, in this new random group that I never asked for...
Load Balancer - ME_cae-block-trucks_rg-block-trucks_west
Public IP - ME_cae-block-trucks_rg-block-trucks_west
How do I force it to create any associated resources in my rg-block-trucks resource group?
Note : I am unable to move these resources into my resource group.
Thanks!