Skip to content

Commit 295cc0c

Browse files
committed
Initial commit
1 parent b81eead commit 295cc0c

24 files changed

+4
-405
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,6 @@ go.mod
4242
go.sum
4343

4444
.DS_Store
45+
46+
# VSCode Configurations
47+
.vscode

.header.md

Lines changed: 1 addition & 114 deletions
Original file line numberDiff line numberDiff line change
@@ -1,115 +1,2 @@
1-
# Terraform Module Template
1+
# terraform-aws-grafana
22

3-
This repository serves as a template for creating Terraform modules. It provides a structured approach to organizing and maintaining Terraform code, along with examples and best practices.
4-
5-
## Table of Contents
6-
7-
- [Prerequisites](#prerequisites)
8-
- [Usage](#usage)
9-
- [Examples](#examples)
10-
- [Module Structure](#module-structure)
11-
12-
## Prerequisites
13-
14-
Before you begin, ensure you have met the following requirements:
15-
16-
1. [install terraform](https://developer.hashicorp.com/terraform/tutorials/aws-get-started/install-cli)
17-
2. [install pre-commit](https://pre-commit.com/#install)
18-
3. configure pre-commit: `pre-commit install`
19-
4. install required tools
20-
- [tflint](https://github.com/terraform-linters/tflint)
21-
- [terraform-docs](https://github.com/terraform-docs/terraform-docs)
22-
23-
## Usage
24-
25-
To use this template, clone the repository and customize it according to your module's requirements. Below is a quick start guide:
26-
27-
1. **Clone the repository:**
28-
29-
```sh
30-
git clone https://github.com/your-username/terraform-module-template.git
31-
cd terraform-module-template
32-
```
33-
2. **Customize the module:**
34-
35-
- Update `main.tf`, `variables.tf`, `outputs.tf`, and `versions.tf` files as needed.
36-
- Add your own resources and logic.
37-
3. **Run Terraform commands:**
38-
39-
```sh
40-
terraform init
41-
terraform plan
42-
terraform apply
43-
```
44-
45-
## Examples
46-
47-
This repository includes example configurations to help you understand how to use the module:
48-
49-
- **Complete Example:** Located in `examples/complete`
50-
51-
- Demonstrates a full-featured usage of the module.
52-
53-
```sh
54-
cd examples/complete
55-
terraform init
56-
terraform apply
57-
```
58-
- **Minimal Example:** Located in `examples/minimal`
59-
60-
- Shows a minimal configuration for using the module.
61-
62-
```sh
63-
cd examples/minimal
64-
terraform init
65-
terraform apply
66-
```
67-
68-
## Module Structure
69-
70-
The repository is organized as follows:
71-
72-
```plaintext
73-
.
74-
├── .editorconfig
75-
├── examples
76-
│ ├── complete
77-
│ │ ├── main.tf
78-
│ │ ├── outputs.tf
79-
│ │ ├── provider.tf
80-
│ │ ├── README.md
81-
│ │ ├── variables.tf
82-
│ │ └── versions.tf
83-
│ └── minimal
84-
│ ├── main.tf
85-
│ ├── outputs.tf
86-
│ ├── provider.tf
87-
│ ├── README.md
88-
│ ├── variables.tf
89-
│ └── versions.tf
90-
├── .github
91-
│ └── workflows
92-
│ ├── documentation.yaml
93-
│ ├── pre-commit.yaml
94-
│ └── pr-title.yaml
95-
├── .gitignore
96-
├── main.tf
97-
├── modules
98-
│ └── sample-resource
99-
│ ├── main.tf
100-
│ ├── outputs.tf
101-
│ ├── variables.tf
102-
│ └── version.tf
103-
├── outputs.tf
104-
├── .pre-commit-config.yaml
105-
├── README.md
106-
├── .terraform-docs.yml
107-
├── tests
108-
│ ├── examples_minimal.tftest.hcl
109-
│ └── unit_tests.tftest.hcl
110-
├── .tflint.hcl
111-
├── variables.tf
112-
└── versions.tf
113-
```
114-
115-
## Reference [Getoutline](https://infraspec.getoutline.com/doc/terraform-Xkko7xHwM5) Document for Conventions to follow in your module

README.md

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

example.header.md

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

examples/complete/.header.md

Whitespace-only changes.

examples/complete/README.md

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

examples/complete/main.tf

Whitespace-only changes.

examples/complete/outputs.tf

Whitespace-only changes.

examples/complete/variables.tf

Whitespace-only changes.

examples/complete/versions.tf

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

examples/minimal/.header.md

Whitespace-only changes.

examples/minimal/README.md

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

examples/minimal/main.tf

Whitespace-only changes.

examples/minimal/outputs.tf

Whitespace-only changes.

examples/minimal/variables.tf

Whitespace-only changes.

examples/minimal/versions.tf

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

modules/sample-resource/.header.md

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

0 commit comments

Comments
 (0)