Skip to content

Commit 4240997

Browse files
MukeshMukesh
authored andcommitted
update
1 parent 226bec1 commit 4240997

5 files changed

Lines changed: 72 additions & 113 deletions

File tree

README.md

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# Terraform Shared Modules Repository
2+
3+
## Overview
4+
This repository contains reusable Terraform modules for provisioning cloud infrastructure. These modules follow best practices for modularization and can be used across multiple projects.
5+
6+
## Directory Structure
7+
```
8+
.
9+
├── README.md
10+
├── modules
11+
│ ├── eks
12+
│ │ ├── main.tf
13+
│ │ ├── variables.tf
14+
│ │ ├── outputs.tf
15+
│ │ └── README.md
16+
│ ├── vpc
17+
│ │ ├── main.tf
18+
│ │ ├── variables.tf
19+
│ │ ├── outputs.tf
20+
│ │ └── README.md
21+
│ └── other-modules
22+
│ ├── module-name
23+
│ ├── ...
24+
│ └── README.md
25+
```
26+
27+
## Usage
28+
Each module can be used independently in your Terraform configurations. These modules should be sourced from this repository into another Terraform project.
29+
30+
### Example: Using the `eks` Module
31+
In your separate Terraform repository:
32+
```hcl
33+
module "eks" {
34+
source = "git::https://github.com/your-org/terraform-modules.git//modules/eks?ref=main"
35+
cluster_name = "my-eks-cluster"
36+
subnet_ids = ["subnet-abc", "subnet-def"]
37+
}
38+
```
39+
40+
### Example: Using the `vpc` Module
41+
```hcl
42+
module "vpc" {
43+
source = "git::https://github.com/your-org/terraform-modules.git//modules/vpc?ref=main"
44+
vpc_name = "my-vpc"
45+
cidr_block = "10.0.0.0/16"
46+
}
47+
```
48+
49+
## Best Practices
50+
- **Keep modules small and focused** – each module should serve a single purpose.
51+
- **Use versioning** – tag releases to ensure stability.
52+
- **Follow Terraform best practices** – maintain proper `variables.tf`, `outputs.tf`, and documentation.
53+
- **Lint and validate** – use `terraform fmt`, `terraform validate`, and `tflint` to maintain code quality.
54+
55+
## Linting & Validation (GitHub Actions)
56+
This repository is configured to run Terraform linting and validation using GitHub Actions.
57+
58+
### Running Checks Locally
59+
Before pushing changes, run:
60+
```sh
61+
terraform fmt -recursive
62+
terraform validate
63+
terraform plan
64+
```
65+
66+
## Contributing
67+
1. Fork the repository and create a new branch.
68+
2. Make changes and test them.
69+
3. Open a pull request with a detailed description.
70+
71+
## License
72+
NA

grafana-dashboard.json

Lines changed: 0 additions & 43 deletions
This file was deleted.

install-grafana.json

Lines changed: 0 additions & 5 deletions
This file was deleted.

install-grafana.py

Lines changed: 0 additions & 44 deletions
This file was deleted.

install-influx_v1.sh

Lines changed: 0 additions & 21 deletions
This file was deleted.

0 commit comments

Comments
 (0)