@pulumi/docker 3.4.0 → 3.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/types/output.d.ts CHANGED
@@ -1,35 +1,98 @@
1
1
  import { output as outputs } from "../types";
2
2
  export interface ContainerCapabilities {
3
+ /**
4
+ * List of linux capabilities to add.
5
+ */
3
6
  adds?: string[];
7
+ /**
8
+ * List of linux capabilities to drop.
9
+ */
4
10
  drops?: string[];
5
11
  }
6
12
  export interface ContainerDevice {
13
+ /**
14
+ * The path in the container where the device will be bound.
15
+ */
7
16
  containerPath?: string;
17
+ /**
18
+ * The path on the host where the device is located.
19
+ */
8
20
  hostPath: string;
21
+ /**
22
+ * The cgroup permissions given to the container to access the device. Defaults to `rwm`.
23
+ */
9
24
  permissions?: string;
10
25
  }
11
26
  export interface ContainerHealthcheck {
27
+ /**
28
+ * Time between running the check (ms|s|m|h). Defaults to `0s`.
29
+ */
12
30
  interval?: string;
31
+ /**
32
+ * Consecutive failures needed to report unhealthy. Defaults to `0`.
33
+ */
13
34
  retries?: number;
35
+ /**
36
+ * Start period for the container to initialize before counting retries towards unstable (ms|s|m|h). Defaults to `0s`.
37
+ */
14
38
  startPeriod?: string;
39
+ /**
40
+ * Command to run to check health. For example, to run `curl -f localhost/health` set the command to be `["CMD", "curl", "-f", "localhost/health"]`.
41
+ */
15
42
  tests: string[];
43
+ /**
44
+ * Maximum time to allow one check to run (ms|s|m|h). Defaults to `0s`.
45
+ */
16
46
  timeout?: string;
17
47
  }
18
48
  export interface ContainerHost {
49
+ /**
50
+ * Hostname to add
51
+ */
19
52
  host: string;
53
+ /**
54
+ * IP address this hostname should resolve to.
55
+ */
20
56
  ip: string;
21
57
  }
22
58
  export interface ContainerLabel {
59
+ /**
60
+ * Name of the label
61
+ */
23
62
  label: string;
63
+ /**
64
+ * Value of the label
65
+ */
24
66
  value: string;
25
67
  }
26
68
  export interface ContainerMount {
69
+ /**
70
+ * Optional configuration for the bind type.
71
+ */
27
72
  bindOptions?: outputs.ContainerMountBindOptions;
73
+ /**
74
+ * Whether the mount should be read-only.
75
+ */
28
76
  readOnly?: boolean;
77
+ /**
78
+ * Mount source (e.g. a volume name, a host path).
79
+ */
29
80
  source?: string;
81
+ /**
82
+ * Container path
83
+ */
30
84
  target: string;
85
+ /**
86
+ * Optional configuration for the tmpfs type.
87
+ */
31
88
  tmpfsOptions?: outputs.ContainerMountTmpfsOptions;
89
+ /**
90
+ * The mount type
91
+ */
32
92
  type: string;
93
+ /**
94
+ * Optional configuration for the volume type.
95
+ */
33
96
  volumeOptions?: outputs.ContainerMountVolumeOptions;
34
97
  }
35
98
  export interface ContainerMountBindOptions {
@@ -44,25 +107,40 @@ export interface ContainerMountVolumeOptions {
44
107
  driverOptions?: {
45
108
  [key: string]: string;
46
109
  };
110
+ /**
111
+ * User-defined key/value metadata
112
+ */
47
113
  labels?: outputs.ContainerMountVolumeOptionsLabel[];
48
114
  noCopy?: boolean;
49
115
  }
50
116
  export interface ContainerMountVolumeOptionsLabel {
117
+ /**
118
+ * Name of the label
119
+ */
51
120
  label: string;
121
+ /**
122
+ * Value of the label
123
+ */
52
124
  value: string;
53
125
  }
54
126
  export interface ContainerNetworkData {
55
127
  /**
128
+ * The network gateway of the container.
129
+ *
56
130
  * @deprecated Use `network_data` instead. The network gateway of the container as read from its NetworkSettings.
57
131
  */
58
132
  gateway: string;
59
133
  globalIpv6Address: string;
60
134
  globalIpv6PrefixLength: number;
61
135
  /**
136
+ * The IP address of the container.
137
+ *
62
138
  * @deprecated Use `network_data` instead. The IP address of the container's first network it.
63
139
  */
64
140
  ipAddress: string;
65
141
  /**
142
+ * The IP prefix length of the container.
143
+ *
66
144
  * @deprecated Use `network_data` instead. The IP prefix length of the container as read from its NetworkSettings.
67
145
  */
68
146
  ipPrefixLength: number;
@@ -70,35 +148,98 @@ export interface ContainerNetworkData {
70
148
  networkName: string;
71
149
  }
72
150
  export interface ContainerNetworksAdvanced {
151
+ /**
152
+ * The network aliases of the container in the specific network.
153
+ */
73
154
  aliases?: string[];
155
+ /**
156
+ * The IPV4 address of the container in the specific network.
157
+ */
74
158
  ipv4Address?: string;
159
+ /**
160
+ * The IPV6 address of the container in the specific network.
161
+ */
75
162
  ipv6Address?: string;
163
+ /**
164
+ * The name or id of the network to use. You can use `name` or `id` attribute from a `docker.Network` resource.
165
+ */
76
166
  name: string;
77
167
  }
78
168
  export interface ContainerPort {
169
+ /**
170
+ * Port exposed out of the container. If not given a free random port `>= 32768` will be used.
171
+ */
79
172
  external: number;
173
+ /**
174
+ * Port within the container.
175
+ */
80
176
  internal: number;
177
+ /**
178
+ * IP address/mask that can access this port. Defaults to `0.0.0.0`.
179
+ */
81
180
  ip?: string;
181
+ /**
182
+ * Protocol that can be used over this port. Defaults to `tcp`.
183
+ */
82
184
  protocol?: string;
83
185
  }
84
186
  export interface ContainerUlimit {
187
+ /**
188
+ * The hard limit
189
+ */
85
190
  hard: number;
191
+ /**
192
+ * The name of the ulimit
193
+ */
86
194
  name: string;
195
+ /**
196
+ * The soft limit
197
+ */
87
198
  soft: number;
88
199
  }
89
200
  export interface ContainerUpload {
201
+ /**
202
+ * Literal string value to use as the object content, which will be uploaded as UTF-8-encoded text. Conflicts with `contentBase64` & `source`
203
+ */
90
204
  content?: string;
91
205
  contentBase64?: string;
206
+ /**
207
+ * If `true`, the file will be uploaded with user executable permission. Defaults to `false`.
208
+ */
92
209
  executable?: boolean;
210
+ /**
211
+ * Path to the file in the container where is upload goes to
212
+ */
93
213
  file: string;
214
+ /**
215
+ * A filename that references a file which will be uploaded as the object content. This allows for large file uploads that do not get stored in state. Conflicts with `content` & `contentBase64`
216
+ */
94
217
  source?: string;
218
+ /**
219
+ * If using `source`, this will force an update if the file content has updated but the filename has not.
220
+ */
95
221
  sourceHash?: string;
96
222
  }
97
223
  export interface ContainerVolume {
224
+ /**
225
+ * The path in the container where the volume will be mounted.
226
+ */
98
227
  containerPath?: string;
228
+ /**
229
+ * The container where the volume is coming from.
230
+ */
99
231
  fromContainer?: string;
232
+ /**
233
+ * The path on the host where the volume is coming from.
234
+ */
100
235
  hostPath?: string;
236
+ /**
237
+ * If `true`, this volume will be readonly. Defaults to `false`.
238
+ */
101
239
  readOnly?: boolean;
240
+ /**
241
+ * The name of the docker volume which should be mounted.
242
+ */
102
243
  volumeName?: string;
103
244
  }
104
245
  export interface GetNetworkIpamConfig {
@@ -110,57 +251,177 @@ export interface GetNetworkIpamConfig {
110
251
  subnet?: string;
111
252
  }
112
253
  export interface NetworkIpamConfig {
254
+ /**
255
+ * Auxiliary IPv4 or IPv6 addresses used by Network driver
256
+ */
113
257
  auxAddress?: {
114
258
  [key: string]: any;
115
259
  };
260
+ /**
261
+ * The IP address of the gateway
262
+ */
116
263
  gateway?: string;
264
+ /**
265
+ * The ip range in CIDR form
266
+ */
117
267
  ipRange?: string;
268
+ /**
269
+ * The subnet in CIDR form
270
+ */
118
271
  subnet?: string;
119
272
  }
120
273
  export interface NetworkLabel {
274
+ /**
275
+ * Name of the label
276
+ */
121
277
  label: string;
278
+ /**
279
+ * Value of the label
280
+ */
122
281
  value: string;
123
282
  }
124
283
  export interface PluginGrantPermission {
284
+ /**
285
+ * The name of the permission
286
+ */
125
287
  name: string;
288
+ /**
289
+ * The value of the permission
290
+ */
126
291
  values: string[];
127
292
  }
128
293
  export interface RegistryImageBuild {
294
+ /**
295
+ * The configuration for the authentication
296
+ */
129
297
  authConfigs?: outputs.RegistryImageBuildAuthConfig[];
298
+ /**
299
+ * Pairs for build-time variables in the form TODO
300
+ */
130
301
  buildArgs?: {
131
302
  [key: string]: string;
132
303
  };
304
+ /**
305
+ * BuildID is an optional identifier that can be passed together with the build request. The same identifier can be used to gracefully cancel the build with the cancel request.
306
+ */
133
307
  buildId?: string;
308
+ /**
309
+ * Images to consider as cache sources
310
+ */
134
311
  cacheFroms?: string[];
312
+ /**
313
+ * Optional parent cgroup for the container
314
+ */
135
315
  cgroupParent?: string;
316
+ /**
317
+ * The absolute path to the context folder. You can use the helper function '${path.cwd}/context-dir'.
318
+ */
136
319
  context: string;
320
+ /**
321
+ * The length of a CPU period in microseconds
322
+ */
137
323
  cpuPeriod?: number;
324
+ /**
325
+ * Microseconds of CPU time that the container can get in a CPU period
326
+ */
138
327
  cpuQuota?: number;
328
+ /**
329
+ * CPUs in which to allow execution (e.g., `0-3`, `0`, `1`)
330
+ */
139
331
  cpuSetCpus?: string;
332
+ /**
333
+ * MEMs in which to allow execution (`0-3`, `0`, `1`)
334
+ */
140
335
  cpuSetMems?: string;
336
+ /**
337
+ * CPU shares (relative weight)
338
+ */
141
339
  cpuShares?: number;
340
+ /**
341
+ * Dockerfile file. Defaults to `Dockerfile`
342
+ */
142
343
  dockerfile?: string;
344
+ /**
345
+ * A list of hostnames/IP mappings to add to the container’s /etc/hosts file. Specified in the form ["hostname:IP"]
346
+ */
143
347
  extraHosts?: string[];
348
+ /**
349
+ * Always remove intermediate containers
350
+ */
144
351
  forceRemove?: boolean;
352
+ /**
353
+ * Isolation represents the isolation technology of a container. The supported values are
354
+ */
145
355
  isolation?: string;
356
+ /**
357
+ * User-defined key/value metadata
358
+ */
146
359
  labels?: {
147
360
  [key: string]: string;
148
361
  };
362
+ /**
363
+ * Set memory limit for build
364
+ */
149
365
  memory?: number;
366
+ /**
367
+ * Total memory (memory + swap), -1 to enable unlimited swap
368
+ */
150
369
  memorySwap?: number;
370
+ /**
371
+ * Set the networking mode for the RUN instructions during build
372
+ */
151
373
  networkMode?: string;
374
+ /**
375
+ * Do not use the cache when building the image
376
+ */
152
377
  noCache?: boolean;
378
+ /**
379
+ * Set platform if server is multi-platform capable
380
+ */
153
381
  platform?: string;
382
+ /**
383
+ * Attempt to pull the image even if an older image exists locally
384
+ */
154
385
  pullParent?: boolean;
386
+ /**
387
+ * A Git repository URI or HTTP/HTTPS context URI
388
+ */
155
389
  remoteContext?: string;
390
+ /**
391
+ * Remove intermediate containers after a successful build (default behavior)
392
+ */
156
393
  remove?: boolean;
394
+ /**
395
+ * The security options
396
+ */
157
397
  securityOpts?: string[];
398
+ /**
399
+ * Set an ID for the build session
400
+ */
158
401
  sessionId?: string;
402
+ /**
403
+ * Size of /dev/shm in bytes. The size must be greater than 0
404
+ */
159
405
  shmSize?: number;
406
+ /**
407
+ * If true the new layers are squashed into a new image with a single new layer
408
+ */
160
409
  squash?: boolean;
410
+ /**
411
+ * Suppress the build output and print image ID on success
412
+ */
161
413
  suppressOutput?: boolean;
414
+ /**
415
+ * Set the target build stage to build
416
+ */
162
417
  target?: string;
418
+ /**
419
+ * Configuration for ulimits
420
+ */
163
421
  ulimits?: outputs.RegistryImageBuildUlimit[];
422
+ /**
423
+ * Version of the underlying builder to use
424
+ */
164
425
  version?: string;
165
426
  }
166
427
  export interface RegistryImageBuildAuthConfig {
@@ -175,42 +436,102 @@ export interface RegistryImageBuildAuthConfig {
175
436
  }
176
437
  export interface RegistryImageBuildUlimit {
177
438
  hard: number;
439
+ /**
440
+ * The name of the Docker image.
441
+ */
178
442
  name: string;
179
443
  soft: number;
180
444
  }
181
445
  export interface RemoteImageBuild {
446
+ /**
447
+ * Set build-time variables
448
+ */
182
449
  buildArg?: {
183
450
  [key: string]: string;
184
451
  };
452
+ /**
453
+ * Name of the Dockerfile. Defaults to `Dockerfile`.
454
+ */
185
455
  dockerfile?: string;
456
+ /**
457
+ * Always remove intermediate containers
458
+ */
186
459
  forceRemove?: boolean;
460
+ /**
461
+ * Set metadata for an image
462
+ */
187
463
  label?: {
188
464
  [key: string]: string;
189
465
  };
466
+ /**
467
+ * Do not use cache when building the image
468
+ */
190
469
  noCache?: boolean;
470
+ /**
471
+ * Context path
472
+ */
191
473
  path: string;
474
+ /**
475
+ * Remove intermediate containers after a successful build. Defaults to `true`.
476
+ */
192
477
  remove?: boolean;
478
+ /**
479
+ * Name and optionally a tag in the 'name:tag' format
480
+ */
193
481
  tags?: string[];
482
+ /**
483
+ * Set the target build stage to build
484
+ */
194
485
  target?: string;
195
486
  }
196
487
  export interface SecretLabel {
488
+ /**
489
+ * Name of the label
490
+ */
197
491
  label: string;
492
+ /**
493
+ * Value of the label
494
+ */
198
495
  value: string;
199
496
  }
200
497
  export interface ServiceAuth {
498
+ /**
499
+ * The password
500
+ */
201
501
  password?: string;
502
+ /**
503
+ * The address of the server for the authentication
504
+ */
202
505
  serverAddress: string;
506
+ /**
507
+ * The username
508
+ */
203
509
  username?: string;
204
510
  }
205
511
  export interface ServiceConvergeConfig {
512
+ /**
513
+ * The interval to check if the desired state is reached `(ms|s)`. Defaults to `7s`.
514
+ */
206
515
  delay?: string;
516
+ /**
517
+ * The timeout of the service to reach the desired state `(s|m)`. Defaults to `3m`
518
+ */
207
519
  timeout?: string;
208
520
  }
209
521
  export interface ServiceEndpointSpec {
522
+ /**
523
+ * The mode of resolution to use for internal load balancing between tasks
524
+ */
210
525
  mode: string;
526
+ /**
527
+ * List of exposed ports that this service is accessible on from the outside. Ports can only be provided if 'vip' resolution mode is used
528
+ */
211
529
  ports?: outputs.ServiceEndpointSpecPort[];
212
530
  }
213
531
  export interface ServiceEndpointSpecPort {
532
+ /**
533
+ * Name of the service
534
+ */
214
535
  name?: string;
215
536
  protocol?: string;
216
537
  publishMode?: string;
@@ -218,32 +539,86 @@ export interface ServiceEndpointSpecPort {
218
539
  targetPort: number;
219
540
  }
220
541
  export interface ServiceLabel {
542
+ /**
543
+ * Name of the label
544
+ */
221
545
  label: string;
546
+ /**
547
+ * Value of the label
548
+ */
222
549
  value: string;
223
550
  }
224
551
  export interface ServiceMode {
552
+ /**
553
+ * The global service mode. Defaults to `false`
554
+ */
225
555
  global?: boolean;
556
+ /**
557
+ * The replicated service mode
558
+ */
226
559
  replicated: outputs.ServiceModeReplicated;
227
560
  }
228
561
  export interface ServiceModeReplicated {
229
562
  replicas?: number;
230
563
  }
231
564
  export interface ServiceRollbackConfig {
565
+ /**
566
+ * Delay between task rollbacks (ns|us|ms|s|m|h). Defaults to `0s`.
567
+ */
232
568
  delay?: string;
569
+ /**
570
+ * Action on rollback failure: pause | continue. Defaults to `pause`.
571
+ */
233
572
  failureAction?: string;
573
+ /**
574
+ * Failure rate to tolerate during a rollback. Defaults to `0.0`.
575
+ */
234
576
  maxFailureRatio?: string;
577
+ /**
578
+ * Duration after each task rollback to monitor for failure (ns|us|ms|s|m|h). Defaults to `5s`.
579
+ */
235
580
  monitor?: string;
581
+ /**
582
+ * Rollback order: either 'stop-first' or 'start-first'. Defaults to `stop-first`.
583
+ */
236
584
  order?: string;
585
+ /**
586
+ * Maximum number of tasks to be rollbacked in one iteration. Defaults to `1`
587
+ */
237
588
  parallelism?: number;
238
589
  }
239
590
  export interface ServiceTaskSpec {
591
+ /**
592
+ * The spec for each container
593
+ */
240
594
  containerSpec: outputs.ServiceTaskSpecContainerSpec;
595
+ /**
596
+ * A counter that triggers an update even if no relevant parameters have been changed. See the [spec](https://github.com/docker/swarmkit/blob/master/api/specs.proto#L126).
597
+ */
241
598
  forceUpdate: number;
599
+ /**
600
+ * Specifies the log driver to use for tasks created from this spec. If not present, the default one for the swarm will be used, finally falling back to the engine default if not specified
601
+ */
242
602
  logDriver?: outputs.ServiceTaskSpecLogDriver;
603
+ /**
604
+ * Ids of the networks in which the container will be put in
605
+ */
243
606
  networks?: string[];
607
+ /**
608
+ * The placement preferences
609
+ */
244
610
  placement: outputs.ServiceTaskSpecPlacement;
611
+ /**
612
+ * Resource requirements which apply to each individual container created as part of the service
613
+ */
245
614
  resources: outputs.ServiceTaskSpecResources;
615
+ /**
616
+ * Specification for the restart policy which applies to containers created as part of this service.
617
+ */
246
618
  restartPolicy: outputs.ServiceTaskSpecRestartPolicy;
619
+ /**
620
+ * Runtime is the type of runtime specified for the task executor. See the [types](https://github.com/moby/moby/blob/master/api/types/swarm/runtime.go).
621
+ */
247
622
  runtime: string;
248
623
  }
249
624
  export interface ServiceTaskSpecContainerSpec {
@@ -261,6 +636,9 @@ export interface ServiceTaskSpecContainerSpec {
261
636
  hosts?: outputs.ServiceTaskSpecContainerSpecHost[];
262
637
  image: string;
263
638
  isolation?: string;
639
+ /**
640
+ * User-defined key/value metadata
641
+ */
264
642
  labels?: outputs.ServiceTaskSpecContainerSpecLabel[];
265
643
  mounts?: outputs.ServiceTaskSpecContainerSpecMount[];
266
644
  privileges?: outputs.ServiceTaskSpecContainerSpecPrivileges;
@@ -295,7 +673,13 @@ export interface ServiceTaskSpecContainerSpecHost {
295
673
  ip: string;
296
674
  }
297
675
  export interface ServiceTaskSpecContainerSpecLabel {
676
+ /**
677
+ * Name of the label
678
+ */
298
679
  label: string;
680
+ /**
681
+ * Value of the label
682
+ */
299
683
  value: string;
300
684
  }
301
685
  export interface ServiceTaskSpecContainerSpecMount {
@@ -311,6 +695,9 @@ export interface ServiceTaskSpecContainerSpecMountBindOptions {
311
695
  propagation?: string;
312
696
  }
313
697
  export interface ServiceTaskSpecContainerSpecMountTmpfsOptions {
698
+ /**
699
+ * Scheduling mode for the service
700
+ */
314
701
  mode?: number;
315
702
  sizeBytes?: number;
316
703
  }
@@ -319,11 +706,20 @@ export interface ServiceTaskSpecContainerSpecMountVolumeOptions {
319
706
  driverOptions?: {
320
707
  [key: string]: string;
321
708
  };
709
+ /**
710
+ * User-defined key/value metadata
711
+ */
322
712
  labels?: outputs.ServiceTaskSpecContainerSpecMountVolumeOptionsLabel[];
323
713
  noCopy?: boolean;
324
714
  }
325
715
  export interface ServiceTaskSpecContainerSpecMountVolumeOptionsLabel {
716
+ /**
717
+ * Name of the label
718
+ */
326
719
  label: string;
720
+ /**
721
+ * Value of the label
722
+ */
327
723
  value: string;
328
724
  }
329
725
  export interface ServiceTaskSpecContainerSpecPrivileges {
@@ -350,6 +746,9 @@ export interface ServiceTaskSpecContainerSpecSecret {
350
746
  secretName?: string;
351
747
  }
352
748
  export interface ServiceTaskSpecLogDriver {
749
+ /**
750
+ * Name of the service
751
+ */
353
752
  name: string;
354
753
  options?: {
355
754
  [key: string]: string;
@@ -389,15 +788,39 @@ export interface ServiceTaskSpecRestartPolicy {
389
788
  window?: string;
390
789
  }
391
790
  export interface ServiceUpdateConfig {
791
+ /**
792
+ * Delay between task updates `(ns|us|ms|s|m|h)`. Defaults to `0s`.
793
+ */
392
794
  delay?: string;
795
+ /**
796
+ * Action on update failure: `pause`, `continue` or `rollback`. Defaults to `pause`.
797
+ */
393
798
  failureAction?: string;
799
+ /**
800
+ * Failure rate to tolerate during an update. Defaults to `0.0`.
801
+ */
394
802
  maxFailureRatio?: string;
803
+ /**
804
+ * Duration after each task update to monitor for failure (ns|us|ms|s|m|h). Defaults to `5s`.
805
+ */
395
806
  monitor?: string;
807
+ /**
808
+ * Update order: either 'stop-first' or 'start-first'. Defaults to `stop-first`.
809
+ */
396
810
  order?: string;
811
+ /**
812
+ * Maximum number of tasks to be updated in one iteration. Defaults to `1`
813
+ */
397
814
  parallelism?: number;
398
815
  }
399
816
  export interface VolumeLabel {
817
+ /**
818
+ * Name of the label
819
+ */
400
820
  label: string;
821
+ /**
822
+ * Value of the label
823
+ */
401
824
  value: string;
402
825
  }
403
826
  export declare namespace config {