pulumi-docker 4.6.2__py3-none-any.whl → 4.7.0__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.

@@ -2,6 +2,7 @@
2
2
  # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
3
3
  # *** Do not edit by hand unless you're certain you know what you are doing! ***
4
4
 
5
+ import builtins
5
6
  import copy
6
7
  import warnings
7
8
  import sys
@@ -21,22 +22,21 @@ __all__ = ['RemoteImageArgs', 'RemoteImage']
21
22
  @pulumi.input_type
22
23
  class RemoteImageArgs:
23
24
  def __init__(__self__, *,
24
- name: pulumi.Input[str],
25
+ name: pulumi.Input[builtins.str],
25
26
  build: Optional[pulumi.Input['RemoteImageBuildArgs']] = None,
26
- force_remove: Optional[pulumi.Input[bool]] = None,
27
- keep_locally: Optional[pulumi.Input[bool]] = None,
28
- platform: Optional[pulumi.Input[str]] = None,
29
- pull_triggers: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
30
- triggers: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None):
27
+ force_remove: Optional[pulumi.Input[builtins.bool]] = None,
28
+ keep_locally: Optional[pulumi.Input[builtins.bool]] = None,
29
+ platform: Optional[pulumi.Input[builtins.str]] = None,
30
+ pull_triggers: Optional[pulumi.Input[Sequence[pulumi.Input[builtins.str]]]] = None,
31
+ triggers: Optional[pulumi.Input[Mapping[str, pulumi.Input[builtins.str]]]] = None):
31
32
  """
32
33
  The set of arguments for constructing a RemoteImage resource.
33
- :param pulumi.Input[str] name: The name of the Docker image, including any tags or SHA256 repo digests.
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.
35
- :param pulumi.Input[bool] force_remove: If true, then the image is removed forcibly when the resource is destroyed.
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.
37
- :param pulumi.Input[str] platform: The platform to use when pulling the image. Defaults to the platform of the current machine.
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.
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
34
+ :param pulumi.Input[builtins.str] name: The name of the Docker image, including any tags or SHA256 repo digests.
35
+ :param pulumi.Input[builtins.bool] force_remove: If true, then the image is removed forcibly when the resource is destroyed.
36
+ :param pulumi.Input[builtins.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.
37
+ :param pulumi.Input[builtins.str] platform: The platform to use when pulling the image. Defaults to the platform of the current machine.
38
+ :param pulumi.Input[Sequence[pulumi.Input[builtins.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.
39
+ :param pulumi.Input[Mapping[str, pulumi.Input[builtins.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
40
40
  """
41
41
  pulumi.set(__self__, "name", name)
42
42
  if build is not None:
@@ -54,22 +54,19 @@ class RemoteImageArgs:
54
54
 
55
55
  @property
56
56
  @pulumi.getter
57
- def name(self) -> pulumi.Input[str]:
57
+ def name(self) -> pulumi.Input[builtins.str]:
58
58
  """
59
59
  The name of the Docker image, including any tags or SHA256 repo digests.
60
60
  """
61
61
  return pulumi.get(self, "name")
62
62
 
63
63
  @name.setter
64
- def name(self, value: pulumi.Input[str]):
64
+ def name(self, value: pulumi.Input[builtins.str]):
65
65
  pulumi.set(self, "name", value)
66
66
 
67
67
  @property
68
68
  @pulumi.getter
69
69
  def build(self) -> Optional[pulumi.Input['RemoteImageBuildArgs']]:
70
- """
71
- Configuration to build an image. Please see [docker build command reference](https://docs.docker.com/engine/reference/commandline/build/#options) too.
72
- """
73
70
  return pulumi.get(self, "build")
74
71
 
75
72
  @build.setter
@@ -78,62 +75,62 @@ class RemoteImageArgs:
78
75
 
79
76
  @property
80
77
  @pulumi.getter(name="forceRemove")
81
- def force_remove(self) -> Optional[pulumi.Input[bool]]:
78
+ def force_remove(self) -> Optional[pulumi.Input[builtins.bool]]:
82
79
  """
83
80
  If true, then the image is removed forcibly when the resource is destroyed.
84
81
  """
85
82
  return pulumi.get(self, "force_remove")
86
83
 
87
84
  @force_remove.setter
88
- def force_remove(self, value: Optional[pulumi.Input[bool]]):
85
+ def force_remove(self, value: Optional[pulumi.Input[builtins.bool]]):
89
86
  pulumi.set(self, "force_remove", value)
90
87
 
91
88
  @property
92
89
  @pulumi.getter(name="keepLocally")
93
- def keep_locally(self) -> Optional[pulumi.Input[bool]]:
90
+ def keep_locally(self) -> Optional[pulumi.Input[builtins.bool]]:
94
91
  """
95
92
  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.
96
93
  """
97
94
  return pulumi.get(self, "keep_locally")
98
95
 
99
96
  @keep_locally.setter
100
- def keep_locally(self, value: Optional[pulumi.Input[bool]]):
97
+ def keep_locally(self, value: Optional[pulumi.Input[builtins.bool]]):
101
98
  pulumi.set(self, "keep_locally", value)
102
99
 
103
100
  @property
104
101
  @pulumi.getter
105
- def platform(self) -> Optional[pulumi.Input[str]]:
102
+ def platform(self) -> Optional[pulumi.Input[builtins.str]]:
106
103
  """
107
104
  The platform to use when pulling the image. Defaults to the platform of the current machine.
108
105
  """
109
106
  return pulumi.get(self, "platform")
110
107
 
111
108
  @platform.setter
112
- def platform(self, value: Optional[pulumi.Input[str]]):
109
+ def platform(self, value: Optional[pulumi.Input[builtins.str]]):
113
110
  pulumi.set(self, "platform", value)
114
111
 
115
112
  @property
116
113
  @pulumi.getter(name="pullTriggers")
117
- def pull_triggers(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
114
+ def pull_triggers(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[builtins.str]]]]:
118
115
  """
119
116
  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.
120
117
  """
121
118
  return pulumi.get(self, "pull_triggers")
122
119
 
123
120
  @pull_triggers.setter
124
- def pull_triggers(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
121
+ def pull_triggers(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[builtins.str]]]]):
125
122
  pulumi.set(self, "pull_triggers", value)
126
123
 
127
124
  @property
128
125
  @pulumi.getter
129
- def triggers(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]:
126
+ def triggers(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[builtins.str]]]]:
130
127
  """
131
128
  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
132
129
  """
133
130
  return pulumi.get(self, "triggers")
134
131
 
135
132
  @triggers.setter
136
- def triggers(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]):
133
+ def triggers(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[builtins.str]]]]):
137
134
  pulumi.set(self, "triggers", value)
138
135
 
139
136
 
@@ -141,25 +138,24 @@ class RemoteImageArgs:
141
138
  class _RemoteImageState:
142
139
  def __init__(__self__, *,
143
140
  build: Optional[pulumi.Input['RemoteImageBuildArgs']] = None,
144
- force_remove: Optional[pulumi.Input[bool]] = None,
145
- image_id: Optional[pulumi.Input[str]] = None,
146
- keep_locally: Optional[pulumi.Input[bool]] = None,
147
- name: Optional[pulumi.Input[str]] = None,
148
- platform: Optional[pulumi.Input[str]] = None,
149
- pull_triggers: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
150
- repo_digest: Optional[pulumi.Input[str]] = None,
151
- triggers: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None):
141
+ force_remove: Optional[pulumi.Input[builtins.bool]] = None,
142
+ image_id: Optional[pulumi.Input[builtins.str]] = None,
143
+ keep_locally: Optional[pulumi.Input[builtins.bool]] = None,
144
+ name: Optional[pulumi.Input[builtins.str]] = None,
145
+ platform: Optional[pulumi.Input[builtins.str]] = None,
146
+ pull_triggers: Optional[pulumi.Input[Sequence[pulumi.Input[builtins.str]]]] = None,
147
+ repo_digest: Optional[pulumi.Input[builtins.str]] = None,
148
+ triggers: Optional[pulumi.Input[Mapping[str, pulumi.Input[builtins.str]]]] = None):
152
149
  """
153
150
  Input properties used for looking up and filtering RemoteImage resources.
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.
155
- :param pulumi.Input[bool] force_remove: If true, then the image is removed forcibly when the resource is destroyed.
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.
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.
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.
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.
161
- :param pulumi.Input[str] repo_digest: The image sha256 digest in the form of `repo[:tag]@sha256:<hash>`.
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
151
+ :param pulumi.Input[builtins.bool] force_remove: If true, then the image is removed forcibly when the resource is destroyed.
152
+ :param pulumi.Input[builtins.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.
153
+ :param pulumi.Input[builtins.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.
154
+ :param pulumi.Input[builtins.str] name: The name of the Docker image, including any tags or SHA256 repo digests.
155
+ :param pulumi.Input[builtins.str] platform: The platform to use when pulling the image. Defaults to the platform of the current machine.
156
+ :param pulumi.Input[Sequence[pulumi.Input[builtins.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.
157
+ :param pulumi.Input[builtins.str] repo_digest: The image sha256 digest in the form of `repo[:tag]@sha256:<hash>`. This may not be populated when building an image, because it is read from the local Docker client and so may be available only when the image was either pulled from the repo or pushed to the repo (perhaps using `RegistryImage`) in a previous run.
158
+ :param pulumi.Input[Mapping[str, pulumi.Input[builtins.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
163
159
  """
164
160
  if build is not None:
165
161
  pulumi.set(__self__, "build", build)
@@ -183,9 +179,6 @@ class _RemoteImageState:
183
179
  @property
184
180
  @pulumi.getter
185
181
  def build(self) -> Optional[pulumi.Input['RemoteImageBuildArgs']]:
186
- """
187
- Configuration to build an image. Please see [docker build command reference](https://docs.docker.com/engine/reference/commandline/build/#options) too.
188
- """
189
182
  return pulumi.get(self, "build")
190
183
 
191
184
  @build.setter
@@ -194,182 +187,125 @@ class _RemoteImageState:
194
187
 
195
188
  @property
196
189
  @pulumi.getter(name="forceRemove")
197
- def force_remove(self) -> Optional[pulumi.Input[bool]]:
190
+ def force_remove(self) -> Optional[pulumi.Input[builtins.bool]]:
198
191
  """
199
192
  If true, then the image is removed forcibly when the resource is destroyed.
200
193
  """
201
194
  return pulumi.get(self, "force_remove")
202
195
 
203
196
  @force_remove.setter
204
- def force_remove(self, value: Optional[pulumi.Input[bool]]):
197
+ def force_remove(self, value: Optional[pulumi.Input[builtins.bool]]):
205
198
  pulumi.set(self, "force_remove", value)
206
199
 
207
200
  @property
208
201
  @pulumi.getter(name="imageId")
209
- def image_id(self) -> Optional[pulumi.Input[str]]:
202
+ def image_id(self) -> Optional[pulumi.Input[builtins.str]]:
210
203
  """
211
204
  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.
212
205
  """
213
206
  return pulumi.get(self, "image_id")
214
207
 
215
208
  @image_id.setter
216
- def image_id(self, value: Optional[pulumi.Input[str]]):
209
+ def image_id(self, value: Optional[pulumi.Input[builtins.str]]):
217
210
  pulumi.set(self, "image_id", value)
218
211
 
219
212
  @property
220
213
  @pulumi.getter(name="keepLocally")
221
- def keep_locally(self) -> Optional[pulumi.Input[bool]]:
214
+ def keep_locally(self) -> Optional[pulumi.Input[builtins.bool]]:
222
215
  """
223
216
  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.
224
217
  """
225
218
  return pulumi.get(self, "keep_locally")
226
219
 
227
220
  @keep_locally.setter
228
- def keep_locally(self, value: Optional[pulumi.Input[bool]]):
221
+ def keep_locally(self, value: Optional[pulumi.Input[builtins.bool]]):
229
222
  pulumi.set(self, "keep_locally", value)
230
223
 
231
224
  @property
232
225
  @pulumi.getter
233
- def name(self) -> Optional[pulumi.Input[str]]:
226
+ def name(self) -> Optional[pulumi.Input[builtins.str]]:
234
227
  """
235
228
  The name of the Docker image, including any tags or SHA256 repo digests.
236
229
  """
237
230
  return pulumi.get(self, "name")
238
231
 
239
232
  @name.setter
240
- def name(self, value: Optional[pulumi.Input[str]]):
233
+ def name(self, value: Optional[pulumi.Input[builtins.str]]):
241
234
  pulumi.set(self, "name", value)
242
235
 
243
236
  @property
244
237
  @pulumi.getter
245
- def platform(self) -> Optional[pulumi.Input[str]]:
238
+ def platform(self) -> Optional[pulumi.Input[builtins.str]]:
246
239
  """
247
240
  The platform to use when pulling the image. Defaults to the platform of the current machine.
248
241
  """
249
242
  return pulumi.get(self, "platform")
250
243
 
251
244
  @platform.setter
252
- def platform(self, value: Optional[pulumi.Input[str]]):
245
+ def platform(self, value: Optional[pulumi.Input[builtins.str]]):
253
246
  pulumi.set(self, "platform", value)
254
247
 
255
248
  @property
256
249
  @pulumi.getter(name="pullTriggers")
257
- def pull_triggers(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
250
+ def pull_triggers(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[builtins.str]]]]:
258
251
  """
259
252
  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.
260
253
  """
261
254
  return pulumi.get(self, "pull_triggers")
262
255
 
263
256
  @pull_triggers.setter
264
- def pull_triggers(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
257
+ def pull_triggers(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[builtins.str]]]]):
265
258
  pulumi.set(self, "pull_triggers", value)
266
259
 
267
260
  @property
268
261
  @pulumi.getter(name="repoDigest")
269
- def repo_digest(self) -> Optional[pulumi.Input[str]]:
262
+ def repo_digest(self) -> Optional[pulumi.Input[builtins.str]]:
270
263
  """
271
- The image sha256 digest in the form of `repo[:tag]@sha256:<hash>`.
264
+ The image sha256 digest in the form of `repo[:tag]@sha256:<hash>`. This may not be populated when building an image, because it is read from the local Docker client and so may be available only when the image was either pulled from the repo or pushed to the repo (perhaps using `RegistryImage`) in a previous run.
272
265
  """
273
266
  return pulumi.get(self, "repo_digest")
274
267
 
275
268
  @repo_digest.setter
276
- def repo_digest(self, value: Optional[pulumi.Input[str]]):
269
+ def repo_digest(self, value: Optional[pulumi.Input[builtins.str]]):
277
270
  pulumi.set(self, "repo_digest", value)
278
271
 
279
272
  @property
280
273
  @pulumi.getter
281
- def triggers(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]:
274
+ def triggers(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[builtins.str]]]]:
282
275
  """
283
276
  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
284
277
  """
285
278
  return pulumi.get(self, "triggers")
286
279
 
287
280
  @triggers.setter
288
- def triggers(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]):
281
+ def triggers(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[builtins.str]]]]):
289
282
  pulumi.set(self, "triggers", value)
290
283
 
291
284
 
285
+ @pulumi.type_token("docker:index/remoteImage:RemoteImage")
292
286
  class RemoteImage(pulumi.CustomResource):
293
287
  @overload
294
288
  def __init__(__self__,
295
289
  resource_name: str,
296
290
  opts: Optional[pulumi.ResourceOptions] = None,
297
291
  build: Optional[pulumi.Input[Union['RemoteImageBuildArgs', 'RemoteImageBuildArgsDict']]] = None,
298
- force_remove: Optional[pulumi.Input[bool]] = None,
299
- keep_locally: Optional[pulumi.Input[bool]] = None,
300
- name: Optional[pulumi.Input[str]] = None,
301
- platform: Optional[pulumi.Input[str]] = None,
302
- pull_triggers: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
303
- triggers: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
292
+ force_remove: Optional[pulumi.Input[builtins.bool]] = None,
293
+ keep_locally: Optional[pulumi.Input[builtins.bool]] = None,
294
+ name: Optional[pulumi.Input[builtins.str]] = None,
295
+ platform: Optional[pulumi.Input[builtins.str]] = None,
296
+ pull_triggers: Optional[pulumi.Input[Sequence[pulumi.Input[builtins.str]]]] = None,
297
+ triggers: Optional[pulumi.Input[Mapping[str, pulumi.Input[builtins.str]]]] = None,
304
298
  __props__=None):
305
299
  """
306
- <!-- Bug: Type and Name are switched -->
307
- Pulls a Docker image to a given Docker host from a Docker Registry.
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.
309
-
310
- ## Example Usage
311
-
312
- ### Basic
313
-
314
- Finds and downloads the latest `ubuntu:precise` image but does not check
315
- for further updates of the image
316
-
317
- ```python
318
- import pulumi
319
- import pulumi_docker as docker
320
-
321
- ubuntu = docker.RemoteImage("ubuntu", name="ubuntu:precise")
322
- ```
323
-
324
- ### Dynamic updates
325
-
326
- To be able to update an image dynamically when the `sha256` sum changes,
327
- you need to use it in combination with `RegistryImage` as follows:
328
-
329
- ```python
330
- import pulumi
331
- import pulumi_docker as docker
332
-
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])
337
- ```
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
-
300
+ Create a RemoteImage resource with the given unique name, props, and options.
364
301
  :param str resource_name: The name of the resource.
365
302
  :param pulumi.ResourceOptions opts: Options for the resource.
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.
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.
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.
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.
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
303
+ :param pulumi.Input[builtins.bool] force_remove: If true, then the image is removed forcibly when the resource is destroyed.
304
+ :param pulumi.Input[builtins.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.
305
+ :param pulumi.Input[builtins.str] name: The name of the Docker image, including any tags or SHA256 repo digests.
306
+ :param pulumi.Input[builtins.str] platform: The platform to use when pulling the image. Defaults to the platform of the current machine.
307
+ :param pulumi.Input[Sequence[pulumi.Input[builtins.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.
308
+ :param pulumi.Input[Mapping[str, pulumi.Input[builtins.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
373
309
  """
374
310
  ...
375
311
  @overload
@@ -378,64 +314,7 @@ class RemoteImage(pulumi.CustomResource):
378
314
  args: RemoteImageArgs,
379
315
  opts: Optional[pulumi.ResourceOptions] = None):
380
316
  """
381
- <!-- Bug: Type and Name are switched -->
382
- Pulls a Docker image to a given Docker host from a Docker Registry.
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.
384
-
385
- ## Example Usage
386
-
387
- ### Basic
388
-
389
- Finds and downloads the latest `ubuntu:precise` image but does not check
390
- for further updates of the image
391
-
392
- ```python
393
- import pulumi
394
- import pulumi_docker as docker
395
-
396
- ubuntu = docker.RemoteImage("ubuntu", name="ubuntu:precise")
397
- ```
398
-
399
- ### Dynamic updates
400
-
401
- To be able to update an image dynamically when the `sha256` sum changes,
402
- you need to use it in combination with `RegistryImage` as follows:
403
-
404
- ```python
405
- import pulumi
406
- import pulumi_docker as docker
407
-
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])
412
- ```
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
-
317
+ Create a RemoteImage resource with the given unique name, props, and options.
439
318
  :param str resource_name: The name of the resource.
440
319
  :param RemoteImageArgs args: The arguments to use to populate this resource's properties.
441
320
  :param pulumi.ResourceOptions opts: Options for the resource.
@@ -452,12 +331,12 @@ class RemoteImage(pulumi.CustomResource):
452
331
  resource_name: str,
453
332
  opts: Optional[pulumi.ResourceOptions] = None,
454
333
  build: Optional[pulumi.Input[Union['RemoteImageBuildArgs', 'RemoteImageBuildArgsDict']]] = None,
455
- force_remove: Optional[pulumi.Input[bool]] = None,
456
- keep_locally: Optional[pulumi.Input[bool]] = None,
457
- name: Optional[pulumi.Input[str]] = None,
458
- platform: Optional[pulumi.Input[str]] = None,
459
- pull_triggers: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
460
- triggers: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
334
+ force_remove: Optional[pulumi.Input[builtins.bool]] = None,
335
+ keep_locally: Optional[pulumi.Input[builtins.bool]] = None,
336
+ name: Optional[pulumi.Input[builtins.str]] = None,
337
+ platform: Optional[pulumi.Input[builtins.str]] = None,
338
+ pull_triggers: Optional[pulumi.Input[Sequence[pulumi.Input[builtins.str]]]] = None,
339
+ triggers: Optional[pulumi.Input[Mapping[str, pulumi.Input[builtins.str]]]] = None,
461
340
  __props__=None):
462
341
  opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
463
342
  if not isinstance(opts, pulumi.ResourceOptions):
@@ -489,14 +368,14 @@ class RemoteImage(pulumi.CustomResource):
489
368
  id: pulumi.Input[str],
490
369
  opts: Optional[pulumi.ResourceOptions] = None,
491
370
  build: Optional[pulumi.Input[Union['RemoteImageBuildArgs', 'RemoteImageBuildArgsDict']]] = None,
492
- force_remove: Optional[pulumi.Input[bool]] = None,
493
- image_id: Optional[pulumi.Input[str]] = None,
494
- keep_locally: Optional[pulumi.Input[bool]] = None,
495
- name: Optional[pulumi.Input[str]] = None,
496
- platform: Optional[pulumi.Input[str]] = None,
497
- pull_triggers: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
498
- repo_digest: Optional[pulumi.Input[str]] = None,
499
- triggers: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None) -> 'RemoteImage':
371
+ force_remove: Optional[pulumi.Input[builtins.bool]] = None,
372
+ image_id: Optional[pulumi.Input[builtins.str]] = None,
373
+ keep_locally: Optional[pulumi.Input[builtins.bool]] = None,
374
+ name: Optional[pulumi.Input[builtins.str]] = None,
375
+ platform: Optional[pulumi.Input[builtins.str]] = None,
376
+ pull_triggers: Optional[pulumi.Input[Sequence[pulumi.Input[builtins.str]]]] = None,
377
+ repo_digest: Optional[pulumi.Input[builtins.str]] = None,
378
+ triggers: Optional[pulumi.Input[Mapping[str, pulumi.Input[builtins.str]]]] = None) -> 'RemoteImage':
500
379
  """
501
380
  Get an existing RemoteImage resource's state with the given name, id, and optional extra
502
381
  properties used to qualify the lookup.
@@ -504,15 +383,14 @@ class RemoteImage(pulumi.CustomResource):
504
383
  :param str resource_name: The unique name of the resulting resource.
505
384
  :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
506
385
  :param pulumi.ResourceOptions opts: Options for the resource.
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.
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.
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.
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.
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.
514
- :param pulumi.Input[str] repo_digest: The image sha256 digest in the form of `repo[:tag]@sha256:<hash>`.
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
386
+ :param pulumi.Input[builtins.bool] force_remove: If true, then the image is removed forcibly when the resource is destroyed.
387
+ :param pulumi.Input[builtins.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.
388
+ :param pulumi.Input[builtins.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.
389
+ :param pulumi.Input[builtins.str] name: The name of the Docker image, including any tags or SHA256 repo digests.
390
+ :param pulumi.Input[builtins.str] platform: The platform to use when pulling the image. Defaults to the platform of the current machine.
391
+ :param pulumi.Input[Sequence[pulumi.Input[builtins.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.
392
+ :param pulumi.Input[builtins.str] repo_digest: The image sha256 digest in the form of `repo[:tag]@sha256:<hash>`. This may not be populated when building an image, because it is read from the local Docker client and so may be available only when the image was either pulled from the repo or pushed to the repo (perhaps using `RegistryImage`) in a previous run.
393
+ :param pulumi.Input[Mapping[str, pulumi.Input[builtins.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
516
394
  """
517
395
  opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
518
396
 
@@ -532,14 +410,11 @@ class RemoteImage(pulumi.CustomResource):
532
410
  @property
533
411
  @pulumi.getter
534
412
  def build(self) -> pulumi.Output[Optional['outputs.RemoteImageBuild']]:
535
- """
536
- Configuration to build an image. Please see [docker build command reference](https://docs.docker.com/engine/reference/commandline/build/#options) too.
537
- """
538
413
  return pulumi.get(self, "build")
539
414
 
540
415
  @property
541
416
  @pulumi.getter(name="forceRemove")
542
- def force_remove(self) -> pulumi.Output[Optional[bool]]:
417
+ def force_remove(self) -> pulumi.Output[Optional[builtins.bool]]:
543
418
  """
544
419
  If true, then the image is removed forcibly when the resource is destroyed.
545
420
  """
@@ -547,7 +422,7 @@ class RemoteImage(pulumi.CustomResource):
547
422
 
548
423
  @property
549
424
  @pulumi.getter(name="imageId")
550
- def image_id(self) -> pulumi.Output[str]:
425
+ def image_id(self) -> pulumi.Output[builtins.str]:
551
426
  """
552
427
  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.
553
428
  """
@@ -555,7 +430,7 @@ class RemoteImage(pulumi.CustomResource):
555
430
 
556
431
  @property
557
432
  @pulumi.getter(name="keepLocally")
558
- def keep_locally(self) -> pulumi.Output[Optional[bool]]:
433
+ def keep_locally(self) -> pulumi.Output[Optional[builtins.bool]]:
559
434
  """
560
435
  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.
561
436
  """
@@ -563,7 +438,7 @@ class RemoteImage(pulumi.CustomResource):
563
438
 
564
439
  @property
565
440
  @pulumi.getter
566
- def name(self) -> pulumi.Output[str]:
441
+ def name(self) -> pulumi.Output[builtins.str]:
567
442
  """
568
443
  The name of the Docker image, including any tags or SHA256 repo digests.
569
444
  """
@@ -571,7 +446,7 @@ class RemoteImage(pulumi.CustomResource):
571
446
 
572
447
  @property
573
448
  @pulumi.getter
574
- def platform(self) -> pulumi.Output[Optional[str]]:
449
+ def platform(self) -> pulumi.Output[Optional[builtins.str]]:
575
450
  """
576
451
  The platform to use when pulling the image. Defaults to the platform of the current machine.
577
452
  """
@@ -579,7 +454,7 @@ class RemoteImage(pulumi.CustomResource):
579
454
 
580
455
  @property
581
456
  @pulumi.getter(name="pullTriggers")
582
- def pull_triggers(self) -> pulumi.Output[Optional[Sequence[str]]]:
457
+ def pull_triggers(self) -> pulumi.Output[Optional[Sequence[builtins.str]]]:
583
458
  """
584
459
  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.
585
460
  """
@@ -587,15 +462,15 @@ class RemoteImage(pulumi.CustomResource):
587
462
 
588
463
  @property
589
464
  @pulumi.getter(name="repoDigest")
590
- def repo_digest(self) -> pulumi.Output[str]:
465
+ def repo_digest(self) -> pulumi.Output[builtins.str]:
591
466
  """
592
- The image sha256 digest in the form of `repo[:tag]@sha256:<hash>`.
467
+ The image sha256 digest in the form of `repo[:tag]@sha256:<hash>`. This may not be populated when building an image, because it is read from the local Docker client and so may be available only when the image was either pulled from the repo or pushed to the repo (perhaps using `RegistryImage`) in a previous run.
593
468
  """
594
469
  return pulumi.get(self, "repo_digest")
595
470
 
596
471
  @property
597
472
  @pulumi.getter
598
- def triggers(self) -> pulumi.Output[Optional[Mapping[str, str]]]:
473
+ def triggers(self) -> pulumi.Output[Optional[Mapping[str, builtins.str]]]:
599
474
  """
600
475
  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
601
476
  """