Terraform changed resources I didn’t touch

You update one resource.
Terraform shows changes somewhere completely unrelated.

At first, it looks random.
It feels like Terraform is reaching across your configuration.

It’s not.

Terraform does exactly what you told it to do.

The problem is structural.

Terraform loads every .tf file into a single dependency graph.
There is no isolation between files.
Everything exists in one shared configuration space.

So when one part changes, the entire graph is reevaluated.

That is the root cause.

Modules exist to fix this.

They create real boundaries.
They restrict how data flows.
They reduce how far a change can propagate.

And one detail most engineers miss:

Outputs are not just for printing values.

They are the only controlled exit point from a module.

If you don’t design outputs carefully, you break the boundary.

This lesson explains why module structure is not about organization.

It is about controlling blast radius.

And once you see that, Terraform behavior stops feeling unpredictable.