A Year Without the AWS Console
The title and image seem like a group therapy: I'm Lorenzo and today is one year without the AWS Console :)
TL;DR
In today's fast-paced world, technological advancements have revolutionized various aspects of our lives. One such innovation is Terraform, a powerful infrastructure automation tool that has transformed the way we manage and deploy our digital infrastructure. In this article, I will share my journey and experiences with Terraform, highlighting the profound impact it has had on my life.
Learning curve
I start from the learning curve because it is the initial stumbling block I had in the first approach.
My DevOps background involved manual configuration. Switching to Terraform was not easy.
Here are some of the reasons:
Apply the approach "Learn by doing"
Learn by doing it's for me like a mantra. I use this approach in my professional life. In this particular case, I use this approach to recreate all of my company's AWS infrastructure while simultaneously learning the Configuration Language.
I don't know if this is the best approach. My side helped me like on other occasions to know being able to test directly, making mistakes in many cases but understanding the error faster and how to solve it.
The Power of Learning by doing
The power of "Learn by Doing" refers to the effectiveness of learning through practical experience and active engagement with tasks or projects. Instead of passively receiving information or instructions, this approach encourages individuals to actively participate, experiment, and learn from their actions and outcomes.
Implementing Learn by Doing with Terraform
This is my step-by-step guide
Lessons from Learn by Doing
By embracing the "Learn by Doing" approach with Terraform, you not only gain proficiency in using the tool but also develop essential skills such as problem-solving, collaboration, and critical thinking. These lessons empower you to tackle complex infrastructure challenges, automate deployments, and contribute to the broader ecosystem of infrastructure automation.
Apply the approach "Divide-et-impera"
The second approach that I apply it's "Divide-et-impera".
This ancient strategy, coined by Julius Caesar, promotes the breakdown of large problems into smaller, more manageable parts. In the context of Terraform, this principle is realized through modular infrastructure development and management.
The Power of Modularization
Modularization, in essence, is a process of dividing a system into separate, self-contained modules. Each module performs a unique function and can be developed, tested, and scaled independently from the others. This division allows for greater efficiency and flexibility, as developers can focus on individual components without disrupting the entire infrastructure.
Terraform promotes modularization through its resources and modules, enabling developers to build infrastructure components independently and then integrate them as necessary. This approach streamlines the development process, facilitates collaboration among team members, and makes the infrastructure more maintainable and scalable.
领英推荐
Implementing Divide et Impera with Terraform Modules
To implement the Divide et Impera principle with Terraform, we turn to its most powerful feature: modules. A Terraform module is a container for multiple resources that are used together. Modules can be used to create lightweight and reusable abstractions, so you can describe your infrastructure in a high-level language that's more about the use case and less about the low-level implementation details.
Consider a scenario where you are building an AWS infrastructure with several similar EC2 instances. Rather than writing code for each instance individually, you could create a module for an EC2 instance and then instantiate it as many times as required. This module could contain not only the instance itself, but also associated resources like EIPs, IAM roles, and security groups.
Module Versioning and Source Control
One of the many advantages of Divide et Impera is that each module can be developed and versioned independently. This means that individual parts of your infrastructure can be upgraded, scaled, or even entirely replaced without disrupting the rest of your system.
Terraform integrates seamlessly with source control systems like Git. By keeping each module in a separate repository, teams can work in parallel, managing their own parts of the infrastructure. As long as the module's interface remains consistent, it can be developed, tested, and deployed independently from other modules.
Lessons from Divide et Impera
Applying the Divide et Impera principle to Terraform can yield significant benefits. It enables rapid development and testing of infrastructure components, provides a way to manage complexity in large projects, and promotes team collaboration. Furthermore, the modular design enhances the scalability of your system and allows for improved fault isolation.
It is essential to remember, however, that while the divide-and-conquer approach can simplify many aspects of infrastructure management, it also requires careful planning and discipline to ensure consistency and compatibility between modules. Always strive for a balance between modular independence and overall system cohesion.
In the next chapter, we will examine best practices for structuring Terraform modules and strategies to manage inter-module dependencies effectively, ensuring the successful application of the Divide et Impera principle in your Terraform projects.
Cloud Cost Optimization
Cloud cost optimization is the process of reducing your overall cloud spend by identifying mismanaged resources, eliminating waste, reserving capacity for higher discounts and right-sizing computing services to scale. The goal is to manage your cloud resources so that you're only paying for what you use and need.
Terraform it's for me the best way to achieve this goal.
Certification
In January 2023 I obtained the certification Terraform Associate (002)
Was it necessary for the job I was doing? No
Did it help me consolidate my knowledge of Terraform? Yes
Here are a few reasons why a Terraform certification is important:
Remember, however, while a certification can provide many advantages, it's equally important to gain hands-on experience with Terraform. Real-world experience, backed by certification, is a powerful combination that can significantly enhance your career in the tech industry.
Final consideration
After a year of not creating any AWS resources via the console and after two years of learning by doing with Terraform: