DEV Community

Cover image for Day 1 of My 90-Day DevOps Journey: Getting Started with Terraform and AWS
Arbythecoder
Arbythecoder

Posted on

Day 1 of My 90-Day DevOps Journey: Getting Started with Terraform and AWS

Hey everyone, I'm excited to share my 90-day DevOps journey! Each day, I'm diving into different projects, learning, and documenting every step. Whether you're starting out or curious about Terraform and AWS, join me on this adventure!

Getting Started with Terraform and AWS

So, I kicked off by exploring Terraform—an awesome tool for automating infrastructure across cloud providers like AWS. Think of it as your magic wand for spinning up servers and managing cloud resources.

Challenges: Initially, I struggled with Terraform's .tf configuration files. Getting the syntax right and understanding how to define resources took a bit of trial and error.

Solutions: I found that diving into the Terraform documentation and online tutorials helped clarify things. Also, joining forums and communities like Stack Overflow was a lifesaver for quick answers and tips.

Deploying My First Web Server

My goal was to deploy a simple web server on AWS using Terraform—a real hands-on learning experience.

Challenges: After setting up the instance, I ran into a roadblock—my public IP wasn't loading in the browser. Frustrating, right?

Solutions: I double-checked my security group settings in AWS. Turns out, I needed to tweak the inbound rules to allow HTTP traffic on port 80 (0.0.0.0/0 for the win!). It was about finding the balance between security and accessibility.

Navigating Security Groups and Permissions

Configuring AWS security groups was a critical part of the process.

Challenges: Understanding CIDR notation (0.0.0.0/0) was a bit tricky at first. I wanted to allow traffic from any IP to access my web server securely.

Solutions: I made sure to review AWS VPC (Virtual Private Cloud) settings and network ACLs. This helped me refine the security group rules without compromising on safety.

Debugging and Learning

Throughout this journey, I embraced the ups and downs of debugging.

Challenges: Encounter errors like InvalidAMIID.NotFound and Unsupported block type? Been there, solved that!

Solutions: Googling error messages became my second nature. Plus, reaching out to mentors and peers for guidance was invaluable. It's all about learning from mistakes and growing stronger in DevOps.

Sharing My Experience

I'm excited to share my progress with you all. It's not just about the technical stuff—it's about the journey, the challenges, and the wins. If you're starting your DevOps journey or diving into cloud engineering, I hope my story encourages you to keep pushing forward.

Top comments (5)

Collapse
 
justplegend profile image
JPL • Edited

Can you share GitHub,YouTube video or similar things in resolving problems? It's more better when you have visual things for better learning and understanding for others. :)

Mindset and the type of thinking how to resolve problems in first steps to make terrafform files, provision (VPC, EC2, Static website..) are also important for beginners. :)

Collapse
 
arbythecoder profile image
Arbythecoder • Edited

@justplegend Thank you so much for taking time to read my article. While I am still working on having a YouTube series for this 90 days of building DevOps projects, I hope you find a few of these resources useful:

YouTube Videos:

  1. Terraform for Beginners - AWS EC2 instance
  2. Terraform and AWS Tutorial | How to create EC2 instance in AWS using Terraform
  3. How to use Terraform with AWS

Related Articles:

  1. Build AWS Infrastructure with Terraform: Step-by-Step Guide
  2. How to Run Terraform in Jenkins

I hope this helps!


Collapse
 
justplegend profile image
JPL

Thanks! I will check these resources! :)

Collapse
 
sourabpramanik profile image
Sourab Pramanik

That's fantastic. Waiting for day 2. Can you please explain how do you use terraform in the CI/CD process and implement auto provisioning?

Collapse
 
arbythecoder profile image
Arbythecoder • Edited

@sourabpramanik Thank you for your enthusiasm! Here's a brief explanation of how Terraform is used in the CI/CD process and for auto-provisioning:

  1. Terraform in CI/CD:

    • Integration: Integrate Terraform with your CI/CD pipeline (e.g., Jenkins, GitLab CI) to automate infrastructure provisioning.
    • Configuration Files: You can store Terraform configuration files in your repos.
    • Pipeline Steps: Add pipeline steps to run terraform init, terraform plan, and terraform apply commands.
    • Automation: On each commit, the pipeline automatically updates the infrastructure based on the changes in your Terraform files.
  2. Auto-Provisioning:

    • Scripts: Use Terraform scripts to define your infrastructure (e.g., EC2 instances, VPCs, databases).
    • Provisioning: Run these scripts in your CI/CD pipeline to automatically create, update, or delete resources.
    • Version Control: Keep your infrastructure as code, allowing version control and collaboration.

For a more in-depth guide, you can refer to these resources:

I hope this helps! See you on Day 2!