Refactor your project using Modules

Break down your Terraform codes to have all resources in their respective modules. Combine resources of a similar type into directories within a ‘modules’ directory, for example, like this:

- modules
  - ALB
  - EFS
  - RDS
  - autoscaling
  - compute
  - network
  - security

Each module shall contain following files:

- (or file(s) with resources blocks
- (optional, if you need to refer outputs from any of these resources in your root module)
- variab...
Learn More