DELAPARRA
Index
Color
NL
Category: Terraform

resource

Explained by Updated

What is resource?

resource: A single piece of infrastructure Terraform creates and manages — a VM, a bucket, a DNS record. The verb of Terraform. A resource in Terraform is a single piece of infrastructure that Terraform creates and manages: a server, a database, a storage bucket, a DNS record, a firewall rule. Each resource block has a type, such as aws_s3_bucket, and a local name, such as logs. Together they form its address in Terraform, aws_s3_bucket.logs, which other resources can reference.

Definition source Coders Lingo, CC BY 4.0

Frequently asked questions about resource

What should you keep in mind with resource?

Terraform tracks every resource in the state file and compares it with the configuration on each plan. Renaming a resource block makes Terraform think you want to delete one and create another; a moved block tells it the resource was only renamed. Keep resources focused and group related ones in modules, so a large configuration stays readable.

What does an example of resource look like?

resource "aws_s3_bucket" "logs" { bucket = "my-app-logs" }

At a glance

CategoryTerraform
Explained by
Updated

More Terraform terms

All terms starting with R

Skills

Download all skills (zip)

Manuals

Related services

Need any help?

Stuck on one of these in your own project? Tell me what you are working on and I will tell you how I would approach it.