PluginBench
Skill
Fail
Audit score 45

huawei-cloud-terraform-installer

huaweicloud/huaweicloud-skills

Cross-platform Terraform CLI installer with Huawei Cloud mirror support to avoid network issues.

What is huawei-cloud-terraform-installer?

Installs Terraform CLI on Linux and Windows with Huawei Cloud mirror as the default provider source. Use this when setting up Terraform environments, initializing IaC projects, or when Terraform is missing from the system.

  • Installs Terraform binary on Linux and Windows platforms
  • Uses Huawei Cloud mirror by default to avoid GitHub network timeouts
  • Supports version-specific installation via --version flag
  • Provides initialization and testing options during installation
  • Handles provider installation via filesystem mirror on Windows
  • Includes status checking and uninstall capabilities

How to install huawei-cloud-terraform-installer

npx skills add https://github.com/huaweicloud/huaweicloud-skills --skill huawei-cloud-terraform-installer
Prerequisites
  • Python 3.6 or higher
  • Network access to releases.hashicorp.com and mirrors.huaweicloud.com
  • Administrator privileges on Windows or sudo access on Linux
Claude Code
Cursor
Windsurf
Cline

How to use huawei-cloud-terraform-installer

  1. 1.Run the installation script: python scripts/install_terraform.py
  2. 2.Optionally specify a version with --version flag (e.g., --version 1.15.4)
  3. 3.Use --init flag to initialize Terraform after installation
  4. 4.Use --test flag to verify the installation works correctly
  5. 5.On Windows, reopen your terminal (PowerShell/CMD) if PATH changes don't take effect
  6. 6.Verify installation with: terraform version

Use cases

Good for
  • Setting up Terraform on a new development machine without network access issues
  • Automating Terraform environment initialization in CI/CD pipelines
  • Installing specific Terraform versions for project compatibility
  • Configuring provider mirrors for teams behind restrictive networks
  • Troubleshooting Terraform installation failures due to GitHub timeouts
Who it's for
  • DevOps engineers managing infrastructure-as-code projects
  • Cloud platform engineers working with Huawei Cloud
  • Teams experiencing GitHub network connectivity issues
  • Developers setting up local Terraform environments
  • CI/CD pipeline maintainers

huawei-cloud-terraform-installer FAQ

Does this support macOS?

No, macOS is not currently supported. Only Linux and Windows are supported platforms.

Why use Huawei Cloud mirror instead of HashiCorp Registry?

The Huawei Cloud mirror avoids GitHub network timeouts and provides reliable provider downloads, especially for teams with network restrictions.

What should I do if I get 'Permission denied' on Linux?

Run the script with sudo: sudo python3 install_terraform.py

How do I install a specific Terraform version?

Use the --version flag: python scripts/install_terraform.py --version 1.15.4

Can I uninstall Terraform using this skill?

Yes, run: python scripts/install_terraform.py --uninstall

Full instructions (SKILL.md)

Source of truth, from huaweicloud/huaweicloud-skills.


name: huawei-cloud-terraform-installer description: >- Installs Terraform CLI cross-platform with Huawei Cloud mirror support. Use this skill whenever the user mentions installing Terraform, setting up Terraform environment, or when IaC tasks detect missing Terraform. Trigger: install terraform, setup terraform, terraform environment, huaweicloud provider.

compatibility: network: true allowed_hosts: - releases.hashicorp.com - mirrors.huaweicloud.com - api.github.com

Huawei Cloud Terraform Installer

Cross-platform Terraform CLI installation with Huawei Cloud mirror by default (avoids GitHub network issues).

Prerequisites

  • Python 3.6+ (required for installation script)
  • Network access to:
    • releases.hashicorp.com (Terraform binary)
    • mirrors.huaweicloud.com (HuaweiCloud Provider)

Platform Support

PlatformMethodNotes
LinuxBinaryDirect binary download
WindowsBinaryDirect download

Why use binary download only?

  • Simpler and more reliable across all platforms
  • No dependency on package manager availability
  • Consistent behavior for troubleshooting

Note: macOS is not currently supported.

Windows Special Notes

Provider installation method:

  • Use filesystem_mirror (local file mirror)
  • Download zip from Huawei Cloud mirror, extract to local
  • Configure terraform.rc to point to local directory

Unsupported methods:

  • ❌ direct (Registry → GitHub): GitHub timeout
  • ❌ network_mirror: Huawei Cloud mirror directory structure incompatible

Quick Start

Basic Installation

# Auto-install (default to Huawei Cloud mirror)
python scripts/install_terraform.py

# Install + Initialize
python scripts/install_terraform.py --init

# Install + Test
python scripts/install_terraform.py --test

Specify Version

# Install specific version
python scripts/install_terraform.py --version 1.15.4

Other Operations

# Check status only
python scripts/install_terraform.py --check

# Uninstall
python scripts/install_terraform.py --uninstall

Mirror Strategy

ResourceSourceNotes
Terraform binaryHashiCorp ReleasesOfficial source
ProviderHuawei Cloud Mirror (default)Avoid GitHub network issues

Huawei Cloud Mirror: https://mirrors.huaweicloud.com/terraform/

Troubleshooting

Issue 1: Windows PATH Not Effective

Solution: Reopen terminal (PowerShell/CMD)

Issue 2: Permission Denied

[ERROR] Permission denied, please run with administrator privileges

Solution:

  • Windows: Right-click → Run as administrator
  • Linux: sudo python3 install_terraform.py

Issue 3: Network Timeout

Solution: Default uses Huawei Cloud mirror, should not encounter this issue