In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
In this article, the editor introduces in detail "what are the main characteristics of Terraform", the content is detailed, the steps are clear, and the details are handled properly. I hope this article "what are the main characteristics of Terraform" can help you solve your doubts? let's go deep into the train of thought of the editor and learn new knowledge together.
What is Terraform?
If you had asked what Terraform was two years ago, there might not be many people familiar with it in China. After all, it was born in 2014. When it comes to resource planning, the priority you can think of is AWS's CloudFormation,Azure 's ARM and Aliyun's ROS. But if you ask "what is Terraform" again today, I believe a large number of people are no longer new to it, and some companies or interested developers have begun to use Terraform to manage their infrastructure. Whether it is the official promotion of Hashicorp or the sermon of Ali Yunqi community, whether it is the continuous development of Devops or the hot spread of the original cloud, whether it is only supported by Aliyun at first in China, or later supported by other domestic cloud manufacturers one after another, Terraform has been mentioned more and more in China in the past two years.
Before that, more than one Yunqi article has introduced what Terraform is. This article will collate and summarize the introductions in these articles in combination with the official documents of Terraform.
In 2014, Hashicorp launched a product, Terraform.
The official definition of Terraform is as follows:
Terraform is a tool for building, changing, and versioning infrastructure safely and efficiently. Terraform can manage existing and popular service providers as well as custom in-house solutions.
Configuration files describe to Terraform the components needed to run a single application or your entire datacenter. Terraform generates an execution plan describing what it will do to reach the desired state, and then executes it to build the described infrastructure. As the configuration changes, Terraform is able to determine what changed and create incremental execution plans which can be applied.
The infrastructure Terraform can manage includes low-level components such as compute instances, storage, and networking, as well as high-level components such as DNS entries, SaaS features, etc.
To sum up, three sentences:
Terraform is a tool that securely and efficiently builds, changes, and versioned the infrastructure, and provides custom solutions on mainstream service providers.
Terraform is driven by a configuration file and defines the components to be managed (infrastructure resources) in the file to generate an executable plan (if it cannot be executed, it will prompt an error), and by executing this plan to complete the creation of the defined components, incremental changes and continuous management.
Terraform can manage not only IaaS layer resources, such as computing instances, network instances, storage instances, etc., but also higher-level services, such as DNS domain names and resolution records, functions of SaaS applications, etc.
More generally speaking, Terraform is an open source automated operation and maintenance tool running on the client side for resource orchestration. Define the resources to be managed in the template in the form of code, and automatically complete the creation, change and management of the defined resources by parsing and executing the template, so as to achieve the goal of automatic operation and maintenance.
Main features of Terraform
Terraform has the following main features:
Infrastructure is code (IaC, Infrastructure as Code)
Terraform describes infrastructure resources based on a specific configuration language (HCL, Hashicorp Configuration Language). As a result, version control and management of the described solution or infrastructure can be implemented just like any other code. At the same time, common solutions and infrastructure can be easily shared and reused in the form of templates.
Resource "alicloud_instance" >
Execution Plan (Execution Plans)
Before Terraform executes the template, running the terraform plan command first generates an executable plan by parsing the template, which shows the resources and their properties to be created or changed by the current template. The operator can preview the plan and execute the terraform apply command after confirmation, which can complete the rapid creation and changes to the defined resources to avoid some unexpected problems.
An execution plan has been generated and is shown below.Resource actions are indicated with the following symbols: + createTerraform will perform the following actions: # alicloud_instance.instance [0] will be created + resource "alicloud_instance"instance" {+ availability_zone = (known after apply) + id = (known after apply) + image_id = "ubuntu_140405_64_40G _ cloudinit_20161115.vhd "+ instance_name =" my-first-tf-vm "+ instance_type =" ecs.sn1ne.small "+ security_groups = [+" sg-abc12345 " ] + tags = {+ "from" = "terraform"} + vswitch_id = "vsw-abc12345".} # alicloud_instance.instance [1] will be created + resource "alicloud_instance"instance" {.} # alicloud_instance.instance [2] will be Created + resource "alicloud_instance"instance" {...}... Plan: 5 to add 0 to change, 0 to destroy.
Resource Topology Map (Resource Graph)
Terraform builds graphs of all resources according to the definition in the template, and creates and modifies those resources that do not depend on resources in parallel to ensure efficient execution. For resources that depend on resources, the dependent resources are executed first.
Automated change (Change Automation)
No matter how complex the resource is, when the resource content defined in the template changes, Terraform will plan the changed content based on the new resource topology diagram. After confirming that it is correct, you can complete several change operations with only one command to avoid errors caused by human operation.
After reading this, the article "what are the main characteristics of Terraform" has been introduced. If you want to master the knowledge points of this article, you still need to practice and use it yourself to understand it. If you want to know more about related articles, welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.