Accepted
2026-02-01 (retroactive documentation)
The terraform-provider-proxmox codebase contains resources implemented using two different Terraform provider development frameworks:
- Terraform Plugin SDKv2 (legacy) - Resources in
proxmoxtf/resource/ - Terraform Plugin Framework (current) - Resources in
fwprovider/
HashiCorp has declared SDKv2 to be in maintenance mode, with the Plugin Framework being the recommended approach for new provider development. The Plugin Framework offers several advantages:
- Better type safety with Go generics
- Cleaner separation of schema, model, and CRUD logic
- Native support for Protocol 6
- Improved plan modification capabilities
- Better support for complex nested attributes
The provider currently uses a multiplexer (tf6muxserver) to serve both SDKv2 and Framework resources from a single binary, allowing gradual migration.
All new resources and data sources MUST be implemented using the Terraform Plugin Framework.
This includes:
- New Proxmox functionality (e.g., new SDN features, new API endpoints)
- Resources requested by the community
- Any resource not currently implemented
SDKv2 may still be used for:
- Bug fixes to existing SDKv2 resources (until they are migrated)
- Enhancements to existing SDKv2 resources (until they are migrated)
- Backports of critical fixes
The following SDKv2 resources are prioritized for migration to Plugin Framework:
- VM (
proxmoxtf/resource/vm) - Container (
proxmoxtf/resource/container)
- New code follows modern patterns and is easier to maintain
- Contributors learn one framework, not two
- Prepares codebase for v1.0 release
- Better alignment with Terraform ecosystem direction
- Contributors familiar only with SDKv2 need to learn Framework
- Some patterns differ between Framework and SDK, causing potential confusion
- Migration of existing resources requires effort
- File Location: New resources go in
fwprovider/directory, organized by domain - File Pattern: 3-file structure per resource — see ADR-003
- Tests: Acceptance tests colocated with resource; shared test utilities in
fwprovider/test/ - Registration: Resources are registered in
fwprovider/provider.goviaResources()andDataSources()methods - Client Access: Use
config.Resourceorconfig.DataSourcefrom configure methods - Reference Examples: See reference-examples.md for annotated walkthroughs
- Adding new resources in
proxmoxtf/(SDKv2) instead offwprovider/(Framework). - Importing
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schemain new code — usegithub.com/hashicorp/terraform-plugin-framework/resource/schemainstead.
- Terraform Plugin Framework documentation
- Migration guide
- ADR-002: API Client Structure — domain client hierarchy
- ADR-003: Resource File Organization — file naming and placement
- ADR-004: Schema Design Conventions — attributes, validators, model conversion
- ADR-005: Error Handling — error message format and sentinel errors
- ADR-006: Testing Requirements — acceptance test structure
- Reference Examples — annotated walkthroughs