{"owner":"hashicorp","repo":"terraform-provider-aws","hasSkills":true,"hasMcp":false,"mcpConfig":null,"found":["AGENTS.md",".github/copilot-instructions.md"],"skills":{"AGENTS.md":"<!-- Copyright IBM Corp. 2014, 2026 -->\n<!-- SPDX-License-Identifier: MPL-2.0 -->\n\n# AGENTS.md\n\nThis file provides guidance to AI coding agents when working with code in this repository.\n\n## Repository Overview\n\nThis is the Go-based Terraform AWS Provider (`github.com/hashicorp/terraform-provider-aws`). It maps AWS API resources to Terraform resources, data sources, ephemeral resources and actions (collectively often referred to as just resources). The primary language is Go; HCL appears in acceptance test configurations and website documentation.\n\n## Agent Registry\n\nThis project uses specialized personas for different tasks.\n\n### Available Personas\n- **`@contributor`**: [Contributor Persona](./.agents/contributor.md) - Contributes code in the form of bugfixes, enhancements to existing resources, and new resources. Makes clarifications and corrections to existing documentation.\n- **`@maintainer`**: [Maintainer Persona](./.agents/maintainer.md) - Steward of the project, responsible for both internal and external quality. Reviews contributions. Maintains provider-level features, including new Terraform language constructs.\n- **`@tcm`**: [TCM Persona](./.agents/tcm.md) - Triages incoming GitHub issues and PRs. Engages with community members to answer technical and process questions. Suggests workarounds and alternatives to reported bugs.\n\n### Registry Rules\n- Always use the requested persona for tasks.\n- If no persona is specified, default to `@contributor`.\n- A persona defines a role with a perspective and responsibilities.\n- Personas may invoke skills.\n\n## Skills\n\nSkills are loaded from `./.agents/skills`. Each skill supplies step-by-step instructions, code patterns, and guardrails for a specific task.\n\n| Skill | Task |\n|---|---|\n| [breaking-changes](./.agents/skills/breaking-changes/SKILL.md) | Review a PR for possible breaking changes. |\n| [changelog](./.agents/skills/changelog/SKILL.md) | Add a `.changelog/<PR_NUMBER>.txt` entry from a PR URL, commit, and push (with confirmation). |\n| [fixdocs](./.agents/skills/fixdocs/SKILL.md) | Fix end user documentation with `swissshepherd`. |\n| [review-pr](./.agents/skills/review-pr/SKILL.md) | Review a Terraform AWS Provider PR. Router: holds cross-cutting principles and routes to the scoped `review-*` leaf skills below based on the files a PR changes. |\n| [review-lifecycle](./.agents/skills/review-lifecycle/SKILL.md) | Review resource CRUD, errors, and AutoFlex (`internal/service/**/*.go`). |\n| [review-schema](./.agents/skills/review-schema/SKILL.md) | Review Plugin Framework schema shape (`internal/service/**/*.go`). |\n| [review-helpers](./.agents/skills/review-helpers/SKILL.md) | Review finders, waiters, sweepers, data sources, list resources (`internal/service/**/*.go`). |\n| [review-identity](./.agents/skills/review-identity/SKILL.md) | Review Resource Identity annotations and import-ID handlers (`internal/service/**/*.go`). |\n| [review-tags](./.agents/skills/review-tags/SKILL.md) | Review tag schema attributes, wiring, and the `@Tags` annotation (`internal/service/**/*.go`). |\n| [review-generated](./.agents/skills/review-generated/SKILL.md) | Review generated code (`internal/service/**/*_gen.go`). |\n| [review-tests](./.agents/skills/review-tests/SKILL.md) | Review acceptance/unit test basics (`internal/service/**/*_test.go`). |\n| [review-tests-helpers](./.agents/skills/review-tests-helpers/SKILL.md) | Review Exists/Destroy, data source, list, and unit tests (`internal/service/**/*_test.go`). |\n| [review-docs](./.agents/skills/review-docs/SKILL.md) | Review a PR's end user documentation updates (`website/docs/**/*.markdown`). |\n\n## Stack\n- Go 1.26+, AWS SDK for Go v2.\n- Terraform Plugin Framework + Terraform Plugin SDKv2 ([muxed](https://developer.hashicorp.com/terraform/plugin/mux) provider).\n- Code generators in `internal/generate/`.\n- Build system: GNU Make (see `GNUmakefile`).\n- Testing: Go standard `testing` package + [`terraform-plugin-testing` acceptance test framework](https://developer.hashicorp.com/terraform/plugin/testing/acceptance-tests).\n\n## Code Structure (The important parts)\n\n```\nterraform-provider-aws/\n├── .changelog/             # CHANGELOG entries\n├── internal/\n│   ├── acctest/            # Acceptance test helpers\n│   ├── backoff/            # Low-level backoff loop implementation\n│   ├── conns/              # Provider-level global state, including provider configuration\n│   ├── enum/               # AWS SDK for Go v2 enumeration utilities\n│   ├── errs/               # Go `error` utilities\n│   │   ├── fwdiag/         # Terraform Plugin Framework `Diagnostic` utilities\n│   │   └── sdkdiag/        # Terraform Plugin SDKv2 `Diagnostic` utilities\n│   ├── flex/               # General and Terraform Plugin SDKv2-specific flatteners and expanders\n│   ├── framework/          # Terraform Plugin Framework utilities\n│   │   ├── flex/           # Flatteners and expanders, including AutoFlex\n│   │   ├── types/          # Custom type implementations\n│   │   └── validators/     # Validator implementations\n│   ├── function/           # Provider functions\n│   ├── generate/           # Code generators\n│   ├── iter/               # Go iterator utilities\n│   ├── json/               # JSON utilities\n│   ├── maps/               # Go `map` utilities\n│   ├── provider/           # Provider initialization and configuration\n│   │   ├── framework/      # Terraform Plugin Framework-specific initialization and configuration plus interceptors\n│   │   ├── interceptors/   # Common interceptor utilities\n│   │   └── sdkv2/          # Terraform Plugin SDKv2-specific initialization and configuration plus interceptors\n│   ├── reflect/            # Go reflection utilities\n│   ├── retry/              # Generic operation retry functionality\n│   │   └── state.go        # Resource wait-for-state functionality\n│   ├── sdkv2/              # Terraform Plugin SDKv2 utilities\n│   ├── service/*/          # Per-service resource implementations\n│   │   ├── exports.go      # Functions and variables used by other Go packages\n│   │   ├── exports_test.go # Functions and variables used by acceptance tests for this Go package\n│   │   ├── generate.go     # Code generation instructions\n│   │   └── sweep.go        # This service's resource sweepers\n│   ├── slices/             # Go slice utilities\n│   ├── smerr/              # Smarterr utilities\n│   ├── sweep/              # Resource sweeper utilities\n│   ├── tags/               # Resource tagging utilities\n│   ├── types/              # Go types\n│   ├── vcr/                # VCR testing utilities\n│   └── verify/             # Terraform Plugin SDKv2-specific attribute validation\n├── go.mod\n├── go.sum\n├── GNUmakefile             # Build and test commands\n└── main.go                 # Entry point\n```\n\n## Important: Dual Framework\n\nThis provider uses TWO Terraform plugin frameworks simultaneously:\n- **Terraform Plugin SDKv2** (older resources) — uses `schema.Resource`, `d.Set()`, `d.Get()`\n- **Terraform Plugin Framework** (newer resources) — uses `resource.Resource`, plan modifiers, AutoFlex\n\nWhen modifying an existing resource, use the SAME framework it already uses.\nWhen creating a new resource, use the Terraform Plugin Framework.\n\n## Conventions\n\n### Non-negotiable Rules\n- Verification is a hard exit criterion for every PR (see [Development workflow](#development-workflow)). Without it, the task is not done.\n- Prefer the boring, obvious solution. Touch only what you're asked to touch.\n- Every PR must build, pass tests, and be lint-free.\n- Follow existing conventions for naming, style, and idioms.\n- Follow current best practices and conventions for naming, style, idioms. Legacy patterns should be avoided.\n- Reuse the repository's utility packages (in `internal/`, excluding `internal/generate/` and `internal/service/`) before writing new utility code. Add new dependencies only after exhausting these.\n\n### Coding Conventions (Follow These)\n\n#### Go language usage\n- **GO USES TAB (`\\t`) CHARACTERS TO INDENT**\n- **Use elegant Go, modern (Go 1.26+) idioms** (e.g., `slices.Contains()`)\n- **Go nuance**: Don't build single files, **build a package**\n\n#### Error handling\n- Use smarterr/smerr\n- Use `retry.NotFound()` to check for missing resources during Read.\n- Return early on error; don't accumulate diagnostics past the first fatal error.\n\n### Common Patterns\n\n#### Resource file naming\n- `internal/service/{service}/{thing}.go` — thing resource implementation\n- `internal/service/{service}/{thing}_test.go` — thing resource acceptance tests\n- `internal/service/{service}/{thing}_data_source.go` — thing data source\n- `website/docs/r/{service}_{thing}.html.markdown` — thing resource documentation\n- `website/docs/d/{service}_{thing}.html.markdown` — thing data source documentation\n\n#### Resource implementation pattern (Framework)\nNew resources use the Terraform Plugin Framework pattern:\n- Implement `resource.Resource` interface\n- Use AutoFlex for flattening/expanding where possible\n- Use `retry.RetryContext` for eventual consistency\n\nFor example:\n```go\nfunc (r *thingResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse) {\n    // 1. Read model from state\n    // 2. Call AWS API\n    // 3. Handle NotFound → remove from state\n    // 4. AutoFlex response into model\n    // 5. Write model to state\n}\n```\n\n## Development workflow\n\n### Overview\n- Substantive changes and correctness first, lint after: run `make quick-fix PKG=<service>` near the end, before raising PR. Avoid the tiny change → lint → tiny change → lint loop. `make fmt` is the cheap exception — run it freely.\n- Scope most commands to the package changed — the provider is very large. CI is the provider-wide gate for build, lint, and semgrep.\n\n### AI usage\nWhen you help prepare a PR, disclose the AI's role in the description and add `🤖🤖🤖` to the title. See [`docs/ai-usage.md`](docs/ai-usage.md) for the full policy. **Humans are fully responsible for the code regardless of AI usage.**\n\n### Running commands\n- `make t` and `make testacc`: Run acceptance tests and create real AWS resources. Get explicit approval before running.\n- `make …` (except acceptance tests), `go …`, and read-only commands (`awk`, `grep`, `ls`, `rg`) are safe to run without confirmation.\n\n### Regenerate, test, and verify (scoped to your package)\n- **Regenerate** after changing annotations or a service's `generate.go`: `make gen PKG=<service>`. Run the provider-wide `make gen` only after changing `names/data/names_data.hcl`, anything under `internal/generate/` — it affects every service and takes many minutes.\n- **Test** with `make test PKG=<service>` (unit test) (`T=<pattern>` filters by name); for non-service changes, e.g., `go test ./internal/conns/...`.\n- **Fix and verify** with `make quick-fix PKG=<service>` — the default final pass. It applies formatting, imports, lint, semgrep fixes, and `copyright-fix`, and fails if the build is broken (no separate build step needed).\n- **Documentation**: run `make swissshepherd` to verify changes align with docs. Run `make swissshepherd-refresh` only once at the beginning of a session.\n\n### Commits, CHANGELOG, and docs\n- Keep each commit small, atomic, and single-purpose; the message describes the change.\n- Add a `.changelog/` entry for new features, bug fixes, and enhancements.\n- New features require new documentation; `./docs/end-user-documentation.md` is authoritative.\n\n## Boundaries\n- Never edit `CHANGELOG.md` directly — use `.changelog/` entries.\n- Never edit generated files by hand — modify the generator or annotations, then run `make gen PKG=<service>` or `make gen` (provider level).\n- Do not modify `go.mod`/`go.sum` without running `go mod tidy`.\n- Do not add new external dependencies without explicit approval.\n- The `website/` directory follows different conventions; see `docs/end-user-documentation.md`.\n",".github/copilot-instructions.md":"<!-- Copyright IBM Corp. 2014, 2026 -->\n<!-- SPDX-License-Identifier: MPL-2.0 -->\n\n# GitHub Copilot Instructions\n\nThis repository implements the Terraform AWS Provider.\n\n## Compatibility is non-negotiable\n\nChanges must preserve Terraform state compatibility, upgrade behavior, import behavior, and existing user workflows. Schema changes that force replacement, rename attributes, or break state migration are flagged unless explicitly justified.\n\n## Favor recent patterns; do not enforce legacy ones\n\nThe provider has both modern (Plugin Framework) and legacy (Plugin SDK v2) code. New work follows recent patterns. Do not ask contributors to mimic legacy patterns just because nearby code uses them. Do not suggest refactors or new abstractions unless they address correctness, maintainability, or compatibility.\n\n## Go style\n\nWrite modern Go (Go 1.25+): `slices`, `maps`, `cmp`, `iter`, `errors.Is` / `errors.As`, `range` over int/func. Prefer return-early. Use AWS SDK for Go v2 only. Detect AWS API exceptions with `errs.IsA[*awstypes.<Exception>]`.\n\n## Review tone\n\nBe specific and actionable. Cite the rule and propose the corrected code. Focus on substance over style: avoid minor comments that create noise. Frame comments as guidance for maintainers to weigh, not required changes for contributors.\n\n**Begin each comment with this line on its own, before any other text:**\n\n> 🤖 _This Copilot comment is not a required action for the contributor._\n\n## Broader agent context\n\nSee [`AGENTS.md`](../AGENTS.md) for personas, skills, build/test commands, and the AI-usage policy.\n\n## Scoped rules\n\nPath-specific instruction files. Multiple files may apply to the same path.\n\n| Concern | File | Applies to |\n|---|---|---|\n| Resource lifecycle (CRUD, errors, AutoFlex) | `instructions/lifecycle.instructions.md` | `internal/service/**/*.go` |\n| Helpers (finders, waiters, sweepers, data sources, list resources) | `instructions/helpers.instructions.md` | `internal/service/**/*.go` |\n| Schema / resource shape | `instructions/schema.instructions.md` | `internal/service/**/*.go` |\n| Resource Identity | `instructions/identity.instructions.md` | `internal/service/**/*.go` |\n| Tags (schema attrs, wiring, annotation) | `instructions/tags.instructions.md` | `internal/service/**/*.go` |\n| Generated code | `instructions/generated.instructions.md` | `internal/service/**/*_gen.go` |\n| Acceptance test basics | `instructions/acceptance-tests.instructions.md` | `internal/service/**/*_test.go` |\n| Test helpers (Exists/Destroy, list/data source/unit tests) | `instructions/acceptance-tests-helpers.instructions.md` | `internal/service/**/*_test.go` |\n| User-facing documentation | `instructions/docs.instructions.md` | `website/docs/**/*.markdown` |\n| Import section + Identity Schema docs | `instructions/docs-import.instructions.md` | `website/docs/**/*.markdown` |\n\nThe `internal/service/**/*.go` glob matches both production and test files; non-test rules generally don't apply to tests.\n"},"files":{"AGENTS.md":"<!-- Copyright IBM Corp. 2014, 2026 -->\n<!-- SPDX-License-Identifier: MPL-2.0 -->\n\n# AGENTS.md\n\nThis file provides guidance to AI coding agents when working with code in this repository.\n\n## Repository Overview\n\nThis is the Go-based Terraform AWS Provider (`github.com/hashicorp/terraform-provider-aws`). It maps AWS API resources to Terraform resources, data sources, ephemeral resources and actions (collectively often referred to as just resources). The primary language is Go; HCL appears in acceptance test configurations and website documentation.\n\n## Agent Registry\n\nThis project uses specialized personas for different tasks.\n\n### Available Personas\n- **`@contributor`**: [Contributor Persona](./.agents/contributor.md) - Contributes code in the form of bugfixes, enhancements to existing resources, and new resources. Makes clarifications and corrections to existing documentation.\n- **`@maintainer`**: [Maintainer Persona](./.agents/maintainer.md) - Steward of the project, responsible for both internal and external quality. Reviews contributions. Maintains provider-level features, including new Terraform language constructs.\n- **`@tcm`**: [TCM Persona](./.agents/tcm.md) - Triages incoming GitHub issues and PRs. Engages with community members to answer technical and process questions. Suggests workarounds and alternatives to reported bugs.\n\n### Registry Rules\n- Always use the requested persona for tasks.\n- If no persona is specified, default to `@contributor`.\n- A persona defines a role with a perspective and responsibilities.\n- Personas may invoke skills.\n\n## Skills\n\nSkills are loaded from `./.agents/skills`. Each skill supplies step-by-step instructions, code patterns, and guardrails for a specific task.\n\n| Skill | Task |\n|---|---|\n| [breaking-changes](./.agents/skills/breaking-changes/SKILL.md) | Review a PR for possible breaking changes. |\n| [changelog](./.agents/skills/changelog/SKILL.md) | Add a `.changelog/<PR_NUMBER>.txt` entry from a PR URL, commit, and push (with confirmation). |\n| [fixdocs](./.agents/skills/fixdocs/SKILL.md) | Fix end user documentation with `swissshepherd`. |\n| [review-pr](./.agents/skills/review-pr/SKILL.md) | Review a Terraform AWS Provider PR. Router: holds cross-cutting principles and routes to the scoped `review-*` leaf skills below based on the files a PR changes. |\n| [review-lifecycle](./.agents/skills/review-lifecycle/SKILL.md) | Review resource CRUD, errors, and AutoFlex (`internal/service/**/*.go`). |\n| [review-schema](./.agents/skills/review-schema/SKILL.md) | Review Plugin Framework schema shape (`internal/service/**/*.go`). |\n| [review-helpers](./.agents/skills/review-helpers/SKILL.md) | Review finders, waiters, sweepers, data sources, list resources (`internal/service/**/*.go`). |\n| [review-identity](./.agents/skills/review-identity/SKILL.md) | Review Resource Identity annotations and import-ID handlers (`internal/service/**/*.go`). |\n| [review-tags](./.agents/skills/review-tags/SKILL.md) | Review tag schema attributes, wiring, and the `@Tags` annotation (`internal/service/**/*.go`). |\n| [review-generated](./.agents/skills/review-generated/SKILL.md) | Review generated code (`internal/service/**/*_gen.go`). |\n| [review-tests](./.agents/skills/review-tests/SKILL.md) | Review acceptance/unit test basics (`internal/service/**/*_test.go`). |\n| [review-tests-helpers](./.agents/skills/review-tests-helpers/SKILL.md) | Review Exists/Destroy, data source, list, and unit tests (`internal/service/**/*_test.go`). |\n| [review-docs](./.agents/skills/review-docs/SKILL.md) | Review a PR's end user documentation updates (`website/docs/**/*.markdown`). |\n\n## Stack\n- Go 1.26+, AWS SDK for Go v2.\n- Terraform Plugin Framework + Terraform Plugin SDKv2 ([muxed](https://developer.hashicorp.com/terraform/plugin/mux) provider).\n- Code generators in `internal/generate/`.\n- Build system: GNU Make (see `GNUmakefile`).\n- Testing: Go standard `testing` package + [`terraform-plugin-testing` acceptance test framework](https://developer.hashicorp.com/terraform/plugin/testing/acceptance-tests).\n\n## Code Structure (The important parts)\n\n```\nterraform-provider-aws/\n├── .changelog/             # CHANGELOG entries\n├── internal/\n│   ├── acctest/            # Acceptance test helpers\n│   ├── backoff/            # Low-level backoff loop implementation\n│   ├── conns/              # Provider-level global state, including provider configuration\n│   ├── enum/               # AWS SDK for Go v2 enumeration utilities\n│   ├── errs/               # Go `error` utilities\n│   │   ├── fwdiag/         # Terraform Plugin Framework `Diagnostic` utilities\n│   │   └── sdkdiag/        # Terraform Plugin SDKv2 `Diagnostic` utilities\n│   ├── flex/               # General and Terraform Plugin SDKv2-specific flatteners and expanders\n│   ├── framework/          # Terraform Plugin Framework utilities\n│   │   ├── flex/           # Flatteners and expanders, including AutoFlex\n│   │   ├── types/          # Custom type implementations\n│   │   └── validators/     # Validator implementations\n│   ├── function/           # Provider functions\n│   ├── generate/           # Code generators\n│   ├── iter/               # Go iterator utilities\n│   ├── json/               # JSON utilities\n│   ├── maps/               # Go `map` utilities\n│   ├── provider/           # Provider initialization and configuration\n│   │   ├── framework/      # Terraform Plugin Framework-specific initialization and configuration plus interceptors\n│   │   ├── interceptors/   # Common interceptor utilities\n│   │   └── sdkv2/          # Terraform Plugin SDKv2-specific initialization and configuration plus interceptors\n│   ├── reflect/            # Go reflection utilities\n│   ├── retry/              # Generic operation retry functionality\n│   │   └── state.go        # Resource wait-for-state functionality\n│   ├── sdkv2/              # Terraform Plugin SDKv2 utilities\n│   ├── service/*/          # Per-service resource implementations\n│   │   ├── exports.go      # Functions and variables used by other Go packages\n│   │   ├── exports_test.go # Functions and variables used by acceptance tests for this Go package\n│   │   ├── generate.go     # Code generation instructions\n│   │   └── sweep.go        # This service's resource sweepers\n│   ├── slices/             # Go slice utilities\n│   ├── smerr/              # Smarterr utilities\n│   ├── sweep/              # Resource sweeper utilities\n│   ├── tags/               # Resource tagging utilities\n│   ├── types/              # Go types\n│   ├── vcr/                # VCR testing utilities\n│   └── verify/             # Terraform Plugin SDKv2-specific attribute validation\n├── go.mod\n├── go.sum\n├── GNUmakefile             # Build and test commands\n└── main.go                 # Entry point\n```\n\n## Important: Dual Framework\n\nThis provider uses TWO Terraform plugin frameworks simultaneously:\n- **Terraform Plugin SDKv2** (older resources) — uses `schema.Resource`, `d.Set()`, `d.Get()`\n- **Terraform Plugin Framework** (newer resources) — uses `resource.Resource`, plan modifiers, AutoFlex\n\nWhen modifying an existing resource, use the SAME framework it already uses.\nWhen creating a new resource, use the Terraform Plugin Framework.\n\n## Conventions\n\n### Non-negotiable Rules\n- Verification is a hard exit criterion for every PR (see [Development workflow](#development-workflow)). Without it, the task is not done.\n- Prefer the boring, obvious solution. Touch only what you're asked to touch.\n- Every PR must build, pass tests, and be lint-free.\n- Follow existing conventions for naming, style, and idioms.\n- Follow current best practices and conventions for naming, style, idioms. Legacy patterns should be avoided.\n- Reuse the repository's utility packages (in `internal/`, excluding `internal/generate/` and `internal/service/`) before writing new utility code. Add new dependencies only after exhausting these.\n\n### Coding Conventions (Follow These)\n\n#### Go language usage\n- **GO USES TAB (`\\t`) CHARACTERS TO INDENT**\n- **Use elegant Go, modern (Go 1.26+) idioms** (e.g., `slices.Contains()`)\n- **Go nuance**: Don't build single files, **build a package**\n\n#### Error handling\n- Use smarterr/smerr\n- Use `retry.NotFound()` to check for missing resources during Read.\n- Return early on error; don't accumulate diagnostics past the first fatal error.\n\n### Common Patterns\n\n#### Resource file naming\n- `internal/service/{service}/{thing}.go` — thing resource implementation\n- `internal/service/{service}/{thing}_test.go` — thing resource acceptance tests\n- `internal/service/{service}/{thing}_data_source.go` — thing data source\n- `website/docs/r/{service}_{thing}.html.markdown` — thing resource documentation\n- `website/docs/d/{service}_{thing}.html.markdown` — thing data source documentation\n\n#### Resource implementation pattern (Framework)\nNew resources use the Terraform Plugin Framework pattern:\n- Implement `resource.Resource` interface\n- Use AutoFlex for flattening/expanding where possible\n- Use `retry.RetryContext` for eventual consistency\n\nFor example:\n```go\nfunc (r *thingResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse) {\n    // 1. Read model from state\n    // 2. Call AWS API\n    // 3. Handle NotFound → remove from state\n    // 4. AutoFlex response into model\n    // 5. Write model to state\n}\n```\n\n## Development workflow\n\n### Overview\n- Substantive changes and correctness first, lint after: run `make quick-fix PKG=<service>` near the end, before raising PR. Avoid the tiny change → lint → tiny change → lint loop. `make fmt` is the cheap exception — run it freely.\n- Scope most commands to the package changed — the provider is very large. CI is the provider-wide gate for build, lint, and semgrep.\n\n### AI usage\nWhen you help prepare a PR, disclose the AI's role in the description and add `🤖🤖🤖` to the title. See [`docs/ai-usage.md`](docs/ai-usage.md) for the full policy. **Humans are fully responsible for the code regardless of AI usage.**\n\n### Running commands\n- `make t` and `make testacc`: Run acceptance tests and create real AWS resources. Get explicit approval before running.\n- `make …` (except acceptance tests), `go …`, and read-only commands (`awk`, `grep`, `ls`, `rg`) are safe to run without confirmation.\n\n### Regenerate, test, and verify (scoped to your package)\n- **Regenerate** after changing annotations or a service's `generate.go`: `make gen PKG=<service>`. Run the provider-wide `make gen` only after changing `names/data/names_data.hcl`, anything under `internal/generate/` — it affects every service and takes many minutes.\n- **Test** with `make test PKG=<service>` (unit test) (`T=<pattern>` filters by name); for non-service changes, e.g., `go test ./internal/conns/...`.\n- **Fix and verify** with `make quick-fix PKG=<service>` — the default final pass. It applies formatting, imports, lint, semgrep fixes, and `copyright-fix`, and fails if the build is broken (no separate build step needed).\n- **Documentation**: run `make swissshepherd` to verify changes align with docs. Run `make swissshepherd-refresh` only once at the beginning of a session.\n\n### Commits, CHANGELOG, and docs\n- Keep each commit small, atomic, and single-purpose; the message describes the change.\n- Add a `.changelog/` entry for new features, bug fixes, and enhancements.\n- New features require new documentation; `./docs/end-user-documentation.md` is authoritative.\n\n## Boundaries\n- Never edit `CHANGELOG.md` directly — use `.changelog/` entries.\n- Never edit generated files by hand — modify the generator or annotations, then run `make gen PKG=<service>` or `make gen` (provider level).\n- Do not modify `go.mod`/`go.sum` without running `go mod tidy`.\n- Do not add new external dependencies without explicit approval.\n- The `website/` directory follows different conventions; see `docs/end-user-documentation.md`.\n",".github/copilot-instructions.md":"<!-- Copyright IBM Corp. 2014, 2026 -->\n<!-- SPDX-License-Identifier: MPL-2.0 -->\n\n# GitHub Copilot Instructions\n\nThis repository implements the Terraform AWS Provider.\n\n## Compatibility is non-negotiable\n\nChanges must preserve Terraform state compatibility, upgrade behavior, import behavior, and existing user workflows. Schema changes that force replacement, rename attributes, or break state migration are flagged unless explicitly justified.\n\n## Favor recent patterns; do not enforce legacy ones\n\nThe provider has both modern (Plugin Framework) and legacy (Plugin SDK v2) code. New work follows recent patterns. Do not ask contributors to mimic legacy patterns just because nearby code uses them. Do not suggest refactors or new abstractions unless they address correctness, maintainability, or compatibility.\n\n## Go style\n\nWrite modern Go (Go 1.25+): `slices`, `maps`, `cmp`, `iter`, `errors.Is` / `errors.As`, `range` over int/func. Prefer return-early. Use AWS SDK for Go v2 only. Detect AWS API exceptions with `errs.IsA[*awstypes.<Exception>]`.\n\n## Review tone\n\nBe specific and actionable. Cite the rule and propose the corrected code. Focus on substance over style: avoid minor comments that create noise. Frame comments as guidance for maintainers to weigh, not required changes for contributors.\n\n**Begin each comment with this line on its own, before any other text:**\n\n> 🤖 _This Copilot comment is not a required action for the contributor._\n\n## Broader agent context\n\nSee [`AGENTS.md`](../AGENTS.md) for personas, skills, build/test commands, and the AI-usage policy.\n\n## Scoped rules\n\nPath-specific instruction files. Multiple files may apply to the same path.\n\n| Concern | File | Applies to |\n|---|---|---|\n| Resource lifecycle (CRUD, errors, AutoFlex) | `instructions/lifecycle.instructions.md` | `internal/service/**/*.go` |\n| Helpers (finders, waiters, sweepers, data sources, list resources) | `instructions/helpers.instructions.md` | `internal/service/**/*.go` |\n| Schema / resource shape | `instructions/schema.instructions.md` | `internal/service/**/*.go` |\n| Resource Identity | `instructions/identity.instructions.md` | `internal/service/**/*.go` |\n| Tags (schema attrs, wiring, annotation) | `instructions/tags.instructions.md` | `internal/service/**/*.go` |\n| Generated code | `instructions/generated.instructions.md` | `internal/service/**/*_gen.go` |\n| Acceptance test basics | `instructions/acceptance-tests.instructions.md` | `internal/service/**/*_test.go` |\n| Test helpers (Exists/Destroy, list/data source/unit tests) | `instructions/acceptance-tests-helpers.instructions.md` | `internal/service/**/*_test.go` |\n| User-facing documentation | `instructions/docs.instructions.md` | `website/docs/**/*.markdown` |\n| Import section + Identity Schema docs | `instructions/docs-import.instructions.md` | `website/docs/**/*.markdown` |\n\nThe `internal/service/**/*.go` glob matches both production and test files; non-test rules generally don't apply to tests.\n"},"items":[{"name":"AGENTS.md","path":"AGENTS.md","title":"AGENTS.md","content":"<!-- Copyright IBM Corp. 2014, 2026 -->\n<!-- SPDX-License-Identifier: MPL-2.0 -->\n\n# AGENTS.md\n\nThis file provides guidance to AI coding agents when working with code in this repository.\n\n## Repository Overview\n\nThis is the Go-based Terraform AWS Provider (`github.com/hashicorp/terraform-provider-aws`). It maps AWS API resources to Terraform resources, data sources, ephemeral resources and actions (collectively often referred to as just resources). The primary language is Go; HCL appears in acceptance test configurations and website documentation.\n\n## Agent Registry\n\nThis project uses specialized personas for different tasks.\n\n### Available Personas\n- **`@contributor`**: [Contributor Persona](./.agents/contributor.md) - Contributes code in the form of bugfixes, enhancements to existing resources, and new resources. Makes clarifications and corrections to existing documentation.\n- **`@maintainer`**: [Maintainer Persona](./.agents/maintainer.md) - Steward of the project, responsible for both internal and external quality. Reviews contributions. Maintains provider-level features, including new Terraform language constructs.\n- **`@tcm`**: [TCM Persona](./.agents/tcm.md) - Triages incoming GitHub issues and PRs. Engages with community members to answer technical and process questions. Suggests workarounds and alternatives to reported bugs.\n\n### Registry Rules\n- Always use the requested persona for tasks.\n- If no persona is specified, default to `@contributor`.\n- A persona defines a role with a perspective and responsibilities.\n- Personas may invoke skills.\n\n## Skills\n\nSkills are loaded from `./.agents/skills`. Each skill supplies step-by-step instructions, code patterns, and guardrails for a specific task.\n\n| Skill | Task |\n|---|---|\n| [breaking-changes](./.agents/skills/breaking-changes/SKILL.md) | Review a PR for possible breaking changes. |\n| [changelog](./.agents/skills/changelog/SKILL.md) | Add a `.changelog/<PR_NUMBER>.txt` entry from a PR URL, commit, and push (with confirmation). |\n| [fixdocs](./.agents/skills/fixdocs/SKILL.md) | Fix end user documentation with `swissshepherd`. |\n| [review-pr](./.agents/skills/review-pr/SKILL.md) | Review a Terraform AWS Provider PR. Router: holds cross-cutting principles and routes to the scoped `review-*` leaf skills below based on the files a PR changes. |\n| [review-lifecycle](./.agents/skills/review-lifecycle/SKILL.md) | Review resource CRUD, errors, and AutoFlex (`internal/service/**/*.go`). |\n| [review-schema](./.agents/skills/review-schema/SKILL.md) | Review Plugin Framework schema shape (`internal/service/**/*.go`). |\n| [review-helpers](./.agents/skills/review-helpers/SKILL.md) | Review finders, waiters, sweepers, data sources, list resources (`internal/service/**/*.go`). |\n| [review-identity](./.agents/skills/review-identity/SKILL.md) | Review Resource Identity annotations and import-ID handlers (`internal/service/**/*.go`). |\n| [review-tags](./.agents/skills/review-tags/SKILL.md) | Review tag schema attributes, wiring, and the `@Tags` annotation (`internal/service/**/*.go`). |\n| [review-generated](./.agents/skills/review-generated/SKILL.md) | Review generated code (`internal/service/**/*_gen.go`). |\n| [review-tests](./.agents/skills/review-tests/SKILL.md) | Review acceptance/unit test basics (`internal/service/**/*_test.go`). |\n| [review-tests-helpers](./.agents/skills/review-tests-helpers/SKILL.md) | Review Exists/Destroy, data source, list, and unit tests (`internal/service/**/*_test.go`). |\n| [review-docs](./.agents/skills/review-docs/SKILL.md) | Review a PR's end user documentation updates (`website/docs/**/*.markdown`). |\n\n## Stack\n- Go 1.26+, AWS SDK for Go v2.\n- Terraform Plugin Framework + Terraform Plugin SDKv2 ([muxed](https://developer.hashicorp.com/terraform/plugin/mux) provider).\n- Code generators in `internal/generate/`.\n- Build system: GNU Make (see `GNUmakefile`).\n- Testing: Go standard `testing` package + [`terraform-plugin-testing` acceptance test framework](https://developer.hashicorp.com/terraform/plugin/testing/acceptance-tests).\n\n## Code Structure (The important parts)\n\n```\nterraform-provider-aws/\n├── .changelog/             # CHANGELOG entries\n├── internal/\n│   ├── acctest/            # Acceptance test helpers\n│   ├── backoff/            # Low-level backoff loop implementation\n│   ├── conns/              # Provider-level global state, including provider configuration\n│   ├── enum/               # AWS SDK for Go v2 enumeration utilities\n│   ├── errs/               # Go `error` utilities\n│   │   ├── fwdiag/         # Terraform Plugin Framework `Diagnostic` utilities\n│   │   └── sdkdiag/        # Terraform Plugin SDKv2 `Diagnostic` utilities\n│   ├── flex/               # General and Terraform Plugin SDKv2-specific flatteners and expanders\n│   ├── framework/          # Terraform Plugin Framework utilities\n│   │   ├── flex/           # Flatteners and expanders, including AutoFlex\n│   │   ├── types/          # Custom type implementations\n│   │   └── validators/     # Validator implementations\n│   ├── function/           # Provider functions\n│   ├── generate/           # Code generators\n│   ├── iter/               # Go iterator utilities\n│   ├── json/               # JSON utilities\n│   ├── maps/               # Go `map` utilities\n│   ├── provider/           # Provider initialization and configuration\n│   │   ├── framework/      # Terraform Plugin Framework-specific initialization and configuration plus interceptors\n│   │   ├── interceptors/   # Common interceptor utilities\n│   │   └── sdkv2/          # Terraform Plugin SDKv2-specific initialization and configuration plus interceptors\n│   ├── reflect/            # Go reflection utilities\n│   ├── retry/              # Generic operation retry functionality\n│   │   └── state.go        # Resource wait-for-state functionality\n│   ├── sdkv2/              # Terraform Plugin SDKv2 utilities\n│   ├── service/*/          # Per-service resource implementations\n│   │   ├── exports.go      # Functions and variables used by other Go packages\n│   │   ├── exports_test.go # Functions and variables used by acceptance tests for this Go package\n│   │   ├── generate.go     # Code generation instructions\n│   │   └── sweep.go        # This service's resource sweepers\n│   ├── slices/             # Go slice utilities\n│   ├── smerr/              # Smarterr utilities\n│   ├── sweep/              # Resource sweeper utilities\n│   ├── tags/               # Resource tagging utilities\n│   ├── types/              # Go types\n│   ├── vcr/                # VCR testing utilities\n│   └── verify/             # Terraform Plugin SDKv2-specific attribute validation\n├── go.mod\n├── go.sum\n├── GNUmakefile             # Build and test commands\n└── main.go                 # Entry point\n```\n\n## Important: Dual Framework\n\nThis provider uses TWO Terraform plugin frameworks simultaneously:\n- **Terraform Plugin SDKv2** (older resources) — uses `schema.Resource`, `d.Set()`, `d.Get()`\n- **Terraform Plugin Framework** (newer resources) — uses `resource.Resource`, plan modifiers, AutoFlex\n\nWhen modifying an existing resource, use the SAME framework it already uses.\nWhen creating a new resource, use the Terraform Plugin Framework.\n\n## Conventions\n\n### Non-negotiable Rules\n- Verification is a hard exit criterion for every PR (see [Development workflow](#development-workflow)). Without it, the task is not done.\n- Prefer the boring, obvious solution. Touch only what you're asked to touch.\n- Every PR must build, pass tests, and be lint-free.\n- Follow existing conventions for naming, style, and idioms.\n- Follow current best practices and conventions for naming, style, idioms. Legacy patterns should be avoided.\n- Reuse the repository's utility packages (in `internal/`, excluding `internal/generate/` and `internal/service/`) before writing new utility code. Add new dependencies only after exhausting these.\n\n### Coding Conventions (Follow These)\n\n#### Go language usage\n- **GO USES TAB (`\\t`) CHARACTERS TO INDENT**\n- **Use elegant Go, modern (Go 1.26+) idioms** (e.g., `slices.Contains()`)\n- **Go nuance**: Don't build single files, **build a package**\n\n#### Error handling\n- Use smarterr/smerr\n- Use `retry.NotFound()` to check for missing resources during Read.\n- Return early on error; don't accumulate diagnostics past the first fatal error.\n\n### Common Patterns\n\n#### Resource file naming\n- `internal/service/{service}/{thing}.go` — thing resource implementation\n- `internal/service/{service}/{thing}_test.go` — thing resource acceptance tests\n- `internal/service/{service}/{thing}_data_source.go` — thing data source\n- `website/docs/r/{service}_{thing}.html.markdown` — thing resource documentation\n- `website/docs/d/{service}_{thing}.html.markdown` — thing data source documentation\n\n#### Resource implementation pattern (Framework)\nNew resources use the Terraform Plugin Framework pattern:\n- Implement `resource.Resource` interface\n- Use AutoFlex for flattening/expanding where possible\n- Use `retry.RetryContext` for eventual consistency\n\nFor example:\n```go\nfunc (r *thingResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse) {\n    // 1. Read model from state\n    // 2. Call AWS API\n    // 3. Handle NotFound → remove from state\n    // 4. AutoFlex response into model\n    // 5. Write model to state\n}\n```\n\n## Development workflow\n\n### Overview\n- Substantive changes and correctness first, lint after: run `make quick-fix PKG=<service>` near the end, before raising PR. Avoid the tiny change → lint → tiny change → lint loop. `make fmt` is the cheap exception — run it freely.\n- Scope most commands to the package changed — the provider is very large. CI is the provider-wide gate for build, lint, and semgrep.\n\n### AI usage\nWhen you help prepare a PR, disclose the AI's role in the description and add `🤖🤖🤖` to the title. See [`docs/ai-usage.md`](docs/ai-usage.md) for the full policy. **Humans are fully responsible for the code regardless of AI usage.**\n\n### Running commands\n- `make t` and `make testacc`: Run acceptance tests and create real AWS resources. Get explicit approval before running.\n- `make …` (except acceptance tests), `go …`, and read-only commands (`awk`, `grep`, `ls`, `rg`) are safe to run without confirmation.\n\n### Regenerate, test, and verify (scoped to your package)\n- **Regenerate** after changing annotations or a service's `generate.go`: `make gen PKG=<service>`. Run the provider-wide `make gen` only after changing `names/data/names_data.hcl`, anything under `internal/generate/` — it affects every service and takes many minutes.\n- **Test** with `make test PKG=<service>` (unit test) (`T=<pattern>` filters by name); for non-service changes, e.g., `go test ./internal/conns/...`.\n- **Fix and verify** with `make quick-fix PKG=<service>` — the default final pass. It applies formatting, imports, lint, semgrep fixes, and `copyright-fix`, and fails if the build is broken (no separate build step needed).\n- **Documentation**: run `make swissshepherd` to verify changes align with docs. Run `make swissshepherd-refresh` only once at the beginning of a session.\n\n### Commits, CHANGELOG, and docs\n- Keep each commit small, atomic, and single-purpose; the message describes the change.\n- Add a `.changelog/` entry for new features, bug fixes, and enhancements.\n- New features require new documentation; `./docs/end-user-documentation.md` is authoritative.\n\n## Boundaries\n- Never edit `CHANGELOG.md` directly — use `.changelog/` entries.\n- Never edit generated files by hand — modify the generator or annotations, then run `make gen PKG=<service>` or `make gen` (provider level).\n- Do not modify `go.mod`/`go.sum` without running `go mod tidy`.\n- Do not add new external dependencies without explicit approval.\n- The `website/` directory follows different conventions; see `docs/end-user-documentation.md`.\n","category":"root","tokens":2970},{"name":"copilot-instructions.md","path":".github/copilot-instructions.md","title":"copilot-instructions.md","content":"<!-- Copyright IBM Corp. 2014, 2026 -->\n<!-- SPDX-License-Identifier: MPL-2.0 -->\n\n# GitHub Copilot Instructions\n\nThis repository implements the Terraform AWS Provider.\n\n## Compatibility is non-negotiable\n\nChanges must preserve Terraform state compatibility, upgrade behavior, import behavior, and existing user workflows. Schema changes that force replacement, rename attributes, or break state migration are flagged unless explicitly justified.\n\n## Favor recent patterns; do not enforce legacy ones\n\nThe provider has both modern (Plugin Framework) and legacy (Plugin SDK v2) code. New work follows recent patterns. Do not ask contributors to mimic legacy patterns just because nearby code uses them. Do not suggest refactors or new abstractions unless they address correctness, maintainability, or compatibility.\n\n## Go style\n\nWrite modern Go (Go 1.25+): `slices`, `maps`, `cmp`, `iter`, `errors.Is` / `errors.As`, `range` over int/func. Prefer return-early. Use AWS SDK for Go v2 only. Detect AWS API exceptions with `errs.IsA[*awstypes.<Exception>]`.\n\n## Review tone\n\nBe specific and actionable. Cite the rule and propose the corrected code. Focus on substance over style: avoid minor comments that create noise. Frame comments as guidance for maintainers to weigh, not required changes for contributors.\n\n**Begin each comment with this line on its own, before any other text:**\n\n> 🤖 _This Copilot comment is not a required action for the contributor._\n\n## Broader agent context\n\nSee [`AGENTS.md`](../AGENTS.md) for personas, skills, build/test commands, and the AI-usage policy.\n\n## Scoped rules\n\nPath-specific instruction files. Multiple files may apply to the same path.\n\n| Concern | File | Applies to |\n|---|---|---|\n| Resource lifecycle (CRUD, errors, AutoFlex) | `instructions/lifecycle.instructions.md` | `internal/service/**/*.go` |\n| Helpers (finders, waiters, sweepers, data sources, list resources) | `instructions/helpers.instructions.md` | `internal/service/**/*.go` |\n| Schema / resource shape | `instructions/schema.instructions.md` | `internal/service/**/*.go` |\n| Resource Identity | `instructions/identity.instructions.md` | `internal/service/**/*.go` |\n| Tags (schema attrs, wiring, annotation) | `instructions/tags.instructions.md` | `internal/service/**/*.go` |\n| Generated code | `instructions/generated.instructions.md` | `internal/service/**/*_gen.go` |\n| Acceptance test basics | `instructions/acceptance-tests.instructions.md` | `internal/service/**/*_test.go` |\n| Test helpers (Exists/Destroy, list/data source/unit tests) | `instructions/acceptance-tests-helpers.instructions.md` | `internal/service/**/*_test.go` |\n| User-facing documentation | `instructions/docs.instructions.md` | `website/docs/**/*.markdown` |\n| Import section + Identity Schema docs | `instructions/docs-import.instructions.md` | `website/docs/**/*.markdown` |\n\nThe `internal/service/**/*.go` glob matches both production and test files; non-test rules generally don't apply to tests.\n","category":".github","tokens":748}]}