#1 India's Top IT Training Institute

×

About Uncodemy

Know more about who we are and what we stand for.

About Us

About Us

Discover our mission to equip individuals with essential IT skills and industry expertise.

Read More →
UnCodeMy Gallery

UnCodeMy Gallery

Explore highlights from our IT training sessions and success stories.

Read More →
×

Free Resources

Learn, practice and plan your career — bilkul free.

Tutorials

Tutorials

Step-by-step written tutorials to learn any technology at your own pace.

Read More →
Free Counselling

Free Counselling

Book a free video counselling session and pick the right course for you.

Read More →
Online Compiler

Online Compiler

Write, run and test your code online — no setup required.

Read More →
🏗️ FREE · AWS PROVIDER 6

Terraform Code Generator: Infrastructure as Code, Ready to Plan

Tick what you need and get clean, secure-by-default Terraform files for AWS.

  • 🌐 VPC and subnets
  • 🖥️ EC2 + security group
  • 🪣 Private S3 bucket

How to use the Terraform Code Generator

  1. 1. Name the projectUsed for resource names and tags, and choose the region.
  2. 2. Pick resourcesVPC with public subnets, an EC2 web server with open ports, an S3 bucket, and optional remote state.
  3. 3. GenerateDownload versions.tf, variables.tf, main.tf and outputs.tf as a ZIP.

What you get

The generator writes a small, conventional Terraform project for the AWS provider (version 6). The VPC gets public subnets spread across availability zones, an internet gateway and a route table. The EC2 server uses the latest Ubuntu 24.04 image from Canonical's official account (Arm or x86 to match the instance type), an encrypted gp3 disk, IMDSv2-only metadata and a security group with only the ports you list; SSH is limited to the network you give. The S3 bucket blocks all public access and encrypts data, with optional versioning. Default tags mark everything with the project name. Nothing is uploaded; the files are built in your browser.

We generated every combination of options and parsed each file with python-hcl2, checking that every variable, resource and data source referred to is defined. We couldn't run terraform validate or create real resources in our test environment.

Worked example

The defaults (project uncodemy-demo in Mumbai, a VPC with 2 public subnets, a t3.micro web server with ports 22, 80 and 443 and SSH only from 203.0.113.0/24, and a versioned S3 bucket) produce 11 resources across 4 files, with outputs for the VPC ID, subnet IDs, the server's public IP and the bucket name.

Before you apply

  • Run terraform plan and read every line before apply.
  • Resources cost money while they exist; run terraform destroy after practising.
  • With remote state, create the state bucket first; S3 native locking (use_lockfile) needs Terraform 1.10 or later.

Frequently asked questions

Does it work with OpenTofu?

Yes, this HCL works with OpenTofu as well as Terraform.

Where do my AWS keys go?

Nowhere in these files. Terraform reads credentials from the AWS CLI configuration or environment variables.

Is the Terraform generator free?

Yes. You can open the Terraform generator and change every input and rate without signing up. When you generate the files for the first time, we ask once for your name and WhatsApp number; after that it, and every other Uncodemy tool, opens straight away.

More free tools

See all free tools