上QQ阅读APP看书,第一时间看更新
Initialization
The initialization step allows Terraform to do the following:
- Initialize the Terraform context to check and make the connection between the Terraform provider and remote service—in our case, with Azure.
- Download the plugin(s) of the provider(s)—in our case, it will be the azurerm provider.
- Check the code variables.
To execute the initialization, run the init command:
terraform init
The following is a screenshot of terraform init:
As can be seen during its execution of the preceding command, Terraform does the following:
- It downloads the latest version of the azurerm plugin.
- It creates a working .terraform directory.
The following is a screenshot of the .terraform directory:
For more information about the init command line, see the documentation: https://www.terraform.io/docs/commands/init.html.
Once the initialization step is done, we can proceed to the next step, which is previewing the changes.