Terraform Fundamentals — Challenge
45 minBeginner
This creates billable resources. Run it in a dev environment and destroy it when you finish. Set a budget alarm first.
You are done when
0 of 5
The goal#
Achieve the same outcome as Terraform Fundamentals, from an empty starting point, without the steps.
Before a VPC module makes any sense, the five pieces underneath it have to be concrete: what a provider is, what a resource declaration produces, where a value comes in, where a value goes out, and what Terraform remembers between runs.
This lab builds the smallest infrastructure that exercises all five.
What must be true when you are done#
terraform applycreates an EC2 instance and an S3 bucket from a single configuration.- Running
terraform applya second time reportsNo changes— you can explain why. - The instance type comes from a variable, and the public IP leaves through an output.
- You can point at the line in
terraform.tfstatethat maps your resource to its real AWS id. terraform destroyremoves everything, verified with the AWS CLI.
Rules#
- Do not open the guided lab until you are finished, or until the same problem has held you up for 20 minutes.
- Documentation is allowed. In the job it is the first thing you open.
- Verify every criterion with a command whose output you can read.
If you get stuck#
- What did you expect, exactly?
- What happened instead — the error text, not a paraphrase?
- Which layer is that error from?
- What is the smallest command that proves the layer below is fine?