<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Gamoudi Seif on Medium]]></title>
        <description><![CDATA[Stories by Gamoudi Seif on Medium]]></description>
        <link>https://medium.com/@gamoudi.seif?source=rss-1c3a2c89fd5e------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*sHatK388oM8DFlES</url>
            <title>Stories by Gamoudi Seif on Medium</title>
            <link>https://medium.com/@gamoudi.seif?source=rss-1c3a2c89fd5e------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 13:04:54 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@gamoudi.seif/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[The DRY Delusion in Terraform: A Rant on the Tyranny of Abstraction]]></title>
            <link>https://medium.com/@gamoudi.seif/the-dry-delusion-in-terraform-a-rant-on-the-tyranny-of-abstraction-654f044a19e0?source=rss-1c3a2c89fd5e------2</link>
            <guid isPermaLink="false">https://medium.com/p/654f044a19e0</guid>
            <category><![CDATA[infrastructure-as-code]]></category>
            <category><![CDATA[devops-culture]]></category>
            <category><![CDATA[terraform]]></category>
            <category><![CDATA[dry-principle]]></category>
            <dc:creator><![CDATA[Gamoudi Seif]]></dc:creator>
            <pubDate>Wed, 19 Feb 2025 14:21:42 GMT</pubDate>
            <atom:updated>2025-02-19T14:21:42.435Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pbwOSJUe8e4kZcMe2XJN4A.jpeg" /></figure><p>There’s a pervasive ideology that grips every developer’s mind these days — a holy creed called “Don’t Repeat Yourself.” Its evangelists trumpet it from the rooftops as the ultimate virtue in code, insisting that every duplication is a sin against maintainability and clarity. But when it comes to Terraform, this so-called golden rule is nothing more than a self-imposed straitjacket that suffocates real-world infrastructure management.</p><p>Let’s face it: the DRY principle, when taken to extremes, is an abomination. It forces you into a labyrinth of overly abstracted modules that promise reusable, elegant solutions but end up being incomprehensible beasts. Instead of liberating your code from redundancy, DRY in Terraform shackles you to convoluted, one-size-fits-all modules that make even the simplest change a blood-soaked battle with endless indirection.</p><p><strong>The Pitfalls of Over-Abstraction</strong></p><p>Terraform is a declarative tool designed to manage infrastructure in a predictable way. Yet, under the iron grip of DRY, developers feel compelled to abstract every single resource into modules. The idea is to avoid repetition at all costs. But here’s the brutal truth: this pursuit of abstract purity often leads to a tangled spaghetti mess of modules that hide the very details you need to understand what’s really going on.</p><p>Imagine debugging an issue in your infrastructure: you’re forced to wade through layers of abstraction, chasing references from one module to another, only to find that a tiny tweak in one part of your code demands you unravel a century-old knot of DRY-compliant modules. Instead of clear, explicit definitions that let you quickly grasp the system’s state, you’re left with a bloated, self-contradictory maze that screams, “I’m too abstract for my own good!”</p><p><strong>Repetition as a Tool for Clarity</strong></p><p>What’s so wrong with repeating a few lines here and there? Repetition, in many cases, is the bedrock of clarity. When you duplicate certain parts of your Terraform configuration, you’re not being lazy — you’re being explicit. You’re stating your intentions in black and white, leaving no room for hidden behavior or mysterious side effects. Yes, it might mean writing a few extra lines of code, but those lines are a beacon of clarity in a sea of abstraction. They make the configuration tangible, understandable, and easier to change on the fly.</p><p>The DRY fanaticism, with its obsessive hunt for modular reuse, has become a counterproductive dogma. It turns our infrastructure code into a cryptic puzzle where simple tweaks require Herculean efforts to locate the right module and then decipher its many layers of generic, parameterized variables. When a change is needed, you aren’t empowered by reusable code — you’re enslaved by an over-engineered monster that resists any attempt to evolve with your needs.</p><p><strong>Terraform’s Domain Demands Flexibility</strong></p><p>Infrastructure is not like writing a library in a high-level programming language. When you’re working with Terraform, you’re managing the real world — servers, networks, and resources that directly affect your business. The rigid adherence to DRY in this realm can be downright dangerous. It forces you to over-optimize for reusability at the expense of straightforward, declarative code that reflects the current state of your infrastructure.</p><p>In many cases, repeating a resource block explicitly can serve as a vital “safety valve.” It allows you to see each resource in isolation, making it easier to diagnose issues, roll back changes, or adapt configurations for specific environments. DRY, with its obsession for “one true module” to rule them all, strips away that nuance. It’s akin to trading a detailed map for a single, vague sketch — you might eventually get where you’re going, but not without significant detours, missteps, and, ultimately, frustration.</p><p><strong>The Tyranny of “No Duplication”</strong></p><p>The mantra “Don’t Repeat Yourself” has been elevated to an unassailable law by many, but in Terraform, this law is less of a guiding principle and more of a tyrannical edict. It whispers into the ears of developers, “Any repetition is a sin.” But in practice, this leads to code that is neither elegant nor efficient — it is convoluted, opaque, and a breeding ground for miscommunication between teams.</p><p>When everyone is forced to adhere to a strict DRY approach, you lose the organic, context-sensitive adaptations that a well-tended infrastructure requires. Instead of celebrating the uniqueness of each environment and resource, you’re compelled to mold everything into the same cookie-cutter module. This one-size-fits-all mentality is a betrayal of Terraform’s declarative nature — it’s like trying to force a square peg into a round hole, every single time.</p><p><strong>A Call to Reevaluate the Dogma</strong></p><p>It’s time we stop worshiping DRY as the ultimate principle of code design, especially in the world of Terraform. Yes, reuse is valuable, and abstraction has its place, but it should never come at the expense of clarity, maintainability, or sanity. Sometimes, a bit of repetition is not only acceptable — it’s essential. Let’s break free from the tyranny of “no duplication” and embrace a more pragmatic approach that values explicitness and flexibility over abstract perfection.</p><p>In conclusion, while DRY may have its place in certain realms of software development, in Terraform it can quickly become a curse rather than a blessing. We need to push back against this dogma and create infrastructure code that is honest, clear, and directly reflective of the systems we manage. Repetition, when used judiciously, can be a powerful ally in the quest for maintainable and robust configurations. Enough with the abstract insanity — let’s get back to practical, transparent code that works in the real world!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=654f044a19e0" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>