Terraform is an open source tool that helps you safely and efficiently pre-configure and manage cloud infrastructure in Alibaba Cloud.

What is Terraform?

Terraform is a tool for safely and efficiently building, changing, and versioning infrastructure. It is a tool for automated infrastructure orchestration. Terraform writes infrastructure as code, such as virtual machines, storage accounts, and network interfaces, in the configuration files that describe cloud resource topologies. The command-line interface (CLI) of Terraform provides a simple mechanism for deploying configuration files to Alibaba Cloud or other supported clouds and versioning the configuration files. For more information, see HashiCorp Terraform.

Terraform is a highly scalable tool that supports new infrastructure through providers. You can use Terraform to create and deploy applications to Enterprise Distributed Application Service (EDAS).

Benefits

  • Multi-cloud infrastructure deployment

    Terraform is suitable for multi-cloud scenarios, in which similar infrastructure is deployed to Alibaba Cloud, clouds of other providers, or data centers. Terraform allows developers to use identical tools and similar configuration files to manage infrastructure resources that are built on clouds of different providers.

  • Automated infrastructure management

    Terraform can create configuration file templates to define and provision ECS resources in a repeatable and predictable manner. This reduces human errors during deployment and management. Terraform can deploy the same template multiple times to create identical development, test, and production environments.

  • Infrastructure as code

    In Terraform, you can use code to manage and maintain resources. Terraform stores its own 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 needs to reduce costs. In addition, you can evaluate development costs before you make changes to the system.

Use Terraform

Terraform allows you to use a simple template language to define, preview, and deploy cloud infrastructure in Alibaba Cloud. For more information, see Configuration Syntax in Terraform documentation.

In EDAS, you can use Terraform to create and deploy applications in Elastic Compute Service (ECS) clusters and Container Service for Kubernetes (ACK) clusters.

ECS

  1. Install and configure Terraform.
  2. Use Terraform to create an ECS cluster and deploy an application.

K8s

  1. Install and configure Terraform.
  2. Use Terraform to create an ACK cluster and deploy an application.