3 ms·
Why's everyone going away from declarative? Terraform, CloudFormation, AWS Copilot etc have a lot of virtues and are programming language agnostic. Using a com
by fulafel 2y ago
Why's everyone going away from declarative? Terraform, CloudFormation, AWS Copilot etc have a lot of virtues and are programming language agnostic.
Using a complex programming language (C++ of the browser world) just for this has a big switching cost. Unless you're all in on TS. And/or have already built a huge complex IaC tower of babel where programming-in-the-large virtues justify it.
- pjmlp 2y agoBecause they like to spend endless hours debugging infrastructure builds.
- jnsaff2 2y ago> Why's everyone going away from declarative? If I had to guess it's because - more imperative background developers need to work with infrastructure and they bring over their mindset and ways of working - infrastructure is more and more available through API's and it saves a lot of effort to dynamically iterate over cattle than declaratively deal with pets - things like conditionals, loops and abstractions are very useful for a reason - in essence the declarative tools are not flexible enough for many use cases or ways of working, using a programming language brings infinite flexibility Personally I am more in the declarative camp and see the benefits of it, but there is certain amount of banging ones head against it's rigidity.
- 1dom 2y agoComplex programming languages for infrastructure code get used when people who are more comfortable using complex programming languages to solve their problems are given the problem of infrastructure and ops. It is classic "every problem is a nail to the person with a hammer". Complex languages - by definition - can solve a wider variety of problems than a simple declarative language but - by definition - are less simple. Complex languages for infra - IMO - are the wrong tool for the wrong job because of the wrong skills and the wrong person. The only reason why inefficiencies like this are ever allowed to happen is money. "Why hire a dev and an ops when we can hire a single devops for fractionally less?" - some excited business person or some broken dev manager, probably.
- nsonha 2y agodeclarative does not equate to config files the property that equates to config files is "being static", which modern deployments are not.
- vundercind 2y agoDeclarative has in-practice meant “programming, but in YAML” more often than not, which is hell. YAML’s not even a good format for static data, and it’s even worse when you try to program in it.
- nasmorn 2y agoA small CDK project is a lot more readable in my opinion. It doesn’t have a ton of yml files where your config is spread out
- fulafel 2y agoIt seems to me that there's not a big difference in nr of files. You can have a single template in CF or Terraform files and similarly you can split your CDK code in many files, or not. (For bigger stuff apparently CF has some limits relating to resoures per single stack)
- anothernewdude 2y agoTerraform isn't really declarative. It's declarative right up until the point at which it isn't, where it falls apart. I need a declarative deployment right up to the application layer, which is where terraform fails.
- fragmede 2y agoBecause sometimes you just need a for loop in a way that terraform's for_each/other DSL doesn't support