-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tfprotov5+tfprotov6: Write-only Attribute Implementation #462
Conversation
…ibutes and generate stubs.
…ename `PriorState` request fields to `State`.
…ibutes and generate stubs.
…nto SBGoods/write-only-attributes
…tributes # Conflicts: # tfprotov5/internal/tfplugin5/tfplugin5.pb.go # tfprotov6/internal/tfplugin6/tfplugin6.pb.go
# Conflicts: # tfprotov5/ephemeral_resource.go # tfprotov5/internal/fromproto/ephemeral_resource.go # tfprotov5/internal/fromproto/ephemeral_resource_test.go # tfprotov5/internal/tfplugin5/tfplugin5.pb.go # tfprotov5/internal/tfplugin5/tfplugin5.proto # tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go # tfprotov5/internal/toproto/ephemeral_resource.go # tfprotov5/internal/toproto/ephemeral_resource_test.go # tfprotov5/tf5server/server.go # tfprotov6/ephemeral_resource.go # tfprotov6/internal/fromproto/ephemeral_resource.go # tfprotov6/internal/fromproto/ephemeral_resource_test.go # tfprotov6/internal/tfplugin6/tfplugin6.pb.go # tfprotov6/internal/tfplugin6/tfplugin6.proto # tfprotov6/internal/tfplugin6/tfplugin6_grpc.pb.go # tfprotov6/internal/toproto/ephemeral_resource.go # tfprotov6/internal/toproto/ephemeral_resource_test.go # tfprotov6/tf6server/server.go
…or validate resource config
# Conflicts: # tfprotov5/internal/tfplugin5/tfplugin5.pb.go # tfprotov6/internal/tfplugin6/tfplugin6.pb.go
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, sorry I have one suggestion in the doc string just to be super explicit about the field
@@ -3,6 +3,15 @@ | |||
|
|||
package tfprotov5 | |||
|
|||
// ValidateResourceTypeConfigClientCapabilities allows Terraform to publish information |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My monthly reminder that this RPC is named different in protocol v5 😆
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not specific feedback to this work, more of an observation, but I see that Terraform core is sending these client capabilities in every RPC request regardless of whether we use them. So in theory we could add, say, the WriteOnlyAttributesAllowed
capability to PlanResourceChange
with an SDK only change.
Not saying we should, but thought it was interesting.
Co-authored-by: Austin Valle <[email protected]>
The next version of the plugin protocol (5.8/6.8) introduces a new
write_only
property to theSchema.Attribute
message to specify a write-only attribute. Write-only attributes are attributes which do not have their values persisted to Terraform state.write_only
is only applicable for managed resource attributes.