pulumi-tls 5.0.0__py3-none-any.whl → 5.1.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.
pulumi_tls/_inputs.py CHANGED
@@ -4,17 +4,68 @@
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__ = [
13
18
  'CertRequestSubjectArgs',
19
+ 'CertRequestSubjectArgsDict',
14
20
  'ProviderProxyArgs',
21
+ 'ProviderProxyArgsDict',
15
22
  'SelfSignedCertSubjectArgs',
23
+ 'SelfSignedCertSubjectArgsDict',
16
24
  ]
17
25
 
26
+ MYPY = False
27
+
28
+ if not MYPY:
29
+ class CertRequestSubjectArgsDict(TypedDict):
30
+ common_name: NotRequired[pulumi.Input[str]]
31
+ """
32
+ Distinguished name: `CN`
33
+ """
34
+ country: NotRequired[pulumi.Input[str]]
35
+ """
36
+ Distinguished name: `C`
37
+ """
38
+ locality: NotRequired[pulumi.Input[str]]
39
+ """
40
+ Distinguished name: `L`
41
+ """
42
+ organization: NotRequired[pulumi.Input[str]]
43
+ """
44
+ Distinguished name: `O`
45
+ """
46
+ organizational_unit: NotRequired[pulumi.Input[str]]
47
+ """
48
+ Distinguished name: `OU`
49
+ """
50
+ postal_code: NotRequired[pulumi.Input[str]]
51
+ """
52
+ Distinguished name: `PC`
53
+ """
54
+ province: NotRequired[pulumi.Input[str]]
55
+ """
56
+ Distinguished name: `ST`
57
+ """
58
+ serial_number: NotRequired[pulumi.Input[str]]
59
+ """
60
+ Distinguished name: `SERIALNUMBER`
61
+ """
62
+ street_addresses: NotRequired[pulumi.Input[Sequence[pulumi.Input[str]]]]
63
+ """
64
+ Distinguished name: `STREET`
65
+ """
66
+ elif False:
67
+ CertRequestSubjectArgsDict: TypeAlias = Mapping[str, Any]
68
+
18
69
  @pulumi.input_type
19
70
  class CertRequestSubjectArgs:
20
71
  def __init__(__self__, *,
@@ -166,6 +217,27 @@ class CertRequestSubjectArgs:
166
217
  pulumi.set(self, "street_addresses", value)
167
218
 
168
219
 
220
+ if not MYPY:
221
+ class ProviderProxyArgsDict(TypedDict):
222
+ from_env: NotRequired[pulumi.Input[bool]]
223
+ """
224
+ When `true` the provider will discover the proxy configuration from environment variables. This is based upon [`http.ProxyFromEnvironment`](https://pkg.go.dev/net/http#ProxyFromEnvironment) and it supports the same environment variables (default: `true`).
225
+ """
226
+ password: NotRequired[pulumi.Input[str]]
227
+ """
228
+ Password used for Basic authentication against the Proxy.
229
+ """
230
+ url: NotRequired[pulumi.Input[str]]
231
+ """
232
+ URL used to connect to the Proxy. Accepted schemes are: `http`, `https`, `socks5`.
233
+ """
234
+ username: NotRequired[pulumi.Input[str]]
235
+ """
236
+ Username (or Token) used for Basic authentication against the Proxy.
237
+ """
238
+ elif False:
239
+ ProviderProxyArgsDict: TypeAlias = Mapping[str, Any]
240
+
169
241
  @pulumi.input_type
170
242
  class ProviderProxyArgs:
171
243
  def __init__(__self__, *,
@@ -173,6 +245,12 @@ class ProviderProxyArgs:
173
245
  password: Optional[pulumi.Input[str]] = None,
174
246
  url: Optional[pulumi.Input[str]] = None,
175
247
  username: Optional[pulumi.Input[str]] = None):
248
+ """
249
+ :param pulumi.Input[bool] from_env: When `true` the provider will discover the proxy configuration from environment variables. This is based upon [`http.ProxyFromEnvironment`](https://pkg.go.dev/net/http#ProxyFromEnvironment) and it supports the same environment variables (default: `true`).
250
+ :param pulumi.Input[str] password: Password used for Basic authentication against the Proxy.
251
+ :param pulumi.Input[str] url: URL used to connect to the Proxy. Accepted schemes are: `http`, `https`, `socks5`.
252
+ :param pulumi.Input[str] username: Username (or Token) used for Basic authentication against the Proxy.
253
+ """
176
254
  if from_env is not None:
177
255
  pulumi.set(__self__, "from_env", from_env)
178
256
  if password is not None:
@@ -185,6 +263,9 @@ class ProviderProxyArgs:
185
263
  @property
186
264
  @pulumi.getter(name="fromEnv")
187
265
  def from_env(self) -> Optional[pulumi.Input[bool]]:
266
+ """
267
+ When `true` the provider will discover the proxy configuration from environment variables. This is based upon [`http.ProxyFromEnvironment`](https://pkg.go.dev/net/http#ProxyFromEnvironment) and it supports the same environment variables (default: `true`).
268
+ """
188
269
  return pulumi.get(self, "from_env")
189
270
 
190
271
  @from_env.setter
@@ -194,6 +275,9 @@ class ProviderProxyArgs:
194
275
  @property
195
276
  @pulumi.getter
196
277
  def password(self) -> Optional[pulumi.Input[str]]:
278
+ """
279
+ Password used for Basic authentication against the Proxy.
280
+ """
197
281
  return pulumi.get(self, "password")
198
282
 
199
283
  @password.setter
@@ -203,6 +287,9 @@ class ProviderProxyArgs:
203
287
  @property
204
288
  @pulumi.getter
205
289
  def url(self) -> Optional[pulumi.Input[str]]:
290
+ """
291
+ URL used to connect to the Proxy. Accepted schemes are: `http`, `https`, `socks5`.
292
+ """
206
293
  return pulumi.get(self, "url")
207
294
 
208
295
  @url.setter
@@ -212,6 +299,9 @@ class ProviderProxyArgs:
212
299
  @property
213
300
  @pulumi.getter
214
301
  def username(self) -> Optional[pulumi.Input[str]]:
302
+ """
303
+ Username (or Token) used for Basic authentication against the Proxy.
304
+ """
215
305
  return pulumi.get(self, "username")
216
306
 
217
307
  @username.setter
@@ -219,6 +309,47 @@ class ProviderProxyArgs:
219
309
  pulumi.set(self, "username", value)
220
310
 
221
311
 
312
+ if not MYPY:
313
+ class SelfSignedCertSubjectArgsDict(TypedDict):
314
+ common_name: NotRequired[pulumi.Input[str]]
315
+ """
316
+ Distinguished name: `CN`
317
+ """
318
+ country: NotRequired[pulumi.Input[str]]
319
+ """
320
+ Distinguished name: `C`
321
+ """
322
+ locality: NotRequired[pulumi.Input[str]]
323
+ """
324
+ Distinguished name: `L`
325
+ """
326
+ organization: NotRequired[pulumi.Input[str]]
327
+ """
328
+ Distinguished name: `O`
329
+ """
330
+ organizational_unit: NotRequired[pulumi.Input[str]]
331
+ """
332
+ Distinguished name: `OU`
333
+ """
334
+ postal_code: NotRequired[pulumi.Input[str]]
335
+ """
336
+ Distinguished name: `PC`
337
+ """
338
+ province: NotRequired[pulumi.Input[str]]
339
+ """
340
+ Distinguished name: `ST`
341
+ """
342
+ serial_number: NotRequired[pulumi.Input[str]]
343
+ """
344
+ Distinguished name: `SERIALNUMBER`
345
+ """
346
+ street_addresses: NotRequired[pulumi.Input[Sequence[pulumi.Input[str]]]]
347
+ """
348
+ Distinguished name: `STREET`
349
+ """
350
+ elif False:
351
+ SelfSignedCertSubjectArgsDict: TypeAlias = Mapping[str, Any]
352
+
222
353
  @pulumi.input_type
223
354
  class SelfSignedCertSubjectArgs:
224
355
  def __init__(__self__, *,
pulumi_tls/_utilities.py CHANGED
@@ -3,20 +3,28 @@
3
3
  # *** Do not edit by hand unless you're certain you know what you are doing! ***
4
4
 
5
5
 
6
+ import asyncio
7
+ import functools
8
+ import importlib.metadata
6
9
  import importlib.util
7
10
  import inspect
8
11
  import json
9
12
  import os
10
- import pkg_resources
11
13
  import sys
12
14
  import typing
15
+ import warnings
16
+ import base64
13
17
 
14
18
  import pulumi
15
19
  import pulumi.runtime
20
+ from pulumi.runtime.sync_await import _sync_await
21
+ from pulumi.runtime.proto import resource_pb2
16
22
 
17
23
  from semver import VersionInfo as SemverVersion
18
24
  from parver import Version as PEP440Version
19
25
 
26
+ C = typing.TypeVar("C", bound=typing.Callable)
27
+
20
28
 
21
29
  def get_env(*args):
22
30
  for v in args:
@@ -70,7 +78,7 @@ def _get_semver_version():
70
78
  # to receive a valid semver string when receiving requests from the language host, so it's our
71
79
  # responsibility as the library to convert our own PEP440 version into a valid semver string.
72
80
 
73
- pep440_version_string = pkg_resources.require(root_package)[0].version
81
+ pep440_version_string = importlib.metadata.version(root_package)
74
82
  pep440_version = PEP440Version.parse(pep440_version_string)
75
83
  (major, minor, patch) = pep440_version.release
76
84
  prerelease = None
@@ -94,10 +102,6 @@ def _get_semver_version():
94
102
  _version = _get_semver_version()
95
103
  _version_str = str(_version)
96
104
 
97
-
98
- def get_version():
99
- return _version_str
100
-
101
105
  def get_resource_opts_defaults() -> pulumi.ResourceOptions:
102
106
  return pulumi.ResourceOptions(
103
107
  version=get_version(),
@@ -246,5 +250,78 @@ def lift_output_func(func: typing.Any) -> typing.Callable[[_F], _F]:
246
250
 
247
251
  return (lambda _: lifted_func)
248
252
 
253
+
254
+ def call_plain(
255
+ tok: str,
256
+ props: pulumi.Inputs,
257
+ res: typing.Optional[pulumi.Resource] = None,
258
+ typ: typing.Optional[type] = None,
259
+ ) -> typing.Any:
260
+ """
261
+ Wraps pulumi.runtime.plain to force the output and return it plainly.
262
+ """
263
+
264
+ output = pulumi.runtime.call(tok, props, res, typ)
265
+
266
+ # Ingoring deps silently. They are typically non-empty, r.f() calls include r as a dependency.
267
+ result, known, secret, _ = _sync_await(asyncio.create_task(_await_output(output)))
268
+
269
+ problem = None
270
+ if not known:
271
+ problem = ' an unknown value'
272
+ elif secret:
273
+ problem = ' a secret value'
274
+
275
+ if problem:
276
+ raise AssertionError(
277
+ f"Plain resource method '{tok}' incorrectly returned {problem}. "
278
+ + "This is an error in the provider, please report this to the provider developer."
279
+ )
280
+
281
+ return result
282
+
283
+
284
+ async def _await_output(o: pulumi.Output[typing.Any]) -> typing.Tuple[object, bool, bool, set]:
285
+ return (
286
+ await o._future,
287
+ await o._is_known,
288
+ await o._is_secret,
289
+ await o._resources,
290
+ )
291
+
292
+
293
+ # This is included to provide an upgrade path for users who are using a version
294
+ # of the Pulumi SDK (<3.121.0) that does not include the `deprecated` decorator.
295
+ def deprecated(message: str) -> typing.Callable[[C], C]:
296
+ """
297
+ Decorator to indicate a function is deprecated.
298
+
299
+ As well as inserting appropriate statements to indicate that the function is
300
+ deprecated, this decorator also tags the function with a special attribute
301
+ so that Pulumi code can detect that it is deprecated and react appropriately
302
+ in certain situations.
303
+
304
+ message is the deprecation message that should be printed if the function is called.
305
+ """
306
+
307
+ def decorator(fn: C) -> C:
308
+ if not callable(fn):
309
+ raise TypeError("Expected fn to be callable")
310
+
311
+ @functools.wraps(fn)
312
+ def deprecated_fn(*args, **kwargs):
313
+ warnings.warn(message)
314
+ pulumi.warn(f"{fn.__name__} is deprecated: {message}")
315
+
316
+ return fn(*args, **kwargs)
317
+
318
+ deprecated_fn.__dict__["_pulumi_deprecated_callable"] = fn
319
+ return typing.cast(C, deprecated_fn)
320
+
321
+ return decorator
322
+
249
323
  def get_plugin_download_url():
250
324
  return None
325
+
326
+ def get_version():
327
+ return _version_str
@@ -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 *
@@ -23,7 +28,7 @@ class CertRequestArgs:
23
28
  uris: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None):
24
29
  """
25
30
  The set of arguments for constructing a CertRequest resource.
26
- :param pulumi.Input[str] private_key_pem: Private key in PEM (RFC 1421) interpolation function.
31
+ :param pulumi.Input[str] private_key_pem: Private key in [PEM (RFC 1421)](https://datatracker.ietf.org/doc/html/rfc1421) format, that the certificate will belong to. This can be read from a separate file using the `file` interpolation function.
27
32
  :param pulumi.Input[Sequence[pulumi.Input[str]]] dns_names: List of DNS names for which a certificate is being requested (i.e. certificate subjects).
28
33
  :param pulumi.Input[Sequence[pulumi.Input[str]]] ip_addresses: List of IP addresses for which a certificate is being requested (i.e. certificate subjects).
29
34
  :param pulumi.Input['CertRequestSubjectArgs'] subject: The subject for which a certificate is being requested. The acceptable arguments are all optional and their naming is based upon [Issuer Distinguished Names (RFC5280)](https://tools.ietf.org/html/rfc5280#section-4.1.2.4) section.
@@ -43,7 +48,7 @@ class CertRequestArgs:
43
48
  @pulumi.getter(name="privateKeyPem")
44
49
  def private_key_pem(self) -> pulumi.Input[str]:
45
50
  """
46
- Private key in PEM (RFC 1421) interpolation function.
51
+ Private key in [PEM (RFC 1421)](https://datatracker.ietf.org/doc/html/rfc1421) format, that the certificate will belong to. This can be read from a separate file using the `file` interpolation function.
47
52
  """
48
53
  return pulumi.get(self, "private_key_pem")
49
54
 
@@ -112,11 +117,11 @@ class _CertRequestState:
112
117
  uris: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None):
113
118
  """
114
119
  Input properties used for looking up and filtering CertRequest resources.
115
- :param pulumi.Input[str] cert_request_pem: The certificate request data in PEM (RFC 1421).
120
+ :param pulumi.Input[str] cert_request_pem: The certificate request data in [PEM (RFC 1421)](https://datatracker.ietf.org/doc/html/rfc1421) format. **NOTE**: the [underlying](https://pkg.go.dev/encoding/pem#Encode) [libraries](https://pkg.go.dev/golang.org/x/crypto/ssh#MarshalAuthorizedKey) that generate this value append a `\\n` at the end of the PEM. In case this disrupts your use case, we recommend using `trimspace()`.
116
121
  :param pulumi.Input[Sequence[pulumi.Input[str]]] dns_names: List of DNS names for which a certificate is being requested (i.e. certificate subjects).
117
122
  :param pulumi.Input[Sequence[pulumi.Input[str]]] ip_addresses: List of IP addresses for which a certificate is being requested (i.e. certificate subjects).
118
123
  :param pulumi.Input[str] key_algorithm: Name of the algorithm used when generating the private key provided in `private_key_pem`.
119
- :param pulumi.Input[str] private_key_pem: Private key in PEM (RFC 1421) interpolation function.
124
+ :param pulumi.Input[str] private_key_pem: Private key in [PEM (RFC 1421)](https://datatracker.ietf.org/doc/html/rfc1421) format, that the certificate will belong to. This can be read from a separate file using the `file` interpolation function.
120
125
  :param pulumi.Input['CertRequestSubjectArgs'] subject: The subject for which a certificate is being requested. The acceptable arguments are all optional and their naming is based upon [Issuer Distinguished Names (RFC5280)](https://tools.ietf.org/html/rfc5280#section-4.1.2.4) section.
121
126
  :param pulumi.Input[Sequence[pulumi.Input[str]]] uris: List of URIs for which a certificate is being requested (i.e. certificate subjects).
122
127
  """
@@ -139,7 +144,7 @@ class _CertRequestState:
139
144
  @pulumi.getter(name="certRequestPem")
140
145
  def cert_request_pem(self) -> Optional[pulumi.Input[str]]:
141
146
  """
142
- The certificate request data in PEM (RFC 1421).
147
+ The certificate request data in [PEM (RFC 1421)](https://datatracker.ietf.org/doc/html/rfc1421) format. **NOTE**: the [underlying](https://pkg.go.dev/encoding/pem#Encode) [libraries](https://pkg.go.dev/golang.org/x/crypto/ssh#MarshalAuthorizedKey) that generate this value append a `\\n` at the end of the PEM. In case this disrupts your use case, we recommend using `trimspace()`.
143
148
  """
144
149
  return pulumi.get(self, "cert_request_pem")
145
150
 
@@ -187,7 +192,7 @@ class _CertRequestState:
187
192
  @pulumi.getter(name="privateKeyPem")
188
193
  def private_key_pem(self) -> Optional[pulumi.Input[str]]:
189
194
  """
190
- Private key in PEM (RFC 1421) interpolation function.
195
+ Private key in [PEM (RFC 1421)](https://datatracker.ietf.org/doc/html/rfc1421) format, that the certificate will belong to. This can be read from a separate file using the `file` interpolation function.
191
196
  """
192
197
  return pulumi.get(self, "private_key_pem")
193
198
 
@@ -228,7 +233,7 @@ class CertRequest(pulumi.CustomResource):
228
233
  dns_names: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
229
234
  ip_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
230
235
  private_key_pem: Optional[pulumi.Input[str]] = None,
231
- subject: Optional[pulumi.Input[pulumi.InputType['CertRequestSubjectArgs']]] = None,
236
+ subject: Optional[pulumi.Input[Union['CertRequestSubjectArgs', 'CertRequestSubjectArgsDict']]] = None,
232
237
  uris: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
233
238
  __props__=None):
234
239
  """
@@ -236,22 +241,23 @@ class CertRequest(pulumi.CustomResource):
236
241
 
237
242
  ```python
238
243
  import pulumi
244
+ import pulumi_std as std
239
245
  import pulumi_tls as tls
240
246
 
241
247
  example = tls.CertRequest("example",
242
- private_key_pem=(lambda path: open(path).read())("private_key.pem"),
243
- subject=tls.CertRequestSubjectArgs(
244
- common_name="example.com",
245
- organization="ACME Examples, Inc",
246
- ))
248
+ private_key_pem=std.file(input="private_key.pem").result,
249
+ subject={
250
+ "common_name": "example.com",
251
+ "organization": "ACME Examples, Inc",
252
+ })
247
253
  ```
248
254
 
249
255
  :param str resource_name: The name of the resource.
250
256
  :param pulumi.ResourceOptions opts: Options for the resource.
251
257
  :param pulumi.Input[Sequence[pulumi.Input[str]]] dns_names: List of DNS names for which a certificate is being requested (i.e. certificate subjects).
252
258
  :param pulumi.Input[Sequence[pulumi.Input[str]]] ip_addresses: List of IP addresses for which a certificate is being requested (i.e. certificate subjects).
253
- :param pulumi.Input[str] private_key_pem: Private key in PEM (RFC 1421) interpolation function.
254
- :param pulumi.Input[pulumi.InputType['CertRequestSubjectArgs']] subject: The subject for which a certificate is being requested. The acceptable arguments are all optional and their naming is based upon [Issuer Distinguished Names (RFC5280)](https://tools.ietf.org/html/rfc5280#section-4.1.2.4) section.
259
+ :param pulumi.Input[str] private_key_pem: Private key in [PEM (RFC 1421)](https://datatracker.ietf.org/doc/html/rfc1421) format, that the certificate will belong to. This can be read from a separate file using the `file` interpolation function.
260
+ :param pulumi.Input[Union['CertRequestSubjectArgs', 'CertRequestSubjectArgsDict']] subject: The subject for which a certificate is being requested. The acceptable arguments are all optional and their naming is based upon [Issuer Distinguished Names (RFC5280)](https://tools.ietf.org/html/rfc5280#section-4.1.2.4) section.
255
261
  :param pulumi.Input[Sequence[pulumi.Input[str]]] uris: List of URIs for which a certificate is being requested (i.e. certificate subjects).
256
262
  """
257
263
  ...
@@ -265,14 +271,15 @@ class CertRequest(pulumi.CustomResource):
265
271
 
266
272
  ```python
267
273
  import pulumi
274
+ import pulumi_std as std
268
275
  import pulumi_tls as tls
269
276
 
270
277
  example = tls.CertRequest("example",
271
- private_key_pem=(lambda path: open(path).read())("private_key.pem"),
272
- subject=tls.CertRequestSubjectArgs(
273
- common_name="example.com",
274
- organization="ACME Examples, Inc",
275
- ))
278
+ private_key_pem=std.file(input="private_key.pem").result,
279
+ subject={
280
+ "common_name": "example.com",
281
+ "organization": "ACME Examples, Inc",
282
+ })
276
283
  ```
277
284
 
278
285
  :param str resource_name: The name of the resource.
@@ -293,7 +300,7 @@ class CertRequest(pulumi.CustomResource):
293
300
  dns_names: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
294
301
  ip_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
295
302
  private_key_pem: Optional[pulumi.Input[str]] = None,
296
- subject: Optional[pulumi.Input[pulumi.InputType['CertRequestSubjectArgs']]] = None,
303
+ subject: Optional[pulumi.Input[Union['CertRequestSubjectArgs', 'CertRequestSubjectArgsDict']]] = None,
297
304
  uris: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
298
305
  __props__=None):
299
306
  opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
@@ -330,7 +337,7 @@ class CertRequest(pulumi.CustomResource):
330
337
  ip_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
331
338
  key_algorithm: Optional[pulumi.Input[str]] = None,
332
339
  private_key_pem: Optional[pulumi.Input[str]] = None,
333
- subject: Optional[pulumi.Input[pulumi.InputType['CertRequestSubjectArgs']]] = None,
340
+ subject: Optional[pulumi.Input[Union['CertRequestSubjectArgs', 'CertRequestSubjectArgsDict']]] = None,
334
341
  uris: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None) -> 'CertRequest':
335
342
  """
336
343
  Get an existing CertRequest resource's state with the given name, id, and optional extra
@@ -339,12 +346,12 @@ class CertRequest(pulumi.CustomResource):
339
346
  :param str resource_name: The unique name of the resulting resource.
340
347
  :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
341
348
  :param pulumi.ResourceOptions opts: Options for the resource.
342
- :param pulumi.Input[str] cert_request_pem: The certificate request data in PEM (RFC 1421).
349
+ :param pulumi.Input[str] cert_request_pem: The certificate request data in [PEM (RFC 1421)](https://datatracker.ietf.org/doc/html/rfc1421) format. **NOTE**: the [underlying](https://pkg.go.dev/encoding/pem#Encode) [libraries](https://pkg.go.dev/golang.org/x/crypto/ssh#MarshalAuthorizedKey) that generate this value append a `\\n` at the end of the PEM. In case this disrupts your use case, we recommend using `trimspace()`.
343
350
  :param pulumi.Input[Sequence[pulumi.Input[str]]] dns_names: List of DNS names for which a certificate is being requested (i.e. certificate subjects).
344
351
  :param pulumi.Input[Sequence[pulumi.Input[str]]] ip_addresses: List of IP addresses for which a certificate is being requested (i.e. certificate subjects).
345
352
  :param pulumi.Input[str] key_algorithm: Name of the algorithm used when generating the private key provided in `private_key_pem`.
346
- :param pulumi.Input[str] private_key_pem: Private key in PEM (RFC 1421) interpolation function.
347
- :param pulumi.Input[pulumi.InputType['CertRequestSubjectArgs']] subject: The subject for which a certificate is being requested. The acceptable arguments are all optional and their naming is based upon [Issuer Distinguished Names (RFC5280)](https://tools.ietf.org/html/rfc5280#section-4.1.2.4) section.
353
+ :param pulumi.Input[str] private_key_pem: Private key in [PEM (RFC 1421)](https://datatracker.ietf.org/doc/html/rfc1421) format, that the certificate will belong to. This can be read from a separate file using the `file` interpolation function.
354
+ :param pulumi.Input[Union['CertRequestSubjectArgs', 'CertRequestSubjectArgsDict']] subject: The subject for which a certificate is being requested. The acceptable arguments are all optional and their naming is based upon [Issuer Distinguished Names (RFC5280)](https://tools.ietf.org/html/rfc5280#section-4.1.2.4) section.
348
355
  :param pulumi.Input[Sequence[pulumi.Input[str]]] uris: List of URIs for which a certificate is being requested (i.e. certificate subjects).
349
356
  """
350
357
  opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
@@ -364,7 +371,7 @@ class CertRequest(pulumi.CustomResource):
364
371
  @pulumi.getter(name="certRequestPem")
365
372
  def cert_request_pem(self) -> pulumi.Output[str]:
366
373
  """
367
- The certificate request data in PEM (RFC 1421).
374
+ The certificate request data in [PEM (RFC 1421)](https://datatracker.ietf.org/doc/html/rfc1421) format. **NOTE**: the [underlying](https://pkg.go.dev/encoding/pem#Encode) [libraries](https://pkg.go.dev/golang.org/x/crypto/ssh#MarshalAuthorizedKey) that generate this value append a `\\n` at the end of the PEM. In case this disrupts your use case, we recommend using `trimspace()`.
368
375
  """
369
376
  return pulumi.get(self, "cert_request_pem")
370
377
 
@@ -396,7 +403,7 @@ class CertRequest(pulumi.CustomResource):
396
403
  @pulumi.getter(name="privateKeyPem")
397
404
  def private_key_pem(self) -> pulumi.Output[str]:
398
405
  """
399
- Private key in PEM (RFC 1421) interpolation function.
406
+ Private key in [PEM (RFC 1421)](https://datatracker.ietf.org/doc/html/rfc1421) format, that the certificate will belong to. This can be read from a separate file using the `file` interpolation function.
400
407
  """
401
408
  return pulumi.get(self, "private_key_pem")
402
409
 
@@ -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
 
@@ -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__ = [
@@ -20,6 +25,12 @@ class Proxy(dict):
20
25
  password: Optional[str] = None,
21
26
  url: Optional[str] = None,
22
27
  username: Optional[str] = None):
28
+ """
29
+ :param bool from_env: When `true` the provider will discover the proxy configuration from environment variables. This is based upon [`http.ProxyFromEnvironment`](https://pkg.go.dev/net/http#ProxyFromEnvironment) and it supports the same environment variables (default: `true`).
30
+ :param str password: Password used for Basic authentication against the Proxy.
31
+ :param str url: URL used to connect to the Proxy. Accepted schemes are: `http`, `https`, `socks5`.
32
+ :param str username: Username (or Token) used for Basic authentication against the Proxy.
33
+ """
23
34
  if from_env is not None:
24
35
  pulumi.set(__self__, "from_env", from_env)
25
36
  if password is not None:
@@ -32,21 +43,33 @@ class Proxy(dict):
32
43
  @property
33
44
  @pulumi.getter(name="fromEnv")
34
45
  def from_env(self) -> Optional[bool]:
46
+ """
47
+ When `true` the provider will discover the proxy configuration from environment variables. This is based upon [`http.ProxyFromEnvironment`](https://pkg.go.dev/net/http#ProxyFromEnvironment) and it supports the same environment variables (default: `true`).
48
+ """
35
49
  return pulumi.get(self, "from_env")
36
50
 
37
51
  @property
38
52
  @pulumi.getter
39
53
  def password(self) -> Optional[str]:
54
+ """
55
+ Password used for Basic authentication against the Proxy.
56
+ """
40
57
  return pulumi.get(self, "password")
41
58
 
42
59
  @property
43
60
  @pulumi.getter
44
61
  def url(self) -> Optional[str]:
62
+ """
63
+ URL used to connect to the Proxy. Accepted schemes are: `http`, `https`, `socks5`.
64
+ """
45
65
  return pulumi.get(self, "url")
46
66
 
47
67
  @property
48
68
  @pulumi.getter
49
69
  def username(self) -> Optional[str]:
70
+ """
71
+ Username (or Token) used for Basic authentication against the Proxy.
72
+ """
50
73
  return pulumi.get(self, "username")
51
74
 
52
75
 
pulumi_tls/config/vars.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
 
@@ -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
 
@@ -117,13 +122,10 @@ def get_certificate(content: Optional[str] = None,
117
122
  id=pulumi.get(__ret__, 'id'),
118
123
  url=pulumi.get(__ret__, 'url'),
119
124
  verify_chain=pulumi.get(__ret__, 'verify_chain'))
120
-
121
-
122
- @_utilities.lift_output_func(get_certificate)
123
125
  def get_certificate_output(content: Optional[pulumi.Input[Optional[str]]] = None,
124
126
  url: Optional[pulumi.Input[Optional[str]]] = None,
125
127
  verify_chain: Optional[pulumi.Input[Optional[bool]]] = None,
126
- opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetCertificateResult]:
128
+ opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetCertificateResult]:
127
129
  """
128
130
  Use this data source to access information about an existing resource.
129
131
 
@@ -131,4 +133,15 @@ def get_certificate_output(content: Optional[pulumi.Input[Optional[str]]] = None
131
133
  :param str url: The URL of the website to get the certificates from. Cannot be used with `content`.
132
134
  :param bool verify_chain: Whether to verify the certificate chain while parsing it or not (default: `true`). Cannot be used with `content`.
133
135
  """
134
- ...
136
+ __args__ = dict()
137
+ __args__['content'] = content
138
+ __args__['url'] = url
139
+ __args__['verifyChain'] = verify_chain
140
+ opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
141
+ __ret__ = pulumi.runtime.invoke_output('tls:index/getCertificate:getCertificate', __args__, opts=opts, typ=GetCertificateResult)
142
+ return __ret__.apply(lambda __response__: GetCertificateResult(
143
+ certificates=pulumi.get(__response__, 'certificates'),
144
+ content=pulumi.get(__response__, 'content'),
145
+ id=pulumi.get(__response__, 'id'),
146
+ url=pulumi.get(__response__, 'url'),
147
+ verify_chain=pulumi.get(__response__, 'verify_chain')))