Ad space (banner)
AD

Got the fundamentals? A structured Terraform course is a fast way to level up.

Find Terraform courses on Udemy

Affiliate link. Costs you nothing extra.

Lesson 6 / 37

Preparing Providers with terraform init

Before anything else, run terraform init. It initialises the working directory: downloading providers and configuring the backend.

The syntax is terraform init. It is safe to run repeatedly.

Running it initialises the backend, downloads the required provider plugins into .terraform/, and reports that Terraform has been successfully initialised.

A common stumble is trying to run plan first and hitting "Could not load plugin." Every other command depends on init having run.

In real work, it is the first command in every CI pipeline and on every freshly cloned repository.

Terraform
Try it (type this into the pseudo terminal)
terraform init

🧑‍💻 You can type this command into the Terraform pseudo terminal to try it yourself (this page itself has no interactive terminal).

Ad space (banner)
Ad space (in-article)