feat: update to terraform plugin framework#141
Merged
fabiomatavelli-f3 merged 4 commits intomasterfrom Feb 11, 2026
Merged
Conversation
08b2346 to
6970589
Compare
6970589 to
9a6e8c2
Compare
stevo-f3
previously approved these changes
Feb 11, 2026
stevo-f3
approved these changes
Feb 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Migrate the provider from the deprecated
terraform-plugin-sdk(v1) to the modernterraform-plugin-framework.Motivation
Dependabot attempted to update
github.com/hashicorp/go-getterto v1.7.9 (#68), which transitively pulled ingithub.com/spf13/aferov1.9.2. The neweraferoversion added aChownmethod to theafero.Fsinterface, but theterraform-plugin-sdkv1 internally vendors asnapshotFStype that does not implement this new method — causing a compile-time error:Since
terraform-plugin-sdkv1 is unmaintained and will never receive a fix, the proper solution is to migrate to theterraform-plugin-framework, which does not depend onaferoat all.Changes
Source files
main.go— Usesproviderserver.Serve()from the frameworkgithubfile/provider.go— Rewritten using theprovider.Providerinterface (Metadata,Schema,Configure,Resources,DataSources)githubfile/resource_file.go— Rewritten using theresource.Resourceinterface (Create,Read,Update,Delete,ImportState) with extracted testable business logic functionsgithubfile/structure_file.go— Simplified to thefilestruct andparseFileIDhelpergithubfile/provider_test.go— Updated to useproviderserver.NewProtocol6WithErrorandtfprotov6githubfile/resource_file_test.go— Updated to useProtoV6ProviderFactoriesand framework-compatible testingDependencies
terraform-plugin-framework,terraform-plugin-go,terraform-plugin-testingterraform-plugin-sdkv1 (direct),terraform-provider-github/v5(direct),afero,go-getter, and ~1M lines of vendored codevendor/directory (no longer needed)Behavioral notes
owner/repo:branch:pathForceNewbehavior preserved viastringplanmodifier.RequiresReplace()GITHUB_TOKEN,GITHUB_EMAIL, etc.) are preservedSupersedes
This PR supersedes #68 (Dependabot
go-getterbump) by removing the dependency entirely.