1. [Home](<https://delaparra-services.nl/>) 
1. [Knowledge hub](<https://delaparra-services.nl/knowledge-hub>) 
1. [block](<https://delaparra-services.nl/knowledge-hub/block>)

  

Category: Terraform 

# block

  Explained by [Reinier de la Parra](<https://delaparra-services.nl/about>)  Updated November 25, 2026    

## What is block?

 

block: The fundamental HCL container: a type, optional labels, and a body in braces. resource, variable, module are all blocks. A block is the basic building unit of Terraform's configuration language, HCL. It has a type, optional labels, and a body in curly braces. ` resource "aws_s3_bucket" "assets" { ... } ` is a block of type ` resource ` with two labels.

 

Definition source [Coders Lingo](<https://coderslingo.com/resources/open-dataset/>), [CC BY 4.0](<https://creativecommons.org/licenses/by/4.0/>)

 

## Frequently asked questions about block

  

### How is block used in practice?

 

Everything in a Terraform project is made of blocks: ` provider `, ` variable `, ` output `, ` module ` and ` resource `. Blocks can also be nested, such as a ` lifecycle ` block inside a resource.

    

### What should you keep in mind with block?

 

Once you see this pattern, Terraform files become much easier to read. Each block declares one thing and its settings. Keep related blocks in sensibly named files, such as ` network.tf ` and ` database.tf `, and run ` terraform fmt ` so the layout stays consistent across the team. Terraform reads all files in a folder together, so the split is purely for people.

    

### What does an example of block look like?

 

```
block_type "label_one" "label_two" { argument = value }
```

 

## At a glance

   CategoryTerraform Explained by[Reinier de la Parra](<https://delaparra-services.nl/about>) UpdatedNovember 25, 2026

 

## More Terraform terms

 

- [apply](<https://delaparra-services.nl/knowledge-hub/apply-terraform>) 
- [attribute](<https://delaparra-services.nl/knowledge-hub/attribute>) 
- [count](<https://delaparra-services.nl/knowledge-hub/count>) 
- [data source](<https://delaparra-services.nl/knowledge-hub/data-source>) 
- [depends\_on](<https://delaparra-services.nl/knowledge-hub/depends-on-terraform>) 
- [destroy](<https://delaparra-services.nl/knowledge-hub/destroy>)

 

[All terms starting with B](<https://delaparra-services.nl/knowledge-hub#letter-b>)

 

## Skills

 

- ### Terraform safe workflow

 

Use when running or changing Terraform (or OpenTofu) - init, fmt, validate, plan, apply, destroy, import, state mv/rm, refresh, workspaces, remote backends, state locking, drift, taint/-replace. Enforces a plan-review-apply workflow and protects state.

 [View skill](<https://delaparra-services.nl/skills/terraform-safe-workflow>) [Download zip](<https://delaparra-services.nl/skills/terraform-safe-workflow/download>) 
- ### Terraform Module Library

 

Build reusable Terraform modules for AWS, Azure, GCP, and OCI infrastructure following infrastructure-as-code best practices. Use when creating infrastructure modules, standardizing cloud provisioning, or implementing reusable IaC components.

 [View skill](<https://delaparra-services.nl/skills/terraform-module-library>) [Download zip](<https://delaparra-services.nl/skills/terraform-module-library/download>) 
- ### Multi-Cloud Architecture

 

Design multi-cloud architectures using a decision framework to select and integrate services across AWS, Azure, GCP, and OCI. Use when building multi-cloud systems, avoiding vendor lock-in, or leveraging best-of-breed services from multiple providers.

 [View skill](<https://delaparra-services.nl/skills/multi-cloud-architecture>) [Download zip](<https://delaparra-services.nl/skills/multi-cloud-architecture/download>)

 [Download all skills (zip)](<https://delaparra-services.nl/knowledge-hub/block/skills.zip>)

 

## Manuals

 

- [Kubernetes and Terraform: do you need them?](<https://delaparra-services.nl/manuals/kubernetes-en-terraform-heb-je-het-nodig>) 
- [Choosing cloud services for your app](<https://delaparra-services.nl/manuals/cloud-diensten-kiezen>)

 

## Related services

 

- [Custom software and web applications](<https://delaparra-services.nl/services#service-03>)

Perhaps your customers need somewhere to download their invoices, or your staff are managing bookings in a spreadsheet.

 

## 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.

  [Get in touch](<https://delaparra-services.nl/availability>)

[HTML version](https://delaparra-services.nl/knowledge-hub/block)
