Infrastructure as Code with Terraform
Write, plan, apply, and destroy Terraform configuration for a real AWS resource set: VPC, subnet, and EC2 instance, using variables, outputs, and remote state on S3, with the AWS provider pinned to a specific version.
Prerequisites: Terraform CLI 1.2+ installed (terraform -version), an AWS account, and AWS CLI configured.
Terraform's core value proposition is repeatable, auditable infrastructure: you describe what you want, run terraform plan to see what will change before anything is touched, and run terraform apply to make it so. Unlike clicking through the console or running one-off CLI commands, Terraform keeps a state file that tracks what it has deployed — which is both its superpower (it can update or destroy only what changed) and its responsibility (the state file must be managed carefully in teams).
This project uses the AWS provider, which is maintained by HashiCorp and covers the vast majority of AWS resources. Provider versions are independent of Terraform versions — always pin both in your configuration so the behavior is reproducible across machines.
Initialize the project and configure the AWS provider
Write variables, resources, and outputs
Plan, apply, and inspect state
Configure remote state on S3
Secret Mission: Import an existing resource
Before You Go
Test what you just learned
Self-testing is one of the best ways to retain new skills. Unlock project quizzes to check your understanding.
Log in to unlock0 / 7 complete
