GitHub Copilot Customization Explained for Beginners: Instructions, Prompt Files, Skills, Agents, and Hooks  Introduction If you've recently started using GitHub Copilot, you've probably come across terms like Instructions , Prompt Files , Skills , Agents , and Hooks . At first glance, they all seem to do the same thing—they tell Copilot what to do. So why does GitHub have five different customization features? The answer is simple: each feature solves a different problem. Think of GitHub Copilot as a new developer joining your team. On their first day, you don't just hand them code. You explain your coding standards, give them reusable templates, teach them specialized knowledge, assign them a role, and automate repetitive tasks. That's exactly how GitHub Copilot customization works. In this article, you'll learn what each feature does, when to use it, and how they all work together. By the end, you'll know which feature to start with and which ones can wait un...

Troubleshooting - Issue in deleting a network profile associated to ACI

Recently I tried deleting a resource group (RG) having Azure Container Instance (ACI) resources which was secured using VNet. I couldn’t get RG deleted completely due to an error related to VNet delete (internally its associated to Network Profile). Then I googled a bit and found this is a common issue where most of the people reported in different forums like GitHub, Stack-overflow etc.

In this blog post I will be covering what is the option to resolve the above issue. Firstly, let me show what is the error you will be seeing in the above scenario.

Subnet raju-subnet-web-dev is in use by 
/subscriptions/XXXSubscriptionIdXXX/resourceGroups/raju-rg-dev/providers/Microsoft.Network/
networkProfiles/aci-network-profile-raju-vnet-dev-subnet-web-dev/
containerNetworkInterfaceConfigurations/eth0/ipConfigurations/ipconfigprofile 
and cannot be deleted.In order to delete the subnet, delete all the resources within the subnet. 
See aka.ms/deletesubnet.

With Error Code: InUseSubnetCannotBeDeleted

Operation name : Delete Virtual Network

At First instance I followed the Microsoft documentation which is mentioned here but no luck. Script that worked for me is documented below. Root cause for the above error message is after deleting the container group, Network profile is still left over which is associated to VNet. Until Network profile is not deleted it doesn't allow VNet to be removed which in-turns holds your resource group from deleting.

# Replace <your resource group> with the name of your resource group
RES_GROUP=<your resource group>

# Replace <vnet_name> with the name of your VNet name
VNET_NAME=<vnet_name>

# Replace <subnet_name> with the name of your subnet name
SUBNET_NAME=<subnet_name>

# Get network profile ID
NETWORK_PROFILE_ID=$(az network profile list --resource-group $RES_GROUP --query [0].id --output tsv)

Now update the containerNetworkInterfaceConfigurations property in Network profile properties to an empty list (Work around option)

#Update containerNetworkInterfaceConfigurations 
az resource update --ids $NETWORK_PROFILE_ID --set properties.containerNetworkInterfaceConfigurations=[]

# Delete the network profile
az network profile delete --id $NETWORK_PROFILE_ID -y
 
# Delete the subnet
az network vnet subnet delete --resource-group $RES_GROUP --vnet-name $VNET_NAME --name $SUBNET_NAME

# Delete virtual network
az network vnet delete --resource-group $RES_GROUP --name $VNET_NAME

Finally, now you can go ahead and delete your required resource group which was held due to network profile.

References

 


Comments

Popular posts from this blog

Tidy up - Unused Project and Nuget package reference using Visual Studio 2019

Azure Front Door vs Azure Traffic Manager?

Authenticate Azure Functions - API Keys