Terraform is a declarative coding tool that allows developers to describe the infrastructure with high-level configuration language of HCl (hashicorp configuration language), and manage the entire infrastructure life cycle through state files. It includes underlying components, such as computing instance, storage and network, as well as high-level components, such as DNS, LBS, and so on.
One-click deployment with only a few commands instead of tedious page operations.
It can be more convenient to integrate with CI/CD to test the infrastructure automatically.
It allows you to save infrastructure status without maintaining dependencies between resources, so that you can track changes to different components in the system (Infrastructure as Code) and share these configurations with others.
If the infrastructure is large, it is easy to configure resources wrongly or provide services in the wrong order. With IaC (Infrastructure as Code), resources are always supplied and configured exactly as declared.
When the resource state is maintained through code, the state version can be controlled and the infrastructure can be shared.
Through the Plan check before the actual deployment, a list is generated that contains every component to be deployed, and unnecessary errors are avoided by checking this list.
After building the graph of all resources, it can create and modify any resources that are not dependent on each other in parallel. Therefore, Terraform can efficiently build infrastructure, and operators can also deeply understand the dependencies in their infrastructure through the graph.
It can apply complex changesets to the infrastructure without manual interaction. Through the aforementioned execution plan and resource graph, we can know exactly what and in what order the Terraform will change, so as to avoid many possible human errors.