[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6F5YTEMTAENGD0PKE2DJPWX":3,"skill-same:01M6F5YTEMTAENGD0PKE2DJPWX":81},{"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":29,"publishedAt":50,"linkOnly":51,"markdownContent":52,"markdownBody":53,"frontMatter":54,"refName":58,"commitSha":59,"skillDirectory":60,"forksCount":61,"repositoryHtmlUrl":62,"repositoryHomepageUrl":63,"ownerHtmlUrl":64,"ownerBlogUrl":6,"ownerDescription":65,"updatedAt":66,"install":67,"resources":80},"01M6F5YTEMTAENGD0PKE2DJPWX","provider-resources",null,"Implement Terraform Provider resources and data sources using the Plugin Framework. Use when developing CRUD operations, schema design, state management, and acceptance testing for provider resources.","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-resources\u002FSKILL.md",[18,23,26],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000008","测试与质量","SCENARIO","使用场景",{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000011","运维与部署",{"categoryNo":27,"categoryName":28,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000015","视觉设计",[30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49],"resources","provider","provider resources","ibm","sources","schema design","schema","use","operations","crud","testing","data","framework","acceptance","state","terraform","state management","plugin","implement","design","2026-11-10 10:12:30",false,"---\nname: provider-resources\ndescription: Implement Terraform Provider resources and data sources using the Plugin Framework. Use when developing CRUD operations, schema design, state management, and acceptance testing for provider resources.\nmetadata:\n  copyright: Copyright IBM Corp. 2026\n  version: \"0.0.1\"\n---\n\n# Terraform Provider Resources Implementation Guide\n\n## Overview\n\nThis guide covers developing Terraform Provider resources and data sources using the Terraform Plugin Framework. Resources represent infrastructure objects that Terraform manages through Create, Read, Update, and Delete (CRUD) operations.\n\n**References:**\n- [Terraform Plugin Framework](https:\u002F\u002Fdeveloper.hashicorp.com\u002Fterraform\u002Fplugin\u002Fframework)\n- [Resource Development](https:\u002F\u002Fdeveloper.hashicorp.com\u002Fterraform\u002Fplugin\u002Fframework\u002Fresources)\n- [Data Source Development](https:\u002F\u002Fdeveloper.hashicorp.com\u002Fterraform\u002Fplugin\u002Fframework\u002Fdata-sources)\n\n## File Structure\n\nResources follow the standard service package structure:\n\n```\ninternal\u002Fservice\u002F\u003Cservice>\u002F\n├── \u003Cresource_name>.go           # Resource implementation\n├── \u003Cresource_name>_test.go      # Acceptance tests\n├── \u003Cresource_name>_data_source.go    # Data source (if applicable)\n├── find.go                      # Finder functions\n├── exports_test.go              # Test exports\n└── service_package_gen.go       # Auto-generated registration\n```\n\nDocumentation structure:\n```\nwebsite\u002Fdocs\u002Fr\u002F\n└── \u003Cservice>_\u003Cresource_name>.html.markdown  # Resource documentation\n\nwebsite\u002Fdocs\u002Fd\u002F\n└── \u003Cservice>_\u003Cresource_name>.html.markdown  # Data source documentation\n```\n\n## Resource Structure\n\n### SDKv2 Resource Pattern\n\n```go\nfunc ResourceExample() *schema.Resource {\n    return &schema.Resource{\n        CreateWithoutTimeout: resourceExampleCreate,\n        ReadWithoutTimeout:   resourceExampleRead,\n        UpdateWithoutTimeout: resourceExampleUpdate,\n        DeleteWithoutTimeout: resourceExampleDelete,\n\n        Importer: &schema.ResourceImporter{\n            StateContext: schema.ImportStatePassthroughContext,\n        },\n\n        Schema: map[string]*schema.Schema{\n            \"name\": {\n                Type:         schema.TypeString,\n                Required:     true,\n                ForceNew:     true,\n                ValidateFunc: validation.StringLenBetween(1, 255),\n            },\n            \"arn\": {\n                Type:     schema.TypeString,\n                Computed: true,\n            },\n            \"tags\":     tftags.TagsSchema(),\n            \"tags_all\": tftags.TagsSchemaComputed(),\n        },\n\n        CustomizeDiff: verify.SetTagsDiff,\n    }\n}\n```\n\n### Plugin Framework Resource Pattern\n\n```go\ntype resourceExample struct {\n    framework.ResourceWithConfigure\n}\n\nfunc (r *resourceExample) Metadata(_ context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse) {\n    resp.TypeName = req.ProviderTypeName + \"_example\"\n}\n\nfunc (r *resourceExample) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse) {\n    resp.Schema = schema.Schema{\n        Attributes: map[string]schema.Attribute{\n            \"id\": framework.IDAttribute(),\n            \"name\": schema.StringAttribute{\n                Required: true,\n                PlanModifiers: []planmodifier.String{\n                    stringplanmodifier.RequiresReplace(),\n                },\n                Validators: []validator.String{\n                    stringvalidator.LengthBetween(1, 255),\n                },\n            },\n            \"arn\": schema.StringAttribute{\n                Computed: true,\n                PlanModifiers: []planmodifier.String{\n                    stringplanmodifier.UseStateForUnknown(),\n                },\n            },\n        },\n    }\n}\n```\n\n## CRUD Operations\n\n### Create Operation\n\n```go\nfunc (r *resourceExample) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse) {\n    var data resourceExampleModel\n    resp.Diagnostics.Append(req.Plan.Get(ctx, &data)...)\n    if resp.Diagnostics.HasError() {\n        return\n    }\n\n    conn := r.Meta().ExampleClient(ctx)\n\n    input := &example.CreateExampleInput{\n        Name: data.Name.ValueStringPointer(),\n    }\n\n    output, err := conn.CreateExample(ctx, input)\n    if err != nil {\n        resp.Diagnostics.AddError(\n            \"Error creating Example\",\n            fmt.Sprintf(\"Could not create example %s: %s\", data.Name.ValueString(), err),\n        )\n        return\n    }\n\n    data.ID = types.StringPointerValue(output.Id)\n    data.ARN = types.StringPointerValue(output.Arn)\n\n    resp.Diagnostics.Append(resp.State.Set(ctx, &data)...)\n}\n```\n\n### Read Operation\n\n```go\nfunc (r *resourceExample) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse) {\n    var data resourceExampleModel\n    resp.Diagnostics.Append(req.State.Get(ctx, &data)...)\n    if resp.Diagnostics.HasError() {\n        return\n    }\n\n    conn := r.Meta().ExampleClient(ctx)\n\n    output, err := findExampleByID(ctx, conn, data.ID.ValueString())\n    if tfresource.NotFound(err) {\n        resp.Diagnostics.AddWarning(\n            \"Resource not found\",\n            fmt.Sprintf(\"Example %s not found, removing from state\", data.ID.ValueString()),\n        )\n        resp.State.RemoveResource(ctx)\n        return\n    }\n    if err != nil {\n        resp.Diagnostics.AddError(\n            \"Error reading Example\",\n            fmt.Sprintf(\"Could not read example %s: %s\", data.ID.ValueString(), err),\n        )\n        return\n    }\n\n    data.Name = types.StringPointerValue(output.Name)\n    data.ARN = types.StringPointerValue(output.Arn)\n\n    resp.Diagnostics.Append(resp.State.Set(ctx, &data)...)\n}\n```\n\n### Update Operation\n\n```go\nfunc (r *resourceExample) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse) {\n    var plan, state resourceExampleModel\n    resp.Diagnostics.Append(req.Plan.Get(ctx, &plan)...)\n    resp.Diagnostics.Append(req.State.Get(ctx, &state)...)\n    if resp.Diagnostics.HasError() {\n        return\n    }\n\n    conn := r.Meta().ExampleClient(ctx)\n\n    if !plan.Description.Equal(state.Description) {\n        input := &example.UpdateExampleInput{\n            Id:          plan.ID.ValueStringPointer(),\n            Description: plan.Description.ValueStringPointer(),\n        }\n\n        _, err := conn.UpdateExample(ctx, input)\n        if err != nil {\n            resp.Diagnostics.AddError(\n                \"Error updating Example\",\n                fmt.Sprintf(\"Could not update example %s: %s\", plan.ID.ValueString(), err),\n            )\n            return\n        }\n    }\n\n    resp.Diagnostics.Append(resp.State.Set(ctx, &plan)...)\n}\n```\n\n### Delete Operation\n\n```go\nfunc (r *resourceExample) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse) {\n    var data resourceExampleModel\n    resp.Diagnostics.Append(req.State.Get(ctx, &data)...)\n    if resp.Diagnostics.HasError() {\n        return\n    }\n\n    conn := r.Meta().ExampleClient(ctx)\n\n    _, err := conn.DeleteExample(ctx, &example.DeleteExampleInput{\n        Id: data.ID.ValueStringPointer(),\n    })\n\n    if tfresource.NotFound(err) {\n        return\n    }\n\n    if err != nil {\n        resp.Diagnostics.AddError(\n            \"Error deleting Example\",\n            fmt.Sprintf(\"Could not delete example %s: %s\", data.ID.ValueString(), err),\n        )\n        return\n    }\n}\n```\n\n## Schema Design\n\n### Attribute Types\n\n| Terraform Type | Framework Type | Use Case |\n|----------------|----------------|----------|\n| `string` | `schema.StringAttribute` | Names, ARNs, IDs |\n| `number` | `schema.Int64Attribute`, `schema.Float64Attribute` | Counts, sizes |\n| `bool` | `schema.BoolAttribute` | Feature flags |\n| `list` | `schema.ListAttribute` | Ordered collections |\n| `set` | `schema.SetAttribute` | Unordered unique items |\n| `map` | `schema.MapAttribute` | Key-value pairs |\n| `object` | `schema.SingleNestedAttribute` | Complex nested config |\n\n### Plan Modifiers\n\n```go\n\u002F\u002F Force replacement when value changes\nstringplanmodifier.RequiresReplace()\n\n\u002F\u002F Preserve unknown value during plan\nstringplanmodifier.UseStateForUnknown()\n\n\u002F\u002F Custom plan modifier\nstringplanmodifier.RequiresReplaceIf(\n    func(ctx context.Context, req planmodifier.StringRequest, resp *stringplanmodifier.RequiresReplaceIfFuncResponse) {\n        \u002F\u002F Custom logic\n    },\n    \"description\",\n    \"markdown description\",\n)\n```\n\n### Validators\n\n```go\n\u002F\u002F String validators\nstringvalidator.LengthBetween(1, 255)\nstringvalidator.RegexMatches(regexp.MustCompile(`^[a-z0-9-]+$`), \"must be lowercase alphanumeric with hyphens\")\nstringvalidator.OneOf(\"option1\", \"option2\", \"option3\")\n\n\u002F\u002F Int64 validators\nint64validator.Between(1, 100)\nint64validator.AtLeast(1)\nint64validator.AtMost(1000)\n\n\u002F\u002F List validators\nlistvalidator.SizeAtLeast(1)\nlistvalidator.SizeAtMost(10)\n```\n\n### Sensitive Attributes\n\n```go\n\"password\": schema.StringAttribute{\n    Required:  true,\n    Sensitive: true,\n    Validators: []validator.String{\n        stringvalidator.LengthAtLeast(8),\n    },\n}\n```\n\n## State Management\n\n### Handling Resource Not Found\n\n```go\nfunc findExampleByID(ctx context.Context, conn *example.Client, id string) (*example.Example, error) {\n    input := &example.GetExampleInput{\n        Id: &id,\n    }\n\n    output, err := conn.GetExample(ctx, input)\n    if err != nil {\n        var notFound *types.ResourceNotFoundException\n        if errors.As(err, &notFound) {\n            return nil, &retry.NotFoundError{\n                LastError:   err,\n                LastRequest: input,\n            }\n        }\n        return nil, err\n    }\n\n    if output == nil || output.Example == nil {\n        return nil, tfresource.NewEmptyResultError(input)\n    }\n\n    return output.Example, nil\n}\n```\n\n### Waiting for Resource States\n\n```go\nfunc waitExampleCreated(ctx context.Context, conn *example.Client, id string, timeout time.Duration) (*example.Example, error) {\n    stateConf := &retry.StateChangeConf{\n        Pending: []string{\"CREATING\", \"PENDING\"},\n        Target:  []string{\"ACTIVE\", \"AVAILABLE\"},\n        Refresh: statusExample(ctx, conn, id),\n        Timeout: timeout,\n    }\n\n    outputRaw, err := stateConf.WaitForStateContext(ctx)\n    if output, ok := outputRaw.(*example.Example); ok {\n        return output, err\n    }\n\n    return nil, err\n}\n\nfunc statusExample(ctx context.Context, conn *example.Client, id string) retry.StateRefreshFunc {\n    return func() (interface{}, string, error) {\n        output, err := findExampleByID(ctx, conn, id)\n        if tfresource.NotFound(err) {\n            return nil, \"\", nil\n        }\n        if err != nil {\n            return nil, \"\", err\n        }\n        return output, string(output.Status), nil\n    }\n}\n```\n\n## Testing\n\n### Basic Acceptance Test\n\n```go\nfunc TestAccExampleResource_basic(t *testing.T) {\n    ctx := acctest.Context(t)\n    rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix)\n    resourceName := \"provider_example.test\"\n\n    resource.ParallelTest(t, resource.TestCase{\n        PreCheck:                 func() { acctest.PreCheck(ctx, t) },\n        ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories,\n        CheckDestroy:             testAccCheckExampleDestroy(ctx),\n        Steps: []resource.TestStep{\n            {\n                Config: testAccExampleConfig_basic(rName),\n                Check: resource.ComposeTestCheckFunc(\n                    testAccCheckExampleExists(ctx, resourceName),\n                    resource.TestCheckResourceAttr(resourceName, \"name\", rName),\n                    resource.TestCheckResourceAttrSet(resourceName, \"arn\"),\n                ),\n            },\n            {\n                ResourceName:      resourceName,\n                ImportState:       true,\n                ImportStateVerify: true,\n            },\n        },\n    })\n}\n```\n\n### Disappears Test\n\n```go\nfunc TestAccExampleResource_disappears(t *testing.T) {\n    ctx := acctest.Context(t)\n    rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix)\n    resourceName := \"provider_example.test\"\n\n    resource.ParallelTest(t, resource.TestCase{\n        PreCheck:                 func() { acctest.PreCheck(ctx, t) },\n        ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories,\n        CheckDestroy:             testAccCheckExampleDestroy(ctx),\n        Steps: []resource.TestStep{\n            {\n                Config: testAccExampleConfig_basic(rName),\n                Check: resource.ComposeTestCheckFunc(\n                    testAccCheckExampleExists(ctx, resourceName),\n                    acctest.CheckResourceDisappears(ctx, acctest.Provider, ResourceExample(), resourceName),\n                ),\n                ExpectNonEmptyPlan: true,\n            },\n        },\n    })\n}\n```\n\n### Test Helper Functions\n\n```go\nfunc testAccCheckExampleExists(ctx context.Context, name string) resource.TestCheckFunc {\n    return func(s *terraform.State) error {\n        rs, ok := s.RootModule().Resources[name]\n        if !ok {\n            return fmt.Errorf(\"Not found: %s\", name)\n        }\n\n        conn := acctest.Provider.Meta().(*conns.Client).ExampleClient(ctx)\n        _, err := findExampleByID(ctx, conn, rs.Primary.ID)\n\n        return err\n    }\n}\n\nfunc testAccCheckExampleDestroy(ctx context.Context) resource.TestCheckFunc {\n    return func(s *terraform.State) error {\n        conn := acctest.Provider.Meta().(*conns.Client).ExampleClient(ctx)\n\n        for _, rs := range s.RootModule().Resources {\n            if rs.Type != \"provider_example\" {\n                continue\n            }\n\n            _, err := findExampleByID(ctx, conn, rs.Primary.ID)\n            if tfresource.NotFound(err) {\n                continue\n            }\n            if err != nil {\n                return err\n            }\n\n            return fmt.Errorf(\"Example %s still exists\", rs.Primary.ID)\n        }\n\n        return nil\n    }\n}\n```\n\n### Running Tests\n\n```bash\n# Compile tests\ngo test -c -o \u002Fdev\u002Fnull .\u002Finternal\u002Fservice\u002F\u003Cservice>\n\n# Run acceptance tests\nTF_ACC=1 go test .\u002Finternal\u002Fservice\u002F\u003Cservice> -run TestAccExample -v -timeout 60m\n\n# Run with specific provider version\nTF_ACC=1 go test .\u002Finternal\u002Fservice\u002F\u003Cservice> -run TestAccExample -v\n\n# Run sweeper to clean up\nTF_ACC=1 go test .\u002Finternal\u002Fservice\u002F\u003Cservice> -sweep=\u003Cregion> -v\n```\n\n## Error Handling\n\n### Common Error Patterns\n\n```go\n\u002F\u002F Handle specific API errors\nvar notFound *types.ResourceNotFoundException\nif errors.As(err, &notFound) {\n    \u002F\u002F Resource doesn't exist\n}\n\nvar conflict *types.ConflictException\nif errors.As(err, &conflict) {\n    \u002F\u002F Resource state conflict\n}\n\nvar throttle *types.ThrottlingException\nif errors.As(err, &throttle) {\n    \u002F\u002F Rate limited - SDK handles retry\n}\n```\n\n### Diagnostics\n\n```go\n\u002F\u002F Add error\nresp.Diagnostics.AddError(\n    \"Error creating resource\",\n    fmt.Sprintf(\"Could not create resource: %s\", err),\n)\n\n\u002F\u002F Add warning\nresp.Diagnostics.AddWarning(\n    \"Resource modified outside Terraform\",\n    \"Resource was modified outside of Terraform, state may be inconsistent\",\n)\n\n\u002F\u002F Add attribute error\nresp.Diagnostics.AddAttributeError(\n    path.Root(\"name\"),\n    \"Invalid name\",\n    \"Name must be lowercase alphanumeric\",\n)\n```\n\n## Documentation Standards\n\n### Resource Documentation\n\n```markdown\n---\nsubcategory: \"Service Name\"\nlayout: \"provider\"\npage_title: \"Provider: provider_example\"\ndescription: |-\n  Manages an Example resource.\n---\n\n# Resource: provider_example\n\nManages an Example resource.\n\n## Example Usage\n\n### Basic Usage\n\n\\```hcl\nresource \"provider_example\" \"example\" {\n  name = \"my-example\"\n}\n\\```\n\n## Argument Reference\n\n* `name` - (Required) Name of the example.\n* `description` - (Optional) Description of the example.\n\n## Attribute Reference\n\n* `id` - ID of the example.\n* `arn` - ARN of the example.\n\n## Import\n\nExample can be imported using the ID:\n\n\\```\n$ terraform import provider_example.example example-id-12345\n\\```\n```\n\n## Pre-Submission Checklist\n\n- [ ] Code compiles without errors\n- [ ] All tests pass locally\n- [ ] Resource has all CRUD operations implemented\n- [ ] Import is implemented and tested\n- [ ] Disappears test is included\n- [ ] Documentation is complete with examples\n- [ ] Error messages are clear and actionable\n- [ ] Sensitive attributes are marked\n- [ ] Plan modifiers are appropriate\n- [ ] Validators cover edge cases\n\n## References\n\n- [Terraform Plugin Framework](https:\u002F\u002Fdeveloper.hashicorp.com\u002Fterraform\u002Fplugin\u002Fframework)\n- [Terraform Plugin SDKv2](https:\u002F\u002Fdeveloper.hashicorp.com\u002Fterraform\u002Fplugin\u002Fsdkv2)\n- [Acceptance Testing](https:\u002F\u002Fdeveloper.hashicorp.com\u002Fterraform\u002Fplugin\u002Ftesting\u002Facceptance-tests)\n- [terraform-plugin-framework GitHub](https:\u002F\u002Fgithub.com\u002Fhashicorp\u002Fterraform-plugin-framework)\n\n","# Terraform Provider Resources Implementation Guide\n\n## Overview\n\nThis guide covers developing Terraform Provider resources and data sources using the Terraform Plugin Framework. Resources represent infrastructure objects that Terraform manages through Create, Read, Update, and Delete (CRUD) operations.\n\n**References:**\n- [Terraform Plugin Framework](https:\u002F\u002Fdeveloper.hashicorp.com\u002Fterraform\u002Fplugin\u002Fframework)\n- [Resource Development](https:\u002F\u002Fdeveloper.hashicorp.com\u002Fterraform\u002Fplugin\u002Fframework\u002Fresources)\n- [Data Source Development](https:\u002F\u002Fdeveloper.hashicorp.com\u002Fterraform\u002Fplugin\u002Fframework\u002Fdata-sources)\n\n## File Structure\n\nResources follow the standard service package structure:\n\n```\ninternal\u002Fservice\u002F\u003Cservice>\u002F\n├── \u003Cresource_name>.go           # Resource implementation\n├── \u003Cresource_name>_test.go      # Acceptance tests\n├── \u003Cresource_name>_data_source.go    # Data source (if applicable)\n├── find.go                      # Finder functions\n├── exports_test.go              # Test exports\n└── service_package_gen.go       # Auto-generated registration\n```\n\nDocumentation structure:\n```\nwebsite\u002Fdocs\u002Fr\u002F\n└── \u003Cservice>_\u003Cresource_name>.html.markdown  # Resource documentation\n\nwebsite\u002Fdocs\u002Fd\u002F\n└── \u003Cservice>_\u003Cresource_name>.html.markdown  # Data source documentation\n```\n\n## Resource Structure\n\n### SDKv2 Resource Pattern\n\n```go\nfunc ResourceExample() *schema.Resource {\n    return &schema.Resource{\n        CreateWithoutTimeout: resourceExampleCreate,\n        ReadWithoutTimeout:   resourceExampleRead,\n        UpdateWithoutTimeout: resourceExampleUpdate,\n        DeleteWithoutTimeout: resourceExampleDelete,\n\n        Importer: &schema.ResourceImporter{\n            StateContext: schema.ImportStatePassthroughContext,\n        },\n\n        Schema: map[string]*schema.Schema{\n            \"name\": {\n                Type:         schema.TypeString,\n                Required:     true,\n                ForceNew:     true,\n                ValidateFunc: validation.StringLenBetween(1, 255),\n            },\n            \"arn\": {\n                Type:     schema.TypeString,\n                Computed: true,\n            },\n            \"tags\":     tftags.TagsSchema(),\n            \"tags_all\": tftags.TagsSchemaComputed(),\n        },\n\n        CustomizeDiff: verify.SetTagsDiff,\n    }\n}\n```\n\n### Plugin Framework Resource Pattern\n\n```go\ntype resourceExample struct {\n    framework.ResourceWithConfigure\n}\n\nfunc (r *resourceExample) Metadata(_ context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse) {\n    resp.TypeName = req.ProviderTypeName + \"_example\"\n}\n\nfunc (r *resourceExample) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse) {\n    resp.Schema = schema.Schema{\n        Attributes: map[string]schema.Attribute{\n            \"id\": framework.IDAttribute(),\n            \"name\": schema.StringAttribute{\n                Required: true,\n                PlanModifiers: []planmodifier.String{\n                    stringplanmodifier.RequiresReplace(),\n                },\n                Validators: []validator.String{\n                    stringvalidator.LengthBetween(1, 255),\n                },\n            },\n            \"arn\": schema.StringAttribute{\n                Computed: true,\n                PlanModifiers: []planmodifier.String{\n                    stringplanmodifier.UseStateForUnknown(),\n                },\n            },\n        },\n    }\n}\n```\n\n## CRUD Operations\n\n### Create Operation\n\n```go\nfunc (r *resourceExample) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse) {\n    var data resourceExampleModel\n    resp.Diagnostics.Append(req.Plan.Get(ctx, &data)...)\n    if resp.Diagnostics.HasError() {\n        return\n    }\n\n    conn := r.Meta().ExampleClient(ctx)\n\n    input := &example.CreateExampleInput{\n        Name: data.Name.ValueStringPointer(),\n    }\n\n    output, err := conn.CreateExample(ctx, input)\n    if err != nil {\n        resp.Diagnostics.AddError(\n            \"Error creating Example\",\n            fmt.Sprintf(\"Could not create example %s: %s\", data.Name.ValueString(), err),\n        )\n        return\n    }\n\n    data.ID = types.StringPointerValue(output.Id)\n    data.ARN = types.StringPointerValue(output.Arn)\n\n    resp.Diagnostics.Append(resp.State.Set(ctx, &data)...)\n}\n```\n\n### Read Operation\n\n```go\nfunc (r *resourceExample) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse) {\n    var data resourceExampleModel\n    resp.Diagnostics.Append(req.State.Get(ctx, &data)...)\n    if resp.Diagnostics.HasError() {\n        return\n    }\n\n    conn := r.Meta().ExampleClient(ctx)\n\n    output, err := findExampleByID(ctx, conn, data.ID.ValueString())\n    if tfresource.NotFound(err) {\n        resp.Diagnostics.AddWarning(\n            \"Resource not found\",\n            fmt.Sprintf(\"Example %s not found, removing from state\", data.ID.ValueString()),\n        )\n        resp.State.RemoveResource(ctx)\n        return\n    }\n    if err != nil {\n        resp.Diagnostics.AddError(\n            \"Error reading Example\",\n            fmt.Sprintf(\"Could not read example %s: %s\", data.ID.ValueString(), err),\n        )\n        return\n    }\n\n    data.Name = types.StringPointerValue(output.Name)\n    data.ARN = types.StringPointerValue(output.Arn)\n\n    resp.Diagnostics.Append(resp.State.Set(ctx, &data)...)\n}\n```\n\n### Update Operation\n\n```go\nfunc (r *resourceExample) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse) {\n    var plan, state resourceExampleModel\n    resp.Diagnostics.Append(req.Plan.Get(ctx, &plan)...)\n    resp.Diagnostics.Append(req.State.Get(ctx, &state)...)\n    if resp.Diagnostics.HasError() {\n        return\n    }\n\n    conn := r.Meta().ExampleClient(ctx)\n\n    if !plan.Description.Equal(state.Description) {\n        input := &example.UpdateExampleInput{\n            Id:          plan.ID.ValueStringPointer(),\n            Description: plan.Description.ValueStringPointer(),\n        }\n\n        _, err := conn.UpdateExample(ctx, input)\n        if err != nil {\n            resp.Diagnostics.AddError(\n                \"Error updating Example\",\n                fmt.Sprintf(\"Could not update example %s: %s\", plan.ID.ValueString(), err),\n            )\n            return\n        }\n    }\n\n    resp.Diagnostics.Append(resp.State.Set(ctx, &plan)...)\n}\n```\n\n### Delete Operation\n\n```go\nfunc (r *resourceExample) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse) {\n    var data resourceExampleModel\n    resp.Diagnostics.Append(req.State.Get(ctx, &data)...)\n    if resp.Diagnostics.HasError() {\n        return\n    }\n\n    conn := r.Meta().ExampleClient(ctx)\n\n    _, err := conn.DeleteExample(ctx, &example.DeleteExampleInput{\n        Id: data.ID.ValueStringPointer(),\n    })\n\n    if tfresource.NotFound(err) {\n        return\n    }\n\n    if err != nil {\n        resp.Diagnostics.AddError(\n            \"Error deleting Example\",\n            fmt.Sprintf(\"Could not delete example %s: %s\", data.ID.ValueString(), err),\n        )\n        return\n    }\n}\n```\n\n## Schema Design\n\n### Attribute Types\n\n| Terraform Type | Framework Type | Use Case |\n|----------------|----------------|----------|\n| `string` | `schema.StringAttribute` | Names, ARNs, IDs |\n| `number` | `schema.Int64Attribute`, `schema.Float64Attribute` | Counts, sizes |\n| `bool` | `schema.BoolAttribute` | Feature flags |\n| `list` | `schema.ListAttribute` | Ordered collections |\n| `set` | `schema.SetAttribute` | Unordered unique items |\n| `map` | `schema.MapAttribute` | Key-value pairs |\n| `object` | `schema.SingleNestedAttribute` | Complex nested config |\n\n### Plan Modifiers\n\n```go\n\u002F\u002F Force replacement when value changes\nstringplanmodifier.RequiresReplace()\n\n\u002F\u002F Preserve unknown value during plan\nstringplanmodifier.UseStateForUnknown()\n\n\u002F\u002F Custom plan modifier\nstringplanmodifier.RequiresReplaceIf(\n    func(ctx context.Context, req planmodifier.StringRequest, resp *stringplanmodifier.RequiresReplaceIfFuncResponse) {\n        \u002F\u002F Custom logic\n    },\n    \"description\",\n    \"markdown description\",\n)\n```\n\n### Validators\n\n```go\n\u002F\u002F String validators\nstringvalidator.LengthBetween(1, 255)\nstringvalidator.RegexMatches(regexp.MustCompile(`^[a-z0-9-]+$`), \"must be lowercase alphanumeric with hyphens\")\nstringvalidator.OneOf(\"option1\", \"option2\", \"option3\")\n\n\u002F\u002F Int64 validators\nint64validator.Between(1, 100)\nint64validator.AtLeast(1)\nint64validator.AtMost(1000)\n\n\u002F\u002F List validators\nlistvalidator.SizeAtLeast(1)\nlistvalidator.SizeAtMost(10)\n```\n\n### Sensitive Attributes\n\n```go\n\"password\": schema.StringAttribute{\n    Required:  true,\n    Sensitive: true,\n    Validators: []validator.String{\n        stringvalidator.LengthAtLeast(8),\n    },\n}\n```\n\n## State Management\n\n### Handling Resource Not Found\n\n```go\nfunc findExampleByID(ctx context.Context, conn *example.Client, id string) (*example.Example, error) {\n    input := &example.GetExampleInput{\n        Id: &id,\n    }\n\n    output, err := conn.GetExample(ctx, input)\n    if err != nil {\n        var notFound *types.ResourceNotFoundException\n        if errors.As(err, &notFound) {\n            return nil, &retry.NotFoundError{\n                LastError:   err,\n                LastRequest: input,\n            }\n        }\n        return nil, err\n    }\n\n    if output == nil || output.Example == nil {\n        return nil, tfresource.NewEmptyResultError(input)\n    }\n\n    return output.Example, nil\n}\n```\n\n### Waiting for Resource States\n\n```go\nfunc waitExampleCreated(ctx context.Context, conn *example.Client, id string, timeout time.Duration) (*example.Example, error) {\n    stateConf := &retry.StateChangeConf{\n        Pending: []string{\"CREATING\", \"PENDING\"},\n        Target:  []string{\"ACTIVE\", \"AVAILABLE\"},\n        Refresh: statusExample(ctx, conn, id),\n        Timeout: timeout,\n    }\n\n    outputRaw, err := stateConf.WaitForStateContext(ctx)\n    if output, ok := outputRaw.(*example.Example); ok {\n        return output, err\n    }\n\n    return nil, err\n}\n\nfunc statusExample(ctx context.Context, conn *example.Client, id string) retry.StateRefreshFunc {\n    return func() (interface{}, string, error) {\n        output, err := findExampleByID(ctx, conn, id)\n        if tfresource.NotFound(err) {\n            return nil, \"\", nil\n        }\n        if err != nil {\n            return nil, \"\", err\n        }\n        return output, string(output.Status), nil\n    }\n}\n```\n\n## Testing\n\n### Basic Acceptance Test\n\n```go\nfunc TestAccExampleResource_basic(t *testing.T) {\n    ctx := acctest.Context(t)\n    rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix)\n    resourceName := \"provider_example.test\"\n\n    resource.ParallelTest(t, resource.TestCase{\n        PreCheck:                 func() { acctest.PreCheck(ctx, t) },\n        ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories,\n        CheckDestroy:             testAccCheckExampleDestroy(ctx),\n        Steps: []resource.TestStep{\n            {\n                Config: testAccExampleConfig_basic(rName),\n                Check: resource.ComposeTestCheckFunc(\n                    testAccCheckExampleExists(ctx, resourceName),\n                    resource.TestCheckResourceAttr(resourceName, \"name\", rName),\n                    resource.TestCheckResourceAttrSet(resourceName, \"arn\"),\n                ),\n            },\n            {\n                ResourceName:      resourceName,\n                ImportState:       true,\n                ImportStateVerify: true,\n            },\n        },\n    })\n}\n```\n\n### Disappears Test\n\n```go\nfunc TestAccExampleResource_disappears(t *testing.T) {\n    ctx := acctest.Context(t)\n    rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix)\n    resourceName := \"provider_example.test\"\n\n    resource.ParallelTest(t, resource.TestCase{\n        PreCheck:                 func() { acctest.PreCheck(ctx, t) },\n        ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories,\n        CheckDestroy:             testAccCheckExampleDestroy(ctx),\n        Steps: []resource.TestStep{\n            {\n                Config: testAccExampleConfig_basic(rName),\n                Check: resource.ComposeTestCheckFunc(\n                    testAccCheckExampleExists(ctx, resourceName),\n                    acctest.CheckResourceDisappears(ctx, acctest.Provider, ResourceExample(), resourceName),\n                ),\n                ExpectNonEmptyPlan: true,\n            },\n        },\n    })\n}\n```\n\n### Test Helper Functions\n\n```go\nfunc testAccCheckExampleExists(ctx context.Context, name string) resource.TestCheckFunc {\n    return func(s *terraform.State) error {\n        rs, ok := s.RootModule().Resources[name]\n        if !ok {\n            return fmt.Errorf(\"Not found: %s\", name)\n        }\n\n        conn := acctest.Provider.Meta().(*conns.Client).ExampleClient(ctx)\n        _, err := findExampleByID(ctx, conn, rs.Primary.ID)\n\n        return err\n    }\n}\n\nfunc testAccCheckExampleDestroy(ctx context.Context) resource.TestCheckFunc {\n    return func(s *terraform.State) error {\n        conn := acctest.Provider.Meta().(*conns.Client).ExampleClient(ctx)\n\n        for _, rs := range s.RootModule().Resources {\n            if rs.Type != \"provider_example\" {\n                continue\n            }\n\n            _, err := findExampleByID(ctx, conn, rs.Primary.ID)\n            if tfresource.NotFound(err) {\n                continue\n            }\n            if err != nil {\n                return err\n            }\n\n            return fmt.Errorf(\"Example %s still exists\", rs.Primary.ID)\n        }\n\n        return nil\n    }\n}\n```\n\n### Running Tests\n\n```bash\n# Compile tests\ngo test -c -o \u002Fdev\u002Fnull .\u002Finternal\u002Fservice\u002F\u003Cservice>\n\n# Run acceptance tests\nTF_ACC=1 go test .\u002Finternal\u002Fservice\u002F\u003Cservice> -run TestAccExample -v -timeout 60m\n\n# Run with specific provider version\nTF_ACC=1 go test .\u002Finternal\u002Fservice\u002F\u003Cservice> -run TestAccExample -v\n\n# Run sweeper to clean up\nTF_ACC=1 go test .\u002Finternal\u002Fservice\u002F\u003Cservice> -sweep=\u003Cregion> -v\n```\n\n## Error Handling\n\n### Common Error Patterns\n\n```go\n\u002F\u002F Handle specific API errors\nvar notFound *types.ResourceNotFoundException\nif errors.As(err, &notFound) {\n    \u002F\u002F Resource doesn't exist\n}\n\nvar conflict *types.ConflictException\nif errors.As(err, &conflict) {\n    \u002F\u002F Resource state conflict\n}\n\nvar throttle *types.ThrottlingException\nif errors.As(err, &throttle) {\n    \u002F\u002F Rate limited - SDK handles retry\n}\n```\n\n### Diagnostics\n\n```go\n\u002F\u002F Add error\nresp.Diagnostics.AddError(\n    \"Error creating resource\",\n    fmt.Sprintf(\"Could not create resource: %s\", err),\n)\n\n\u002F\u002F Add warning\nresp.Diagnostics.AddWarning(\n    \"Resource modified outside Terraform\",\n    \"Resource was modified outside of Terraform, state may be inconsistent\",\n)\n\n\u002F\u002F Add attribute error\nresp.Diagnostics.AddAttributeError(\n    path.Root(\"name\"),\n    \"Invalid name\",\n    \"Name must be lowercase alphanumeric\",\n)\n```\n\n## Documentation Standards\n\n### Resource Documentation\n\n```markdown\n---\nsubcategory: \"Service Name\"\nlayout: \"provider\"\npage_title: \"Provider: provider_example\"\ndescription: |-\n  Manages an Example resource.\n---\n\n# Resource: provider_example\n\nManages an Example resource.\n\n## Example Usage\n\n### Basic Usage\n\n\\```hcl\nresource \"provider_example\" \"example\" {\n  name = \"my-example\"\n}\n\\```\n\n## Argument Reference\n\n* `name` - (Required) Name of the example.\n* `description` - (Optional) Description of the example.\n\n## Attribute Reference\n\n* `id` - ID of the example.\n* `arn` - ARN of the example.\n\n## Import\n\nExample can be imported using the ID:\n\n\\```\n$ terraform import provider_example.example example-id-12345\n\\```\n```\n\n## Pre-Submission Checklist\n\n- [ ] Code compiles without errors\n- [ ] All tests pass locally\n- [ ] Resource has all CRUD operations implemented\n- [ ] Import is implemented and tested\n- [ ] Disappears test is included\n- [ ] Documentation is complete with examples\n- [ ] Error messages are clear and actionable\n- [ ] Sensitive attributes are marked\n- [ ] Plan modifiers are appropriate\n- [ ] Validators cover edge cases\n\n## References\n\n- [Terraform Plugin Framework](https:\u002F\u002Fdeveloper.hashicorp.com\u002Fterraform\u002Fplugin\u002Fframework)\n- [Terraform Plugin SDKv2](https:\u002F\u002Fdeveloper.hashicorp.com\u002Fterraform\u002Fplugin\u002Fsdkv2)\n- [Acceptance Testing](https:\u002F\u002Fdeveloper.hashicorp.com\u002Fterraform\u002Fplugin\u002Ftesting\u002Facceptance-tests)\n- [terraform-plugin-framework GitHub](https:\u002F\u002Fgithub.com\u002Fhashicorp\u002Fterraform-plugin-framework)\n\n",{"name":5,"metadata":55,"description":7},{"version":56,"copyright":57},"0.0.1","Copyright IBM Corp. 2026","main","def8531e65114c0fca8fb8551c1871ee0eed705c","skills\u002Fhashicorp\u002Fagent-skills\u002Fprovider-resources",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":68,"prompt":78,"zipAvailable":79},[69,72,75],{"tool":70,"command":71},"npx","npx skills add ComeOnOliver\u002Fskillshub --skill provider-resources",{"tool":73,"command":74},"bunx","bunx skills add ComeOnOliver\u002Fskillshub --skill provider-resources",{"tool":76,"command":77},"pnpm","pnpm dlx skills add ComeOnOliver\u002Fskillshub --skill provider-resources","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fhashicorp\u002Fagent-skills\u002Fprovider-resources\u002FSKILL.md",true,[],[82,94,104,113,119,126],{"skillNo":83,"name":84,"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":85,"categories":86,"keywords":90,"publishedAt":50},"01M6FKJN13GMG4KY57J3QD8GY5","model-hierarchy-skill","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzscole\u002Fmodel-hierarchy-skill\u002Fmodel-hierarchy-skill\u002FSKILL.md",[87],{"categoryNo":88,"categoryName":89,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发",[91,92,93],"model","model hierarchy","model hierarchy skill",{"skillNo":95,"name":96,"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":97,"categories":98,"keywords":100,"publishedAt":50},"01M6FKJJJ6GCAMR4PPPRD12M5X","zoom-mcp","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-mcp\u002FSKILL.md",[99],{"categoryNo":88,"categoryName":89,"taxonomyType":21,"taxonomyTypeDesc":22},[101,102,103],"MCP","zoom","zoom mcp",{"skillNo":105,"name":106,"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":107,"categories":108,"keywords":109,"publishedAt":50},"01M6FKJE3KYT3KPEZMEEHYKA6K","zoom-apps-sdk","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-apps-sdk\u002FSKILL.md",[],[110,111,112,102],"sdk","zoom apps sdk","apps",{"skillNo":114,"name":115,"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":116,"categories":117,"keywords":118,"publishedAt":50},"01M6FKJ9EDH9Q5VWDF8HAJRSP0","windows","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwindows\u002FSKILL.md",[],[115],{"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":125,"publishedAt":50},"01M6FKJ666BEEFC3AE9GJ72Q93","whiteboard","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwhiteboard\u002FSKILL.md",[124],{"categoryNo":88,"categoryName":89,"taxonomyType":21,"taxonomyTypeDesc":22},[121],{"skillNo":127,"name":128,"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":129,"categories":130,"keywords":131,"publishedAt":50},"01M6FKJ21WFCDGTJQ2Q91T9DVW","websockets","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwebsockets\u002FSKILL.md",[],[128]]