It didn't happen the first couple times I did it, but for the last month or so it happens every single time. I thought it was something wrong with the DBFlow so I made it simpler and simpler and it still didn't work. I tried copying one that is already there but that didn't work either - so then I asked. The only thing I might have done between when it worked and now is get a newer version of the provider (I don't remember for sure) so I could try getting whatever the newer version is and see if that works...
I have our architect team looking into this too as the architect import piece that CX as Code calls is owned by them. Are you running a really long running deploy. Just curious. Also what version of the provider are using.
I can't use a tagged version as I have added the external organizations to it. So I just now downloaded the newest provider code and compiled it - it still creates the error.
The Terraform file isn't that big and the only items that need updating are the DBFlow and the Flow that calls it. It is just a small DBFlow.so I didn't expect an error because of the size:
Ok, so I did a terraform destroy and got rid of everything and then I did a terraform apply to recreate everything and that worked. When I did the apply the main DB flow had errors which it told me about and I fixed but I don't think that's the problem I had earlier because the simple DB Flow I tried when earlier didn't have anything inside and it still didn't work. So, I figure it was just confused and destroying and recreating everything instead of updating was the answer.