I could not spot equivalent feature in pulumi cli....
# getting-started
l
I could not spot equivalent feature in pulumi cli. did I overlook it?
b
it is not currently possible: https://github.com/pulumi/pulumi/issues/2318 terraform is more deterministic and it is easier for a terraform plan to know exactly what is going to be created. pulumi allows for more custom logic which is great for flexibility but makes it harder to be fully deterministic
it is on their "Pulumi Roadmap" as planned though, so it is on their radar
l
Thanks for the info!
b
terraform is more deterministic and it is easier for a terraform plan to know exactly what is going to be created. pulumi allows for more custom logic which is great for flexibility but makes it harder to be fully deterministic
Sorry to "well actually" you, but... well actually, Pulumi is declarative, but you describe the end state using imperative languages. one of m'colleagues wrote this excellent post on it
You're correct in saying that we don't have the equivalent to the ability to output the plan in TF, but you can see (in the preview) exactly what you're going to deploy / update / delete
b
hah! oh yeah agreed - i call pulumi declarative! just the fact that it is possible to perform arbitrary actions in a .Apply makes it so you could write code that is not deterministic, and also hard to serialize into a plan file
very nice article too 💯
when i was first switching from terraform to pulumi, my mental model of how pulumi works was that you use an imperative language to essentially generate your declarative terraform HCL files
e
'apply' does make supporting something like plan difficult. non-determinism is always bad, but apply is tricky because you could create resources inside apply which it's impossible for the engine to see at preview time.
💯 1
h
Thanks for this thread. That blog post was great.