Interview Prep/Terraform/Modules and Code Structure

A team wants to tweak a resource inside your module that you didn't expose. What are the options?

IntermediateScenarioModules and Code Structure
Answer

Situation read → Pressure to fork or hack a shared module.

What I'd do →

  1. Ask whether it's a legitimate, general need; if yes, add a variable and release a minor version.
  2. If it's team-specific, create the extra resource outside the module using the module's outputs.
  3. Do not use override.tf files or copy the module.

Why → Forks drift away from upstream and miss fixes; extending through outputs keeps one source of truth.

Interview tip → Good modules output IDs and ARNs of their key resources for exactly this reason.

All Terraform questions Roadmap: Terraform

More on Modules and Code Structure