diff --git a/internal/proto5server/server_listresource.go b/internal/proto5server/server_listresource.go index a817f20e5..ee91717b2 100644 --- a/internal/proto5server/server_listresource.go +++ b/internal/proto5server/server_listresource.go @@ -9,6 +9,7 @@ import ( "github.com/hashicorp/terraform-plugin-framework/diag" "github.com/hashicorp/terraform-plugin-framework/internal/fromproto5" "github.com/hashicorp/terraform-plugin-framework/internal/fwserver" + "github.com/hashicorp/terraform-plugin-framework/internal/logging" "github.com/hashicorp/terraform-plugin-framework/internal/toproto5" "github.com/hashicorp/terraform-plugin-framework/list" "github.com/hashicorp/terraform-plugin-go/tfprotov5" @@ -27,6 +28,9 @@ func ListRequestErrorDiagnostics(ctx context.Context, diags ...diag.Diagnostic) } func (s *Server) ListResource(ctx context.Context, protoReq *tfprotov5.ListResourceRequest) (*tfprotov5.ListResourceServerStream, error) { + ctx = s.registerContext(ctx) + ctx = logging.InitContext(ctx) + protoStream := &tfprotov5.ListResourceServerStream{Results: tfprotov5.NoListResults} allDiags := diag.Diagnostics{} diff --git a/internal/proto5server/server_validatelistresourceconfig.go b/internal/proto5server/server_validatelistresourceconfig.go index a54b10b1d..fef62b7df 100644 --- a/internal/proto5server/server_validatelistresourceconfig.go +++ b/internal/proto5server/server_validatelistresourceconfig.go @@ -8,6 +8,7 @@ import ( "github.com/hashicorp/terraform-plugin-framework/internal/fromproto5" "github.com/hashicorp/terraform-plugin-framework/internal/fwserver" + "github.com/hashicorp/terraform-plugin-framework/internal/logging" "github.com/hashicorp/terraform-plugin-framework/internal/toproto5" "github.com/hashicorp/terraform-plugin-go/tfprotov5" ) @@ -15,6 +16,7 @@ import ( // ValidateListResourceConfig satisfies the tfprotov5.ProviderServer interface. func (s *Server) ValidateListResourceConfig(ctx context.Context, proto5Req *tfprotov5.ValidateListResourceConfigRequest) (*tfprotov5.ValidateListResourceConfigResponse, error) { ctx = s.registerContext(ctx) + ctx = logging.InitContext(ctx) fwResp := &fwserver.ValidateListResourceConfigResponse{} diff --git a/internal/proto6server/server_listresource.go b/internal/proto6server/server_listresource.go index 53512effb..e8825afaf 100644 --- a/internal/proto6server/server_listresource.go +++ b/internal/proto6server/server_listresource.go @@ -9,6 +9,7 @@ import ( "github.com/hashicorp/terraform-plugin-framework/diag" "github.com/hashicorp/terraform-plugin-framework/internal/fromproto6" "github.com/hashicorp/terraform-plugin-framework/internal/fwserver" + "github.com/hashicorp/terraform-plugin-framework/internal/logging" "github.com/hashicorp/terraform-plugin-framework/internal/toproto6" "github.com/hashicorp/terraform-plugin-framework/list" "github.com/hashicorp/terraform-plugin-go/tfprotov6" @@ -27,6 +28,9 @@ func ListRequestErrorDiagnostics(ctx context.Context, diags ...diag.Diagnostic) } func (s *Server) ListResource(ctx context.Context, protoReq *tfprotov6.ListResourceRequest) (*tfprotov6.ListResourceServerStream, error) { + ctx = s.registerContext(ctx) + ctx = logging.InitContext(ctx) + protoStream := &tfprotov6.ListResourceServerStream{Results: tfprotov6.NoListResults} allDiags := diag.Diagnostics{} diff --git a/internal/proto6server/server_validatelistresourceconfig.go b/internal/proto6server/server_validatelistresourceconfig.go index 8262756fc..f20404a4f 100644 --- a/internal/proto6server/server_validatelistresourceconfig.go +++ b/internal/proto6server/server_validatelistresourceconfig.go @@ -5,8 +5,10 @@ package proto6server import ( "context" + "github.com/hashicorp/terraform-plugin-framework/internal/fromproto6" "github.com/hashicorp/terraform-plugin-framework/internal/fwserver" + "github.com/hashicorp/terraform-plugin-framework/internal/logging" "github.com/hashicorp/terraform-plugin-framework/internal/toproto6" "github.com/hashicorp/terraform-plugin-go/tfprotov6" ) @@ -14,6 +16,7 @@ import ( // ValidateListResourceConfig satisfies the tfprotov6.ProviderServer interface. func (s *Server) ValidateListResourceConfig(ctx context.Context, proto6Req *tfprotov6.ValidateListResourceConfigRequest) (*tfprotov6.ValidateListResourceConfigResponse, error) { ctx = s.registerContext(ctx) + ctx = logging.InitContext(ctx) fwResp := &fwserver.ValidateListResourceConfigResponse{}