Hello @Samuel Bradshaw !
The builder is a different resource from the app container. When this happens, you must first remove the builder and then remove the app environment container. To check if you have a pending builder, list the resources associated with your environment with the following command:
az resource list --namespace Microsoft.App --resource-type builders
You will probably receive a response with a resource like Microsoft.App/builders. To remove it, run the following command replacing <builder-resource-id>
with the builder id that you found in the query:
az rest --method delete --url <builder-resource-id>?api-version=2023-08-01-preview
The command will run in the background. Repeat the query until the builder resource stops returning. When the return is empty, proceed with deleting the app environment container:
az containerapp env delete -n MyContainerappEnvironment -g MyResourceGroup
And now you should be able to delete without any problems via command line or the portal. Be patient, as this command takes time to complete.