- Lab
- A Cloud Guru
Building Highly Available Multi Tier Architecture with Terraform
In this lab, you will learn how to build a highly available multi-tier architecture on AWS using Terraform. This lab will guide you through creating a multi-tier VPC network, deploying EC2 instances in a private subnet, setting up an Application Load Balancer, and integrating with a backend database. By leveraging Terraform’s infrastructure-as-code capabilities, you can define each component of the architecture in a structured and repeatable manner. By the end of this lab, you will understand how to create and manage a scalable and fault-tolerant environment using best practices. This approach ensures that your infrastructure is optimized for high availability and reliability, making it ideal for production-level workloads and applications.
Path Info
Table of Contents
-
Challenge
Log into your virtual machine and create user
- Use the provided credentials to connect to your virtual machine, use "cloud_user" as your username and replace "your_vm_public_ip_address" with the correct IP address.
- Open your browser in incognito mode and navigate to the identity and access management section.
- Go to "User Management," start creating a new user, and select "Attach policies directly" to give full admin access.
- Complete user creation and generate access and secret keys under security credentials.
-
Challenge
Install Git and clone repository
- Update your package list.
- Install Git and confirm the installation using
sudo yum install git -y
. - Clone the repository and navigate into it.
https://github.com/pluralsight-cloud/multi-tier-terraform.git
-
Challenge
Run the Install Script and use AWS configure
- Ensure the script has executable permissions by using
chmod +x "your script name"
- Run the script to install required packages.
- Install Git LFS.
- Configure the AWS CLI with the previously created user's credentials, entering the Access Key ID, Secret Access Key, region, and output format when prompted.
- Ensure the script has executable permissions by using
-
Challenge
Initialize, Plan and Apply the Terraform code
- Navigate to the folder with your main configuration file and run the command to initialize Terraform.
- Use the command to preview planned changes.
- Run the command to apply changes and create resources as defined in main.tf, confirming with "yes" when prompted.
-
Challenge
Verify Resource Creation
- Once the terraform apply command completes, verify that the resources have been successfully created in your AWS Console.
What's a lab?
Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.
Provided environment for hands-on practice
We will provide the credentials and environment necessary for you to practice right within your browser.
Guided walkthrough
Follow along with the author’s guided walkthrough and build something new in your provided environment!
Did you know?
On average, you retain 75% more of your learning if you get time for practice.