Skip to content

clowdhaus/terraform-module-data

Repository files navigation

Terraform Module Data

Data about Terraform module usage

clowdhaus.github.io/terraform-module-data

Usage

⚠️ This only works for modules in the terraform-aws-modules organization.

To collect data about a module, run the following command:

cargo run -- collect-data --module <module>

Where <module> is the name of the module you want to collect data for. For example, to collect data for the vpc module, run:

cargo run -- collect-data --module vpc

Data Collected

Data is collected from the following sources:

  1. GitHub repository - repository clones and views

This data is what can be found on the /graphs/traffic page of the GitHub repository. GitHub provides data for the last 14 days, aggregated by day.

GitHub traffic graph

  1. Terraform registry - module downloads

This data is what can be found on the registry page of the module. The registry continuously updates this data, so this project collects it daily as a "snapshot in time".

Terraform registry downloads

Data Directory Structure

data/
├─ github/
│  ├─ eks/
│  │  ├─ clones.json
│  │  └─ views.json
│  ├─ eks-pod-identity/
│  │  ├─ clones.json
│  │  └─ views.json
│  └─ ...
└─ registry/
   ├─ eks/
   │  ├─ 2024-03-22.json
   │  ├─ 2024-03-23.json
   │  └─ ...
   ├─ eks-pod-identity/
   │  ├─ 2024-03-22.json
   │  ├─ 2024-03-23.json
   │  └─ ...
   └─ ...

Development

To build and run locally, you will need to install mdbook