5 ms·
Any thoughts on Pulumi vs Terraform?
by chrischen 6y ago
Any thoughts on Pulumi vs Terraform?
- whydoineedthis 6y agoimho, if you think typecasting the AWS api in your local code repository is useful, than Pulumi is the way to go. Maybe one day someone will find an api that AWS didn't properly typecast before releasing and then the hundreds of hours of typecasting in your local repo will be worth it. Other than that, it's really annoying way to keep infrastructure. I prefer the Terraform DSL myself, but I'm certain there is an audience that disagrees with me.
- cies 6y agoI dont understand your 2 opening statements: > if you think typecasting the AWS api in your local code repository is useful, then Pulumi is the way to go. What do you mean by typecasting here? Isn't providing the types what Pulumi (or TF CDK for that sake) does by the libs it provides? I dot see how I, the consumer of those libs, needs to "type cast" anything. > someone will find an api that AWS didn't properly typecast before releasing and then the hundreds of hours of typecasting in your local repo will be worth it. ?
- cmclaughlin 6y ago> Any thoughts on Pulumi vs Terraform? If you're just getting started with Terraform be sure to check out CDK for Terraform. It allows you to drive Terraform from a variety of high-level programming languages instead of it's DSL. https://github.com/hashicorp/terraform-cdk/ https://github.com/hashicorp/terraform-cdk/
- StavrosK 6y ago> Getting Started with Python. Prerequisites: Terraform >= v0.12, Node.js >= v12.16 What? :(
- flurie 6y agoI believe both the aws cdk and this use code generation to create the libraries for languages other than typescript, and you're reliant on the typescript package for updates to those libraries.
- StavrosK 6y agoHmm, how do you mean? Doesn't the Python code generate JSON that Terraform then reads?
- chucky_z 6y agocdktf the cli is all js iirc, this is because the underlying library (jsii) is all js.
- cmclaughlin 6y agoIndeed... technically you don't have to use the cdktf CLI. For instance, I typically run "python main.py" to synthesize from Python to Terraform. From an end-user perspective, once you have your cdktf environment setup you don't really ever have to deal with node.js at all. I've never had a reason to dig into this very deep, but my understanding is the cdktf Python libraries use JSII Python libraries which interact with the main JSII implementation which runs under node.js. That's where the conversion from Python to HCL compatible JSON happens. Or in the case of the main AWS CDK, from your favorite programming language to CloudFormation. More info on JSII here: https://aws.github.io/jsii/overview/runtime-architecture/ https://aws.github.io/jsii/overview/runtime-architecture/
- lucidone 6y agoIt's like Gradle versus Maven in Javaland.
- 1_player 6y agoI found Terraform buggy, and really disliked its language. Upgrade paths are a pain. The fact that Pulumi runs on classic, Turing-complete languages is a huge plus to me. Unless your infrastructure is so large and managed by so many departments you need the least powerful declarative language to stay sane, my suggestion is to go with Pulumi. It's not perfect, the whole infrastructure-as-code ecosystem is frankly pretty bad, but if Pulumi is a 6/10, Terraform is a 4/10. YMMV