Project Structure

When working with multiple environments, ie. development and production, it is ideal that we separate these environments in our terraform code. By this approach we gain two main advantages,

  • We can always test things in development and then in production.

  • Resources we are going to mange in a terraform apply becomes very minimum.

Also, it is a good practive in AWS to have separate accounts for development, production, and billing.

A typical project structure would looks like,

|-- modules
    |-- instances
    |-- vpc
|-- environments
    |-- development
    |-- production

Last updated