Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump github.com/hashicorp/terraform-plugin-framework from 0.10.0 to 0.11.0 #9

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.19
require (
github.com/go-git/go-git/v5 v5.4.2
github.com/hashicorp/terraform-plugin-docs v0.13.0
github.com/hashicorp/terraform-plugin-framework v0.10.0
github.com/hashicorp/terraform-plugin-framework v0.11.0
github.com/hashicorp/terraform-plugin-framework-validators v0.4.0
github.com/hashicorp/terraform-plugin-go v0.13.0
github.com/hashicorp/terraform-plugin-log v0.7.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,8 @@ github.com/hashicorp/terraform-json v0.14.0 h1:sh9iZ1Y8IFJLx+xQiKHGud6/TSUCM0N8e
github.com/hashicorp/terraform-json v0.14.0/go.mod h1:5A9HIWPkk4e5aeeXIBbkcOvaZbIYnAIkEyqP2pNSckM=
github.com/hashicorp/terraform-plugin-docs v0.13.0 h1:6e+VIWsVGb6jYJewfzq2ok2smPzZrt1Wlm9koLeKazY=
github.com/hashicorp/terraform-plugin-docs v0.13.0/go.mod h1:W0oCmHAjIlTHBbvtppWHe8fLfZ2BznQbuv8+UD8OucQ=
github.com/hashicorp/terraform-plugin-framework v0.10.0 h1:LGYcnvNdVaZA1ZHe53BHLVjaaGs7HTiq6+9Js29stL4=
github.com/hashicorp/terraform-plugin-framework v0.10.0/go.mod h1:CK7Opzukfu/2CPJs+HzUdfHrFlp+ZIQeSxjF0x8k464=
github.com/hashicorp/terraform-plugin-framework v0.11.0 h1:NLWMUMNp0HjCjJctNzEv3FJsR/ndYTSbO9XfwlSVFeQ=
github.com/hashicorp/terraform-plugin-framework v0.11.0/go.mod h1:gVjHP7o0QzWpHe5dvA+GUu+mH0/vQDZeexkkq2RS/II=
github.com/hashicorp/terraform-plugin-framework-validators v0.4.0 h1:GVX4gDFdtFZi/E4DjvPmRDf5zBLFAHi8M7Qzehgov+Q=
github.com/hashicorp/terraform-plugin-framework-validators v0.4.0/go.mod h1:hkGjFzftzT/HRe1It0e8//tGZ3j18PedTq4hHS8NJ/Q=
github.com/hashicorp/terraform-plugin-go v0.13.0 h1:Zm+o91HUOcTLotaEu3X2jV/6wNi6f09gkZwGg/MDvCk=
Expand Down
2 changes: 1 addition & 1 deletion internal/provider/common_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"time"
)

func protoV6ProviderFactories() map[string]func() (tfprotov6.ProviderServer, error) {
func testProviderFactories() map[string]func() (tfprotov6.ProviderServer, error) {
return map[string]func() (tfprotov6.ProviderServer, error){
"git": providerserver.NewProtocol6WithError(provider.New()),
}
Expand Down
6 changes: 4 additions & 2 deletions internal/provider/data_source_git_branch.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ import (
"context"
"github.com/go-git/go-git/v5/plumbing"
"github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator"
"github.com/hashicorp/terraform-plugin-framework/datasource"
"github.com/hashicorp/terraform-plugin-framework/diag"
"github.com/hashicorp/terraform-plugin-framework/provider"
"github.com/hashicorp/terraform-plugin-framework/tfsdk"
"github.com/hashicorp/terraform-plugin-framework/types"
"github.com/hashicorp/terraform-plugin-log/tflog"
Expand Down Expand Up @@ -76,13 +78,13 @@ func (r *dataSourceGitBranchType) GetSchema(_ context.Context) (tfsdk.Schema, di
}, nil
}

func (r *dataSourceGitBranchType) NewDataSource(_ context.Context, p tfsdk.Provider) (tfsdk.DataSource, diag.Diagnostics) {
func (r *dataSourceGitBranchType) NewDataSource(_ context.Context, p provider.Provider) (datasource.DataSource, diag.Diagnostics) {
return &dataSourceGitBranch{
p: *(p.(*gitProvider)),
}, nil
}

func (r *dataSourceGitBranch) Read(ctx context.Context, req tfsdk.ReadDataSourceRequest, resp *tfsdk.ReadDataSourceResponse) {
func (r *dataSourceGitBranch) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse) {
tflog.Debug(ctx, "Reading Git repository branch")

var inputs dataSourceGitBranchSchema
Expand Down
10 changes: 5 additions & 5 deletions internal/provider/data_source_git_branch_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func TestDataSourceGitBranch(t *testing.T) {
})

resource.UnitTest(t, resource.TestCase{
ProtoV6ProviderFactories: protoV6ProviderFactories(),
ProtoV6ProviderFactories: testProviderFactories(),
Steps: []resource.TestStep{
{
Config: fmt.Sprintf(`
Expand All @@ -54,7 +54,7 @@ func TestDataSourceGitBranch(t *testing.T) {
func TestDataSourceGitBranch_InvalidRepository(t *testing.T) {
t.Parallel()
resource.UnitTest(t, resource.TestCase{
ProtoV6ProviderFactories: protoV6ProviderFactories(),
ProtoV6ProviderFactories: testProviderFactories(),
Steps: []resource.TestStep{
{
Config: `
Expand All @@ -75,7 +75,7 @@ func TestDataSourceGitBranch_InvalidBranch(t *testing.T) {
defer os.RemoveAll(directory)

resource.UnitTest(t, resource.TestCase{
ProtoV6ProviderFactories: protoV6ProviderFactories(),
ProtoV6ProviderFactories: testProviderFactories(),
Steps: []resource.TestStep{
{
Config: fmt.Sprintf(`
Expand All @@ -96,7 +96,7 @@ func TestDataSourceGitBranch_MissingBranch(t *testing.T) {
defer os.RemoveAll(directory)

resource.UnitTest(t, resource.TestCase{
ProtoV6ProviderFactories: protoV6ProviderFactories(),
ProtoV6ProviderFactories: testProviderFactories(),
Steps: []resource.TestStep{
{
Config: fmt.Sprintf(`
Expand All @@ -113,7 +113,7 @@ func TestDataSourceGitBranch_MissingBranch(t *testing.T) {
func TestDataSourceGitBranch_MissingRepository(t *testing.T) {
t.Parallel()
resource.UnitTest(t, resource.TestCase{
ProtoV6ProviderFactories: protoV6ProviderFactories(),
ProtoV6ProviderFactories: testProviderFactories(),
Steps: []resource.TestStep{
{
Config: `
Expand Down
6 changes: 4 additions & 2 deletions internal/provider/data_source_git_branches.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ import (
"github.com/go-git/go-git/v5/plumbing"
"github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator"
"github.com/hashicorp/terraform-plugin-framework/attr"
"github.com/hashicorp/terraform-plugin-framework/datasource"
"github.com/hashicorp/terraform-plugin-framework/diag"
"github.com/hashicorp/terraform-plugin-framework/provider"
"github.com/hashicorp/terraform-plugin-framework/tfsdk"
"github.com/hashicorp/terraform-plugin-framework/types"
"github.com/hashicorp/terraform-plugin-log/tflog"
Expand Down Expand Up @@ -73,13 +75,13 @@ func (r *dataSourceGitBranchesType) GetSchema(_ context.Context) (tfsdk.Schema,
}, nil
}

func (r *dataSourceGitBranchesType) NewDataSource(_ context.Context, p tfsdk.Provider) (tfsdk.DataSource, diag.Diagnostics) {
func (r *dataSourceGitBranchesType) NewDataSource(_ context.Context, p provider.Provider) (datasource.DataSource, diag.Diagnostics) {
return &dataSourceGitBranches{
p: *(p.(*gitProvider)),
}, nil
}

func (r *dataSourceGitBranches) Read(ctx context.Context, req tfsdk.ReadDataSourceRequest, resp *tfsdk.ReadDataSourceResponse) {
func (r *dataSourceGitBranches) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse) {
tflog.Debug(ctx, "Reading Git repository branches")

var inputs dataSourceGitBranchesSchema
Expand Down
6 changes: 3 additions & 3 deletions internal/provider/data_source_git_branches_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func TestDataSourceGitBranches(t *testing.T) {
testAddAndCommitNewFile(t, worktree, "some-file")

resource.UnitTest(t, resource.TestCase{
ProtoV6ProviderFactories: protoV6ProviderFactories(),
ProtoV6ProviderFactories: testProviderFactories(),
Steps: []resource.TestStep{
{
Config: fmt.Sprintf(`
Expand All @@ -47,7 +47,7 @@ func TestDataSourceGitBranches(t *testing.T) {
func TestDataSourceGitBranches_InvalidRepository(t *testing.T) {
t.Parallel()
resource.UnitTest(t, resource.TestCase{
ProtoV6ProviderFactories: protoV6ProviderFactories(),
ProtoV6ProviderFactories: testProviderFactories(),
Steps: []resource.TestStep{
{
Config: `
Expand All @@ -64,7 +64,7 @@ func TestDataSourceGitBranches_InvalidRepository(t *testing.T) {
func TestDataSourceGitBranches_MissingRepository(t *testing.T) {
t.Parallel()
resource.UnitTest(t, resource.TestCase{
ProtoV6ProviderFactories: protoV6ProviderFactories(),
ProtoV6ProviderFactories: testProviderFactories(),
Steps: []resource.TestStep{
{
Config: `
Expand Down
6 changes: 4 additions & 2 deletions internal/provider/data_source_git_commit.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ import (
"context"
"github.com/go-git/go-git/v5/plumbing"
"github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator"
"github.com/hashicorp/terraform-plugin-framework/datasource"
"github.com/hashicorp/terraform-plugin-framework/diag"
"github.com/hashicorp/terraform-plugin-framework/provider"
"github.com/hashicorp/terraform-plugin-framework/tfsdk"
"github.com/hashicorp/terraform-plugin-framework/types"
"github.com/hashicorp/terraform-plugin-log/tflog"
Expand Down Expand Up @@ -120,13 +122,13 @@ func (r *dataSourceGitCommitType) GetSchema(_ context.Context) (tfsdk.Schema, di
}, nil
}

func (r *dataSourceGitCommitType) NewDataSource(_ context.Context, p tfsdk.Provider) (tfsdk.DataSource, diag.Diagnostics) {
func (r *dataSourceGitCommitType) NewDataSource(_ context.Context, p provider.Provider) (datasource.DataSource, diag.Diagnostics) {
return &dataSourceGitCommit{
p: *(p.(*gitProvider)),
}, nil
}

func (r *dataSourceGitCommit) Read(ctx context.Context, req tfsdk.ReadDataSourceRequest, resp *tfsdk.ReadDataSourceResponse) {
func (r *dataSourceGitCommit) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse) {
tflog.Debug(ctx, "Reading Git commit information")

var inputs dataSourceGitCommitSchema
Expand Down
2 changes: 1 addition & 1 deletion internal/provider/data_source_git_commit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func TestDataSourceGitCommit(t *testing.T) {
commit := testGitCommit(t, worktree)

resource.UnitTest(t, resource.TestCase{
ProtoV6ProviderFactories: protoV6ProviderFactories(),
ProtoV6ProviderFactories: testProviderFactories(),
Steps: []resource.TestStep{
{
Config: fmt.Sprintf(`
Expand Down
6 changes: 4 additions & 2 deletions internal/provider/data_source_git_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ package provider
import (
"context"
"github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator"
"github.com/hashicorp/terraform-plugin-framework/datasource"
"github.com/hashicorp/terraform-plugin-framework/diag"
"github.com/hashicorp/terraform-plugin-framework/provider"
"github.com/hashicorp/terraform-plugin-framework/tfsdk"
"github.com/hashicorp/terraform-plugin-framework/types"
"github.com/hashicorp/terraform-plugin-log/tflog"
Expand Down Expand Up @@ -102,13 +104,13 @@ func (r *dataSourceGitConfigType) GetSchema(_ context.Context) (tfsdk.Schema, di
}, nil
}

func (r *dataSourceGitConfigType) NewDataSource(_ context.Context, p tfsdk.Provider) (tfsdk.DataSource, diag.Diagnostics) {
func (r *dataSourceGitConfigType) NewDataSource(_ context.Context, p provider.Provider) (datasource.DataSource, diag.Diagnostics) {
return &dataSourceGitConfig{
p: *(p.(*gitProvider)),
}, nil
}

func (r *dataSourceGitConfig) Read(ctx context.Context, req tfsdk.ReadDataSourceRequest, resp *tfsdk.ReadDataSourceResponse) {
func (r *dataSourceGitConfig) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse) {
tflog.Debug(ctx, "Reading Git repository configuration")

var inputs dataSourceGitConfigSchema
Expand Down
14 changes: 7 additions & 7 deletions internal/provider/data_source_git_config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func TestDataSourceGitConfig(t *testing.T) {
cfg := testConfig(t, repository)

resource.UnitTest(t, resource.TestCase{
ProtoV6ProviderFactories: protoV6ProviderFactories(),
ProtoV6ProviderFactories: testProviderFactories(),
Steps: []resource.TestStep{
{
Config: fmt.Sprintf(`
Expand All @@ -49,7 +49,7 @@ func TestDataSourceGitConfig(t *testing.T) {
func TestDataSourceGitConfig_InvalidRepository(t *testing.T) {
t.Parallel()
resource.UnitTest(t, resource.TestCase{
ProtoV6ProviderFactories: protoV6ProviderFactories(),
ProtoV6ProviderFactories: testProviderFactories(),
Steps: []resource.TestStep{
{
Config: `
Expand All @@ -69,7 +69,7 @@ func TestDataSourceGitConfig_InvalidScope(t *testing.T) {
defer os.RemoveAll(directory)

resource.UnitTest(t, resource.TestCase{
ProtoV6ProviderFactories: protoV6ProviderFactories(),
ProtoV6ProviderFactories: testProviderFactories(),
Steps: []resource.TestStep{
{
Config: fmt.Sprintf(`
Expand All @@ -91,7 +91,7 @@ func TestDataSourceGitConfig_ScopeLocal(t *testing.T) {
cfg := testConfig(t, repository)

resource.UnitTest(t, resource.TestCase{
ProtoV6ProviderFactories: protoV6ProviderFactories(),
ProtoV6ProviderFactories: testProviderFactories(),
Steps: []resource.TestStep{
{
Config: fmt.Sprintf(`
Expand Down Expand Up @@ -123,7 +123,7 @@ func TestDataSourceGitConfig_ScopeGlobal(t *testing.T) {
cfg := testConfig(t, repository)

resource.UnitTest(t, resource.TestCase{
ProtoV6ProviderFactories: protoV6ProviderFactories(),
ProtoV6ProviderFactories: testProviderFactories(),
Steps: []resource.TestStep{
{
Config: fmt.Sprintf(`
Expand Down Expand Up @@ -155,7 +155,7 @@ func TestDataSourceGitConfig_ScopeSystem(t *testing.T) {
cfg := testConfig(t, repository)

resource.UnitTest(t, resource.TestCase{
ProtoV6ProviderFactories: protoV6ProviderFactories(),
ProtoV6ProviderFactories: testProviderFactories(),
Steps: []resource.TestStep{
{
Config: fmt.Sprintf(`
Expand Down Expand Up @@ -183,7 +183,7 @@ func TestDataSourceGitConfig_ScopeSystem(t *testing.T) {
func TestDataSourceGitConfig_MissingRepository(t *testing.T) {
t.Parallel()
resource.UnitTest(t, resource.TestCase{
ProtoV6ProviderFactories: protoV6ProviderFactories(),
ProtoV6ProviderFactories: testProviderFactories(),
Steps: []resource.TestStep{
{
Config: `
Expand Down
6 changes: 4 additions & 2 deletions internal/provider/data_source_git_remote.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ package provider
import (
"context"
"github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator"
"github.com/hashicorp/terraform-plugin-framework/datasource"
"github.com/hashicorp/terraform-plugin-framework/diag"
"github.com/hashicorp/terraform-plugin-framework/provider"
"github.com/hashicorp/terraform-plugin-framework/tfsdk"
"github.com/hashicorp/terraform-plugin-framework/types"
"github.com/hashicorp/terraform-plugin-log/tflog"
Expand Down Expand Up @@ -65,13 +67,13 @@ func (r *dataSourceGitRemoteType) GetSchema(_ context.Context) (tfsdk.Schema, di
}, nil
}

func (r *dataSourceGitRemoteType) NewDataSource(_ context.Context, p tfsdk.Provider) (tfsdk.DataSource, diag.Diagnostics) {
func (r *dataSourceGitRemoteType) NewDataSource(_ context.Context, p provider.Provider) (datasource.DataSource, diag.Diagnostics) {
return &dataSourceGitRemote{
p: *(p.(*gitProvider)),
}, nil
}

func (r *dataSourceGitRemote) Read(ctx context.Context, req tfsdk.ReadDataSourceRequest, resp *tfsdk.ReadDataSourceResponse) {
func (r *dataSourceGitRemote) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse) {
tflog.Debug(ctx, "Reading Git repository remote")

var inputs dataSourceGitRemoteSchema
Expand Down
10 changes: 5 additions & 5 deletions internal/provider/data_source_git_remote_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func TestDataSourceGitRemote(t *testing.T) {
testCreateRemote(t, repository, remote)

resource.UnitTest(t, resource.TestCase{
ProtoV6ProviderFactories: protoV6ProviderFactories(),
ProtoV6ProviderFactories: testProviderFactories(),
Steps: []resource.TestStep{
{
Config: fmt.Sprintf(`
Expand All @@ -46,7 +46,7 @@ func TestDataSourceGitRemote(t *testing.T) {
func TestDataSourceGitRemote_InvalidRepository(t *testing.T) {
t.Parallel()
resource.UnitTest(t, resource.TestCase{
ProtoV6ProviderFactories: protoV6ProviderFactories(),
ProtoV6ProviderFactories: testProviderFactories(),
Steps: []resource.TestStep{
{
Config: `
Expand All @@ -67,7 +67,7 @@ func TestDataSourceGitRemote_InvalidRemote(t *testing.T) {
defer os.RemoveAll(directory)

resource.UnitTest(t, resource.TestCase{
ProtoV6ProviderFactories: protoV6ProviderFactories(),
ProtoV6ProviderFactories: testProviderFactories(),
Steps: []resource.TestStep{
{
Config: fmt.Sprintf(`
Expand All @@ -88,7 +88,7 @@ func TestDataSourceGitRemote_MissingRemote(t *testing.T) {
defer os.RemoveAll(directory)

resource.UnitTest(t, resource.TestCase{
ProtoV6ProviderFactories: protoV6ProviderFactories(),
ProtoV6ProviderFactories: testProviderFactories(),
Steps: []resource.TestStep{
{
Config: fmt.Sprintf(`
Expand All @@ -105,7 +105,7 @@ func TestDataSourceGitRemote_MissingRemote(t *testing.T) {
func TestDataSourceGitRemote_MissingRepository(t *testing.T) {
t.Parallel()
resource.UnitTest(t, resource.TestCase{
ProtoV6ProviderFactories: protoV6ProviderFactories(),
ProtoV6ProviderFactories: testProviderFactories(),
Steps: []resource.TestStep{
{
Config: `
Expand Down
6 changes: 4 additions & 2 deletions internal/provider/data_source_git_remotes.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ import (
"context"
"github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator"
"github.com/hashicorp/terraform-plugin-framework/attr"
"github.com/hashicorp/terraform-plugin-framework/datasource"
"github.com/hashicorp/terraform-plugin-framework/diag"
"github.com/hashicorp/terraform-plugin-framework/provider"
"github.com/hashicorp/terraform-plugin-framework/tfsdk"
"github.com/hashicorp/terraform-plugin-framework/types"
"github.com/hashicorp/terraform-plugin-log/tflog"
Expand Down Expand Up @@ -63,13 +65,13 @@ func (r *dataSourceGitRemotesType) GetSchema(_ context.Context) (tfsdk.Schema, d
}, nil
}

func (r *dataSourceGitRemotesType) NewDataSource(_ context.Context, p tfsdk.Provider) (tfsdk.DataSource, diag.Diagnostics) {
func (r *dataSourceGitRemotesType) NewDataSource(_ context.Context, p provider.Provider) (datasource.DataSource, diag.Diagnostics) {
return &dataSourceGitRemotes{
p: *(p.(*gitProvider)),
}, nil
}

func (r *dataSourceGitRemotes) Read(ctx context.Context, req tfsdk.ReadDataSourceRequest, resp *tfsdk.ReadDataSourceResponse) {
func (r *dataSourceGitRemotes) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse) {
tflog.Debug(ctx, "Reading Git repository remotes")

var inputs dataSourceGitRemotesSchema
Expand Down
Loading