Skip to content

koosha-t/terraform-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Terraform Demo for Beginners

In this project, we'll be implementing the following infrastructure AWS using Terraform:

rs
Demo Overview



Connecting to AWS

There are two ways you could connect Terraform to AWS:

1. Using ENV Variables:

$ export AWS_ACCESS_KEY_ID=<aws access key id>
$ export AWS_SECRET_ACCESS_KEY=<aws secret key>

2. One-time Configuration of AWS Credentials in your host (globally):

Install awsclie and run the following:

$ aws configure 

You'll then be provided with step-by-step instructinos to set your aws credentials. Terraform will automatically pick your credentials everytime you use it.

Running & Building the Infrastructure in AWS

  1. Initializing a new terraform project via running the following command from the tf dir:
    $ tarraform init
  2. Preview the execution plan and changes (optional):
    $ terraform plan
  3. Apply the changes:
    $ terraform apply

Using Existing Terraform Module

The main branch contains modules (i.e. subnet and webserver) customly created by myself. If you want to see an example of using an existing subnet module from Terraform AWS regsitry, please see the existing_modules branch.

Terraform Provisioners

Though using provisioners is not reommended, however, if you want to see usage examples, please see the provisioners branch.

About

A simple terraform demo project for beginners

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages