Skip to content

Latest commit

 

History

History
108 lines (69 loc) · 2.7 KB

README.md

File metadata and controls

108 lines (69 loc) · 2.7 KB

Terraform Module - AWS EC2 Group

Terraform module to create a group of multiple EC2 instances with monitoring. Useful for deploying multiple blockchain nodes.

Features:

Terraform Linting & Formatting

terraform

IAC Security Scanning

Trivy

Automatic Terraform Doc Generation

Terraform Docs

Prerequisites

Install the follow tools to your local machine:

# Terraform
$ brew install terraform

# Terraform lint to enforce best practices in writing Terraform code
# Reference: https://github.com/terraform-linters/tflint
$ brew install tflint

# Trivy for IAC Security scanning
# Reference: https://github.com/aquasecurity/trivy
$ brew install trivy

# Terraform Docs to autogenerate Terraform Module documentation
# Reference: https://terraform-docs.io/user-guide/installation/
$ brew install terraform-docs

# Pre Commit hooks to enforce Terraform Docs generation on every commit
# Reference: https://pre-commit.com/#install
$ brew install pre-commit

Getting started

On the top right of this repo, click on Use this template -> Create new repository. Then fill in the name of the repository with the following format, terraform-<provider_name>-<custom_name>. Eg. terraform-aws-private-eks.

$ git clone <your_project_repository>

$ cd <your_project_repository>

# Install pre-commit hooks
$ pre-commit install-hooks

# Make code changes and try to commit. You should see the following output
Terraform fmt............................................................Passed
Terraform validate with tflint...........................................Passed
Terraform validate with trivy............................................Passed
Terraform docs...........................................................Passed

You are all set to go to write your custom Terraform Module! 🚀


Note: Everything below this line is generated via terraform-docs


Requirements

Name Version
terraform >= 1.0

Providers

No providers.

Modules

No modules.

Resources

No resources.

Inputs

No inputs.

Outputs

No outputs.