Terraform Tutorial — Resources

less than 1 minute read

Resources are the most important element in Terraform. Every resource block describes one piece of infrastructure — an S3 bucket, an EC2 instance, a VPC, a DNS record. This chapter teaches you to create, update, and manage resources effectively.


What’s in this Chapter?

# Topic Description
1 Resource Block Anatomy Type, name, arguments, attributes
2 Creating an S3 Bucket Step-by-step first resource
3 Resource Dependencies Implicit and explicit dependencies
4 Resource Lifecycle create_before_destroy, prevent_destroy
5 Meta-Arguments Overview count, for_each, depends_on, lifecycle
6 Practice Exercises Hands-on resource creation

Chapter Overview

In the Introduction, we said Terraform describes WHAT you want. Resources are WHERE you describe it. Every resource block maps to a real-world object in your cloud provider.


← Providers Exercises Resource Block Anatomy →