You must install and configure Terraform before you can use its simple template language to define, preview, and deploy cloud infrastructure.
- Visit the official Terraform website to download the package for your operating system.
- Decompress the package to /usr/local/bin.
- Run the
terraformcommand to verify the path.
If a list of available Terraform options is displayed as follows, the installation is completed:
username:~$ terraform Usage: terraform [-version] [-help] <command> [args]
- For higher flexibility and security of rights management, we recommend that you create and authorize a RAM user.
- Create an environment variable to store authentication information.
export ALICLOUD_ACCESS_KEY="LTAIUrZCw3********" export ALICLOUD_SECRET_KEY="zfwwWAMWIAiooj14GQ2*************" export ALICLOUD_REGION="cn-beijing"