@@ -84,6 +84,7 @@ func (s *GRPCProviderServer) GetMetadata(ctx context.Context, req *tfprotov5.Get
84
84
85
85
resp := & tfprotov5.GetMetadataResponse {
86
86
DataSources : make ([]tfprotov5.DataSourceMetadata , 0 , len (s .provider .DataSourcesMap )),
87
+ EphemeralResources : make ([]tfprotov5.EphemeralResourceMetadata , 0 ),
87
88
Functions : make ([]tfprotov5.FunctionMetadata , 0 ),
88
89
Resources : make ([]tfprotov5.ResourceMetadata , 0 , len (s .provider .ResourcesMap )),
89
90
ServerCapabilities : s .serverCapabilities (),
@@ -110,10 +111,11 @@ func (s *GRPCProviderServer) GetProviderSchema(ctx context.Context, req *tfproto
110
111
logging .HelperSchemaTrace (ctx , "Getting provider schema" )
111
112
112
113
resp := & tfprotov5.GetProviderSchemaResponse {
113
- DataSourceSchemas : make (map [string ]* tfprotov5.Schema , len (s .provider .DataSourcesMap )),
114
- Functions : make (map [string ]* tfprotov5.Function , 0 ),
115
- ResourceSchemas : make (map [string ]* tfprotov5.Schema , len (s .provider .ResourcesMap )),
116
- ServerCapabilities : s .serverCapabilities (),
114
+ DataSourceSchemas : make (map [string ]* tfprotov5.Schema , len (s .provider .DataSourcesMap )),
115
+ EphemeralResourceSchemas : make (map [string ]* tfprotov5.Schema , 0 ),
116
+ Functions : make (map [string ]* tfprotov5.Function , 0 ),
117
+ ResourceSchemas : make (map [string ]* tfprotov5.Schema , len (s .provider .ResourcesMap )),
118
+ ServerCapabilities : s .serverCapabilities (),
117
119
}
118
120
119
121
resp .Provider = & tfprotov5.Schema {
@@ -1482,6 +1484,78 @@ func (s *GRPCProviderServer) GetFunctions(ctx context.Context, req *tfprotov5.Ge
1482
1484
return resp , nil
1483
1485
}
1484
1486
1487
+ func (s * GRPCProviderServer ) ValidateEphemeralResourceConfig (ctx context.Context , req * tfprotov5.ValidateEphemeralResourceConfigRequest ) (* tfprotov5.ValidateEphemeralResourceConfigResponse , error ) {
1488
+ ctx = logging .InitContext (ctx )
1489
+
1490
+ logging .HelperSchemaTrace (ctx , "Returning error for ephemeral resource validate" )
1491
+
1492
+ resp := & tfprotov5.ValidateEphemeralResourceConfigResponse {
1493
+ Diagnostics : []* tfprotov5.Diagnostic {
1494
+ {
1495
+ Severity : tfprotov5 .DiagnosticSeverityError ,
1496
+ Summary : "Unknown Ephemeral Resource Type" ,
1497
+ Detail : fmt .Sprintf ("The %q ephemeral resource type is not supported by this provider." , req .TypeName ),
1498
+ },
1499
+ },
1500
+ }
1501
+
1502
+ return resp , nil
1503
+ }
1504
+
1505
+ func (s * GRPCProviderServer ) OpenEphemeralResource (ctx context.Context , req * tfprotov5.OpenEphemeralResourceRequest ) (* tfprotov5.OpenEphemeralResourceResponse , error ) {
1506
+ ctx = logging .InitContext (ctx )
1507
+
1508
+ logging .HelperSchemaTrace (ctx , "Returning error for ephemeral resource open" )
1509
+
1510
+ resp := & tfprotov5.OpenEphemeralResourceResponse {
1511
+ Diagnostics : []* tfprotov5.Diagnostic {
1512
+ {
1513
+ Severity : tfprotov5 .DiagnosticSeverityError ,
1514
+ Summary : "Unknown Ephemeral Resource Type" ,
1515
+ Detail : fmt .Sprintf ("The %q ephemeral resource type is not supported by this provider." , req .TypeName ),
1516
+ },
1517
+ },
1518
+ }
1519
+
1520
+ return resp , nil
1521
+ }
1522
+
1523
+ func (s * GRPCProviderServer ) RenewEphemeralResource (ctx context.Context , req * tfprotov5.RenewEphemeralResourceRequest ) (* tfprotov5.RenewEphemeralResourceResponse , error ) {
1524
+ ctx = logging .InitContext (ctx )
1525
+
1526
+ logging .HelperSchemaTrace (ctx , "Returning error for ephemeral resource renew" )
1527
+
1528
+ resp := & tfprotov5.RenewEphemeralResourceResponse {
1529
+ Diagnostics : []* tfprotov5.Diagnostic {
1530
+ {
1531
+ Severity : tfprotov5 .DiagnosticSeverityError ,
1532
+ Summary : "Unknown Ephemeral Resource Type" ,
1533
+ Detail : fmt .Sprintf ("The %q ephemeral resource type is not supported by this provider." , req .TypeName ),
1534
+ },
1535
+ },
1536
+ }
1537
+
1538
+ return resp , nil
1539
+ }
1540
+
1541
+ func (s * GRPCProviderServer ) CloseEphemeralResource (ctx context.Context , req * tfprotov5.CloseEphemeralResourceRequest ) (* tfprotov5.CloseEphemeralResourceResponse , error ) {
1542
+ ctx = logging .InitContext (ctx )
1543
+
1544
+ logging .HelperSchemaTrace (ctx , "Returning error for ephemeral resource close" )
1545
+
1546
+ resp := & tfprotov5.CloseEphemeralResourceResponse {
1547
+ Diagnostics : []* tfprotov5.Diagnostic {
1548
+ {
1549
+ Severity : tfprotov5 .DiagnosticSeverityError ,
1550
+ Summary : "Unknown Ephemeral Resource Type" ,
1551
+ Detail : fmt .Sprintf ("The %q ephemeral resource type is not supported by this provider." , req .TypeName ),
1552
+ },
1553
+ },
1554
+ }
1555
+
1556
+ return resp , nil
1557
+ }
1558
+
1485
1559
func pathToAttributePath (path cty.Path ) * tftypes.AttributePath {
1486
1560
var steps []tftypes.AttributePathStep
1487
1561
0 commit comments