News for hackers. Stuff that matters.
Re:Terraform Scripting Concepts by kaydub on Monday January 03, 2022 @08:09AM (#29780390)
I hate seeing Terraform script or scripting. Am I the only one?
Re:Terraform Scripting Concepts by verdverm on Monday January 03, 2022 @08:24AM (#29780523)
What do you think of Pulumi?

My understanding is that this essentially uses TF as a backend

Re:Terraform Scripting Concepts by koblas on Monday January 03, 2022 @08:54AM (#29780760)
As a long time terraform user, I've been playing with a spare time project in Pulumi. TF and Pulumi share providers, but that's the extent of it.

My quick observations:

* It's nice to write TypeScript as the configuration language

* The provider documentation is poor and lacks the examples that terraform has, I find my self reading terraform documentation to understand how to configure Pulumi.

* You're constantly fighting with "async" vs "Input" vs "apply" when using a value, basic cases are handled in Pulumi but as soon as you want to do something complex you're toast. Maybe I just am doing it wrong, but that goes back to the lack of docs.

* How it handles dev/production/staging is just a little off from my expectations, not that terraform at it's core does this well either (why terragrunt exists).

Overall it's not bad, but it's not a silver bullet either to the typical problems. And suffers from a "small" community problem where you can't google solutions to problems with the same success.

Re:Terraform Scripting Concepts by jen20 on Monday January 03, 2022 @08:44AM (#29780690)
Your understanding is wrong. The CRUD logic of some commonly used providers is based upon that in Terraform providers, but the TF engine is not used by Pulumi.
Re:Terraform Scripting Concepts by manojlds on Monday January 03, 2022 @08:43AM (#29780679)
This = Pulumi?

It doesn't use TF as a backend. It builds on top of Terraform providers in many cases.

Re:Terraform Scripting Concepts by 0x445442 on Monday January 03, 2022 @08:41AM (#29780666)
No you’re not the only one. The problem with Terraform “Scripting” is in a lot of cases it takes a loooong time to find out your “runtime” errors. These are typically fat fingered strings. I think something like AWS CDK, where you find these errors at compile, time is a better approach.
Re:Terraform Scripting Concepts by w1nt3rmut3 on Monday January 03, 2022 @08:58AM (#29780795)
Re:Terraform Scripting Concepts by 0x445442 on Friday January 07, 2022 @10:13AM (#29840018)
I wasn't aware of this and I'm glad to see they're doing it. But my guess is this is a relatively recent offering in response to the AWS version and the issues I was mentioning.
Re:Terraform Scripting Concepts by seniorThrowaway on Monday January 03, 2022 @02:13PM (#29784959)
terraform really needs to be run in CI/CD pipe. Even without the backend initialized you can run terraform validate which will find things like undeclared variables and messed up count and foreach references.
Re:Terraform Scripting Concepts by isbvhodnvemrwvn on Monday January 03, 2022 @03:45PM (#29786602)
But it won't find resource IDs being passed instead of ARNs, and a whole lot of other things.
Re:Terraform Scripting Concepts by chenrui on Monday January 03, 2022 @10:28AM (#29781655)
terraform actually has `local-exec` which is doing the scripting part, calling terraform scripting is very wrong.
Re:Terraform Scripting Concepts by danw1979 on Monday January 03, 2022 @08:11AM (#29780409)
nope.