1- // Terraform Plugin RPC protocol version 5.2
1+ // Terraform Plugin RPC protocol version 5.3
22//
3- // This file defines version 5.2 of the RPC protocol. To implement a plugin
3+ // This file defines version 5.3 of the RPC protocol. To implement a plugin
44// against this protocol, copy this definition into your own codebase and
55// use protoc to generate stubs for your target language.
66//
1313// official protocol releases. Proto files taken from other commits may include
1414// incomplete changes or features that did not make it into a final release.
1515// In all reasonable cases, plugin developers should take the proto file from
16- // the tag of the most recent release of Terraform, and not from the master
16+ // the tag of the most recent release of Terraform, and not from the main
1717// branch or any other development branch.
1818//
1919syntax = "proto3" ;
@@ -118,7 +118,7 @@ message Schema {
118118
119119 // The version of the schema.
120120 // Schemas are versioned, so that providers can upgrade a saved resource
121- // state when the schema is changed.
121+ // state when the schema is changed.
122122 int64 version = 1 ;
123123
124124 // Block is the top level configuration block for this schema.
@@ -157,6 +157,18 @@ message GetProviderSchema {
157157 map <string , Schema > data_source_schemas = 3 ;
158158 repeated Diagnostic diagnostics = 4 ;
159159 Schema provider_meta = 5 ;
160+ ServerCapabilities server_capabilities = 6 ;
161+ }
162+
163+
164+ // ServerCapabilities allows providers to communicate extra information
165+ // regarding supported protocol features. This is used to indicate
166+ // availability of certain forward-compatible changes which may be optional
167+ // in a major protocol version, but cannot be tested for directly.
168+ message ServerCapabilities {
169+ // The plan_destroy capability signals that a provider expects a call
170+ // to PlanResourceChange when a resource is going to be destroyed.
171+ bool plan_destroy = 1 ;
160172 }
161173}
162174
@@ -247,14 +259,14 @@ message PlanResourceChange {
247259 DynamicValue prior_state = 2 ;
248260 DynamicValue proposed_new_state = 3 ;
249261 DynamicValue config = 4 ;
250- bytes prior_private = 5 ;
262+ bytes prior_private = 5 ;
251263 DynamicValue provider_meta = 6 ;
252264 }
253265
254266 message Response {
255267 DynamicValue planned_state = 1 ;
256268 repeated AttributePath requires_replace = 2 ;
257- bytes planned_private = 3 ;
269+ bytes planned_private = 3 ;
258270 repeated Diagnostic diagnostics = 4 ;
259271
260272
@@ -279,12 +291,12 @@ message ApplyResourceChange {
279291 DynamicValue prior_state = 2 ;
280292 DynamicValue planned_state = 3 ;
281293 DynamicValue config = 4 ;
282- bytes planned_private = 5 ;
294+ bytes planned_private = 5 ;
283295 DynamicValue provider_meta = 6 ;
284296 }
285297 message Response {
286298 DynamicValue new_state = 1 ;
287- bytes private = 2 ;
299+ bytes private = 2 ;
288300 repeated Diagnostic diagnostics = 3 ;
289301
290302 // This may be set only by the helper/schema "SDK" in the main Terraform
@@ -365,5 +377,5 @@ message ProvisionResource {
365377 message Response {
366378 string output = 1 ;
367379 repeated Diagnostic diagnostics = 2 ;
368- }
380+ }
369381}
0 commit comments