You enter the call (or conference room) where you are greeted by some higher level executives and members of your Infrastructure team. They have been tasked with bootstrapping the company's IT Infrastructure and start building new resources with IaC. Luckily for you (or not), you have experience with this and are eager to prove your worth and show that DBAs can do more than yell at your poorly configured query or that you are using ORMs. While this situation happens to many of us, I rarely hear about the struggles folks have trying to implement a stateful resources (databases) in a stateless in environment consisting of stateless resources.
Stages:
Denial: This is just another resource to deploy with OpenTofu and most providers have resource blocks for their offerings! It has to work flawlessly!
Anger: Deploy a blank database, easy. Deploy a database from snapshot, generally easy. But now I need to user three other providers just to initialize my database? $%@^@&@&
Bargaining: If I just add one more provider, I swear this is going to work!
Depression: My module is too complicated and now I am the only one that knows how it works.
Acceptance: I will just build the module for single use, blank database deployments....
For your pleasure and amusement, I plan to walk you through my experience implementing this exact task and align the different phases of the implementation with Dr. Kübler-Ross’s five stages of grieving. Sit back and enjoy a few laughs, memes, and positive outlook on how we continue to create more gray area in daily work.



