Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
9db40ab
API网关提供给分组绑定插件的能力
miniidealab Feb 11, 2026
64fbe65
Merge branch 'aliyun:master' into master
miniidealab Mar 2, 2026
f8df785
1.修改方法名符合规范
miniidealab Mar 2, 2026
272e4b8
Update alicloud_dms_enterprise_instance
xuzhang3 Mar 2, 2026
0bf88a4
Merge pull request #9538 from xuzhang3/f/dms_enterprise_api_upgarde
xuzhang3 Mar 2, 2026
cf17287
Cleanup after release v1.272.0
ChenHanZhang Feb 28, 2026
d7fccc8
resource/alicloud_esa_site: Added the field ai_mode, ai_template, glo…
ChenHanZhang Mar 2, 2026
aa6fac6
resource/alicloud_elasticsearch_instance: Added the field kibana_priv…
ChenHanZhang Mar 2, 2026
95bd55a
Cleanup after release v1.272.1
ChenHanZhang Mar 2, 2026
0b00cdb
Cleanup after release v1.272.1
ChenHanZhang Mar 2, 2026
4899a0c
Fix the number parsing overflow issue
xuzhang3 Mar 3, 2026
08d4b2e
Merge pull request #9543 from xuzhang3/fix/config_aggregator_num_parse
xuzhang3 Mar 4, 2026
ed767ab
resource/alicloud_ram_groups: Refactored the resource alicloud_ram_gr…
xuzhang3 Mar 5, 2026
2a5a154
Merge pull request #9544 from xuzhang3/fix/data_ram_user_groups
xuzhang3 Mar 5, 2026
f8eda86
New Resource: alicloud_nlb_hd_monitor_region_config.
ChenHanZhang Mar 6, 2026
9a3cf5a
resource/alicloud_rds_backup: Added the field backup_id, backup_reten…
ChenHanZhang Mar 6, 2026
150454a
resource/alicloud_vpc_nat_ip_cidr: Refactored the resource alicloud_v…
MrWolong Mar 6, 2026
9d6d8b4
1. update terraform version in docs
miniidealab Mar 9, 2026
41de080
remove Chinese comments
miniidealab Mar 9, 2026
29c1d8b
add params check
miniidealab Mar 9, 2026
bb4eb13
resource/alicloud_ecs_network_interface: Added the field delete_on_re…
ChenHanZhang Mar 9, 2026
2f1a312
reuse service function for DetachGroupPlugin
miniidealab Mar 9, 2026
3c625e3
fix import document issue
miniidealab Mar 9, 2026
4ebb4e3
fix Attributes Reference document issue
miniidealab Mar 9, 2026
eaa19f9
docs: Update SKILL and elasticsearch_instance documents.
ChenHanZhang Mar 9, 2026
a96ecdc
docs: Update oss_bucket, oss_bucket_cors, oss_bucket_policy, oss_buck…
ChenHanZhang Mar 9, 2026
7c1b24e
remove chinese comments
miniidealab Mar 9, 2026
507725f
API网关提供给分组绑定插件的能力
miniidealab Feb 11, 2026
916332c
1.修改方法名符合规范
miniidealab Mar 2, 2026
981e19a
1. update terraform version in docs
miniidealab Mar 9, 2026
f631a90
remove Chinese comments
miniidealab Mar 9, 2026
6987d56
add params check
miniidealab Mar 9, 2026
04cece5
reuse service function for DetachGroupPlugin
miniidealab Mar 9, 2026
74dfc1d
fix import document issue
miniidealab Mar 9, 2026
928be16
fix Attributes Reference document issue
miniidealab Mar 9, 2026
793e3a2
remove chinese comments
miniidealab Mar 9, 2026
9bd5e78
fix type issue
miniidealab Mar 9, 2026
2f8529f
resolve conflict
miniidealab Mar 9, 2026
46e9256
fix result lost issue
miniidealab Mar 9, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
100 changes: 100 additions & 0 deletions .opencode/skills/link-info-extractor/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
---
name: link-info-extractor
description: 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.
metadata:
version: "2.0.0"
domain: requirements
triggers: aone link, workitem, code review, codereview, requirement url, extract from link
---

# Link Info Extractor

When a user provides a URL pointing to a requirement or review system, use this skill to fetch and extract structured information from that link.

## Supported Sources

| Source | URL Pattern | Parameters to Extract |
|--------|------------|----------------------|
| Aone Workitem | `https://project.aone.alibaba-inc.com/v2/project/<projectId>/req/<workitemId>` | `projectId`, `workitemId` |
| GitLab Code Review | `https://code.alibaba-inc.com/<group>/<project>/codereview/<reviewId>` | `group`, `project`, `reviewId` |

## Step 1: Identify the Source

Match the URL against known patterns above to determine the source type.

## Step 2: Fetch Information via MCP Tools

### Source A: Aone Workitem

1. Call `coop_query_workitem_detail(workitemId)` to get the workitem description, title, and status
2. Call `coop_get_workitem_comments(workitemId)` to get all comments

> **Note:** The MCP tool name prefix (e.g., `coop_`) may vary across different app registrations, but the tool name suffix (`query_workitem_detail`, `get_workitem_comments`) stays the same. Always match by suffix.

### Source B: GitLab Code Review

Use the `alibaba_code` MCP to fetch Code Review information:

1. Get Code Review details (description, status, changed files)
2. Get comments (may contain technical specs or requirement details)

> **Note:** The MCP name prefix may vary across different app registrations, but the underlying tool names stay the same. Always match by suffix.

## Step 3: Extract Structured Requirements

From the fetched information, extract a structured technical spec. Focus on:

1. **Attribute definitions**
- Attribute name (Terraform-side `snake_case` naming)
- Type (Boolean / String / Integer / List / Map, etc.)
- Required / Optional
- ForceNew (resource must be recreated on change)
- Computed (value returned by server)

2. **API mapping**
- `requestPath` — parameter name for Create/Update API calls (typically PascalCase)
- `responsePath` — field name in Read API response
- Which API operations are involved: Create / Read / Update

3. **Constraints**
- Default values
- Value range restrictions
- Mutual exclusion or dependencies with other attributes
- Minimum supported provider version

## Output Format

Return structured requirement info:

```
## Requirement Summary

**Source**: [<source description>](<url>)
**Title**: <title>

### New Attributes

| Attribute | Type | Required | ForceNew | Computed | Description |
|-----------|------|----------|----------|----------|-------------|
| <name> | <type> | <Y/N> | <Y/N> | <Y/N> | <description> |

### API Mapping

- **Create**: `<API name>` — request path: `<requestPath>`
- **Read**: `<API name>` — response path: `<responsePath>`
- **Update**: `<API name>` — request path: `<requestPath>`

### Constraints

- <constraint 1>
- <constraint 2>
- ...
```

## Important Notes

1. Technical specs may appear in the description OR in comments — always check both
2. If the requirement is unclear, flag uncertain parts and ask the user to confirm
3. Extracted API parameter names must match Alibaba Cloud OpenAPI documentation
4. Distinguish which attributes support Update vs. Create-only (ForceNew)
5. This skill is NOT needed when the user describes requirements directly without a link
103 changes: 103 additions & 0 deletions .opencode/skills/provider-add-attribute/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
---
name: provider-add-attribute
description: 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.
metadata:
version: "2.0.0"
domain: terraform-provider
triggers: add attribute, add field, new attribute, new field, resource attribute
---

# Add Attribute to Provider Resource

Add one or more new attributes to an existing Terraform Provider resource.

## Requirement Sources

Requirements may come from:
- User's direct description
- An Aone workitem link
- A GitLab Code Review link

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"], ...)`

## Step 1: Prepare Development Environment

```bash
cd <provider_repo_path>
git checkout master
git pull --rebase alicloud master
git checkout -b feat/<briefDescription>
```

Checkpoint: `git branch --show-current` should show the new branch name.

## Step 2: Locate Target Files

Find these four files:
- `alicloud/resource_alicloud_<product>_<resource>.go` — Schema + CRUD
- `alicloud/resource_alicloud_<product>_<resource>_test.go` — Tests
- `alicloud/service_alicloud_<product>[_v2].go` — Describe method (data source for Read)
- `website/docs/r/<product>_<resource>.html.markdown` — Documentation

Find an existing attribute with the **same type and behavior** as a reference template (e.g., same `TypeBool` + `Optional` + `Computed` + `ForceNew` combination).

Note: Attribute tags must be set based on actual requirements:
- `Computed` is NOT set by default. If tests show the new attribute causes a diff when unset (typically in existing test cases), add `Computed: true`.
- `ForceNew` should be set to `true` when the attribute does not support updates.

## Step 3: Modify Code

### Rules

1. **Remove the auto-generated comment on line 1** once you modify a resource file: `// Package alicloud. This file is generated automatically...`
2. **Naming convention**: Terraform uses `snake_case` (e.g., `delete_on_release`), API uses `PascalCase` (e.g., `DeleteOnRelease`)
3. **Boolean attributes MUST use `GetOkExists`**: `GetOk` cannot distinguish `false` from unset (Go zero-value problem), causing `false` values to be silently dropped
4. **String / Integer attributes use `GetOk`**
5. **Do NOT use `v.(*schema.Set)` or `v.([]interface{})` for array type assertion** — use `convertToInterfaceArray` instead
6. **New attributes MUST have tests**. If the attribute is updatable, the update action MUST be tested
7. **Document the available-since version** for new attributes, e.g., `* \`tags\` - (Optional, Map, Available since v1.55.3) ...`. Use the upcoming version from CHANGELOG.md

## Step 4: Verify

```bash
# 1. Quick CI check
make ci-check-quick

# 2. Full CI check (includes example tests and integration tests)
make ci-check

# 3. If step 2 has test failures, debug with specific resource and test case:
make test-resource-debug RESOURCE=alicloud_vpc TESTCASE=TestAccAliCloudVPC_enableIpv6 LOGLEVEL=TRACE LOGFILE=vpc-test.log
```

## Step 5: Commit Code

Squash all changes into **a single commit**:

```bash
git status && git diff
make commit
git push origin feat/<brief_description>
```

Commit message format:
```
feat(<resource_name>): add <attribute_name> attribute

Closes: <requirement_url>
```

## Important Notes

1. Skip unit tests — only run resource acceptance tests
2. All test failures (API errors, inventory issues, quota problems) must be resolved, never skipped
3. All changes should be squashed into a single git commit
4. Before adjusting API call parameters, use `aliyun <Product> <Action> help` to check API documentation

## Acceptance Criteria

1. Requirement is correctly implemented
2. New test cases pass (Create + Import + Update all PASS)
3. All existing test cases for the resource still pass
4. ci-check-quick and ci-check pass
Loading