In this video, I demonstrate how I used Terraform to deploy two EC2 instances into an existing AWS VPC—one in a public subnet and one in a private subnet.
This is a common real-world cloud deployment pattern where infrastructure such as the VPC, subnets, and security groups already exists, and Terraform is used to provision compute resources on top of that environment.
What we cover in this video:
• Referencing an existing VPC using Terraform data sources
• Looking up existing public and private subnets
• Using existing security groups for controlled access
• Deploying a public EC2 instance with SSH access
• Deploying a private EC2 instance for internal-only communication
• Using a locally generated SSH key pair to log into both EC2 instances
• Testing connectivity between public and private hosts
• Cleaning up resources using terraform destroy
The public instance is placed in the public subnet and used as the entry point for connectivity testing. From there, we connect to the private EC2 instance inside the private subnet using its private IP address.
This video is useful for:
• Network Engineers
• System Administrators
• CCNA / Cloud learners
• AWS beginners learning VPC design
• Terraform learners building real-world infrastructure
Tools used:
• Terraform
• AWS EC2
• AWS VPC
• AWS CLI
• Linux
• HCL (HashiCorp Configuration Language)
Download from GitHub -
https://raw.githubusercontent.com/wux...
This video builds on a previous lesson where the base network infrastructure was created.
If you’re learning AWS networking, Infrastructure as Code, or preparing for cloud/network engineering roles, this hands-on lab will help you understand how public and private subnet deployments work in practice.
If you found this video helpful, please like, subscribe, and follow for more practical cloud and networking tutorials.
#Terraform #AWS Certified #Cisco Certified #CloudNetworking #IaC #UP247 #HybridCloud