An Azure networking service that is used to provision private networks and optionally to connect to on-premises datacenters.
Welcome to Microsoft Q&A
Hello @Architecting Cloud , I hope you are doing well.
Thank you for providing the detailed troubleshooting steps. Based on your description, you've already verified that:
- The resource group contains only the Virtual Network.
- All Microsoft.App managed environments and Container Apps have been deleted.
- There are no remaining NICs or other dependent resources.
- The subnet still contains the
legionservicelinkService Association Link withallowDelete=false. - The subnet delegation cannot be removed because the Service Association Link still exists.
Given these findings, this does not appear to be a customer configuration issue. Instead, it points to an orphaned Service Association Link (SAL) that was not cleaned up when the Microsoft.App managed environment was deleted.
The circular dependency you described in this scenario:
- The subnet cannot be deleted because the SAL exists.
- The delegation cannot be removed because the SAL references it.
- The SAL cannot be deleted because it is a managed resource (
allowDelete=false).
As a final validation, you can confirm there are no remaining delegated resources by checking:
If the output still shows the legionservicelink and no corresponding Microsoft.App/environments resource exists, that further indicates the Service Association Link has become orphaned.
References:
If my answer helped you, please consider marking it as accepted. This helps others in the community find similar solutions.