All Products
Search
Document Center

Use CLI and Terraform to manage Alibaba Cloud resources

Last Updated: Jul 05, 2019

The Alibaba Cloud Cloud Shell is pre-installed with Alibaba Cloud CLI, Terraform, and other management tools. You can manage your paid Alibaba Cloud resources and services through these tools.

1. Cloud Shell management tool

The Cloud Shell is a management tool that is created based on Alibaba Cloud’s open APIs. With this tool, you can call Alibaba Cloud’s open APIs to manage your Alibaba Cloud services. Using the Cloud Shell with Alibaba Cloud’s open APIs achieves flexibility and scalability. You can mount the Cloud Shell to Alibaba Cloud’s built-in APIs to expand the functions you want.

1.1 Start the Cloud Shell

You can run the aliyun command to start the Cloud Shell. Command format:

aliyun <product> <operation> [--parameter1 value1 --parameter2 value2 ...]

Example:

aliyun ecs DescribeRegions |jq

Cloud Shell Execution

For more information about command formats compatible with the Alibaba Cloud Cloud Shell, see “2. Usage Guide” in Call an API through Alibaba Cloud Cloud Shell.

1.2 Compile shell

You can compile shell scripts on the Alibaba Cloud Cloud Shell to run complex management programs. The Alibaba Cloud Cloud Shell provides you with 10 GB of free temporary shortage space. You can temporarily store your shell scripts. However, when the VM instance is released, all of your temporary files will also be cleared. If you need permanent storage, you can choose to mount a storage space.

2. Manage cloud resources with Terraform

Terraform is an open-source tool that can effectively and securely construct and update cloud resources. Terraform v0.11.7 is already installed for Alibaba Cloud Cloud Shell. You can use it directly.

For more information about Terraform, see the documentation at their official website: Terraform.