What does 'terraform init' command do?
Experience Level: Junior
Tags: Terraform
Answer
This command initializes a working directory containing Terraform configuration files. It installs the referenced modules and plugins.
During init, the root configuration directory is consulted for backend configuration and the chosen backend is initialized using the given configuration settings.
Re-running init with an already-initialized backend will update the working directory to use the new backend settings.
Related Terraform job interview questions
Using Terraform CLI, how you upgrade all referenced modules and providers to versions allowed within configured constraints?
Terraform JuniorUsing Terraform CLI, how do you download module source codes in order to be able to look at how the module is implemented and copy the examples easily?
Terraform JuniorWhat is the first Terraform CLI command that you need to execute after you pull Terraform configuration from your version control system?
Terraform JuniorHow do you get a version of Terraform CLI that you have currently installed?
Terraform JuniorUsing Terraform CLI, how do you get a list of all Terraform CLI commands?
Terraform Junior