Hi Stephen Emm,
Welcome to the Microsoft Q&A Platform! Thank you for asking your question here.
Sometimes, resource locks are applied to prevent accidental deletion. Ensure that there are no locks preventing the deletion of the container group or associated resources.
az lock list --resource-group <ResourceGroupName>
az lock delete --name <lock-name> --resource-group <ResourceGroupName>
Verify that all the associated resources (like networking resources, load balancers, storage accounts, etc.) are correctly deleted. Sometimes, the container instances are attached to a load balancer, and if it's still active or improperly configured, it can block the deletion.
az network lb list --resource-group <ResourceGroupName>
az network public-ip list --resource-group <ResourceGroupName>
could you please try forcefully delete the container instance group and see if it clears the error
az container delete --name cg-dbsak-argent --resource-group <ResourceGroupName> --yes --no-wait
Sometimes the container group might be in an intermediate state (e.g., stopping or restarting). Check if there are ongoing operations
az container show --name cg-dbsak-argent --resource-group <ResourceGroupName>
If there are pending operations or the status is not "Succeeded" or "Stopped," it might be stuck. You can try to stop it before attempting to delete again.
library(AzureContainers)
## Not run:
rg <- AzureRMR::get_azure_login()$ get_subscription("subscription_id")$ get_resource_group("rgname")
rg$delete_aci("mycontainer")
## End(Not run)
please refer this document
https://learn.microsoft.com/en-us/rest/api/container-instances/container-groups/delete?view=rest-container-instances-2023-05-01&tabs=HTTP
If it was helpful, please click "Upvote" on this post to let us know.
Thank You.
Thank you.