aws-ami-builder
Build Amazon Machine Images (AMIs) with Packer using the amazon-ebs builder. Use when creating custom AMIs for EC2 instances.
Migrate Terraform provider resources and data sources from Plugin SDKv2 to the Plugin Framework: muxing both plugins in one provider (terraform-plugin-mux, tf5to6server), per-resource migration workflow, SDKv2-to-Framework schema mapping (ForceNew, ValidateFunc,
$ npx -y skills add hashicorp/agent-skills --skill provider-framework-migration --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/provider-framework-migrationContext preview
The summary Claude sees to decide when to auto-load this skill.
Migrate Terraform provider resources and data sources from Plugin SDKv2 to the Plugin Framework: muxing both plugins in one provider (terraform-plugin-mux, tf5to6server), per-resource migration workflow, SDKv2-to-Framework schema mapping (ForceNew, ValidateFunc,
name: provider-framework-migration description: >- Migrate Terraform provider resources and data sources from Plugin SDKv2 to the Plugin Framework: muxing both plugins in one provider (terraform-plugin-mux, tf5to6server), per-resource migration workflow, SDKv2-to-Framework schema mapping (ForceNew, ValidateFunc, DiffSuppressFunc, Default, Timeouts, blocks), null-vs-zero-value behavioral traps, and state-compatibility verification. Use when converting or translating SDKv2 resources to the Framework, setting up a muxed provider server, deciding whether a resource should be migrated at all, or debugging plan diffs and state errors that appeared after a migration. license: MPL-2.0 metadata: lifecycle-status: active copyright: Copyright IBM Corp. 2026 version: "0.0.1"
The Plugin Framework is required for net-new resources and data sources; SDKv2 is maintenance-only. Migration is **per-resource and incremental**: a muxed provider serves SDKv2 and Framework implementations side by side, so you never need a big-bang rewrite. This skill covers the mux setup, the per-resource workflow, and the behavioral traps that turn a mechanical translation into a silent breaking change.
**Reference** (load when needed):
table with code pairs
Official guide: [Framework migration](https://developer.hashicorp.com/terraform/plugin/framework/migrating).
Migration has real risk and little user-visible payoff, so triage first:
need (a Framework-only feature, a bug that SDKv2 cannot fix). The two SDKs differ behaviorally — most importantly around null versus zero values — and those differences surface as breaking changes for existing users. This is the standing policy in large providers like terraform-provider-aws.
no `CustomizeDiff`, no `StateFunc`, no complex nested blocks.
resource in the Framework alongside the old ones.
To tell what mode a provider is in, check `go.mod`: `terraform-plugin-mux` present means it already serves both; only `terraform-plugin-sdk/v2` means SDKv2-only (mux setup is your first step); only `terraform-plugin-framework` means the migration is done.
Combine both plugin servers in `main.go`. Serving protocol version 6 requires upgrading the SDKv2 server with `tf5to6server` (protocol 6 needs Terraform CLI >= 1.0; if you must support 0.12+, mux at protocol 5 with `tf6to5server`/`tf5muxserver` instead — but the Framework provider then cannot use protocol-6-only features like nested attributes):
package main
import (
"context"
"flag"
"log"
"github.com/hashicorp/terraform-plugin-framework/providerserver"
"github.com/hashicorp/terraform-plugin-go/tfprotov6"
"github.com/hashicorp/terraform-plugin-go/tfprotov6/tf6server"
"github.com/hashicorp/terraform-plugin-mux/tf5to6server"
"github.com/hashicorp/terraform-plugin-mux/tf6muxserver"
"example.org/terraform-provider-examplecloud/internal/provider"
sdkprovider "example.org/terraform-provider-examplecloud/internal/sdkprovider"
)
func main() {
var debug bool
flag.BoolVar(&debug, "debug", false, "run with support for debuggers")
flag.Parse()
ctx := context.Background()
upgradedSDKServer, err := tf5to6server.UpgradeServer(
ctx,
sdkprovider.Provider().GRPCProvider,
)
if err != nil {
log.Fatal(err)
}
providers := []func() tfprotov6.ProviderServer{
providerserver.NewProtocol6(provider.New(version)()),
func() tfprotov6.ProviderServer { return upgradedSDKServer },
}
muxServer, err := tf6muxserver.NewMuxServer(ctx, providers...)
if err != nil {
log.Fatal(err)
}
var serveOpts []tf6server.ServeOpt
if debug {
serveOpts = append(serveOpts, tf6server.WithManagedDebug())
}
err = tf6server.Serve("registry.terraform.io/example/examplecloud",
muxServer.ProviderServer, serveOpts...)
if err != nil {
log.Fatal(err)
}
}Mux requirements that bite in practice:
provider-level attributes, same types, same descriptions. Keep one source of truth for the provider configuration and mirror it.
plugins. Migration's final step is deleting the SDKv2 registration.
`"metadata": {"protocol_versions": ["6.0"]}` in `terraform-registry-manifest.json`.
The migrated resource must be indistinguishable to users. Prove it with tests that exist *before* the migration:
1. Ensure the resource has passing acceptance coverage: `_basic` with an import step (`ImportStateVerify: true`), `_disappears`, and per-attribute update tests. If coverage is missing, write it against the SDKv2 implementation first — these tests are the migration's acceptance criteria and must pass **unchanged** afterward. 2. Note behaviors tests don't capture: attribute defaults, what happens when optional attributes are omitted (null vs `""`/`0`/`false` is about to matter), and any `DiffSuppressFunc`/`StateFunc` normalization.
Translate schema and CRUD using the mapping table in `references/schema-mapping.md`. The rules that prevent breaking changes:
`block { ... }` syntax in user configs must become a Framework **Block** (`schema.ListNestedBlock`/`SetNestedBlock`) — converting it to
HashiCorp Agent Skills for Terraform and Packer. See SKILLS.md for the complete catalog and lifecycle status of each Skill. Legal note: Your use of a third-party MCP client or LLM is subject solely to that provider's terms.
Repo: hashicorp/agent-skills
Build Amazon Machine Images (AMIs) with Packer using the amazon-ebs builder. Use when creating custom AMIs for EC2 instances.
Build Azure managed images and Azure Compute Gallery images with Packer. Use when creating custom images for Azure VMs.
Push Packer build metadata to HCP Packer registry for tracking and managing image lifecycle. Use when integrating Packer builds with HCP Packer for version…
Build Windows images with Packer using WinRM communicator and PowerShell provisioners. Use when creating Windows AMIs, Azure images, or VMware templates.
Azure Verified Modules (AVM) requirements and best practices for developing certified Azure Terraform modules. Use when creating or reviewing Azure modules…
Use this when scaffolding a new Terraform provider with the Plugin Framework: workspace layout, go module setup, provider server main.go, and a provider.go…