@@ -6,7 +6,6 @@ option go_package = "github.com/DefangLabs/defang/src/protos/io/defang/v1";
6
6
package io.defang.v1 ;
7
7
8
8
import "google/protobuf/empty.proto" ;
9
- import "google/protobuf/struct.proto" ;
10
9
import "google/protobuf/timestamp.proto" ;
11
10
12
11
service FabricController {
@@ -27,11 +26,16 @@ service FabricController {
27
26
rpc Deploy (DeployRequest ) returns (DeployResponse );
28
27
rpc Get (ServiceID ) returns (ServiceInfo ) {
29
28
option idempotency_level = NO_SIDE_EFFECTS ;
30
- }; // should be GetService
31
- rpc Delete (DeleteRequest ) returns (DeleteResponse ){
29
+ }; // should be GetService
30
+ rpc Delete (DeleteRequest ) returns (DeleteResponse ) {
32
31
option deprecated = true ;
33
- }; // used by pulumi-defang provider; should use Deploy
34
- rpc Publish (PublishRequest ) returns (google .protobuf .Empty );
32
+ }; // used by pulumi-defang provider; should use Deploy or Destroy
33
+ rpc Destroy (DestroyRequest ) returns (DestroyResponse ) {
34
+ option idempotency_level = IDEMPOTENT ;
35
+ }
36
+ rpc Publish (PublishRequest ) returns (google .protobuf .Empty ) {
37
+ option deprecated = true ;
38
+ }
35
39
rpc Subscribe (SubscribeRequest ) returns (stream SubscribeResponse );
36
40
// rpc Promote(google.protobuf.Empty) returns (google.protobuf.Empty);
37
41
rpc GetServices (google .protobuf .Empty ) returns (ListServicesResponse ) {
@@ -53,8 +57,12 @@ service FabricController {
53
57
}
54
58
55
59
// deprecate - change to use *Config functions
56
- rpc PutSecret (SecretValue ) returns (google .protobuf .Empty ) {option deprecated = true ;};
57
- rpc DeleteSecrets (Secrets ) returns (google .protobuf .Empty ) {option deprecated = true ;};
60
+ rpc PutSecret (PutConfigRequest ) returns (google .protobuf .Empty ) {
61
+ option deprecated = true ;
62
+ };
63
+ rpc DeleteSecrets (Secrets ) returns (google .protobuf .Empty ) {
64
+ option deprecated = true ;
65
+ };
58
66
rpc ListSecrets (google .protobuf .Empty ) returns (Secrets ) {
59
67
option idempotency_level = NO_SIDE_EFFECTS ;
60
68
option deprecated = true ;
@@ -65,9 +73,10 @@ service FabricController {
65
73
}; // no values
66
74
rpc PutConfig (PutConfigRequest ) returns (google .protobuf .Empty ) {
67
75
option idempotency_level = IDEMPOTENT ;
68
-
69
76
};
70
- rpc DeleteConfigs (DeleteConfigsRequest ) returns (google .protobuf .Empty );
77
+ rpc DeleteConfigs (DeleteConfigsRequest ) returns (google .protobuf .Empty ) {
78
+ option idempotency_level = IDEMPOTENT ;
79
+ }
71
80
rpc ListConfigs (ListConfigsRequest ) returns (ListConfigsResponse ) {
72
81
option idempotency_level = NO_SIDE_EFFECTS ;
73
82
}; // no values
@@ -86,8 +95,28 @@ service FabricController {
86
95
option idempotency_level = NO_SIDE_EFFECTS ;
87
96
};
88
97
rpc Track (TrackRequest ) returns (google .protobuf .Empty );
98
+
99
+ // Endpoint for GDPR compliance
100
+ rpc DeleteMe (google .protobuf .Empty ) returns (google .protobuf .Empty ) {
101
+ option idempotency_level = IDEMPOTENT ;
102
+ }
103
+
104
+ rpc VerifyDNSSetup (VerifyDNSSetupRequest ) returns (google .protobuf .Empty ) {
105
+ option idempotency_level = NO_SIDE_EFFECTS ;
106
+ }
107
+ }
108
+
109
+ message VerifyDNSSetupRequest {
110
+ string domain = 1 ;
111
+ repeated string targets = 2 ;
112
+ }
113
+
114
+ message DestroyRequest {
115
+ string project = 1 ; // defaults to tenant ID
89
116
}
90
117
118
+ message DestroyResponse { string etag = 1 ; }
119
+
91
120
message DebugRequest {
92
121
repeated File files = 1 ;
93
122
string etag = 2 ;
@@ -123,17 +152,18 @@ message TrackRequest {
123
152
}
124
153
125
154
enum DeploymentMode {
126
- UNSPECIFIED_MODE = 0 ;
155
+ UNSPECIFIED_MODE = 0 ;
127
156
DEVELOPMENT = 1 ;
128
157
STAGING = 2 ;
129
158
PRODUCTION = 3 ;
130
159
}
131
160
132
161
message DeployRequest {
133
- repeated Service services = 1 [deprecated = true ]; // deprecated; use compose
134
- string project = 2 [deprecated = true ]; // deprecated; use compose.name
162
+ repeated Service services = 1
163
+ [ deprecated = true ]; // deprecated; use compose
164
+ string project = 2 [ deprecated = true ]; // deprecated; use compose.name
135
165
DeploymentMode mode = 3 ;
136
- google.protobuf.Struct compose = 4 ;
166
+ bytes compose = 4 ; // yaml (or json)
137
167
}
138
168
139
169
message DeployResponse {
@@ -169,7 +199,6 @@ message UploadURLRequest { string digest = 1; }
169
199
170
200
message UploadURLResponse { string url = 1 ; }
171
201
172
-
173
202
enum ServiceState {
174
203
NOT_SPECIFIED = 0 ;
175
204
@@ -198,70 +227,70 @@ message ServiceInfo {
198
227
string etag = 4 ;
199
228
string status = 5 ;
200
229
repeated string nat_ips = 6 ; // comma-separated list of NAT IPs
201
- repeated string lb_ips = 7 ; // comma-separated list of internal CIDRs for the load-balancer
230
+ repeated string lb_ips =
231
+ 7; // comma-separated list of internal CIDRs for the load-balancer
202
232
string private_fqdn = 8 ; // fully qualified domain name (host)
203
233
string public_fqdn = 9 ; // fully qualified domain name (ingress)
204
234
google.protobuf.Timestamp created_at = 10 ;
205
235
google.protobuf.Timestamp updated_at = 11 ;
206
236
string zone_id = 12 ; // zone ID for byod domain
207
- bool use_acme_cert = 13 ; // If we should setup the facilities to use ACME(let's encrypt) certs
208
- reserved 14 ; // was: string lb_dns
237
+ bool use_acme_cert =
238
+ 13; // If we should setup the facilities to use ACME(let's encrypt) certs
239
+ reserved 14 ; // was: string lb_dns
209
240
ServiceState state = 15 ; // enumerated status of the service
210
- string domainname = 16 ; // domain name for the service
241
+ string domainname = 16 ; // domain name for the service
211
242
212
243
// bool is_function = 5; // true if service is a function
213
244
}
214
245
215
246
message Secrets {
247
+ option deprecated = true ;
216
248
repeated string names = 1 ;
217
249
string project = 2 ; // defaults to tenant ID
218
250
}
219
251
220
252
message SecretValue {
253
+ option deprecated = true ;
221
254
string name = 1 ;
222
255
string value = 2 ;
223
256
string project = 3 ; // defaults to tenant ID
224
257
}
225
258
259
+ enum ConfigType {
260
+ CONFIGTYPE_UNSPECIFIED = 0 ;
261
+ CONFIGTYPE_SENSITIVE = 1 ;
262
+ }
263
+
226
264
message Config {
227
265
string name = 1 ;
228
266
string value = 2 ;
229
267
string project = 3 ;
230
- bool is_sensitive = 4 ;
268
+ ConfigType type = 4 ;
231
269
}
232
270
233
271
message ConfigKey {
234
272
string name = 1 ;
235
273
string project = 2 ; // defaults to tenant ID
236
274
}
237
275
238
- message GetConfigsRequest {
239
- repeated ConfigKey configs = 1 ;
240
- }
241
-
242
- message GetConfigsResponse {
243
- repeated Config configs = 1 ;
244
- }
245
-
246
-
247
- message DeleteConfigsRequest {
248
- repeated ConfigKey configs = 1 ;
249
- }
250
-
251
276
message PutConfigRequest {
252
277
string name = 1 ;
253
278
string value = 2 ;
254
279
string project = 3 ;
255
- bool is_sensitive = 4 ;
280
+ ConfigType type = 4 ;
256
281
}
257
282
283
+ message GetConfigsRequest { repeated ConfigKey configs = 1 ; }
284
+
285
+ message GetConfigsResponse { repeated Config configs = 1 ; }
286
+
287
+ message DeleteConfigsRequest { repeated ConfigKey configs = 1 ; }
288
+
258
289
message ListConfigsRequest {
259
290
string project = 1 ; // defaults to tenant ID
260
291
}
261
292
262
- message ListConfigsResponse {
263
- repeated ConfigKey configs = 1 ;
264
- }
293
+ message ListConfigsResponse { repeated ConfigKey configs = 1 ; }
265
294
266
295
message TokenRequest {
267
296
string tenant = 1 ;
@@ -305,6 +334,7 @@ message LogEntry {
305
334
string service = 4 ;
306
335
string etag = 5 ;
307
336
string host = 6 ;
337
+ string job = 7 ;
308
338
}
309
339
310
340
message TailResponse {
@@ -320,12 +350,12 @@ message ListServicesResponse {
320
350
string project = 2 ;
321
351
}
322
352
323
- // TODO: internal message; move to a separate proto file
324
353
message ProjectUpdate {
325
354
repeated ServiceInfo services = 1 ;
326
355
string alb_arn = 2 ;
327
- string project = 3 ; // should we use compose.name?
328
- google.protobuf.Struct compose = 4 ;
356
+ string project = 3 [deprecated = true ]; // deprecated; use compose.name
357
+ bytes compose = 4 ;
358
+ string cd_version = 5 ;
329
359
}
330
360
331
361
enum Platform {
@@ -434,7 +464,7 @@ message Service {
434
464
string name = 1 ;
435
465
string image = 2 ;
436
466
Platform platform = 3 ;
437
- bool internal = 4 [deprecated = true ]; // deprecated: use networks
467
+ bool internal = 4 [ deprecated = true ]; // deprecated: use networks
438
468
Deploy deploy = 5 ;
439
469
repeated Port ports = 6 ;
440
470
map <string , string > environment = 7 ;
@@ -444,12 +474,13 @@ message Service {
444
474
repeated string command = 11 ;
445
475
string domainname = 12 ;
446
476
bool init = 13 ;
447
- string dns_role = 14 ; // x-defang-dns-role: role arn used to access route53 to create dns records
477
+ string dns_role = 14 ; // x-defang-dns-role: role arn used to access route53 to
478
+ // create dns records
448
479
StaticFiles static_files = 15 ; // x-defang-static-files: use a managed CDN
449
480
Network networks = 16 ; // currently only 1 network is supported
450
- Redis redis = 18 ; // x-defang-redis: use a managed redis
451
- Postgres postgres = 19 ; // x-defang-postgres: use a managed
452
- string project = 20 ; // defaults to tenant ID
481
+ Redis redis = 18 ; // x-defang-redis: use a managed redis
482
+ Postgres postgres = 19 ; // x-defang-postgres: use a managed
483
+ string project = 20 ; // defaults to tenant ID
453
484
}
454
485
455
486
message StaticFiles {
@@ -458,14 +489,24 @@ message StaticFiles {
458
489
repeated string redirects = 2 ;
459
490
}
460
491
461
- message Redis {
462
- option deprecated = true ;
463
- }
464
- message Postgres {
465
- option deprecated = true ;
492
+ message Redis { option deprecated = true ; }
493
+ message Postgres { option deprecated = true ; }
494
+
495
+ // TODO: internal message; move to a separate proto file; was Event
496
+ message DeployEvent {
497
+ DeploymentMode mode = 1 ;
498
+ string type = 2 ; // required
499
+ string source = 3 ;
500
+ string id = 4 ; // etag
501
+ string datacontenttype = 5 ;
502
+ string dataschema = 6 ;
503
+ string subject = 7 ; // tenant|stack; also used as SQS group ID
504
+ google.protobuf.Timestamp time = 8 ;
505
+ bytes data = 9 ;
466
506
}
467
507
468
508
message Event {
509
+ option deprecated = true ;
469
510
string specversion = 1 ; // required (but we don't care)
470
511
string type = 2 ; // required
471
512
string source = 3 ; // required
@@ -485,7 +526,7 @@ message SubscribeRequest {
485
526
}
486
527
487
528
message SubscribeResponse {
488
- ServiceInfo service = 1 [deprecated = true ];
529
+ ServiceInfo service = 1 [ deprecated = true ];
489
530
string name = 2 ;
490
531
string status = 3 ;
491
532
ServiceState state = 4 ;
0 commit comments