DOOM Terraform chaos engineering
2023-06-03
Last edit: 2023-06-03
---------------------
I first saw
HTML kubedoom
and thought it was pretty cool, so I decided to do the same for Terraform, knowing that I was working with it for professional projects.
The principle is very simple, each enemy represents a Terraform resource, if an enemy dies, the associated resource is destroyed.
## How does it work?
The main program is `terraform-doom`, which creates a UNIX socket, listens to it and simultaneously launches an X11 virtual server (Xvfb), a VNC server (x11vnc) attached to this X session and `psdoom` (DOOM writing to the UNIX socket).
The binaries `Xvfb` and `x11vnc` are used to create a cross-platform graphical access to `psdoom` inside the container.
At runtime `psdoom` will continuously write to the UNIX socket to signal `terraform-doom` to send Terraform resource information. When an enemy is killed, `psdoom` writes the associated resource name to the socket.
Everything we've just described will be encapsulated in a Docker container.
## Demonstration
This demonstration has been realized with the example Terraform project, every steps to reproduce it are detailed in the README file on the repository.
## Links
HTML https://github.com/theobori/terraform-doom