Skip to content

huytn1219/terraform-modules

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Terraform Module

This repo contains Terraform modules for building various resources on Google Cloud Platform (GCP)

Quickstart

This repo has the following folder structure:

  • root: The root folder contains the main implementation code for the modules, broken down into multiple standalone submodules.
  • test: Automated tests for the submodules and examples. TODO

What's a Module?

A Module is a canonical, reusable, best-practices definition for how to run a single piece of infrastructure, such as a database or server cluster. Each module is written using a combination of Terraform resources and bash scripts and include automated tests, documentation, and examples.

How to use Modules?

Modules are called from within other modules using module blocks:

module "servers" {
    source = "./app-cluster"
    #Note: If modules are located on differrent repo or registries, you can call that repo by using address scheme:
    # source = "git@github.com:team/example.git"
    servers = 5
}

How to run a Module?

  1. Install Terraform v0.12.0 or later.
  2. Open variables.tf, and fill any required variables that don't have a default. You can also use environment variables to define your Terraform variables. Please see Terraform CLIfor more information.
  3. Run terraform init.
  4. Run terraform plan.
  5. If the plan looks good, run terraform apply to apply your change.
  6. To destroy what you have applied, run terraform destroy# terraform-modules

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages