Terraform x Noobie
You know, if I say to you that I am dealing with Terraform in the last 3 months and I am already refactoring, this says something about one of the most known framework for Infrastructure as Code and it’s learning curve.
When you start dealing with Terraform, you can really enjoy a good fight. You need to translate into code the infrastructure that you want to build. And when you are not a cloud architect, as I am not, that fight goes to the next level.
On every module, every resource you need to pass vars, discover some setup that you previous missed, and so on. And on each terraform plan
you realize that you may be doing something wrong. And sometimes, Terraform docs are not that helpful.
As it was discussed in a cloud group that I am on Telegram, there's the right way of doing things and the way that works. I think that most of us go by the second option.
And I am in the learning phase, I don't have any previous cloud knowledge or any kind of cloud certificate. I google. I read. I ask for help.
So most of the time I use a slogan that my team used to say in my previous job: "Ugly first".
But Lays, what that means? It means to make it work. Note the technical debts, and make the basic works. When you are the only soul on your team or squad that is trying to set up an infrastructure to give a better environment for everyone to work, and they all want you to deliver that fast, I go for the ugly. And when the basic is working, I do find time to review and refactor. No matter what.
For Terraform, I have already learned how to break up my infrastructure into modules, following the good old "Simple is better than complex" Python slogan.
And now, I am discovering more and more ways to improve my scripts and reuse them, so I and my team can focus on the development of our product.
That's all folks.