provider-framework-migration
Migrate Terraform provider resources and data sources from Plugin SDKv2 to the Plugin Framework: muxing both plugins in one provider (terraform-plugin-mux…
Skill by hashicorpOfficial
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/hashicorp-provider-framework-migration
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: backend, devops, data, productivity
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/provider-framework-migration
What's inside
- Skill 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
- version: 0.0.1 · copyright: Copyright IBM Corp. 2026 · lifecycle-status: active
- Instructions
- 186 lines in SKILL.md · view on GitHub
Files (2)
- SKILL.md
- schema-mapping.md · references/
SKILL.md (first lines)
# Migrating from Plugin SDKv2 to the Plugin Framework
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):
- `references/schema-mapping.md` — the full SDKv2 → Framework translation
table with code pairs
Official guide: [Framework migration](https://developer.hashicorp.com/terraform/plugin/framework/migrating).
## Decide Whether to Migrate at All
Migration has real risk and little user-visible payoff, so triage first:
- **Do not migrate complex or heavily-used resources** without a driving
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.
- **Simple resources migrate safely**: flat schemas, no `DiffSuppressFunc`,
no `CustomizeDiff`, no `StateFunc`, no complex nested blocks.
- New capabilities never require migrating old code — mux and write the new
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.
## Step 1: Mux the Provider
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):
```go
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 schemas must match exactly** across both plugins — same
provider-level attributes, same types, same descriptions. Keep one source
of truth for the provider configuration and mirror it.
- **Each resource and data source may exist in only one** of the two
plugins. Migration's final step is deleting the SDKv2 registration.
- If publishing to the Registry with protocol 6, set
`"metadata": {"protocol_versions": ["6.0"]}` in
`terraform-registry-manifest.json`.
## Step 2: Baseline Before You Touch Anything
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 acceptanceFrom hashicorp/agent-skills, MPL-2.0.
More from hashicorp/agent-skills
- 0.820score
terraform-policy
hashicorpOfficial
Write, test, or convert Terraform Policy files (.policy.hcl, .policytest.hcl, Sentinel→tfpolicy).
SkillAFreshness: A★ 907Claude Code +9 - 0.777score
provider-test-patterns
hashicorpOfficial
Terraform provider acceptance test patterns using terraform-plugin-testing with the Plugin Framework.
SkillBFreshness: B★ 907Claude Code +9 - 0.777score
terraform-test
hashicorpOfficial
Comprehensive guide for writing and running Terraform tests.
SkillBFreshness: B★ 907Claude Code +9 - 0.777score
provider-configuration
hashicorpOfficial
Implement Terraform provider configuration and authentication with the Plugin Framework: provider schema for credentials (Optional + Sensitive attributes)…
SkillBFreshness: B★ 907Claude Code +9 - 0.777score
provider-docs
hashicorpOfficial
Create, update, and review Terraform provider documentation for Terraform Registry using HashiCorp-recommended patterns, tfplugindocs templates, and schema…
SkillBFreshness: B★ 907Claude Code +9 - 0.777score
terraform-search-import
hashicorpOfficial
Discover existing cloud resources using Terraform Search queries and bulk import them into Terraform management.
SkillBFreshness: B★ 907Claude Code +9 - 0.777score
terraform-stacks
hashicorpOfficial
Comprehensive guide for working with HashiCorp Terraform Stacks.
SkillBFreshness: B★ 907Claude Code +9 - 0.772score
push-to-registry
hashicorpOfficial
Push Packer build metadata to HCP Packer registry for tracking and managing image lifecycle.
SkillBFreshness: B★ 907Claude Code +9 - 0.772score
terraform-style-guide
hashicorpOfficial
Generate Terraform HCL code following HashiCorp's official style conventions and best practices.
SkillBFreshness: B★ 907Claude Code +9 - 0.772score
provider-ephemeral-resources
hashicorpOfficial
Implement Terraform provider ephemeral resources with the Plugin Framework: the Open/Renew/Close lifecycle, ephemeral schema design, registration via…
SkillBFreshness: B★ 907Claude Code +9 - 0.772score
run-acceptance-tests
hashicorpOfficial
Guide for running acceptance tests for a Terraform provider.
SkillBFreshness: B★ 907Claude Code +9 - 0.772score
windows-builder
hashicorpOfficial
Build Windows images with Packer using WinRM communicator and PowerShell provisioners.
SkillBFreshness: B★ 907Claude Code +9
Signals
- Stars
- 907
- Forks
- 134
- Open issues
- 12
- Last commit (this folder)
- Aug 10, 2026 (2 months ago)
- Last release
- Aug 4, 2026 (2 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- Version
- 0.0.1
- License
- MPL-2.0
- Repository
- github.com/hashicorp/agent-skills
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from hashicorp
- 0.821score
Terraform
hashicorpOfficial
Generate more accurate Terraform and automate workflows for HCP Terraform and Terraform Enterprise
ConnectorAFreshness: ALocal★ 1.6KClaude Code +5 - 0.820score
terraform-policy
hashicorpOfficial
Write, test, or convert Terraform Policy files (.policy.hcl, .policytest.hcl, Sentinel→tfpolicy).
SkillAFreshness: A★ 907Claude Code +9 - 0.777score
provider-test-patterns
hashicorpOfficial
Terraform provider acceptance test patterns using terraform-plugin-testing with the Plugin Framework.
SkillBFreshness: B★ 907Claude Code +9 - 0.777score
provider-docs
hashicorpOfficial
Create, update, and review Terraform provider documentation for Terraform Registry using HashiCorp-recommended patterns, tfplugindocs templates, and schema…
SkillBFreshness: B★ 907Claude Code +9 - 0.777score
terraform-stacks
hashicorpOfficial
Comprehensive guide for working with HashiCorp Terraform Stacks.
SkillBFreshness: B★ 907Claude Code +9 - 0.777score
provider-configuration
hashicorpOfficial
Implement Terraform provider configuration and authentication with the Plugin Framework: provider schema for credentials (Optional + Sensitive attributes)…
SkillBFreshness: B★ 907Claude Code +9
Cite this page
provider-framework-migration skill. Agent Mart. https://agentmart.dev/skills/hashicorp-provider-framework-migration (last updated 2026-10-24)