From a7e3339e2d35e70dab9ae2a55f6950cc1b614142 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Thu, 24 Aug 2023 15:28:51 -0400 Subject: [PATCH] internal/grpcwrap: Ensure GetProviderSchemaOptional server capability is passed through (#33742) Reference: https://github.com/hashicorp/terraform/blob/7094517089e9a01d9aa94838f583898549e5a6de/internal/grpcwrap/provider6.go#L72 The server capability is passed through with version 6, but not version 5. --- internal/grpcwrap/provider.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/grpcwrap/provider.go b/internal/grpcwrap/provider.go index 60d749889e..72658f3807 100644 --- a/internal/grpcwrap/provider.go +++ b/internal/grpcwrap/provider.go @@ -69,7 +69,8 @@ func (p *provider) GetSchema(_ context.Context, req *tfplugin5.GetProviderSchema } resp.ServerCapabilities = &tfplugin5.ServerCapabilities{ - PlanDestroy: p.schema.ServerCapabilities.PlanDestroy, + GetProviderSchemaOptional: p.schema.ServerCapabilities.GetProviderSchemaOptional, + PlanDestroy: p.schema.ServerCapabilities.PlanDestroy, } // include any diagnostics from the original GetSchema call