Projects

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:

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