3 ms·
Terraform core is kinda crappy. The language is awful, and the module infrastructure sucks. I would support (with my own money) a fork that would re-use the Te
by cyberax 3y ago
Terraform core is kinda crappy. The language is awful, and the module infrastructure sucks.
I would support (with my own money) a fork that would re-use the Terraform providers, and reimplement the language as something not so insane.
- jen20 3y agoWell, if that's something you _actually_ want, take a look at Pulumi, which does precisely what you ask.
- sevagh 3y agoWhat's preventing Pulumi from making a license change in the future?
- cyberax 3y agoPulumi looks great. Why aren't they more popular?!? They still need the state (boo!), but otherwise they're great.
- aequitas 3y agoYou can’t implement this kind of tooling with the features is provides without the state.
- cyberax 3y agoYou can, for most of the cases. You just need a way to tag resources as belonging to the tool. This can be done via prefixed (or suffixed) names, tags, etc.
- jen20 3y agoThat… is state, just stored elsewhere. It’s also not usable for lots of important parts of AWS, which does not have consistent tagging support and would leave you running very much foul of API rate limits. Terraform having state wasn’t some easy button decision, it was absolutely required and carefully considered.
- cyberax 3y ago> That… is state, just stored elsewhere. The state is stored in the resources themselves, to be precise. > It’s also not usable for lots of important parts of AWS, which does not have consistent tagging support and would leave you running very much foul of API rate limits. As someone who worked on tagging inside AWS, I don't believe that there are any major AWS services left that don't support tagging. These days, tagging-on-creation also guarantees that you won't have untagged resources if your provider happens to die between "CreateResource" and the "TagResource" operations. You can also sometimes use prefixed names to signal that a resource belongs to the infrastructure-as-code. API limits for "describe" calls are also pretty lax. And you need to use them anyway to check if the current state of the world matches with the saved state. State will be needed for some integrations that don't support tagging/naming (Okta, I'm looking at YOU!), but at least for AWS it's not needed.
- jen20 3y agoThere may be no services at large that don’t support tagging (certainly was historically not the case though), but there a hundreds of resources that don’t. Furthermore, tagging is restrictable by IAM, is often co-opted by finance for cost allocation, and is subject to often-bizarre limits about what the content can be (even more so across providers). Finally, how would you manage tags as an actual resource themselves in this model?
- cyberax 3y agoFor resources that don't support tagging or user-defined naming, you'll need state. > Furthermore, tagging is restrictable by IAM, is often co-opted by finance for cost allocation, and is subject to often-bizarre limits about what the content can be (even more so across providers). You can fix your IAM. Cost allocation tags are treated specially. > Finally, how would you manage tags as an actual resource themselves in this model? Why would you do that?
- rank0 3y agoAny reason why you don’t like cloudFormation or the SDKs?
- cyberax 3y agoThey are EVEN MORE crappy than TF.
- verdverm 3y agoThe CUE community has some experiments, we were chatting about it recently, given the upheaval Imagine if that language covered more of the stack then just one tool too!
- diarrhea 3y agoHaving recently picked up Rust (yes, sorry for mentioning it, I promise it's relevant), I picked up Terraform the other day. I was shocked by how weak its language-level developer experience story is. I am working in VSCode, which by and large tends to be the editor supported best, with the most mindshare. Terraform has static and mostly strong typing, yet some testing revealed I was able to pass an argument of the wrong type to some variable I declared. This is type safety 101: variable declared `str` shouldn't accept `int`, ever. Yet `tf validate` was silent, so was all IDE-integrated tooling (whatever the VSCode TF extension does). Jumping to/from symbol definitions/usages was also flaky (but not entirely absent). Really disappointing! My excitement of diving into TF went poof. Maybe I'm overly sensitive, but I was so excited to escape YAML hell (Ansible). Now I'm even firmer in the boat of just using a regular old language, like Pulumi with Python (with full typing). Did I do something wrong or can anyone confirm my findings?
- spion 3y agoNo need to be sorry about mentioning Rust :) Yes, can confirm the terraform language server is kinda unreliable. We could both be doing something wrong, but it seems like that's a common outcome.
- jen20 3y agoThe IntelliJ support for Terraform is far more complete. FWIW, the Rust support is also better in CLion than VS Code.