huaweicloud-terraform-planner — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited huaweicloud-terraform-planner (Agent Skill) and scored it 92/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 2 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 2 flagged
The text {match} tells the agent to skip the normal "ask the user first" gate. Used adversarially it removes the human-in-the-loop check before destructive or sensitive actions, turning a normally-gated agent into a fire-and-forget executor.
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Always get the latest schema — the provider evolves fast and training data is always outdated. Discover real values from the cloud. Only ask about what the user hasn't already told you. Use data blocks, not hardcoded IDs.
huaweicloud provider changes rapidly. Your training data is stale. Every resource, every time.terraform_get_latest_provider_version(namespace="huaweicloud", name="huaweicloud") before writing any code.data blocks for existing resources and resource references for created resources. See Data Block Map below.Extract from the user's request:
Example: "RDS MySQL 8.0 with HA, 100GB ULTRAHIGH, in prod-vpc, db-subnet, rds-sg, la-north-2a standby la-north-2b" →
For every resource type:
terraform_get_latest_provider_version(namespace="huaweicloud", name="huaweicloud") → latest versionterraform_search_providers(provider_name="huaweicloud", provider_namespace="huaweicloud", service_slug="<resource>", provider_document_type="resources") → find docterraform_get_provider_details(provider_doc_id="<id>") → full schema with required + optional paramsAlso search for data sources (provider_document_type="data-sources") to find available data blocks for referencing existing resources.
This is mandatory even for resources you think you know. The provider changes between versions — params get renamed, deprecated, or added.
For each value the user did NOT specify, call the corresponding HCloud MCP tool from the Discovery Map below.
Batch independent calls in parallel:
// All independent — call simultaneously:
hcloud_list_flavors(region="la-north-2")
hcloud_list_images(imagetype="gold", os_type="Linux")
hcloud_list_availability_zones(region="la-north-2")
hcloud_list_vpcs(region="la-north-2")
hcloud_list_security_groups(region="la-north-2")Then call dependent ones:
// Subnets depend on VPC choice:
hcloud_list_subnets(vpc_id="<chosen-vpc-id>")When the user specified a name (e.g. "prod-vpc"), find it by name in the list results. If found, note its name for the data block. If not found, tell the user and ask.
When the user specified an ID directly, verify it exists by checking the list results.
Only ask about values that are:
Format questions clearly:
name — N vCPU, M GB and recommend based on workloadOS Version (arch) and recommend latest LTSname (CIDR)name (CIDR)nameBatch related questions. Instead of 6 separate asks, do one:
"I found these options for your RDS instance:
• Flavors: [list with recommendation]
• Availability zones: [list]
Which would you like?"Write complete Terraform code with:
Critical: Data blocks vs hardcoded IDs
NEVER hardcode an ID like image_id = "b1eecdf6-..." or security_group_ids = ["7d730547-..."].
Instead, write a data block and reference it:
data "huaweicloud_images_image" "ubuntu" {
name = "Ubuntu 24.04 server 64bit"
visibility = "public"
most_recent = true
}
resource "huaweicloud_compute_instance" "web" {
image_id = data.huaweicloud_images_image.ubuntu.id
}For resources being CREATED (not referenced), use resource references:
resource "huaweicloud_vpc" "main" { ... }
resource "huaweicloud_vpc_subnet" "main" {
vpc_id = huaweicloud_vpc.main.id
}Then offer: terraform init && terraform plan
When referencing existing resources, always use data blocks. When creating resources, use resource references. Never hardcode IDs.
| What | Data Block | How to reference | Example |
|---|---|---|---|
| Image | data "huaweicloud_images_image" | data.huaweicloud_images_image.<name>.id | name = "Ubuntu 24.04 server 64bit", visibility = "public", most_recent = true |
| VPC | data "huaweicloud_vpc" | data.huaweicloud_vpc.<name>.id | name = "prod-vpc" |
| Subnet | data "huaweicloud_vpc_subnet" | data.huaweicloud_vpc_subnet.<name>.id | name = "db-subnet" |
| Security Group | data "huaweicloud_networking_secgroup" | data.huaweicloud_networking_secgroup.<name>.id | name = "default" |
| Availability Zones | data "huaweicloud_availability_zones" | data.huaweicloud_availability_zones.<name>.names[0] | state = "available" |
| Key Pair | No data block — use string directly | "my-key" | Key pair names are stable strings |
| RDS Flavor | No data block — use string directly | "rds.mysql.x1.large.2" | Flavor names are stable strings |
| Storage Type | No data block — use string directly | "ULTRAHIGH" | Storage type names are stable strings |
| ECS Flavor | No data block — use string directly | "c6.large.2" | Flavor names are stable strings |
How to decide:
data source exists in the provider → use ithuaweicloud_vpc.main.id)Generic map of "what you need" → "which HCloud tool to call". Compose these based on the resource schema from Step 2. Discovery confirms what exists so you can write correct data block filters.
| Need | Tool | Dependencies |
|---|---|---|
| VPC | hcloud_list_vpcs | — |
| Subnet | hcloud_list_subnets | vpc_id (after VPC chosen) |
| Security Group | hcloud_list_security_groups | — |
| ECS Flavor | hcloud_list_flavors | — |
| RDS Flavor | hcloud_list_rds_flavors | database_name (after engine chosen) |
| Image | hcloud_list_images | — |
| Availability Zone | hcloud_list_availability_zones | — |
| Key Pair | hcloud_list_keypairs | — |
| RDS Datastore | hcloud_list_rds_datastores | database_name |
| RDS Storage | hcloud_list_rds_storage_types | database_name, version_name |
| ELB Flavor | hcloud_list_elb_flavors | — |
| DCS Flavor | hcloud_list_dcs_flavors | — |
| DCS AZ | hcloud_list_dcs_available_zones | — |
| DDS Flavor | hcloud_list_dds_flavors | — |
| DDS Storage | hcloud_list_dds_storage_types | — |
How to use this: Look at the resource schema from Step 2. For each required parameter that the user didn't specify, find its type in this map and call the tool. If "Dependencies" shows a value, that value must be resolved first. Use the discovered names/values to write data block filters.
Always include. Get version from terraform_get_latest_provider_version(namespace="huaweicloud", name="huaweicloud").
terraform {
required_providers {
huaweicloud = {
source = "huaweicloud/huaweicloud"
version = "~> X.Y.Z"
}
}
}
provider "huaweicloud" {
region = "<region>"
}User: "Create a VPC, subnet, and ECS with latest Ubuntu 24.04 in la-north-2"
Agent:
huaweicloud_vpc, huaweicloud_vpc_subnet, huaweicloud_compute_instance from Terraform MCP. Also get data sources for huaweicloud_images_image, huaweicloud_availability_zones. Latest provider: 1.91.0.hcloud_list_flavors, hcloud_list_images(imagetype="gold", os_type="Linux"), hcloud_list_availability_zones, hcloud_list_security_groups, hcloud_list_keypairs.terraform {
required_providers {
huaweicloud = {
source = "huaweicloud/huaweicloud"
version = "~> 1.91.0"
}
}
}
provider "huaweicloud" {
region = "la-north-2"
}
data "huaweicloud_images_image" "ubuntu" {
name = "Ubuntu 24.04 server 64bit"
visibility = "public"
most_recent = true
}
resource "huaweicloud_vpc" "main" {
name = "vpc-demo"
cidr = "192.168.0.0/16"
}
resource "huaweicloud_vpc_subnet" "main" {
name = "subnet-demo"
vpc_id = huaweicloud_vpc.main.id
cidr = "192.168.0.0/24"
gateway_ip = "192.168.0.1"
}
resource "huaweicloud_networking_secgroup" "main" {
name = "sg-demo"
}
resource "huaweicloud_compute_instance" "main" {
name = "ecs-ubuntu2404"
flavor_id = "c6.large.2"
image_id = data.huaweicloud_images_image.ubuntu.id
availability_zone = "la-north-2a"
security_group_ids = [huaweicloud_networking_secgroup.main.id]
network {
uuid = huaweicloud_vpc_subnet.main.id
}
}User: "I need an RDS MySQL 8.0 with HA, 100GB ULTRAHIGH, in prod-vpc, db-subnet, rds-sg, la-north-2a standby la-north-2b"
Agent:
huaweicloud_rds_instance schema from Terraform MCP. Latest provider: 1.91.0.hcloud_list_rds_flavors(region="la-north-2", database_name="MySQL"). Also verify VPC/subnet/SG exist.data blocks for VPC, subnet, and security group instead of hardcoded IDs.~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.