search by tags

for the user

adventures into the land of the command line

terraform standard module structure

some terraform documentation about it here.
here’s an example project which sets up a managed azure mysql database:

★ tree
.
├── README.md
├── modules
│   ├── database
│   │   ├── main.tf
│   │   ├── provider.tf
│   │   └── variables.tf
│   ├── grants.tf
│   ├── server
│   │   ├── firewall.tf
│   │   ├── main.tf
│   │   ├── provider.tf
│   │   ├── resource_group.tf
│   │   ├── server.tf
│   │   └── variables.tf
│   └── user
│       ├── main.tf
│       ├── provider.tf
│       ├── users.tf
│       └── variables.tf
├── prod1
│   ├── backend.tf
│   └── main.tf
├── qa1
│   ├── backend.tf
│   └── main.tf
└── stg1
    ├── backend.tf
    └── main.tf

things to remember:
• modules contain reusable components
• enviroment named folders contained module selectors and environment specific variables which are passed into the modules

terraform i ❤︎ u