Skip to content

Commit 99a33b6

Browse files
authored
Implement GetMetadata protocol function in manifest provider (#2384)
1 parent 91c8a2b commit 99a33b6

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

.changelog/2384.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:bug
2+
`kubernetes_manifest`: Implement response for GetMetadata protocol function
3+
```

manifest/provider/server.go

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,20 @@ func (s *RawProviderServer) PrepareProviderConfig(ctx context.Context, req *tfpr
5454
// GetMetadata function
5555
func (s *RawProviderServer) GetMetadata(ctx context.Context, req *tfprotov5.GetMetadataRequest) (*tfprotov5.GetMetadataResponse, error) {
5656
s.logger.Trace("[GetMetadata][Request]\n%s\n", dump(*req))
57-
resp := &tfprotov5.GetMetadataResponse{}
57+
58+
resp := &tfprotov5.GetMetadataResponse{
59+
Resources: []tfprotov5.ResourceMetadata{{
60+
TypeName: "kubernetes_manifest",
61+
}},
62+
DataSources: []tfprotov5.DataSourceMetadata{
63+
{
64+
TypeName: "kubernetes_resource",
65+
},
66+
{
67+
TypeName: "kubernetes_resources",
68+
},
69+
},
70+
}
5871
return resp, nil
5972
}
6073

0 commit comments

Comments
 (0)