Infra as code starts from documenting your infrastructure

Published June 14, 2024

The best gift you can give to future yourself is to descriptively declare your infrastructure, but sometimes you don’t know what you will need to do, or it is just too early, or you need to develop new skills first.

In this case, documentation can be an early form of infrastructure as code.

You can start checking in a git repository that throw away bash script that you are not particularly proud of, but that brings you where you are now.

With that, you are bootstrapping a place where you can keep adding notes about what you do.

How you created the TLS certificates and how to renew them.

How to set up access for a new user or how to connect to the VPN.

Whatever you can do with the time you have now is better than manually cooked snowflakes impossible to decode in the near future, when you will have to do in again and again.

I find myself cooking two bash scripts, one that spins up a DigitalOcean droplets and a second one used as cloud-init. Those two scripts can be a first version of an infrastructure as code repository. If you can’t get that far I have also just opened an issue where I log what I do, then at the right time, it turned to a proper Terraform Module, helm chart or NixOS module.

Write it down! Do it for yourself.

Are you having trouble figuring out your way to building automation, release and troubleshoot your software? Let's get actionables lessons learned straight to you via email.