Updated on 2022-02-10 GMT+08:00

FAQs

How Do I Accelerate the Download of the HUAWEI CLOUD Provider?

You can run the terraform init command to download the HUAWEI CLOUD provider to the working directory. If you are in Chinese mainland, the download process may take longer or even fail.

In this case, manually download the HUAWEI CLOUD provider package to a local directory, set up a local registry, and modify the required_providers parameter in the terraform block to quickly download the HUAWEI CLOUD provider. Specifically,

  1. On the HUAWEI CLOUD provider download page, select a package according to your operating system, and download it to a local directory.
  2. Set up a local registry and decompress the HUAWEI CLOUD provider package to the following directory:

    • Linux: ~/.terraform.d/plugins/<local-registry>/<organization>/huaweicloud/<version>/<os_arch>
    • Windows: %APPDATA%\terraform.d\plugins\<local registry>\<organization>\huaweicloud\<version>\<os_arch>

    Example:

    # Linux
    ~/.terraform.d/plugins/local-registry/huaweicloud/huaweicloud/1.20.0/linux_amd64
    
    # Windows
    C:\Users\Administrator\AppData\Roaming\terraform.d\plugins\local-registry\huaweicloud\huaweicloud\1.20.0\windows_amd64

  3. Change the value of terraform.required_providers.huaweicloud.source as follows:

    terraform {
      required_version = ">= 0.13"
    
      required_providers {
        huaweicloud = {
          source  = "local-registry/huaweicloud/huaweicloud"
          version = ">= 1.20.0"
        }
      }
    }

  4. Run the terraform init command in the working directory.

How Do I View Terraform Logs?

Add the TF_LOG and TF_LOG_PATH environment variables to the system, and then you can view detailed logs. For example, in a Linux operating system, run the following commands:
$ export TF_LOG=TRACE
$ export TF_LOG_PATH=/var/log/terraform.log

How Do I Upgrade the HUAWEI CLOUD Provider?

Run the following command in the working directory:

$ terraform init -upgrade=true

How Do I Enable Automatic Completion for Terraform Commands?

Currently, automatic command-line completion is supported only in Bash and Zsh. To enable automatic command-line completion, run the following command and restart the session.

$ terraform -install-autocomplete

How Do I Report Issues or Submit Requirements on the HUAWEI CLOUD Provider?

Submit issues or requirements on the HUAWEI CLOUD provider at https://github.com/huaweicloud/terraform-provider-huaweicloud.