3 ms·
The tool takes in a data structure that doesn't encode any control flow. How that data structure is generated is a separate issue. I'm sure there are tools to i
by andreareina 4y ago
The tool takes in a data structure that doesn't encode any control flow. How that data structure is generated is a separate issue. I'm sure there are tools to imperatively generate whatever input Terraform needs (yaml?), does that make Terraform declarative as well?
Fundamentally the model is still: this is the state I want, and Pulumi figures out how to make that happen. Just like Terraform. The specification of that state can be static, fill-in-the-blank templated, or make use of imperative logic to build the final data structure. Just like Terraform, albeit one step removed because of the yaml intermediary.
Is it easier to write an imperatively-specified boondoggle of a state because of the direct access to an imperative runtime, sure. But that's against best practice and not what they're advocating here. Hell, I could hide the ternary behind a declarative interface (function) and then what's the difference between the imperative code hidden by my function and the imperative code hidden behind Pulumi's or Terraform's state evaluation and application functions?
- wokwokwok 4y agoI’m not asserting that terraform is declarative, or that pulumi and terraform are technically different. I’m saying, this article is about the pedantic definition of what it means to be declarative vs imperative. …and pedantically, if you’re partially imperative, you’re imperative. Otherwise, you’re choosing to redefine the terms to suit your convenience. Which you’re welcome to do too… but you can’t pedantically tell people they don’t know what a term means and redefine it to mean something convenient.