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

  

Category: Terraform 

# init

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

## What is init?

 

init: Initialises a working directory — downloads providers and modules, configures the backend. Run it first, and after changing providers. ` terraform init ` prepares a working folder. It downloads the providers and modules your configuration uses, and connects to the backend where state is stored. You run it once when you start working on a project, and again after adding a provider, changing a module version or changing the backend. ` terraform init -upgrade ` updates providers to the newest versions your constraints allow.

 

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 init

  

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

 

Init writes a ` .terraform.lock.hcl ` file that records exact provider versions. Commit that file, so everyone on the team and in CI uses the same versions. The ` .terraform ` folder with downloaded plugins should not be committed. If plans behave differently on two machines, comparing provider versions in the lock file is a good first check.

    

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

 

```
terraform init -upgrade
```

 

## At a glance

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

 

## More Terraform terms

 

- [for\_each](<https://delaparra-services.nl/knowledge-hub/for-each>) 
- [heredoc](<https://delaparra-services.nl/knowledge-hub/heredoc>) 
- [import](<https://delaparra-services.nl/knowledge-hub/import>) 
- [interpolation](<https://delaparra-services.nl/knowledge-hub/interpolation>) 
- [lifecycle](<https://delaparra-services.nl/knowledge-hub/lifecycle>) 
- [locals](<https://delaparra-services.nl/knowledge-hub/locals>)

 

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

 

## 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/init/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/init)
