Terraform is an open source tool that you can use to securely and efficiently preview, configure, and manage cloud infrastructure and resources. This topic introduces the basic concepts, advantages, and use scenarios of Terraform.
Terraform is an infrastructure as code (IaC) tool for cloud resource orchestration.
Terraform allows you to use a simple template language to define, preview, and deploy cloud infrastructure on Alibaba Cloud. For more information, see Configuration Syntax.
Terraform is a tool that is used to deploy, change, and perform versioning on infrastructure and applications in a safe and efficient manner. The tool can be used for multi-level resource management.
The resources that Terraform manages include upper-layer software and the configurations of underlying network and system configurations.
Terraform can be used to create, change, and delete various Alibaba Cloud resources, such as resources of Elastic Compute Service (ECS), Virtual Private Cloud (VPC), Relational Database Service (RDS), and Server Load Balancer (SLB).
For more information about the use scenarios of Terraform, see Scenarios.
Resources have two types in Terraform.
The following example shows how to use resources and data sources.
For more information about the resources and data sources of Container Service for Kubernetes (ACK), see Use ACK with Terraform.
Terraform provides two types of plug-ins.
Alibaba Cloud is the first cloud service provider in China to integrate Terraform with its services. The Alibaba Cloud Provider (terraform-provider-alicloud) provides 163 resources and 113 data sources, and covers 35 Alibaba Cloud services, such as computing, storage, networking, load balancing, CDN, middleware, access control, and database services. This meets the requirements of many big customers in cloud deployment automation.
For more information about Terraform, see Terraform.
Multi-cloud infrastructure deployment
Terraform is a popular tool of choice for multi-cloud scenarios in which similar infrastructures are deployed to Alibaba Cloud, third-party clouds, or data centers. Terraform allows developers to use the same tools and similar configuration files to manage infrastructure resources that are built on clouds of different providers.
Automated infrastructure management
Terraform can be used to create configuration file templates to repeatedly define, provision, and configure ECS resources in a predictable manner. This reduces human errors during deployment and management operations. Terraform allows you to deploy a template multiple times to create the same development, testing, and production environments.
Infrastructure as code
In Terraform, you can use code to manage and maintain resources. Terraform stores a copy of the current state of your infrastructure. This way, you can track changes made to components in the system (infrastructure as code) and share infrastructure configurations with other users.
Reduced development costs
You can use Terraform to create development and deployment environments based on your requirements to reduce costs. In addition, you can evaluate development costs before you make changes to your system.
Use ACK with Terraform
ACK allows you to manage the following resources and data sources by using Terraform.
Manages ACK edge clusters.
Manages node pools.
Manages Role-Based Access Control (RBAC) permissions.
Manages ACK managed clusters.
Manages ACK dedicated clusters.
Manages ACK Serverless clusters.
Manages cluster components.
Lists all ACK edge clusters.
Lists all ACK dedicated clusters.
Lists all permissions of specified (Resource Access Management) RAM users.
Lists all ACK managed clusters.
Lists all ACK Serverless clusters.
Lists the metadata of cluster components.
Lists available cluster components.
Lists information about available Kubernetes versions.