Skip to content

Commit cf99b16

Browse files
authored
pull in proto changes to validate IncludeResourceObject as well as Limit in list config (#538)
1 parent e5d6e8f commit cf99b16

File tree

8 files changed

+258
-192
lines changed

8 files changed

+258
-192
lines changed

tfprotov5/internal/fromproto/list_resource.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ func ValidateListResourceConfigRequest(in *tfplugin5.ValidateListResourceConfig_
2727
}
2828

2929
return &tfprotov5.ValidateListResourceConfigRequest{
30-
TypeName: in.TypeName,
31-
Config: DynamicValue(in.Config),
30+
TypeName: in.TypeName,
31+
Config: DynamicValue(in.Config),
32+
IncludeResourceObject: DynamicValue(in.IncludeResourceObject),
33+
Limit: DynamicValue(in.Limit),
3234
}
3335
}

tfprotov5/internal/tfplugin5/tfplugin5.pb.go

Lines changed: 118 additions & 98 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 & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -913,6 +913,8 @@ message ValidateListResourceConfig {
913913
message Request {
914914
string type_name = 1;
915915
DynamicValue config = 2;
916+
DynamicValue include_resource_object = 3;
917+
DynamicValue limit = 4;
916918
}
917919
message Response {
918920
repeated Diagnostic diagnostics = 1;

tfprotov5/list_resource.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,15 @@ type ValidateListResourceConfigRequest struct {
109109
// knowing the value at request time. Any attributes not directly set in
110110
// the configuration will be null.
111111
Config *DynamicValue
112+
113+
// IncludeResourceObject is the value of the include_resource
114+
// argument in the list block. This is a DynamicValue so that it can
115+
// contain unknown values.
116+
IncludeResourceObject *DynamicValue
117+
118+
// Limit is the maximum number of results to return. This is a
119+
// DynamicValue so that it can contain unknown values.
120+
Limit *DynamicValue
112121
}
113122

114123
// ValidateListResourceConfigResponse is the response from the provider about

tfprotov6/internal/fromproto/list_resource.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ func ValidateListResourceConfigRequest(in *tfplugin6.ValidateListResourceConfig_
2727
}
2828

2929
return &tfprotov6.ValidateListResourceConfigRequest{
30-
TypeName: in.TypeName,
31-
Config: DynamicValue(in.Config),
30+
TypeName: in.TypeName,
31+
Config: DynamicValue(in.Config),
32+
IncludeResourceObject: DynamicValue(in.IncludeResourceObject),
33+
Limit: DynamicValue(in.Limit),
3234
}
3335
}

tfprotov6/internal/tfplugin6/tfplugin6.pb.go

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

tfprotov6/internal/tfplugin6/tfplugin6.proto

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -896,6 +896,8 @@ message ValidateListResourceConfig {
896896
message Request {
897897
string type_name = 1;
898898
DynamicValue config = 2;
899+
DynamicValue include_resource_object = 3;
900+
DynamicValue limit = 4;
899901
}
900902
message Response {
901903
repeated Diagnostic diagnostics = 1;

tfprotov6/list_resource.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,15 @@ type ValidateListResourceConfigRequest struct {
109109
// knowing the value at request time. Any attributes not directly set in
110110
// the configuration will be null.
111111
Config *DynamicValue
112+
113+
// IncludeResourceObject is the value of the include_resource
114+
// argument in the list block. This is a DynamicValue so that it can
115+
// contain unknown values.
116+
IncludeResourceObject *DynamicValue
117+
118+
// Limit is the maximum number of results to return. This is a
119+
// DynamicValue so that it can contain unknown values.
120+
Limit *DynamicValue
112121
}
113122

114123
// ValidateListResourceConfigResponse is the response from the provider about

0 commit comments

Comments
 (0)