Skip to content

tedleyem/terraform

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Terraform-Playground

Required AWS packages

  • Install AWS CLI
  • Configure AWS CLI
  • Please note, Configuring AWS using aws configure CLI command, will write the AWS secret and access key to ~/$USER_HOME/.aws/credentials file and it will used to authenticate the terraform infra creation in AWS.

Install and Configure Terraform

Terraform setup in Linux based systems

wget https://releases.hashicorp.com/terraform/0.12.24/terraform_0.12.24_linux_amd64.zip
unzip terraform_0.12.24_linux_amd64.zip -d terraform /usr/local/bin/

If terraform executable stored in another path, make sure the path is added in $PATH variable permanently.

AWS Infrastructure Automation

  • We will see How to automate the AWS infrastructure creation using Terraform
  • As part of the demo code, we will create a Apache webserver and run a sample website
  • Architecture of this server follows the single tier method, wherein we will create only a simple Webserver for demo purpose

Basic Terminologies in Terraform

  • Providers
    • It should be cloud provider or on-premise provider on which we will create our infrastructure and resources
  • Resources
    • This indicates the resources like virtual machines, network components, containers we spin-up on the providers
  • Tfstate file
    • This is the state of terraform infrastructure created when we run the commands terraform plan and terraform apply
    • This state file can be stored locally or in a network storage for multi developer environments

Source Code File Details

  • main.tf contains the beginning section of terraform code
  • So we have to define terraform with required_providers and we have mentioned aws since we are going to create infra in AWS

Resources

About

A group of terraform example projects

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages