<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: GOKULPRASATH N</title>
    <description>The latest articles on DEV Community by GOKULPRASATH N (@gokulprasath_n_42438fd633).</description>
    <link>https://dev.to/gokulprasath_n_42438fd633</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3618066%2F963487b6-4570-42d4-ae77-51ad854f8795.png</url>
      <title>DEV Community: GOKULPRASATH N</title>
      <link>https://dev.to/gokulprasath_n_42438fd633</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/gokulprasath_n_42438fd633"/>
    <language>en</language>
    <item>
      <title>Day 6/30: Organising Terraform – File Structure Best Practices 📂✨</title>
      <dc:creator>GOKULPRASATH N</dc:creator>
      <pubDate>Sat, 29 Nov 2025 13:35:41 +0000</pubDate>
      <link>https://dev.to/gokulprasath_n_42438fd633/day-630-organizing-terraform-file-structure-best-practices-4ggc</link>
      <guid>https://dev.to/gokulprasath_n_42438fd633/day-630-organizing-terraform-file-structure-best-practices-4ggc</guid>
      <description>&lt;p&gt;Day 6/30: Organizing Terraform – File Structure Best Practices 📂✨&lt;br&gt;
Today marks Day 6 of my #30daysofAWSTerraform challenge! 🚀 As the codebase grows, keeping everything in a single main.tf file becomes unmanageable. Today, I learned how to modularize and organize Terraform files for better readability, maintainability, and scalability.&lt;br&gt;
I refactored my monolithic code into a standard professional structure used by DevOps teams worldwide.&lt;/p&gt;

&lt;p&gt;✅ Tasks Completed:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Refactoring: Split the single main.tf into logical files (providers.tf, variables.tf, outputs.tf).&lt;/li&gt;
&lt;li&gt;Backend Isolation: Created a dedicated backend.tf to manage the Remote State configuration separately.&lt;/li&gt;
&lt;li&gt;Variable Management: Moved variable definitions to variables.tf and actual values to terraform.tfvars.&lt;/li&gt;
&lt;li&gt;Security Best Practices: Created a .gitignore file to prevent sensitive files like terraform.tfvars, .terraform/, and *.tfstate from being pushed to GitHub.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;📝 Notes:&lt;br&gt;
Standard File Structure:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;main.tf → Core resource definitions (EC2, VPC, S3).&lt;/li&gt;
&lt;li&gt;variables.tf → Declaration of input variables.&lt;/li&gt;
&lt;li&gt;outputs.tf → Definition of output values (e.g., IPs, IDs).&lt;/li&gt;
&lt;li&gt;providers.tf → Provider configuration and version constraints.&lt;/li&gt;
&lt;li&gt;terraform.tfvars → Environment-specific values (GitIgnored!).
Why split? It makes collaboration easier, code reviews faster, and helps avoid merge conflicts in large teams.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;🔗 Resources:&lt;br&gt;
Video I watched: &lt;a href="https://www.youtube.com/watch?v=QMsJholPkDY" rel="noopener noreferrer"&gt;https://www.youtube.com/watch?v=QMsJholPkDY&lt;/a&gt;&lt;br&gt;
Mentor: Piyush Sachdeva&lt;/p&gt;

&lt;p&gt;I am excited to dive into Type Constraints tomorrow to make my variables even more robust!&lt;/p&gt;

&lt;h1&gt;
  
  
  AWS #Terraform #CloudEngineering #DevOps #InfrastructureAsCode #techtutorialswithpiyush #TheCloudOpsCommunity #30daysofAWSTerraform
&lt;/h1&gt;

</description>
    </item>
    <item>
      <title>Day 5/30: The Power of Variables – DRY Principles &amp; Precedence 🔄🏗️</title>
      <dc:creator>GOKULPRASATH N</dc:creator>
      <pubDate>Fri, 28 Nov 2025 16:27:12 +0000</pubDate>
      <link>https://dev.to/gokulprasath_n_42438fd633/day-530-the-power-of-variables-dry-principles-precedence-50ph</link>
      <guid>https://dev.to/gokulprasath_n_42438fd633/day-530-the-power-of-variables-dry-principles-precedence-50ph</guid>
      <description>&lt;p&gt;Today marks Day 5 of my #30daysofAWSTerraform challenge! 🚀 I moved beyond hardcoding values and explored Terraform Variables, a game-changer for writing reusable, clean, and scalable Infrastructure as Code.&lt;br&gt;
By extracting values like Region, AMI IDs, and Instance Types into variables.tf, I learned how to deploy the exact same infrastructure across Dev, Staging, and Prod without rewriting a single line of the main configuration.&lt;/p&gt;

&lt;p&gt;✅ Tasks Completed:&lt;br&gt;
Input Variables: Created a variables.tf file to define reusable inputs (e.g., variable "instance_type") with default values and type constraints (String, Number, Bool).&lt;br&gt;
Code Refactoring: Updated main.tf to replace hardcoded strings with var., making the code modular.&lt;br&gt;
Variable Precedence: Experimented with different ways to assign values (CLI flags, Environment Variables, terraform.tfvars, Default values) and learned the order of precedence (CLI &amp;gt; tfvars &amp;gt; Env Var &amp;gt; Default).&lt;br&gt;
Locals: Used locals block to perform intermediate calculations (e.g., combining resource names with project IDs) to avoid repetition inside resources.&lt;br&gt;
Output Variables: Defined outputs.tf to print useful information (like the EC2 Public IP) to the console after terraform apply finishes.&lt;/p&gt;

&lt;p&gt;📝 Notes:&lt;br&gt;
DRY Principle: "Don't Repeat Yourself." If you copy-paste a value more than twice, turn it into a variable.&lt;br&gt;
Security: Never commit terraform.tfvars if it contains sensitive secrets (add it to .gitignore!).&lt;br&gt;
Type Safety: Always define type = string or type = number to catch errors early during terraform plan rather than failing mid-deployment.&lt;/p&gt;

&lt;p&gt;🔗 Resources:&lt;br&gt;
Video I watched: &lt;a href="https://youtu.be/V-2yC39BONc?si=LmmQmXKh16BKAi2d" rel="noopener noreferrer"&gt;https://youtu.be/V-2yC39BONc?si=LmmQmXKh16BKAi2d&lt;/a&gt;&lt;br&gt;
Mentor: Piyush Sachdeva&lt;/p&gt;

&lt;p&gt;I am excited to learn about File Structure tomorrow to organize my growing code base!&lt;/p&gt;

&lt;h1&gt;
  
  
  AWS #Terraform #CloudEngineering #DevOps #InfrastructureAsCode #techtutorialswithpiyush #TheCloudOpsCommunity
&lt;/h1&gt;

&lt;h1&gt;
  
  
  30daysofAWSTerraform
&lt;/h1&gt;

</description>
      <category>devops</category>
      <category>aws</category>
      <category>terraform</category>
      <category>cloudnative</category>
    </item>
    <item>
      <title>Day 4/30: The Heart of Terraform – State Files &amp; Remote Backends 🧠🗄️</title>
      <dc:creator>GOKULPRASATH N</dc:creator>
      <pubDate>Thu, 27 Nov 2025 18:35:41 +0000</pubDate>
      <link>https://dev.to/gokulprasath_n_42438fd633/day-430-the-heart-of-terraform-state-files-remote-backends-345</link>
      <guid>https://dev.to/gokulprasath_n_42438fd633/day-430-the-heart-of-terraform-state-files-remote-backends-345</guid>
      <description>&lt;p&gt;Today marks Day 4 of my #30daysofAWSTerraform challenge! 🚀 I explored the most critical component of Terraform: the State File (terraform.tfstate). It acts as the database for your infrastructure, mapping your code to real-world AWS resources.&lt;br&gt;
I also learned why storing state locally is a recipe for disaster in team environments and how to move it to a secure Remote Backend using AWS S3.&lt;/p&gt;

&lt;p&gt;✅ Tasks Completed:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;State Analysis: Inspected the terraform.tfstate JSON file to understand how it stores metadata and resource attributes.&lt;/li&gt;
&lt;li&gt;Remote Backend Setup: Configured an S3 bucket as a remote backend to store the state file securely instead of keeping it on my local machine.&lt;/li&gt;
&lt;li&gt;State Locking: Enabled state locking (using S3/DynamoDB concepts) to prevent multiple team members from corrupting the state by running apply simultaneously.&lt;/li&gt;
&lt;li&gt;Migration: Successfully initialized the backend (terraform init) to migrate my local state to the remote S3 bucket.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;📝 Notes:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The Golden Rule: NEVER edit the terraform.tfstate file manually. It causes drift and can break your infrastructure mapping.&lt;/li&gt;
&lt;li&gt;The Solution: Use a Remote Backend (like S3) to share state across the team, encrypt sensitive data, and enable locking.&lt;/li&gt;
&lt;li&gt;Drift Detection: Terraform uses the state file to calculate the "delta" between your Desired State (Code) and Actual State (AWS).&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;🔗 Resources:&lt;br&gt;
My Code &amp;amp; Progress: &lt;a href="https://github.com/Gokulprasath-N/Terraform-Full-Course-Aws/tree/main/lessons/day04" rel="noopener noreferrer"&gt;https://github.com/Gokulprasath-N/Terraform-Full-Course-Aws/tree/main/lessons/day04&lt;/a&gt;&lt;br&gt;
Video I watched: &lt;a href="https://www.youtube.com/watch?v=YsEdrl9O5os" rel="noopener noreferrer"&gt;https://www.youtube.com/watch?v=YsEdrl9O5os&lt;/a&gt;&lt;br&gt;
Mentor: Piyush Sachdeva&lt;/p&gt;

&lt;p&gt;I am excited to dive into Variables tomorrow to make my code more reusable!&lt;/p&gt;

&lt;h1&gt;
  
  
  AWS #Terraform #CloudEngineering #DevOps #InfrastructureAsCode #techtutorialswithpiyush
&lt;/h1&gt;

&lt;h1&gt;
  
  
  30daysofAWSTerraform
&lt;/h1&gt;

</description>
      <category>terraform</category>
      <category>learning</category>
      <category>devops</category>
      <category>aws</category>
    </item>
    <item>
      <title>Day 3/30: My First Resource – S3 Bucket! 🪣☁️</title>
      <dc:creator>GOKULPRASATH N</dc:creator>
      <pubDate>Wed, 26 Nov 2025 15:38:39 +0000</pubDate>
      <link>https://dev.to/gokulprasath_n_42438fd633/day-330-my-first-resource-s3-bucket-k52</link>
      <guid>https://dev.to/gokulprasath_n_42438fd633/day-330-my-first-resource-s3-bucket-k52</guid>
      <description>&lt;p&gt;Today marks Day 3 of my #30daysofAWSTerraform challenge! 🚀 After setting up the provider yesterday, I provisioned my very first AWS resource: a Simple Storage Service (S3) bucket.&lt;br&gt;
It might seem simple, but this exercise covered the entire Terraform Lifecycle—creation, modification, and destruction—proving that infrastructure is no longer static!&lt;/p&gt;

&lt;p&gt;✅ Tasks Completed:&lt;br&gt;
Resource Definition: Wrote the aws_s3_bucket block by referencing the official Terraform Registry documentation.&lt;br&gt;
Full Lifecycle Execution: Ran the complete workflow: init → plan → apply (Creation) → destroy (Cleanup).&lt;br&gt;
State Updates: Modified the bucket tags in the code and ran apply again to see how Terraform detects changes ("1 to change") without recreating the resource.&lt;br&gt;
Automation: Used the -auto-approve flag to bypass the manual "yes" confirmation prompt (for lab environments only!).&lt;/p&gt;

&lt;p&gt;📝 Notes:&lt;br&gt;
Global Uniqueness: learned that S3 bucket names must be globally unique across all AWS accounts, not just mine.&lt;br&gt;
Resource Syntax: resource "_" "" (e.g., resource "aws_s3_bucket" "my_bucket").&lt;br&gt;
Idempotency: Terraform is smart enough to know that if I run apply twice without code changes, nothing happens.&lt;/p&gt;

&lt;p&gt;🔗 Resources:&lt;br&gt;
My Code &amp;amp; Progress: &lt;a href="https://github.com/Gokulprasath-N/Terraform-Full-Course-Aws/tree/main/lessons/day04" rel="noopener noreferrer"&gt;https://github.com/Gokulprasath-N/Terraform-Full-Course-Aws/tree/main/lessons/day04&lt;/a&gt;&lt;br&gt;
Video I watched: &lt;a href="https://www.youtube.com/watch?v=09HQ_R1P7Lw" rel="noopener noreferrer"&gt;https://www.youtube.com/watch?v=09HQ_R1P7Lw&lt;/a&gt;&lt;br&gt;
Mentor: Piyush Sachdeva&lt;br&gt;
I am excited to move on to Terraform State file management with AWS S3 tomorrow!&lt;/p&gt;

&lt;h1&gt;
  
  
  AWS #Terraform #CloudEngineering #DevOps #InfrastructureAsCode #techtutorialswithpiyush
&lt;/h1&gt;

&lt;h1&gt;
  
  
  30daysofAWSTerraform
&lt;/h1&gt;

</description>
      <category>terraform</category>
      <category>devops</category>
      <category>beginners</category>
      <category>aws</category>
    </item>
    <item>
      <title>Day 2/30: Mastering Terraform Providers &amp; Version Constraints 🧩☁️</title>
      <dc:creator>GOKULPRASATH N</dc:creator>
      <pubDate>Tue, 25 Nov 2025 14:19:01 +0000</pubDate>
      <link>https://dev.to/gokulprasath_n_42438fd633/day-230-mastering-terraform-providers-version-constraints-1l9h</link>
      <guid>https://dev.to/gokulprasath_n_42438fd633/day-230-mastering-terraform-providers-version-constraints-1l9h</guid>
      <description>&lt;p&gt;Today marks Day 2 of my #30daysofAWSTerraform challenge! 🚀 After setting up the foundation, I dove deep into Providers—the engines that power Terraform—and learned why version control is critical for production stability.&lt;/p&gt;

&lt;p&gt;We often assume Terraform init just "works," but understanding what it downloads and how to lock versions prevents breaking changes when a provider updates unexpectedly.&lt;/p&gt;

&lt;p&gt;✅ Tasks Completed:&lt;/p&gt;

&lt;p&gt;Provider Configuration: Defined the AWS provider block and understood the difference between Official, Partner, and Community providers.&lt;/p&gt;

&lt;p&gt;Version Locking: Implemented required_providers to lock the AWS provider version using the pessimistic operator (~&amp;gt;) to ensure stability while allowing safe patch updates.&lt;/p&gt;

&lt;p&gt;Initialisation: Ran Terraform init to download the specific provider plugins required for the project.&lt;/p&gt;

&lt;p&gt;Authentication: Configured the AWS CLI (aws configure) to allow Terraform to interact with my AWS account securely.&lt;/p&gt;

&lt;p&gt;📝 Notes:&lt;/p&gt;

&lt;p&gt;What is a Provider? A plugin that translates HCL code into API calls that the Cloud Provider (AWS/Azure/GCP) understands.&lt;/p&gt;

&lt;p&gt;Version Constraints:&lt;/p&gt;

&lt;p&gt;version = "5.0" -&amp;gt; Exact match (Safest but rigid).&lt;/p&gt;

&lt;p&gt;version = "~&amp;gt; 5.0" -&amp;gt; Allows updates to 5.x but prevents breaking changes in 6.0.&lt;/p&gt;

&lt;p&gt;The "Dependency Hell" Solution: Always separate the Terraform CLI version (required_version) from the Provider version (required_providers) to avoid compatibility issues.&lt;/p&gt;

&lt;p&gt;🔗 Resources:&lt;/p&gt;

&lt;p&gt;My Code &amp;amp; Progress: &lt;a href="https://github.com/Gokulprasath-N/Terraform-Full-Course-Aws/tree/main/lessons/day02" rel="noopener noreferrer"&gt;https://github.com/Gokulprasath-N/Terraform-Full-Course-Aws/tree/main/lessons/day02&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Video I watched: &lt;a href="https://www.youtube.com/watch?v=JFiMmaktnuM" rel="noopener noreferrer"&gt;https://www.youtube.com/watch?v=JFiMmaktnuM&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I am excited to start provisioning actual resources like VPCs and EC2 instances tomorrow!&lt;/p&gt;

&lt;h1&gt;
  
  
  AWS #Terraform #CloudEngineering #DevOps #InfrastructureAsCode #techtutorialswithpiyush #30daysofAWSTerraform
&lt;/h1&gt;

</description>
      <category>devops</category>
      <category>aws</category>
      <category>terraform</category>
      <category>infrastructureascode</category>
    </item>
    <item>
      <title>Day 1/30: The Foundation – Why Terraform?</title>
      <dc:creator>GOKULPRASATH N</dc:creator>
      <pubDate>Mon, 24 Nov 2025 15:29:29 +0000</pubDate>
      <link>https://dev.to/gokulprasath_n_42438fd633/day-130-the-foundation-why-terraform-3d4i</link>
      <guid>https://dev.to/gokulprasath_n_42438fd633/day-130-the-foundation-why-terraform-3d4i</guid>
      <description>&lt;p&gt;Today marks the start of my #30daysofAWSTerraform challenge! 🚀 Before writing code, I focused on understanding why we need Infrastructure as Code (IaC) and setting up a robust development environment.&lt;br&gt;
We often underestimate the pain of manual clicking in the AWS Console—until we have to replicate an environment for Production and everything breaks. Terraform solves this by treating infrastructure as software.&lt;/p&gt;

&lt;p&gt;🏗️ What is Terraform?&lt;br&gt;
Terraform is an open-source Infrastructure as Code (IaC) tool created by HashiCorp. It allows you to define and provision data center infrastructure using a high-level configuration language called HCL (HashiCorp Configuration Language).&lt;/p&gt;

&lt;p&gt;Think of it as a blueprint for your cloud. Instead of manually clicking through the AWS console to create servers, databases, and networks, you write code that describes what you want, and Terraform makes it happen.&lt;/p&gt;

&lt;p&gt;🔑 Core Purpose&lt;br&gt;
Provisioning: Build infrastructure from scratch (e.g., AWS EC2, VPC, S3).&lt;br&gt;
Management: Update and version control your infrastructure just like application code.&lt;br&gt;
Cloud-Agnostic: Works with AWS, Azure, Google Cloud, Kubernetes, and hundreds of other providers.&lt;/p&gt;

&lt;p&gt;💡 Why Do We Need It? (The "Why")&lt;br&gt;
Before Terraform, managing infrastructure was painful:&lt;br&gt;
Manual Clicking: "ClickOps" is slow, tedious, and prone to human error.&lt;br&gt;
Inconsistency: "It works on my machine" issues because Dev and Prod environments drifted apart.&lt;br&gt;
No History: Hard to track who changed what and when.&lt;br&gt;
Terraform solves this by:&lt;br&gt;
Automation: Spin up entire environments in minutes.&lt;br&gt;
Consistency: The same code creates the exact same infrastructure every time.&lt;br&gt;
Version Control: Track changes in Git/GitHub.&lt;/p&gt;

&lt;p&gt;🛠️ Installation Guide&lt;br&gt;
To get started, you need to install the Terraform CLI on your local machine.&lt;/p&gt;

&lt;p&gt;For Windows&lt;br&gt;
Download the binary from the official website. url: &lt;a href="https://developer.hashicorp.com/terraform/install#windows" rel="noopener noreferrer"&gt;https://developer.hashicorp.com/terraform/install#windows&lt;/a&gt; --&amp;gt; Extract the .zip file --&amp;gt; Add the folder containing terraform.exe to your system's PATH environment variable --&amp;gt; Verify: Open PowerShell and run: terraform -version&lt;/p&gt;

&lt;p&gt;✅ Tasks Completed:&lt;br&gt;
Mastered IaC Concepts: Learned how Terraform solves the "It works on my machine" problem by ensuring consistency across Dev, Staging, and Prod.&lt;br&gt;
Tooling Setup: Successfully installed Terraform CLI and verified the version.&lt;br&gt;
Workflow Optimisation: Set up shell aliases (tf=terraform) and autocompletion to save time on future commands.&lt;br&gt;
IDE Setup: Configured VS Code with the HashiCorp extension for better syntax support.&lt;/p&gt;

&lt;p&gt;📝 Notes:&lt;br&gt;
The Problem: Manual infrastructure takes hours/days and is prone to human error.&lt;br&gt;
The Solution: Terraform interacts with Cloud APIs (like AWS) to provision resources automatically using HCL (HashiCorp Configuration Language).&lt;br&gt;
Core Workflow: Write -&amp;gt; Plan (Dry Run) -&amp;gt; Apply (Create) -&amp;gt; Destroy (Clean up).&lt;/p&gt;

&lt;p&gt;🔗 Resources:&lt;br&gt;
My Code &amp;amp; Progress: &lt;a href="https://github.com/Gokulprasath-N/Terraform-Full-Course-Aws" rel="noopener noreferrer"&gt;https://github.com/Gokulprasath-N/Terraform-Full-Course-Aws&lt;/a&gt;&lt;br&gt;
Video I watched: &lt;a href="https://www.youtube.com/watch?v=xUtGqC-NXJE" rel="noopener noreferrer"&gt;https://www.youtube.com/watch?v=xUtGqC-NXJE&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I am excited to start writing actual HCL code tomorrow!&lt;/p&gt;

&lt;h1&gt;
  
  
  AWS #Terraform #CloudEngineering #DevOps #InfrastructureAsCode #techtutorialswithpiyush
&lt;/h1&gt;

&lt;h1&gt;
  
  
  30daysofAWSTerraform
&lt;/h1&gt;

</description>
      <category>aws</category>
      <category>terraform</category>
      <category>devops</category>
      <category>infrastructureascode</category>
    </item>
  </channel>
</rss>
