> So returning to the original question: why doesn't Terraform use an existing language? So far, I've not yet encountered an existing language runtime which contains the building blocks Terraform uses in order to keep the plan-related promises. That sure does sound like the author believes "pulumi preview" shouldn't ever work
Well... It's just my own personal opinion, but writing Pulumi code (be it Go or Python) feels like I'm writing a program that emits some Terraform-like code (conceptually, not the actual shape) under the hood and runs an interpreter afterwards. I've used that mode of operation because I needed to continuously update infrastructure to match database updates - there's another and probably more mainstream option is that…
Unknown Values: The Secret to Terraform Plan
11–20 of 22 posts
Re: Unknown Values: The Secret to Terraform Plan
#12> So returning to the original question: why doesn't Terraform use an existing language? So far, I've not yet encountered an existing language runtime which contains the building blocks Terraform uses in order to keep the plan-related promises. That sure does sound like the author believes "pulumi preview" shouldn't ever work
Does anyone have any experiences with Pulumi to share?
Personally, I see the landscape like this: If you like CloudFormation templates, then Terraform is a better version of that. Especially as it’s workflows are very similar. If you like, or want, CDK then Pulumi will make you very happy, as it’s a much better version of that. Pulumi in particular makes some alternate patterns possible, e.g. using the integrated secret management, that give you more flexibility with how you approach your project.
As a side note, Pulumi is actively working with the community, accepting PRs, etc. and new provider APIs generally are available when they release. This may influence your decision, or not.
Re: Unknown Values: The Secret to Terraform Plan
#13> So returning to the original question: why doesn't Terraform use an existing language? So far, I've not yet encountered an existing language runtime which contains the building blocks Terraform uses in order to keep the plan-related promises. That sure does sound like the author believes "pulumi preview" shouldn't ever work
Well... It's just my own personal opinion, but writing Pulumi code (be it Go or Python) feels like I'm writing a program that emits some Terraform-like code (conceptually, not the actual shape) under the hood and runs an interpreter afterwards. I've used that mode of operation because I needed to continuously update infrastructure to match database updates - there's another and probably more mainstream option is that…
Terraform's 0.12 release[0] was the shining light realization for me that Pulumi's was absolutely the better paradigm. When you start adding expressions, type systems, and ad-hoc iteration primitives to a DSL, you probably should be using a fully powered programming language.
As far as what is kind of offputting to you, I argue that of the two of them Pulumi is the only one with a shot of not doing it the write-it-out-to-text way. Building a representation of desired state is necessary to achieve the goals of both tools -- Pulumi gives you exposure to the objects that make up the tool in your programming language of choice, before they get serialized.
Another key innovation of Pulumi is that you can build those objects and abstractions much easier (IMO) than with TF (i.e. writing a provider), and you can build them with the tooling you're familiar with -- if you're using a supported pulumi language.
[0]: https://vadosware.io/post/setting-up-ses-with-pulumi/
[1]: https://www.hashicorp.com/blog/announcing-terraform-0-12
[0]: https://www.hashicorp.com/blog/announcing-terraform-0-12
Re: Unknown Values: The Secret to Terraform Plan
#14> So returning to the original question: why doesn't Terraform use an existing language? So far, I've not yet encountered an existing language runtime which contains the building blocks Terraform uses in order to keep the plan-related promises. That sure does sound like the author believes "pulumi preview" shouldn't ever work
Well... It's just my own personal opinion, but writing Pulumi code (be it Go or Python) feels like I'm writing a program that emits some Terraform-like code (conceptually, not the actual shape) under the hood and runs an interpreter afterwards. I've used that mode of operation because I needed to continuously update infrastructure to match database updates - there's another and probably more mainstream option is that…
Re: Unknown Values: The Secret to Terraform Plan
#15there is absolutely no reason why you shouldn't be able to express your definition in python, or ruby or json.
anyone remember Vagrant? Where you could write your config is a Ruby DSL and could drop into Ruby whenever you wanted to do something "special"?
Re: Unknown Values: The Secret to Terraform Plan
#16The section about promises is weird. Why would you do that? It's clearly a far better match for the kind of symbolic computation stuff lisp is famous for and functional languages in general tend to be good at, and that compilers often have to deal with (which being why those languages are so good at them). Heck, the article even mentions that `plan` is basically a compiler.
Re: Unknown Values: The Secret to Terraform Plan
#17Earlier quoted context omitted.
I want so badly to use pulumi's tools, but relying on them as a 3rd party service is just not acceptable to me.
Just found out they do support alternative state backends like Terraform does.
EDIT: Should mention that enabling bucket versioning here is also a little cherry on top (to me).
Re: Unknown Values: The Secret to Terraform Plan
#18> So returning to the original question: why doesn't Terraform use an existing language? So far, I've not yet encountered an existing language runtime which contains the building blocks Terraform uses in order to keep the plan-related promises. That sure does sound like the author believes "pulumi preview" shouldn't ever work
Does anyone have any experiences with Pulumi to share?
Re: Unknown Values: The Secret to Terraform Plan
#19I suspect you could implement this as a Haskell DSL. The discussion part where you are not allowed (from Terraform lang) to create behavior dependent on the actual values of "Unknown" values (to prevent an ambiguous / non-deterministic plan), reminds of Applicatives vs Monads a bit. (Sketchy potentially non-100% true illustration ahead) For example, if you write a command-line parsing library using a Monad, then the…
...but maybe you don't need to go as far as Haskell. Any language with generics could work, like Java. (Or well, void pointers or anonymous interfaces..). Just make sure the user-written plan code doesn't get any meaningful info about the unknown values, only able to pass it around.
EDIT: and note that Pulumi has language targets in C#, Typescript, golang, and Python
Re: Unknown Values: The Secret to Terraform Plan
#20> So returning to the original question: why doesn't Terraform use an existing language? So far, I've not yet encountered an existing language runtime which contains the building blocks Terraform uses in order to keep the plan-related promises. That sure does sound like the author believes "pulumi preview" shouldn't ever work
Does anyone have any experiences with Pulumi to share?