I've been looking at Terraform and know it's very powerful and mainstream.
My only issues:
HCL language is an interesting DSL, but would prefer just using a mainstream language, but I know CDKTF exists but this seems very young at the moment?
Terraform state, this deeply troubles me, I think HashiCorp has made a major architecture flaw, a permanent state shouldn't be ever needed in theory at least, however having ephemeral state that can be re-generated would be a good optimisation.
What alternatives are there that is:
EDIT
For all those downvoting, it's very amusing that you immediately jump to conclusions rather then actually explaining the problem at hand, if you don't actually know then better to just say so.
What no one has actually answered despite all the comments is WHY a disjointed state is required and then endlessly kept in sync (along with locks) with the real resources, when technically simply observing the real resources would actually negate the need to keep said disjointed state in sync in the first place . Only one comment has actually come half way to answering this.
So please instead of a tribalistic downvotes I would rather prefer well reasoned feedback?
And if such a tool doesn't exist, I guess I'll have to build one, I might as well since I'm already building a Kubernetes alternative 🤷♂️
EDIT 2
ok so now after reading some of the newer comments, it appears Terraform can import state if needed, however as some have explained the reason why state needs to be "captured" Terraforms side (the disjointed state) is that Terraform has no way of knowing what it has created and what has potentially been created outside of Terraform "out of band" or manually (technically it could use tagging/naming to embed the meta information, however not all resources actually have a tag/name, that's a physical limitation of the cloud provider)
Now this just raises another question:
The only issue of not being able to discern what is created by Terraform Vs what is created outside of it is ONLY an issue if you're not doing IaC in the first place.
Now we have a contradiction, if you say that Terraform is IaC then it doesn't matter as the declaration of resources in Terraform should be all that is, that would be true IaC.
If you say that it needs to consider non IaC defined resources then that by definition isn't IaC, you can't have it both ways!
EDIT 3:
so based on more comments, I've come to the following summary:
none of the existing tools are strictly IaC (but that's more due to a limitation of the existing cloud provider implementation) .
However while it's not technically pure/true IaC (see EDIT 2) if one ignores the disjointed state and pretends it doesn't it exists or is just an implementation detail, you could say it's "good enough IaC".
Anyway with that in mind, it seems at the moment Pulumi ticks both open source as well as using mainstream languages so that will be my focus for now.
Pulumi also uses state like Terraform so it's not perfect either (i.e not a true IaC) but that's the limitation we have to live with I guess?