3 ms·
My biggest issue with Terraform is the impedance mismatch between HCL and the rest of the known universe. When you write a provider, you spend half your time c
by jdub 5y ago
My biggest issue with Terraform is the impedance mismatch between HCL and the rest of the known universe.
When you write a provider, you spend half your time converting data structures from the HCL submitted to your provider into the JSON your target service inevitably expects, then you spend half your time converting the JSON your target service inevitably returns into HCL for Terraform to consume, and then you spend another half of your time fixing bugs and polishing.
It's okay when you're building simple providers, but anything reasonably complex becomes unwieldy. I had a go at building some providers for AWS services that were not supported by Terraform or CloudFormation... and I just retreated to cheesy Lambda custom resources for CloudFormation.
- gtirloni 5y agoThe upside though is that you're adapting that known universe to a way of working that makes sense for terraform users.
- jdub 5y agoBut I wanted to be a Terraform user. So an alternative interpretation is that, as designed, Terraform is slowing down adaptation of the known universe for Terraform users.
- throwaway894345 5y agoUnfortunately HCL is also an unnecessary learning curve for users. I still don’t have my head around a list versus a bunch of blocks with the same name, for example. I originally thought it was syntax sugar for a single mechanism, but I’ve had errors for trying to use one instead of the other before.
- ClumsyPilot 5y agoGood tools are fit for the world we live in, bad tools require you to "adapt the the known universe" to the tool
- kubanczyk 5y agoI read you. The half of the Terraform's value today is "let's have common aesthetics - especially the examples and snake_case_naming_convention - and convert any REST API in the world to that". The typical example is to start from there: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_Vpc.html https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_V... and arrive here: https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/vpc https://registry.terraform.io/providers/hashicorp/aws/latest... If you review it carefully, it is apparent how much coding effort and many moving parts were used to perform a transformation which seems disproportionately primitive.
- reilly3000 5y agoI’m partial to Pulumi for this reason. It allows devs to use familiar languages to define infrastructure with their familiar tools, write tests, and even interop with existing terraform.