Skip to content

Introduction

Overview

Terraform is an infrastructure as code (IaC) program has been developed by HashiCorp

Users define and provide data center infrastructure using a declarative configuration language known as HashiCorp Configuration Language (HCL), or optionally JSON.[3]

Terraform is an open-source of Hashicorp for IaC support developers to create infrastructure in the organization. Our team are using it for deploy components with some cloud providers, such as AWS. Google Cloud.

Features:

  • Its go with Golang syntax and very easy to understand

  • Its intergrate with cloud platforms by interactive throguh API of cloud provider (such as Google Cloud Platform, Amazon Web Service)

  • Its centralized government infrastructure of enterprise with multiple environment

  • Its handle environment for project to provision component

Usage:

By the centralized the provision process on resources of the infrastructure by using configurations.

Topics

Best practices for terraform

  • Key Concepts

  • Code Structure

  • Examples

  • Naming Conventions

  • Coding Styles

Developer Progress

[1] Progress:

a) Build SAD for the infrastructure with detailed implement

b) Get approval for your SAD.

c) [Optional] Testing in a sample environments

[2] Because you are creating the services, which lead to costs for the company, so make sure you are:

a) Aware of the Cost Pricing in each component that you create

b) Align with the approval of SAD

c) Testing before transfer

This workflow for developers progress at the basic:

terraform init
terraform validate
terraform fmt
terraform plan
terraform apply
terraform show
terraform destroy

Useful Component

Components

Description

Official Document

  • Some tutorial for hand on

  • Commands specific

  • Uses case Documents

Documentation | Terraform | HashiCorp Developer

API Components

  • Config for terraforms

  • Use-cases

Using Registry search

Terraform Registry

Providers Documentation

  • Resources configuration

  • Resources Introduction

  • Configuration

E.g:

Google Cloud: Google Cloud documentation | Documentation

AWS Cloud:

Reference

mineiros-io/terraform-github-repository: A Terraform module to manage GitHub Repositories.