Module 1: Drafting the Architecture
Now that the engine is ready, it's time to draw our first blueprint.
Step 1: Writing the Resource
In Terraform, everything we build is a Resource. To create an S3 bucket, we use the aws_s3_bucket block.
Mission: Open main.tf and add this resource block to the bottom of the file:
resource "aws_s3_bucket" "my_world" {
bucket = "terraform-mission-bucket"
}
Step 2: The Blueprint Scan (plan)
Before we build, we always Plan. This shows you exactly what Terraform is going to do before it actually does it. It's like a simulation of the build.
Mission: Run terraform plan.
booting...
Tactical Insight: The + Sign
In the output of terraform plan, you'll see a green + sign next to the bucket. This means Terraform is planning to Add this resource. If it was a -, it would be planning to delete it!