This article describes how to install Terraform.
- Go to the Terraform website to download the package for your operating system.
- Decompress the package to /usr/local/bin.
- Run the
terraformcommand to verify the path.
A list of available Terraform options is displayed as follows, indicating that the installation is completed.
username:~$ terraform Usage: terraform [-version] [-help] <command> [args]
- For higher flexibility and security of rights management, it is recommended that you create and authorize a RAM user.
- Log on to the RAM console.
- Create a RAM user named Terraform and create an AccessKey for the user. For detailed steps, see Create a RAM user.
- Authorize the RAM user. In this example, the user Terraform is granted the
AliyunVPCFullAccesspermissions. For detailed steps, see Attach policies to a RAM user.
- Create an environment variable to store identity authentication information.
export ALICLOUD_ACCESS_KEY="LTAIUrZCw3********" export ALICLOUD_SECRET_KEY="zfwwWAMWIAiooj14GQ2*************" export ALICLOUD_REGION="cn-beijing"