<?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: Samuel Joseph</title>
    <description>The latest articles on DEV Community by Samuel Joseph (@samueljoseph).</description>
    <link>https://dev.to/samueljoseph</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%2F3031952%2F2a22a98b-47d7-414b-b0c6-0b7141c06fa0.png</url>
      <title>DEV Community: Samuel Joseph</title>
      <link>https://dev.to/samueljoseph</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/samueljoseph"/>
    <language>en</language>
    <item>
      <title>My Top 5 Terraform Practices from Real World Projects</title>
      <dc:creator>Samuel Joseph</dc:creator>
      <pubDate>Sat, 24 May 2025 01:03:01 +0000</pubDate>
      <link>https://dev.to/samueljoseph/my-top-5-terraform-practices-from-real-world-projects-48i4</link>
      <guid>https://dev.to/samueljoseph/my-top-5-terraform-practices-from-real-world-projects-48i4</guid>
      <description>&lt;p&gt;&lt;strong&gt;1. Use Remote State with State Locking&lt;/strong&gt;&lt;br&gt;
"Local state is fine - until it isn't."&lt;br&gt;
Storing Terraform state files locally is a recipe for drift and disaster when working in teams or automating with CI/CD. Always use remote state with locking mechanisms enabled.&lt;br&gt;
Preferred setup:&lt;br&gt;
Use Terraform Cloud, AWS S3 + DynamoDB, or Azure Storage + Blob Locking. Locking prevents race conditions in concurrent terraform apply executions. It also provides visibility and collaboration for teams.&lt;/p&gt;

&lt;p&gt;Example (AWS):&lt;br&gt;
&lt;code&gt;terraform {&lt;br&gt;
  backend "s3" {&lt;br&gt;
    bucket         = "my-tf-state"&lt;br&gt;
    key            = "dev/network/terraform.tfstate"&lt;br&gt;
    region         = "us-west-2"&lt;br&gt;
    dynamodb_table = "my-tf-locks"&lt;br&gt;
    encrypt        = true&lt;br&gt;
  }&lt;br&gt;
}&lt;/code&gt;&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;2. Modularize for Reusability and Consistency&lt;/strong&gt;&lt;br&gt;
"If you're copying and pasting Terraform code, you're doing it wrong."&lt;br&gt;
Modules help reduce code duplication and make infrastructure reusable across environments or projects. I've created core modules for VPCs, security groups, IAM roles, and ECS clusters, then customized them via inputs.&lt;br&gt;
Benefits:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Faster provisioning.&lt;/li&gt;
&lt;li&gt;Enforces organizational standards.&lt;/li&gt;
&lt;li&gt;Easier onboarding for new engineers.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Structure tip:&lt;br&gt;
&lt;code&gt;modules/&lt;br&gt;
  vpc/&lt;br&gt;
  ecs/&lt;br&gt;
  iam/&lt;br&gt;
environments/&lt;br&gt;
  dev/&lt;br&gt;
  prod/&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Keep your modules clean and version-controlled. Avoid over-engineering; start simple and refactor as you scale.3. Use Workspaces or Explicit Folder-Based Separation&lt;br&gt;
For smaller projects, Terraform workspaces can help manage multiple environments (e.g., dev, qa, prod) using the same code base. However, for complex setups, I prefer explicit directory separation.&lt;br&gt;
Why folder-based separation often wins:&lt;br&gt;
Easier CI/CD integration.&lt;br&gt;
Less risk of accidental environment switches.&lt;br&gt;
Better GitOps alignment.&lt;/p&gt;

&lt;p&gt;Example structure:&lt;br&gt;
&lt;code&gt;live/&lt;br&gt;
  dev/&lt;br&gt;
    main.tf&lt;br&gt;
  prod/&lt;br&gt;
    main.tf&lt;/code&gt;&lt;br&gt;
Combine this with strong naming conventions and tagging strategies to avoid resource confusion.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;4. Enforce Code Quality and Policy-as-Code&lt;/strong&gt;&lt;br&gt;
Terraform lets you define infrastructure as code, so treat it like software.&lt;br&gt;
Use tools like:&lt;br&gt;
tflint and terraform fmt for style and syntax.&lt;br&gt;
checkov or tfsec for security and compliance scanning.&lt;br&gt;
Sentinel or OPA (Open Policy Agent) for policy-as-code.&lt;/p&gt;

&lt;p&gt;Integrate these checks into your CI/CD pipelines to catch issues early.&lt;br&gt;
Example GitHub Actions snippet:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;name: Terraform Format
&lt;code&gt;run: terraform fmt -check -recursive&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;name: Run TFLint
&lt;code&gt;run: tflint --recursive&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;ol&gt;
&lt;li&gt;Tag Everything and Document Inputs/Outputs
When you return to a Terraform project after 6 months, or when someone else does,tags and documentation save the day.
Best practices:
Use consistent tagging across all resources (owner, environment, project, cost center).
Document module inputs and outputs with descriptions.
Use terraform-docs to generate README files for module&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Example:&lt;br&gt;
&lt;code&gt;variable "environment" {&lt;br&gt;
  description = "The environment to deploy (e.g. dev, prod)"&lt;br&gt;
  type        = string&lt;br&gt;
}&lt;br&gt;
output "vpc_id" {&lt;br&gt;
  description = "The ID of the created VPC"&lt;br&gt;
  value       = aws_vpc.main.id&lt;br&gt;
}&lt;/code&gt;&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Final Thoughts&lt;/strong&gt;&lt;br&gt;
These five practices; remote state, modularization, environment separation, code quality enforcement, and documentation, aren't just "nice to have." They're foundational. They've helped me avoid downtime, scale teams, and build resilient cloud platforms.&lt;/p&gt;

&lt;p&gt;If you're starting out with Terraform, start with one or two of these and iterate. If you're already deep into IaC, consider how your current workflows align with these principles.&lt;/p&gt;

&lt;p&gt;What are your top Terraform lessons from the field? I'd love to hear them.&lt;/p&gt;

&lt;h1&gt;
  
  
  Terraform #IaC #DevOps #CloudEngineering #InfrastructureAsCode #AWS #Azure #GCP #DevOpsBestPractices #CloudAutomation #TerraformModules #CICD #CloudInfrastructure #TerraformTips #DevOpsLife #TechLeadership
&lt;/h1&gt;

</description>
      <category>terraform</category>
      <category>devops</category>
      <category>cloudcomputing</category>
      <category>automation</category>
    </item>
    <item>
      <title>[Boost]</title>
      <dc:creator>Samuel Joseph</dc:creator>
      <pubDate>Mon, 12 May 2025 21:47:15 +0000</pubDate>
      <link>https://dev.to/samueljoseph/-4bfh</link>
      <guid>https://dev.to/samueljoseph/-4bfh</guid>
      <description>&lt;div class="ltag__link--embedded"&gt;
  &lt;div class="crayons-story "&gt;
  &lt;a href="https://dev.to/samueljoseph/why-your-cloud-strategy-keeps-failing-and-how-i-fixed-it-5al" class="crayons-story__hidden-navigation-link"&gt;Why Your Cloud Strategy Keeps Failing (And How I Fixed It)&lt;/a&gt;


  &lt;div class="crayons-story__body crayons-story__body-full_post"&gt;
    &lt;div class="crayons-story__top"&gt;
      &lt;div class="crayons-story__meta"&gt;
        &lt;div class="crayons-story__author-pic"&gt;

          &lt;a href="/samueljoseph" class="crayons-avatar  crayons-avatar--l  "&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%2Fuser%2Fprofile_image%2F3031952%2F2a22a98b-47d7-414b-b0c6-0b7141c06fa0.png" alt="samueljoseph profile" class="crayons-avatar__image"&gt;
          &lt;/a&gt;
        &lt;/div&gt;
        &lt;div&gt;
          &lt;div&gt;
            &lt;a href="/samueljoseph" class="crayons-story__secondary fw-medium m:hidden"&gt;
              Samuel Joseph
            &lt;/a&gt;
            &lt;div class="profile-preview-card relative mb-4 s:mb-0 fw-medium hidden m:inline-block"&gt;
              
                Samuel Joseph
                
              
              &lt;div id="story-author-preview-content-2482220" class="profile-preview-card__content crayons-dropdown branded-7 p-4 pt-0"&gt;
                &lt;div class="gap-4 grid"&gt;
                  &lt;div class="-mt-4"&gt;
                    &lt;a href="/samueljoseph" class="flex"&gt;
                      &lt;span class="crayons-avatar crayons-avatar--xl mr-2 shrink-0"&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%2Fuser%2Fprofile_image%2F3031952%2F2a22a98b-47d7-414b-b0c6-0b7141c06fa0.png" class="crayons-avatar__image" alt=""&gt;
                      &lt;/span&gt;
                      &lt;span class="crayons-link crayons-subtitle-2 mt-5"&gt;Samuel Joseph&lt;/span&gt;
                    &lt;/a&gt;
                  &lt;/div&gt;
                  &lt;div class="print-hidden"&gt;
                    
                      Follow
                    
                  &lt;/div&gt;
                  &lt;div class="author-preview-metadata-container"&gt;&lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;

          &lt;/div&gt;
          &lt;a href="https://dev.to/samueljoseph/why-your-cloud-strategy-keeps-failing-and-how-i-fixed-it-5al" class="crayons-story__tertiary fs-xs"&gt;&lt;time&gt;May 12 '25&lt;/time&gt;&lt;span class="time-ago-indicator-initial-placeholder"&gt;&lt;/span&gt;&lt;/a&gt;
        &lt;/div&gt;
      &lt;/div&gt;

    &lt;/div&gt;

    &lt;div class="crayons-story__indention"&gt;
      &lt;h2 class="crayons-story__title crayons-story__title-full_post"&gt;
        &lt;a href="https://dev.to/samueljoseph/why-your-cloud-strategy-keeps-failing-and-how-i-fixed-it-5al" id="article-link-2482220"&gt;
          Why Your Cloud Strategy Keeps Failing (And How I Fixed It)
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;div class="crayons-story__tags"&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/devops"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;devops&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/cloudcomputing"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;cloudcomputing&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/terraform"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;terraform&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/leadership"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;leadership&lt;/a&gt;
        &lt;/div&gt;
      &lt;div class="crayons-story__bottom"&gt;
        &lt;div class="crayons-story__details"&gt;
          &lt;a href="https://dev.to/samueljoseph/why-your-cloud-strategy-keeps-failing-and-how-i-fixed-it-5al" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left"&gt;
            &lt;div class="multiple_reactions_aggregate"&gt;
              &lt;span class="multiple_reactions_icons_container"&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/sparkle-heart-5f9bee3767e18deb1bb725290cb151c25234768a0e9a2bd39370c382d02920cf.svg" width="18" height="18"&gt;
                  &lt;/span&gt;
              &lt;/span&gt;
              &lt;span class="aggregate_reactions_counter"&gt;1&lt;span class="hidden s:inline"&gt; reaction&lt;/span&gt;&lt;/span&gt;
            &lt;/div&gt;
          &lt;/a&gt;
            &lt;a href="https://dev.to/samueljoseph/why-your-cloud-strategy-keeps-failing-and-how-i-fixed-it-5al#comments" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left flex items-center"&gt;
              Comments


              &lt;span class="hidden s:inline"&gt;Add Comment&lt;/span&gt;
            &lt;/a&gt;
        &lt;/div&gt;
        &lt;div class="crayons-story__save"&gt;
          &lt;small class="crayons-story__tertiary fs-xs mr-2"&gt;
            3 min read
          &lt;/small&gt;
            
              &lt;span class="bm-initial"&gt;
                

              &lt;/span&gt;
              &lt;span class="bm-success"&gt;
                

              &lt;/span&gt;
            
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;/div&gt;


</description>
      <category>devops</category>
      <category>cloudcomputing</category>
      <category>terraform</category>
      <category>leadership</category>
    </item>
    <item>
      <title>Why Your Cloud Strategy Keeps Failing (And How I Fixed It)</title>
      <dc:creator>Samuel Joseph</dc:creator>
      <pubDate>Mon, 12 May 2025 21:39:14 +0000</pubDate>
      <link>https://dev.to/samueljoseph/why-your-cloud-strategy-keeps-failing-and-how-i-fixed-it-5al</link>
      <guid>https://dev.to/samueljoseph/why-your-cloud-strategy-keeps-failing-and-how-i-fixed-it-5al</guid>
      <description>&lt;p&gt;Let’s be honest: most cloud “strategies” I come across aren’t really strategies — they’re glorified lift-and-shifts.&lt;/p&gt;

&lt;p&gt;On paper, migrating to the cloud promises flexibility, scalability, and cost savings. But in reality? Many organizations just copy their on-prem setup into AWS, Azure, or GCP — and call it done.&lt;/p&gt;

&lt;p&gt;As someone who’s spent years helping companies build scalable, secure, and cloud-native infrastructure across multi-cloud environments, I’ve seen this mistake over and over. But one project in particular made this painfully clear.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Lift-and-Shift That Didn’t Shift Anything&lt;/strong&gt;&lt;br&gt;
I had just joined a mid-sized financial services company as a Cloud Transformation Lead. Leadership proudly told me they were “70% in the cloud.” That should’ve been a good sign, right?&lt;/p&gt;

&lt;p&gt;But what I found was this:&lt;br&gt;
1.All their web, app, and database servers were provisioned on EC2 instances — &lt;strong&gt;configured almost exactly like their legacy setup.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;2.They managed access using manually configured Security Groups and Network ACLs — &lt;strong&gt;trying to mimic their old firewall rules.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;3.Scaling decisions were triggered manually: &lt;strong&gt;CloudWatch alarms were set to ping when CPU utilization went above 80% or dropped below 30%, at which point someone had to manually launch or terminate instances.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;4.All developers operated under IAM user credentials in a single shared AWS account - &lt;strong&gt;no role-based access, no federation, no real audit trail.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;To them, this was “cloud.” To me, this was a rented data center — with all the old problems, now in a shinier interface. It wasn’t a cloud strategy. It was a technical translation with none of the cloud-native benefits.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How We Fixed It: From LIFT and SHIFT to CLOUD NATIVE&lt;/strong&gt;&lt;br&gt;
I knew we had to shift our thinking — this wasn’t about fixing servers, it was about fixing mindset, processes, and architecture. Here’s how we turned it around:&lt;/p&gt;

&lt;p&gt;🔵 &lt;strong&gt;From Manual Scaling → Auto-Scaling&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Replaced reactive CPU alerts with &lt;strong&gt;Auto Scaling Groups + intelligent policies.&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Added &lt;strong&gt;Application Load Balancers&lt;/strong&gt; for dynamic traffic distribution.&lt;/li&gt;
&lt;li&gt;Result: Infrastructure scaled &lt;strong&gt;automatically&lt;/strong&gt; — no human intervention needed.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;🔵 &lt;strong&gt;From IAM Users → Federated, Role-Based Access&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Integrated &lt;strong&gt;AWS SSO&lt;/strong&gt; with their identity provider.&lt;/li&gt;
&lt;li&gt;Moved to &lt;strong&gt;least-privilege IAM roles&lt;/strong&gt;(mapped to teams/functions).&lt;/li&gt;
&lt;li&gt;Result: &lt;strong&gt;Tighter security&lt;/strong&gt;, easier audits, no more credential sprawl.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;🔵 &lt;strong&gt;From ClickOps → Infrastructure-as-Code&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Rewrote &lt;strong&gt;every security group, subnet, and alarm in Terraform.&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Infrastructure became &lt;strong&gt;version-controlled, peer-reviewed, and auditable.&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Result: No more “who changed what?” panic.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;🔵 &lt;strong&gt;From EC2-Centric → Cloud-Native&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Containerized apps → &lt;strong&gt;ECS + Fargate&lt;/strong&gt; (no more patching EC2).&lt;/li&gt;
&lt;li&gt;Let AWS handle scaling, provisioning, and maintenance.&lt;/li&gt;
&lt;li&gt;Result: &lt;strong&gt;Faster deployments, lower ops overhead.&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;The Results&lt;/strong&gt;&lt;br&gt;
Deployment times dropped from weeks to under an hour&lt;/p&gt;

&lt;p&gt;◼️Scaling became predictable and automatic&lt;/p&gt;

&lt;p&gt;◼️Developers no longer fought over IAM policies or waited for infra&lt;/p&gt;

&lt;p&gt;◼️We cut compute costs without sacrificing performance&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Most importantly;&lt;/strong&gt; The cloud stopped being someone else’s job. It became part of how every team delivered value.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Final Thought&lt;/strong&gt;&lt;br&gt;
Your cloud strategy isn’t failing because the cloud is broken. It’s failing because you’re treating the cloud like your old data center.&lt;/p&gt;

&lt;p&gt;If you’re still managing users manually, reacting to CPU alarms, and spinning up EC2s for every new service — you haven’t transformed. You’ve just migrated your problems.&lt;/p&gt;

&lt;p&gt;I’ve helped lead this change. I’ve lived through the mess. And I can tell you this: &lt;strong&gt;“Real cloud transformation happens when you stop lifting and start rethinking.”&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Let’s Connect&lt;/strong&gt;&lt;br&gt;
I’m Samuel Joseph, and I help companies turn their cloud chaos into clarity. If you’re stuck in a costly, rigid, or outdated cloud setup, let’s talk.&lt;/p&gt;

&lt;h1&gt;
  
  
  DevOps #CloudComputing #CloudStrategy #AWS #Azure #GCP #Terraform #Leadership
&lt;/h1&gt;

</description>
      <category>devops</category>
      <category>cloudcomputing</category>
      <category>terraform</category>
      <category>leadership</category>
    </item>
  </channel>
</rss>
