[{"data":1,"prerenderedAt":519},["ShallowReactive",2],{"blog-en-terraform-works-but-nobody-dares-to-touch-it":3},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"date":10,"slug":11,"translationKey":12,"author":13,"image":14,"tags":15,"language":20,"format":21,"body":22,"_type":513,"_id":514,"_source":515,"_file":516,"_stem":517,"_extension":518},"/en/blog/2026-06-01-terraform-works-but-nobody-dares-to-touch-it","blog",false,"","Terraform works, but nobody dares to touch it: how to tell if your IaC needs tidying up","How to spot when Terraform has become a source of operational risk and what to put in order first without a complete rewrite.","2026-06-01","terraform-works-but-nobody-dares-to-touch-it","terraform-trust-and-order","Alejandro Rodríguez","/blog/terraform-funciona-pero-nadie-se-atreve-a-tocarlo-hero.png",[16,17,18,19],"terraform","iac","aws","platform-engineering","en","decision-post",{"type":23,"children":24,"toc":499},"root",[25,33,39,53,58,63,70,75,80,85,90,95,101,106,111,116,122,127,132,137,142,148,153,158,163,168,174,185,190,195,200,205,210,216,221,226,231,236,242,247,260,265,270,275,281,286,291,296,301,307,312,317,357,362,367,372,378,392,397,402,407,412,418],{"type":26,"tag":27,"props":28,"children":30},"element","h1",{"id":29},"terraform-works-but-nobody-dares-to-touch-it-how-to-tell-if-your-iac-needs-tidying-up",[31],{"type":32,"value":8},"text",{"type":26,"tag":34,"props":35,"children":36},"p",{},[37],{"type":32,"value":38},"Terraform can apply changes correctly and still have become an operational risk.",{"type":26,"tag":34,"props":40,"children":41},{},[42,44,51],{"type":32,"value":43},"A failed ",{"type":26,"tag":45,"props":46,"children":48},"code",{"className":47},[],[49],{"type":32,"value":50},"apply",{"type":32,"value":52}," is not always the giveaway. Sometimes the signal is quieter: the team avoids touching it. A small change gets postponed, only one person understands the modules, reviewing a plan creates tension, and any infrastructure adjustment feels more delicate than it should.",{"type":26,"tag":34,"props":54,"children":55},{},[56],{"type":32,"value":57},"For a CTO, founder, engineering manager or technical lead running production on AWS, that matters. Infrastructure as code should provide control and traceability, not become a black box that holds the team back.",{"type":26,"tag":34,"props":59,"children":60},{},[61],{"type":32,"value":62},"The answer should rarely start with “let's rewrite all our Terraform”. Many platforms need something less eye-catching and more useful: putting in order the pieces that let the team change infrastructure with confidence again.",{"type":26,"tag":64,"props":65,"children":67},"h2",{"id":66},"the-warning-sign-is-not-just-terraform-failing",[68],{"type":32,"value":69},"The warning sign is not just Terraform failing",{"type":26,"tag":34,"props":71,"children":72},{},[73],{"type":32,"value":74},"When Terraform fails visibly, the problem usually becomes apparent quickly: a resource does not get created, a permission is missing, or a dependency is defined incorrectly.",{"type":26,"tag":34,"props":76,"children":77},{},[78],{"type":32,"value":79},"The difficult case is when everything seems to work, but the team has learned not to touch too much.",{"type":26,"tag":34,"props":81,"children":82},{},[83],{"type":32,"value":84},"That fear often builds up gradually. There is a reasonable structure to begin with. Then come urgent requests, exceptions, copied modules, manual changes, unclear environments and undocumented decisions. Over time, Terraform stops being a shared tool and becomes territory that only a few people understand.",{"type":26,"tag":34,"props":86,"children":87},{},[88],{"type":32,"value":89},"The problem is not Terraform in the abstract. Terraform needs state to connect the declared configuration to real resources and determine which changes to propose or apply. It also lets you review plans before making changes. Fragility appears when the team does not understand how those pieces are governed.",{"type":26,"tag":34,"props":91,"children":92},{},[93],{"type":32,"value":94},"These are signs that your IaC needs tidying up.",{"type":26,"tag":64,"props":96,"children":98},{"id":97},"_1-state-is-a-black-box-for-most-of-the-team",[99],{"type":32,"value":100},"1. State is a black box for most of the team",{"type":26,"tag":34,"props":102,"children":103},{},[104],{"type":32,"value":105},"State is a critical part of Terraform. If nobody knows where it lives, who can access it, how it is protected or which backend is in use, the team is operating with an important dependency and insufficient visibility.",{"type":26,"tag":34,"props":107,"children":108},{},[109],{"type":32,"value":110},"That does not mean everyone needs to manipulate state. Quite the opposite: it should not be treated like an ordinary file. But there should be basic clarity about where it is, how concurrent operations are locked if the backend supports locking, which permissions exist, and what would happen if someone ran changes from the wrong place.",{"type":26,"tag":34,"props":112,"children":113},{},[114],{"type":32,"value":115},"When state is a black box, every change feels like a gamble. Not because it will always break something, but because nobody can clearly explain what is at stake.",{"type":26,"tag":64,"props":117,"children":119},{"id":118},"_2-environments-are-not-clearly-separated",[120],{"type":32,"value":121},"2. Environments are not clearly separated",{"type":26,"tag":34,"props":123,"children":124},{},[125],{"type":32,"value":126},"Another common warning sign is that dev, staging and production exist in name, but not as clear operational boundaries.",{"type":26,"tag":34,"props":128,"children":129},{},[130],{"type":32,"value":131},"Sometimes they share too much configuration. Sometimes each environment has been built differently. It may also be unclear which variables change between environments, which modules are reused, which AWS accounts are involved, or which workflow allows changes to be promoted safely.",{"type":26,"tag":34,"props":133,"children":134},{},[135],{"type":32,"value":136},"There is no single correct structure for every team. Workspaces, directories, separate repositories or separate accounts may make sense depending on the context, but they do not provide the same isolation. Terraform CLI workspaces separate states within the same backend; they are not an adequate boundary when separate credentials and access controls are required. What matters is that the model is understandable and can answer simple questions: what am I changing, where am I changing it, and what impact could it have?",{"type":26,"tag":34,"props":138,"children":139},{},[140],{"type":32,"value":141},"If answering those questions always means asking the same person, the problem is not just technical. It is about ownership.",{"type":26,"tag":64,"props":143,"children":145},{"id":144},"_3-modules-abstract-so-much-that-nobody-knows-what-they-create",[146],{"type":32,"value":147},"3. Modules abstract so much that nobody knows what they create",{"type":26,"tag":34,"props":149,"children":150},{},[151],{"type":32,"value":152},"Modules are useful when they encapsulate repeatable patterns and raise the level of the discussion. The problem starts when they become an abstraction layer that hides decisions the team needs to understand.",{"type":26,"tag":34,"props":154,"children":155},{},[156],{"type":32,"value":157},"A module that is too generic, too configurable or poorly documented can make a small change have consequences that are hard to anticipate. It can also leave the team permanently unsure whether to modify the module, duplicate it, bypass it or create another exception.",{"type":26,"tag":34,"props":159,"children":160},{},[161],{"type":32,"value":162},"The question is not “should we use modules?”. It is whether the modules help the team operate better.",{"type":26,"tag":34,"props":164,"children":165},{},[166],{"type":32,"value":167},"A good module reduces repetition and makes important decisions explicit. A bad module turns infrastructure into a puzzle where everything depends on variables, conventions and context that is not written down anywhere.",{"type":26,"tag":64,"props":169,"children":171},{"id":170},"_4-plans-are-not-reviewed-they-are-accepted-out-of-trust-or-fatigue",[172],{"type":32,"value":173},"4. Plans are not reviewed: they are accepted out of trust or fatigue",{"type":26,"tag":34,"props":175,"children":176},{},[177,183],{"type":26,"tag":45,"props":178,"children":180},{"className":179},[],[181],{"type":32,"value":182},"terraform plan",{"type":32,"value":184}," exists to anticipate changes before applying them. But in many teams, meaningful plan review deteriorates over time.",{"type":26,"tag":34,"props":186,"children":187},{},[188],{"type":32,"value":189},"Plans get skimmed. People trust that there will be no surprises. They accept a plan because the change seems small. Or they leave it to the only person who “understands Terraform”.",{"type":26,"tag":34,"props":191,"children":192},{},[193],{"type":32,"value":194},"That pattern is dangerous, not because every plan is difficult, but because it removes one of the best opportunities to detect impact before touching infrastructure.",{"type":26,"tag":34,"props":196,"children":197},{},[198],{"type":32,"value":199},"A healthy review does not need a heavyweight ceremony. It needs a readable plan, context for the change, the right people able to review it, and production that does not depend on applying something nobody has dared to question.",{"type":26,"tag":34,"props":201,"children":202},{},[203],{"type":32,"value":204},"If the plan proposes unexpected deletions or replacements, stop and clarify dependencies, impact and recovery before applying it. The state file should not be edited by hand, nor should it be forcibly unlocked to bypass an operation that may still be running.",{"type":26,"tag":34,"props":206,"children":207},{},[208],{"type":32,"value":209},"If the team runs plans it does not understand, Terraform stops being a form of control and starts looking too much like hope.",{"type":26,"tag":64,"props":211,"children":213},{"id":212},"_5-drift-and-manual-changes-nobody-wants-to-acknowledge",[214],{"type":32,"value":215},"5. Drift and manual changes nobody wants to acknowledge",{"type":26,"tag":34,"props":217,"children":218},{},[219],{"type":32,"value":220},"Drift occurs when managed resources change outside the Terraform workflow and no longer match the configuration. It can result from manual changes, urgent work, experiments or hotfixes. Resources created outside Terraform and never imported are a separate inventory and management gap: a plan does not automatically discover them or add them to state.",{"type":26,"tag":34,"props":222,"children":223},{},[224],{"type":32,"value":225},"The problem is not that this happens once. Exceptions exist in real platforms. The problem is not having a process to detect it, understand it and decide whether to correct it in code or accept it as an explicit decision.",{"type":26,"tag":34,"props":227,"children":228},{},[229],{"type":32,"value":230},"When drift becomes normal, the team starts to distrust Terraform. It no longer knows whether the code represents production, whether a plan will try to undo something important, or whether critical resources exist outside the declared model.",{"type":26,"tag":34,"props":232,"children":233},{},[234],{"type":32,"value":235},"Putting IaC in order does not mean pursuing impossible purity. It means making sure exceptions are not invisible.",{"type":26,"tag":64,"props":237,"children":239},{"id":238},"_6-secrets-permissions-and-access-are-mixed-together-without-much-intent",[240],{"type":32,"value":241},"6. Secrets, permissions and access are mixed together without much intent",{"type":26,"tag":34,"props":243,"children":244},{},[245],{"type":32,"value":246},"Secrets and permissions deserve particular care. Terraform may need credentials, tokens or sensitive values, and both state and certain plan files can contain sensitive information.",{"type":26,"tag":34,"props":248,"children":249},{},[250,252,258],{"type":32,"value":251},"Marking a value as ",{"type":26,"tag":45,"props":253,"children":255},{"className":254},[],[256],{"type":32,"value":257},"sensitive",{"type":32,"value":259}," hides it in normal output, but does not, by itself, prevent it from being stored in state or plans. Those files must be treated as sensitive and protected with access controls and encryption appropriate to the backend.",{"type":26,"tag":34,"props":261,"children":262},{},[263],{"type":32,"value":264},"That is why it is worth reviewing how responsibilities are separated: who can read, who can apply, where sensitive variables are stored, which permissions the pipeline has, and what access actually exists to the backend.",{"type":26,"tag":34,"props":266,"children":267},{},[268],{"type":32,"value":269},"A diagnostic article does not need to become a security guide. But if nobody can clearly explain which sensitive information Terraform handles and who can see it, things need to be put in order before expanding the use of IaC.",{"type":26,"tag":34,"props":271,"children":272},{},[273],{"type":32,"value":274},"Here, caution is worth more than heroics.",{"type":26,"tag":64,"props":276,"children":278},{"id":277},"_7-the-knowledge-lives-with-one-person",[279],{"type":32,"value":280},"7. The knowledge lives with one person",{"type":26,"tag":34,"props":282,"children":283},{},[284],{"type":32,"value":285},"The most human warning sign of all: “better let X handle this”.",{"type":26,"tag":34,"props":287,"children":288},{},[289],{"type":32,"value":290},"X may be brilliant. The platform may work thanks to their judgement. But if the system depends on one particular person reviewing every plan, remembering every exception and knowing which module should not be touched, the team has an organisational weakness.",{"type":26,"tag":34,"props":292,"children":293},{},[294],{"type":32,"value":295},"Infrastructure as code should make collaboration easier. If it becomes a private language, something has gone wrong.",{"type":26,"tag":34,"props":297,"children":298},{},[299],{"type":32,"value":300},"The solution is not to ask everyone to become an expert in every resource. It is to make the essentials visible: structure, ownership, review workflow, important decisions and safety boundaries.",{"type":26,"tag":64,"props":302,"children":304},{"id":303},"what-to-put-in-order-first-without-rewriting-all-the-infrastructure",[305],{"type":32,"value":306},"What to put in order first without rewriting all the infrastructure",{"type":26,"tag":34,"props":308,"children":309},{},[310],{"type":32,"value":311},"When Terraform feels risky, a complete rewrite can be tempting. Sometimes it will be necessary, but it should not be the default starting point.",{"type":26,"tag":34,"props":313,"children":314},{},[315],{"type":32,"value":316},"First, take a more measured diagnostic approach:",{"type":26,"tag":318,"props":319,"children":320},"ul",{},[321,327,332,337,342,347,352],{"type":26,"tag":322,"props":323,"children":324},"li",{},[325],{"type":32,"value":326},"where state lives and how it is protected;",{"type":26,"tag":322,"props":328,"children":329},{},[330],{"type":32,"value":331},"how environments and accounts are separated;",{"type":26,"tag":322,"props":333,"children":334},{},[335],{"type":32,"value":336},"which modules are critical and which cause the most confusion;",{"type":26,"tag":322,"props":338,"children":339},{},[340],{"type":32,"value":341},"how plans are reviewed before applying them;",{"type":26,"tag":322,"props":343,"children":344},{},[345],{"type":32,"value":346},"what drift exists and how decisions about it are made;",{"type":26,"tag":322,"props":348,"children":349},{},[350],{"type":32,"value":351},"which secrets or sensitive data may appear in state or plans;",{"type":26,"tag":322,"props":353,"children":354},{},[355],{"type":32,"value":356},"who owns each part and what minimum documentation is missing.",{"type":26,"tag":34,"props":358,"children":359},{},[360],{"type":32,"value":361},"With that picture, prioritising becomes easier. Perhaps the first step is to organise the backend and permissions. Or separate environments. Or simplify two modules that concentrate too much complexity. Or introduce validation and pull request review. Or document the workflows that currently depend on tribal knowledge.",{"type":26,"tag":34,"props":363,"children":364},{},[365],{"type":32,"value":366},"The important thing is not to confuse putting things in order with rebuilding them.",{"type":26,"tag":34,"props":368,"children":369},{},[370],{"type":32,"value":371},"An inherited platform can improve in layers. That is often more realistic: reduce risk, rebuild confidence and enable small changes without blocking product work.",{"type":26,"tag":64,"props":373,"children":375},{"id":374},"when-an-external-review-makes-sense",[376],{"type":32,"value":377},"When an external review makes sense",{"type":26,"tag":34,"props":379,"children":380},{},[381,383,390],{"type":32,"value":382},"An ",{"type":26,"tag":384,"props":385,"children":387},"a",{"href":386},"/en/services/terraform-aws-foundations",[388],{"type":32,"value":389},"external review of Terraform and AWS foundations",{"type":32,"value":391}," can make sense when the team already knows there is friction but is unsure where to start.",{"type":26,"tag":34,"props":393,"children":394},{},[395],{"type":32,"value":396},"Especially if Terraform works, but every important change demands too much caution. If state is unclear. If modules are not understood. If production depends on one person. If nobody trusts the plan. Or if the team suspects that drift, secrets or permissions are mixed together in a way that is difficult to sustain.",{"type":26,"tag":34,"props":398,"children":399},{},[400],{"type":32,"value":401},"The review should not end with a generic list of best practices. It should separate urgent issues from secondary ones and propose a reasonable order: what to touch first, what to leave alone, what to document, and what to avoid turning into an unnecessary rewrite.",{"type":26,"tag":34,"props":403,"children":404},{},[405],{"type":32,"value":406},"Terraform should not be a source of fear.",{"type":26,"tag":34,"props":408,"children":409},{},[410],{"type":32,"value":411},"It should be a way to change infrastructure with greater clarity, traceability and control. If it works today but nobody dares to touch it, perhaps you do not need to start over. Perhaps you need to put enough in order for the team to trust what it already has again.",{"type":26,"tag":64,"props":413,"children":415},{"id":414},"sources-consulted",[416],{"type":32,"value":417},"Sources consulted",{"type":26,"tag":318,"props":419,"children":420},{},[421,443,455,467,487],{"type":26,"tag":322,"props":422,"children":423},{},[424,432,434,441],{"type":26,"tag":384,"props":425,"children":429},{"href":426,"rel":427},"https://developer.hashicorp.com/terraform/language/state",[428],"nofollow",[430],{"type":32,"value":431},"HashiCorp: Terraform state",{"type":32,"value":433}," and ",{"type":26,"tag":384,"props":435,"children":438},{"href":436,"rel":437},"https://developer.hashicorp.com/terraform/language/state/locking",[428],[439],{"type":32,"value":440},"state locking",{"type":32,"value":442},": resource mappings, storage, concurrent operations and caution when manipulating state.",{"type":26,"tag":322,"props":444,"children":445},{},[446,453],{"type":26,"tag":384,"props":447,"children":450},{"href":448,"rel":449},"https://developer.hashicorp.com/terraform/cli/workspaces",[428],[451],{"type":32,"value":452},"HashiCorp: Terraform CLI workspaces",{"type":32,"value":454},": state separation and limits on credential and access isolation.",{"type":26,"tag":322,"props":456,"children":457},{},[458,465],{"type":26,"tag":384,"props":459,"children":462},{"href":460,"rel":461},"https://developer.hashicorp.com/terraform/language/modules/develop",[428],[463],{"type":32,"value":464},"HashiCorp: module development",{"type":32,"value":466},": reusable, understandable abstractions without unnecessarily hiding the infrastructure.",{"type":26,"tag":322,"props":468,"children":469},{},[470,477,478,485],{"type":26,"tag":384,"props":471,"children":474},{"href":472,"rel":473},"https://developer.hashicorp.com/terraform/cli/commands/plan",[428],[475],{"type":32,"value":476},"HashiCorp: terraform plan",{"type":32,"value":433},{"type":26,"tag":384,"props":479,"children":482},{"href":480,"rel":481},"https://developer.hashicorp.com/terraform/tutorials/state/resource-drift",[428],[483],{"type":32,"value":484},"drift management",{"type":32,"value":486},": change review, comparison with managed resources and deliberate reconciliation.",{"type":26,"tag":322,"props":488,"children":489},{},[490,497],{"type":26,"tag":384,"props":491,"children":494},{"href":492,"rel":493},"https://developer.hashicorp.com/terraform/language/manage-sensitive-data",[428],[495],{"type":32,"value":496},"HashiCorp: sensitive data",{"type":32,"value":498},": the difference between hiding values in output and preventing or protecting their persistence.",{"title":7,"searchDepth":500,"depth":500,"links":501},2,[502,503,504,505,506,507,508,509,510,511,512],{"id":66,"depth":500,"text":69},{"id":97,"depth":500,"text":100},{"id":118,"depth":500,"text":121},{"id":144,"depth":500,"text":147},{"id":170,"depth":500,"text":173},{"id":212,"depth":500,"text":215},{"id":238,"depth":500,"text":241},{"id":277,"depth":500,"text":280},{"id":303,"depth":500,"text":306},{"id":374,"depth":500,"text":377},{"id":414,"depth":500,"text":417},"markdown","content:en:blog:2026-06-01-terraform-works-but-nobody-dares-to-touch-it.md","content","en/blog/2026-06-01-terraform-works-but-nobody-dares-to-touch-it.md","en/blog/2026-06-01-terraform-works-but-nobody-dares-to-touch-it","md",1795108324468]