con un clic
provider-fix-documentation
// Fix documentation issues in Terraform Provider resources. Covers attribute value corrections, description updates, example fixes, and documentation consistency checks.
// Fix documentation issues in Terraform Provider resources. Covers attribute value corrections, description updates, example fixes, and documentation consistency checks.
| name | provider-fix-documentation |
| description | Fix documentation issues in Terraform Provider resources. Covers attribute value corrections, description updates, example fixes, and documentation consistency checks. |
| metadata | {"version":"1.0.0","domain":"terraform-provider","triggers":"fix documentation, update docs, correct attribute values, documentation error, wrong description"} |
Fix documentation issues in Terraform Provider resources, including incorrect attribute values, outdated descriptions, missing information, or inconsistencies between code and documentation.
Requirements may come from:
If the user provides a link, use the link-info-extractor skill to extract requirement details first:
task(category="quick", load_skills=["link-info-extractor"], ...)
Common documentation issues include:
Find the documentation file:
website/docs/r/<product>_<resource>.html.markdown — Resource documentationwebsite/docs/d/<product>_<resource>.html.markdown — Data source documentationFind the corresponding code file for verification:
alicloud/resource_alicloud_<product>_<resource>.go — Schema definitionalicloud/data_source_alicloud_<product>_<resource>.go — Data source schemaFind the schema definition in the Go file:
"attribute_name": {
Type: schema.TypeString,
Optional: true,
ValidateFunc: StringInSlice([]string{"Value1", "Value2"}, false),
}
Check the validation function — The values in StringInSlice are the actual valid values
Check conversion functions — Look for mapping between Terraform values and API values:
// Request conversion (Terraform → API)
if value == "Value1" {
request.ApiValue = "api_value_1"
}
// Response conversion (API → Terraform)
if response.ApiValue == "api_value_1" {
terraformValue = "Value1"
}
Compare with documentation — The docs should list the Terraform-side values (what users configure), NOT the API-side values
Description field (if present)ValidateFunc in schema* `attribute_name` - (Optional, Computed) Description. Supported values:
- `Value1`: Description of value 1
- `Value2`: Description of value 2
* `old_attribute` - (Optional, Deprecated since v1.261.0) Description. Use `new_attribute` instead.
* `new_attribute` - (Optional, Available since v1.267.0) Description.
Before:
* `payment_type` - (Optional) Billing method. Supported values:
- `prepaid`: Subscription
- `postpaid`: Pay-as-you-go
After:
* `payment_type` - (Optional) Billing method. Supported values:
- `PayAsYouGo`: Pay-as-you-go
- `Subscription`: Subscription
Before:
* `instance_charge_type` - (Optional) Instance charge type.
After:
* `instance_charge_type` - (Optional, Deprecated since v1.261.0) Instance charge type. Use `payment_type` instead.
Before:
* `status` - (Optional) Instance status. Valid values: Active, Inactive.
After:
* `status` - (Optional) Instance status. Supported values:
- `Active`: Instance is active and running
- `Inactive`: Instance is stopped
ValidateFunc in codegrep -r "attribute_name" website/docs/
git status && git diff
make commit
git push origin fix/<brief_description>
Commit message format:
docs(<resource_name>): fix <attribute_name> documentation
- Correct valid values from <old_values> to <new_values>
- Update description to match schema definition
Closes: <requirement_url>
After committing, you MUST run CI checks and ensure all pass:
# Run quick CI check (required for all documentation changes)
make ci-check-quick
Checkpoint:
make ci-check-quick exits with code 0If CI checks fail:
git commit --amendmake ci-check-quickDO NOT skip this step or push code that fails CI checks.
ValidateFunc over existing docsprovider-add-attribute skillmake ci-check-quick passes with exit code 0 (MANDATORY)resource_alicloud_elasticsearch_instance.go:
"payment_type": {
Type: schema.TypeString,
Optional: true,
ValidateFunc: StringInSlice([]string{"PayAsYouGo", "Subscription"}, false),
}
website/docs/r/elasticsearch_instance.html.markdownprepaid/postpaid, schema says PayAsYouGo/Subscriptionmake ci-check-quick and ensure all checks pass ✅Automated acceptance workflow for Terraform Provider resource releases. Supports two modes - Aone-driven (from workitem link) and local-branch (already on feature branch). Covers code review, acceptance testing, fixing failures, and CI checks.
Code review SOP for Terraform Provider resource changes. Covers delete implementation, code-doc consistency, conditional logic documentation, doc quality, test quality, and common bug patterns. Used standalone or referenced by provider-resource-acceptance.
Extract requirement details from a URL (Aone workitem, GitLab Code Review, etc.) using MCP tools. Use when the user provides a link to a requirement or review system.
Add new attributes to an existing Terraform Provider resource. Covers the full workflow from code changes (Schema/Create/Read/Update), testing, documentation, to submitting a PR.