This has sadly been a known issue for quite a while. One day, the container apps team just introduced this circular dependency without versioning the change in a new API version, breaking the entire workflow. I raised this as an issue on the Pulumi Azure Native repo (
https://github.com/pulumi/pulumi-azure-native/issues/2117), but it was identified as an upstream issue, so I reported it there too (
https://github.com/microsoft/azure-container-apps/issues/525), but it still hasn't received any traction. I've encountered so many situations like this with the Container Apps team that I refactored my entire project just to migrate off of it. I honestly recommend you do the same.