Skip to content

esstat17/Terraform-Module-Template-Boilerplate

Repository files navigation

MIT License

Terraform Module Template Boilerplate

Terraform

An Overview

This template gives a jump start to your Terraform project as a DevOps Engineer tool. A boilerplate using Terraform's Standard Module Structure a.k.a. Terraform Module boilerplate.

You may be overwhelmed by reading Terraform's official documentation, so I might think this template is useful.

When you are dealing with a complex project, learning the Terraform module is indeed a heavy lift.

Getting Started

Before you get started, you need to have the following:

Requirements

  • Terrraform's basic as an infrastructure as code tool that lets you build, change, and version cloud and on-prem resources safely and efficiently. * Personal Computer (i.e. Laptop or Desktop) * Command Line Interface (Linux) or PowerShell (Windows) Basics

Installing

I prefer not to talk about it here, so go over to their official Terraform Install documentation

When you're in your favorite CLI terminal, type in

terraform --help

.. and you're ready to go

Executing program

  • After you've downloaded this archive, navigate to the project folder using your CLI or Terminal command tool.
git clone https://github.com/esstat17/Terraform-Module-Template-Boilerplate.git
cd Terraform-Module-Template-Boilerplate

Basically, you only need these 3 commands to execute this script.

  • Initializing the code and installing dependency packages
terraform init

Stats and figures for nerds showing changes, updates, syntax errors, and code blocks in the CLI interface.

terraform plan
  • Deploying the terraform state
terraform apply -auto-approve

Lastly

  • Undo all commands above or revert them to the 0 state.
terraform destroy -auto-approve

The File Tree

You can find the file tree below with a commented label.

.
└── terraform-module-template
    ├── CHANGELOG.md
    ├── LICENSE
    ├── main.tf # ROOT main.tf
    ├── modules
    │   ├── module-child-a
    │   │   ├── CHANGELOG.md
    │   │   ├── LICENSE
    │   │   ├── main.tf # CHILD main.tf
    │   │   ├── outputs.tf
    │   │   ├── README.md
    │   │   ├── terraform.tf
    │   │   └── variables.tf # Reading values from INPUT variables
    │   └── module-child-b
    ├── outputs.tf
    ├── README.md
    ├── terraform.tf
    └── variables.tf # INPUT variables in the root main.tf

You can read more infromation on Standard Module Structure.

Help

Just reach me if you need help.

Authors

Contributors names and contact info

@esstat7

Version History

  • 0.1.0
    • Initial Release

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Acknowledgments

Inspiration, code snippets, etc.

Starting your Terraform project is made easy using this template.

About

Starting your Terraform project is made easy using this template.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages