[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6BZRYWCS7Z2CNCJ9Z4QXDKZ":3,"skill-same:01M6BZRYWCS7Z2CNCJ9Z4QXDKZ":73},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":26,"publishedAt":38,"linkOnly":39,"markdownContent":40,"markdownBody":41,"frontMatter":42,"refName":46,"commitSha":47,"skillDirectory":48,"forksCount":14,"repositoryHtmlUrl":49,"repositoryHomepageUrl":6,"ownerHtmlUrl":50,"ownerBlogUrl":6,"ownerDescription":51,"updatedAt":52,"install":53,"resources":66},"01M6BZRYWCS7Z2CNCJ9Z4QXDKZ","provider-actions",null,"Implement Terraform Provider actions using the Plugin Framework. Use when developing imperative operations that execute at lifecycle events (before\u002Fafter create, update, destroy).","twidxuga\u002Fdotfiles","twidxuga","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F12471681?v=4","01M6BZR45BH8JCC79Q9SKSS6SC","Ricardo Santos","01M6BZR49CRKSBZYQD1WNQWCXW",0,"MIT","https:\u002F\u002Fgithub.com\u002Ftwidxuga\u002Fdotfiles\u002Fblob\u002Fmain\u002Fopencode\u002Fdot-config\u002Fopencode\u002Fskills\u002Fterraform-provider-actions\u002FSKILL.md",[18,23],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000008","测试与质量","SCENARIO","使用场景",{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000011","运维与部署",[27,28,29,30,31,32,33,34,35,36,37],"actions","provider actions","implement","plugin","create","update","terraform","terraform provider","framework","ibm","lifecycle","2026-11-10 10:12:30",false,"---\nname: provider-actions\ndescription: Implement Terraform Provider actions using the Plugin Framework. Use when developing imperative operations that execute at lifecycle events (before\u002Fafter create, update, destroy).\nmetadata:\n  copyright: Copyright IBM Corp. 2026\n  version: \"0.0.1\"\n---\n\n# Terraform Provider Actions Implementation Guide\n\n## Overview\n\nTerraform Actions enable imperative operations during the Terraform lifecycle. Actions are experimental features that allow performing provider operations at specific lifecycle events (before\u002Fafter create, update, destroy).\n\n**References:**\n- [Terraform Plugin Framework](https:\u002F\u002Fdeveloper.hashicorp.com\u002Fterraform\u002Fplugin\u002Fframework)\n- [Terraform Actions RFC](https:\u002F\u002Fgithub.com\u002Fhashicorp\u002Fterraform\u002Fblob\u002Fmain\u002Fdocs\u002Fplugin-protocol\u002Factions.md)\n\n## File Structure\n\nActions follow the standard service package structure:\n\n```\ninternal\u002Fservice\u002F\u003Cservice>\u002F\n├── \u003Caction_name>_action.go       # Action implementation\n├── \u003Caction_name>_action_test.go  # Action tests\n└── service_package_gen.go        # Auto-generated service registration\n```\n\nDocumentation structure:\n```\nwebsite\u002Fdocs\u002Factions\u002F\n└── \u003Cservice>_\u003Caction_name>.html.markdown  # User-facing documentation\n```\n\nChangelog entry:\n```\n.changelog\u002F\n└── \u003Cpr_number_or_description>.txt  # Release note entry\n```\n\n## Action Schema Definition\n\nActions use the Terraform Plugin Framework with a standard schema pattern:\n\n```go\nfunc (a *actionType) Schema(ctx context.Context, req action.SchemaRequest, resp *action.SchemaResponse) {\n    resp.Schema = schema.Schema{\n        Attributes: map[string]schema.Attribute{\n            \u002F\u002F Required configuration parameters\n            \"resource_id\": schema.StringAttribute{\n                Required:    true,\n                Description: \"ID of the resource to operate on\",\n            },\n            \u002F\u002F Optional parameters with defaults\n            \"timeout\": schema.Int64Attribute{\n                Optional:    true,\n                Description: \"Operation timeout in seconds\",\n                Default:     int64default.StaticInt64(1800),\n                Computed:    true,\n            },\n        },\n    }\n}\n```\n\n### Common Schema Issues\n\n**Pay special attention to the schema definition** - common issues after a first draft:\n\n1. **Type Mismatches**\n   - Using `types.String` instead of `fwtypes.String` in model structs\n   - Using `types.StringType` instead of `fwtypes.StringType` in schema\n   - Mixing framework types with plugin-framework types\n\n2. **List\u002FMap Element Types**\n   ```go\n   \u002F\u002F WRONG - missing ElementType\n   \"items\": schema.ListAttribute{\n       Optional: true,\n   }\n\n   \u002F\u002F CORRECT\n   \"items\": schema.ListAttribute{\n       Optional:    true,\n       ElementType: fwtypes.StringType,\n   }\n   ```\n\n3. **Computed vs Optional**\n   - Attributes with defaults must be both `Optional: true` and `Computed: true`\n   - Don't mark action inputs as `Computed` unless they have defaults\n\n4. **Validator Imports**\n   ```go\n   \u002F\u002F Ensure proper imports\n   \"github.com\u002Fhashicorp\u002Fterraform-plugin-framework-validators\u002Fint64validator\"\n   \"github.com\u002Fhashicorp\u002Fterraform-plugin-framework-validators\u002Fstringvalidator\"\n   ```\n\n5. **Region\u002FProvider Attribute**\n   - Use framework-provided region handling when available\n   - Don't manually define provider-specific config in schema if framework handles it\n\n6. **Nested Attributes**\n   - Use appropriate nested object types for complex structures\n   - Ensure nested types are properly defined\n\n### Schema Validation Checklist\n\nBefore submitting, verify:\n- [ ] All attributes have descriptions\n- [ ] List\u002FMap attributes have ElementType defined\n- [ ] Validators are imported and applied correctly\n- [ ] Model struct uses correct framework types\n- [ ] Optional attributes with defaults are marked Computed\n- [ ] Code compiles without type errors\n- [ ] Run `go build` to catch type mismatches\n\n## Action Invoke Method\n\nThe Invoke method contains the action logic:\n\n```go\nfunc (a *actionType) Invoke(ctx context.Context, req action.InvokeRequest, resp *action.InvokeResponse) {\n    var data actionModel\n    resp.Diagnostics.Append(req.Config.Get(ctx, &data)...)\n\n    \u002F\u002F Create provider client\n    conn := a.Meta().Client(ctx)\n\n    \u002F\u002F Progress updates for long-running operations\n    resp.Progress.Set(ctx, \"Starting operation...\")\n\n    \u002F\u002F Implement action logic with error handling\n    \u002F\u002F Use context for timeout management\n    \u002F\u002F Poll for completion if async operation\n\n    resp.Progress.Set(ctx, \"Operation completed\")\n}\n```\n\n## Key Implementation Requirements\n\n### 1. Progress Reporting\n\n- Use `resp.SendProgress(action.InvokeProgressEvent{...})` for real-time updates\n- Provide meaningful progress messages during long operations\n- Update progress at key milestones\n- Include elapsed time for long operations\n\n### 2. Timeout Management\n\n- Always include configurable timeout parameter (default: 1800s)\n- Use `context.WithTimeout()` for API calls\n- Handle timeout errors gracefully\n- Validate timeout ranges (typically 60-7200 seconds)\n\n### 3. Error Handling\n\n- Add diagnostics with `resp.Diagnostics.AddError()`\n- Provide clear error messages with context\n- Include API error details when relevant\n- Map provider error types to user-friendly messages\n- Document all possible error cases\n\nExample error handling:\n```go\n\u002F\u002F Handle specific errors\nvar notFound *types.ResourceNotFoundException\nif errors.As(err, &notFound) {\n    resp.Diagnostics.AddError(\n        \"Resource Not Found\",\n        fmt.Sprintf(\"Resource %s was not found\", resourceID),\n    )\n    return\n}\n\n\u002F\u002F Generic error handling\nresp.Diagnostics.AddError(\n    \"Operation Failed\",\n    fmt.Sprintf(\"Could not complete operation for %s: %s\", resourceID, err),\n)\n```\n\n### 4. Provider SDK Integration\n\n- Use provider SDK clients from `a.Meta().\u003CService>Client(ctx)`\n- Handle pagination for list operations\n- Implement retry logic for transient failures\n- Use appropriate error types\n\n### 5. Parameter Validation\n\n- Use framework validators for input validation\n- Validate resource existence before operations\n- Check for conflicting parameters\n- Validate against provider naming requirements\n\n### 6. Polling and Waiting\n\nFor operations that require waiting for completion:\n\n```go\nresult, err := wait.WaitForStatus(ctx,\n    func(ctx context.Context) (wait.FetchResult[*ResourceType], error) {\n        \u002F\u002F Fetch current status\n        resource, err := findResource(ctx, conn, id)\n        if err != nil {\n            return wait.FetchResult[*ResourceType]{}, err\n        }\n        return wait.FetchResult[*ResourceType]{\n            Status: wait.Status(resource.Status),\n            Value:  resource,\n        }, nil\n    },\n    wait.Options[*ResourceType]{\n        Timeout:            timeout,\n        Interval:           wait.FixedInterval(5 * time.Second),\n        SuccessStates:      []wait.Status{\"AVAILABLE\", \"COMPLETED\"},\n        TransitionalStates: []wait.Status{\"CREATING\", \"PENDING\"},\n        ProgressInterval:   30 * time.Second,\n        ProgressSink: func(fr wait.FetchResult[any], meta wait.ProgressMeta) {\n            resp.SendProgress(action.InvokeProgressEvent{\n                Message: fmt.Sprintf(\"Status: %s, Elapsed: %v\", fr.Status, meta.Elapsed.Round(time.Second)),\n            })\n        },\n    },\n)\n```\n\n## Common Action Patterns\n\n### Batch Operations\n- Process items in configurable batches\n- Report progress per batch\n- Handle partial failures gracefully\n- Support prefix\u002Ffilter parameters\n\n### Command Execution\n- Submit command and get operation ID\n- Poll for completion status\n- Retrieve and report output\n- Handle timeout during polling\n- Validate resources exist before execution\n\n### Service Invocation\n- Invoke service with parameters\n- Wait for completion (if synchronous)\n- Return output\u002Fresults\n- Handle service-specific errors\n\n### Resource State Changes\n- Validate current state\n- Apply state change\n- Poll for target state\n- Handle transitional states\n\n### Async Job Submission\n- Submit job with configuration\n- Get job ID\n- Optionally wait for completion\n- Report job status\n\n## Action Triggers\n\nActions are invoked via `action_trigger` lifecycle blocks in Terraform configurations:\n\n```hcl\naction \"provider_service_action\" \"name\" {\n  config {\n    parameter = value\n  }\n}\n\nresource \"terraform_data\" \"trigger\" {\n  lifecycle {\n    action_trigger {\n      events  = [after_create]\n      actions = [action.provider_service_action.name]\n    }\n  }\n}\n```\n\n### Available Trigger Events\n\n**Terraform 1.14.0 Supported Events:**\n- `before_create` - Before resource creation\n- `after_create` - After resource creation\n- `before_update` - Before resource update\n- `after_update` - After resource update\n\n**Not Supported in Terraform 1.14.0:**\n- `before_destroy` - Not available (will cause validation error)\n- `after_destroy` - Not available (will cause validation error)\n\n## Testing Actions\n\n### Acceptance Tests\n\n- Test action invocation with valid parameters\n- Test timeout scenarios\n- Test error conditions\n- Verify provider state changes\n- Test progress reporting\n- Test with custom parameters\n- Test trigger-based invocation\n\n### Test Pattern\n\n```go\nfunc TestAccServiceAction_basic(t *testing.T) {\n    ctx := acctest.Context(t)\n\n    resource.ParallelTest(t, resource.TestCase{\n        PreCheck:                 func() { acctest.PreCheck(ctx, t) },\n        ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories,\n        TerraformVersionChecks: []tfversion.TerraformVersionCheck{\n            tfversion.SkipBelow(tfversion.Version1_14_0),\n        },\n        Steps: []resource.TestStep{\n            {\n                Config: testAccActionConfig_basic(),\n                Check: resource.ComposeTestCheckFunc(\n                    testAccCheckResourceExists(ctx, \"provider_resource.test\"),\n                ),\n            },\n        },\n    })\n}\n```\n\n### Test Cleanup with Sweep Functions\n\nAdd sweep functions to clean up test resources:\n\n```go\nfunc sweepResources(region string) error {\n    ctx := context.Background()\n    client := \u002F* get client for region *\u002F\n\n    input := &service.ListInput{\n        \u002F\u002F Filter for test resources\n    }\n\n    var sweeperErrs *multierror.Error\n\n    pages := service.NewListPaginator(client, input)\n    for pages.HasMorePages() {\n        page, err := pages.NextPage(ctx)\n        if err != nil {\n            sweeperErrs = multierror.Append(sweeperErrs, err)\n            continue\n        }\n\n        for _, item := range page.Items {\n            id := item.Id\n\n            \u002F\u002F Skip non-test resources\n            if !strings.HasPrefix(id, \"tf-acc-test\") {\n                continue\n            }\n\n            _, err := client.Delete(ctx, &service.DeleteInput{\n                Id: id,\n            })\n            if err != nil {\n                sweeperErrs = multierror.Append(sweeperErrs, err)\n            }\n        }\n    }\n\n    return sweeperErrs.ErrorOrNil()\n}\n```\n\n### Testing Best Practices\n\n**Service-Specific Prerequisites**\n- Always check for service-specific prerequisites that must be met before actions can succeed\n- Document prerequisites in action documentation and test configurations\n\n**Error Pattern Matching**\n- Terraform wraps action errors with additional context\n- Use flexible regex patterns: `regexache.MustCompile(\\`(?s)Error Title.*key phrase\\`)`\n\n**Test Patterns Not Applicable to Actions**\n1. Actions trigger on lifecycle events, not config reapplication\n2. Before\u002FAfter Destroy Tests: Not supported in Terraform 1.14.0\n\n### Running Tests\n\nCompile test to check for errors:\n```bash\ngo test -c -o \u002Fdev\u002Fnull .\u002Finternal\u002Fservice\u002F\u003Cservice>\n```\n\nRun specific action tests:\n```bash\nTF_ACC=1 go test .\u002Finternal\u002Fservice\u002F\u003Cservice> -run TestAccServiceAction_ -v\n```\n\nRun sweep to clean up test resources:\n```bash\nTF_ACC=1 go test .\u002Finternal\u002Fservice\u002F\u003Cservice> -sweep=\u003Cregion> -v\n```\n\n## Documentation Standards\n\nEach action documentation file must include:\n\n1. **Front Matter**\n   ```yaml\n   ---\n   subcategory: \"Service Name\"\n   layout: \"provider\"\n   page_title: \"Provider: provider_service_action\"\n   description: |-\n     Brief description of what the action does.\n   ---\n   ```\n\n2. **Header with Warnings**\n   - Beta\u002FAlpha notice about experimental status\n   - Warning about potential unintended consequences\n   - Link to provider documentation\n\n3. **Example Usage**\n   - Basic usage example\n   - Advanced usage with all options\n   - Trigger-based example with `terraform_data`\n   - Real-world use case examples\n\n4. **Argument Reference**\n   - List all required and optional arguments\n   - Include descriptions and defaults\n   - Note any validation rules\n\n5. **Documentation Linting**\n   - Run `terrafmt fmt` before submission\n   - Verify with `terrafmt diff`\n\n## Changelog Entry Format\n\nCreate a changelog entry in `.changelog\u002F` directory:\n\n```\n.changelog\u002F\u003Cpr_number_or_description>.txt\n```\n\nContent format:\n```release-note:new-action\naction\u002Fprovider_service_action: Brief description of the action\n```\n\n## Pre-Submission Checklist\n\nBefore submitting your action implementation:\n\n- [ ] Code compiles: `go build -o \u002Fdev\u002Fnull .`\n- [ ] Tests compile: `go test -c -o \u002Fdev\u002Fnull .\u002Finternal\u002Fservice\u002F\u003Cservice>`\n- [ ] Code formatted: `make fmt`\n- [ ] Documentation formatted: `terrafmt fmt website\u002Fdocs\u002Factions\u002F\u003Caction>.html.markdown`\n- [ ] Changelog entry created\n- [ ] Schema uses correct types\n- [ ] All List\u002FMap attributes have ElementType\n- [ ] Progress updates implemented for long operations\n- [ ] Error messages include context and resource identifiers\n- [ ] Documentation includes multiple examples\n- [ ] Documentation includes prerequisites and warnings\n\n## References\n\n- [Terraform Plugin Framework Documentation](https:\u002F\u002Fdeveloper.hashicorp.com\u002Fterraform\u002Fplugin\u002Fframework)\n- [Terraform Provider Development](https:\u002F\u002Fdeveloper.hashicorp.com\u002Fterraform\u002Fplugin)\n- [terraform-plugin-framework GitHub](https:\u002F\u002Fgithub.com\u002Fhashicorp\u002Fterraform-plugin-framework)\n- [terraform-plugin-testing](https:\u002F\u002Fgithub.com\u002Fhashicorp\u002Fterraform-plugin-testing)\n","# Terraform Provider Actions Implementation Guide\n\n## Overview\n\nTerraform Actions enable imperative operations during the Terraform lifecycle. Actions are experimental features that allow performing provider operations at specific lifecycle events (before\u002Fafter create, update, destroy).\n\n**References:**\n- [Terraform Plugin Framework](https:\u002F\u002Fdeveloper.hashicorp.com\u002Fterraform\u002Fplugin\u002Fframework)\n- [Terraform Actions RFC](https:\u002F\u002Fgithub.com\u002Fhashicorp\u002Fterraform\u002Fblob\u002Fmain\u002Fdocs\u002Fplugin-protocol\u002Factions.md)\n\n## File Structure\n\nActions follow the standard service package structure:\n\n```\ninternal\u002Fservice\u002F\u003Cservice>\u002F\n├── \u003Caction_name>_action.go       # Action implementation\n├── \u003Caction_name>_action_test.go  # Action tests\n└── service_package_gen.go        # Auto-generated service registration\n```\n\nDocumentation structure:\n```\nwebsite\u002Fdocs\u002Factions\u002F\n└── \u003Cservice>_\u003Caction_name>.html.markdown  # User-facing documentation\n```\n\nChangelog entry:\n```\n.changelog\u002F\n└── \u003Cpr_number_or_description>.txt  # Release note entry\n```\n\n## Action Schema Definition\n\nActions use the Terraform Plugin Framework with a standard schema pattern:\n\n```go\nfunc (a *actionType) Schema(ctx context.Context, req action.SchemaRequest, resp *action.SchemaResponse) {\n    resp.Schema = schema.Schema{\n        Attributes: map[string]schema.Attribute{\n            \u002F\u002F Required configuration parameters\n            \"resource_id\": schema.StringAttribute{\n                Required:    true,\n                Description: \"ID of the resource to operate on\",\n            },\n            \u002F\u002F Optional parameters with defaults\n            \"timeout\": schema.Int64Attribute{\n                Optional:    true,\n                Description: \"Operation timeout in seconds\",\n                Default:     int64default.StaticInt64(1800),\n                Computed:    true,\n            },\n        },\n    }\n}\n```\n\n### Common Schema Issues\n\n**Pay special attention to the schema definition** - common issues after a first draft:\n\n1. **Type Mismatches**\n   - Using `types.String` instead of `fwtypes.String` in model structs\n   - Using `types.StringType` instead of `fwtypes.StringType` in schema\n   - Mixing framework types with plugin-framework types\n\n2. **List\u002FMap Element Types**\n   ```go\n   \u002F\u002F WRONG - missing ElementType\n   \"items\": schema.ListAttribute{\n       Optional: true,\n   }\n\n   \u002F\u002F CORRECT\n   \"items\": schema.ListAttribute{\n       Optional:    true,\n       ElementType: fwtypes.StringType,\n   }\n   ```\n\n3. **Computed vs Optional**\n   - Attributes with defaults must be both `Optional: true` and `Computed: true`\n   - Don't mark action inputs as `Computed` unless they have defaults\n\n4. **Validator Imports**\n   ```go\n   \u002F\u002F Ensure proper imports\n   \"github.com\u002Fhashicorp\u002Fterraform-plugin-framework-validators\u002Fint64validator\"\n   \"github.com\u002Fhashicorp\u002Fterraform-plugin-framework-validators\u002Fstringvalidator\"\n   ```\n\n5. **Region\u002FProvider Attribute**\n   - Use framework-provided region handling when available\n   - Don't manually define provider-specific config in schema if framework handles it\n\n6. **Nested Attributes**\n   - Use appropriate nested object types for complex structures\n   - Ensure nested types are properly defined\n\n### Schema Validation Checklist\n\nBefore submitting, verify:\n- [ ] All attributes have descriptions\n- [ ] List\u002FMap attributes have ElementType defined\n- [ ] Validators are imported and applied correctly\n- [ ] Model struct uses correct framework types\n- [ ] Optional attributes with defaults are marked Computed\n- [ ] Code compiles without type errors\n- [ ] Run `go build` to catch type mismatches\n\n## Action Invoke Method\n\nThe Invoke method contains the action logic:\n\n```go\nfunc (a *actionType) Invoke(ctx context.Context, req action.InvokeRequest, resp *action.InvokeResponse) {\n    var data actionModel\n    resp.Diagnostics.Append(req.Config.Get(ctx, &data)...)\n\n    \u002F\u002F Create provider client\n    conn := a.Meta().Client(ctx)\n\n    \u002F\u002F Progress updates for long-running operations\n    resp.Progress.Set(ctx, \"Starting operation...\")\n\n    \u002F\u002F Implement action logic with error handling\n    \u002F\u002F Use context for timeout management\n    \u002F\u002F Poll for completion if async operation\n\n    resp.Progress.Set(ctx, \"Operation completed\")\n}\n```\n\n## Key Implementation Requirements\n\n### 1. Progress Reporting\n\n- Use `resp.SendProgress(action.InvokeProgressEvent{...})` for real-time updates\n- Provide meaningful progress messages during long operations\n- Update progress at key milestones\n- Include elapsed time for long operations\n\n### 2. Timeout Management\n\n- Always include configurable timeout parameter (default: 1800s)\n- Use `context.WithTimeout()` for API calls\n- Handle timeout errors gracefully\n- Validate timeout ranges (typically 60-7200 seconds)\n\n### 3. Error Handling\n\n- Add diagnostics with `resp.Diagnostics.AddError()`\n- Provide clear error messages with context\n- Include API error details when relevant\n- Map provider error types to user-friendly messages\n- Document all possible error cases\n\nExample error handling:\n```go\n\u002F\u002F Handle specific errors\nvar notFound *types.ResourceNotFoundException\nif errors.As(err, &notFound) {\n    resp.Diagnostics.AddError(\n        \"Resource Not Found\",\n        fmt.Sprintf(\"Resource %s was not found\", resourceID),\n    )\n    return\n}\n\n\u002F\u002F Generic error handling\nresp.Diagnostics.AddError(\n    \"Operation Failed\",\n    fmt.Sprintf(\"Could not complete operation for %s: %s\", resourceID, err),\n)\n```\n\n### 4. Provider SDK Integration\n\n- Use provider SDK clients from `a.Meta().\u003CService>Client(ctx)`\n- Handle pagination for list operations\n- Implement retry logic for transient failures\n- Use appropriate error types\n\n### 5. Parameter Validation\n\n- Use framework validators for input validation\n- Validate resource existence before operations\n- Check for conflicting parameters\n- Validate against provider naming requirements\n\n### 6. Polling and Waiting\n\nFor operations that require waiting for completion:\n\n```go\nresult, err := wait.WaitForStatus(ctx,\n    func(ctx context.Context) (wait.FetchResult[*ResourceType], error) {\n        \u002F\u002F Fetch current status\n        resource, err := findResource(ctx, conn, id)\n        if err != nil {\n            return wait.FetchResult[*ResourceType]{}, err\n        }\n        return wait.FetchResult[*ResourceType]{\n            Status: wait.Status(resource.Status),\n            Value:  resource,\n        }, nil\n    },\n    wait.Options[*ResourceType]{\n        Timeout:            timeout,\n        Interval:           wait.FixedInterval(5 * time.Second),\n        SuccessStates:      []wait.Status{\"AVAILABLE\", \"COMPLETED\"},\n        TransitionalStates: []wait.Status{\"CREATING\", \"PENDING\"},\n        ProgressInterval:   30 * time.Second,\n        ProgressSink: func(fr wait.FetchResult[any], meta wait.ProgressMeta) {\n            resp.SendProgress(action.InvokeProgressEvent{\n                Message: fmt.Sprintf(\"Status: %s, Elapsed: %v\", fr.Status, meta.Elapsed.Round(time.Second)),\n            })\n        },\n    },\n)\n```\n\n## Common Action Patterns\n\n### Batch Operations\n- Process items in configurable batches\n- Report progress per batch\n- Handle partial failures gracefully\n- Support prefix\u002Ffilter parameters\n\n### Command Execution\n- Submit command and get operation ID\n- Poll for completion status\n- Retrieve and report output\n- Handle timeout during polling\n- Validate resources exist before execution\n\n### Service Invocation\n- Invoke service with parameters\n- Wait for completion (if synchronous)\n- Return output\u002Fresults\n- Handle service-specific errors\n\n### Resource State Changes\n- Validate current state\n- Apply state change\n- Poll for target state\n- Handle transitional states\n\n### Async Job Submission\n- Submit job with configuration\n- Get job ID\n- Optionally wait for completion\n- Report job status\n\n## Action Triggers\n\nActions are invoked via `action_trigger` lifecycle blocks in Terraform configurations:\n\n```hcl\naction \"provider_service_action\" \"name\" {\n  config {\n    parameter = value\n  }\n}\n\nresource \"terraform_data\" \"trigger\" {\n  lifecycle {\n    action_trigger {\n      events  = [after_create]\n      actions = [action.provider_service_action.name]\n    }\n  }\n}\n```\n\n### Available Trigger Events\n\n**Terraform 1.14.0 Supported Events:**\n- `before_create` - Before resource creation\n- `after_create` - After resource creation\n- `before_update` - Before resource update\n- `after_update` - After resource update\n\n**Not Supported in Terraform 1.14.0:**\n- `before_destroy` - Not available (will cause validation error)\n- `after_destroy` - Not available (will cause validation error)\n\n## Testing Actions\n\n### Acceptance Tests\n\n- Test action invocation with valid parameters\n- Test timeout scenarios\n- Test error conditions\n- Verify provider state changes\n- Test progress reporting\n- Test with custom parameters\n- Test trigger-based invocation\n\n### Test Pattern\n\n```go\nfunc TestAccServiceAction_basic(t *testing.T) {\n    ctx := acctest.Context(t)\n\n    resource.ParallelTest(t, resource.TestCase{\n        PreCheck:                 func() { acctest.PreCheck(ctx, t) },\n        ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories,\n        TerraformVersionChecks: []tfversion.TerraformVersionCheck{\n            tfversion.SkipBelow(tfversion.Version1_14_0),\n        },\n        Steps: []resource.TestStep{\n            {\n                Config: testAccActionConfig_basic(),\n                Check: resource.ComposeTestCheckFunc(\n                    testAccCheckResourceExists(ctx, \"provider_resource.test\"),\n                ),\n            },\n        },\n    })\n}\n```\n\n### Test Cleanup with Sweep Functions\n\nAdd sweep functions to clean up test resources:\n\n```go\nfunc sweepResources(region string) error {\n    ctx := context.Background()\n    client := \u002F* get client for region *\u002F\n\n    input := &service.ListInput{\n        \u002F\u002F Filter for test resources\n    }\n\n    var sweeperErrs *multierror.Error\n\n    pages := service.NewListPaginator(client, input)\n    for pages.HasMorePages() {\n        page, err := pages.NextPage(ctx)\n        if err != nil {\n            sweeperErrs = multierror.Append(sweeperErrs, err)\n            continue\n        }\n\n        for _, item := range page.Items {\n            id := item.Id\n\n            \u002F\u002F Skip non-test resources\n            if !strings.HasPrefix(id, \"tf-acc-test\") {\n                continue\n            }\n\n            _, err := client.Delete(ctx, &service.DeleteInput{\n                Id: id,\n            })\n            if err != nil {\n                sweeperErrs = multierror.Append(sweeperErrs, err)\n            }\n        }\n    }\n\n    return sweeperErrs.ErrorOrNil()\n}\n```\n\n### Testing Best Practices\n\n**Service-Specific Prerequisites**\n- Always check for service-specific prerequisites that must be met before actions can succeed\n- Document prerequisites in action documentation and test configurations\n\n**Error Pattern Matching**\n- Terraform wraps action errors with additional context\n- Use flexible regex patterns: `regexache.MustCompile(\\`(?s)Error Title.*key phrase\\`)`\n\n**Test Patterns Not Applicable to Actions**\n1. Actions trigger on lifecycle events, not config reapplication\n2. Before\u002FAfter Destroy Tests: Not supported in Terraform 1.14.0\n\n### Running Tests\n\nCompile test to check for errors:\n```bash\ngo test -c -o \u002Fdev\u002Fnull .\u002Finternal\u002Fservice\u002F\u003Cservice>\n```\n\nRun specific action tests:\n```bash\nTF_ACC=1 go test .\u002Finternal\u002Fservice\u002F\u003Cservice> -run TestAccServiceAction_ -v\n```\n\nRun sweep to clean up test resources:\n```bash\nTF_ACC=1 go test .\u002Finternal\u002Fservice\u002F\u003Cservice> -sweep=\u003Cregion> -v\n```\n\n## Documentation Standards\n\nEach action documentation file must include:\n\n1. **Front Matter**\n   ```yaml\n   ---\n   subcategory: \"Service Name\"\n   layout: \"provider\"\n   page_title: \"Provider: provider_service_action\"\n   description: |-\n     Brief description of what the action does.\n   ---\n   ```\n\n2. **Header with Warnings**\n   - Beta\u002FAlpha notice about experimental status\n   - Warning about potential unintended consequences\n   - Link to provider documentation\n\n3. **Example Usage**\n   - Basic usage example\n   - Advanced usage with all options\n   - Trigger-based example with `terraform_data`\n   - Real-world use case examples\n\n4. **Argument Reference**\n   - List all required and optional arguments\n   - Include descriptions and defaults\n   - Note any validation rules\n\n5. **Documentation Linting**\n   - Run `terrafmt fmt` before submission\n   - Verify with `terrafmt diff`\n\n## Changelog Entry Format\n\nCreate a changelog entry in `.changelog\u002F` directory:\n\n```\n.changelog\u002F\u003Cpr_number_or_description>.txt\n```\n\nContent format:\n```release-note:new-action\naction\u002Fprovider_service_action: Brief description of the action\n```\n\n## Pre-Submission Checklist\n\nBefore submitting your action implementation:\n\n- [ ] Code compiles: `go build -o \u002Fdev\u002Fnull .`\n- [ ] Tests compile: `go test -c -o \u002Fdev\u002Fnull .\u002Finternal\u002Fservice\u002F\u003Cservice>`\n- [ ] Code formatted: `make fmt`\n- [ ] Documentation formatted: `terrafmt fmt website\u002Fdocs\u002Factions\u002F\u003Caction>.html.markdown`\n- [ ] Changelog entry created\n- [ ] Schema uses correct types\n- [ ] All List\u002FMap attributes have ElementType\n- [ ] Progress updates implemented for long operations\n- [ ] Error messages include context and resource identifiers\n- [ ] Documentation includes multiple examples\n- [ ] Documentation includes prerequisites and warnings\n\n## References\n\n- [Terraform Plugin Framework Documentation](https:\u002F\u002Fdeveloper.hashicorp.com\u002Fterraform\u002Fplugin\u002Fframework)\n- [Terraform Provider Development](https:\u002F\u002Fdeveloper.hashicorp.com\u002Fterraform\u002Fplugin)\n- [terraform-plugin-framework GitHub](https:\u002F\u002Fgithub.com\u002Fhashicorp\u002Fterraform-plugin-framework)\n- [terraform-plugin-testing](https:\u002F\u002Fgithub.com\u002Fhashicorp\u002Fterraform-plugin-testing)\n",{"name":5,"metadata":43,"description":7},{"version":44,"copyright":45},"0.0.1","Copyright IBM Corp. 2026","main","e25eb555e87aa9eeb59b520834f46fd926ad19a3","opencode\u002Fdot-config\u002Fopencode\u002Fskills\u002Fterraform-provider-actions","https:\u002F\u002Fgithub.com\u002Ftwidxuga\u002Fdotfiles","https:\u002F\u002Fgithub.com\u002Ftwidxuga","Software developer, data scientist, applications architect and all round computer geek.","2026-10-28 03:46:24",{"source":8,"skillName":5,"commands":54,"prompt":64,"zipAvailable":65},[55,58,61],{"tool":56,"command":57},"npx","npx skills add twidxuga\u002Fdotfiles --skill provider-actions",{"tool":59,"command":60},"bunx","bunx skills add twidxuga\u002Fdotfiles --skill provider-actions",{"tool":62,"command":63},"pnpm","pnpm dlx skills add twidxuga\u002Fdotfiles --skill provider-actions","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Ftwidxuga\u002Fdotfiles\u002Fblob\u002Fmain\u002Fopencode\u002Fdot-config\u002Fopencode\u002Fskills\u002Fterraform-provider-actions\u002FSKILL.md",true,[67],{"path":68,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":71,"sourceHtmlUrl":72},"README.md","REFERENCE","参考文档",669,"https:\u002F\u002Fgithub.com\u002FJinsYin\u002Fskills\u002Fblob\u002Fmaster\u002Fskills\u002Fversion-release\u002FREADME.md",[74,98,112,129,145,156],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":82,"publishedAt":38},"01M6C9Z7VKBN4HAFBDXD67K3E1","terraform-test","Comprehensive guide for writing and running Terraform tests. Use when creating test files (.tftest.hcl), writing test scenarios with run blocks, validating infrastructure behavior with assertions, mocking providers and data sources, testing module outputs and resource configurations, or troubleshooting Terraform test syntax and execution.","https:\u002F\u002Fgithub.com\u002Ftwidxuga\u002Fdotfiles\u002Fblob\u002Fmain\u002Fopencode\u002Fdot-config\u002Fopencode\u002Fskills\u002Fterraform-test\u002FSKILL.md",[80,81],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},[83,33,84,85,86,87,88,89,36,90,91,92,93,94,95,96,97],"test","terraform test","testing","writing","infrastructure","run","data","Providers","execution","troubleshooting","syntax","behavior","guide","use","files",{"skillNo":99,"name":100,"nameZh":6,"description":101,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":102,"categories":103,"keywords":105,"publishedAt":38},"01M6C9Z4GWWTXCXAS8NK747K07","terraform-style-guide","Generate Terraform HCL code following HashiCorp's official style conventions and best practices. Use when writing, reviewing, or generating Terraform configurations.","https:\u002F\u002Fgithub.com\u002Ftwidxuga\u002Fdotfiles\u002Fblob\u002Fmain\u002Fopencode\u002Fdot-config\u002Fopencode\u002Fskills\u002Fterraform-style-guide\u002FSKILL.md",[104],{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},[106,95,33,107,108,109,110,86,111,96],"terraform style guide","official","generate","code","best practices","hashicorp",{"skillNo":113,"name":114,"nameZh":6,"description":115,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":116,"categories":117,"keywords":119,"publishedAt":38},"01M6C9Z1DCAC8YQQ1WS0AHBB14","terraform-stacks","Comprehensive guide for working with HashiCorp Terraform Stacks. Use when creating, modifying, or validating Terraform Stack configurations (.tfcomponent.hcl, .tfdeploy.hcl files), working with stack components and deployments from local modules, public registry, or private registry sources, managing multi-region or multi-environment infrastructure, or troubleshooting Terraform Stacks syntax and structure.","https:\u002F\u002Fgithub.com\u002Ftwidxuga\u002Fdotfiles\u002Fblob\u002Fmain\u002Fopencode\u002Fdot-config\u002Fopencode\u002Fskills\u002Fterraform-stacks\u002FSKILL.md",[118],{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},[33,120,121,97,122,123,124,125,87,126,36,111,127,92,93,128,95,96],"terraform stacks","multi-environment","deployments","public","modules","components","registry","stack","environment",{"skillNo":130,"name":131,"nameZh":6,"description":132,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":133,"categories":134,"keywords":136,"publishedAt":38},"01M6C9YYAVCNTR81V4HGZWPFW1","terraform-search-import","Discover existing cloud resources using Terraform Search queries and bulk import them into Terraform management. Use when bringing unmanaged infrastructure under Terraform control, auditing cloud resources, or migrating to IaC.","https:\u002F\u002Fgithub.com\u002Ftwidxuga\u002Fdotfiles\u002Fblob\u002Fmain\u002Fopencode\u002Fdot-config\u002Fopencode\u002Fskills\u002Fterraform-search-import\u002FSKILL.md",[135],{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},[137,138,33,96,139,87,140,36,90,141,142,143,144],"terraform search import","search","support","cloud","list","management","version","iac",{"skillNo":146,"name":147,"nameZh":6,"description":148,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":149,"licenseFileUrl":6,"sourceHtmlUrl":150,"categories":151,"keywords":153,"publishedAt":38},"01M6BZS7EAXHWK32RG213VE65G","run-acceptance-tests","Guide for running acceptance tests for a Terraform provider. Use this when asked to run an acceptance test or to run a test with the prefix `TestAcc`.","MPL-2.0","https:\u002F\u002Fgithub.com\u002Ftwidxuga\u002Fdotfiles\u002Fblob\u002Fmain\u002Fopencode\u002Fdot-config\u002Fopencode\u002Fskills\u002Fterraform-run-acceptance-tests\u002FSKILL.md",[152],{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},[154,155,88,83,33,34,36],"run acceptance tests","acceptance",{"skillNo":157,"name":158,"nameZh":6,"description":159,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":160,"categories":161,"keywords":169,"publishedAt":38},"01M6BZS4MJD31PY7M7654ZWQ56","refactor-module","Transform monolithic Terraform configurations into reusable, maintainable modules following HashiCorp's module design principles and community best practices.","https:\u002F\u002Fgithub.com\u002Ftwidxuga\u002Fdotfiles\u002Fblob\u002Fmain\u002Fopencode\u002Fdot-config\u002Fopencode\u002Fskills\u002Fterraform-refactor-module\u002FSKILL.md",[162,165,166],{"categoryNo":163,"categoryName":164,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000007","代码审查",{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":167,"categoryName":168,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000015","视觉设计",[170,171,110,33,36,111,172],"refactor module","refactor","design"]