From 99a33b67f3a05eb9c8fe183ad3e97455cf102803 Mon Sep 17 00:00:00 2001 From: John Houston Date: Thu, 4 Jan 2024 11:16:46 -0500 Subject: [PATCH] Implement GetMetadata protocol function in manifest provider (#2384) --- .changelog/2384.txt | 3 +++ manifest/provider/server.go | 15 ++++++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 .changelog/2384.txt diff --git a/.changelog/2384.txt b/.changelog/2384.txt new file mode 100644 index 0000000000..5e1f7fa4ef --- /dev/null +++ b/.changelog/2384.txt @@ -0,0 +1,3 @@ +```release-note:bug +`kubernetes_manifest`: Implement response for GetMetadata protocol function +``` diff --git a/manifest/provider/server.go b/manifest/provider/server.go index f2d9ba1f1f..69560e9d48 100644 --- a/manifest/provider/server.go +++ b/manifest/provider/server.go @@ -54,7 +54,20 @@ func (s *RawProviderServer) PrepareProviderConfig(ctx context.Context, req *tfpr // GetMetadata function func (s *RawProviderServer) GetMetadata(ctx context.Context, req *tfprotov5.GetMetadataRequest) (*tfprotov5.GetMetadataResponse, error) { s.logger.Trace("[GetMetadata][Request]\n%s\n", dump(*req)) - resp := &tfprotov5.GetMetadataResponse{} + + resp := &tfprotov5.GetMetadataResponse{ + Resources: []tfprotov5.ResourceMetadata{{ + TypeName: "kubernetes_manifest", + }}, + DataSources: []tfprotov5.DataSourceMetadata{ + { + TypeName: "kubernetes_resource", + }, + { + TypeName: "kubernetes_resources", + }, + }, + } return resp, nil }