We know open source can work really well, that is, it can reach an economically sustaining level, such as linux the kernel. A characteristic is that no one entity controls the source de facto, and that competitors collaborate (such as when a maintainer working for Intel processes a pull request from AMD as a matter of course). Those firms use linux as a brick in the wall of their business. To do what they do, there must be an OS, and it turns out to be much cheaper to contribute to Linux than to build one from scratch, and linux has such momentum that even if you did have your own OS, customers are going to demand that it works with Linux.
It doesn't always work. It's hard to see how it makes sense for a business which exists to develop a software product can make money by giving it away for free. If you try to monetise it by hosting servers, then you are a competing with AWS. You could sell consulting services, but that doesn't scale so it won't get much VC funding.And yet, postgresql and mariadb are open source, and then there is sqlite, which is simply public domain. It might be that ultimately the biggest incompatibility with open source is not the software but the funding model. How can open source deliver the high returns the VC Investors demand? But not just any software can offer these big returns. Is any database product innovative enough to have such barriers to entry that millions of users feel they have to pay for it?
Terraform may be different, it seems a more complex area where it has a more distinct offer. But on the other hand, the large cloud providers who make good money by hosting kubernetes may decide that something like terraform is worth investing in to win the hosting business, in the same way they all invest in Linux or Python. It looks like open source works well when it plays an enabling role for some added value where there is a barrier to entry, but is not the added value itself. One of the most obvious examples is hardware: Linux grew because it was a great way of selling servers. There is more open hardware than ever before: android, drones, Raspberry PI, soon there will be Risc V everywhere, automobile maybe; I'd say just on that basis open source looks fine.
An interesting case study could be the firewall pfsense. This is router/firewall used by a hardware firm to help sell devices. That sounds like a classic open source story. There are even easy services you can sell on top, such as subscriptions to the latest packet filtering rules, or 24x7 service. They don't have VC funding, as far as I know. But Netgate has told everyone that the community version is close to end of life. When they announced that, they offered small users a free licence to the new proprietary version, and a year or so later, now you have to pay for it. It's been a bad experience. Maybe the problem is that router hardware is so commoditised they can't make margin on it (more and more firewalls run on virtualised hardware) ,so they are pivoting to be a software firm now. Developers have to be paid,this is just people trying to work out how to be financially sustainable.