pulumi-docker 4.7.0a1705628423__py3-none-any.whl → 4.7.0a1736849606__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/_inputs.py +1583 -34
- pulumi_docker/_utilities.py +43 -7
- pulumi_docker/config/__init__.pyi +5 -0
- pulumi_docker/config/outputs.py +27 -0
- pulumi_docker/config/vars.py +5 -0
- pulumi_docker/container.py +202 -181
- pulumi_docker/get_logs.py +34 -5
- pulumi_docker/get_network.py +19 -6
- pulumi_docker/get_plugin.py +35 -11
- pulumi_docker/get_registry_image.py +24 -13
- pulumi_docker/get_remote_image.py +22 -5
- pulumi_docker/image.py +73 -52
- pulumi_docker/network.py +95 -46
- pulumi_docker/outputs.py +95 -34
- pulumi_docker/plugin.py +19 -46
- pulumi_docker/provider.py +7 -2
- pulumi_docker/pulumi-plugin.json +2 -1
- pulumi_docker/registry_image.py +19 -46
- pulumi_docker/remote_image.py +107 -48
- pulumi_docker/secret.py +16 -7
- pulumi_docker/service.py +127 -82
- pulumi_docker/service_config.py +55 -10
- pulumi_docker/tag.py +5 -0
- pulumi_docker/volume.py +76 -27
- {pulumi_docker-4.7.0a1705628423.dist-info → pulumi_docker-4.7.0a1736849606.dist-info}/METADATA +7 -6
- pulumi_docker-4.7.0a1736849606.dist-info/RECORD +32 -0
- {pulumi_docker-4.7.0a1705628423.dist-info → pulumi_docker-4.7.0a1736849606.dist-info}/WHEEL +1 -1
- pulumi_docker-4.7.0a1705628423.dist-info/RECORD +0 -32
- {pulumi_docker-4.7.0a1705628423.dist-info → pulumi_docker-4.7.0a1736849606.dist-info}/top_level.txt +0 -0
pulumi_docker/registry_image.py
CHANGED
|
@@ -4,9 +4,14 @@
|
|
|
4
4
|
|
|
5
5
|
import copy
|
|
6
6
|
import warnings
|
|
7
|
+
import sys
|
|
7
8
|
import pulumi
|
|
8
9
|
import pulumi.runtime
|
|
9
10
|
from typing import Any, Mapping, Optional, Sequence, Union, overload
|
|
11
|
+
if sys.version_info >= (3, 11):
|
|
12
|
+
from typing import NotRequired, TypedDict, TypeAlias
|
|
13
|
+
else:
|
|
14
|
+
from typing_extensions import NotRequired, TypedDict, TypeAlias
|
|
10
15
|
from . import _utilities
|
|
11
16
|
|
|
12
17
|
__all__ = ['RegistryImageArgs', 'RegistryImage']
|
|
@@ -17,13 +22,13 @@ class RegistryImageArgs:
|
|
|
17
22
|
insecure_skip_verify: Optional[pulumi.Input[bool]] = None,
|
|
18
23
|
keep_remotely: Optional[pulumi.Input[bool]] = None,
|
|
19
24
|
name: Optional[pulumi.Input[str]] = None,
|
|
20
|
-
triggers: Optional[pulumi.Input[Mapping[str,
|
|
25
|
+
triggers: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None):
|
|
21
26
|
"""
|
|
22
27
|
The set of arguments for constructing a RegistryImage resource.
|
|
23
28
|
:param pulumi.Input[bool] insecure_skip_verify: If `true`, the verification of TLS certificates of the server/registry is disabled. Defaults to `false`
|
|
24
29
|
:param pulumi.Input[bool] keep_remotely: If true, then the Docker image won't be deleted on destroy operation. If this is false, it will delete the image from the docker registry on destroy operation. Defaults to `false`
|
|
25
30
|
:param pulumi.Input[str] name: The name of the Docker image.
|
|
26
|
-
:param pulumi.Input[Mapping[str,
|
|
31
|
+
:param pulumi.Input[Mapping[str, pulumi.Input[str]]] triggers: A map of arbitrary strings that, when changed, will force the `RegistryImage` resource to be replaced. This can be used to repush a local image
|
|
27
32
|
"""
|
|
28
33
|
if insecure_skip_verify is not None:
|
|
29
34
|
pulumi.set(__self__, "insecure_skip_verify", insecure_skip_verify)
|
|
@@ -72,14 +77,14 @@ class RegistryImageArgs:
|
|
|
72
77
|
|
|
73
78
|
@property
|
|
74
79
|
@pulumi.getter
|
|
75
|
-
def triggers(self) -> Optional[pulumi.Input[Mapping[str,
|
|
80
|
+
def triggers(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]:
|
|
76
81
|
"""
|
|
77
82
|
A map of arbitrary strings that, when changed, will force the `RegistryImage` resource to be replaced. This can be used to repush a local image
|
|
78
83
|
"""
|
|
79
84
|
return pulumi.get(self, "triggers")
|
|
80
85
|
|
|
81
86
|
@triggers.setter
|
|
82
|
-
def triggers(self, value: Optional[pulumi.Input[Mapping[str,
|
|
87
|
+
def triggers(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]):
|
|
83
88
|
pulumi.set(self, "triggers", value)
|
|
84
89
|
|
|
85
90
|
|
|
@@ -90,14 +95,14 @@ class _RegistryImageState:
|
|
|
90
95
|
keep_remotely: Optional[pulumi.Input[bool]] = None,
|
|
91
96
|
name: Optional[pulumi.Input[str]] = None,
|
|
92
97
|
sha256_digest: Optional[pulumi.Input[str]] = None,
|
|
93
|
-
triggers: Optional[pulumi.Input[Mapping[str,
|
|
98
|
+
triggers: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None):
|
|
94
99
|
"""
|
|
95
100
|
Input properties used for looking up and filtering RegistryImage resources.
|
|
96
101
|
:param pulumi.Input[bool] insecure_skip_verify: If `true`, the verification of TLS certificates of the server/registry is disabled. Defaults to `false`
|
|
97
102
|
:param pulumi.Input[bool] keep_remotely: If true, then the Docker image won't be deleted on destroy operation. If this is false, it will delete the image from the docker registry on destroy operation. Defaults to `false`
|
|
98
103
|
:param pulumi.Input[str] name: The name of the Docker image.
|
|
99
104
|
:param pulumi.Input[str] sha256_digest: The sha256 digest of the image.
|
|
100
|
-
:param pulumi.Input[Mapping[str,
|
|
105
|
+
:param pulumi.Input[Mapping[str, pulumi.Input[str]]] triggers: A map of arbitrary strings that, when changed, will force the `RegistryImage` resource to be replaced. This can be used to repush a local image
|
|
101
106
|
"""
|
|
102
107
|
if insecure_skip_verify is not None:
|
|
103
108
|
pulumi.set(__self__, "insecure_skip_verify", insecure_skip_verify)
|
|
@@ -160,14 +165,14 @@ class _RegistryImageState:
|
|
|
160
165
|
|
|
161
166
|
@property
|
|
162
167
|
@pulumi.getter
|
|
163
|
-
def triggers(self) -> Optional[pulumi.Input[Mapping[str,
|
|
168
|
+
def triggers(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]:
|
|
164
169
|
"""
|
|
165
170
|
A map of arbitrary strings that, when changed, will force the `RegistryImage` resource to be replaced. This can be used to repush a local image
|
|
166
171
|
"""
|
|
167
172
|
return pulumi.get(self, "triggers")
|
|
168
173
|
|
|
169
174
|
@triggers.setter
|
|
170
|
-
def triggers(self, value: Optional[pulumi.Input[Mapping[str,
|
|
175
|
+
def triggers(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]):
|
|
171
176
|
pulumi.set(self, "triggers", value)
|
|
172
177
|
|
|
173
178
|
|
|
@@ -179,34 +184,18 @@ class RegistryImage(pulumi.CustomResource):
|
|
|
179
184
|
insecure_skip_verify: Optional[pulumi.Input[bool]] = None,
|
|
180
185
|
keep_remotely: Optional[pulumi.Input[bool]] = None,
|
|
181
186
|
name: Optional[pulumi.Input[str]] = None,
|
|
182
|
-
triggers: Optional[pulumi.Input[Mapping[str,
|
|
187
|
+
triggers: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
|
|
183
188
|
__props__=None):
|
|
184
189
|
"""
|
|
185
190
|
<!-- Bug: Type and Name are switched -->
|
|
186
191
|
Manages the lifecycle of docker image in a registry. You can upload images to a registry (= `docker push`) and also delete them again
|
|
187
192
|
|
|
188
|
-
## Example Usage
|
|
189
|
-
|
|
190
|
-
Build an image with the `RemoteImage` resource and then push it to a registry:
|
|
191
|
-
|
|
192
|
-
```python
|
|
193
|
-
import pulumi
|
|
194
|
-
import pulumi_docker as docker
|
|
195
|
-
|
|
196
|
-
helloworld = docker.RegistryImage("helloworld", keep_remotely=True)
|
|
197
|
-
image = docker.RemoteImage("image",
|
|
198
|
-
name="registry.com/somename:1.0",
|
|
199
|
-
build=docker.RemoteImageBuildArgs(
|
|
200
|
-
context=f"{path['cwd']}/absolutePathToContextFolder",
|
|
201
|
-
))
|
|
202
|
-
```
|
|
203
|
-
|
|
204
193
|
:param str resource_name: The name of the resource.
|
|
205
194
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
206
195
|
:param pulumi.Input[bool] insecure_skip_verify: If `true`, the verification of TLS certificates of the server/registry is disabled. Defaults to `false`
|
|
207
196
|
:param pulumi.Input[bool] keep_remotely: If true, then the Docker image won't be deleted on destroy operation. If this is false, it will delete the image from the docker registry on destroy operation. Defaults to `false`
|
|
208
197
|
:param pulumi.Input[str] name: The name of the Docker image.
|
|
209
|
-
:param pulumi.Input[Mapping[str,
|
|
198
|
+
:param pulumi.Input[Mapping[str, pulumi.Input[str]]] triggers: A map of arbitrary strings that, when changed, will force the `RegistryImage` resource to be replaced. This can be used to repush a local image
|
|
210
199
|
"""
|
|
211
200
|
...
|
|
212
201
|
@overload
|
|
@@ -218,22 +207,6 @@ class RegistryImage(pulumi.CustomResource):
|
|
|
218
207
|
<!-- Bug: Type and Name are switched -->
|
|
219
208
|
Manages the lifecycle of docker image in a registry. You can upload images to a registry (= `docker push`) and also delete them again
|
|
220
209
|
|
|
221
|
-
## Example Usage
|
|
222
|
-
|
|
223
|
-
Build an image with the `RemoteImage` resource and then push it to a registry:
|
|
224
|
-
|
|
225
|
-
```python
|
|
226
|
-
import pulumi
|
|
227
|
-
import pulumi_docker as docker
|
|
228
|
-
|
|
229
|
-
helloworld = docker.RegistryImage("helloworld", keep_remotely=True)
|
|
230
|
-
image = docker.RemoteImage("image",
|
|
231
|
-
name="registry.com/somename:1.0",
|
|
232
|
-
build=docker.RemoteImageBuildArgs(
|
|
233
|
-
context=f"{path['cwd']}/absolutePathToContextFolder",
|
|
234
|
-
))
|
|
235
|
-
```
|
|
236
|
-
|
|
237
210
|
:param str resource_name: The name of the resource.
|
|
238
211
|
:param RegistryImageArgs args: The arguments to use to populate this resource's properties.
|
|
239
212
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
@@ -252,7 +225,7 @@ class RegistryImage(pulumi.CustomResource):
|
|
|
252
225
|
insecure_skip_verify: Optional[pulumi.Input[bool]] = None,
|
|
253
226
|
keep_remotely: Optional[pulumi.Input[bool]] = None,
|
|
254
227
|
name: Optional[pulumi.Input[str]] = None,
|
|
255
|
-
triggers: Optional[pulumi.Input[Mapping[str,
|
|
228
|
+
triggers: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
|
|
256
229
|
__props__=None):
|
|
257
230
|
opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
|
|
258
231
|
if not isinstance(opts, pulumi.ResourceOptions):
|
|
@@ -281,7 +254,7 @@ class RegistryImage(pulumi.CustomResource):
|
|
|
281
254
|
keep_remotely: Optional[pulumi.Input[bool]] = None,
|
|
282
255
|
name: Optional[pulumi.Input[str]] = None,
|
|
283
256
|
sha256_digest: Optional[pulumi.Input[str]] = None,
|
|
284
|
-
triggers: Optional[pulumi.Input[Mapping[str,
|
|
257
|
+
triggers: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None) -> 'RegistryImage':
|
|
285
258
|
"""
|
|
286
259
|
Get an existing RegistryImage resource's state with the given name, id, and optional extra
|
|
287
260
|
properties used to qualify the lookup.
|
|
@@ -293,7 +266,7 @@ class RegistryImage(pulumi.CustomResource):
|
|
|
293
266
|
:param pulumi.Input[bool] keep_remotely: If true, then the Docker image won't be deleted on destroy operation. If this is false, it will delete the image from the docker registry on destroy operation. Defaults to `false`
|
|
294
267
|
:param pulumi.Input[str] name: The name of the Docker image.
|
|
295
268
|
:param pulumi.Input[str] sha256_digest: The sha256 digest of the image.
|
|
296
|
-
:param pulumi.Input[Mapping[str,
|
|
269
|
+
:param pulumi.Input[Mapping[str, pulumi.Input[str]]] triggers: A map of arbitrary strings that, when changed, will force the `RegistryImage` resource to be replaced. This can be used to repush a local image
|
|
297
270
|
"""
|
|
298
271
|
opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
|
|
299
272
|
|
|
@@ -340,7 +313,7 @@ class RegistryImage(pulumi.CustomResource):
|
|
|
340
313
|
|
|
341
314
|
@property
|
|
342
315
|
@pulumi.getter
|
|
343
|
-
def triggers(self) -> pulumi.Output[Optional[Mapping[str,
|
|
316
|
+
def triggers(self) -> pulumi.Output[Optional[Mapping[str, str]]]:
|
|
344
317
|
"""
|
|
345
318
|
A map of arbitrary strings that, when changed, will force the `RegistryImage` resource to be replaced. This can be used to repush a local image
|
|
346
319
|
"""
|
pulumi_docker/remote_image.py
CHANGED
|
@@ -4,9 +4,14 @@
|
|
|
4
4
|
|
|
5
5
|
import copy
|
|
6
6
|
import warnings
|
|
7
|
+
import sys
|
|
7
8
|
import pulumi
|
|
8
9
|
import pulumi.runtime
|
|
9
10
|
from typing import Any, Mapping, Optional, Sequence, Union, overload
|
|
11
|
+
if sys.version_info >= (3, 11):
|
|
12
|
+
from typing import NotRequired, TypedDict, TypeAlias
|
|
13
|
+
else:
|
|
14
|
+
from typing_extensions import NotRequired, TypedDict, TypeAlias
|
|
10
15
|
from . import _utilities
|
|
11
16
|
from . import outputs
|
|
12
17
|
from ._inputs import *
|
|
@@ -22,16 +27,16 @@ class RemoteImageArgs:
|
|
|
22
27
|
keep_locally: Optional[pulumi.Input[bool]] = None,
|
|
23
28
|
platform: Optional[pulumi.Input[str]] = None,
|
|
24
29
|
pull_triggers: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
|
|
25
|
-
triggers: Optional[pulumi.Input[Mapping[str,
|
|
30
|
+
triggers: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None):
|
|
26
31
|
"""
|
|
27
32
|
The set of arguments for constructing a RemoteImage resource.
|
|
28
|
-
:param pulumi.Input[str] name:
|
|
33
|
+
:param pulumi.Input[str] name: The name of the Docker image, including any tags or SHA256 repo digests.
|
|
29
34
|
:param pulumi.Input['RemoteImageBuildArgs'] build: Configuration to build an image. Please see [docker build command reference](https://docs.docker.com/engine/reference/commandline/build/#options) too.
|
|
30
|
-
:param pulumi.Input[bool] force_remove:
|
|
35
|
+
:param pulumi.Input[bool] force_remove: If true, then the image is removed forcibly when the resource is destroyed.
|
|
31
36
|
:param pulumi.Input[bool] keep_locally: If true, then the Docker image won't be deleted on destroy operation. If this is false, it will delete the image from the docker local storage on destroy operation.
|
|
32
|
-
:param pulumi.Input[str] platform:
|
|
37
|
+
:param pulumi.Input[str] platform: The platform to use when pulling the image. Defaults to the platform of the current machine.
|
|
33
38
|
:param pulumi.Input[Sequence[pulumi.Input[str]]] pull_triggers: List of values which cause an image pull when changed. This is used to store the image digest from the registry when using the docker*registry*image.
|
|
34
|
-
:param pulumi.Input[Mapping[str,
|
|
39
|
+
:param pulumi.Input[Mapping[str, pulumi.Input[str]]] triggers: A map of arbitrary strings that, when changed, will force the `RemoteImage` resource to be replaced. This can be used to rebuild an image when contents of source code folders change
|
|
35
40
|
"""
|
|
36
41
|
pulumi.set(__self__, "name", name)
|
|
37
42
|
if build is not None:
|
|
@@ -51,7 +56,7 @@ class RemoteImageArgs:
|
|
|
51
56
|
@pulumi.getter
|
|
52
57
|
def name(self) -> pulumi.Input[str]:
|
|
53
58
|
"""
|
|
54
|
-
|
|
59
|
+
The name of the Docker image, including any tags or SHA256 repo digests.
|
|
55
60
|
"""
|
|
56
61
|
return pulumi.get(self, "name")
|
|
57
62
|
|
|
@@ -75,7 +80,7 @@ class RemoteImageArgs:
|
|
|
75
80
|
@pulumi.getter(name="forceRemove")
|
|
76
81
|
def force_remove(self) -> Optional[pulumi.Input[bool]]:
|
|
77
82
|
"""
|
|
78
|
-
|
|
83
|
+
If true, then the image is removed forcibly when the resource is destroyed.
|
|
79
84
|
"""
|
|
80
85
|
return pulumi.get(self, "force_remove")
|
|
81
86
|
|
|
@@ -99,7 +104,7 @@ class RemoteImageArgs:
|
|
|
99
104
|
@pulumi.getter
|
|
100
105
|
def platform(self) -> Optional[pulumi.Input[str]]:
|
|
101
106
|
"""
|
|
102
|
-
|
|
107
|
+
The platform to use when pulling the image. Defaults to the platform of the current machine.
|
|
103
108
|
"""
|
|
104
109
|
return pulumi.get(self, "platform")
|
|
105
110
|
|
|
@@ -121,14 +126,14 @@ class RemoteImageArgs:
|
|
|
121
126
|
|
|
122
127
|
@property
|
|
123
128
|
@pulumi.getter
|
|
124
|
-
def triggers(self) -> Optional[pulumi.Input[Mapping[str,
|
|
129
|
+
def triggers(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]:
|
|
125
130
|
"""
|
|
126
131
|
A map of arbitrary strings that, when changed, will force the `RemoteImage` resource to be replaced. This can be used to rebuild an image when contents of source code folders change
|
|
127
132
|
"""
|
|
128
133
|
return pulumi.get(self, "triggers")
|
|
129
134
|
|
|
130
135
|
@triggers.setter
|
|
131
|
-
def triggers(self, value: Optional[pulumi.Input[Mapping[str,
|
|
136
|
+
def triggers(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]):
|
|
132
137
|
pulumi.set(self, "triggers", value)
|
|
133
138
|
|
|
134
139
|
|
|
@@ -143,18 +148,18 @@ class _RemoteImageState:
|
|
|
143
148
|
platform: Optional[pulumi.Input[str]] = None,
|
|
144
149
|
pull_triggers: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
|
|
145
150
|
repo_digest: Optional[pulumi.Input[str]] = None,
|
|
146
|
-
triggers: Optional[pulumi.Input[Mapping[str,
|
|
151
|
+
triggers: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None):
|
|
147
152
|
"""
|
|
148
153
|
Input properties used for looking up and filtering RemoteImage resources.
|
|
149
154
|
:param pulumi.Input['RemoteImageBuildArgs'] build: Configuration to build an image. Please see [docker build command reference](https://docs.docker.com/engine/reference/commandline/build/#options) too.
|
|
150
|
-
:param pulumi.Input[bool] force_remove:
|
|
155
|
+
:param pulumi.Input[bool] force_remove: If true, then the image is removed forcibly when the resource is destroyed.
|
|
151
156
|
:param pulumi.Input[str] image_id: The ID of the image (as seen when executing `docker inspect` on the image). Can be used to reference the image via its ID in other resources.
|
|
152
157
|
:param pulumi.Input[bool] keep_locally: If true, then the Docker image won't be deleted on destroy operation. If this is false, it will delete the image from the docker local storage on destroy operation.
|
|
153
|
-
:param pulumi.Input[str] name:
|
|
154
|
-
:param pulumi.Input[str] platform:
|
|
158
|
+
:param pulumi.Input[str] name: The name of the Docker image, including any tags or SHA256 repo digests.
|
|
159
|
+
:param pulumi.Input[str] platform: The platform to use when pulling the image. Defaults to the platform of the current machine.
|
|
155
160
|
:param pulumi.Input[Sequence[pulumi.Input[str]]] pull_triggers: List of values which cause an image pull when changed. This is used to store the image digest from the registry when using the docker*registry*image.
|
|
156
161
|
:param pulumi.Input[str] repo_digest: The image sha256 digest in the form of `repo[:tag]@sha256:<hash>`.
|
|
157
|
-
:param pulumi.Input[Mapping[str,
|
|
162
|
+
:param pulumi.Input[Mapping[str, pulumi.Input[str]]] triggers: A map of arbitrary strings that, when changed, will force the `RemoteImage` resource to be replaced. This can be used to rebuild an image when contents of source code folders change
|
|
158
163
|
"""
|
|
159
164
|
if build is not None:
|
|
160
165
|
pulumi.set(__self__, "build", build)
|
|
@@ -191,7 +196,7 @@ class _RemoteImageState:
|
|
|
191
196
|
@pulumi.getter(name="forceRemove")
|
|
192
197
|
def force_remove(self) -> Optional[pulumi.Input[bool]]:
|
|
193
198
|
"""
|
|
194
|
-
|
|
199
|
+
If true, then the image is removed forcibly when the resource is destroyed.
|
|
195
200
|
"""
|
|
196
201
|
return pulumi.get(self, "force_remove")
|
|
197
202
|
|
|
@@ -227,7 +232,7 @@ class _RemoteImageState:
|
|
|
227
232
|
@pulumi.getter
|
|
228
233
|
def name(self) -> Optional[pulumi.Input[str]]:
|
|
229
234
|
"""
|
|
230
|
-
|
|
235
|
+
The name of the Docker image, including any tags or SHA256 repo digests.
|
|
231
236
|
"""
|
|
232
237
|
return pulumi.get(self, "name")
|
|
233
238
|
|
|
@@ -239,7 +244,7 @@ class _RemoteImageState:
|
|
|
239
244
|
@pulumi.getter
|
|
240
245
|
def platform(self) -> Optional[pulumi.Input[str]]:
|
|
241
246
|
"""
|
|
242
|
-
|
|
247
|
+
The platform to use when pulling the image. Defaults to the platform of the current machine.
|
|
243
248
|
"""
|
|
244
249
|
return pulumi.get(self, "platform")
|
|
245
250
|
|
|
@@ -273,14 +278,14 @@ class _RemoteImageState:
|
|
|
273
278
|
|
|
274
279
|
@property
|
|
275
280
|
@pulumi.getter
|
|
276
|
-
def triggers(self) -> Optional[pulumi.Input[Mapping[str,
|
|
281
|
+
def triggers(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]:
|
|
277
282
|
"""
|
|
278
283
|
A map of arbitrary strings that, when changed, will force the `RemoteImage` resource to be replaced. This can be used to rebuild an image when contents of source code folders change
|
|
279
284
|
"""
|
|
280
285
|
return pulumi.get(self, "triggers")
|
|
281
286
|
|
|
282
287
|
@triggers.setter
|
|
283
|
-
def triggers(self, value: Optional[pulumi.Input[Mapping[str,
|
|
288
|
+
def triggers(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]):
|
|
284
289
|
pulumi.set(self, "triggers", value)
|
|
285
290
|
|
|
286
291
|
|
|
@@ -289,13 +294,13 @@ class RemoteImage(pulumi.CustomResource):
|
|
|
289
294
|
def __init__(__self__,
|
|
290
295
|
resource_name: str,
|
|
291
296
|
opts: Optional[pulumi.ResourceOptions] = None,
|
|
292
|
-
build: Optional[pulumi.Input[
|
|
297
|
+
build: Optional[pulumi.Input[Union['RemoteImageBuildArgs', 'RemoteImageBuildArgsDict']]] = None,
|
|
293
298
|
force_remove: Optional[pulumi.Input[bool]] = None,
|
|
294
299
|
keep_locally: Optional[pulumi.Input[bool]] = None,
|
|
295
300
|
name: Optional[pulumi.Input[str]] = None,
|
|
296
301
|
platform: Optional[pulumi.Input[str]] = None,
|
|
297
302
|
pull_triggers: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
|
|
298
|
-
triggers: Optional[pulumi.Input[Mapping[str,
|
|
303
|
+
triggers: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
|
|
299
304
|
__props__=None):
|
|
300
305
|
"""
|
|
301
306
|
<!-- Bug: Type and Name are switched -->
|
|
@@ -303,6 +308,7 @@ class RemoteImage(pulumi.CustomResource):
|
|
|
303
308
|
This resource will *not* pull new layers of the image automatically unless used in conjunction with RegistryImage data source to update the `pull_triggers` field.
|
|
304
309
|
|
|
305
310
|
## Example Usage
|
|
311
|
+
|
|
306
312
|
### Basic
|
|
307
313
|
|
|
308
314
|
Finds and downloads the latest `ubuntu:precise` image but does not check
|
|
@@ -314,6 +320,7 @@ class RemoteImage(pulumi.CustomResource):
|
|
|
314
320
|
|
|
315
321
|
ubuntu = docker.RemoteImage("ubuntu", name="ubuntu:precise")
|
|
316
322
|
```
|
|
323
|
+
|
|
317
324
|
### Dynamic updates
|
|
318
325
|
|
|
319
326
|
To be able to update an image dynamically when the `sha256` sum changes,
|
|
@@ -323,21 +330,46 @@ class RemoteImage(pulumi.CustomResource):
|
|
|
323
330
|
import pulumi
|
|
324
331
|
import pulumi_docker as docker
|
|
325
332
|
|
|
326
|
-
|
|
327
|
-
ubuntu_remote_image = docker.RemoteImage("
|
|
328
|
-
name=
|
|
329
|
-
pull_triggers=[
|
|
333
|
+
ubuntu = docker.get_registry_image(name="ubuntu:precise")
|
|
334
|
+
ubuntu_remote_image = docker.RemoteImage("ubuntu",
|
|
335
|
+
name=ubuntu.name,
|
|
336
|
+
pull_triggers=[ubuntu.sha256_digest])
|
|
330
337
|
```
|
|
331
338
|
|
|
339
|
+
### Build
|
|
340
|
+
|
|
341
|
+
You can also use the resource to build an image.
|
|
342
|
+
In this case the image "zoo" and "zoo:develop" are built.
|
|
343
|
+
|
|
344
|
+
```python
|
|
345
|
+
import pulumi
|
|
346
|
+
import pulumi_docker as docker
|
|
347
|
+
|
|
348
|
+
zoo = docker.RemoteImage("zoo",
|
|
349
|
+
name="zoo",
|
|
350
|
+
build={
|
|
351
|
+
"context": ".",
|
|
352
|
+
"tags": ["zoo:develop"],
|
|
353
|
+
"build_arg": {
|
|
354
|
+
"foo": "zoo",
|
|
355
|
+
},
|
|
356
|
+
"label": {
|
|
357
|
+
"author": "zoo",
|
|
358
|
+
},
|
|
359
|
+
})
|
|
360
|
+
```
|
|
361
|
+
|
|
362
|
+
You can use the `triggers` argument to specify when the image should be rebuild. This is for example helpful when you want to rebuild the docker image whenever the source code changes.
|
|
363
|
+
|
|
332
364
|
:param str resource_name: The name of the resource.
|
|
333
365
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
334
|
-
:param pulumi.Input[
|
|
335
|
-
:param pulumi.Input[bool] force_remove:
|
|
366
|
+
:param pulumi.Input[Union['RemoteImageBuildArgs', 'RemoteImageBuildArgsDict']] build: Configuration to build an image. Please see [docker build command reference](https://docs.docker.com/engine/reference/commandline/build/#options) too.
|
|
367
|
+
:param pulumi.Input[bool] force_remove: If true, then the image is removed forcibly when the resource is destroyed.
|
|
336
368
|
:param pulumi.Input[bool] keep_locally: If true, then the Docker image won't be deleted on destroy operation. If this is false, it will delete the image from the docker local storage on destroy operation.
|
|
337
|
-
:param pulumi.Input[str] name:
|
|
338
|
-
:param pulumi.Input[str] platform:
|
|
369
|
+
:param pulumi.Input[str] name: The name of the Docker image, including any tags or SHA256 repo digests.
|
|
370
|
+
:param pulumi.Input[str] platform: The platform to use when pulling the image. Defaults to the platform of the current machine.
|
|
339
371
|
:param pulumi.Input[Sequence[pulumi.Input[str]]] pull_triggers: List of values which cause an image pull when changed. This is used to store the image digest from the registry when using the docker*registry*image.
|
|
340
|
-
:param pulumi.Input[Mapping[str,
|
|
372
|
+
:param pulumi.Input[Mapping[str, pulumi.Input[str]]] triggers: A map of arbitrary strings that, when changed, will force the `RemoteImage` resource to be replaced. This can be used to rebuild an image when contents of source code folders change
|
|
341
373
|
"""
|
|
342
374
|
...
|
|
343
375
|
@overload
|
|
@@ -351,6 +383,7 @@ class RemoteImage(pulumi.CustomResource):
|
|
|
351
383
|
This resource will *not* pull new layers of the image automatically unless used in conjunction with RegistryImage data source to update the `pull_triggers` field.
|
|
352
384
|
|
|
353
385
|
## Example Usage
|
|
386
|
+
|
|
354
387
|
### Basic
|
|
355
388
|
|
|
356
389
|
Finds and downloads the latest `ubuntu:precise` image but does not check
|
|
@@ -362,6 +395,7 @@ class RemoteImage(pulumi.CustomResource):
|
|
|
362
395
|
|
|
363
396
|
ubuntu = docker.RemoteImage("ubuntu", name="ubuntu:precise")
|
|
364
397
|
```
|
|
398
|
+
|
|
365
399
|
### Dynamic updates
|
|
366
400
|
|
|
367
401
|
To be able to update an image dynamically when the `sha256` sum changes,
|
|
@@ -371,12 +405,37 @@ class RemoteImage(pulumi.CustomResource):
|
|
|
371
405
|
import pulumi
|
|
372
406
|
import pulumi_docker as docker
|
|
373
407
|
|
|
374
|
-
|
|
375
|
-
ubuntu_remote_image = docker.RemoteImage("
|
|
376
|
-
name=
|
|
377
|
-
pull_triggers=[
|
|
408
|
+
ubuntu = docker.get_registry_image(name="ubuntu:precise")
|
|
409
|
+
ubuntu_remote_image = docker.RemoteImage("ubuntu",
|
|
410
|
+
name=ubuntu.name,
|
|
411
|
+
pull_triggers=[ubuntu.sha256_digest])
|
|
378
412
|
```
|
|
379
413
|
|
|
414
|
+
### Build
|
|
415
|
+
|
|
416
|
+
You can also use the resource to build an image.
|
|
417
|
+
In this case the image "zoo" and "zoo:develop" are built.
|
|
418
|
+
|
|
419
|
+
```python
|
|
420
|
+
import pulumi
|
|
421
|
+
import pulumi_docker as docker
|
|
422
|
+
|
|
423
|
+
zoo = docker.RemoteImage("zoo",
|
|
424
|
+
name="zoo",
|
|
425
|
+
build={
|
|
426
|
+
"context": ".",
|
|
427
|
+
"tags": ["zoo:develop"],
|
|
428
|
+
"build_arg": {
|
|
429
|
+
"foo": "zoo",
|
|
430
|
+
},
|
|
431
|
+
"label": {
|
|
432
|
+
"author": "zoo",
|
|
433
|
+
},
|
|
434
|
+
})
|
|
435
|
+
```
|
|
436
|
+
|
|
437
|
+
You can use the `triggers` argument to specify when the image should be rebuild. This is for example helpful when you want to rebuild the docker image whenever the source code changes.
|
|
438
|
+
|
|
380
439
|
:param str resource_name: The name of the resource.
|
|
381
440
|
:param RemoteImageArgs args: The arguments to use to populate this resource's properties.
|
|
382
441
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
@@ -392,13 +451,13 @@ class RemoteImage(pulumi.CustomResource):
|
|
|
392
451
|
def _internal_init(__self__,
|
|
393
452
|
resource_name: str,
|
|
394
453
|
opts: Optional[pulumi.ResourceOptions] = None,
|
|
395
|
-
build: Optional[pulumi.Input[
|
|
454
|
+
build: Optional[pulumi.Input[Union['RemoteImageBuildArgs', 'RemoteImageBuildArgsDict']]] = None,
|
|
396
455
|
force_remove: Optional[pulumi.Input[bool]] = None,
|
|
397
456
|
keep_locally: Optional[pulumi.Input[bool]] = None,
|
|
398
457
|
name: Optional[pulumi.Input[str]] = None,
|
|
399
458
|
platform: Optional[pulumi.Input[str]] = None,
|
|
400
459
|
pull_triggers: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
|
|
401
|
-
triggers: Optional[pulumi.Input[Mapping[str,
|
|
460
|
+
triggers: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
|
|
402
461
|
__props__=None):
|
|
403
462
|
opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
|
|
404
463
|
if not isinstance(opts, pulumi.ResourceOptions):
|
|
@@ -429,7 +488,7 @@ class RemoteImage(pulumi.CustomResource):
|
|
|
429
488
|
def get(resource_name: str,
|
|
430
489
|
id: pulumi.Input[str],
|
|
431
490
|
opts: Optional[pulumi.ResourceOptions] = None,
|
|
432
|
-
build: Optional[pulumi.Input[
|
|
491
|
+
build: Optional[pulumi.Input[Union['RemoteImageBuildArgs', 'RemoteImageBuildArgsDict']]] = None,
|
|
433
492
|
force_remove: Optional[pulumi.Input[bool]] = None,
|
|
434
493
|
image_id: Optional[pulumi.Input[str]] = None,
|
|
435
494
|
keep_locally: Optional[pulumi.Input[bool]] = None,
|
|
@@ -437,7 +496,7 @@ class RemoteImage(pulumi.CustomResource):
|
|
|
437
496
|
platform: Optional[pulumi.Input[str]] = None,
|
|
438
497
|
pull_triggers: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
|
|
439
498
|
repo_digest: Optional[pulumi.Input[str]] = None,
|
|
440
|
-
triggers: Optional[pulumi.Input[Mapping[str,
|
|
499
|
+
triggers: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None) -> 'RemoteImage':
|
|
441
500
|
"""
|
|
442
501
|
Get an existing RemoteImage resource's state with the given name, id, and optional extra
|
|
443
502
|
properties used to qualify the lookup.
|
|
@@ -445,15 +504,15 @@ class RemoteImage(pulumi.CustomResource):
|
|
|
445
504
|
:param str resource_name: The unique name of the resulting resource.
|
|
446
505
|
:param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
|
|
447
506
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
448
|
-
:param pulumi.Input[
|
|
449
|
-
:param pulumi.Input[bool] force_remove:
|
|
507
|
+
:param pulumi.Input[Union['RemoteImageBuildArgs', 'RemoteImageBuildArgsDict']] build: Configuration to build an image. Please see [docker build command reference](https://docs.docker.com/engine/reference/commandline/build/#options) too.
|
|
508
|
+
:param pulumi.Input[bool] force_remove: If true, then the image is removed forcibly when the resource is destroyed.
|
|
450
509
|
:param pulumi.Input[str] image_id: The ID of the image (as seen when executing `docker inspect` on the image). Can be used to reference the image via its ID in other resources.
|
|
451
510
|
:param pulumi.Input[bool] keep_locally: If true, then the Docker image won't be deleted on destroy operation. If this is false, it will delete the image from the docker local storage on destroy operation.
|
|
452
|
-
:param pulumi.Input[str] name:
|
|
453
|
-
:param pulumi.Input[str] platform:
|
|
511
|
+
:param pulumi.Input[str] name: The name of the Docker image, including any tags or SHA256 repo digests.
|
|
512
|
+
:param pulumi.Input[str] platform: The platform to use when pulling the image. Defaults to the platform of the current machine.
|
|
454
513
|
:param pulumi.Input[Sequence[pulumi.Input[str]]] pull_triggers: List of values which cause an image pull when changed. This is used to store the image digest from the registry when using the docker*registry*image.
|
|
455
514
|
:param pulumi.Input[str] repo_digest: The image sha256 digest in the form of `repo[:tag]@sha256:<hash>`.
|
|
456
|
-
:param pulumi.Input[Mapping[str,
|
|
515
|
+
:param pulumi.Input[Mapping[str, pulumi.Input[str]]] triggers: A map of arbitrary strings that, when changed, will force the `RemoteImage` resource to be replaced. This can be used to rebuild an image when contents of source code folders change
|
|
457
516
|
"""
|
|
458
517
|
opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
|
|
459
518
|
|
|
@@ -482,7 +541,7 @@ class RemoteImage(pulumi.CustomResource):
|
|
|
482
541
|
@pulumi.getter(name="forceRemove")
|
|
483
542
|
def force_remove(self) -> pulumi.Output[Optional[bool]]:
|
|
484
543
|
"""
|
|
485
|
-
|
|
544
|
+
If true, then the image is removed forcibly when the resource is destroyed.
|
|
486
545
|
"""
|
|
487
546
|
return pulumi.get(self, "force_remove")
|
|
488
547
|
|
|
@@ -506,7 +565,7 @@ class RemoteImage(pulumi.CustomResource):
|
|
|
506
565
|
@pulumi.getter
|
|
507
566
|
def name(self) -> pulumi.Output[str]:
|
|
508
567
|
"""
|
|
509
|
-
|
|
568
|
+
The name of the Docker image, including any tags or SHA256 repo digests.
|
|
510
569
|
"""
|
|
511
570
|
return pulumi.get(self, "name")
|
|
512
571
|
|
|
@@ -514,7 +573,7 @@ class RemoteImage(pulumi.CustomResource):
|
|
|
514
573
|
@pulumi.getter
|
|
515
574
|
def platform(self) -> pulumi.Output[Optional[str]]:
|
|
516
575
|
"""
|
|
517
|
-
|
|
576
|
+
The platform to use when pulling the image. Defaults to the platform of the current machine.
|
|
518
577
|
"""
|
|
519
578
|
return pulumi.get(self, "platform")
|
|
520
579
|
|
|
@@ -536,7 +595,7 @@ class RemoteImage(pulumi.CustomResource):
|
|
|
536
595
|
|
|
537
596
|
@property
|
|
538
597
|
@pulumi.getter
|
|
539
|
-
def triggers(self) -> pulumi.Output[Optional[Mapping[str,
|
|
598
|
+
def triggers(self) -> pulumi.Output[Optional[Mapping[str, str]]]:
|
|
540
599
|
"""
|
|
541
600
|
A map of arbitrary strings that, when changed, will force the `RemoteImage` resource to be replaced. This can be used to rebuild an image when contents of source code folders change
|
|
542
601
|
"""
|
pulumi_docker/secret.py
CHANGED
|
@@ -4,9 +4,14 @@
|
|
|
4
4
|
|
|
5
5
|
import copy
|
|
6
6
|
import warnings
|
|
7
|
+
import sys
|
|
7
8
|
import pulumi
|
|
8
9
|
import pulumi.runtime
|
|
9
10
|
from typing import Any, Mapping, Optional, Sequence, Union, overload
|
|
11
|
+
if sys.version_info >= (3, 11):
|
|
12
|
+
from typing import NotRequired, TypedDict, TypeAlias
|
|
13
|
+
else:
|
|
14
|
+
from typing_extensions import NotRequired, TypedDict, TypeAlias
|
|
10
15
|
from . import _utilities
|
|
11
16
|
from . import outputs
|
|
12
17
|
from ._inputs import *
|
|
@@ -130,18 +135,20 @@ class Secret(pulumi.CustomResource):
|
|
|
130
135
|
resource_name: str,
|
|
131
136
|
opts: Optional[pulumi.ResourceOptions] = None,
|
|
132
137
|
data: Optional[pulumi.Input[str]] = None,
|
|
133
|
-
labels: Optional[pulumi.Input[Sequence[pulumi.Input[
|
|
138
|
+
labels: Optional[pulumi.Input[Sequence[pulumi.Input[Union['SecretLabelArgs', 'SecretLabelArgsDict']]]]] = None,
|
|
134
139
|
name: Optional[pulumi.Input[str]] = None,
|
|
135
140
|
__props__=None):
|
|
136
141
|
"""
|
|
137
142
|
## Import
|
|
138
143
|
|
|
139
|
-
#!/bin/bash
|
|
144
|
+
#!/bin/bash
|
|
145
|
+
|
|
146
|
+
Docker secret cannot be imported as the secret data, once set, is never exposed again.
|
|
140
147
|
|
|
141
148
|
:param str resource_name: The name of the resource.
|
|
142
149
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
143
150
|
:param pulumi.Input[str] data: Base64-url-safe-encoded secret data
|
|
144
|
-
:param pulumi.Input[Sequence[pulumi.Input[
|
|
151
|
+
:param pulumi.Input[Sequence[pulumi.Input[Union['SecretLabelArgs', 'SecretLabelArgsDict']]]] labels: User-defined key/value metadata
|
|
145
152
|
:param pulumi.Input[str] name: User-defined name of the secret
|
|
146
153
|
"""
|
|
147
154
|
...
|
|
@@ -153,7 +160,9 @@ class Secret(pulumi.CustomResource):
|
|
|
153
160
|
"""
|
|
154
161
|
## Import
|
|
155
162
|
|
|
156
|
-
#!/bin/bash
|
|
163
|
+
#!/bin/bash
|
|
164
|
+
|
|
165
|
+
Docker secret cannot be imported as the secret data, once set, is never exposed again.
|
|
157
166
|
|
|
158
167
|
:param str resource_name: The name of the resource.
|
|
159
168
|
:param SecretArgs args: The arguments to use to populate this resource's properties.
|
|
@@ -171,7 +180,7 @@ class Secret(pulumi.CustomResource):
|
|
|
171
180
|
resource_name: str,
|
|
172
181
|
opts: Optional[pulumi.ResourceOptions] = None,
|
|
173
182
|
data: Optional[pulumi.Input[str]] = None,
|
|
174
|
-
labels: Optional[pulumi.Input[Sequence[pulumi.Input[
|
|
183
|
+
labels: Optional[pulumi.Input[Sequence[pulumi.Input[Union['SecretLabelArgs', 'SecretLabelArgsDict']]]]] = None,
|
|
175
184
|
name: Optional[pulumi.Input[str]] = None,
|
|
176
185
|
__props__=None):
|
|
177
186
|
opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
|
|
@@ -200,7 +209,7 @@ class Secret(pulumi.CustomResource):
|
|
|
200
209
|
id: pulumi.Input[str],
|
|
201
210
|
opts: Optional[pulumi.ResourceOptions] = None,
|
|
202
211
|
data: Optional[pulumi.Input[str]] = None,
|
|
203
|
-
labels: Optional[pulumi.Input[Sequence[pulumi.Input[
|
|
212
|
+
labels: Optional[pulumi.Input[Sequence[pulumi.Input[Union['SecretLabelArgs', 'SecretLabelArgsDict']]]]] = None,
|
|
204
213
|
name: Optional[pulumi.Input[str]] = None) -> 'Secret':
|
|
205
214
|
"""
|
|
206
215
|
Get an existing Secret resource's state with the given name, id, and optional extra
|
|
@@ -210,7 +219,7 @@ class Secret(pulumi.CustomResource):
|
|
|
210
219
|
:param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
|
|
211
220
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
212
221
|
:param pulumi.Input[str] data: Base64-url-safe-encoded secret data
|
|
213
|
-
:param pulumi.Input[Sequence[pulumi.Input[
|
|
222
|
+
:param pulumi.Input[Sequence[pulumi.Input[Union['SecretLabelArgs', 'SecretLabelArgsDict']]]] labels: User-defined key/value metadata
|
|
214
223
|
:param pulumi.Input[str] name: User-defined name of the secret
|
|
215
224
|
"""
|
|
216
225
|
opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
|