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.

pulumi_docker/provider.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 ._inputs import *
12
17
 
@@ -24,14 +29,12 @@ class ProviderArgs:
24
29
  ssh_opts: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None):
25
30
  """
26
31
  The set of arguments for constructing a Provider resource.
27
- :param pulumi.Input[str] ca_material: PEM-encoded content of Docker host CA certificate.
28
- :param pulumi.Input[str] cert_material: PEM-encoded content of Docker client certificate.
29
- :param pulumi.Input[str] cert_path: Path to a directory with Docker TLS config. This directory is expected to contain `ca.pem`, `cert.pem`, and `key.pem`
30
- files.
31
- :param pulumi.Input[str] host: The Docker daemon's address.
32
- :param pulumi.Input[str] key_material: PEM-encoded content of Docker client private key.
33
- :param pulumi.Input[Sequence[pulumi.Input[str]]] ssh_opts: Additional SSH option flags to be appended when using `ssh://` protocol. The `ssh://` protocol is not supported for
34
- `buildx.Image` resources. Instead, use a [remote](https://docs.docker.com/build/drivers/remote/) driver.
32
+ :param pulumi.Input[str] ca_material: PEM-encoded content of Docker host CA certificate
33
+ :param pulumi.Input[str] cert_material: PEM-encoded content of Docker client certificate
34
+ :param pulumi.Input[str] cert_path: Path to directory with Docker TLS config
35
+ :param pulumi.Input[str] host: The Docker daemon address
36
+ :param pulumi.Input[str] key_material: PEM-encoded content of Docker client private key
37
+ :param pulumi.Input[Sequence[pulumi.Input[str]]] ssh_opts: Additional SSH option flags to be appended when using `ssh://` protocol
35
38
  """
36
39
  if ca_material is not None:
37
40
  pulumi.set(__self__, "ca_material", ca_material)
@@ -54,7 +57,7 @@ class ProviderArgs:
54
57
  @pulumi.getter(name="caMaterial")
55
58
  def ca_material(self) -> Optional[pulumi.Input[str]]:
56
59
  """
57
- PEM-encoded content of Docker host CA certificate.
60
+ PEM-encoded content of Docker host CA certificate
58
61
  """
59
62
  return pulumi.get(self, "ca_material")
60
63
 
@@ -66,7 +69,7 @@ class ProviderArgs:
66
69
  @pulumi.getter(name="certMaterial")
67
70
  def cert_material(self) -> Optional[pulumi.Input[str]]:
68
71
  """
69
- PEM-encoded content of Docker client certificate.
72
+ PEM-encoded content of Docker client certificate
70
73
  """
71
74
  return pulumi.get(self, "cert_material")
72
75
 
@@ -78,8 +81,7 @@ class ProviderArgs:
78
81
  @pulumi.getter(name="certPath")
79
82
  def cert_path(self) -> Optional[pulumi.Input[str]]:
80
83
  """
81
- Path to a directory with Docker TLS config. This directory is expected to contain `ca.pem`, `cert.pem`, and `key.pem`
82
- files.
84
+ Path to directory with Docker TLS config
83
85
  """
84
86
  return pulumi.get(self, "cert_path")
85
87
 
@@ -91,7 +93,7 @@ class ProviderArgs:
91
93
  @pulumi.getter
92
94
  def host(self) -> Optional[pulumi.Input[str]]:
93
95
  """
94
- The Docker daemon's address.
96
+ The Docker daemon address
95
97
  """
96
98
  return pulumi.get(self, "host")
97
99
 
@@ -103,7 +105,7 @@ class ProviderArgs:
103
105
  @pulumi.getter(name="keyMaterial")
104
106
  def key_material(self) -> Optional[pulumi.Input[str]]:
105
107
  """
106
- PEM-encoded content of Docker client private key.
108
+ PEM-encoded content of Docker client private key
107
109
  """
108
110
  return pulumi.get(self, "key_material")
109
111
 
@@ -124,8 +126,7 @@ class ProviderArgs:
124
126
  @pulumi.getter(name="sshOpts")
125
127
  def ssh_opts(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
126
128
  """
127
- Additional SSH option flags to be appended when using `ssh://` protocol. The `ssh://` protocol is not supported for
128
- `buildx.Image` resources. Instead, use a [remote](https://docs.docker.com/build/drivers/remote/) driver.
129
+ Additional SSH option flags to be appended when using `ssh://` protocol
129
130
  """
130
131
  return pulumi.get(self, "ssh_opts")
131
132
 
@@ -144,7 +145,7 @@ class Provider(pulumi.ProviderResource):
144
145
  cert_path: Optional[pulumi.Input[str]] = None,
145
146
  host: Optional[pulumi.Input[str]] = None,
146
147
  key_material: Optional[pulumi.Input[str]] = None,
147
- registry_auth: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['ProviderRegistryAuthArgs']]]]] = None,
148
+ registry_auth: Optional[pulumi.Input[Sequence[pulumi.Input[Union['ProviderRegistryAuthArgs', 'ProviderRegistryAuthArgsDict']]]]] = None,
148
149
  ssh_opts: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
149
150
  __props__=None):
150
151
  """
@@ -155,14 +156,12 @@ class Provider(pulumi.ProviderResource):
155
156
 
156
157
  :param str resource_name: The name of the resource.
157
158
  :param pulumi.ResourceOptions opts: Options for the resource.
158
- :param pulumi.Input[str] ca_material: PEM-encoded content of Docker host CA certificate.
159
- :param pulumi.Input[str] cert_material: PEM-encoded content of Docker client certificate.
160
- :param pulumi.Input[str] cert_path: Path to a directory with Docker TLS config. This directory is expected to contain `ca.pem`, `cert.pem`, and `key.pem`
161
- files.
162
- :param pulumi.Input[str] host: The Docker daemon's address.
163
- :param pulumi.Input[str] key_material: PEM-encoded content of Docker client private key.
164
- :param pulumi.Input[Sequence[pulumi.Input[str]]] ssh_opts: Additional SSH option flags to be appended when using `ssh://` protocol. The `ssh://` protocol is not supported for
165
- `buildx.Image` resources. Instead, use a [remote](https://docs.docker.com/build/drivers/remote/) driver.
159
+ :param pulumi.Input[str] ca_material: PEM-encoded content of Docker host CA certificate
160
+ :param pulumi.Input[str] cert_material: PEM-encoded content of Docker client certificate
161
+ :param pulumi.Input[str] cert_path: Path to directory with Docker TLS config
162
+ :param pulumi.Input[str] host: The Docker daemon address
163
+ :param pulumi.Input[str] key_material: PEM-encoded content of Docker client private key
164
+ :param pulumi.Input[Sequence[pulumi.Input[str]]] ssh_opts: Additional SSH option flags to be appended when using `ssh://` protocol
166
165
  """
167
166
  ...
168
167
  @overload
@@ -196,7 +195,7 @@ class Provider(pulumi.ProviderResource):
196
195
  cert_path: Optional[pulumi.Input[str]] = None,
197
196
  host: Optional[pulumi.Input[str]] = None,
198
197
  key_material: Optional[pulumi.Input[str]] = None,
199
- registry_auth: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['ProviderRegistryAuthArgs']]]]] = None,
198
+ registry_auth: Optional[pulumi.Input[Sequence[pulumi.Input[Union['ProviderRegistryAuthArgs', 'ProviderRegistryAuthArgsDict']]]]] = None,
200
199
  ssh_opts: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
201
200
  __props__=None):
202
201
  opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
@@ -226,7 +225,7 @@ class Provider(pulumi.ProviderResource):
226
225
  @pulumi.getter(name="caMaterial")
227
226
  def ca_material(self) -> pulumi.Output[Optional[str]]:
228
227
  """
229
- PEM-encoded content of Docker host CA certificate.
228
+ PEM-encoded content of Docker host CA certificate
230
229
  """
231
230
  return pulumi.get(self, "ca_material")
232
231
 
@@ -234,7 +233,7 @@ class Provider(pulumi.ProviderResource):
234
233
  @pulumi.getter(name="certMaterial")
235
234
  def cert_material(self) -> pulumi.Output[Optional[str]]:
236
235
  """
237
- PEM-encoded content of Docker client certificate.
236
+ PEM-encoded content of Docker client certificate
238
237
  """
239
238
  return pulumi.get(self, "cert_material")
240
239
 
@@ -242,8 +241,7 @@ class Provider(pulumi.ProviderResource):
242
241
  @pulumi.getter(name="certPath")
243
242
  def cert_path(self) -> pulumi.Output[Optional[str]]:
244
243
  """
245
- Path to a directory with Docker TLS config. This directory is expected to contain `ca.pem`, `cert.pem`, and `key.pem`
246
- files.
244
+ Path to directory with Docker TLS config
247
245
  """
248
246
  return pulumi.get(self, "cert_path")
249
247
 
@@ -251,7 +249,7 @@ class Provider(pulumi.ProviderResource):
251
249
  @pulumi.getter
252
250
  def host(self) -> pulumi.Output[Optional[str]]:
253
251
  """
254
- The Docker daemon's address.
252
+ The Docker daemon address
255
253
  """
256
254
  return pulumi.get(self, "host")
257
255
 
@@ -259,7 +257,7 @@ class Provider(pulumi.ProviderResource):
259
257
  @pulumi.getter(name="keyMaterial")
260
258
  def key_material(self) -> pulumi.Output[Optional[str]]:
261
259
  """
262
- PEM-encoded content of Docker client private key.
260
+ PEM-encoded content of Docker client private key
263
261
  """
264
262
  return pulumi.get(self, "key_material")
265
263
 
@@ -1,4 +1,5 @@
1
1
  {
2
2
  "resource": true,
3
- "name": "docker"
3
+ "name": "docker",
4
+ "version": "4.6.2"
4
5
  }
@@ -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, Any]]] = None):
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, Any]] 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
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, Any]]]:
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, Any]]]):
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, Any]]] = None):
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, Any]] 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
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, Any]]]:
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, Any]]]):
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, Any]]] = None,
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, Any]] 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
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, Any]]] = None,
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, Any]]] = None) -> 'RegistryImage':
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, Any]] 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
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, Any]]]:
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
  """