[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6F5YPBC5ES4G644X07B62WV":3,"skill-same:01M6F5YPBC5ES4G644X07B62WV":74},{"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":43,"linkOnly":44,"markdownContent":45,"markdownBody":46,"frontMatter":47,"refName":51,"commitSha":52,"skillDirectory":53,"forksCount":54,"repositoryHtmlUrl":55,"repositoryHomepageUrl":56,"ownerHtmlUrl":57,"ownerBlogUrl":6,"ownerDescription":58,"updatedAt":59,"install":60,"resources":73},"01M6F5YPBC5ES4G644X07B62WV","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).","ComeOnOliver\u002Fskillshub","ComeOnOliver","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F43215937?v=4","01M6E5JNFECJAAVFE0W7SMWWD2","Haoran Shu","01M6E5JNNDQS7AJZDYFQ8TPZCK",67,"MIT","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fhashicorp\u002Fagent-skills\u002Fprovider-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,38,39,40,41,42],"actions","provider actions","provider","implement","plugin","create","update","terraform","terraform provider","framework","ibm","lifecycle","execute","operations","use","events","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\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\n",{"name":5,"metadata":48,"description":7},{"version":49,"copyright":50},"0.0.1","Copyright IBM Corp. 2026","main","def8531e65114c0fca8fb8551c1871ee0eed705c","skills\u002Fhashicorp\u002Fagent-skills\u002Fprovider-actions",24,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub","https:\u002F\u002Fskillshub.wtf","https:\u002F\u002Fgithub.com\u002FComeOnOliver","AI & Blockchain Engineer\r\n","2026-06-24 22:07:19",{"source":8,"skillName":5,"commands":61,"prompt":71,"zipAvailable":72},[62,65,68],{"tool":63,"command":64},"npx","npx skills add ComeOnOliver\u002Fskillshub --skill provider-actions",{"tool":66,"command":67},"bunx","bunx skills add ComeOnOliver\u002Fskillshub --skill provider-actions",{"tool":69,"command":70},"pnpm","pnpm dlx skills add ComeOnOliver\u002Fskillshub --skill provider-actions","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fhashicorp\u002Fagent-skills\u002Fprovider-actions\u002FSKILL.md",true,[],[75,87,97,106,112,119],{"skillNo":76,"name":77,"nameZh":6,"description":6,"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":83,"publishedAt":43},"01M6FKJN13GMG4KY57J3QD8GY5","model-hierarchy-skill","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzscole\u002Fmodel-hierarchy-skill\u002Fmodel-hierarchy-skill\u002FSKILL.md",[80],{"categoryNo":81,"categoryName":82,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发",[84,85,86],"model","model hierarchy","model hierarchy skill",{"skillNo":88,"name":89,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":93,"publishedAt":43},"01M6FKJJJ6GCAMR4PPPRD12M5X","zoom-mcp","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-mcp\u002FSKILL.md",[92],{"categoryNo":81,"categoryName":82,"taxonomyType":21,"taxonomyTypeDesc":22},[94,95,96],"MCP","zoom","zoom mcp",{"skillNo":98,"name":99,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":100,"categories":101,"keywords":102,"publishedAt":43},"01M6FKJE3KYT3KPEZMEEHYKA6K","zoom-apps-sdk","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-apps-sdk\u002FSKILL.md",[],[103,104,105,95],"sdk","zoom apps sdk","apps",{"skillNo":107,"name":108,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":109,"categories":110,"keywords":111,"publishedAt":43},"01M6FKJ9EDH9Q5VWDF8HAJRSP0","windows","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwindows\u002FSKILL.md",[],[108],{"skillNo":113,"name":114,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":115,"categories":116,"keywords":118,"publishedAt":43},"01M6FKJ666BEEFC3AE9GJ72Q93","whiteboard","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwhiteboard\u002FSKILL.md",[117],{"categoryNo":81,"categoryName":82,"taxonomyType":21,"taxonomyTypeDesc":22},[114],{"skillNo":120,"name":121,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":122,"categories":123,"keywords":124,"publishedAt":43},"01M6FKJ21WFCDGTJQ2Q91T9DVW","websockets","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwebsockets\u002FSKILL.md",[],[121]]