This document describes how to install and configure Terraform.
unzip terraform_1.x.x_linux_amd64.zip
~/.profile
file.echo $"export PATH=\$PATH:$(pwd)" >> ~/.bash_profile
source ~/.bash_profile
terraform -version
If the following information is returned (the version number may be different), the installation is successful:
> Terraform v1.0.10
> on darwin_amd64
> Your version of Terraform is out of date! The latest version
> is 1.1.0. You can update by downloading from https://www.terraform.io/downloads.html
Before using Terraform for the first time, go to the TencentCloud API Key page to apply for SecretId
and SecretKey
. If you already have them, go to step 3.
Log in to the CAM console and select Access Key > Manage API Key on the left sidebar.
On the Manage API Key page, click Create Key to create a pair of SecretId/SecretKey
.
You can authenticate in two ways:
Add the following content to the environment variable configuration:
Replace <your-secret-id>
and <your-secret-key>
with SecretId
and SecretKey
obtained in the Get credentials step.
export TENCENTCLOUD_SECRET_ID=<your-secret-id>
export TENCENTCLOUD_SECRET_KEY=<your-secret-key>
At this point, you have installed Terraform and configured the environment variable. You can now proceed to create a site through Terraform.
Was this page helpful?