<?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: Dawood</title>
    <description>The latest articles on DEV Community by Dawood (@dawood19).</description>
    <link>https://dev.to/dawood19</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%2F3962924%2F6c3e3998-aab4-4c2d-b0c7-3b210b475917.png</url>
      <title>DEV Community: Dawood</title>
      <link>https://dev.to/dawood19</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/dawood19"/>
    <language>en</language>
    <item>
      <title>Terraform vs Ansible: What I Learned as a DevOps Fresher</title>
      <dc:creator>Dawood</dc:creator>
      <pubDate>Mon, 01 Jun 2026 15:52:34 +0000</pubDate>
      <link>https://dev.to/dawood19/terraform-vs-ansible-what-i-learned-as-a-devops-fresher-81h</link>
      <guid>https://dev.to/dawood19/terraform-vs-ansible-what-i-learned-as-a-devops-fresher-81h</guid>
      <description>&lt;h1&gt;
  
  
  Terraform vs Ansible: What I Learned as a DevOps Fresher
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;As part of my DevOps learning journey, I recently explored two important automation tools: &lt;strong&gt;Terraform&lt;/strong&gt; and &lt;strong&gt;Ansible&lt;/strong&gt;. At first, I was confused because both tools are used in automation, but after learning and practicing, I understood that they solve different problems.&lt;/p&gt;

&lt;p&gt;In this blog, I’ll share what I learned about &lt;strong&gt;Terraform vs Ansible&lt;/strong&gt;, their differences, and when to use each one.&lt;/p&gt;




&lt;h2&gt;
  
  
  What is Terraform?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Terraform&lt;/strong&gt; is an &lt;strong&gt;Infrastructure as Code (IaC)&lt;/strong&gt; tool developed by HashiCorp.&lt;/p&gt;

&lt;p&gt;It helps us create and manage cloud infrastructure using code instead of manually creating resources in cloud platforms like AWS, Azure, or GCP.&lt;/p&gt;

&lt;p&gt;Using Terraform, we can create:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;EC2 Instances&lt;/li&gt;
&lt;li&gt;IAM Users&lt;/li&gt;
&lt;li&gt;S3 Buckets&lt;/li&gt;
&lt;li&gt;VPCs&lt;/li&gt;
&lt;li&gt;RDS Databases&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Terraform uses configuration files written in &lt;strong&gt;HCL (HashiCorp Configuration Language)&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Example Terraform workflow:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;terraform init
terraform plan
terraform apply
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbi8b28gqjey2dc4gcuvh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbi8b28gqjey2dc4gcuvh.png" alt=" " width="800" height="702"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Caption:&lt;br&gt;
Terraform provisioning AWS infrastructure&lt;/p&gt;


&lt;h2&gt;
  
  
  What is Ansible?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Ansible&lt;/strong&gt; is an &lt;strong&gt;automation and configuration management tool&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;It helps configure servers, install software, automate tasks, and manage application deployments.&lt;/p&gt;

&lt;p&gt;For example, Ansible can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Install Nginx or Apache&lt;/li&gt;
&lt;li&gt;Configure Linux servers&lt;/li&gt;
&lt;li&gt;Deploy applications&lt;/li&gt;
&lt;li&gt;Automate repetitive tasks&lt;/li&gt;
&lt;li&gt;Manage multiple servers&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Ansible uses &lt;strong&gt;YAML playbooks&lt;/strong&gt; for automation.&lt;/p&gt;

&lt;p&gt;Example command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ansible-playbook playbook.yml
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwlqne1vxkx5jumq29i7l.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwlqne1vxkx5jumq29i7l.png" alt=" " width="800" height="515"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Caption:&lt;br&gt;
Ansible automating server configuration&lt;/p&gt;




&lt;h2&gt;
  
  
  Terraform vs Ansible
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Terraform&lt;/th&gt;
&lt;th&gt;Ansible&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Infrastructure provisioning&lt;/td&gt;
&lt;td&gt;Configuration management&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Creates cloud resources&lt;/td&gt;
&lt;td&gt;Configures servers&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Uses HCL language&lt;/td&gt;
&lt;td&gt;Uses YAML&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Agentless&lt;/td&gt;
&lt;td&gt;Agentless&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Best for cloud infrastructure&lt;/td&gt;
&lt;td&gt;Best for automation &amp;amp; configuration&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  Real Example
&lt;/h2&gt;

&lt;p&gt;If I want to create an EC2 instance in AWS, I can use &lt;strong&gt;Terraform&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Once the EC2 instance is created, I can use &lt;strong&gt;Ansible&lt;/strong&gt; to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Install software&lt;/li&gt;
&lt;li&gt;Configure the server&lt;/li&gt;
&lt;li&gt;Deploy applications&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This means both tools can work together.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Terraform creates infrastructure → Ansible configures it&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fn2tnqcbhq0zldvqims0g.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fn2tnqcbhq0zldvqims0g.png" alt=" " width="800" height="458"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Caption:&lt;br&gt;
Terraform and Ansible working together in DevOps&lt;/p&gt;




&lt;h2&gt;
  
  
  Key Differences I Learned
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Terraform
&lt;/h3&gt;

&lt;p&gt;✅ Best for cloud resource provisioning&lt;br&gt;
✅ Works well with AWS, Azure, and GCP&lt;br&gt;
✅ Uses Infrastructure as Code (IaC)&lt;/p&gt;

&lt;h3&gt;
  
  
  Ansible
&lt;/h3&gt;

&lt;p&gt;✅ Best for server configuration&lt;br&gt;
✅ Easy automation using YAML&lt;br&gt;
✅ Useful for deployment and administration&lt;/p&gt;




&lt;h2&gt;
  
  
  Challenges I Faced
&lt;/h2&gt;

&lt;p&gt;While learning both tools, I faced a few challenges:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Understanding the difference between provisioning and configuration&lt;/li&gt;
&lt;li&gt;Terraform syntax errors&lt;/li&gt;
&lt;li&gt;YAML indentation mistakes in Ansible&lt;/li&gt;
&lt;li&gt;AWS permission-related issues&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;After practicing hands-on, the concepts became much clearer.&lt;/p&gt;




&lt;h2&gt;
  
  
  My Learning
&lt;/h2&gt;

&lt;p&gt;After learning both tools, I understood:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Terraform is used to create infrastructure, while Ansible is used to configure infrastructure.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Both tools are important in DevOps and often work together in real projects.&lt;/p&gt;




&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Learning Terraform and Ansible helped me better understand DevOps automation. Instead of manually creating and configuring infrastructure, these tools help automate everything efficiently.&lt;/p&gt;

&lt;p&gt;I’m continuing to explore more DevOps tools through hands-on learning and projects.&lt;/p&gt;

&lt;p&gt;Thank you for reading!&lt;/p&gt;

</description>
      <category>automation</category>
      <category>beginners</category>
      <category>devops</category>
      <category>terraform</category>
    </item>
    <item>
      <title>How I Created an EC2 Instance, IAM User, and S3 Bucket Using Terraform on AWS</title>
      <dc:creator>Dawood</dc:creator>
      <pubDate>Mon, 01 Jun 2026 15:42:14 +0000</pubDate>
      <link>https://dev.to/dawood19/how-i-created-an-ec2-instance-iam-user-and-s3-bucket-using-terraform-on-aws-4p42</link>
      <guid>https://dev.to/dawood19/how-i-created-an-ec2-instance-iam-user-and-s3-bucket-using-terraform-on-aws-4p42</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;As part of my DevOps learning journey, I recently explored &lt;strong&gt;Terraform&lt;/strong&gt;, an Infrastructure as Code (IaC) tool that helps automate cloud resource provisioning. Instead of manually creating resources in AWS, Terraform allows us to define infrastructure using code.&lt;/p&gt;

&lt;p&gt;In this blog, I’ll share how I used Terraform to create an &lt;strong&gt;EC2 instance&lt;/strong&gt;, &lt;strong&gt;IAM user&lt;/strong&gt;, and &lt;strong&gt;S3 bucket&lt;/strong&gt; in AWS.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1nz1buokrbdsyzebzdk1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1nz1buokrbdsyzebzdk1.png" alt=" " width="721" height="408"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  What is Terraform?
&lt;/h2&gt;

&lt;p&gt;Terraform is an &lt;strong&gt;open-source Infrastructure as Code (IaC) tool&lt;/strong&gt; developed by HashiCorp. It helps automate cloud infrastructure creation using configuration files.&lt;/p&gt;

&lt;p&gt;With Terraform, we can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Automate infrastructure setup&lt;/li&gt;
&lt;li&gt;Manage cloud resources efficiently&lt;/li&gt;
&lt;li&gt;Reduce manual work&lt;/li&gt;
&lt;li&gt;Maintain consistent environments&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Instead of creating resources manually in AWS Console, Terraform allows us to create them using code.&lt;/p&gt;




&lt;h2&gt;
  
  
  AWS Resources I Created
&lt;/h2&gt;

&lt;p&gt;In this project, I created:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;EC2 Instance&lt;/strong&gt; – To launch a virtual server in AWS&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;IAM User&lt;/strong&gt; – To manage permissions securely&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;S3 Bucket&lt;/strong&gt; – To store files and objects in AWS&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;p&gt;Before starting, I completed the following setup:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;AWS Account&lt;/li&gt;
&lt;li&gt;AWS CLI configured&lt;/li&gt;
&lt;li&gt;Terraform installed&lt;/li&gt;
&lt;li&gt;IAM permissions for resource creation&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Step 1: Configure AWS Credentials
&lt;/h2&gt;

&lt;p&gt;First, I configured AWS credentials using AWS CLI:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;aws configure
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then I entered:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;AWS Access Key&lt;/li&gt;
&lt;li&gt;Secret Access Key&lt;/li&gt;
&lt;li&gt;Region&lt;/li&gt;
&lt;li&gt;Output format&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This allows Terraform to communicate with AWS.&lt;/p&gt;




&lt;h2&gt;
  
  
  Step 2: Write Terraform Configuration
&lt;/h2&gt;

&lt;p&gt;I created Terraform configuration files to define AWS resources.&lt;/p&gt;

&lt;p&gt;The configuration included:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Provider configuration for AWS&lt;/li&gt;
&lt;li&gt;EC2 instance setup&lt;/li&gt;
&lt;li&gt;IAM user creation&lt;/li&gt;
&lt;li&gt;S3 bucket configuration&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Terraform uses &lt;code&gt;.tf&lt;/code&gt; files to define infrastructure.&lt;/p&gt;




&lt;h2&gt;
  
  
  Step 3: Initialize Terraform
&lt;/h2&gt;

&lt;p&gt;To initialize Terraform, I used:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;terraform init
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This command downloads required provider plugins.&lt;/p&gt;




&lt;h2&gt;
  
  
  Step 4: Review Infrastructure Changes
&lt;/h2&gt;

&lt;p&gt;Before creating resources, I checked the execution plan:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;terraform plan
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This command shows what resources Terraform will create.&lt;/p&gt;




&lt;h2&gt;
  
  
  Step 5: Create AWS Resources
&lt;/h2&gt;

&lt;p&gt;Finally, I applied the configuration:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;terraform apply
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After confirmation, Terraform successfully created:&lt;/p&gt;

&lt;p&gt;✅ EC2 Instance&lt;br&gt;
✅ IAM User&lt;br&gt;
✅ S3 Bucket&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flolz57j49dmjhs6n9zo0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flolz57j49dmjhs6n9zo0.png" alt=" " width="800" height="357"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxzzz52xw3rnkni011cma.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxzzz52xw3rnkni011cma.png" alt=" " width="799" height="362"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Foivmis2dauyqmwj3zh6g.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Foivmis2dauyqmwj3zh6g.png" alt=" " width="800" height="358"&gt;&lt;/a&gt;&lt;/p&gt;


&lt;h2&gt;
  
  
  Challenges I Faced
&lt;/h2&gt;

&lt;p&gt;While working on this project, I encountered a few issues such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Incorrect AMI ID&lt;/li&gt;
&lt;li&gt;Permission-related errors&lt;/li&gt;
&lt;li&gt;Terraform syntax mistakes&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;By checking error messages and updating configurations, I was able to resolve them.&lt;/p&gt;


&lt;h2&gt;
  
  
  Key Learnings
&lt;/h2&gt;

&lt;p&gt;Through this project, I learned:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Basics of Terraform&lt;/li&gt;
&lt;li&gt;Infrastructure as Code (IaC)&lt;/li&gt;
&lt;li&gt;AWS resource automation&lt;/li&gt;
&lt;li&gt;Terraform commands like &lt;code&gt;init&lt;/code&gt;, &lt;code&gt;plan&lt;/code&gt;, and &lt;code&gt;apply&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;


&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;This hands-on project helped me understand how Terraform simplifies cloud infrastructure management. Instead of manually creating AWS resources, I learned how to automate everything using code.&lt;/p&gt;

&lt;p&gt;I’m continuing to explore more DevOps tools and cloud technologies as part of my learning journey.&lt;/p&gt;

&lt;p&gt;Thank you for reading!&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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