@@ -198,6 +198,7 @@ func (s *GRPCProviderServer) GetMetadata(ctx context.Context, req *tfprotov5.Get
198198 EphemeralResources : make ([]tfprotov5.EphemeralResourceMetadata , 0 ),
199199 Functions : make ([]tfprotov5.FunctionMetadata , 0 ),
200200 ListResources : make ([]tfprotov5.ListResourceMetadata , 0 ),
201+ Actions : make ([]tfprotov5.ActionMetadata , 0 ),
201202 Resources : make ([]tfprotov5.ResourceMetadata , 0 , len (s .provider .ResourcesMap )),
202203 ServerCapabilities : s .serverCapabilities (),
203204 }
@@ -227,6 +228,7 @@ func (s *GRPCProviderServer) GetProviderSchema(ctx context.Context, req *tfproto
227228 EphemeralResourceSchemas : make (map [string ]* tfprotov5.Schema , 0 ),
228229 Functions : make (map [string ]* tfprotov5.Function , 0 ),
229230 ListResourceSchemas : make (map [string ]* tfprotov5.Schema , 0 ),
231+ ActionSchemas : make (map [string ]* tfprotov5.ActionSchema , 0 ),
230232 ResourceSchemas : make (map [string ]* tfprotov5.Schema , len (s .provider .ResourcesMap )),
231233 ServerCapabilities : s .serverCapabilities (),
232234 }
@@ -2065,6 +2067,68 @@ func (s *GRPCProviderServer) ListResource(ctx context.Context, req *tfprotov5.Li
20652067 return resp , nil
20662068}
20672069
2070+ func (s * GRPCProviderServer ) ValidateActionConfig (ctx context.Context , req * tfprotov5.ValidateActionConfigRequest ) (* tfprotov5.ValidateActionConfigResponse , error ) {
2071+ ctx = logging .InitContext (ctx )
2072+
2073+ logging .HelperSchemaTrace (ctx , "Returning error for action type validate" )
2074+
2075+ resp := & tfprotov5.ValidateActionConfigResponse {
2076+ Diagnostics : []* tfprotov5.Diagnostic {
2077+ {
2078+ Severity : tfprotov5 .DiagnosticSeverityError ,
2079+ Summary : "Unknown Action Type" ,
2080+ Detail : fmt .Sprintf ("The %q action type is not supported by this provider." , req .ActionType ),
2081+ },
2082+ },
2083+ }
2084+
2085+ return resp , nil
2086+ }
2087+
2088+ func (s * GRPCProviderServer ) PlanAction (ctx context.Context , req * tfprotov5.PlanActionRequest ) (* tfprotov5.PlanActionResponse , error ) {
2089+ ctx = logging .InitContext (ctx )
2090+
2091+ logging .HelperSchemaTrace (ctx , "Returning error for action type plan" )
2092+
2093+ resp := & tfprotov5.PlanActionResponse {
2094+ Diagnostics : []* tfprotov5.Diagnostic {
2095+ {
2096+ Severity : tfprotov5 .DiagnosticSeverityError ,
2097+ Summary : "Unknown Action Type" ,
2098+ Detail : fmt .Sprintf ("The %q action type is not supported by this provider." , req .ActionType ),
2099+ },
2100+ },
2101+ }
2102+
2103+ return resp , nil
2104+ }
2105+
2106+ func (s * GRPCProviderServer ) InvokeAction (ctx context.Context , req * tfprotov5.InvokeActionRequest ) (* tfprotov5.InvokeActionServerStream , error ) {
2107+ ctx = logging .InitContext (ctx )
2108+
2109+ logging .HelperSchemaTrace (ctx , "Returning error for action invoke" )
2110+
2111+ event := make ([]tfprotov5.InvokeActionEvent , 0 )
2112+
2113+ event = append (event , tfprotov5.InvokeActionEvent {
2114+ Type : tfprotov5.CompletedInvokeActionEventType {
2115+ Diagnostics : []* tfprotov5.Diagnostic {
2116+ {
2117+ Severity : tfprotov5 .DiagnosticSeverityError ,
2118+ Summary : "Unknown Action Type" ,
2119+ Detail : fmt .Sprintf ("The %q action type is not supported by this provider." , req .ActionType ),
2120+ },
2121+ },
2122+ },
2123+ })
2124+
2125+ resp := & tfprotov5.InvokeActionServerStream {
2126+ Events : slices .Values (event ),
2127+ }
2128+
2129+ return resp , nil
2130+ }
2131+
20682132func pathToAttributePath (path cty.Path ) * tftypes.AttributePath {
20692133 var steps []tftypes.AttributePathStep
20702134
0 commit comments