
Learn to design a scalable, highly available production VPC using subnets, security groups, root tables, internet gateways, NAT gateways, disaster readiness, and Terraform as the infrastructure as code backbone.
Explore building a production-grade AWS VPC with Terraform from scratch, launching two instances, and configuring subnets, security groups, route tables, internet gateways, and auto scaling groups.
Develop a highly available VPC with public and private subnets across multiple availability zones, routing via internet gateways, and scalable front and back ends with load balancers and auto scaling.
Learn how to set up your free AWS account, understand AWS basics, and configure a Terraform-driven development environment using VS Code or IntelliJ IDEA.
Create an AWS account by signing up in the console. Enjoy 12 months of free tier and sign up with billing info and four-digit phone verification.
Sign into the AWS console, switch regions, and explore account details, recent and frequently used services, cost explorer, billing insights, and policy-based organization controls for VPC and EC2 prep.
Create a dedicated identity and access management user for programmatic access, attach administrator-level policies, enable multifactor authentication, and securely store the generated access key and secret key for future use.
Install Terraform on Windows, extract the binary, and add its path to system and user environment variables. Install the Terraform plugin in IntelliJ and verify the plugin works.
Install the AWS CLI on Windows 10 64-bit, accept the license, and add the installation path to system and user PATHs to verify the CLI in a command prompt.
Configure the aws cli with your access key, secret key, eu-central-1, and json output to enable programmatic access to aws resources from code via the sdk without embedding credentials.
Install Terraform on mac os using homebrew, upgrade to the latest version, test the installation, then install and verify the terraform plugin for IntelliJ, restarting the IDE to finalize setup.
Install the AWS CLI with Homebrew, compare with pip or direct downloads, and configure access keys and secret keys across the command line and apps.
Configure AWS credentials with aws configure by entering the access key, secret key, region, and output format. Use an IAM user and install the boto3 library for Python.
Explore how to provision infrastructure as code with Terraform, defining providers, networks, and resources. Learn essential commands like init, plan, apply, and destroy, plus managing remote state with backends.
Create a key pair from the console to securely access EC2 instances, download the .pem private key, and prevent connection errors, then prepare an S3 bucket for Terraform remote state.
Create an S3 bucket in the eu ireland region to host Terraform remote state, named Terraform Remote State 2018, so Terraform can manage the state from now on.
Create a Terraform project from the command line by building a directory with main.tf and variables.tf, then prepare remote state configuration and verify plugin installation in the IDE.
Define the remote state configuration for the infrastructure layer and the platform layer, detailing networking resources like VPC, subnets, and security groups, and outlining auto scaling and instances on top.
Create a production VPC with Terraform on AWS, configuring region, backend as S3, and a CIDR block, enable DNS hostnames for public subnets, and tag with production-vpc.
Implement three public subnets in eu-west-1 across three availability zones using Terraform, with variable-driven CIDR blocks, subnet naming, and proper configuration.
Create private subnets in Terraform for an AWS VPC, configuring variables, descriptions, names, and availability zones.
Create a public route table by naming it and tagging it, then prepare to create a private route table in the next video.
Create a private route table with Terraform, name variable private route table and VPC IDs, add a tag, and plan to assign it to subnets for private and public use.
Associate public subnets with the public route table and private subnets with the private route table using Terraform, configuring route_table_id and subnet_id for each subnet.
Create and assign an elastic IP for a NAT gateway to enable private subnets to access the internet for content and updates while blocking inbound traffic.
Create a nat gateway with an elastic ip, attach it to the public subnet, and update the route table to direct private traffic to the internet, dependent on elastic ip.
Create and attach an internet gateway to the public route table, and configure a default route 0.0.0.0/0 to enable public resources to reach the internet with Terraform.
Execute Terraform in production to read remote state and output vital variables. Build and verify a production VPC with public and private subnets, gateways, and an elastic IP.
Define the backend for layer two infrastructure and read the remote state from layer one using Terraform, configuring an S3 backend and data terraform remote state to share outputs.
Create and configure security groups for EC2 instances and ELB using Terraform, defining public and private groups, ingress and egress rules, and health checking ports in a VPC.
Create an IAM role and inline policy in Terraform for EC2 instances, letting them assume the role to access AWS resources securely without access keys or secret keys.
Create an IAM role policy for EC2 instances by drafting a JSON policy with version 2012-10-17, allowing EC2, elastic load balancing, CloudWatch, and CloudWatch Logs access to all resources.
Create an IAM instance profile, name it, attach the IAM role and its policy, and apply it to two EC2 instances to grant the configured permissions.
Learn to fetch the most recent ami using a Terraform data source with an owner alias filter, then apply that latest ami to EC2 launch configurations.
Create a private EC2 launch configuration with Terraform, defining image id, instance type, key pair, and security groups, plus user data to install httpd and show the instance id.
Define a public launch configuration for EC2 instances, using a public IP, iam instance profile, security groups, and user data to host a web app.
Deploy a public web app load balancer in front of auto scaling groups to ensure high availability and scalability, with http health checks and Terraform-driven configuration.
Create an internal load balancer for private backend instances using terraform, attach the ilb security group and private subnets, and configure a port 80 http listener with health checks.
Configure a private auto scaling group in a VPC with private subnets, min/max instances, and a launch configuration, using an elastic load balancer for health checks and production backend tagging.
Configure a public auto scaling group for production web apps by defining subnets, a launch configuration, minimum and maximum sizes, health checks, a load balancer, and deployment tags.
Create a target tracking policy for the public auto scaling group, using the average CPU utilization metric with an 80 percent target to auto scale up or down.
Configure a private auto scaling group for the production backend, implement scale in and scale out policies, and set up SNS notifications for scaling actions.
Create an sns topic to monitor production web app auto-scaling events and alert when instances scale in or out.
Create an SMS subscription for an SNS topic to receive auto-scaling notifications, using a plus-signed phone number and the SMS protocol, linked to the webapp production multiskilling alert topic.
Define auto scaling notifications for scale up, scale down, launch, and terminate events tied to an auto scaling group, using an SNS topic for alerts and error monitoring.
Review and refine your AWS VPC and Terraform code before deployment, validating remote state, subnets, routing, security groups, AMI selection, and autoscaling configurations to prevent production issues.
Prepare production tfvars and configure remote state bucket and key for Terraform, initialize and plan. Fix policy naming and JSON syntax, then apply to create public and private scaling groups.
Validate the end-to-end production VPC setup, including public/private subnets, route tables, and gateways, and confirm traffic is balanced across six EC2 instances via two load balancers.
Finish a course on infrastructure as code with Terraform on AWS, covering VPC subnets, networking fundamentals, and launching two instances behind little balancers with traffic routing.
Up-to-date with Terraform 0.14+!
Learn to implement production-ready infrastructure with AWS and Terraform today with an AWS Certified Solutions Architect!
Do you want to implement your complete infrastructure as code? Do you want to learn the coolest and most popular infrastructure configuration management tool on the market, Terraform and make a huge contribution to your skillset?
Then this course is what you need! You will not only learn how to implement Terraform code but also implement an AWS Well-Architected Framework recommended deployment model which will be Highly-Available, Scalable, Fault-Tolerant and Resilient!
In this course, we will start by exploring the tools we need throughout the course. Just to note here too, we will need an IDE with a proper Terraform plugin available. An AWS account is also necessary so I will show you how to get one if you do not already have it. Sure we will set up our environment variables for Terraform deployments and also configure our IDE to use Terraform efficiently by installing a Terraform Plugin which will highlight the syntax and auto-complete everything we intend to do.
In between all these, I will also give you a crash course on Terraform where you will gain all the information you need to implement this infrastructure!
Once we have everything set up, now is time to get our hands dirty and write some Terraform code to implement our cool, shiny architecture!
We will start off with implementing our remote state and obtaining a key pair which we will use to connect to the instances we will launch. Once we get these done, we will first create the Virtual Private Cloud (VPC) environment. To meet the demands of high-availability, we will spread our private and public subnets to three different availability zones inside a region. We will also create our Private and Public Route Tables to manage the routing between our resources inside VPC.
We’ll also make sure to attach an Internet Gateway (IGW) to our VPC to use with public subnets so the resources in those will be able to access and receive public internet traffic. Our private subnet also need some form of internet connection but not both ways; we want only internet access for outgoing connections from our resources in private subnets! To satisfy this requirement, we will launch and attach a NAT Gateway to our private route table.
After configuring the low-level networking infrastructure, we will proceed to implement our Launch Configurations for both public and private EC2 instances we will launch through Auto-Scaling Groups. Once we implement the instance launching configurations, we will move on to implement our Auto-Scaling Groups using these launch configurations. We will configure the subnets, machine images, startup scripts and simply everything we need to launch instances successfully.
Auto-Scaling doesn’t come out of the box; we will need to configure it regarding our demands and how we want to scale our instances. For our implementation, we will use Target Tracking Scaling which will help use scale and manage our EC2 instances all by itself; we don’t have to do a single thing!
We do not do anything for Auto-Scaling once we set it up but for sure we want to know what’s going on with our instances. That’s why we will create a SNS Topic and subscribe to it to get real-time notifications on what’s happening with our instances and infrastructure.
There are much more to come in this course and I cannot wait for you to come and learn the best practices from an AWS Certified Solutions Architect!