From alibabacloud-core
Generate and modify Alibaba Cloud Terraform HCL code. Use when the user asks for Terraform configurations, alicloud provider resources, HCL code generation, infrastructure as code for Alibaba Cloud, or modifications to existing Terraform files. Triggers on: write Terraform for Alibaba Cloud, create alicloud Terraform config, generate HCL for ECS, Terraform code for VPC, alicloud infrastructure as code, Terraform resource for RDS, modify Terraform configuration, alicloud provider Terraform, terraform best practices.
How this skill is triggered — by the user, by Claude, or both
Slash command
/alibabacloud-core:alibabacloud-terraform-usageThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Generate and modify production-quality Alibaba Cloud Terraform (HCL)
Generate and modify production-quality Alibaba Cloud Terraform (HCL) configurations from natural language descriptions.
This skill generates bare HCL from a resource-level spec. If the request
reads as a packaged IaC solution — HA web app bootstrap, DR setup, backup
automation, multi-tier landing zone, golden-image rotation — invoke
alibabacloud-find-skills first; an Alibaba-published Terraform module skill
often beats hand-rolled HCL for these end-to-end patterns. Fall back to raw
generation only after find-skills returns no match. Full trigger conditions
are in mcp-core-best-practices → Skill Discovery.
For more advanced needs — schema-verified codegen, dual-reviewer validation,
remote IaC Service apply, Day-2 iteration on stored state_id — point the
user to the alibabacloud-spec-ops plugin instead of this single-shot skill.
alibabacloud-core MCP server. The permitted tools are:
AlibabaCloud___CallCLI — Execute IaCService CLI commands to query Terraform product/resource metadataAlibabaCloud___SearchDocument — Search Alibaba Cloud documentation by keywordAlibabaCloud___ReadDocument — Read a specific document by URL (must use URLs obtained from SearchDocument)terraform plan, terraform apply, or any other Terraform commands via the shell. Generated HCL code is for the user to review and apply themselves.terraform apply, especially when resources involve costs, data deletion, or security-sensitive configurations.All IaCService APIs are invoked through AlibabaCloud___CallCLI:
| CLI Command | Purpose |
|---|---|
aliyun iacservice list-products | List all Alibaba Cloud products that support Terraform |
aliyun iacservice list-resource-types --product <product> | List Terraform resource types for a specific product |
aliyun iacservice get-resource-type --resource-type <resourceType> | Get full schema for a Terraform resource type (e.g., alicloud_vpc) |
Parse the user's request to identify:
AlibabaCloud___CallCLI with aliyun iacservice list-products to confirm the target product supports Terraform.AlibabaCloud___CallCLI with aliyun iacservice list-resource-types --product <product> to discover correct resource type names (e.g., alicloud_vpc, alicloud_instance, alicloud_db_instance).If the request spans multiple products, query each product separately.
Call AlibabaCloud___CallCLI with aliyun iacservice get-resource-type --resource-type <resourceType> to retrieve:
Documentation lookup is a two-step process:
AlibabaCloud___SearchDocument with the resource type name (e.g., alicloud_vpc) to find relevant documentation URLs.AlibabaCloud___ReadDocument with a URL from the search results to get full content.Important: Always search first to get valid URLs. Do NOT pass arbitrary URLs to ReadDocument.
After reading documentation:
data.alicloud_zones, data.alicloud_instance_types)Based on gathered information:
alicloud provider configuration if this is a new configurationvariable blocks for values the user should customizelocals for computed or derived valuesoutput blocks for important resource attributes (e.g., IDs, IP addresses)description fields in variables and outputsdata.alicloud_zones)Present the generated HCL with:
terraform applyregion in the provider block or as a variablealicloud_vpc.main, alicloud_instance.web_server)depends_on only when implicit dependencies are insufficientWhen attribute definitions or constraints are unclear:
AlibabaCloud___SearchDocument with relevant keywords (resource type, attribute name, error message)AlibabaCloud___ReadDocument with the URL from search resultsget-resource-type with the documentationget-resource-typenpx claudepluginhub acloudlabs-unofficial/alibabacloud-agent-toolkit --plugin alibabacloud-coreCreates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.