Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions tfprotov5/internal/fromproto/list_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ func ValidateListResourceConfigRequest(in *tfplugin5.ValidateListResourceConfig_
}

return &tfprotov5.ValidateListResourceConfigRequest{
TypeName: in.TypeName,
Config: DynamicValue(in.Config),
TypeName: in.TypeName,
Config: DynamicValue(in.Config),
IncludeResourceObject: DynamicValue(in.IncludeResourceObject),
Limit: DynamicValue(in.Limit),
}
}
216 changes: 118 additions & 98 deletions tfprotov5/internal/tfplugin5/tfplugin5.pb.go

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions tfprotov5/internal/tfplugin5/tfplugin5.proto
Original file line number Diff line number Diff line change
Expand Up @@ -913,6 +913,8 @@ message ValidateListResourceConfig {
message Request {
string type_name = 1;
DynamicValue config = 2;
DynamicValue include_resource_object = 3;
DynamicValue limit = 4;
}
message Response {
repeated Diagnostic diagnostics = 1;
Expand Down
9 changes: 9 additions & 0 deletions tfprotov5/list_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,15 @@ type ValidateListResourceConfigRequest struct {
// knowing the value at request time. Any attributes not directly set in
// the configuration will be null.
Config *DynamicValue

// IncludeResourceObject is the value of the include_resource
// argument in the list block. This is a DynamicValue so that it can
// contain unknown values.
IncludeResourceObject *DynamicValue

// Limit is the maximum number of results to return. This is a
// DynamicValue so that it can contain unknown values.
Limit *DynamicValue
}

// ValidateListResourceConfigResponse is the response from the provider about
Expand Down
6 changes: 4 additions & 2 deletions tfprotov6/internal/fromproto/list_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ func ValidateListResourceConfigRequest(in *tfplugin6.ValidateListResourceConfig_
}

return &tfprotov6.ValidateListResourceConfigRequest{
TypeName: in.TypeName,
Config: DynamicValue(in.Config),
TypeName: in.TypeName,
Config: DynamicValue(in.Config),
IncludeResourceObject: DynamicValue(in.IncludeResourceObject),
Limit: DynamicValue(in.Limit),
}
}
200 changes: 110 additions & 90 deletions tfprotov6/internal/tfplugin6/tfplugin6.pb.go

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions tfprotov6/internal/tfplugin6/tfplugin6.proto
Original file line number Diff line number Diff line change
Expand Up @@ -896,6 +896,8 @@ message ValidateListResourceConfig {
message Request {
string type_name = 1;
DynamicValue config = 2;
DynamicValue include_resource_object = 3;
DynamicValue limit = 4;
}
message Response {
repeated Diagnostic diagnostics = 1;
Expand Down
9 changes: 9 additions & 0 deletions tfprotov6/list_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,15 @@ type ValidateListResourceConfigRequest struct {
// knowing the value at request time. Any attributes not directly set in
// the configuration will be null.
Config *DynamicValue

// IncludeResourceObject is the value of the include_resource
// argument in the list block. This is a DynamicValue so that it can
// contain unknown values.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was my first look at the updated proto files, so the DynamicValues for primitive-or-unknown in the protocol surprised me. It feels like a rare example/precedent – a DynamicValue typically represents a value with a provider-defined schema type.

I do recall the discussion of allowing expressions in config, so this may indeed be necessary. My one thought here is to consider how to simplify access to these fields in Framework – and possibly plugin-go too – for the provider developer.

IncludeResourceObject *DynamicValue

// Limit is the maximum number of results to return. This is a
// DynamicValue so that it can contain unknown values.
Limit *DynamicValue
}

// ValidateListResourceConfigResponse is the response from the provider about
Expand Down
Loading