pulumi-docker 4.6.0b4__py3-none-any.whl → 4.6.2__py3-none-any.whl

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.

Potentially problematic release.


This version of pulumi-docker might be problematic. Click here for more details.

@@ -1,2399 +0,0 @@
1
- # coding=utf-8
2
- # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
3
- # *** Do not edit by hand unless you're certain you know what you are doing! ***
4
-
5
- import copy
6
- import warnings
7
- import pulumi
8
- import pulumi.runtime
9
- from typing import Any, Mapping, Optional, Sequence, Union, overload
10
- from .. import _utilities
11
- from . import outputs
12
- from ._enums import *
13
-
14
- __all__ = [
15
- 'BuildContext',
16
- 'BuilderConfig',
17
- 'CacheFrom',
18
- 'CacheFromAzureBlob',
19
- 'CacheFromGitHubActions',
20
- 'CacheFromLocal',
21
- 'CacheFromRegistry',
22
- 'CacheFromS3',
23
- 'CacheTo',
24
- 'CacheToAzureBlob',
25
- 'CacheToGitHubActions',
26
- 'CacheToInline',
27
- 'CacheToLocal',
28
- 'CacheToRegistry',
29
- 'CacheToS3',
30
- 'Context',
31
- 'Dockerfile',
32
- 'Export',
33
- 'ExportCacheOnly',
34
- 'ExportDocker',
35
- 'ExportImage',
36
- 'ExportLocal',
37
- 'ExportOCI',
38
- 'ExportRegistry',
39
- 'ExportTar',
40
- 'RegistryAuth',
41
- 'SSH',
42
- ]
43
-
44
- @pulumi.output_type
45
- class BuildContext(dict):
46
- def __init__(__self__, *,
47
- location: str,
48
- named: Optional[Mapping[str, 'outputs.Context']] = None):
49
- """
50
- :param str location: Resources to use for build context.
51
-
52
- The location can be:
53
- * A relative or absolute path to a local directory (`.`, `./app`,
54
- `/app`, etc.).
55
- * A remote URL of a Git repository, tarball, or plain text file
56
- (`https://github.com/user/myrepo.git`, `http://server/context.tar.gz`,
57
- etc.).
58
- :param Mapping[str, 'ContextArgs'] named: Additional build contexts to use.
59
-
60
- These contexts are accessed with `FROM name` or `--from=name`
61
- statements when using Dockerfile 1.4+ syntax.
62
-
63
- Values can be local paths, HTTP URLs, or `docker-image://` images.
64
- """
65
- pulumi.set(__self__, "location", location)
66
- if named is not None:
67
- pulumi.set(__self__, "named", named)
68
-
69
- @property
70
- @pulumi.getter
71
- def location(self) -> str:
72
- """
73
- Resources to use for build context.
74
-
75
- The location can be:
76
- * A relative or absolute path to a local directory (`.`, `./app`,
77
- `/app`, etc.).
78
- * A remote URL of a Git repository, tarball, or plain text file
79
- (`https://github.com/user/myrepo.git`, `http://server/context.tar.gz`,
80
- etc.).
81
- """
82
- return pulumi.get(self, "location")
83
-
84
- @property
85
- @pulumi.getter
86
- def named(self) -> Optional[Mapping[str, 'outputs.Context']]:
87
- """
88
- Additional build contexts to use.
89
-
90
- These contexts are accessed with `FROM name` or `--from=name`
91
- statements when using Dockerfile 1.4+ syntax.
92
-
93
- Values can be local paths, HTTP URLs, or `docker-image://` images.
94
- """
95
- return pulumi.get(self, "named")
96
-
97
-
98
- @pulumi.output_type
99
- class BuilderConfig(dict):
100
- def __init__(__self__, *,
101
- name: Optional[str] = None):
102
- """
103
- :param str name: Name of an existing buildx builder to use.
104
-
105
- Only `docker-container`, `kubernetes`, or `remote` drivers are
106
- supported. The legacy `docker` driver is not supported.
107
-
108
- Equivalent to Docker's `--builder` flag.
109
- """
110
- if name is not None:
111
- pulumi.set(__self__, "name", name)
112
-
113
- @property
114
- @pulumi.getter
115
- def name(self) -> Optional[str]:
116
- """
117
- Name of an existing buildx builder to use.
118
-
119
- Only `docker-container`, `kubernetes`, or `remote` drivers are
120
- supported. The legacy `docker` driver is not supported.
121
-
122
- Equivalent to Docker's `--builder` flag.
123
- """
124
- return pulumi.get(self, "name")
125
-
126
-
127
- @pulumi.output_type
128
- class CacheFrom(dict):
129
- def __init__(__self__, *,
130
- azblob: Optional['outputs.CacheFromAzureBlob'] = None,
131
- disabled: Optional[bool] = None,
132
- gha: Optional['outputs.CacheFromGitHubActions'] = None,
133
- local: Optional['outputs.CacheFromLocal'] = None,
134
- raw: Optional[str] = None,
135
- registry: Optional['outputs.CacheFromRegistry'] = None,
136
- s3: Optional['outputs.CacheFromS3'] = None):
137
- """
138
- :param 'CacheFromAzureBlobArgs' azblob: Upload build caches to Azure's blob storage service.
139
- :param bool disabled: When `true` this entry will be excluded. Defaults to `false`.
140
- :param 'CacheFromGitHubActionsArgs' gha: Recommended for use with GitHub Actions workflows.
141
-
142
- An action like `crazy-max/ghaction-github-runtime` is recommended to
143
- expose appropriate credentials to your GitHub workflow.
144
- :param 'CacheFromLocalArgs' local: A simple backend which caches images on your local filesystem.
145
- :param str raw: A raw string as you would provide it to the Docker CLI (e.g.,
146
- `type=inline`).
147
- :param 'CacheFromRegistryArgs' registry: Upload build caches to remote registries.
148
- :param 'CacheFromS3Args' s3: Upload build caches to AWS S3 or an S3-compatible services such as
149
- MinIO.
150
- """
151
- if azblob is not None:
152
- pulumi.set(__self__, "azblob", azblob)
153
- if disabled is not None:
154
- pulumi.set(__self__, "disabled", disabled)
155
- if gha is not None:
156
- pulumi.set(__self__, "gha", gha)
157
- if local is not None:
158
- pulumi.set(__self__, "local", local)
159
- if raw is not None:
160
- pulumi.set(__self__, "raw", raw)
161
- if registry is not None:
162
- pulumi.set(__self__, "registry", registry)
163
- if s3 is not None:
164
- pulumi.set(__self__, "s3", s3)
165
-
166
- @property
167
- @pulumi.getter
168
- def azblob(self) -> Optional['outputs.CacheFromAzureBlob']:
169
- """
170
- Upload build caches to Azure's blob storage service.
171
- """
172
- return pulumi.get(self, "azblob")
173
-
174
- @property
175
- @pulumi.getter
176
- def disabled(self) -> Optional[bool]:
177
- """
178
- When `true` this entry will be excluded. Defaults to `false`.
179
- """
180
- return pulumi.get(self, "disabled")
181
-
182
- @property
183
- @pulumi.getter
184
- def gha(self) -> Optional['outputs.CacheFromGitHubActions']:
185
- """
186
- Recommended for use with GitHub Actions workflows.
187
-
188
- An action like `crazy-max/ghaction-github-runtime` is recommended to
189
- expose appropriate credentials to your GitHub workflow.
190
- """
191
- return pulumi.get(self, "gha")
192
-
193
- @property
194
- @pulumi.getter
195
- def local(self) -> Optional['outputs.CacheFromLocal']:
196
- """
197
- A simple backend which caches images on your local filesystem.
198
- """
199
- return pulumi.get(self, "local")
200
-
201
- @property
202
- @pulumi.getter
203
- def raw(self) -> Optional[str]:
204
- """
205
- A raw string as you would provide it to the Docker CLI (e.g.,
206
- `type=inline`).
207
- """
208
- return pulumi.get(self, "raw")
209
-
210
- @property
211
- @pulumi.getter
212
- def registry(self) -> Optional['outputs.CacheFromRegistry']:
213
- """
214
- Upload build caches to remote registries.
215
- """
216
- return pulumi.get(self, "registry")
217
-
218
- @property
219
- @pulumi.getter
220
- def s3(self) -> Optional['outputs.CacheFromS3']:
221
- """
222
- Upload build caches to AWS S3 or an S3-compatible services such as
223
- MinIO.
224
- """
225
- return pulumi.get(self, "s3")
226
-
227
-
228
- @pulumi.output_type
229
- class CacheFromAzureBlob(dict):
230
- @staticmethod
231
- def __key_warning(key: str):
232
- suggest = None
233
- if key == "accountUrl":
234
- suggest = "account_url"
235
- elif key == "secretAccessKey":
236
- suggest = "secret_access_key"
237
-
238
- if suggest:
239
- pulumi.log.warn(f"Key '{key}' not found in CacheFromAzureBlob. Access the value via the '{suggest}' property getter instead.")
240
-
241
- def __getitem__(self, key: str) -> Any:
242
- CacheFromAzureBlob.__key_warning(key)
243
- return super().__getitem__(key)
244
-
245
- def get(self, key: str, default = None) -> Any:
246
- CacheFromAzureBlob.__key_warning(key)
247
- return super().get(key, default)
248
-
249
- def __init__(__self__, *,
250
- name: str,
251
- account_url: Optional[str] = None,
252
- secret_access_key: Optional[str] = None):
253
- """
254
- :param str name: The name of the cache image.
255
- :param str account_url: Base URL of the storage account.
256
- :param str secret_access_key: Blob storage account key.
257
- """
258
- pulumi.set(__self__, "name", name)
259
- if account_url is not None:
260
- pulumi.set(__self__, "account_url", account_url)
261
- if secret_access_key is not None:
262
- pulumi.set(__self__, "secret_access_key", secret_access_key)
263
-
264
- @property
265
- @pulumi.getter
266
- def name(self) -> str:
267
- """
268
- The name of the cache image.
269
- """
270
- return pulumi.get(self, "name")
271
-
272
- @property
273
- @pulumi.getter(name="accountUrl")
274
- def account_url(self) -> Optional[str]:
275
- """
276
- Base URL of the storage account.
277
- """
278
- return pulumi.get(self, "account_url")
279
-
280
- @property
281
- @pulumi.getter(name="secretAccessKey")
282
- def secret_access_key(self) -> Optional[str]:
283
- """
284
- Blob storage account key.
285
- """
286
- return pulumi.get(self, "secret_access_key")
287
-
288
-
289
- @pulumi.output_type
290
- class CacheFromGitHubActions(dict):
291
- def __init__(__self__, *,
292
- scope: Optional[str] = None,
293
- token: Optional[str] = None,
294
- url: Optional[str] = None):
295
- """
296
- :param str scope: The scope to use for cache keys. Defaults to `buildkit`.
297
-
298
- This should be set if building and caching multiple images in one
299
- workflow, otherwise caches will overwrite each other.
300
- :param str token: The GitHub Actions token to use. This is not a personal access tokens
301
- and is typically generated automatically as part of each job.
302
-
303
- Defaults to `$ACTIONS_RUNTIME_TOKEN`, although a separate action like
304
- `crazy-max/ghaction-github-runtime` is recommended to expose this
305
- environment variable to your jobs.
306
- :param str url: The cache server URL to use for artifacts.
307
-
308
- Defaults to `$ACTIONS_RUNTIME_URL`, although a separate action like
309
- `crazy-max/ghaction-github-runtime` is recommended to expose this
310
- environment variable to your jobs.
311
- """
312
- if scope is None:
313
- scope = (_utilities.get_env('buildkit') or '')
314
- if scope is not None:
315
- pulumi.set(__self__, "scope", scope)
316
- if token is None:
317
- token = (_utilities.get_env('ACTIONS_RUNTIME_TOKEN') or '')
318
- if token is not None:
319
- pulumi.set(__self__, "token", token)
320
- if url is None:
321
- url = (_utilities.get_env('ACTIONS_RUNTIME_URL') or '')
322
- if url is not None:
323
- pulumi.set(__self__, "url", url)
324
-
325
- @property
326
- @pulumi.getter
327
- def scope(self) -> Optional[str]:
328
- """
329
- The scope to use for cache keys. Defaults to `buildkit`.
330
-
331
- This should be set if building and caching multiple images in one
332
- workflow, otherwise caches will overwrite each other.
333
- """
334
- return pulumi.get(self, "scope")
335
-
336
- @property
337
- @pulumi.getter
338
- def token(self) -> Optional[str]:
339
- """
340
- The GitHub Actions token to use. This is not a personal access tokens
341
- and is typically generated automatically as part of each job.
342
-
343
- Defaults to `$ACTIONS_RUNTIME_TOKEN`, although a separate action like
344
- `crazy-max/ghaction-github-runtime` is recommended to expose this
345
- environment variable to your jobs.
346
- """
347
- return pulumi.get(self, "token")
348
-
349
- @property
350
- @pulumi.getter
351
- def url(self) -> Optional[str]:
352
- """
353
- The cache server URL to use for artifacts.
354
-
355
- Defaults to `$ACTIONS_RUNTIME_URL`, although a separate action like
356
- `crazy-max/ghaction-github-runtime` is recommended to expose this
357
- environment variable to your jobs.
358
- """
359
- return pulumi.get(self, "url")
360
-
361
-
362
- @pulumi.output_type
363
- class CacheFromLocal(dict):
364
- def __init__(__self__, *,
365
- src: str,
366
- digest: Optional[str] = None):
367
- """
368
- :param str src: Path of the local directory where cache gets imported from.
369
- :param str digest: Digest of manifest to import.
370
- """
371
- pulumi.set(__self__, "src", src)
372
- if digest is not None:
373
- pulumi.set(__self__, "digest", digest)
374
-
375
- @property
376
- @pulumi.getter
377
- def src(self) -> str:
378
- """
379
- Path of the local directory where cache gets imported from.
380
- """
381
- return pulumi.get(self, "src")
382
-
383
- @property
384
- @pulumi.getter
385
- def digest(self) -> Optional[str]:
386
- """
387
- Digest of manifest to import.
388
- """
389
- return pulumi.get(self, "digest")
390
-
391
-
392
- @pulumi.output_type
393
- class CacheFromRegistry(dict):
394
- def __init__(__self__, *,
395
- ref: str):
396
- """
397
- :param str ref: Fully qualified name of the cache image to import.
398
- """
399
- pulumi.set(__self__, "ref", ref)
400
-
401
- @property
402
- @pulumi.getter
403
- def ref(self) -> str:
404
- """
405
- Fully qualified name of the cache image to import.
406
- """
407
- return pulumi.get(self, "ref")
408
-
409
-
410
- @pulumi.output_type
411
- class CacheFromS3(dict):
412
- @staticmethod
413
- def __key_warning(key: str):
414
- suggest = None
415
- if key == "accessKeyId":
416
- suggest = "access_key_id"
417
- elif key == "blobsPrefix":
418
- suggest = "blobs_prefix"
419
- elif key == "endpointUrl":
420
- suggest = "endpoint_url"
421
- elif key == "manifestsPrefix":
422
- suggest = "manifests_prefix"
423
- elif key == "secretAccessKey":
424
- suggest = "secret_access_key"
425
- elif key == "sessionToken":
426
- suggest = "session_token"
427
- elif key == "usePathStyle":
428
- suggest = "use_path_style"
429
-
430
- if suggest:
431
- pulumi.log.warn(f"Key '{key}' not found in CacheFromS3. Access the value via the '{suggest}' property getter instead.")
432
-
433
- def __getitem__(self, key: str) -> Any:
434
- CacheFromS3.__key_warning(key)
435
- return super().__getitem__(key)
436
-
437
- def get(self, key: str, default = None) -> Any:
438
- CacheFromS3.__key_warning(key)
439
- return super().get(key, default)
440
-
441
- def __init__(__self__, *,
442
- bucket: str,
443
- region: Optional[str] = None,
444
- access_key_id: Optional[str] = None,
445
- blobs_prefix: Optional[str] = None,
446
- endpoint_url: Optional[str] = None,
447
- manifests_prefix: Optional[str] = None,
448
- name: Optional[str] = None,
449
- secret_access_key: Optional[str] = None,
450
- session_token: Optional[str] = None,
451
- use_path_style: Optional[bool] = None):
452
- """
453
- :param str bucket: Name of the S3 bucket.
454
- :param str region: The geographic location of the bucket. Defaults to `$AWS_REGION`.
455
- :param str access_key_id: Defaults to `$AWS_ACCESS_KEY_ID`.
456
- :param str blobs_prefix: Prefix to prepend to blob filenames.
457
- :param str endpoint_url: Endpoint of the S3 bucket.
458
- :param str manifests_prefix: Prefix to prepend on manifest filenames.
459
- :param str name: Name of the cache image.
460
- :param str secret_access_key: Defaults to `$AWS_SECRET_ACCESS_KEY`.
461
- :param str session_token: Defaults to `$AWS_SESSION_TOKEN`.
462
- :param bool use_path_style: Uses `bucket` in the URL instead of hostname when `true`.
463
- """
464
- pulumi.set(__self__, "bucket", bucket)
465
- if region is None:
466
- region = (_utilities.get_env('AWS_REGION') or '')
467
- pulumi.set(__self__, "region", region)
468
- if access_key_id is None:
469
- access_key_id = (_utilities.get_env('AWS_ACCESS_KEY_ID') or '')
470
- if access_key_id is not None:
471
- pulumi.set(__self__, "access_key_id", access_key_id)
472
- if blobs_prefix is not None:
473
- pulumi.set(__self__, "blobs_prefix", blobs_prefix)
474
- if endpoint_url is not None:
475
- pulumi.set(__self__, "endpoint_url", endpoint_url)
476
- if manifests_prefix is not None:
477
- pulumi.set(__self__, "manifests_prefix", manifests_prefix)
478
- if name is not None:
479
- pulumi.set(__self__, "name", name)
480
- if secret_access_key is None:
481
- secret_access_key = (_utilities.get_env('AWS_SECRET_ACCESS_KEY') or '')
482
- if secret_access_key is not None:
483
- pulumi.set(__self__, "secret_access_key", secret_access_key)
484
- if session_token is None:
485
- session_token = (_utilities.get_env('AWS_SESSION_TOKEN') or '')
486
- if session_token is not None:
487
- pulumi.set(__self__, "session_token", session_token)
488
- if use_path_style is not None:
489
- pulumi.set(__self__, "use_path_style", use_path_style)
490
-
491
- @property
492
- @pulumi.getter
493
- def bucket(self) -> str:
494
- """
495
- Name of the S3 bucket.
496
- """
497
- return pulumi.get(self, "bucket")
498
-
499
- @property
500
- @pulumi.getter
501
- def region(self) -> str:
502
- """
503
- The geographic location of the bucket. Defaults to `$AWS_REGION`.
504
- """
505
- return pulumi.get(self, "region")
506
-
507
- @property
508
- @pulumi.getter(name="accessKeyId")
509
- def access_key_id(self) -> Optional[str]:
510
- """
511
- Defaults to `$AWS_ACCESS_KEY_ID`.
512
- """
513
- return pulumi.get(self, "access_key_id")
514
-
515
- @property
516
- @pulumi.getter(name="blobsPrefix")
517
- def blobs_prefix(self) -> Optional[str]:
518
- """
519
- Prefix to prepend to blob filenames.
520
- """
521
- return pulumi.get(self, "blobs_prefix")
522
-
523
- @property
524
- @pulumi.getter(name="endpointUrl")
525
- def endpoint_url(self) -> Optional[str]:
526
- """
527
- Endpoint of the S3 bucket.
528
- """
529
- return pulumi.get(self, "endpoint_url")
530
-
531
- @property
532
- @pulumi.getter(name="manifestsPrefix")
533
- def manifests_prefix(self) -> Optional[str]:
534
- """
535
- Prefix to prepend on manifest filenames.
536
- """
537
- return pulumi.get(self, "manifests_prefix")
538
-
539
- @property
540
- @pulumi.getter
541
- def name(self) -> Optional[str]:
542
- """
543
- Name of the cache image.
544
- """
545
- return pulumi.get(self, "name")
546
-
547
- @property
548
- @pulumi.getter(name="secretAccessKey")
549
- def secret_access_key(self) -> Optional[str]:
550
- """
551
- Defaults to `$AWS_SECRET_ACCESS_KEY`.
552
- """
553
- return pulumi.get(self, "secret_access_key")
554
-
555
- @property
556
- @pulumi.getter(name="sessionToken")
557
- def session_token(self) -> Optional[str]:
558
- """
559
- Defaults to `$AWS_SESSION_TOKEN`.
560
- """
561
- return pulumi.get(self, "session_token")
562
-
563
- @property
564
- @pulumi.getter(name="usePathStyle")
565
- def use_path_style(self) -> Optional[bool]:
566
- """
567
- Uses `bucket` in the URL instead of hostname when `true`.
568
- """
569
- return pulumi.get(self, "use_path_style")
570
-
571
-
572
- @pulumi.output_type
573
- class CacheTo(dict):
574
- def __init__(__self__, *,
575
- azblob: Optional['outputs.CacheToAzureBlob'] = None,
576
- disabled: Optional[bool] = None,
577
- gha: Optional['outputs.CacheToGitHubActions'] = None,
578
- inline: Optional['outputs.CacheToInline'] = None,
579
- local: Optional['outputs.CacheToLocal'] = None,
580
- raw: Optional[str] = None,
581
- registry: Optional['outputs.CacheToRegistry'] = None,
582
- s3: Optional['outputs.CacheToS3'] = None):
583
- """
584
- :param 'CacheToAzureBlobArgs' azblob: Push cache to Azure's blob storage service.
585
- :param bool disabled: When `true` this entry will be excluded. Defaults to `false`.
586
- :param 'CacheToGitHubActionsArgs' gha: Recommended for use with GitHub Actions workflows.
587
-
588
- An action like `crazy-max/ghaction-github-runtime` is recommended to
589
- expose appropriate credentials to your GitHub workflow.
590
- :param 'CacheToInlineArgs' inline: The inline cache storage backend is the simplest implementation to get
591
- started with, but it does not handle multi-stage builds. Consider the
592
- `registry` cache backend instead.
593
- :param 'CacheToLocalArgs' local: A simple backend which caches imagines on your local filesystem.
594
- :param str raw: A raw string as you would provide it to the Docker CLI (e.g.,
595
- `type=inline`)
596
- :param 'CacheToRegistryArgs' registry: Push caches to remote registries. Incompatible with the `docker` build
597
- driver.
598
- :param 'CacheToS3Args' s3: Push cache to AWS S3 or S3-compatible services such as MinIO.
599
- """
600
- if azblob is not None:
601
- pulumi.set(__self__, "azblob", azblob)
602
- if disabled is not None:
603
- pulumi.set(__self__, "disabled", disabled)
604
- if gha is not None:
605
- pulumi.set(__self__, "gha", gha)
606
- if inline is not None:
607
- pulumi.set(__self__, "inline", inline)
608
- if local is not None:
609
- pulumi.set(__self__, "local", local)
610
- if raw is not None:
611
- pulumi.set(__self__, "raw", raw)
612
- if registry is not None:
613
- pulumi.set(__self__, "registry", registry)
614
- if s3 is not None:
615
- pulumi.set(__self__, "s3", s3)
616
-
617
- @property
618
- @pulumi.getter
619
- def azblob(self) -> Optional['outputs.CacheToAzureBlob']:
620
- """
621
- Push cache to Azure's blob storage service.
622
- """
623
- return pulumi.get(self, "azblob")
624
-
625
- @property
626
- @pulumi.getter
627
- def disabled(self) -> Optional[bool]:
628
- """
629
- When `true` this entry will be excluded. Defaults to `false`.
630
- """
631
- return pulumi.get(self, "disabled")
632
-
633
- @property
634
- @pulumi.getter
635
- def gha(self) -> Optional['outputs.CacheToGitHubActions']:
636
- """
637
- Recommended for use with GitHub Actions workflows.
638
-
639
- An action like `crazy-max/ghaction-github-runtime` is recommended to
640
- expose appropriate credentials to your GitHub workflow.
641
- """
642
- return pulumi.get(self, "gha")
643
-
644
- @property
645
- @pulumi.getter
646
- def inline(self) -> Optional['outputs.CacheToInline']:
647
- """
648
- The inline cache storage backend is the simplest implementation to get
649
- started with, but it does not handle multi-stage builds. Consider the
650
- `registry` cache backend instead.
651
- """
652
- return pulumi.get(self, "inline")
653
-
654
- @property
655
- @pulumi.getter
656
- def local(self) -> Optional['outputs.CacheToLocal']:
657
- """
658
- A simple backend which caches imagines on your local filesystem.
659
- """
660
- return pulumi.get(self, "local")
661
-
662
- @property
663
- @pulumi.getter
664
- def raw(self) -> Optional[str]:
665
- """
666
- A raw string as you would provide it to the Docker CLI (e.g.,
667
- `type=inline`)
668
- """
669
- return pulumi.get(self, "raw")
670
-
671
- @property
672
- @pulumi.getter
673
- def registry(self) -> Optional['outputs.CacheToRegistry']:
674
- """
675
- Push caches to remote registries. Incompatible with the `docker` build
676
- driver.
677
- """
678
- return pulumi.get(self, "registry")
679
-
680
- @property
681
- @pulumi.getter
682
- def s3(self) -> Optional['outputs.CacheToS3']:
683
- """
684
- Push cache to AWS S3 or S3-compatible services such as MinIO.
685
- """
686
- return pulumi.get(self, "s3")
687
-
688
-
689
- @pulumi.output_type
690
- class CacheToAzureBlob(dict):
691
- @staticmethod
692
- def __key_warning(key: str):
693
- suggest = None
694
- if key == "accountUrl":
695
- suggest = "account_url"
696
- elif key == "ignoreError":
697
- suggest = "ignore_error"
698
- elif key == "secretAccessKey":
699
- suggest = "secret_access_key"
700
-
701
- if suggest:
702
- pulumi.log.warn(f"Key '{key}' not found in CacheToAzureBlob. Access the value via the '{suggest}' property getter instead.")
703
-
704
- def __getitem__(self, key: str) -> Any:
705
- CacheToAzureBlob.__key_warning(key)
706
- return super().__getitem__(key)
707
-
708
- def get(self, key: str, default = None) -> Any:
709
- CacheToAzureBlob.__key_warning(key)
710
- return super().get(key, default)
711
-
712
- def __init__(__self__, *,
713
- name: str,
714
- account_url: Optional[str] = None,
715
- ignore_error: Optional[bool] = None,
716
- mode: Optional['CacheMode'] = None,
717
- secret_access_key: Optional[str] = None):
718
- """
719
- :param str name: The name of the cache image.
720
- :param str account_url: Base URL of the storage account.
721
- :param bool ignore_error: Ignore errors caused by failed cache exports.
722
- :param 'CacheMode' mode: The cache mode to use. Defaults to `min`.
723
- :param str secret_access_key: Blob storage account key.
724
- """
725
- pulumi.set(__self__, "name", name)
726
- if account_url is not None:
727
- pulumi.set(__self__, "account_url", account_url)
728
- if ignore_error is None:
729
- ignore_error = False
730
- if ignore_error is not None:
731
- pulumi.set(__self__, "ignore_error", ignore_error)
732
- if mode is None:
733
- mode = 'min'
734
- if mode is not None:
735
- pulumi.set(__self__, "mode", mode)
736
- if secret_access_key is not None:
737
- pulumi.set(__self__, "secret_access_key", secret_access_key)
738
-
739
- @property
740
- @pulumi.getter
741
- def name(self) -> str:
742
- """
743
- The name of the cache image.
744
- """
745
- return pulumi.get(self, "name")
746
-
747
- @property
748
- @pulumi.getter(name="accountUrl")
749
- def account_url(self) -> Optional[str]:
750
- """
751
- Base URL of the storage account.
752
- """
753
- return pulumi.get(self, "account_url")
754
-
755
- @property
756
- @pulumi.getter(name="ignoreError")
757
- def ignore_error(self) -> Optional[bool]:
758
- """
759
- Ignore errors caused by failed cache exports.
760
- """
761
- return pulumi.get(self, "ignore_error")
762
-
763
- @property
764
- @pulumi.getter
765
- def mode(self) -> Optional['CacheMode']:
766
- """
767
- The cache mode to use. Defaults to `min`.
768
- """
769
- return pulumi.get(self, "mode")
770
-
771
- @property
772
- @pulumi.getter(name="secretAccessKey")
773
- def secret_access_key(self) -> Optional[str]:
774
- """
775
- Blob storage account key.
776
- """
777
- return pulumi.get(self, "secret_access_key")
778
-
779
-
780
- @pulumi.output_type
781
- class CacheToGitHubActions(dict):
782
- @staticmethod
783
- def __key_warning(key: str):
784
- suggest = None
785
- if key == "ignoreError":
786
- suggest = "ignore_error"
787
-
788
- if suggest:
789
- pulumi.log.warn(f"Key '{key}' not found in CacheToGitHubActions. Access the value via the '{suggest}' property getter instead.")
790
-
791
- def __getitem__(self, key: str) -> Any:
792
- CacheToGitHubActions.__key_warning(key)
793
- return super().__getitem__(key)
794
-
795
- def get(self, key: str, default = None) -> Any:
796
- CacheToGitHubActions.__key_warning(key)
797
- return super().get(key, default)
798
-
799
- def __init__(__self__, *,
800
- ignore_error: Optional[bool] = None,
801
- mode: Optional['CacheMode'] = None,
802
- scope: Optional[str] = None,
803
- token: Optional[str] = None,
804
- url: Optional[str] = None):
805
- """
806
- :param bool ignore_error: Ignore errors caused by failed cache exports.
807
- :param 'CacheMode' mode: The cache mode to use. Defaults to `min`.
808
- :param str scope: The scope to use for cache keys. Defaults to `buildkit`.
809
-
810
- This should be set if building and caching multiple images in one
811
- workflow, otherwise caches will overwrite each other.
812
- :param str token: The GitHub Actions token to use. This is not a personal access tokens
813
- and is typically generated automatically as part of each job.
814
-
815
- Defaults to `$ACTIONS_RUNTIME_TOKEN`, although a separate action like
816
- `crazy-max/ghaction-github-runtime` is recommended to expose this
817
- environment variable to your jobs.
818
- :param str url: The cache server URL to use for artifacts.
819
-
820
- Defaults to `$ACTIONS_RUNTIME_URL`, although a separate action like
821
- `crazy-max/ghaction-github-runtime` is recommended to expose this
822
- environment variable to your jobs.
823
- """
824
- if ignore_error is None:
825
- ignore_error = False
826
- if ignore_error is not None:
827
- pulumi.set(__self__, "ignore_error", ignore_error)
828
- if mode is None:
829
- mode = 'min'
830
- if mode is not None:
831
- pulumi.set(__self__, "mode", mode)
832
- if scope is None:
833
- scope = (_utilities.get_env('buildkit') or '')
834
- if scope is not None:
835
- pulumi.set(__self__, "scope", scope)
836
- if token is None:
837
- token = (_utilities.get_env('ACTIONS_RUNTIME_TOKEN') or '')
838
- if token is not None:
839
- pulumi.set(__self__, "token", token)
840
- if url is None:
841
- url = (_utilities.get_env('ACTIONS_RUNTIME_URL') or '')
842
- if url is not None:
843
- pulumi.set(__self__, "url", url)
844
-
845
- @property
846
- @pulumi.getter(name="ignoreError")
847
- def ignore_error(self) -> Optional[bool]:
848
- """
849
- Ignore errors caused by failed cache exports.
850
- """
851
- return pulumi.get(self, "ignore_error")
852
-
853
- @property
854
- @pulumi.getter
855
- def mode(self) -> Optional['CacheMode']:
856
- """
857
- The cache mode to use. Defaults to `min`.
858
- """
859
- return pulumi.get(self, "mode")
860
-
861
- @property
862
- @pulumi.getter
863
- def scope(self) -> Optional[str]:
864
- """
865
- The scope to use for cache keys. Defaults to `buildkit`.
866
-
867
- This should be set if building and caching multiple images in one
868
- workflow, otherwise caches will overwrite each other.
869
- """
870
- return pulumi.get(self, "scope")
871
-
872
- @property
873
- @pulumi.getter
874
- def token(self) -> Optional[str]:
875
- """
876
- The GitHub Actions token to use. This is not a personal access tokens
877
- and is typically generated automatically as part of each job.
878
-
879
- Defaults to `$ACTIONS_RUNTIME_TOKEN`, although a separate action like
880
- `crazy-max/ghaction-github-runtime` is recommended to expose this
881
- environment variable to your jobs.
882
- """
883
- return pulumi.get(self, "token")
884
-
885
- @property
886
- @pulumi.getter
887
- def url(self) -> Optional[str]:
888
- """
889
- The cache server URL to use for artifacts.
890
-
891
- Defaults to `$ACTIONS_RUNTIME_URL`, although a separate action like
892
- `crazy-max/ghaction-github-runtime` is recommended to expose this
893
- environment variable to your jobs.
894
- """
895
- return pulumi.get(self, "url")
896
-
897
-
898
- @pulumi.output_type
899
- class CacheToInline(dict):
900
- """
901
- Include an inline cache with the exported image.
902
- """
903
- def __init__(__self__):
904
- """
905
- Include an inline cache with the exported image.
906
- """
907
- pass
908
-
909
-
910
- @pulumi.output_type
911
- class CacheToLocal(dict):
912
- @staticmethod
913
- def __key_warning(key: str):
914
- suggest = None
915
- if key == "compressionLevel":
916
- suggest = "compression_level"
917
- elif key == "forceCompression":
918
- suggest = "force_compression"
919
- elif key == "ignoreError":
920
- suggest = "ignore_error"
921
-
922
- if suggest:
923
- pulumi.log.warn(f"Key '{key}' not found in CacheToLocal. Access the value via the '{suggest}' property getter instead.")
924
-
925
- def __getitem__(self, key: str) -> Any:
926
- CacheToLocal.__key_warning(key)
927
- return super().__getitem__(key)
928
-
929
- def get(self, key: str, default = None) -> Any:
930
- CacheToLocal.__key_warning(key)
931
- return super().get(key, default)
932
-
933
- def __init__(__self__, *,
934
- dest: str,
935
- compression: Optional['CompressionType'] = None,
936
- compression_level: Optional[int] = None,
937
- force_compression: Optional[bool] = None,
938
- ignore_error: Optional[bool] = None,
939
- mode: Optional['CacheMode'] = None):
940
- """
941
- :param str dest: Path of the local directory to export the cache.
942
- :param 'CompressionType' compression: The compression type to use.
943
- :param int compression_level: Compression level from 0 to 22.
944
- :param bool force_compression: Forcefully apply compression.
945
- :param bool ignore_error: Ignore errors caused by failed cache exports.
946
- :param 'CacheMode' mode: The cache mode to use. Defaults to `min`.
947
- """
948
- pulumi.set(__self__, "dest", dest)
949
- if compression is None:
950
- compression = 'gzip'
951
- if compression is not None:
952
- pulumi.set(__self__, "compression", compression)
953
- if compression_level is None:
954
- compression_level = 0
955
- if compression_level is not None:
956
- pulumi.set(__self__, "compression_level", compression_level)
957
- if force_compression is None:
958
- force_compression = False
959
- if force_compression is not None:
960
- pulumi.set(__self__, "force_compression", force_compression)
961
- if ignore_error is None:
962
- ignore_error = False
963
- if ignore_error is not None:
964
- pulumi.set(__self__, "ignore_error", ignore_error)
965
- if mode is None:
966
- mode = 'min'
967
- if mode is not None:
968
- pulumi.set(__self__, "mode", mode)
969
-
970
- @property
971
- @pulumi.getter
972
- def dest(self) -> str:
973
- """
974
- Path of the local directory to export the cache.
975
- """
976
- return pulumi.get(self, "dest")
977
-
978
- @property
979
- @pulumi.getter
980
- def compression(self) -> Optional['CompressionType']:
981
- """
982
- The compression type to use.
983
- """
984
- return pulumi.get(self, "compression")
985
-
986
- @property
987
- @pulumi.getter(name="compressionLevel")
988
- def compression_level(self) -> Optional[int]:
989
- """
990
- Compression level from 0 to 22.
991
- """
992
- return pulumi.get(self, "compression_level")
993
-
994
- @property
995
- @pulumi.getter(name="forceCompression")
996
- def force_compression(self) -> Optional[bool]:
997
- """
998
- Forcefully apply compression.
999
- """
1000
- return pulumi.get(self, "force_compression")
1001
-
1002
- @property
1003
- @pulumi.getter(name="ignoreError")
1004
- def ignore_error(self) -> Optional[bool]:
1005
- """
1006
- Ignore errors caused by failed cache exports.
1007
- """
1008
- return pulumi.get(self, "ignore_error")
1009
-
1010
- @property
1011
- @pulumi.getter
1012
- def mode(self) -> Optional['CacheMode']:
1013
- """
1014
- The cache mode to use. Defaults to `min`.
1015
- """
1016
- return pulumi.get(self, "mode")
1017
-
1018
-
1019
- @pulumi.output_type
1020
- class CacheToRegistry(dict):
1021
- @staticmethod
1022
- def __key_warning(key: str):
1023
- suggest = None
1024
- if key == "compressionLevel":
1025
- suggest = "compression_level"
1026
- elif key == "forceCompression":
1027
- suggest = "force_compression"
1028
- elif key == "ignoreError":
1029
- suggest = "ignore_error"
1030
- elif key == "imageManifest":
1031
- suggest = "image_manifest"
1032
- elif key == "ociMediaTypes":
1033
- suggest = "oci_media_types"
1034
-
1035
- if suggest:
1036
- pulumi.log.warn(f"Key '{key}' not found in CacheToRegistry. Access the value via the '{suggest}' property getter instead.")
1037
-
1038
- def __getitem__(self, key: str) -> Any:
1039
- CacheToRegistry.__key_warning(key)
1040
- return super().__getitem__(key)
1041
-
1042
- def get(self, key: str, default = None) -> Any:
1043
- CacheToRegistry.__key_warning(key)
1044
- return super().get(key, default)
1045
-
1046
- def __init__(__self__, *,
1047
- ref: str,
1048
- compression: Optional['CompressionType'] = None,
1049
- compression_level: Optional[int] = None,
1050
- force_compression: Optional[bool] = None,
1051
- ignore_error: Optional[bool] = None,
1052
- image_manifest: Optional[bool] = None,
1053
- mode: Optional['CacheMode'] = None,
1054
- oci_media_types: Optional[bool] = None):
1055
- """
1056
- :param str ref: Fully qualified name of the cache image to import.
1057
- :param 'CompressionType' compression: The compression type to use.
1058
- :param int compression_level: Compression level from 0 to 22.
1059
- :param bool force_compression: Forcefully apply compression.
1060
- :param bool ignore_error: Ignore errors caused by failed cache exports.
1061
- :param bool image_manifest: Export cache manifest as an OCI-compatible image manifest instead of a
1062
- manifest list. Requires `ociMediaTypes` to also be `true`.
1063
-
1064
- Some registries like AWS ECR will not work with caching if this is
1065
- `false`.
1066
-
1067
- Defaults to `false` to match Docker's default behavior.
1068
- :param 'CacheMode' mode: The cache mode to use. Defaults to `min`.
1069
- :param bool oci_media_types: Whether to use OCI media types in exported manifests. Defaults to
1070
- `true`.
1071
- """
1072
- pulumi.set(__self__, "ref", ref)
1073
- if compression is None:
1074
- compression = 'gzip'
1075
- if compression is not None:
1076
- pulumi.set(__self__, "compression", compression)
1077
- if compression_level is None:
1078
- compression_level = 0
1079
- if compression_level is not None:
1080
- pulumi.set(__self__, "compression_level", compression_level)
1081
- if force_compression is None:
1082
- force_compression = False
1083
- if force_compression is not None:
1084
- pulumi.set(__self__, "force_compression", force_compression)
1085
- if ignore_error is None:
1086
- ignore_error = False
1087
- if ignore_error is not None:
1088
- pulumi.set(__self__, "ignore_error", ignore_error)
1089
- if image_manifest is None:
1090
- image_manifest = False
1091
- if image_manifest is not None:
1092
- pulumi.set(__self__, "image_manifest", image_manifest)
1093
- if mode is None:
1094
- mode = 'min'
1095
- if mode is not None:
1096
- pulumi.set(__self__, "mode", mode)
1097
- if oci_media_types is None:
1098
- oci_media_types = True
1099
- if oci_media_types is not None:
1100
- pulumi.set(__self__, "oci_media_types", oci_media_types)
1101
-
1102
- @property
1103
- @pulumi.getter
1104
- def ref(self) -> str:
1105
- """
1106
- Fully qualified name of the cache image to import.
1107
- """
1108
- return pulumi.get(self, "ref")
1109
-
1110
- @property
1111
- @pulumi.getter
1112
- def compression(self) -> Optional['CompressionType']:
1113
- """
1114
- The compression type to use.
1115
- """
1116
- return pulumi.get(self, "compression")
1117
-
1118
- @property
1119
- @pulumi.getter(name="compressionLevel")
1120
- def compression_level(self) -> Optional[int]:
1121
- """
1122
- Compression level from 0 to 22.
1123
- """
1124
- return pulumi.get(self, "compression_level")
1125
-
1126
- @property
1127
- @pulumi.getter(name="forceCompression")
1128
- def force_compression(self) -> Optional[bool]:
1129
- """
1130
- Forcefully apply compression.
1131
- """
1132
- return pulumi.get(self, "force_compression")
1133
-
1134
- @property
1135
- @pulumi.getter(name="ignoreError")
1136
- def ignore_error(self) -> Optional[bool]:
1137
- """
1138
- Ignore errors caused by failed cache exports.
1139
- """
1140
- return pulumi.get(self, "ignore_error")
1141
-
1142
- @property
1143
- @pulumi.getter(name="imageManifest")
1144
- def image_manifest(self) -> Optional[bool]:
1145
- """
1146
- Export cache manifest as an OCI-compatible image manifest instead of a
1147
- manifest list. Requires `ociMediaTypes` to also be `true`.
1148
-
1149
- Some registries like AWS ECR will not work with caching if this is
1150
- `false`.
1151
-
1152
- Defaults to `false` to match Docker's default behavior.
1153
- """
1154
- return pulumi.get(self, "image_manifest")
1155
-
1156
- @property
1157
- @pulumi.getter
1158
- def mode(self) -> Optional['CacheMode']:
1159
- """
1160
- The cache mode to use. Defaults to `min`.
1161
- """
1162
- return pulumi.get(self, "mode")
1163
-
1164
- @property
1165
- @pulumi.getter(name="ociMediaTypes")
1166
- def oci_media_types(self) -> Optional[bool]:
1167
- """
1168
- Whether to use OCI media types in exported manifests. Defaults to
1169
- `true`.
1170
- """
1171
- return pulumi.get(self, "oci_media_types")
1172
-
1173
-
1174
- @pulumi.output_type
1175
- class CacheToS3(dict):
1176
- @staticmethod
1177
- def __key_warning(key: str):
1178
- suggest = None
1179
- if key == "accessKeyId":
1180
- suggest = "access_key_id"
1181
- elif key == "blobsPrefix":
1182
- suggest = "blobs_prefix"
1183
- elif key == "endpointUrl":
1184
- suggest = "endpoint_url"
1185
- elif key == "ignoreError":
1186
- suggest = "ignore_error"
1187
- elif key == "manifestsPrefix":
1188
- suggest = "manifests_prefix"
1189
- elif key == "secretAccessKey":
1190
- suggest = "secret_access_key"
1191
- elif key == "sessionToken":
1192
- suggest = "session_token"
1193
- elif key == "usePathStyle":
1194
- suggest = "use_path_style"
1195
-
1196
- if suggest:
1197
- pulumi.log.warn(f"Key '{key}' not found in CacheToS3. Access the value via the '{suggest}' property getter instead.")
1198
-
1199
- def __getitem__(self, key: str) -> Any:
1200
- CacheToS3.__key_warning(key)
1201
- return super().__getitem__(key)
1202
-
1203
- def get(self, key: str, default = None) -> Any:
1204
- CacheToS3.__key_warning(key)
1205
- return super().get(key, default)
1206
-
1207
- def __init__(__self__, *,
1208
- bucket: str,
1209
- region: Optional[str] = None,
1210
- access_key_id: Optional[str] = None,
1211
- blobs_prefix: Optional[str] = None,
1212
- endpoint_url: Optional[str] = None,
1213
- ignore_error: Optional[bool] = None,
1214
- manifests_prefix: Optional[str] = None,
1215
- mode: Optional['CacheMode'] = None,
1216
- name: Optional[str] = None,
1217
- secret_access_key: Optional[str] = None,
1218
- session_token: Optional[str] = None,
1219
- use_path_style: Optional[bool] = None):
1220
- """
1221
- :param str bucket: Name of the S3 bucket.
1222
- :param str region: The geographic location of the bucket. Defaults to `$AWS_REGION`.
1223
- :param str access_key_id: Defaults to `$AWS_ACCESS_KEY_ID`.
1224
- :param str blobs_prefix: Prefix to prepend to blob filenames.
1225
- :param str endpoint_url: Endpoint of the S3 bucket.
1226
- :param bool ignore_error: Ignore errors caused by failed cache exports.
1227
- :param str manifests_prefix: Prefix to prepend on manifest filenames.
1228
- :param 'CacheMode' mode: The cache mode to use. Defaults to `min`.
1229
- :param str name: Name of the cache image.
1230
- :param str secret_access_key: Defaults to `$AWS_SECRET_ACCESS_KEY`.
1231
- :param str session_token: Defaults to `$AWS_SESSION_TOKEN`.
1232
- :param bool use_path_style: Uses `bucket` in the URL instead of hostname when `true`.
1233
- """
1234
- pulumi.set(__self__, "bucket", bucket)
1235
- if region is None:
1236
- region = (_utilities.get_env('AWS_REGION') or '')
1237
- pulumi.set(__self__, "region", region)
1238
- if access_key_id is None:
1239
- access_key_id = (_utilities.get_env('AWS_ACCESS_KEY_ID') or '')
1240
- if access_key_id is not None:
1241
- pulumi.set(__self__, "access_key_id", access_key_id)
1242
- if blobs_prefix is not None:
1243
- pulumi.set(__self__, "blobs_prefix", blobs_prefix)
1244
- if endpoint_url is not None:
1245
- pulumi.set(__self__, "endpoint_url", endpoint_url)
1246
- if ignore_error is None:
1247
- ignore_error = False
1248
- if ignore_error is not None:
1249
- pulumi.set(__self__, "ignore_error", ignore_error)
1250
- if manifests_prefix is not None:
1251
- pulumi.set(__self__, "manifests_prefix", manifests_prefix)
1252
- if mode is None:
1253
- mode = 'min'
1254
- if mode is not None:
1255
- pulumi.set(__self__, "mode", mode)
1256
- if name is not None:
1257
- pulumi.set(__self__, "name", name)
1258
- if secret_access_key is None:
1259
- secret_access_key = (_utilities.get_env('AWS_SECRET_ACCESS_KEY') or '')
1260
- if secret_access_key is not None:
1261
- pulumi.set(__self__, "secret_access_key", secret_access_key)
1262
- if session_token is None:
1263
- session_token = (_utilities.get_env('AWS_SESSION_TOKEN') or '')
1264
- if session_token is not None:
1265
- pulumi.set(__self__, "session_token", session_token)
1266
- if use_path_style is not None:
1267
- pulumi.set(__self__, "use_path_style", use_path_style)
1268
-
1269
- @property
1270
- @pulumi.getter
1271
- def bucket(self) -> str:
1272
- """
1273
- Name of the S3 bucket.
1274
- """
1275
- return pulumi.get(self, "bucket")
1276
-
1277
- @property
1278
- @pulumi.getter
1279
- def region(self) -> str:
1280
- """
1281
- The geographic location of the bucket. Defaults to `$AWS_REGION`.
1282
- """
1283
- return pulumi.get(self, "region")
1284
-
1285
- @property
1286
- @pulumi.getter(name="accessKeyId")
1287
- def access_key_id(self) -> Optional[str]:
1288
- """
1289
- Defaults to `$AWS_ACCESS_KEY_ID`.
1290
- """
1291
- return pulumi.get(self, "access_key_id")
1292
-
1293
- @property
1294
- @pulumi.getter(name="blobsPrefix")
1295
- def blobs_prefix(self) -> Optional[str]:
1296
- """
1297
- Prefix to prepend to blob filenames.
1298
- """
1299
- return pulumi.get(self, "blobs_prefix")
1300
-
1301
- @property
1302
- @pulumi.getter(name="endpointUrl")
1303
- def endpoint_url(self) -> Optional[str]:
1304
- """
1305
- Endpoint of the S3 bucket.
1306
- """
1307
- return pulumi.get(self, "endpoint_url")
1308
-
1309
- @property
1310
- @pulumi.getter(name="ignoreError")
1311
- def ignore_error(self) -> Optional[bool]:
1312
- """
1313
- Ignore errors caused by failed cache exports.
1314
- """
1315
- return pulumi.get(self, "ignore_error")
1316
-
1317
- @property
1318
- @pulumi.getter(name="manifestsPrefix")
1319
- def manifests_prefix(self) -> Optional[str]:
1320
- """
1321
- Prefix to prepend on manifest filenames.
1322
- """
1323
- return pulumi.get(self, "manifests_prefix")
1324
-
1325
- @property
1326
- @pulumi.getter
1327
- def mode(self) -> Optional['CacheMode']:
1328
- """
1329
- The cache mode to use. Defaults to `min`.
1330
- """
1331
- return pulumi.get(self, "mode")
1332
-
1333
- @property
1334
- @pulumi.getter
1335
- def name(self) -> Optional[str]:
1336
- """
1337
- Name of the cache image.
1338
- """
1339
- return pulumi.get(self, "name")
1340
-
1341
- @property
1342
- @pulumi.getter(name="secretAccessKey")
1343
- def secret_access_key(self) -> Optional[str]:
1344
- """
1345
- Defaults to `$AWS_SECRET_ACCESS_KEY`.
1346
- """
1347
- return pulumi.get(self, "secret_access_key")
1348
-
1349
- @property
1350
- @pulumi.getter(name="sessionToken")
1351
- def session_token(self) -> Optional[str]:
1352
- """
1353
- Defaults to `$AWS_SESSION_TOKEN`.
1354
- """
1355
- return pulumi.get(self, "session_token")
1356
-
1357
- @property
1358
- @pulumi.getter(name="usePathStyle")
1359
- def use_path_style(self) -> Optional[bool]:
1360
- """
1361
- Uses `bucket` in the URL instead of hostname when `true`.
1362
- """
1363
- return pulumi.get(self, "use_path_style")
1364
-
1365
-
1366
- @pulumi.output_type
1367
- class Context(dict):
1368
- def __init__(__self__, *,
1369
- location: str):
1370
- """
1371
- :param str location: Resources to use for build context.
1372
-
1373
- The location can be:
1374
- * A relative or absolute path to a local directory (`.`, `./app`,
1375
- `/app`, etc.).
1376
- * A remote URL of a Git repository, tarball, or plain text file
1377
- (`https://github.com/user/myrepo.git`, `http://server/context.tar.gz`,
1378
- etc.).
1379
- """
1380
- pulumi.set(__self__, "location", location)
1381
-
1382
- @property
1383
- @pulumi.getter
1384
- def location(self) -> str:
1385
- """
1386
- Resources to use for build context.
1387
-
1388
- The location can be:
1389
- * A relative or absolute path to a local directory (`.`, `./app`,
1390
- `/app`, etc.).
1391
- * A remote URL of a Git repository, tarball, or plain text file
1392
- (`https://github.com/user/myrepo.git`, `http://server/context.tar.gz`,
1393
- etc.).
1394
- """
1395
- return pulumi.get(self, "location")
1396
-
1397
-
1398
- @pulumi.output_type
1399
- class Dockerfile(dict):
1400
- def __init__(__self__, *,
1401
- inline: Optional[str] = None,
1402
- location: Optional[str] = None):
1403
- """
1404
- :param str inline: Raw Dockerfile contents.
1405
-
1406
- Conflicts with `location`.
1407
-
1408
- Equivalent to invoking Docker with `-f -`.
1409
- :param str location: Location of the Dockerfile to use.
1410
-
1411
- Can be a relative or absolute path to a local file, or a remote URL.
1412
-
1413
- Defaults to `${context.location}/Dockerfile` if context is on-disk.
1414
-
1415
- Conflicts with `inline`.
1416
- """
1417
- if inline is not None:
1418
- pulumi.set(__self__, "inline", inline)
1419
- if location is not None:
1420
- pulumi.set(__self__, "location", location)
1421
-
1422
- @property
1423
- @pulumi.getter
1424
- def inline(self) -> Optional[str]:
1425
- """
1426
- Raw Dockerfile contents.
1427
-
1428
- Conflicts with `location`.
1429
-
1430
- Equivalent to invoking Docker with `-f -`.
1431
- """
1432
- return pulumi.get(self, "inline")
1433
-
1434
- @property
1435
- @pulumi.getter
1436
- def location(self) -> Optional[str]:
1437
- """
1438
- Location of the Dockerfile to use.
1439
-
1440
- Can be a relative or absolute path to a local file, or a remote URL.
1441
-
1442
- Defaults to `${context.location}/Dockerfile` if context is on-disk.
1443
-
1444
- Conflicts with `inline`.
1445
- """
1446
- return pulumi.get(self, "location")
1447
-
1448
-
1449
- @pulumi.output_type
1450
- class Export(dict):
1451
- def __init__(__self__, *,
1452
- cacheonly: Optional['outputs.ExportCacheOnly'] = None,
1453
- disabled: Optional[bool] = None,
1454
- docker: Optional['outputs.ExportDocker'] = None,
1455
- image: Optional['outputs.ExportImage'] = None,
1456
- local: Optional['outputs.ExportLocal'] = None,
1457
- oci: Optional['outputs.ExportOCI'] = None,
1458
- raw: Optional[str] = None,
1459
- registry: Optional['outputs.ExportRegistry'] = None,
1460
- tar: Optional['outputs.ExportTar'] = None):
1461
- """
1462
- :param 'ExportCacheOnlyArgs' cacheonly: A no-op export. Helpful for silencing the 'no exports' warning if you
1463
- just want to populate caches.
1464
- :param bool disabled: When `true` this entry will be excluded. Defaults to `false`.
1465
- :param 'ExportDockerArgs' docker: Export as a Docker image layout.
1466
- :param 'ExportImageArgs' image: Outputs the build result into a container image format.
1467
- :param 'ExportLocalArgs' local: Export to a local directory as files and directories.
1468
- :param 'ExportOCIArgs' oci: Identical to the Docker exporter but uses OCI media types by default.
1469
- :param str raw: A raw string as you would provide it to the Docker CLI (e.g.,
1470
- `type=docker`)
1471
- :param 'ExportRegistryArgs' registry: Identical to the Image exporter, but pushes by default.
1472
- :param 'ExportTarArgs' tar: Export to a local directory as a tarball.
1473
- """
1474
- if cacheonly is not None:
1475
- pulumi.set(__self__, "cacheonly", cacheonly)
1476
- if disabled is not None:
1477
- pulumi.set(__self__, "disabled", disabled)
1478
- if docker is not None:
1479
- pulumi.set(__self__, "docker", docker)
1480
- if image is not None:
1481
- pulumi.set(__self__, "image", image)
1482
- if local is not None:
1483
- pulumi.set(__self__, "local", local)
1484
- if oci is not None:
1485
- pulumi.set(__self__, "oci", oci)
1486
- if raw is not None:
1487
- pulumi.set(__self__, "raw", raw)
1488
- if registry is not None:
1489
- pulumi.set(__self__, "registry", registry)
1490
- if tar is not None:
1491
- pulumi.set(__self__, "tar", tar)
1492
-
1493
- @property
1494
- @pulumi.getter
1495
- def cacheonly(self) -> Optional['outputs.ExportCacheOnly']:
1496
- """
1497
- A no-op export. Helpful for silencing the 'no exports' warning if you
1498
- just want to populate caches.
1499
- """
1500
- return pulumi.get(self, "cacheonly")
1501
-
1502
- @property
1503
- @pulumi.getter
1504
- def disabled(self) -> Optional[bool]:
1505
- """
1506
- When `true` this entry will be excluded. Defaults to `false`.
1507
- """
1508
- return pulumi.get(self, "disabled")
1509
-
1510
- @property
1511
- @pulumi.getter
1512
- def docker(self) -> Optional['outputs.ExportDocker']:
1513
- """
1514
- Export as a Docker image layout.
1515
- """
1516
- return pulumi.get(self, "docker")
1517
-
1518
- @property
1519
- @pulumi.getter
1520
- def image(self) -> Optional['outputs.ExportImage']:
1521
- """
1522
- Outputs the build result into a container image format.
1523
- """
1524
- return pulumi.get(self, "image")
1525
-
1526
- @property
1527
- @pulumi.getter
1528
- def local(self) -> Optional['outputs.ExportLocal']:
1529
- """
1530
- Export to a local directory as files and directories.
1531
- """
1532
- return pulumi.get(self, "local")
1533
-
1534
- @property
1535
- @pulumi.getter
1536
- def oci(self) -> Optional['outputs.ExportOCI']:
1537
- """
1538
- Identical to the Docker exporter but uses OCI media types by default.
1539
- """
1540
- return pulumi.get(self, "oci")
1541
-
1542
- @property
1543
- @pulumi.getter
1544
- def raw(self) -> Optional[str]:
1545
- """
1546
- A raw string as you would provide it to the Docker CLI (e.g.,
1547
- `type=docker`)
1548
- """
1549
- return pulumi.get(self, "raw")
1550
-
1551
- @property
1552
- @pulumi.getter
1553
- def registry(self) -> Optional['outputs.ExportRegistry']:
1554
- """
1555
- Identical to the Image exporter, but pushes by default.
1556
- """
1557
- return pulumi.get(self, "registry")
1558
-
1559
- @property
1560
- @pulumi.getter
1561
- def tar(self) -> Optional['outputs.ExportTar']:
1562
- """
1563
- Export to a local directory as a tarball.
1564
- """
1565
- return pulumi.get(self, "tar")
1566
-
1567
-
1568
- @pulumi.output_type
1569
- class ExportCacheOnly(dict):
1570
- def __init__(__self__):
1571
- pass
1572
-
1573
-
1574
- @pulumi.output_type
1575
- class ExportDocker(dict):
1576
- @staticmethod
1577
- def __key_warning(key: str):
1578
- suggest = None
1579
- if key == "compressionLevel":
1580
- suggest = "compression_level"
1581
- elif key == "forceCompression":
1582
- suggest = "force_compression"
1583
- elif key == "ociMediaTypes":
1584
- suggest = "oci_media_types"
1585
-
1586
- if suggest:
1587
- pulumi.log.warn(f"Key '{key}' not found in ExportDocker. Access the value via the '{suggest}' property getter instead.")
1588
-
1589
- def __getitem__(self, key: str) -> Any:
1590
- ExportDocker.__key_warning(key)
1591
- return super().__getitem__(key)
1592
-
1593
- def get(self, key: str, default = None) -> Any:
1594
- ExportDocker.__key_warning(key)
1595
- return super().get(key, default)
1596
-
1597
- def __init__(__self__, *,
1598
- annotations: Optional[Mapping[str, str]] = None,
1599
- compression: Optional['CompressionType'] = None,
1600
- compression_level: Optional[int] = None,
1601
- dest: Optional[str] = None,
1602
- force_compression: Optional[bool] = None,
1603
- names: Optional[Sequence[str]] = None,
1604
- oci_media_types: Optional[bool] = None,
1605
- tar: Optional[bool] = None):
1606
- """
1607
- :param Mapping[str, str] annotations: Attach an arbitrary key/value annotation to the image.
1608
- :param 'CompressionType' compression: The compression type to use.
1609
- :param int compression_level: Compression level from 0 to 22.
1610
- :param str dest: The local export path.
1611
- :param bool force_compression: Forcefully apply compression.
1612
- :param Sequence[str] names: Specify images names to export. This is overridden if tags are already specified.
1613
- :param bool oci_media_types: Use OCI media types in exporter manifests.
1614
- :param bool tar: Bundle the output into a tarball layout.
1615
- """
1616
- if annotations is not None:
1617
- pulumi.set(__self__, "annotations", annotations)
1618
- if compression is None:
1619
- compression = 'gzip'
1620
- if compression is not None:
1621
- pulumi.set(__self__, "compression", compression)
1622
- if compression_level is None:
1623
- compression_level = 0
1624
- if compression_level is not None:
1625
- pulumi.set(__self__, "compression_level", compression_level)
1626
- if dest is not None:
1627
- pulumi.set(__self__, "dest", dest)
1628
- if force_compression is None:
1629
- force_compression = False
1630
- if force_compression is not None:
1631
- pulumi.set(__self__, "force_compression", force_compression)
1632
- if names is not None:
1633
- pulumi.set(__self__, "names", names)
1634
- if oci_media_types is None:
1635
- oci_media_types = False
1636
- if oci_media_types is not None:
1637
- pulumi.set(__self__, "oci_media_types", oci_media_types)
1638
- if tar is None:
1639
- tar = True
1640
- if tar is not None:
1641
- pulumi.set(__self__, "tar", tar)
1642
-
1643
- @property
1644
- @pulumi.getter
1645
- def annotations(self) -> Optional[Mapping[str, str]]:
1646
- """
1647
- Attach an arbitrary key/value annotation to the image.
1648
- """
1649
- return pulumi.get(self, "annotations")
1650
-
1651
- @property
1652
- @pulumi.getter
1653
- def compression(self) -> Optional['CompressionType']:
1654
- """
1655
- The compression type to use.
1656
- """
1657
- return pulumi.get(self, "compression")
1658
-
1659
- @property
1660
- @pulumi.getter(name="compressionLevel")
1661
- def compression_level(self) -> Optional[int]:
1662
- """
1663
- Compression level from 0 to 22.
1664
- """
1665
- return pulumi.get(self, "compression_level")
1666
-
1667
- @property
1668
- @pulumi.getter
1669
- def dest(self) -> Optional[str]:
1670
- """
1671
- The local export path.
1672
- """
1673
- return pulumi.get(self, "dest")
1674
-
1675
- @property
1676
- @pulumi.getter(name="forceCompression")
1677
- def force_compression(self) -> Optional[bool]:
1678
- """
1679
- Forcefully apply compression.
1680
- """
1681
- return pulumi.get(self, "force_compression")
1682
-
1683
- @property
1684
- @pulumi.getter
1685
- def names(self) -> Optional[Sequence[str]]:
1686
- """
1687
- Specify images names to export. This is overridden if tags are already specified.
1688
- """
1689
- return pulumi.get(self, "names")
1690
-
1691
- @property
1692
- @pulumi.getter(name="ociMediaTypes")
1693
- def oci_media_types(self) -> Optional[bool]:
1694
- """
1695
- Use OCI media types in exporter manifests.
1696
- """
1697
- return pulumi.get(self, "oci_media_types")
1698
-
1699
- @property
1700
- @pulumi.getter
1701
- def tar(self) -> Optional[bool]:
1702
- """
1703
- Bundle the output into a tarball layout.
1704
- """
1705
- return pulumi.get(self, "tar")
1706
-
1707
-
1708
- @pulumi.output_type
1709
- class ExportImage(dict):
1710
- @staticmethod
1711
- def __key_warning(key: str):
1712
- suggest = None
1713
- if key == "compressionLevel":
1714
- suggest = "compression_level"
1715
- elif key == "danglingNamePrefix":
1716
- suggest = "dangling_name_prefix"
1717
- elif key == "forceCompression":
1718
- suggest = "force_compression"
1719
- elif key == "nameCanonical":
1720
- suggest = "name_canonical"
1721
- elif key == "ociMediaTypes":
1722
- suggest = "oci_media_types"
1723
- elif key == "pushByDigest":
1724
- suggest = "push_by_digest"
1725
-
1726
- if suggest:
1727
- pulumi.log.warn(f"Key '{key}' not found in ExportImage. Access the value via the '{suggest}' property getter instead.")
1728
-
1729
- def __getitem__(self, key: str) -> Any:
1730
- ExportImage.__key_warning(key)
1731
- return super().__getitem__(key)
1732
-
1733
- def get(self, key: str, default = None) -> Any:
1734
- ExportImage.__key_warning(key)
1735
- return super().get(key, default)
1736
-
1737
- def __init__(__self__, *,
1738
- annotations: Optional[Mapping[str, str]] = None,
1739
- compression: Optional['CompressionType'] = None,
1740
- compression_level: Optional[int] = None,
1741
- dangling_name_prefix: Optional[str] = None,
1742
- force_compression: Optional[bool] = None,
1743
- insecure: Optional[bool] = None,
1744
- name_canonical: Optional[bool] = None,
1745
- names: Optional[Sequence[str]] = None,
1746
- oci_media_types: Optional[bool] = None,
1747
- push: Optional[bool] = None,
1748
- push_by_digest: Optional[bool] = None,
1749
- store: Optional[bool] = None,
1750
- unpack: Optional[bool] = None):
1751
- """
1752
- :param Mapping[str, str] annotations: Attach an arbitrary key/value annotation to the image.
1753
- :param 'CompressionType' compression: The compression type to use.
1754
- :param int compression_level: Compression level from 0 to 22.
1755
- :param str dangling_name_prefix: Name image with `prefix@<digest>`, used for anonymous images.
1756
- :param bool force_compression: Forcefully apply compression.
1757
- :param bool insecure: Allow pushing to an insecure registry.
1758
- :param bool name_canonical: Add additional canonical name (`name@<digest>`).
1759
- :param Sequence[str] names: Specify images names to export. This is overridden if tags are already specified.
1760
- :param bool oci_media_types: Use OCI media types in exporter manifests.
1761
- :param bool push: Push after creating the image.
1762
- :param bool push_by_digest: Push image without name.
1763
- :param bool store: Store resulting images to the worker's image store and ensure all of
1764
- its blobs are in the content store.
1765
-
1766
- Defaults to `true`.
1767
-
1768
- Ignored if the worker doesn't have image store (when using OCI workers,
1769
- for example).
1770
- :param bool unpack: Unpack image after creation (for use with containerd). Defaults to
1771
- `false`.
1772
- """
1773
- if annotations is not None:
1774
- pulumi.set(__self__, "annotations", annotations)
1775
- if compression is None:
1776
- compression = 'gzip'
1777
- if compression is not None:
1778
- pulumi.set(__self__, "compression", compression)
1779
- if compression_level is None:
1780
- compression_level = 0
1781
- if compression_level is not None:
1782
- pulumi.set(__self__, "compression_level", compression_level)
1783
- if dangling_name_prefix is not None:
1784
- pulumi.set(__self__, "dangling_name_prefix", dangling_name_prefix)
1785
- if force_compression is None:
1786
- force_compression = False
1787
- if force_compression is not None:
1788
- pulumi.set(__self__, "force_compression", force_compression)
1789
- if insecure is not None:
1790
- pulumi.set(__self__, "insecure", insecure)
1791
- if name_canonical is not None:
1792
- pulumi.set(__self__, "name_canonical", name_canonical)
1793
- if names is not None:
1794
- pulumi.set(__self__, "names", names)
1795
- if oci_media_types is None:
1796
- oci_media_types = False
1797
- if oci_media_types is not None:
1798
- pulumi.set(__self__, "oci_media_types", oci_media_types)
1799
- if push is not None:
1800
- pulumi.set(__self__, "push", push)
1801
- if push_by_digest is not None:
1802
- pulumi.set(__self__, "push_by_digest", push_by_digest)
1803
- if store is None:
1804
- store = True
1805
- if store is not None:
1806
- pulumi.set(__self__, "store", store)
1807
- if unpack is not None:
1808
- pulumi.set(__self__, "unpack", unpack)
1809
-
1810
- @property
1811
- @pulumi.getter
1812
- def annotations(self) -> Optional[Mapping[str, str]]:
1813
- """
1814
- Attach an arbitrary key/value annotation to the image.
1815
- """
1816
- return pulumi.get(self, "annotations")
1817
-
1818
- @property
1819
- @pulumi.getter
1820
- def compression(self) -> Optional['CompressionType']:
1821
- """
1822
- The compression type to use.
1823
- """
1824
- return pulumi.get(self, "compression")
1825
-
1826
- @property
1827
- @pulumi.getter(name="compressionLevel")
1828
- def compression_level(self) -> Optional[int]:
1829
- """
1830
- Compression level from 0 to 22.
1831
- """
1832
- return pulumi.get(self, "compression_level")
1833
-
1834
- @property
1835
- @pulumi.getter(name="danglingNamePrefix")
1836
- def dangling_name_prefix(self) -> Optional[str]:
1837
- """
1838
- Name image with `prefix@<digest>`, used for anonymous images.
1839
- """
1840
- return pulumi.get(self, "dangling_name_prefix")
1841
-
1842
- @property
1843
- @pulumi.getter(name="forceCompression")
1844
- def force_compression(self) -> Optional[bool]:
1845
- """
1846
- Forcefully apply compression.
1847
- """
1848
- return pulumi.get(self, "force_compression")
1849
-
1850
- @property
1851
- @pulumi.getter
1852
- def insecure(self) -> Optional[bool]:
1853
- """
1854
- Allow pushing to an insecure registry.
1855
- """
1856
- return pulumi.get(self, "insecure")
1857
-
1858
- @property
1859
- @pulumi.getter(name="nameCanonical")
1860
- def name_canonical(self) -> Optional[bool]:
1861
- """
1862
- Add additional canonical name (`name@<digest>`).
1863
- """
1864
- return pulumi.get(self, "name_canonical")
1865
-
1866
- @property
1867
- @pulumi.getter
1868
- def names(self) -> Optional[Sequence[str]]:
1869
- """
1870
- Specify images names to export. This is overridden if tags are already specified.
1871
- """
1872
- return pulumi.get(self, "names")
1873
-
1874
- @property
1875
- @pulumi.getter(name="ociMediaTypes")
1876
- def oci_media_types(self) -> Optional[bool]:
1877
- """
1878
- Use OCI media types in exporter manifests.
1879
- """
1880
- return pulumi.get(self, "oci_media_types")
1881
-
1882
- @property
1883
- @pulumi.getter
1884
- def push(self) -> Optional[bool]:
1885
- """
1886
- Push after creating the image.
1887
- """
1888
- return pulumi.get(self, "push")
1889
-
1890
- @property
1891
- @pulumi.getter(name="pushByDigest")
1892
- def push_by_digest(self) -> Optional[bool]:
1893
- """
1894
- Push image without name.
1895
- """
1896
- return pulumi.get(self, "push_by_digest")
1897
-
1898
- @property
1899
- @pulumi.getter
1900
- def store(self) -> Optional[bool]:
1901
- """
1902
- Store resulting images to the worker's image store and ensure all of
1903
- its blobs are in the content store.
1904
-
1905
- Defaults to `true`.
1906
-
1907
- Ignored if the worker doesn't have image store (when using OCI workers,
1908
- for example).
1909
- """
1910
- return pulumi.get(self, "store")
1911
-
1912
- @property
1913
- @pulumi.getter
1914
- def unpack(self) -> Optional[bool]:
1915
- """
1916
- Unpack image after creation (for use with containerd). Defaults to
1917
- `false`.
1918
- """
1919
- return pulumi.get(self, "unpack")
1920
-
1921
-
1922
- @pulumi.output_type
1923
- class ExportLocal(dict):
1924
- def __init__(__self__, *,
1925
- dest: str):
1926
- """
1927
- :param str dest: Output path.
1928
- """
1929
- pulumi.set(__self__, "dest", dest)
1930
-
1931
- @property
1932
- @pulumi.getter
1933
- def dest(self) -> str:
1934
- """
1935
- Output path.
1936
- """
1937
- return pulumi.get(self, "dest")
1938
-
1939
-
1940
- @pulumi.output_type
1941
- class ExportOCI(dict):
1942
- @staticmethod
1943
- def __key_warning(key: str):
1944
- suggest = None
1945
- if key == "compressionLevel":
1946
- suggest = "compression_level"
1947
- elif key == "forceCompression":
1948
- suggest = "force_compression"
1949
- elif key == "ociMediaTypes":
1950
- suggest = "oci_media_types"
1951
-
1952
- if suggest:
1953
- pulumi.log.warn(f"Key '{key}' not found in ExportOCI. Access the value via the '{suggest}' property getter instead.")
1954
-
1955
- def __getitem__(self, key: str) -> Any:
1956
- ExportOCI.__key_warning(key)
1957
- return super().__getitem__(key)
1958
-
1959
- def get(self, key: str, default = None) -> Any:
1960
- ExportOCI.__key_warning(key)
1961
- return super().get(key, default)
1962
-
1963
- def __init__(__self__, *,
1964
- annotations: Optional[Mapping[str, str]] = None,
1965
- compression: Optional['CompressionType'] = None,
1966
- compression_level: Optional[int] = None,
1967
- dest: Optional[str] = None,
1968
- force_compression: Optional[bool] = None,
1969
- names: Optional[Sequence[str]] = None,
1970
- oci_media_types: Optional[bool] = None,
1971
- tar: Optional[bool] = None):
1972
- """
1973
- :param Mapping[str, str] annotations: Attach an arbitrary key/value annotation to the image.
1974
- :param 'CompressionType' compression: The compression type to use.
1975
- :param int compression_level: Compression level from 0 to 22.
1976
- :param str dest: The local export path.
1977
- :param bool force_compression: Forcefully apply compression.
1978
- :param Sequence[str] names: Specify images names to export. This is overridden if tags are already specified.
1979
- :param bool oci_media_types: Use OCI media types in exporter manifests.
1980
- :param bool tar: Bundle the output into a tarball layout.
1981
- """
1982
- if annotations is not None:
1983
- pulumi.set(__self__, "annotations", annotations)
1984
- if compression is None:
1985
- compression = 'gzip'
1986
- if compression is not None:
1987
- pulumi.set(__self__, "compression", compression)
1988
- if compression_level is None:
1989
- compression_level = 0
1990
- if compression_level is not None:
1991
- pulumi.set(__self__, "compression_level", compression_level)
1992
- if dest is not None:
1993
- pulumi.set(__self__, "dest", dest)
1994
- if force_compression is None:
1995
- force_compression = False
1996
- if force_compression is not None:
1997
- pulumi.set(__self__, "force_compression", force_compression)
1998
- if names is not None:
1999
- pulumi.set(__self__, "names", names)
2000
- if oci_media_types is None:
2001
- oci_media_types = True
2002
- if oci_media_types is not None:
2003
- pulumi.set(__self__, "oci_media_types", oci_media_types)
2004
- if tar is None:
2005
- tar = True
2006
- if tar is not None:
2007
- pulumi.set(__self__, "tar", tar)
2008
-
2009
- @property
2010
- @pulumi.getter
2011
- def annotations(self) -> Optional[Mapping[str, str]]:
2012
- """
2013
- Attach an arbitrary key/value annotation to the image.
2014
- """
2015
- return pulumi.get(self, "annotations")
2016
-
2017
- @property
2018
- @pulumi.getter
2019
- def compression(self) -> Optional['CompressionType']:
2020
- """
2021
- The compression type to use.
2022
- """
2023
- return pulumi.get(self, "compression")
2024
-
2025
- @property
2026
- @pulumi.getter(name="compressionLevel")
2027
- def compression_level(self) -> Optional[int]:
2028
- """
2029
- Compression level from 0 to 22.
2030
- """
2031
- return pulumi.get(self, "compression_level")
2032
-
2033
- @property
2034
- @pulumi.getter
2035
- def dest(self) -> Optional[str]:
2036
- """
2037
- The local export path.
2038
- """
2039
- return pulumi.get(self, "dest")
2040
-
2041
- @property
2042
- @pulumi.getter(name="forceCompression")
2043
- def force_compression(self) -> Optional[bool]:
2044
- """
2045
- Forcefully apply compression.
2046
- """
2047
- return pulumi.get(self, "force_compression")
2048
-
2049
- @property
2050
- @pulumi.getter
2051
- def names(self) -> Optional[Sequence[str]]:
2052
- """
2053
- Specify images names to export. This is overridden if tags are already specified.
2054
- """
2055
- return pulumi.get(self, "names")
2056
-
2057
- @property
2058
- @pulumi.getter(name="ociMediaTypes")
2059
- def oci_media_types(self) -> Optional[bool]:
2060
- """
2061
- Use OCI media types in exporter manifests.
2062
- """
2063
- return pulumi.get(self, "oci_media_types")
2064
-
2065
- @property
2066
- @pulumi.getter
2067
- def tar(self) -> Optional[bool]:
2068
- """
2069
- Bundle the output into a tarball layout.
2070
- """
2071
- return pulumi.get(self, "tar")
2072
-
2073
-
2074
- @pulumi.output_type
2075
- class ExportRegistry(dict):
2076
- @staticmethod
2077
- def __key_warning(key: str):
2078
- suggest = None
2079
- if key == "compressionLevel":
2080
- suggest = "compression_level"
2081
- elif key == "danglingNamePrefix":
2082
- suggest = "dangling_name_prefix"
2083
- elif key == "forceCompression":
2084
- suggest = "force_compression"
2085
- elif key == "nameCanonical":
2086
- suggest = "name_canonical"
2087
- elif key == "ociMediaTypes":
2088
- suggest = "oci_media_types"
2089
- elif key == "pushByDigest":
2090
- suggest = "push_by_digest"
2091
-
2092
- if suggest:
2093
- pulumi.log.warn(f"Key '{key}' not found in ExportRegistry. Access the value via the '{suggest}' property getter instead.")
2094
-
2095
- def __getitem__(self, key: str) -> Any:
2096
- ExportRegistry.__key_warning(key)
2097
- return super().__getitem__(key)
2098
-
2099
- def get(self, key: str, default = None) -> Any:
2100
- ExportRegistry.__key_warning(key)
2101
- return super().get(key, default)
2102
-
2103
- def __init__(__self__, *,
2104
- annotations: Optional[Mapping[str, str]] = None,
2105
- compression: Optional['CompressionType'] = None,
2106
- compression_level: Optional[int] = None,
2107
- dangling_name_prefix: Optional[str] = None,
2108
- force_compression: Optional[bool] = None,
2109
- insecure: Optional[bool] = None,
2110
- name_canonical: Optional[bool] = None,
2111
- names: Optional[Sequence[str]] = None,
2112
- oci_media_types: Optional[bool] = None,
2113
- push: Optional[bool] = None,
2114
- push_by_digest: Optional[bool] = None,
2115
- store: Optional[bool] = None,
2116
- unpack: Optional[bool] = None):
2117
- """
2118
- :param Mapping[str, str] annotations: Attach an arbitrary key/value annotation to the image.
2119
- :param 'CompressionType' compression: The compression type to use.
2120
- :param int compression_level: Compression level from 0 to 22.
2121
- :param str dangling_name_prefix: Name image with `prefix@<digest>`, used for anonymous images.
2122
- :param bool force_compression: Forcefully apply compression.
2123
- :param bool insecure: Allow pushing to an insecure registry.
2124
- :param bool name_canonical: Add additional canonical name (`name@<digest>`).
2125
- :param Sequence[str] names: Specify images names to export. This is overridden if tags are already specified.
2126
- :param bool oci_media_types: Use OCI media types in exporter manifests.
2127
- :param bool push: Push after creating the image.
2128
- :param bool push_by_digest: Push image without name.
2129
- :param bool store: Store resulting images to the worker's image store and ensure all of
2130
- its blobs are in the content store.
2131
-
2132
- Defaults to `true`.
2133
-
2134
- Ignored if the worker doesn't have image store (when using OCI workers,
2135
- for example).
2136
- :param bool unpack: Unpack image after creation (for use with containerd). Defaults to
2137
- `false`.
2138
- """
2139
- if annotations is not None:
2140
- pulumi.set(__self__, "annotations", annotations)
2141
- if compression is None:
2142
- compression = 'gzip'
2143
- if compression is not None:
2144
- pulumi.set(__self__, "compression", compression)
2145
- if compression_level is None:
2146
- compression_level = 0
2147
- if compression_level is not None:
2148
- pulumi.set(__self__, "compression_level", compression_level)
2149
- if dangling_name_prefix is not None:
2150
- pulumi.set(__self__, "dangling_name_prefix", dangling_name_prefix)
2151
- if force_compression is None:
2152
- force_compression = False
2153
- if force_compression is not None:
2154
- pulumi.set(__self__, "force_compression", force_compression)
2155
- if insecure is not None:
2156
- pulumi.set(__self__, "insecure", insecure)
2157
- if name_canonical is not None:
2158
- pulumi.set(__self__, "name_canonical", name_canonical)
2159
- if names is not None:
2160
- pulumi.set(__self__, "names", names)
2161
- if oci_media_types is None:
2162
- oci_media_types = False
2163
- if oci_media_types is not None:
2164
- pulumi.set(__self__, "oci_media_types", oci_media_types)
2165
- if push is None:
2166
- push = True
2167
- if push is not None:
2168
- pulumi.set(__self__, "push", push)
2169
- if push_by_digest is not None:
2170
- pulumi.set(__self__, "push_by_digest", push_by_digest)
2171
- if store is None:
2172
- store = True
2173
- if store is not None:
2174
- pulumi.set(__self__, "store", store)
2175
- if unpack is not None:
2176
- pulumi.set(__self__, "unpack", unpack)
2177
-
2178
- @property
2179
- @pulumi.getter
2180
- def annotations(self) -> Optional[Mapping[str, str]]:
2181
- """
2182
- Attach an arbitrary key/value annotation to the image.
2183
- """
2184
- return pulumi.get(self, "annotations")
2185
-
2186
- @property
2187
- @pulumi.getter
2188
- def compression(self) -> Optional['CompressionType']:
2189
- """
2190
- The compression type to use.
2191
- """
2192
- return pulumi.get(self, "compression")
2193
-
2194
- @property
2195
- @pulumi.getter(name="compressionLevel")
2196
- def compression_level(self) -> Optional[int]:
2197
- """
2198
- Compression level from 0 to 22.
2199
- """
2200
- return pulumi.get(self, "compression_level")
2201
-
2202
- @property
2203
- @pulumi.getter(name="danglingNamePrefix")
2204
- def dangling_name_prefix(self) -> Optional[str]:
2205
- """
2206
- Name image with `prefix@<digest>`, used for anonymous images.
2207
- """
2208
- return pulumi.get(self, "dangling_name_prefix")
2209
-
2210
- @property
2211
- @pulumi.getter(name="forceCompression")
2212
- def force_compression(self) -> Optional[bool]:
2213
- """
2214
- Forcefully apply compression.
2215
- """
2216
- return pulumi.get(self, "force_compression")
2217
-
2218
- @property
2219
- @pulumi.getter
2220
- def insecure(self) -> Optional[bool]:
2221
- """
2222
- Allow pushing to an insecure registry.
2223
- """
2224
- return pulumi.get(self, "insecure")
2225
-
2226
- @property
2227
- @pulumi.getter(name="nameCanonical")
2228
- def name_canonical(self) -> Optional[bool]:
2229
- """
2230
- Add additional canonical name (`name@<digest>`).
2231
- """
2232
- return pulumi.get(self, "name_canonical")
2233
-
2234
- @property
2235
- @pulumi.getter
2236
- def names(self) -> Optional[Sequence[str]]:
2237
- """
2238
- Specify images names to export. This is overridden if tags are already specified.
2239
- """
2240
- return pulumi.get(self, "names")
2241
-
2242
- @property
2243
- @pulumi.getter(name="ociMediaTypes")
2244
- def oci_media_types(self) -> Optional[bool]:
2245
- """
2246
- Use OCI media types in exporter manifests.
2247
- """
2248
- return pulumi.get(self, "oci_media_types")
2249
-
2250
- @property
2251
- @pulumi.getter
2252
- def push(self) -> Optional[bool]:
2253
- """
2254
- Push after creating the image.
2255
- """
2256
- return pulumi.get(self, "push")
2257
-
2258
- @property
2259
- @pulumi.getter(name="pushByDigest")
2260
- def push_by_digest(self) -> Optional[bool]:
2261
- """
2262
- Push image without name.
2263
- """
2264
- return pulumi.get(self, "push_by_digest")
2265
-
2266
- @property
2267
- @pulumi.getter
2268
- def store(self) -> Optional[bool]:
2269
- """
2270
- Store resulting images to the worker's image store and ensure all of
2271
- its blobs are in the content store.
2272
-
2273
- Defaults to `true`.
2274
-
2275
- Ignored if the worker doesn't have image store (when using OCI workers,
2276
- for example).
2277
- """
2278
- return pulumi.get(self, "store")
2279
-
2280
- @property
2281
- @pulumi.getter
2282
- def unpack(self) -> Optional[bool]:
2283
- """
2284
- Unpack image after creation (for use with containerd). Defaults to
2285
- `false`.
2286
- """
2287
- return pulumi.get(self, "unpack")
2288
-
2289
-
2290
- @pulumi.output_type
2291
- class ExportTar(dict):
2292
- def __init__(__self__, *,
2293
- dest: str):
2294
- """
2295
- :param str dest: Output path.
2296
- """
2297
- pulumi.set(__self__, "dest", dest)
2298
-
2299
- @property
2300
- @pulumi.getter
2301
- def dest(self) -> str:
2302
- """
2303
- Output path.
2304
- """
2305
- return pulumi.get(self, "dest")
2306
-
2307
-
2308
- @pulumi.output_type
2309
- class RegistryAuth(dict):
2310
- def __init__(__self__, *,
2311
- address: str,
2312
- password: Optional[str] = None,
2313
- username: Optional[str] = None):
2314
- """
2315
- :param str address: The registry's address (e.g. "docker.io").
2316
- :param str password: Password or token for the registry.
2317
- :param str username: Username for the registry.
2318
- """
2319
- pulumi.set(__self__, "address", address)
2320
- if password is not None:
2321
- pulumi.set(__self__, "password", password)
2322
- if username is not None:
2323
- pulumi.set(__self__, "username", username)
2324
-
2325
- @property
2326
- @pulumi.getter
2327
- def address(self) -> str:
2328
- """
2329
- The registry's address (e.g. "docker.io").
2330
- """
2331
- return pulumi.get(self, "address")
2332
-
2333
- @property
2334
- @pulumi.getter
2335
- def password(self) -> Optional[str]:
2336
- """
2337
- Password or token for the registry.
2338
- """
2339
- return pulumi.get(self, "password")
2340
-
2341
- @property
2342
- @pulumi.getter
2343
- def username(self) -> Optional[str]:
2344
- """
2345
- Username for the registry.
2346
- """
2347
- return pulumi.get(self, "username")
2348
-
2349
-
2350
- @pulumi.output_type
2351
- class SSH(dict):
2352
- def __init__(__self__, *,
2353
- id: str,
2354
- paths: Optional[Sequence[str]] = None):
2355
- """
2356
- :param str id: Useful for distinguishing different servers that are part of the same
2357
- build.
2358
-
2359
- A value of `default` is appropriate if only dealing with a single host.
2360
- :param Sequence[str] paths: SSH agent socket or private keys to expose to the build under the given
2361
- identifier.
2362
-
2363
- Defaults to `[$SSH_AUTH_SOCK]`.
2364
-
2365
- Note that your keys are **not** automatically added when using an
2366
- agent. Run `ssh-add -l` locally to confirm which public keys are
2367
- visible to the agent; these will be exposed to your build.
2368
- """
2369
- pulumi.set(__self__, "id", id)
2370
- if paths is not None:
2371
- pulumi.set(__self__, "paths", paths)
2372
-
2373
- @property
2374
- @pulumi.getter
2375
- def id(self) -> str:
2376
- """
2377
- Useful for distinguishing different servers that are part of the same
2378
- build.
2379
-
2380
- A value of `default` is appropriate if only dealing with a single host.
2381
- """
2382
- return pulumi.get(self, "id")
2383
-
2384
- @property
2385
- @pulumi.getter
2386
- def paths(self) -> Optional[Sequence[str]]:
2387
- """
2388
- SSH agent socket or private keys to expose to the build under the given
2389
- identifier.
2390
-
2391
- Defaults to `[$SSH_AUTH_SOCK]`.
2392
-
2393
- Note that your keys are **not** automatically added when using an
2394
- agent. Run `ssh-add -l` locally to confirm which public keys are
2395
- visible to the agent; these will be exposed to your build.
2396
- """
2397
- return pulumi.get(self, "paths")
2398
-
2399
-