All the tools described are declarative.
If "directly calling service API's makes the agent running the tool a SPOF" is a "bad" for Terraform, it also must be for Pulumi.
The idea that one "need[s] to be connected to, and have credentials for your environment to develop" to use Pulumi is equally true of Terraform, assuming by "credentials" you mean "credentials for the target provisioning platform".
The idea that "running your code requires bi-directional communication with the pulumi GRPC api" is also untrue.
It's important to be accurate when making these kinds of comparisons, lest you fuel memes instead of providing insight.
I've added the "agent SPOF", and "credentials" concern to Pulumi as well, it was an oversight.
Admittedly, my experience with Pulumi is pretty small, but I don't think I'm wrong about it needing a connection the pulumi parent process.
In-fact I opened an issue with Pulumi about problems with this in 2019, and they still haven't closed it.
You are correct there is an engine - I mistakenly mistook that as criticism of the default state back end, which is not required.
A system could be said to have a declarative execution model if its input is a description of a desired result and that system then decides for itself what sequence of side-effects to perform to achieve that result. Terraform, CloudFormation, and Pulumi are all declarative by this definition.
However, there's also the question of how you tell the system how to build that data structure in the first place. CloudFormation and Terraform both do so with some form of DSL, with the effect that the source program perhaps more directly corresponds with the data structure it produces. Pulumi instead uses general-purpose languages to generate the data structure, and so the source code that produces it can, if desired, bare very little direct resemblance to the resulting data structure.
The tradeoff here then seems to be more about how far removed the input shape is from the resulting declarative data structure, rather than about "declarative or not". Some folks prefer the input to more directly match the underlying model, while others prefer to intentionally abstract away those details behind a higher level API.
I don't think either is right or wrong... I actually wish these two approaches were complementary inside the same product rather than two companies trying to kick each other in the shins, but that's capitalism for you, I guess.
Terraform
- (bad) HCL sucks, not a programming language.
- (good) One tool for multiple service providers is nice.
- (good) Fully open source.
- (good) directly calling service API's makes it more debuggable, and greater control over performance/time of deployments
- (bad) directly calling service API's makes the agent running the tool a SPOF
Cloudformation
- (bad) YAML sucks, not a programming language.
- (good) managed service, doesn't require an agent to run the deployment
- (bad) often slow, no visibility into what it's doing under the hood
- (bad) AWS specific(yes I know about public registry, but it still requires AWS)
Pulumi
- (good) can use an actual real programming language!!
- (bad) directly calling service API's makes the agent running the tool a SPOF
- (bad) need to be connected to, and have credentials for your environment to develop
- (bad) running your code requires bi-directional communication with the pulumi GRPC api
CDK
- (good) can use an actual real programming language!!
- (good) produces a declarative output
- (bad) dependent on cloudformation
- (unknown) CDK for terraform(I haven't tried this, but it sounds promising)
I don't think we yet have the tool we need, but CDK is pretty close, having a real programming language, that produces a declarative intermediate format, that is then ran by another system, I think is the right approach.