AWS VPC and web server with Terraform
The network every AWS project starts with, as code: VPC, public subnet, internet gateway, routes, a security group and an EC2 server.
You'll end with: Validated, planned Terraform for an AWS network and web server in your GitHub. No AWS account needed.
Do it here, in your browser
Follow the steps on the left and type in the terminal on the right. Each step ticks itself off when your files are right. At the end, one button creates the repository in your GitHub with your work, and you get a ready LinkedIn post.
Or do it on your own computer
Prefer a real terminal? Make your copy from our GitHub template, work in Codespaces or on your machine, then submit the link below.
akopslabs/build-terraform-vpcSteps on your own computer
- 1
Make your copy
Press Use the GitHub template, keep the repository Public and create it.
- 2
Open a Codespace
Code → Codespaces → Create codespace, then install Terraform, or use your own machine.
- 3
Write main.tf and outputs.tf
VPC, subnet, internet gateway, route table and association, security group and EC2 instance. The README lists the details.
- 4
Validate and plan
No AWS account is needed for this.
terraform init terraform fmt terraform validate
- 5
Push
Commit and push. AkOps check runs terraform validate and terraform plan on GitHub with fake credentials.
git add *.tf && git commit -m "AWS VPC and web server" && git push
- 6
Submit and share
Paste your repository link below and press Check my project.