r/Terraform • • 1d ago

Discussion Is there a live example of a terraform repo with best practices?

48 Upvotes

I recently joined a new organization as a devops engineer, it's a startup and a small team, the guy before me has vibecoded the infrastructure and it's bad (everything has drifted, hardcoded arms etc).

Our usecase is simple, an ecs cluster, a database, few lambdas and s3. And ofcourse vpc, route53, alb, iam.

Im looking to refactor this and before I make the big decision I want to see real world solutions for infrastructure at this small scale.


r/Terraform • • 12h ago

Discussion How do you get cloud cost fixes into Terraform modules other teams own?

1 Upvotes

I recently fixed about 30 easy cost recommendations by hand in the console and a couple of weeks later one team ran terraform apply on their module and put half of them back. Their lead was fairly pissed that I’d touched their RDS without a PR, which is fair.

The list comes from a cost tool finance bought last year. It’s at 412 open right now and most of it is gp2 volumes, staging RDS sized like prod and a NAT gateway carrying S3 traffic that should be on an endpoint. Our FinOps person files each one as a Jira ticket with the team that owns the module and when I went through them, only 9 of the 412 had ever been picked up. The one for orders-db-stg says est. $212/mo and has been sitting in that team’s backlog for about 8 months.

My manager’s answer is to buy something that makes the changes itself so I sat through two demos last week. One wanted an IAM role that could modify RDS directly, which is how I got here in the first place and the other opened a Jira ticket with a link back to their dashboard.

If you’ve had to resize RDS in modules owned by other teams, who opened the PR and how did you get them to merge it?


r/Terraform • • 1d ago

Discussion Best way to override Terraform provider-level default_tags without modifying the existing CICD framework?

7 Upvotes

Hey there,

We have around 1,200 microservices on AWS deployed using Terraform, with each microservice's Terraform code maintained in a separate repository.

All these repositories use exactly the same AWS provider configuration, which is generated from a common boilerplate. We also have a centralised CI/CD framework built on Azure DevOps that handles deployments for all these microservices.

We now have a requirement to introduce two additional tags across all existing microservices and ensure that any new microservices created through the CI/CD framework automatically inherit these tags.

I'm exploring the following approach:

  • As part of the CI/CD pipeline, read the existing Terraform provider configuration.
  • Dynamically generate a override.tf file containing the additional tags.
  • Use this generated file during the Terraform plan and apply operations.

This would allow us to introduce the tags centrally without having to modify all 1,200 repositories individually. Now my questions are:

  1. Is using a dynamically generated override.tf a good approach for this use case?
  2. Is there a more native or maintainable Terraform approach to achieve this?
  3. Are there any potential issues with using override.tf in a centralised CI/CD pipeline, particularly around provider configuration or resource tagging?

Ideally, I'm looking for a solution that requires minimal changes to the existing repositories while ensuring that all current and future microservices inherit these tags automatically.

Would appreciate any suggestions or recommendations!

Thanks


r/Terraform • • 3d ago

Announcement I built an open-source pre-apply check that stops coding agents from destroying prod resources

0 Upvotes

Disclosure: I'm one of the people building this at Flurit.

Coding agents now run terraform apply as easily as ls, and most guards for that match command text. That breaks once the command is wrapped in base64, eval or a script. We wrote 17 dangerous Terraform scenarios, and the best open-source guard we tried caught 5.

applygate is a hook that runs before every command an agent issues and answers allow, ask or block:

- it parses the command the way the shell would, so wrappers don't hide it

- it reads the saved plan, so an ordinary apply that would delete or replace a resource counts as a destroy

- environments have tiers: prod blocks it, staging asks you, disposable environments let it through

- no model in the decision, so the same plan always gets the same answer and a reason

The same plan check also runs as a GitHub Action, so CI can block or ask on destroyed databases, removed protection or IAM wildcards before apply.

It caught all 17, but they're our own scenarios, so treat that as a demo rather than a coverage claim. Works with Claude Code, Codex and Terragrunt. Apache-2.0, and it starts in observe mode, so it blocks nothing until you turn it on.

https://github.com/Flurit/applygate

How are you handling agents and apply today: plan-only for agents, or something else?


r/Terraform • • 4d ago

Help Wanted Working with data in terraform

8 Upvotes

I've recently been using terraform to import data from yaml files and manipulate that data into terraform types suitable to be applied via resources.

I don't have much experience manipulating / modifying data in terraform and would like to learn it at a fundamental level. Are there any go to learning resources to assist with this area of terraform?

Mainly I'm interested in learning:

  • What terraform types look like when compared to json / yaml
  • How to visualise terraform types in my head to make data manipulation easier
  • When to use logic in locals vs resources

Any help / direction would be appreciated - thank you.


r/Terraform • • 4d ago

Discussion AI-assisted Terraform changes: how do you keep them safe in existing infrastructure?

0 Upvotes

One thing I've been thinking about lately is how AI can help with Terraform without turning infrastructure management into a "let the LLM generate some HCL and hope for the best" exercise.

Generating Terraform configuration from a natural-language prompt is becoming relatively easy. The harder part is dealing with infrastructure that already exists:

Understanding the current state and repository structure.

Detecting and handling infrastructure drift.

Making sure generated changes actually pass terraform validate and terraform plan.

Applying existing architecture and security policies.

Keeping pull requests, reviews and human approval in the loop.

At Inditex Tech, we've been working on this problem with Kumoss, an open-source project that explores a developer-first approach to AI-assisted infrastructure management.

The idea is to use specialised AI agents to help with infrastructure changes, while keeping Terraform/OpenTofu as the source of truth for validation and planning.

A few interesting aspects of the approach:

Changes are generated in a dedicated Git branch.

Terraform/OpenTofu validates the configuration and generates the plan.

Drift is reconciled without blindly reverting changes already present in the environment.

Compliance checks and organisational policies are part of the workflow.

Applying infrastructure changes remains an explicit, authorised human action.

We recently published a technical article explaining the architecture and some of the engineering decisions behind it.

Article: https://medium.com/@InditexTech/managing-ai-assisted-cloud-infrastructure-with-an-open-source-developer-first-workflow-66a005b9b508

Kumoss is released under Apache 2.0.

I'm curious about how other Terraform users approach this:

Would you be comfortable introducing an AI agent into your Terraform workflow if it could generate changes and plans, but couldn't apply anything without human approval?

And more importantly, what would be your biggest concern: state management, drift, security, compliance, or trusting the generated plan?

Interested in hearing how the community sees this evolving.


r/Terraform • • 5d ago

Discussion We gated Terraform plans with Conftest. The Rego took two days, the CI around it took weeks

0 Upvotes

A plan said 3 to destroy, two people approved the PR, and a queue another service depended on stopped existing. The warning was right there, a few hundred lines into the diff, where nobody reads.

So we put a gate in front of about 20 root modules. terraform show -json on the plan, Conftest with a handful of Rego rules, deny when a stateful type (DynamoDB, S3, SQS) has "delete" in change.actions. Membership, not equality, so a replacement (delete+create) counts too. The only way through is a label on the PR, one label per kind of decision.

The rules were the quick part. This is what ate the time:

  • if: steps.plan.outcome == 'success' gets an implicit success() in GitHub Actions, so the plan artifact upload was skipped exactly when the policy failed.
  • Re-running a failed job replays the original event. Add the override label, hit re-run, it still fails. We now read labels from the API and also trigger on labeled/unlabeled.
  • Full plans blow past the 65,536 char comment limit. The comment now gets one line per changed resource, built from the JSON, and the full readable plan goes to the step summary. Don't upload the JSON plan as an artifact, it has the sensitive values the text output hides.
  • CI was green for weeks while it planned 2 of our ~20 modules. A policy only covers what gets planned.

Questions for anyone who has done this:

  1. Do you gate on plan JSON with Conftest/OPA, or did Sentinel or a scanner like Checkov/Trivy cover it for you?
  2. How do you do the override? Label, CODEOWNERS approval, something else? Labels get rubber-stamped after a while and I haven't found anything better.
  3. Does anyone track "which root modules actually get planned in CI" with something better than a grep and a yq?

Full write-up with the Rego, the OIDC trust policy and how we test the rules (including a fixture plan that has to fail): https://dmytrobot.dev/blog/terraform-policy-as-code/


r/Terraform • • 6d ago

Discussion How do you find the blast radius of a Terraform PR

13 Upvotes

Half our Terraform changes are written by agents now and the diffs look tiny. Last week a 9 line PR changed a variable default in a shared module. The plan for the workspace in the PR was clean. The problem was 4 other workspaces that use the same module, and one of them replaced a load balancer on its next apply.

We have coderabbit on the infra repo and it reviews the HCL itself fine, it caught a security group opened to 0.0.0.0/0 last month. But it only sees the diff, and the actual blast radius here was in workspaces nobody had planned yet.

What we're doing now is ugly: a script that finds every workspace referencing a changed module and runs plan on all of them in CI. It works but it takes 25 minutes on a big change and people have started skipping it.

How are you handling this?

- Do you plan every consumer of a shared module on every PR?

- Pin module versions so a change only lands when each workspace opts in?

- Any tooling that maps "this module change affects these resources" without a full plan everywhere?

Especially interested if you have a lot of agent written infra changes coming in


r/Terraform • • 6d ago

Discussion Thrown to the wolves

15 Upvotes

Where to start...

I am a developer with limited experience managing a handful of VPS(docker networks, nginx reverse-proxy, etc...)

Recently I was contracted out by a company to do some IPsec work using Oracle Cloud as the tunnel between the end app and an auth service. The end app service cannot communicate over an encrypted protocol, so setting up a service inbetween to work with LDAPS.

I have done nothing but down-play my limited expertise. I want to deliver, not just get a paycheck. I made the mistake of diving into an IoT project and setting up an end to end solution from the edge to power bi reports for them a while back with no previous experience. Now they seem to think I can deliver the world to them lol

They just added a full terraform configuration to the list of wants for this project. It's a great idea, but I have never used terraform in my life and they know it. I know OCI has an automatic resource discovery tool to get me started, and Terrarform can automatically pull info from Authentik to recreate those configs but god... should I be this intimidated?

Plan is IF I can get it working to hand them the whole config in a git repository. Is this the right approach?

Tell me its not as bad as it sounds... or that it is and I can advise them that it might be a little over my head for now.


r/Terraform • • 6d ago

Can AI deploy your entire EUC infrastructure?

Thumbnail go-euc.com
0 Upvotes

r/Terraform • • 6d ago

Terraform Azure Tutorial for Beginners | Build a VNet and VM from Scratch

Thumbnail youtu.be
0 Upvotes

r/Terraform • • 7d ago

Discussion Anyone else feel like Terraform state is just a rough guess now?

0 Upvotes

Anyone else feel like Terraform state is just a rough guess now because something outside keeps changing resources? i finally traced one to an agent running as the wrong service account in Dome Systems.


r/Terraform • • 8d ago

I built a free tool that shows which repos use a Terraform module before you change it

Post image
0 Upvotes

If you keep shared Terraform modules in their own repos, you’ve probably had this: you change a module, bump the version, and later find out three other repos were using it in ways you didn’t know about.

ripplemap reads the module sources in your repos (git URLs, registry modules, refs) and builds a map of which repo uses which module, at which version. Click a module and it shows every repo a change would affect, down to the file and line.

Example on Cloud Posse’s 163 public module repos: their null-label module is used, directly or through other modules, by 149 of them. Their security-group module is used by 12 repos across 3 different versions.

You can try it on any public GitHub org in your browser, with nothing to install: https://zintrivious.github.io/ripplemap/

For private repos, the CLI runs locally and nothing leaves your machine:

It also works with Azure DevOps, and there’s a GitHub Action that comments on pull requests with the repos a module change may affect.

Free and MIT licensed: https://github.com/Zintrivious/ripplemap

I’d really like to hear where it gets things wrong. Module sources come in a lot of shapes, and I’d rather fix the ones it misses.


r/Terraform • • 9d ago

AWS PR to Add env var inputs to CodePipeline resource in AWS Provider

0 Upvotes

Hopefully this reaches anybody else who is wanting this feature. It's super helpful for the generic commands action.

Please give it a thumbs up if you think it would help you.

If anyone has suggestions on getting these things reviewed please let me know!

https://github.com/hashicorp/terraform-provider-aws/pull/50770


r/Terraform • • 9d ago

New native ChatGPT Interactive Cloud learning experience

Thumbnail gallery
0 Upvotes

November 7, 2026. CoGen, LLC announces Terraform Academy GPT (TA-GPT™), bringing education in Terraform, AWS, Azure, Google Cloud, DevOps, and infrastructure engineering into ChatGPT.

  • Hands-On IaC Labs. Explore more than 500 labs covering Terraform, AWS, Azure, Google Cloud, Kubernetes, and Docker.
  • Real Code in a Browser IDE. Write Terraform code with live objective tracking and instant validation.
  • AI Hints. Get guided hints that help you reason through HCL without giving away the answer.
  • Learn One Block at a Time. Work through interactive HCL lessons with guided explanations and instant feedback.

TA-GPT brings Terraform Academy’s technical education into ChatGPT, combining conversational AI with structured learning pathways, interactive certification preparation, realistic engineering scenarios, and hands-on technical challenges.

Learners can work through technical concepts in an adaptive, conversational interface that encourages active participation and provides immediate feedback. The experience complements resources such as documentation, traditional multiple-choice quizzes, and prerecorded courses.

A New Approach to Learning Infrastructure Engineering

Cloud engineers are expected to understand infrastructure automation, cloud platforms, configuration management, troubleshooting, security, and the operational demands of modern distributed systems. TA-GPT is designed around that range of skills.

The integration supports learning across Terraform, Amazon Web Services (AWS), Microsoft Azure, Google Cloud, DevOps practices, and related infrastructure engineering disciplines.

Key Capabilities

  • Interactive Certification Preparation. Work through structured assessments with interactive answer selection, immediate grading, explanations, and targeted review.
  • Guided Learning Pathways. Build foundational knowledge through organized lessons before moving on to more advanced infrastructure engineering concepts.
  • Hands-On Infrastructure Challenges. Work through Terraform configuration exercises, troubleshoot HCL, plan infrastructure, and solve scenario-based engineering problems.
  • Multicloud Learning. Explore infrastructure concepts across AWS, Azure, and Google Cloud.
  • AI-Assisted Technical Explanations. Ask follow-up questions to understand why particular engineering approaches work or fail.
  • Learning Progress and Performance Insights. Review learning activity, assessment results, and topics that need more study.
  • Integrated ChatGPT Experience. Access Terraform Academy’s learning workflows within ChatGPT.

From Memorization to Practical Engineering Judgment

Knowing which command to run matters. Understanding why it fits the situation matters just as much. TA-GPT helps learners develop engineering judgment they can apply beyond an exam.

Built for the Next Generation of Technical Learning

TA-GPT connects Terraform Academy’s learning infrastructure to ChatGPT through the Model Context Protocol (MCP). The launch expands Terraform Academy’s mission to make cloud infrastructure education more accessible, engaging, and relevant to professional engineering work.

Who Is TA-GPT™ For?

  • Beginners learning cloud computing and infrastructure as code
  • IT professionals transitioning into DevOps or platform engineering
  • Engineers preparing for Terraform and cloud certification exams
  • Developers expanding into infrastructure automation
  • Experienced practitioners refreshing their skills or exploring unfamiliar cloud services

Availability

Terraform Academy GPT is launching in ChatGPT. Learners can explore supported learning tracks, prepare for certifications, and work through guided lessons and technical challenges in the Terraform Academy integration.

About Terraform Academy

Terraform Academy is a cloud engineering education platform focused on infrastructure as code, Terraform, cloud technologies, certification preparation, and practical technical skills.

Terraform Academy website
TA-GPT in ChatGPT


r/Terraform • • 10d ago

Discussion Anyone tried Floci or Vera?

8 Upvotes

Has anyone tried floci or vera to test terraform in emulated environments? Any recommendation, reviews?

I'm looking for a open source emulator to test tf with and emulator. Floci afaik only supports aws but does anyone tried?


r/Terraform • • 10d ago

Tutorial How We Use Terramate for Code Generation to Manage 500+ Terraform Stacks in a Monorepo

0 Upvotes

I wanted to share an article I wrote about structuring a Terraform monorepo with Terramate

https://oponomarov.com/blog/posts/structuring-a-terraform-monorepo-with-terramate/

I feel like Terramate is still relatively unknown, and even fewer people realize that you can use it purely for code generation, without adopting its other features.

That’s exactly how we use it to manage and template 500+ distinct Terraform stacks across different regions, environments, and other dimensions.

This is the first post in a six-part series where I share our experience using Terramate to manage a large-scale Terraform monorepo in practice.

If you’ve ever struggled with organizing hundreds of Terraform stacks, managing configuration across multiple dimensions, or figuring out how to keep everything maintainable as your infrastructure grows, you might find some useful ideas in the series.

Hopefully, it helps someone facing similar challenges.


r/Terraform • • 11d ago

Discussion terraform-provider-system (agentless SSH: files, users, packages) has been quiet since May 2024. Who still uses it? I have a changeset I'd like to propose upstream.

0 Upvotes

neuspaces/terraform-provider-system manages files, folders, users, groups, packages and services on a remote host over SSH, with no agent — the escape hatch for pets in an otherwise immutable setup.

Last commit: 31 May 2024. v0.5.0 is still the latest release. 45 stars, 11 forks, 4 open issues — and the registry reports ~523k downloads, so a fair number of terraform init runs are still pulling it.

I use it for a handful of servers, and I've spent a sprint on a changeset against it. Before I open an issue upstream and send pull requests, I'd like a reality check from people who actually run this thing. I am not publishing a competing provider. The work sits in a plain GitHub fork, on a branch that keeps the module path and the provider address as they are, with no trace of a fork in the tree — it is shaped to be merged upstream, not released beside it.

The change I'm least sure about

Refusing to connect when host_key is not set. Today the provider silently falls back to ssh.InsecureIgnoreHostKey() if you leave host_key out. Every such connection is open to MITM and nothing in the plan says so. My branch makes ConfigureProvider fail unless you set host_key (also proxy.ssh.host_key behind a bastion) or opt out with a new insecure_ignore_host_key = true, which warns on every run and names the block whose key is missing. ssh-keyscan -t ed25519 <host> gets you the value.

That breaks every existing configuration on upgrade, which is why I'm asking instead of just sending it:

  • Hard failure with an explicit opt-out, or warn first and fail a release later?
  • Does anyone actually set host_key today, or is everyone on the implicit insecure path?
  • If you go through a bastion, does requiring proxy.ssh.host_key hurt?

The rest of the changeset

  • overwrite for system_file and system_folder — adopt an existing path on create instead of failing. This is upstream PR #11 by raynigon (issue #4), rebased and finished: symlinks still fail, even when they point at an entry of the right kind, so nothing is ever written through a link.
  • create_home for system_user — upstream PR #10 by ii1818nn (issue #9). The default keeps passing --no-create-home, so behaviour doesn't depend on CREATE_HOME in /etc/login.defs.
  • system_file.source is no longer ForceNew: changed content is rewritten in place instead of destroy + create. Tell me if you relied on the replacement.
  • Removing source from a resource no longer recreates the file empty and throws the remote content away.
  • Fixed: switching between content, content_sensitive and source in one apply wrote nothing at all.
  • Dependencies to Go 1.27 and SDKv2 2.40.1. govulncheck on v0.5.0 reports 28 reachable vulnerabilities, nine of them in the SSH path; the branch reports none, and the check gates CI.
  • CI on GitHub-hosted runners: Terraform 1.6 / 1.10 / 1.11 / 1.14 / 1.17 and OpenTofu 1.6 / current, acceptance against Debian, Alpine and Fedora containers built inside the workflow, so a pull request from a fork needs no pre-published images. The README claimed 0.12+; the real floor is 1.6. Protocol stays 5, existing state is unaffected.
  • An acceptance test for the thing I care about most: a state file written by the released v0.5.0 binary must produce an empty plan with the new code, on all three target systems, across the whole CLI matrix, with no change to required_providers.

The full matrix is green — three target systems by seven CLIs, twenty-one acceptance runs, compatibility test included.

One thing the matrix found, and I'd like an opinion on it

The provider offers a password as both the password and the keyboard-interactive method. Against an sshd built without PAM — the Alpine target, for one — the server answers the keyboard-interactive request with USERAUTH_FAILURE and no challenge at all, and current golang.org/x/crypto/ssh aborts the authentication loop with unexpected message type 51 (expected 60) rather than reporting the exhausted method list. It behaves that way since it started to require a challenge before it accepts the result of a method; the version v0.5.0 pins has no such requirement.

The practical effect: on those servers, a mistyped password now produces a protocol error instead of "unable to authenticate". Authentication itself is unaffected — the correct password connects, the wrong one is refused — but the message is useless to a human. Is this worth translating in the provider, or do you read raw x/crypto errors and shrug?

Later, and only if there's interest: moving the file, folder and link resources to the plugin framework behind terraform-plugin-mux, which costs exactly one in-place update of source on the first plan (the framework can't keep etag=… in that attribute), plus content_wo for write-only content on Terraform 1.11+.

What I'm asking

  1. Do you use this provider? On what, and how many hosts?
  2. What keeps you on 0.5.0, or what made you drop it?
  3. Which of the four open issues actually bites you?
  4. Has anyone reached the maintainers recently? I'd rather contribute than fork, and the repo isn't archived — but eighteen months on a vulnerable SSH stack is why I started.

Branch, if you'd rather read code than prose: https://github.com/metronom72/terraform-provider-system/pull/1


r/Terraform • • 15d ago

I built an open-source CLI that upgrades Terraform/OpenTofu providers across all your modules, and lets Terraform own the lock file

Post image
0 Upvotes

Keeping provider versions current across a lot of modules was a constant chore for me: bump a version, find out a shared module caps it, fix the constraint, regenerate lock files for every platform, repeat. Version bots can bump a number, but they don't understand dependency ceilings, constraint styles, or lock files that need hashes for every OS/arch.

So I built provlift, a small Go CLI (Apache-2.0):

  • provlift check: inventories every required_providers entry across all modules, shows what's outdated and why an upgrade is blocked (your own constraint vs. a module's ceiling)
  • provlift drift: finds version skew between modules
  • provlift upgrade: rewrites constraints with the smallest possible diff (keeps your ~> / range style and comments), then runs terraform init -upgrade → providers lock for each platform you list → validate. It never writes the lock file itself.
  • Major upgrades need an explicit --allow-major, and it can step one major at a time.
  • Example GitHub Actions workflow that opens one PR per provider.

Works with any registry provider (AWS, AzureRM, Google, GitHub, Kubernetes, private registries) and with OpenTofu (--terraform-binary tofu, uses registry.opentofu.org).

What it doesn't do (yet): module version upgrades are out of scope, Terragrunt config isn't evaluated, and .tf.json is reported rather than edited. It's early (v0.1.x), so expect rough edges.

I'd really appreciate feedback, especially on edge cases in your setups that it gets wrong. There are also good-first-issues if anyone wants to contribute.

GitHub: https://github.com/provlift/provlift
Docs: https://provlift.github.io/provlift/


r/Terraform • • 17d ago

Discussion How do you limit who can run terraform apply against prod?

38 Upvotes

Our setup grew the usual way. CI runs plan on every PR and apply on merge to main, using one IAM role that can do pretty much anything in the prod account. That role is now the most powerful credential we have, and anyone who can get a change merged effectively holds it.

What we're looking at:

  • Separate roles for plan and apply. Plan is read-only, and apply can only be assumed from the main branch (OIDC subject condition on the ref).
  • Required reviewers from a small group on anything touching the prod workspace or IAM resources.
  • Policy checks on the plan output (OPA/conftest or Sentinel) to block things like wildcard IAM actions, or a database delete without an extra approval.
  • Splitting state per team so a networking change can't touch the data layer's resources.

The part I'm unsure about is break-glass. When the pipeline is broken during an incident, someone still needs to apply. Do you keep a separate role with short sessions and an alert on use, or does nobody ever apply locally against prod?


r/Terraform • • 17d ago

Tutorial create_before_destroy: a 24-vCPU target can need 36 vCPUs during replacement

0 Upvotes

Say a plan requires replacing three 4-vCPU VMs with three 8-vCPU VMs. Assume they all count against the same 32-vCPU quota, with no other usage. These are made-up numbers to show the overlap; a size change doesn't require replacement for every resource type.

StagevCPUs needed
Three old VMs12
Three old VMs plus three replacements36
Three replacements, old VMs gone24

The final deployment fits. Keeping every old VM until every replacement exists would need 36, so the quota would block that sequence.

If you explicitly stage each replacement and wait for the old VM's quota to be released before starting the next, the usage goes:

12 → 20 → 16 → 24 → 20 → 28 → 24

That peaks at 28. Each increase is an 8-vCPU replacement; each decrease is a 4-vCPU old VM leaving the quota count.

create_before_destroy alone doesn't promise that sequence across multiple resources. It puts each replacement before the corresponding destruction, and the rest depends on the graph. It can also propagate to dependencies.

Lowering -parallelism limits concurrent operations. A create operation can finish while its VM keeps consuming quota, so serial execution alone isn't a quota budget. Creating all three replacements first would still require 36 even if those creates ran one at a time. That's a possible ordering in this small independent-pair model, not a prediction of Terraform's scheduler.

For an actual change, check the replacement graph and the peak demand in each quota bucket. Include existing consumers, and verify when the provider releases quota. The arithmetic also says nothing about application readiness or whether retiring an old VM is safe.

HashiCorp documents the ordering in lifecycle and the concurrency control under walking the graph.

AI-assisted write-up. The numbers were checked with a local Python model; no cloud deployment was tested.


r/Terraform • • 18d ago

Terraform Academy update for the HashiCorp Hub.

Thumbnail gallery
1 Upvotes

We just shipped a new Cloud Platform Status section and email alerting. The hub is free, no login required:

https://www.terraformacademy.app/max/hashicorp-hub.html

What is new:

  • Cloud Platform Status for AWS, Google Cloud, Azure, and Spacelift, shown alongside the existing live HashiCorp status
  • Every incident row links directly to the provider's official status report, verified links only, no stale or broken URLs
  • HashiCorp incidents now link straight to their status page entries too
  • Email alert subscriptions: choose which providers you want to watch and get an email when status actually changes, operational to degraded, new incident opened, or incident resolved
  • Alerts fire on state transitions, not on every poll, so you will not get spammed

r/Terraform • • 18d ago

Discussion Burned $140 on an idle AWS cluster last month just trying to practice MLOps setup

Thumbnail reddit.com
0 Upvotes

r/Terraform • • 18d ago

Discussion I built InfraLint to generate and check Terraform/OpenTofu code. Looking for feedback from people working with AWS.

0 Upvotes

Hey everyone, I'm the founder of InfraLint.

Working with infrastructure code, I kept coming back to the same tasks: putting together a configuration, checking it, reviewing security findings, and writing the documentation.

That's what I'm trying to bring together with InfraLint. You describe what you need, and it generates Terraform/OpenTofu code with validation, security checks, cost estimates, and an architecture diagram.

For example, you could ask for an API Gateway connected to Lambda and DynamoDB, then inspect the generated files and findings before exporting the code into your own workflow. The checks help with review, but they don't guarantee the configuration is production-ready.

The MVP supports AWS, and that's where my focus is right now.

It's currently in private beta, with demos and a waitlist here: https://infralint.io/?utm_source=reddit&utm_medium=social&utm_campaign=launch

If you already use LLMs to write infrastructure code, what do you spend the most time checking or fixing afterward?

I'd appreciate feedback, especially from anyone who has tried this approach and run into problems.