400 028 6601

建站动态

根据您的个性需求进行定制 先人一步 抢占小程序红利时代

Terraform主要特点有哪些

本文小编为大家详细介绍“Terraform主要特点有哪些”,内容详细,步骤清晰,细节处理妥当,希望这篇“Terraform主要特点有哪些”文章能帮助大家解决疑惑,下面跟着小编的思路慢慢深入,一起来学习新知识吧。

沙河网站制作公司哪家好,找成都创新互联!从网页设计、网站建设、微信开发、APP开发、响应式网站建设等网站项目制作,到程序开发,运营维护。成都创新互联于2013年开始到现在10年的时间,我们拥有了丰富的建站经验和运维经验,来保证我们的工作的顺利进行。专注于网站建设就选成都创新互联

Terraform 是什么

如果两年前问 Terraform 是什么,国内熟悉它的人可能并不是很多,毕竟它是2014年的新生儿,提到资源编排,大家能优先想到的也是 AWS 的 CloudFormation,Azure 的 ARM 以及阿里云的 ROS。但是如果今天再问“Terraform 是什么”,相信很大一部分人对它不再陌生,并且一些公司或者感兴趣的开发者已经开始使用 Terraform 来管理他们的基础设施。不论是 Hashicorp 的官方宣传,还是阿里云云栖社区的布道;不论是 Devops的持续发展,还是云原生的火热传播;不论是国内最初只有阿里云支持,还是后来国内其他云厂商的陆续支持,Terraform 近两年在国内被越来越多的提及。

在此之前,不止一篇云栖文章介绍过Terraform是什么,本文将结合Terraform的官方文档,对这些文章中的介绍做一个整理和总结。

2014年,Hashicorp 公司推出了一款产品 Terraform
Terraform主要特点有哪些

Terraform 官方的定义如下:

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.

总结起来,三句话:

更通俗的讲,Terraform 就是运行在客户端的一个开源的,用于资源编排的自动化运维工具。以代码的形式将所要管理的资源定义在模板中,通过解析并执行模板来自动化完成所定义资源的创建,变更和管理,进而达到自动化运维的目标。

Terraform 主要特点

Terraform 具备以下几个主要特点:

resource "alicloud_instance">
An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
  + create

Terraform 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.

读到这里,这篇“Terraform主要特点有哪些”文章已经介绍完毕,想要掌握这篇文章的知识点还需要大家自己动手实践使用过才能领会,如果想了解更多相关内容的文章,欢迎关注创新互联行业资讯频道。


当前标题:Terraform主要特点有哪些
本文网址:http://mbwzsj.com/article/jihgec.html

其他资讯

让你的专属顾问为你服务