Search⌘ K
AI Features

Resources in Detail

Explore how Terraform resources represent real-world components like AWS S3 buckets, Google Cloud folders, or Postgres logins. Understand resource identifiers, mandatory and optional properties, and data types such as strings, booleans, numbers, and lists to manage infrastructure across multiple providers efficiently.

Terraform resources

Resources in Terraform represent things in the real world. For example, a resource could be an AWS Load Balancer, an alarm in PagerDuty, a policy in Vault, etc. The resource is the bedrock of Terraform. They allow you to define how you want to create something in the real world. Remember, you can create resources representing things from multiple vendors (for example, multiple clouds) in a single project.

Your project resource

Let’s take a look in a bit more detail at the resource we defined in the previous chapter:

C++
resource "aws_s3_bucket" "first_bucket" {
bucket = "<yourname>-first-bucket"
}

The resource type aws_s3_bucket starts with the name of the provider followed by an ...