Terraform Plugins

#HashiCorp Terraform stores plugins under the local directory (the one where configuration files# located) .terraform/plugins/. Terraform will download any missing plugins for the infrastructure after calling terraform init.

Links to this page
  • Terraform Providers

    There are several #HashiCorp Terraform providers available from HashiCorp either through official support, verified, or community support. They can be downloaded from Terraform Registry# as a Terraform Plugins# if needed and stored into the local directory .terraform/plugins/.

  • HashiCorp Terraform

    A usual Terraform workflow should start with initialising the project and identify the Terraform Providers# to be used for the target environment using the command terraform init (initialise phase). Then, dry-run or test blueprint for each target environment by laying out the action that will be carried out with the command terraform plan (planning phase). Finally, apply the blueprint and make necessary changes for the target environment accordingly by running terraform apply (apply phase). Both terraform plan and terraform apply change the state of Terraform. The state of the resources is recorded in the file terraform.tfstate. If there is a disparity between current environment and the blueprint such as missing plugins#, Terraform will fix it in order to adhere to the specified requirements. Otherwise, one could simply run terraform refresh to synchronise the state of Terraform and the underlying infrastructure. We can import resources that is created manually or providers that is outside Terraform Registry# (from other #Infrastructure as Code (IaC) tools).

  • HashiCorp Configuration Language (HCL)

    The above example specify a resource block with parameters of local_file and my_file. Defined within the block scope is what will be passed as arguments to the according resource plugin#. Generally speaking, the block will contain the information about the infrastructure platform and resources from that infrastructure platform.

#devops