pulumi-docker 4.6.0b2__py3-none-any.whl → 4.6.0b4__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.
- pulumi_docker/__init__.py +2 -1
- pulumi_docker/buildx/__init__.py +1 -0
- pulumi_docker/buildx/_inputs.py +521 -487
- pulumi_docker/buildx/image.py +238 -78
- pulumi_docker/buildx/index.py +352 -0
- pulumi_docker/buildx/outputs.py +316 -283
- {pulumi_docker-4.6.0b2.dist-info → pulumi_docker-4.6.0b4.dist-info}/METADATA +1 -1
- {pulumi_docker-4.6.0b2.dist-info → pulumi_docker-4.6.0b4.dist-info}/RECORD +10 -9
- {pulumi_docker-4.6.0b2.dist-info → pulumi_docker-4.6.0b4.dist-info}/WHEEL +1 -1
- {pulumi_docker-4.6.0b2.dist-info → pulumi_docker-4.6.0b4.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,352 @@
|
|
|
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 ._inputs import *
|
|
13
|
+
|
|
14
|
+
__all__ = ['IndexArgs', 'Index']
|
|
15
|
+
|
|
16
|
+
@pulumi.input_type
|
|
17
|
+
class IndexArgs:
|
|
18
|
+
def __init__(__self__, *,
|
|
19
|
+
sources: pulumi.Input[Sequence[pulumi.Input[str]]],
|
|
20
|
+
tag: pulumi.Input[str],
|
|
21
|
+
push: Optional[pulumi.Input[bool]] = None,
|
|
22
|
+
registry: Optional[pulumi.Input['RegistryAuthArgs']] = None):
|
|
23
|
+
"""
|
|
24
|
+
The set of arguments for constructing a Index resource.
|
|
25
|
+
:param pulumi.Input[Sequence[pulumi.Input[str]]] sources: Existing images to include in the index.
|
|
26
|
+
:param pulumi.Input[str] tag: The tag to apply to the index.
|
|
27
|
+
:param pulumi.Input[bool] push: If true, push the index to the target registry.
|
|
28
|
+
|
|
29
|
+
Defaults to `true`.
|
|
30
|
+
:param pulumi.Input['RegistryAuthArgs'] registry: Authentication for the registry where the tagged index will be pushed.
|
|
31
|
+
|
|
32
|
+
Credentials can also be included with the provider's configuration.
|
|
33
|
+
"""
|
|
34
|
+
pulumi.set(__self__, "sources", sources)
|
|
35
|
+
pulumi.set(__self__, "tag", tag)
|
|
36
|
+
if push is None:
|
|
37
|
+
push = True
|
|
38
|
+
if push is not None:
|
|
39
|
+
pulumi.set(__self__, "push", push)
|
|
40
|
+
if registry is not None:
|
|
41
|
+
pulumi.set(__self__, "registry", registry)
|
|
42
|
+
|
|
43
|
+
@property
|
|
44
|
+
@pulumi.getter
|
|
45
|
+
def sources(self) -> pulumi.Input[Sequence[pulumi.Input[str]]]:
|
|
46
|
+
"""
|
|
47
|
+
Existing images to include in the index.
|
|
48
|
+
"""
|
|
49
|
+
return pulumi.get(self, "sources")
|
|
50
|
+
|
|
51
|
+
@sources.setter
|
|
52
|
+
def sources(self, value: pulumi.Input[Sequence[pulumi.Input[str]]]):
|
|
53
|
+
pulumi.set(self, "sources", value)
|
|
54
|
+
|
|
55
|
+
@property
|
|
56
|
+
@pulumi.getter
|
|
57
|
+
def tag(self) -> pulumi.Input[str]:
|
|
58
|
+
"""
|
|
59
|
+
The tag to apply to the index.
|
|
60
|
+
"""
|
|
61
|
+
return pulumi.get(self, "tag")
|
|
62
|
+
|
|
63
|
+
@tag.setter
|
|
64
|
+
def tag(self, value: pulumi.Input[str]):
|
|
65
|
+
pulumi.set(self, "tag", value)
|
|
66
|
+
|
|
67
|
+
@property
|
|
68
|
+
@pulumi.getter
|
|
69
|
+
def push(self) -> Optional[pulumi.Input[bool]]:
|
|
70
|
+
"""
|
|
71
|
+
If true, push the index to the target registry.
|
|
72
|
+
|
|
73
|
+
Defaults to `true`.
|
|
74
|
+
"""
|
|
75
|
+
return pulumi.get(self, "push")
|
|
76
|
+
|
|
77
|
+
@push.setter
|
|
78
|
+
def push(self, value: Optional[pulumi.Input[bool]]):
|
|
79
|
+
pulumi.set(self, "push", value)
|
|
80
|
+
|
|
81
|
+
@property
|
|
82
|
+
@pulumi.getter
|
|
83
|
+
def registry(self) -> Optional[pulumi.Input['RegistryAuthArgs']]:
|
|
84
|
+
"""
|
|
85
|
+
Authentication for the registry where the tagged index will be pushed.
|
|
86
|
+
|
|
87
|
+
Credentials can also be included with the provider's configuration.
|
|
88
|
+
"""
|
|
89
|
+
return pulumi.get(self, "registry")
|
|
90
|
+
|
|
91
|
+
@registry.setter
|
|
92
|
+
def registry(self, value: Optional[pulumi.Input['RegistryAuthArgs']]):
|
|
93
|
+
pulumi.set(self, "registry", value)
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
class Index(pulumi.CustomResource):
|
|
97
|
+
@overload
|
|
98
|
+
def __init__(__self__,
|
|
99
|
+
resource_name: str,
|
|
100
|
+
opts: Optional[pulumi.ResourceOptions] = None,
|
|
101
|
+
push: Optional[pulumi.Input[bool]] = None,
|
|
102
|
+
registry: Optional[pulumi.Input[pulumi.InputType['RegistryAuthArgs']]] = None,
|
|
103
|
+
sources: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
|
|
104
|
+
tag: Optional[pulumi.Input[str]] = None,
|
|
105
|
+
__props__=None):
|
|
106
|
+
"""
|
|
107
|
+
An index (or manifest list) referencing one or more existing images.
|
|
108
|
+
|
|
109
|
+
Useful for crafting a multi-platform image from several
|
|
110
|
+
platform-specific images.
|
|
111
|
+
|
|
112
|
+
This creates an OCI image index or a Docker manifest list depending on
|
|
113
|
+
the media types of the source images.
|
|
114
|
+
|
|
115
|
+
## Example Usage
|
|
116
|
+
### Multi-platform registry caching
|
|
117
|
+
```python
|
|
118
|
+
import pulumi
|
|
119
|
+
import pulumi_docker as docker
|
|
120
|
+
|
|
121
|
+
amd64 = docker.buildx.Image("amd64",
|
|
122
|
+
cache_from=[docker.buildx.CacheFromArgs(
|
|
123
|
+
registry=docker.buildx.CacheFromRegistryArgs(
|
|
124
|
+
ref="docker.io/pulumi/pulumi:cache-amd64",
|
|
125
|
+
),
|
|
126
|
+
)],
|
|
127
|
+
cache_to=[docker.buildx.CacheToArgs(
|
|
128
|
+
registry=docker.buildx.CacheToRegistryArgs(
|
|
129
|
+
mode=docker.buildx/image.CacheMode.MAX,
|
|
130
|
+
ref="docker.io/pulumi/pulumi:cache-amd64",
|
|
131
|
+
),
|
|
132
|
+
)],
|
|
133
|
+
context=docker.buildx.BuildContextArgs(
|
|
134
|
+
location="app",
|
|
135
|
+
),
|
|
136
|
+
platforms=[docker.buildx/image.Platform.LINUX_AMD64],
|
|
137
|
+
tags=["docker.io/pulumi/pulumi:3.107.0-amd64"])
|
|
138
|
+
arm64 = docker.buildx.Image("arm64",
|
|
139
|
+
cache_from=[docker.buildx.CacheFromArgs(
|
|
140
|
+
registry=docker.buildx.CacheFromRegistryArgs(
|
|
141
|
+
ref="docker.io/pulumi/pulumi:cache-arm64",
|
|
142
|
+
),
|
|
143
|
+
)],
|
|
144
|
+
cache_to=[docker.buildx.CacheToArgs(
|
|
145
|
+
registry=docker.buildx.CacheToRegistryArgs(
|
|
146
|
+
mode=docker.buildx/image.CacheMode.MAX,
|
|
147
|
+
ref="docker.io/pulumi/pulumi:cache-arm64",
|
|
148
|
+
),
|
|
149
|
+
)],
|
|
150
|
+
context=docker.buildx.BuildContextArgs(
|
|
151
|
+
location="app",
|
|
152
|
+
),
|
|
153
|
+
platforms=[docker.buildx/image.Platform.LINUX_ARM64],
|
|
154
|
+
tags=["docker.io/pulumi/pulumi:3.107.0-arm64"])
|
|
155
|
+
index = docker.buildx.Index("index",
|
|
156
|
+
sources=[
|
|
157
|
+
amd64.ref,
|
|
158
|
+
arm64.ref,
|
|
159
|
+
],
|
|
160
|
+
tag="docker.io/pulumi/pulumi:3.107.0")
|
|
161
|
+
pulumi.export("ref", index.ref)
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
:param str resource_name: The name of the resource.
|
|
165
|
+
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
166
|
+
:param pulumi.Input[bool] push: If true, push the index to the target registry.
|
|
167
|
+
|
|
168
|
+
Defaults to `true`.
|
|
169
|
+
:param pulumi.Input[pulumi.InputType['RegistryAuthArgs']] registry: Authentication for the registry where the tagged index will be pushed.
|
|
170
|
+
|
|
171
|
+
Credentials can also be included with the provider's configuration.
|
|
172
|
+
:param pulumi.Input[Sequence[pulumi.Input[str]]] sources: Existing images to include in the index.
|
|
173
|
+
:param pulumi.Input[str] tag: The tag to apply to the index.
|
|
174
|
+
"""
|
|
175
|
+
...
|
|
176
|
+
@overload
|
|
177
|
+
def __init__(__self__,
|
|
178
|
+
resource_name: str,
|
|
179
|
+
args: IndexArgs,
|
|
180
|
+
opts: Optional[pulumi.ResourceOptions] = None):
|
|
181
|
+
"""
|
|
182
|
+
An index (or manifest list) referencing one or more existing images.
|
|
183
|
+
|
|
184
|
+
Useful for crafting a multi-platform image from several
|
|
185
|
+
platform-specific images.
|
|
186
|
+
|
|
187
|
+
This creates an OCI image index or a Docker manifest list depending on
|
|
188
|
+
the media types of the source images.
|
|
189
|
+
|
|
190
|
+
## Example Usage
|
|
191
|
+
### Multi-platform registry caching
|
|
192
|
+
```python
|
|
193
|
+
import pulumi
|
|
194
|
+
import pulumi_docker as docker
|
|
195
|
+
|
|
196
|
+
amd64 = docker.buildx.Image("amd64",
|
|
197
|
+
cache_from=[docker.buildx.CacheFromArgs(
|
|
198
|
+
registry=docker.buildx.CacheFromRegistryArgs(
|
|
199
|
+
ref="docker.io/pulumi/pulumi:cache-amd64",
|
|
200
|
+
),
|
|
201
|
+
)],
|
|
202
|
+
cache_to=[docker.buildx.CacheToArgs(
|
|
203
|
+
registry=docker.buildx.CacheToRegistryArgs(
|
|
204
|
+
mode=docker.buildx/image.CacheMode.MAX,
|
|
205
|
+
ref="docker.io/pulumi/pulumi:cache-amd64",
|
|
206
|
+
),
|
|
207
|
+
)],
|
|
208
|
+
context=docker.buildx.BuildContextArgs(
|
|
209
|
+
location="app",
|
|
210
|
+
),
|
|
211
|
+
platforms=[docker.buildx/image.Platform.LINUX_AMD64],
|
|
212
|
+
tags=["docker.io/pulumi/pulumi:3.107.0-amd64"])
|
|
213
|
+
arm64 = docker.buildx.Image("arm64",
|
|
214
|
+
cache_from=[docker.buildx.CacheFromArgs(
|
|
215
|
+
registry=docker.buildx.CacheFromRegistryArgs(
|
|
216
|
+
ref="docker.io/pulumi/pulumi:cache-arm64",
|
|
217
|
+
),
|
|
218
|
+
)],
|
|
219
|
+
cache_to=[docker.buildx.CacheToArgs(
|
|
220
|
+
registry=docker.buildx.CacheToRegistryArgs(
|
|
221
|
+
mode=docker.buildx/image.CacheMode.MAX,
|
|
222
|
+
ref="docker.io/pulumi/pulumi:cache-arm64",
|
|
223
|
+
),
|
|
224
|
+
)],
|
|
225
|
+
context=docker.buildx.BuildContextArgs(
|
|
226
|
+
location="app",
|
|
227
|
+
),
|
|
228
|
+
platforms=[docker.buildx/image.Platform.LINUX_ARM64],
|
|
229
|
+
tags=["docker.io/pulumi/pulumi:3.107.0-arm64"])
|
|
230
|
+
index = docker.buildx.Index("index",
|
|
231
|
+
sources=[
|
|
232
|
+
amd64.ref,
|
|
233
|
+
arm64.ref,
|
|
234
|
+
],
|
|
235
|
+
tag="docker.io/pulumi/pulumi:3.107.0")
|
|
236
|
+
pulumi.export("ref", index.ref)
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
:param str resource_name: The name of the resource.
|
|
240
|
+
:param IndexArgs args: The arguments to use to populate this resource's properties.
|
|
241
|
+
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
242
|
+
"""
|
|
243
|
+
...
|
|
244
|
+
def __init__(__self__, resource_name: str, *args, **kwargs):
|
|
245
|
+
resource_args, opts = _utilities.get_resource_args_opts(IndexArgs, pulumi.ResourceOptions, *args, **kwargs)
|
|
246
|
+
if resource_args is not None:
|
|
247
|
+
__self__._internal_init(resource_name, opts, **resource_args.__dict__)
|
|
248
|
+
else:
|
|
249
|
+
__self__._internal_init(resource_name, *args, **kwargs)
|
|
250
|
+
|
|
251
|
+
def _internal_init(__self__,
|
|
252
|
+
resource_name: str,
|
|
253
|
+
opts: Optional[pulumi.ResourceOptions] = None,
|
|
254
|
+
push: Optional[pulumi.Input[bool]] = None,
|
|
255
|
+
registry: Optional[pulumi.Input[pulumi.InputType['RegistryAuthArgs']]] = None,
|
|
256
|
+
sources: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
|
|
257
|
+
tag: Optional[pulumi.Input[str]] = None,
|
|
258
|
+
__props__=None):
|
|
259
|
+
opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
|
|
260
|
+
if not isinstance(opts, pulumi.ResourceOptions):
|
|
261
|
+
raise TypeError('Expected resource options to be a ResourceOptions instance')
|
|
262
|
+
if opts.id is None:
|
|
263
|
+
if __props__ is not None:
|
|
264
|
+
raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
|
|
265
|
+
__props__ = IndexArgs.__new__(IndexArgs)
|
|
266
|
+
|
|
267
|
+
if push is None:
|
|
268
|
+
push = True
|
|
269
|
+
__props__.__dict__["push"] = push
|
|
270
|
+
__props__.__dict__["registry"] = registry
|
|
271
|
+
if sources is None and not opts.urn:
|
|
272
|
+
raise TypeError("Missing required property 'sources'")
|
|
273
|
+
__props__.__dict__["sources"] = sources
|
|
274
|
+
if tag is None and not opts.urn:
|
|
275
|
+
raise TypeError("Missing required property 'tag'")
|
|
276
|
+
__props__.__dict__["tag"] = tag
|
|
277
|
+
__props__.__dict__["ref"] = None
|
|
278
|
+
super(Index, __self__).__init__(
|
|
279
|
+
'docker:buildx/image:Index',
|
|
280
|
+
resource_name,
|
|
281
|
+
__props__,
|
|
282
|
+
opts)
|
|
283
|
+
|
|
284
|
+
@staticmethod
|
|
285
|
+
def get(resource_name: str,
|
|
286
|
+
id: pulumi.Input[str],
|
|
287
|
+
opts: Optional[pulumi.ResourceOptions] = None) -> 'Index':
|
|
288
|
+
"""
|
|
289
|
+
Get an existing Index resource's state with the given name, id, and optional extra
|
|
290
|
+
properties used to qualify the lookup.
|
|
291
|
+
|
|
292
|
+
:param str resource_name: The unique name of the resulting resource.
|
|
293
|
+
:param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
|
|
294
|
+
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
295
|
+
"""
|
|
296
|
+
opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
|
|
297
|
+
|
|
298
|
+
__props__ = IndexArgs.__new__(IndexArgs)
|
|
299
|
+
|
|
300
|
+
__props__.__dict__["push"] = None
|
|
301
|
+
__props__.__dict__["ref"] = None
|
|
302
|
+
__props__.__dict__["registry"] = None
|
|
303
|
+
__props__.__dict__["sources"] = None
|
|
304
|
+
__props__.__dict__["tag"] = None
|
|
305
|
+
return Index(resource_name, opts=opts, __props__=__props__)
|
|
306
|
+
|
|
307
|
+
@property
|
|
308
|
+
@pulumi.getter
|
|
309
|
+
def push(self) -> pulumi.Output[Optional[bool]]:
|
|
310
|
+
"""
|
|
311
|
+
If true, push the index to the target registry.
|
|
312
|
+
|
|
313
|
+
Defaults to `true`.
|
|
314
|
+
"""
|
|
315
|
+
return pulumi.get(self, "push")
|
|
316
|
+
|
|
317
|
+
@property
|
|
318
|
+
@pulumi.getter
|
|
319
|
+
def ref(self) -> pulumi.Output[str]:
|
|
320
|
+
"""
|
|
321
|
+
The pushed tag with digest.
|
|
322
|
+
|
|
323
|
+
Identical to the tag if the index was not pushed.
|
|
324
|
+
"""
|
|
325
|
+
return pulumi.get(self, "ref")
|
|
326
|
+
|
|
327
|
+
@property
|
|
328
|
+
@pulumi.getter
|
|
329
|
+
def registry(self) -> pulumi.Output[Optional['outputs.RegistryAuth']]:
|
|
330
|
+
"""
|
|
331
|
+
Authentication for the registry where the tagged index will be pushed.
|
|
332
|
+
|
|
333
|
+
Credentials can also be included with the provider's configuration.
|
|
334
|
+
"""
|
|
335
|
+
return pulumi.get(self, "registry")
|
|
336
|
+
|
|
337
|
+
@property
|
|
338
|
+
@pulumi.getter
|
|
339
|
+
def sources(self) -> pulumi.Output[Sequence[str]]:
|
|
340
|
+
"""
|
|
341
|
+
Existing images to include in the index.
|
|
342
|
+
"""
|
|
343
|
+
return pulumi.get(self, "sources")
|
|
344
|
+
|
|
345
|
+
@property
|
|
346
|
+
@pulumi.getter
|
|
347
|
+
def tag(self) -> pulumi.Output[str]:
|
|
348
|
+
"""
|
|
349
|
+
The tag to apply to the index.
|
|
350
|
+
"""
|
|
351
|
+
return pulumi.get(self, "tag")
|
|
352
|
+
|