4 Deploying a multi-tiered web application in AWS

 

This chapter covers

  • Deploying a multi-tiered web application in AWS with Terraform
  • Setting project variables in variables definition files
  • Organizing code with nested modules
  • Using modules from the Terraform Registry
  • Passing data between modules using input variables and output values

Highly available, scalable web hosting has been a complex and expensive proposition until relatively recently. It wasn’t until AWS released its Elastic Compute Cloud (EC2) service in 2006 that things started changing for the better. EC2 was the first pay-as-you-go service that enabled customers to provision to nearly infinite capacity on demand. As great as EC2 was, a significant tooling gap existed that could not be met with CloudFormation or existing configuration management tools. Terraform was designed to fill the tooling gap, and we are now going to look at how Terraform solves this problem. In this chapter, we deploy a highly available and scalable multi-tiered web application in AWS.

4.1 Architecture

 
 
 

4.2 Terraform modules

 

4.2.1 Module syntax

 
 

4.2.2 What is the root module?

 
 
 

4.2.3 Standard module structure

 
 
 
 

4.3 Root module

 

4.3.1 Code

 
 
 
 

4.4 Networking module

 
 

4.5 Database module

 
 
 

4.5.1 Passing data from the networking module

 
 
 

4.5.2 Generating a random password

 
 

4.6 Autoscaling module

 
 
 

4.6.1 Trickling down data

 
 
 
 

4.6.2 Templating a cloudinit_config

 
 
 
 

4.7 Deploying the web application

 
 
 
 

4.8 Fireside chat

 
 
 

Summary

 
 
 
 
sitemap

Unable to load book!

The book could not be loaded.

(try again in a couple of minutes)

manning.com homepage
test yourself with a liveTest