Skip to content

Commit 0c51a41

Browse files
authored
Revert "Add protobuf support for list messages and rpcs (#512)" (#515)
This reverts commit f412d39.
1 parent f412d39 commit 0c51a41

File tree

8 files changed

+751
-1838
lines changed

8 files changed

+751
-1838
lines changed

tfprotov5/internal/tfplugin5/tfplugin5.pb.go

Lines changed: 384 additions & 798 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tfprotov5/internal/tfplugin5/tfplugin5.proto

Lines changed: 2 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
// Copyright (c) HashiCorp, Inc.
22
// SPDX-License-Identifier: MPL-2.0
33

4-
// Terraform Plugin RPC protocol version 5.10
4+
// Terraform Plugin RPC protocol version 5.9
55
//
6-
// This file defines version 5.10 of the RPC protocol. To implement a plugin
6+
// This file defines version 5.9 of the RPC protocol. To implement a plugin
77
// against this protocol, copy this definition into your own codebase and
88
// use protoc to generate stubs for your target language.
99
//
@@ -349,10 +349,6 @@ service Provider {
349349
rpc RenewEphemeralResource(RenewEphemeralResource.Request) returns (RenewEphemeralResource.Response);
350350
rpc CloseEphemeralResource(CloseEphemeralResource.Request) returns (CloseEphemeralResource.Response);
351351

352-
/////// List
353-
rpc ListResource(ListResource.Request) returns (stream ListResource.Event);
354-
rpc ValidateListResourceConfig(ValidateListResourceConfig.Request) returns (ValidateListResourceConfig.Response);
355-
356352
// Functions
357353

358354
// GetFunctions returns the definitions of all functions.
@@ -379,7 +375,6 @@ message GetMetadata {
379375
// functions returns metadata for any functions.
380376
repeated FunctionMetadata functions = 5;
381377
repeated EphemeralResourceMetadata ephemeral_resources = 6;
382-
repeated ListResourceMetadata list_resources = 7;
383378
}
384379

385380
message FunctionMetadata {
@@ -398,10 +393,6 @@ message GetMetadata {
398393
message EphemeralResourceMetadata {
399394
string type_name = 1;
400395
}
401-
402-
message ListResourceMetadata {
403-
string type_name = 1;
404-
}
405396
}
406397

407398
message GetProviderSchema {
@@ -418,7 +409,6 @@ message GetProviderSchema {
418409
// functions is a mapping of function names to definitions.
419410
map<string, Function> functions = 7;
420411
map<string, Schema> ephemeral_resource_schemas = 8;
421-
map<string, Schema> list_resource_schemas = 9;
422412
}
423413
}
424414

@@ -834,41 +824,3 @@ message UpgradeResourceIdentity {
834824
repeated Diagnostic diagnostics = 2;
835825
}
836826
}
837-
838-
message ListResource {
839-
message Request {
840-
// type_name is the list resource type name.
841-
string type_name = 1;
842-
843-
// configuration is the list ConfigSchema-based configuration data.
844-
DynamicValue config = 2;
845-
846-
// when include_resource_object is set to true, the provider should
847-
// include the full resource object for each result
848-
bool include_resource_object = 3;
849-
}
850-
851-
message Event {
852-
// identity is the resource identity data of the resource instance.
853-
ResourceIdentityData identity = 1;
854-
855-
// display_name can be displayed in a UI to make it easier for humans to identify a resource
856-
string display_name = 2;
857-
858-
// optional resource object which can be useful when combining list blocks in configuration
859-
optional DynamicValue resource_object = 3;
860-
861-
// A warning or error diagnostics for this event
862-
repeated Diagnostic diagnostic = 4;
863-
}
864-
}
865-
866-
message ValidateListResourceConfig {
867-
message Request {
868-
string type_name = 1;
869-
DynamicValue config = 2;
870-
}
871-
message Response {
872-
repeated Diagnostic diagnostics = 1;
873-
}
874-
}

tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go

Lines changed: 3 additions & 85 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tfprotov5/tf5server/server.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ const (
4949
//
5050
// In the future, it may be possible to include this information directly
5151
// in the protocol buffers rather than recreating a constant here.
52-
protocolVersionMinor uint = 10
52+
protocolVersionMinor uint = 9
5353
)
5454

5555
// protocolVersion represents the combined major and minor version numbers of

0 commit comments

Comments
 (0)