← Lessons/Your First Resource
← Your First Resource

Plan your first resource

Learn

plan vs validate

In the last lesson you ran validate. This lesson runs terraform plan, which goes a step further: it figures out what would change if you applied the configuration, and prints it — without creating anything.

Every run starts with terraform init, which downloads the AWS provider the terraform block asks for. Then the plan lists each resource it would create, with all its attributes. For an S3 bucket that's a long list, and most of it reads (known after apply): values AWS only decides once the bucket exists. The line to read is the summary at the bottom:

Plan: 1 to add, 0 to change, 0 to destroy.

The starter declares one S3 bucket. Run plan — Terraform resolves the AWS provider and shows exactly one resource to add, without creating anything.

Loading...

State Inspector

State

from terraform show

empty — nothing here yet