Live data from Hacker News

Infrastructure From Code

shuttle.rs

41–44 of 44 posts

Re: Infrastructure From Code

#41
Infrastructure from code is great, when your CI system generates the production diff and adds it to the code review. Then it's clear exactly what will get deleted. The deployment process also needs to be restartable and steps skippable. So for example, when a migration fails, you can perform it manually, re-deploy and skip the broken step. So far, no infrastructure-as-code tool works like this.

I know of only two tools that work effectively: Terraform & Pulumi. Terraform's config language has major flaws and Hashicorp is not interested in fixing them. For example, one cannot use a single Terraform config to create a database instance and a database inside it, or a VM and a server inside it, etc. So every application requires multi-stage configs which are full of footguns. Pulumi supports proper languages like Python & Golang and does not have this problem.

I would like to see a Rust version of Pulumi that uses static typing to eliminate run-time errors in infrastructure config. Maybe Shuttle will become that? It looks like they're integrating the web server with the infrastructure code. I think they should go in the opposite direction and make everything modular (usable separately) and composable. I want to write `deploy.rs` and run `cargo deploy`.

Re: Infrastructure From Code

#43

> dependencies like databases being provisioned through static analysis in real-time. I'm probably extremely biased (I'm a sysadmin), but this feels like a terrifying way to make your infrastructure entirely implicit and remove anybody's ability to coherently reason about the stuff underneath your application.

Hey! I'm one of the maintainers of the project so I thought I would address some of the comments here :) > this feels like a terrifying way to make your infrastructure entirely implicit and remove anybody's ability to coherently reason about the stuff underneath your application. There's two parts to this. The first is understanding what is happening under the hood since we're automatically provisioning so much for y…

I'm glad that it's in your sights. And yeah, a terraform style model where you generate an explicit plan and then separately apply it helps with both problems.

Re: Infrastructure From Code

#44

Infrastructure from code is great, when your CI system generates the production diff and adds it to the code review. Then it's clear exactly what will get deleted. The deployment process also needs to be restartable and steps skippable. So for example, when a migration fails, you can perform it manually, re-deploy and skip the broken step. So far, no infrastructure-as-code tool works like this. I know of only two too…

> Pulumi supports proper languages like Python & Golang and does not have this problem.

Having battled with Chef I can say with quite a bit of vim and vigor: noooooo. Everybody loves the idea of having a Turing complete language at their disposal until they manage to blow both their feet off one toe at a time.

I was going to say that Hashicorp made the deliberate design choice to avoid putting a bunch of conditional logic into HCL. However:

https://www.terraform.io/cdktf

Post reply on HN