pulumi-tls 5.1.0a1710160622__py3-none-any.whl → 5.1.0a1736835965__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__, *,
@@ -237,6 +309,47 @@ class ProviderProxyArgs:
237
309
  pulumi.set(self, "username", value)
238
310
 
239
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
+
240
353
  @pulumi.input_type
241
354
  class SelfSignedCertSubjectArgs:
242
355
  def __init__(__self__, *,
pulumi_tls/_utilities.py CHANGED
@@ -4,6 +4,7 @@
4
4
 
5
5
 
6
6
  import asyncio
7
+ import functools
7
8
  import importlib.metadata
8
9
  import importlib.util
9
10
  import inspect
@@ -11,14 +12,19 @@ import json
11
12
  import os
12
13
  import sys
13
14
  import typing
15
+ import warnings
16
+ import base64
14
17
 
15
18
  import pulumi
16
19
  import pulumi.runtime
17
20
  from pulumi.runtime.sync_await import _sync_await
21
+ from pulumi.runtime.proto import resource_pb2
18
22
 
19
23
  from semver import VersionInfo as SemverVersion
20
24
  from parver import Version as PEP440Version
21
25
 
26
+ C = typing.TypeVar("C", bound=typing.Callable)
27
+
22
28
 
23
29
  def get_env(*args):
24
30
  for v in args:
@@ -96,10 +102,6 @@ def _get_semver_version():
96
102
  _version = _get_semver_version()
97
103
  _version_str = str(_version)
98
104
 
99
-
100
- def get_version():
101
- return _version_str
102
-
103
105
  def get_resource_opts_defaults() -> pulumi.ResourceOptions:
104
106
  return pulumi.ResourceOptions(
105
107
  version=get_version(),
@@ -262,7 +264,7 @@ def call_plain(
262
264
  output = pulumi.runtime.call(tok, props, res, typ)
263
265
 
264
266
  # Ingoring deps silently. They are typically non-empty, r.f() calls include r as a dependency.
265
- result, known, secret, _ = _sync_await(asyncio.ensure_future(_await_output(output)))
267
+ result, known, secret, _ = _sync_await(asyncio.create_task(_await_output(output)))
266
268
 
267
269
  problem = None
268
270
  if not known:
@@ -287,5 +289,39 @@ async def _await_output(o: pulumi.Output[typing.Any]) -> typing.Tuple[object, bo
287
289
  await o._resources,
288
290
  )
289
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
+
290
323
  def get_plugin_download_url():
291
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,32 +233,31 @@ 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
  """
235
240
  ## Example Usage
236
241
 
237
- <!--Start PulumiCodeChooser -->
238
242
  ```python
239
243
  import pulumi
244
+ import pulumi_std as std
240
245
  import pulumi_tls as tls
241
246
 
242
247
  example = tls.CertRequest("example",
243
- private_key_pem=(lambda path: open(path).read())("private_key.pem"),
244
- subject=tls.CertRequestSubjectArgs(
245
- common_name="example.com",
246
- organization="ACME Examples, Inc",
247
- ))
248
+ private_key_pem=std.file(input="private_key.pem").result,
249
+ subject={
250
+ "common_name": "example.com",
251
+ "organization": "ACME Examples, Inc",
252
+ })
248
253
  ```
249
- <!--End PulumiCodeChooser -->
250
254
 
251
255
  :param str resource_name: The name of the resource.
252
256
  :param pulumi.ResourceOptions opts: Options for the resource.
253
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).
254
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).
255
- :param pulumi.Input[str] private_key_pem: Private key in PEM (RFC 1421) interpolation function.
256
- :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.
257
261
  :param pulumi.Input[Sequence[pulumi.Input[str]]] uris: List of URIs for which a certificate is being requested (i.e. certificate subjects).
258
262
  """
259
263
  ...
@@ -265,19 +269,18 @@ class CertRequest(pulumi.CustomResource):
265
269
  """
266
270
  ## Example Usage
267
271
 
268
- <!--Start PulumiCodeChooser -->
269
272
  ```python
270
273
  import pulumi
274
+ import pulumi_std as std
271
275
  import pulumi_tls as tls
272
276
 
273
277
  example = tls.CertRequest("example",
274
- private_key_pem=(lambda path: open(path).read())("private_key.pem"),
275
- subject=tls.CertRequestSubjectArgs(
276
- common_name="example.com",
277
- organization="ACME Examples, Inc",
278
- ))
278
+ private_key_pem=std.file(input="private_key.pem").result,
279
+ subject={
280
+ "common_name": "example.com",
281
+ "organization": "ACME Examples, Inc",
282
+ })
279
283
  ```
280
- <!--End PulumiCodeChooser -->
281
284
 
282
285
  :param str resource_name: The name of the resource.
283
286
  :param CertRequestArgs args: The arguments to use to populate this resource's properties.
@@ -297,7 +300,7 @@ class CertRequest(pulumi.CustomResource):
297
300
  dns_names: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
298
301
  ip_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
299
302
  private_key_pem: Optional[pulumi.Input[str]] = None,
300
- subject: Optional[pulumi.Input[pulumi.InputType['CertRequestSubjectArgs']]] = None,
303
+ subject: Optional[pulumi.Input[Union['CertRequestSubjectArgs', 'CertRequestSubjectArgsDict']]] = None,
301
304
  uris: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
302
305
  __props__=None):
303
306
  opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
@@ -334,7 +337,7 @@ class CertRequest(pulumi.CustomResource):
334
337
  ip_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
335
338
  key_algorithm: Optional[pulumi.Input[str]] = None,
336
339
  private_key_pem: Optional[pulumi.Input[str]] = None,
337
- subject: Optional[pulumi.Input[pulumi.InputType['CertRequestSubjectArgs']]] = None,
340
+ subject: Optional[pulumi.Input[Union['CertRequestSubjectArgs', 'CertRequestSubjectArgsDict']]] = None,
338
341
  uris: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None) -> 'CertRequest':
339
342
  """
340
343
  Get an existing CertRequest resource's state with the given name, id, and optional extra
@@ -343,12 +346,12 @@ class CertRequest(pulumi.CustomResource):
343
346
  :param str resource_name: The unique name of the resulting resource.
344
347
  :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
345
348
  :param pulumi.ResourceOptions opts: Options for the resource.
346
- :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()`.
347
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).
348
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).
349
352
  :param pulumi.Input[str] key_algorithm: Name of the algorithm used when generating the private key provided in `private_key_pem`.
350
- :param pulumi.Input[str] private_key_pem: Private key in PEM (RFC 1421) interpolation function.
351
- :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.
352
355
  :param pulumi.Input[Sequence[pulumi.Input[str]]] uris: List of URIs for which a certificate is being requested (i.e. certificate subjects).
353
356
  """
354
357
  opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
@@ -368,7 +371,7 @@ class CertRequest(pulumi.CustomResource):
368
371
  @pulumi.getter(name="certRequestPem")
369
372
  def cert_request_pem(self) -> pulumi.Output[str]:
370
373
  """
371
- 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()`.
372
375
  """
373
376
  return pulumi.get(self, "cert_request_pem")
374
377
 
@@ -400,7 +403,7 @@ class CertRequest(pulumi.CustomResource):
400
403
  @pulumi.getter(name="privateKeyPem")
401
404
  def private_key_pem(self) -> pulumi.Output[str]:
402
405
  """
403
- 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.
404
407
  """
405
408
  return pulumi.get(self, "private_key_pem")
406
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__ = [
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')))
@@ -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__ = [
@@ -99,7 +104,7 @@ class GetPublicKeyResult:
99
104
  @pulumi.getter(name="publicKeyOpenssh")
100
105
  def public_key_openssh(self) -> str:
101
106
  """
102
- The public key, in OpenSSH PEM (RFC 4716).
107
+ The public key, in [OpenSSH PEM (RFC 4716)](https://datatracker.ietf.org/doc/html/rfc4716) format. This is also known as ['Authorized Keys'](https://www.ssh.com/academy/ssh/authorized_keys/openssh#format-of-the-authorized-keys-file) format. This is not populated for `ECDSA` with curve `P224`, as it is not supported. **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()`.
103
108
  """
104
109
  return pulumi.get(self, "public_key_openssh")
105
110
 
@@ -107,7 +112,7 @@ class GetPublicKeyResult:
107
112
  @pulumi.getter(name="publicKeyPem")
108
113
  def public_key_pem(self) -> str:
109
114
  """
110
- The public key, in PEM (RFC 1421).
115
+ The public key, 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()`.
111
116
  """
112
117
  return pulumi.get(self, "public_key_pem")
113
118
 
@@ -138,16 +143,17 @@ def get_public_key(private_key_openssh: Optional[str] = None,
138
143
 
139
144
  ## Example Usage
140
145
 
141
- <!--Start PulumiCodeChooser -->
142
146
  ```python
143
147
  import pulumi
148
+ import pulumi_std as std
144
149
  import pulumi_tls as tls
145
150
 
146
151
  ed25519_example = tls.PrivateKey("ed25519-example", algorithm="ED25519")
152
+ # Public key loaded from a terraform-generated private key, using the PEM (RFC 1421) format
147
153
  private_key_pem_example = tls.get_public_key_output(private_key_pem=ed25519_example.private_key_pem)
148
- private_key_openssh_example = tls.get_public_key(private_key_openssh=(lambda path: open(path).read())("~/.ssh/id_rsa_rfc4716"))
154
+ # Public key loaded from filesystem, using the Open SSH (RFC 4716) format
155
+ private_key_openssh_example = tls.get_public_key(private_key_openssh=std.file(input="~/.ssh/id_rsa_rfc4716").result)
149
156
  ```
150
- <!--End PulumiCodeChooser -->
151
157
 
152
158
 
153
159
  :param str private_key_openssh: The private key (in [OpenSSH PEM (RFC 4716)](https://datatracker.ietf.org/doc/html/rfc4716) format) to extract the public key from. This is *mutually exclusive* with `private_key_pem`. Currently-supported algorithms for keys are: `RSA`, `ECDSA`, `ED25519`.
@@ -168,12 +174,9 @@ def get_public_key(private_key_openssh: Optional[str] = None,
168
174
  public_key_fingerprint_sha256=pulumi.get(__ret__, 'public_key_fingerprint_sha256'),
169
175
  public_key_openssh=pulumi.get(__ret__, 'public_key_openssh'),
170
176
  public_key_pem=pulumi.get(__ret__, 'public_key_pem'))
171
-
172
-
173
- @_utilities.lift_output_func(get_public_key)
174
177
  def get_public_key_output(private_key_openssh: Optional[pulumi.Input[Optional[str]]] = None,
175
178
  private_key_pem: Optional[pulumi.Input[Optional[str]]] = None,
176
- opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetPublicKeyResult]:
179
+ opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetPublicKeyResult]:
177
180
  """
178
181
  Get a public key from a PEM-encoded private key.
179
182
 
@@ -181,19 +184,33 @@ def get_public_key_output(private_key_openssh: Optional[pulumi.Input[Optional[st
181
184
 
182
185
  ## Example Usage
183
186
 
184
- <!--Start PulumiCodeChooser -->
185
187
  ```python
186
188
  import pulumi
189
+ import pulumi_std as std
187
190
  import pulumi_tls as tls
188
191
 
189
192
  ed25519_example = tls.PrivateKey("ed25519-example", algorithm="ED25519")
193
+ # Public key loaded from a terraform-generated private key, using the PEM (RFC 1421) format
190
194
  private_key_pem_example = tls.get_public_key_output(private_key_pem=ed25519_example.private_key_pem)
191
- private_key_openssh_example = tls.get_public_key(private_key_openssh=(lambda path: open(path).read())("~/.ssh/id_rsa_rfc4716"))
195
+ # Public key loaded from filesystem, using the Open SSH (RFC 4716) format
196
+ private_key_openssh_example = tls.get_public_key(private_key_openssh=std.file(input="~/.ssh/id_rsa_rfc4716").result)
192
197
  ```
193
- <!--End PulumiCodeChooser -->
194
198
 
195
199
 
196
200
  :param str private_key_openssh: The private key (in [OpenSSH PEM (RFC 4716)](https://datatracker.ietf.org/doc/html/rfc4716) format) to extract the public key from. This is *mutually exclusive* with `private_key_pem`. Currently-supported algorithms for keys are: `RSA`, `ECDSA`, `ED25519`.
197
201
  :param str private_key_pem: The private key (in [PEM (RFC 1421)](https://datatracker.ietf.org/doc/html/rfc1421) format) to extract the public key from. This is *mutually exclusive* with `private_key_openssh`. Currently-supported algorithms for keys are: `RSA`, `ECDSA`, `ED25519`.
198
202
  """
199
- ...
203
+ __args__ = dict()
204
+ __args__['privateKeyOpenssh'] = private_key_openssh
205
+ __args__['privateKeyPem'] = private_key_pem
206
+ opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
207
+ __ret__ = pulumi.runtime.invoke_output('tls:index/getPublicKey:getPublicKey', __args__, opts=opts, typ=GetPublicKeyResult)
208
+ return __ret__.apply(lambda __response__: GetPublicKeyResult(
209
+ algorithm=pulumi.get(__response__, 'algorithm'),
210
+ id=pulumi.get(__response__, 'id'),
211
+ private_key_openssh=pulumi.get(__response__, 'private_key_openssh'),
212
+ private_key_pem=pulumi.get(__response__, 'private_key_pem'),
213
+ public_key_fingerprint_md5=pulumi.get(__response__, 'public_key_fingerprint_md5'),
214
+ public_key_fingerprint_sha256=pulumi.get(__response__, 'public_key_fingerprint_sha256'),
215
+ public_key_openssh=pulumi.get(__response__, 'public_key_openssh'),
216
+ public_key_pem=pulumi.get(__response__, 'public_key_pem')))
@@ -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__ = ['LocallySignedCertArgs', 'LocallySignedCert']
@@ -29,11 +34,6 @@ class LocallySignedCertArgs:
29
34
  :param pulumi.Input[str] ca_private_key_pem: Private key of the Certificate Authority (CA) used to sign the certificate, in [PEM (RFC 1421)](https://datatracker.ietf.org/doc/html/rfc1421) format.
30
35
  :param pulumi.Input[str] cert_request_pem: Certificate request data in [PEM (RFC 1421)](https://datatracker.ietf.org/doc/html/rfc1421) format.
31
36
  :param pulumi.Input[int] validity_period_hours: Number of hours, after initial issuing, that the certificate will remain valid for.
32
- :param pulumi.Input[int] early_renewal_hours: The resource will consider the certificate to have expired the given number of hours before its actual expiry time. This
33
- can be useful to deploy an updated certificate in advance of the expiration of the current certificate. However, the old
34
- certificate remains valid until its true expiration time, since this resource does not (and cannot) support certificate
35
- revocation. Also, this advance update can only be performed should the Terraform configuration be applied during the
36
- early renewal period. (default: `0`)
37
37
  :param pulumi.Input[bool] is_ca_certificate: Is the generated certificate representing a Certificate Authority (CA) (default: `false`).
38
38
  :param pulumi.Input[bool] set_subject_key_id: Should the generated certificate include a [subject key identifier](https://datatracker.ietf.org/doc/html/rfc5280#section-4.2.1.2) (default: `false`).
39
39
  """
@@ -112,13 +112,6 @@ class LocallySignedCertArgs:
112
112
  @property
113
113
  @pulumi.getter(name="earlyRenewalHours")
114
114
  def early_renewal_hours(self) -> Optional[pulumi.Input[int]]:
115
- """
116
- The resource will consider the certificate to have expired the given number of hours before its actual expiry time. This
117
- can be useful to deploy an updated certificate in advance of the expiration of the current certificate. However, the old
118
- certificate remains valid until its true expiration time, since this resource does not (and cannot) support certificate
119
- revocation. Also, this advance update can only be performed should the Terraform configuration be applied during the
120
- early renewal period. (default: `0`)
121
- """
122
115
  return pulumi.get(self, "early_renewal_hours")
123
116
 
124
117
  @early_renewal_hours.setter
@@ -172,13 +165,8 @@ class _LocallySignedCertState:
172
165
  :param pulumi.Input[str] ca_cert_pem: Certificate data of the Certificate Authority (CA) in [PEM (RFC 1421)](https://datatracker.ietf.org/doc/html/rfc1421) format.
173
166
  :param pulumi.Input[str] ca_key_algorithm: Name of the algorithm used when generating the private key provided in `ca_private_key_pem`.
174
167
  :param pulumi.Input[str] ca_private_key_pem: Private key of the Certificate Authority (CA) used to sign the certificate, in [PEM (RFC 1421)](https://datatracker.ietf.org/doc/html/rfc1421) format.
175
- :param pulumi.Input[str] cert_pem: Certificate data in PEM (RFC 1421).
168
+ :param pulumi.Input[str] cert_pem: Certificate 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()`.
176
169
  :param pulumi.Input[str] cert_request_pem: Certificate request data in [PEM (RFC 1421)](https://datatracker.ietf.org/doc/html/rfc1421) format.
177
- :param pulumi.Input[int] early_renewal_hours: The resource will consider the certificate to have expired the given number of hours before its actual expiry time. This
178
- can be useful to deploy an updated certificate in advance of the expiration of the current certificate. However, the old
179
- certificate remains valid until its true expiration time, since this resource does not (and cannot) support certificate
180
- revocation. Also, this advance update can only be performed should the Terraform configuration be applied during the
181
- early renewal period. (default: `0`)
182
170
  :param pulumi.Input[bool] is_ca_certificate: Is the generated certificate representing a Certificate Authority (CA) (default: `false`).
183
171
  :param pulumi.Input[bool] ready_for_renewal: Is the certificate either expired (i.e. beyond the `validity_period_hours`) or ready for an early renewal (i.e. within the `early_renewal_hours`)?
184
172
  :param pulumi.Input[bool] set_subject_key_id: Should the generated certificate include a [subject key identifier](https://datatracker.ietf.org/doc/html/rfc5280#section-4.2.1.2) (default: `false`).
@@ -265,7 +253,7 @@ class _LocallySignedCertState:
265
253
  @pulumi.getter(name="certPem")
266
254
  def cert_pem(self) -> Optional[pulumi.Input[str]]:
267
255
  """
268
- Certificate data in PEM (RFC 1421).
256
+ Certificate 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()`.
269
257
  """
270
258
  return pulumi.get(self, "cert_pem")
271
259
 
@@ -288,13 +276,6 @@ class _LocallySignedCertState:
288
276
  @property
289
277
  @pulumi.getter(name="earlyRenewalHours")
290
278
  def early_renewal_hours(self) -> Optional[pulumi.Input[int]]:
291
- """
292
- The resource will consider the certificate to have expired the given number of hours before its actual expiry time. This
293
- can be useful to deploy an updated certificate in advance of the expiration of the current certificate. However, the old
294
- certificate remains valid until its true expiration time, since this resource does not (and cannot) support certificate
295
- revocation. Also, this advance update can only be performed should the Terraform configuration be applied during the
296
- early renewal period. (default: `0`)
297
- """
298
279
  return pulumi.get(self, "early_renewal_hours")
299
280
 
300
281
  @early_renewal_hours.setter
@@ -396,11 +377,6 @@ class LocallySignedCert(pulumi.CustomResource):
396
377
  :param pulumi.Input[str] ca_cert_pem: Certificate data of the Certificate Authority (CA) in [PEM (RFC 1421)](https://datatracker.ietf.org/doc/html/rfc1421) format.
397
378
  :param pulumi.Input[str] ca_private_key_pem: Private key of the Certificate Authority (CA) used to sign the certificate, in [PEM (RFC 1421)](https://datatracker.ietf.org/doc/html/rfc1421) format.
398
379
  :param pulumi.Input[str] cert_request_pem: Certificate request data in [PEM (RFC 1421)](https://datatracker.ietf.org/doc/html/rfc1421) format.
399
- :param pulumi.Input[int] early_renewal_hours: The resource will consider the certificate to have expired the given number of hours before its actual expiry time. This
400
- can be useful to deploy an updated certificate in advance of the expiration of the current certificate. However, the old
401
- certificate remains valid until its true expiration time, since this resource does not (and cannot) support certificate
402
- revocation. Also, this advance update can only be performed should the Terraform configuration be applied during the
403
- early renewal period. (default: `0`)
404
380
  :param pulumi.Input[bool] is_ca_certificate: Is the generated certificate representing a Certificate Authority (CA) (default: `false`).
405
381
  :param pulumi.Input[bool] set_subject_key_id: Should the generated certificate include a [subject key identifier](https://datatracker.ietf.org/doc/html/rfc5280#section-4.2.1.2) (default: `false`).
406
382
  :param pulumi.Input[int] validity_period_hours: Number of hours, after initial issuing, that the certificate will remain valid for.
@@ -504,13 +480,8 @@ class LocallySignedCert(pulumi.CustomResource):
504
480
  :param pulumi.Input[str] ca_cert_pem: Certificate data of the Certificate Authority (CA) in [PEM (RFC 1421)](https://datatracker.ietf.org/doc/html/rfc1421) format.
505
481
  :param pulumi.Input[str] ca_key_algorithm: Name of the algorithm used when generating the private key provided in `ca_private_key_pem`.
506
482
  :param pulumi.Input[str] ca_private_key_pem: Private key of the Certificate Authority (CA) used to sign the certificate, in [PEM (RFC 1421)](https://datatracker.ietf.org/doc/html/rfc1421) format.
507
- :param pulumi.Input[str] cert_pem: Certificate data in PEM (RFC 1421).
483
+ :param pulumi.Input[str] cert_pem: Certificate 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()`.
508
484
  :param pulumi.Input[str] cert_request_pem: Certificate request data in [PEM (RFC 1421)](https://datatracker.ietf.org/doc/html/rfc1421) format.
509
- :param pulumi.Input[int] early_renewal_hours: The resource will consider the certificate to have expired the given number of hours before its actual expiry time. This
510
- can be useful to deploy an updated certificate in advance of the expiration of the current certificate. However, the old
511
- certificate remains valid until its true expiration time, since this resource does not (and cannot) support certificate
512
- revocation. Also, this advance update can only be performed should the Terraform configuration be applied during the
513
- early renewal period. (default: `0`)
514
485
  :param pulumi.Input[bool] is_ca_certificate: Is the generated certificate representing a Certificate Authority (CA) (default: `false`).
515
486
  :param pulumi.Input[bool] ready_for_renewal: Is the certificate either expired (i.e. beyond the `validity_period_hours`) or ready for an early renewal (i.e. within the `early_renewal_hours`)?
516
487
  :param pulumi.Input[bool] set_subject_key_id: Should the generated certificate include a [subject key identifier](https://datatracker.ietf.org/doc/html/rfc5280#section-4.2.1.2) (default: `false`).
@@ -573,7 +544,7 @@ class LocallySignedCert(pulumi.CustomResource):
573
544
  @pulumi.getter(name="certPem")
574
545
  def cert_pem(self) -> pulumi.Output[str]:
575
546
  """
576
- Certificate data in PEM (RFC 1421).
547
+ Certificate 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()`.
577
548
  """
578
549
  return pulumi.get(self, "cert_pem")
579
550
 
@@ -588,13 +559,6 @@ class LocallySignedCert(pulumi.CustomResource):
588
559
  @property
589
560
  @pulumi.getter(name="earlyRenewalHours")
590
561
  def early_renewal_hours(self) -> pulumi.Output[int]:
591
- """
592
- The resource will consider the certificate to have expired the given number of hours before its actual expiry time. This
593
- can be useful to deploy an updated certificate in advance of the expiration of the current certificate. However, the old
594
- certificate remains valid until its true expiration time, since this resource does not (and cannot) support certificate
595
- revocation. Also, this advance update can only be performed should the Terraform configuration be applied during the
596
- early renewal period. (default: `0`)
597
- """
598
562
  return pulumi.get(self, "early_renewal_hours")
599
563
 
600
564
  @property
pulumi_tls/outputs.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__ = [
@@ -310,7 +315,7 @@ class GetCertificateCertificateResult(dict):
310
315
  subject: str,
311
316
  version: int):
312
317
  """
313
- :param str cert_pem: Certificate data in PEM (RFC 1421).
318
+ :param str cert_pem: Certificate 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()`.
314
319
  :param bool is_ca: `true` if the certificate is of a CA (Certificate Authority).
315
320
  :param str issuer: Who verified and signed the certificate, roughly following [RFC2253](https://tools.ietf.org/html/rfc2253).
316
321
  :param str not_after: The time until which the certificate is invalid, as an [RFC3339](https://tools.ietf.org/html/rfc3339) timestamp.
@@ -339,7 +344,7 @@ class GetCertificateCertificateResult(dict):
339
344
  @pulumi.getter(name="certPem")
340
345
  def cert_pem(self) -> str:
341
346
  """
342
- Certificate data in PEM (RFC 1421).
347
+ Certificate 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
348
  """
344
349
  return pulumi.get(self, "cert_pem")
345
350
 
pulumi_tls/private_key.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__ = ['PrivateKeyArgs', 'PrivateKey']
@@ -88,8 +93,8 @@ class _PrivateKeyState:
88
93
  :param pulumi.Input[str] private_key_pem_pkcs8: Private key data in [PKCS#8 PEM (RFC 5208)](https://datatracker.ietf.org/doc/html/rfc5208) format.
89
94
  :param pulumi.Input[str] public_key_fingerprint_md5: The fingerprint of the public key data in OpenSSH MD5 hash format, e.g. `aa:bb:cc:...`. Only available if the selected private key format is compatible, similarly to `public_key_openssh` and the ECDSA P224 limitations.
90
95
  :param pulumi.Input[str] public_key_fingerprint_sha256: The fingerprint of the public key data in OpenSSH SHA256 hash format, e.g. `SHA256:...`. Only available if the selected private key format is compatible, similarly to `public_key_openssh` and the ECDSA P224 limitations.
91
- :param pulumi.Input[str] public_key_openssh: The public key data in "Authorized Keys".
92
- :param pulumi.Input[str] public_key_pem: Public key data in PEM (RFC 1421).
96
+ :param pulumi.Input[str] public_key_openssh: The public key data in ["Authorized Keys"](https://www.ssh.com/academy/ssh/authorized_keys/openssh#format-of-the-authorized-keys-file) format. This is not populated for `ECDSA` with curve `P224`, as it is not supported. **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()`.
97
+ :param pulumi.Input[str] public_key_pem: Public key 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()`.
93
98
  :param pulumi.Input[int] rsa_bits: When `algorithm` is `RSA`, the size of the generated RSA key, in bits (default: `2048`).
94
99
  """
95
100
  if algorithm is not None:
@@ -201,7 +206,7 @@ class _PrivateKeyState:
201
206
  @pulumi.getter(name="publicKeyOpenssh")
202
207
  def public_key_openssh(self) -> Optional[pulumi.Input[str]]:
203
208
  """
204
- The public key data in "Authorized Keys".
209
+ The public key data in ["Authorized Keys"](https://www.ssh.com/academy/ssh/authorized_keys/openssh#format-of-the-authorized-keys-file) format. This is not populated for `ECDSA` with curve `P224`, as it is not supported. **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()`.
205
210
  """
206
211
  return pulumi.get(self, "public_key_openssh")
207
212
 
@@ -213,7 +218,7 @@ class _PrivateKeyState:
213
218
  @pulumi.getter(name="publicKeyPem")
214
219
  def public_key_pem(self) -> Optional[pulumi.Input[str]]:
215
220
  """
216
- Public key data in PEM (RFC 1421).
221
+ Public key 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()`.
217
222
  """
218
223
  return pulumi.get(self, "public_key_pem")
219
224
 
@@ -334,8 +339,8 @@ class PrivateKey(pulumi.CustomResource):
334
339
  :param pulumi.Input[str] private_key_pem_pkcs8: Private key data in [PKCS#8 PEM (RFC 5208)](https://datatracker.ietf.org/doc/html/rfc5208) format.
335
340
  :param pulumi.Input[str] public_key_fingerprint_md5: The fingerprint of the public key data in OpenSSH MD5 hash format, e.g. `aa:bb:cc:...`. Only available if the selected private key format is compatible, similarly to `public_key_openssh` and the ECDSA P224 limitations.
336
341
  :param pulumi.Input[str] public_key_fingerprint_sha256: The fingerprint of the public key data in OpenSSH SHA256 hash format, e.g. `SHA256:...`. Only available if the selected private key format is compatible, similarly to `public_key_openssh` and the ECDSA P224 limitations.
337
- :param pulumi.Input[str] public_key_openssh: The public key data in "Authorized Keys".
338
- :param pulumi.Input[str] public_key_pem: Public key data in PEM (RFC 1421).
342
+ :param pulumi.Input[str] public_key_openssh: The public key data in ["Authorized Keys"](https://www.ssh.com/academy/ssh/authorized_keys/openssh#format-of-the-authorized-keys-file) format. This is not populated for `ECDSA` with curve `P224`, as it is not supported. **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
+ :param pulumi.Input[str] public_key_pem: Public key 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()`.
339
344
  :param pulumi.Input[int] rsa_bits: When `algorithm` is `RSA`, the size of the generated RSA key, in bits (default: `2048`).
340
345
  """
341
346
  opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
@@ -414,7 +419,7 @@ class PrivateKey(pulumi.CustomResource):
414
419
  @pulumi.getter(name="publicKeyOpenssh")
415
420
  def public_key_openssh(self) -> pulumi.Output[str]:
416
421
  """
417
- The public key data in "Authorized Keys".
422
+ The public key data in ["Authorized Keys"](https://www.ssh.com/academy/ssh/authorized_keys/openssh#format-of-the-authorized-keys-file) format. This is not populated for `ECDSA` with curve `P224`, as it is not supported. **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()`.
418
423
  """
419
424
  return pulumi.get(self, "public_key_openssh")
420
425
 
@@ -422,7 +427,7 @@ class PrivateKey(pulumi.CustomResource):
422
427
  @pulumi.getter(name="publicKeyPem")
423
428
  def public_key_pem(self) -> pulumi.Output[str]:
424
429
  """
425
- Public key data in PEM (RFC 1421).
430
+ Public key 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()`.
426
431
  """
427
432
  return pulumi.get(self, "public_key_pem")
428
433
 
pulumi_tls/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
 
@@ -41,7 +46,7 @@ class Provider(pulumi.ProviderResource):
41
46
  def __init__(__self__,
42
47
  resource_name: str,
43
48
  opts: Optional[pulumi.ResourceOptions] = None,
44
- proxy: Optional[pulumi.Input[pulumi.InputType['ProviderProxyArgs']]] = None,
49
+ proxy: Optional[pulumi.Input[Union['ProviderProxyArgs', 'ProviderProxyArgsDict']]] = None,
45
50
  __props__=None):
46
51
  """
47
52
  The provider type for the tls package. By default, resources use package-wide configuration
@@ -51,7 +56,7 @@ class Provider(pulumi.ProviderResource):
51
56
 
52
57
  :param str resource_name: The name of the resource.
53
58
  :param pulumi.ResourceOptions opts: Options for the resource.
54
- :param pulumi.Input[pulumi.InputType['ProviderProxyArgs']] proxy: Proxy used by resources and data sources that connect to external endpoints.
59
+ :param pulumi.Input[Union['ProviderProxyArgs', 'ProviderProxyArgsDict']] proxy: Proxy used by resources and data sources that connect to external endpoints.
55
60
  """
56
61
  ...
57
62
  @overload
@@ -80,7 +85,7 @@ class Provider(pulumi.ProviderResource):
80
85
  def _internal_init(__self__,
81
86
  resource_name: str,
82
87
  opts: Optional[pulumi.ResourceOptions] = None,
83
- proxy: Optional[pulumi.Input[pulumi.InputType['ProviderProxyArgs']]] = None,
88
+ proxy: Optional[pulumi.Input[Union['ProviderProxyArgs', 'ProviderProxyArgsDict']]] = None,
84
89
  __props__=None):
85
90
  opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
86
91
  if not isinstance(opts, pulumi.ResourceOptions):
@@ -1,4 +1,5 @@
1
1
  {
2
2
  "resource": true,
3
- "name": "tls"
3
+ "name": "tls",
4
+ "version": "5.1.0-alpha.1736835965"
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
  from . import outputs
12
17
  from ._inputs import *
@@ -30,14 +35,9 @@ class SelfSignedCertArgs:
30
35
  """
31
36
  The set of arguments for constructing a SelfSignedCert resource.
32
37
  :param pulumi.Input[Sequence[pulumi.Input[str]]] allowed_uses: List of key usages allowed for the issued certificate. Values are defined in [RFC 5280](https://datatracker.ietf.org/doc/html/rfc5280) and combine flags defined by both [Key Usages](https://datatracker.ietf.org/doc/html/rfc5280#section-4.2.1.3) and [Extended Key Usages](https://datatracker.ietf.org/doc/html/rfc5280#section-4.2.1.12). Accepted values: `any_extended`, `cert_signing`, `client_auth`, `code_signing`, `content_commitment`, `crl_signing`, `data_encipherment`, `decipher_only`, `digital_signature`, `email_protection`, `encipher_only`, `ipsec_end_system`, `ipsec_tunnel`, `ipsec_user`, `key_agreement`, `key_encipherment`, `microsoft_commercial_code_signing`, `microsoft_kernel_code_signing`, `microsoft_server_gated_crypto`, `netscape_server_gated_crypto`, `ocsp_signing`, `server_auth`, `timestamping`.
33
- :param pulumi.Input[str] private_key_pem: Private key in PEM (RFC 1421) interpolation function.
38
+ :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.
34
39
  :param pulumi.Input[int] validity_period_hours: Number of hours, after initial issuing, that the certificate will remain valid for.
35
40
  :param pulumi.Input[Sequence[pulumi.Input[str]]] dns_names: List of DNS names for which a certificate is being requested (i.e. certificate subjects).
36
- :param pulumi.Input[int] early_renewal_hours: The resource will consider the certificate to have expired the given number of hours before its actual expiry time. This
37
- can be useful to deploy an updated certificate in advance of the expiration of the current certificate. However, the old
38
- certificate remains valid until its true expiration time, since this resource does not (and cannot) support certificate
39
- revocation. Also, this advance update can only be performed should the Terraform configuration be applied during the
40
- early renewal period. (default: `0`)
41
41
  :param pulumi.Input[Sequence[pulumi.Input[str]]] ip_addresses: List of IP addresses for which a certificate is being requested (i.e. certificate subjects).
42
42
  :param pulumi.Input[bool] is_ca_certificate: Is the generated certificate representing a Certificate Authority (CA) (default: `false`).
43
43
  :param pulumi.Input[bool] set_authority_key_id: Should the generated certificate include an [authority key identifier](https://datatracker.ietf.org/doc/html/rfc5280#section-4.2.1.1): for self-signed certificates this is the same value as the [subject key identifier](https://datatracker.ietf.org/doc/html/rfc5280#section-4.2.1.2) (default: `false`).
@@ -81,7 +81,7 @@ class SelfSignedCertArgs:
81
81
  @pulumi.getter(name="privateKeyPem")
82
82
  def private_key_pem(self) -> pulumi.Input[str]:
83
83
  """
84
- Private key in PEM (RFC 1421) interpolation function.
84
+ 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.
85
85
  """
86
86
  return pulumi.get(self, "private_key_pem")
87
87
 
@@ -116,13 +116,6 @@ class SelfSignedCertArgs:
116
116
  @property
117
117
  @pulumi.getter(name="earlyRenewalHours")
118
118
  def early_renewal_hours(self) -> Optional[pulumi.Input[int]]:
119
- """
120
- The resource will consider the certificate to have expired the given number of hours before its actual expiry time. This
121
- can be useful to deploy an updated certificate in advance of the expiration of the current certificate. However, the old
122
- certificate remains valid until its true expiration time, since this resource does not (and cannot) support certificate
123
- revocation. Also, this advance update can only be performed should the Terraform configuration be applied during the
124
- early renewal period. (default: `0`)
125
- """
126
119
  return pulumi.get(self, "early_renewal_hours")
127
120
 
128
121
  @early_renewal_hours.setter
@@ -224,17 +217,12 @@ class _SelfSignedCertState:
224
217
  """
225
218
  Input properties used for looking up and filtering SelfSignedCert resources.
226
219
  :param pulumi.Input[Sequence[pulumi.Input[str]]] allowed_uses: List of key usages allowed for the issued certificate. Values are defined in [RFC 5280](https://datatracker.ietf.org/doc/html/rfc5280) and combine flags defined by both [Key Usages](https://datatracker.ietf.org/doc/html/rfc5280#section-4.2.1.3) and [Extended Key Usages](https://datatracker.ietf.org/doc/html/rfc5280#section-4.2.1.12). Accepted values: `any_extended`, `cert_signing`, `client_auth`, `code_signing`, `content_commitment`, `crl_signing`, `data_encipherment`, `decipher_only`, `digital_signature`, `email_protection`, `encipher_only`, `ipsec_end_system`, `ipsec_tunnel`, `ipsec_user`, `key_agreement`, `key_encipherment`, `microsoft_commercial_code_signing`, `microsoft_kernel_code_signing`, `microsoft_server_gated_crypto`, `netscape_server_gated_crypto`, `ocsp_signing`, `server_auth`, `timestamping`.
227
- :param pulumi.Input[str] cert_pem: Certificate data in PEM (RFC 1421).
220
+ :param pulumi.Input[str] cert_pem: Certificate 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()`.
228
221
  :param pulumi.Input[Sequence[pulumi.Input[str]]] dns_names: List of DNS names for which a certificate is being requested (i.e. certificate subjects).
229
- :param pulumi.Input[int] early_renewal_hours: The resource will consider the certificate to have expired the given number of hours before its actual expiry time. This
230
- can be useful to deploy an updated certificate in advance of the expiration of the current certificate. However, the old
231
- certificate remains valid until its true expiration time, since this resource does not (and cannot) support certificate
232
- revocation. Also, this advance update can only be performed should the Terraform configuration be applied during the
233
- early renewal period. (default: `0`)
234
222
  :param pulumi.Input[Sequence[pulumi.Input[str]]] ip_addresses: List of IP addresses for which a certificate is being requested (i.e. certificate subjects).
235
223
  :param pulumi.Input[bool] is_ca_certificate: Is the generated certificate representing a Certificate Authority (CA) (default: `false`).
236
224
  :param pulumi.Input[str] key_algorithm: Name of the algorithm used when generating the private key provided in `private_key_pem`.
237
- :param pulumi.Input[str] private_key_pem: Private key in PEM (RFC 1421) interpolation function.
225
+ :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.
238
226
  :param pulumi.Input[bool] ready_for_renewal: Is the certificate either expired (i.e. beyond the `validity_period_hours`) or ready for an early renewal (i.e. within the `early_renewal_hours`)?
239
227
  :param pulumi.Input[bool] set_authority_key_id: Should the generated certificate include an [authority key identifier](https://datatracker.ietf.org/doc/html/rfc5280#section-4.2.1.1): for self-signed certificates this is the same value as the [subject key identifier](https://datatracker.ietf.org/doc/html/rfc5280#section-4.2.1.2) (default: `false`).
240
228
  :param pulumi.Input[bool] set_subject_key_id: Should the generated certificate include a [subject key identifier](https://datatracker.ietf.org/doc/html/rfc5280#section-4.2.1.2) (default: `false`).
@@ -293,7 +281,7 @@ class _SelfSignedCertState:
293
281
  @pulumi.getter(name="certPem")
294
282
  def cert_pem(self) -> Optional[pulumi.Input[str]]:
295
283
  """
296
- Certificate data in PEM (RFC 1421).
284
+ Certificate 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()`.
297
285
  """
298
286
  return pulumi.get(self, "cert_pem")
299
287
 
@@ -316,13 +304,6 @@ class _SelfSignedCertState:
316
304
  @property
317
305
  @pulumi.getter(name="earlyRenewalHours")
318
306
  def early_renewal_hours(self) -> Optional[pulumi.Input[int]]:
319
- """
320
- The resource will consider the certificate to have expired the given number of hours before its actual expiry time. This
321
- can be useful to deploy an updated certificate in advance of the expiration of the current certificate. However, the old
322
- certificate remains valid until its true expiration time, since this resource does not (and cannot) support certificate
323
- revocation. Also, this advance update can only be performed should the Terraform configuration be applied during the
324
- early renewal period. (default: `0`)
325
- """
326
307
  return pulumi.get(self, "early_renewal_hours")
327
308
 
328
309
  @early_renewal_hours.setter
@@ -369,7 +350,7 @@ class _SelfSignedCertState:
369
350
  @pulumi.getter(name="privateKeyPem")
370
351
  def private_key_pem(self) -> Optional[pulumi.Input[str]]:
371
352
  """
372
- Private key in PEM (RFC 1421) interpolation function.
353
+ 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.
373
354
  """
374
355
  return pulumi.get(self, "private_key_pem")
375
356
 
@@ -487,7 +468,7 @@ class SelfSignedCert(pulumi.CustomResource):
487
468
  private_key_pem: Optional[pulumi.Input[str]] = None,
488
469
  set_authority_key_id: Optional[pulumi.Input[bool]] = None,
489
470
  set_subject_key_id: Optional[pulumi.Input[bool]] = None,
490
- subject: Optional[pulumi.Input[pulumi.InputType['SelfSignedCertSubjectArgs']]] = None,
471
+ subject: Optional[pulumi.Input[Union['SelfSignedCertSubjectArgs', 'SelfSignedCertSubjectArgsDict']]] = None,
491
472
  uris: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
492
473
  validity_period_hours: Optional[pulumi.Input[int]] = None,
493
474
  __props__=None):
@@ -497,17 +478,12 @@ class SelfSignedCert(pulumi.CustomResource):
497
478
  :param pulumi.ResourceOptions opts: Options for the resource.
498
479
  :param pulumi.Input[Sequence[pulumi.Input[str]]] allowed_uses: List of key usages allowed for the issued certificate. Values are defined in [RFC 5280](https://datatracker.ietf.org/doc/html/rfc5280) and combine flags defined by both [Key Usages](https://datatracker.ietf.org/doc/html/rfc5280#section-4.2.1.3) and [Extended Key Usages](https://datatracker.ietf.org/doc/html/rfc5280#section-4.2.1.12). Accepted values: `any_extended`, `cert_signing`, `client_auth`, `code_signing`, `content_commitment`, `crl_signing`, `data_encipherment`, `decipher_only`, `digital_signature`, `email_protection`, `encipher_only`, `ipsec_end_system`, `ipsec_tunnel`, `ipsec_user`, `key_agreement`, `key_encipherment`, `microsoft_commercial_code_signing`, `microsoft_kernel_code_signing`, `microsoft_server_gated_crypto`, `netscape_server_gated_crypto`, `ocsp_signing`, `server_auth`, `timestamping`.
499
480
  :param pulumi.Input[Sequence[pulumi.Input[str]]] dns_names: List of DNS names for which a certificate is being requested (i.e. certificate subjects).
500
- :param pulumi.Input[int] early_renewal_hours: The resource will consider the certificate to have expired the given number of hours before its actual expiry time. This
501
- can be useful to deploy an updated certificate in advance of the expiration of the current certificate. However, the old
502
- certificate remains valid until its true expiration time, since this resource does not (and cannot) support certificate
503
- revocation. Also, this advance update can only be performed should the Terraform configuration be applied during the
504
- early renewal period. (default: `0`)
505
481
  :param pulumi.Input[Sequence[pulumi.Input[str]]] ip_addresses: List of IP addresses for which a certificate is being requested (i.e. certificate subjects).
506
482
  :param pulumi.Input[bool] is_ca_certificate: Is the generated certificate representing a Certificate Authority (CA) (default: `false`).
507
- :param pulumi.Input[str] private_key_pem: Private key in PEM (RFC 1421) interpolation function.
483
+ :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.
508
484
  :param pulumi.Input[bool] set_authority_key_id: Should the generated certificate include an [authority key identifier](https://datatracker.ietf.org/doc/html/rfc5280#section-4.2.1.1): for self-signed certificates this is the same value as the [subject key identifier](https://datatracker.ietf.org/doc/html/rfc5280#section-4.2.1.2) (default: `false`).
509
485
  :param pulumi.Input[bool] set_subject_key_id: Should the generated certificate include a [subject key identifier](https://datatracker.ietf.org/doc/html/rfc5280#section-4.2.1.2) (default: `false`).
510
- :param pulumi.Input[pulumi.InputType['SelfSignedCertSubjectArgs']] 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.
486
+ :param pulumi.Input[Union['SelfSignedCertSubjectArgs', 'SelfSignedCertSubjectArgsDict']] 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.
511
487
  :param pulumi.Input[Sequence[pulumi.Input[str]]] uris: List of URIs for which a certificate is being requested (i.e. certificate subjects).
512
488
  :param pulumi.Input[int] validity_period_hours: Number of hours, after initial issuing, that the certificate will remain valid for.
513
489
  """
@@ -542,7 +518,7 @@ class SelfSignedCert(pulumi.CustomResource):
542
518
  private_key_pem: Optional[pulumi.Input[str]] = None,
543
519
  set_authority_key_id: Optional[pulumi.Input[bool]] = None,
544
520
  set_subject_key_id: Optional[pulumi.Input[bool]] = None,
545
- subject: Optional[pulumi.Input[pulumi.InputType['SelfSignedCertSubjectArgs']]] = None,
521
+ subject: Optional[pulumi.Input[Union['SelfSignedCertSubjectArgs', 'SelfSignedCertSubjectArgsDict']]] = None,
546
522
  uris: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
547
523
  validity_period_hours: Optional[pulumi.Input[int]] = None,
548
524
  __props__=None):
@@ -599,7 +575,7 @@ class SelfSignedCert(pulumi.CustomResource):
599
575
  ready_for_renewal: Optional[pulumi.Input[bool]] = None,
600
576
  set_authority_key_id: Optional[pulumi.Input[bool]] = None,
601
577
  set_subject_key_id: Optional[pulumi.Input[bool]] = None,
602
- subject: Optional[pulumi.Input[pulumi.InputType['SelfSignedCertSubjectArgs']]] = None,
578
+ subject: Optional[pulumi.Input[Union['SelfSignedCertSubjectArgs', 'SelfSignedCertSubjectArgsDict']]] = None,
603
579
  uris: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
604
580
  validity_end_time: Optional[pulumi.Input[str]] = None,
605
581
  validity_period_hours: Optional[pulumi.Input[int]] = None,
@@ -612,21 +588,16 @@ class SelfSignedCert(pulumi.CustomResource):
612
588
  :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
613
589
  :param pulumi.ResourceOptions opts: Options for the resource.
614
590
  :param pulumi.Input[Sequence[pulumi.Input[str]]] allowed_uses: List of key usages allowed for the issued certificate. Values are defined in [RFC 5280](https://datatracker.ietf.org/doc/html/rfc5280) and combine flags defined by both [Key Usages](https://datatracker.ietf.org/doc/html/rfc5280#section-4.2.1.3) and [Extended Key Usages](https://datatracker.ietf.org/doc/html/rfc5280#section-4.2.1.12). Accepted values: `any_extended`, `cert_signing`, `client_auth`, `code_signing`, `content_commitment`, `crl_signing`, `data_encipherment`, `decipher_only`, `digital_signature`, `email_protection`, `encipher_only`, `ipsec_end_system`, `ipsec_tunnel`, `ipsec_user`, `key_agreement`, `key_encipherment`, `microsoft_commercial_code_signing`, `microsoft_kernel_code_signing`, `microsoft_server_gated_crypto`, `netscape_server_gated_crypto`, `ocsp_signing`, `server_auth`, `timestamping`.
615
- :param pulumi.Input[str] cert_pem: Certificate data in PEM (RFC 1421).
591
+ :param pulumi.Input[str] cert_pem: Certificate 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()`.
616
592
  :param pulumi.Input[Sequence[pulumi.Input[str]]] dns_names: List of DNS names for which a certificate is being requested (i.e. certificate subjects).
617
- :param pulumi.Input[int] early_renewal_hours: The resource will consider the certificate to have expired the given number of hours before its actual expiry time. This
618
- can be useful to deploy an updated certificate in advance of the expiration of the current certificate. However, the old
619
- certificate remains valid until its true expiration time, since this resource does not (and cannot) support certificate
620
- revocation. Also, this advance update can only be performed should the Terraform configuration be applied during the
621
- early renewal period. (default: `0`)
622
593
  :param pulumi.Input[Sequence[pulumi.Input[str]]] ip_addresses: List of IP addresses for which a certificate is being requested (i.e. certificate subjects).
623
594
  :param pulumi.Input[bool] is_ca_certificate: Is the generated certificate representing a Certificate Authority (CA) (default: `false`).
624
595
  :param pulumi.Input[str] key_algorithm: Name of the algorithm used when generating the private key provided in `private_key_pem`.
625
- :param pulumi.Input[str] private_key_pem: Private key in PEM (RFC 1421) interpolation function.
596
+ :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.
626
597
  :param pulumi.Input[bool] ready_for_renewal: Is the certificate either expired (i.e. beyond the `validity_period_hours`) or ready for an early renewal (i.e. within the `early_renewal_hours`)?
627
598
  :param pulumi.Input[bool] set_authority_key_id: Should the generated certificate include an [authority key identifier](https://datatracker.ietf.org/doc/html/rfc5280#section-4.2.1.1): for self-signed certificates this is the same value as the [subject key identifier](https://datatracker.ietf.org/doc/html/rfc5280#section-4.2.1.2) (default: `false`).
628
599
  :param pulumi.Input[bool] set_subject_key_id: Should the generated certificate include a [subject key identifier](https://datatracker.ietf.org/doc/html/rfc5280#section-4.2.1.2) (default: `false`).
629
- :param pulumi.Input[pulumi.InputType['SelfSignedCertSubjectArgs']] 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.
600
+ :param pulumi.Input[Union['SelfSignedCertSubjectArgs', 'SelfSignedCertSubjectArgsDict']] 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.
630
601
  :param pulumi.Input[Sequence[pulumi.Input[str]]] uris: List of URIs for which a certificate is being requested (i.e. certificate subjects).
631
602
  :param pulumi.Input[str] validity_end_time: The time until which the certificate is invalid, expressed as an [RFC3339](https://tools.ietf.org/html/rfc3339) timestamp.
632
603
  :param pulumi.Input[int] validity_period_hours: Number of hours, after initial issuing, that the certificate will remain valid for.
@@ -666,7 +637,7 @@ class SelfSignedCert(pulumi.CustomResource):
666
637
  @pulumi.getter(name="certPem")
667
638
  def cert_pem(self) -> pulumi.Output[str]:
668
639
  """
669
- Certificate data in PEM (RFC 1421).
640
+ Certificate 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()`.
670
641
  """
671
642
  return pulumi.get(self, "cert_pem")
672
643
 
@@ -681,13 +652,6 @@ class SelfSignedCert(pulumi.CustomResource):
681
652
  @property
682
653
  @pulumi.getter(name="earlyRenewalHours")
683
654
  def early_renewal_hours(self) -> pulumi.Output[int]:
684
- """
685
- The resource will consider the certificate to have expired the given number of hours before its actual expiry time. This
686
- can be useful to deploy an updated certificate in advance of the expiration of the current certificate. However, the old
687
- certificate remains valid until its true expiration time, since this resource does not (and cannot) support certificate
688
- revocation. Also, this advance update can only be performed should the Terraform configuration be applied during the
689
- early renewal period. (default: `0`)
690
- """
691
655
  return pulumi.get(self, "early_renewal_hours")
692
656
 
693
657
  @property
@@ -718,7 +682,7 @@ class SelfSignedCert(pulumi.CustomResource):
718
682
  @pulumi.getter(name="privateKeyPem")
719
683
  def private_key_pem(self) -> pulumi.Output[str]:
720
684
  """
721
- Private key in PEM (RFC 1421) interpolation function.
685
+ 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.
722
686
  """
723
687
  return pulumi.get(self, "private_key_pem")
724
688
 
@@ -1,16 +1,17 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.2
2
2
  Name: pulumi_tls
3
- Version: 5.1.0a1710160622
3
+ Version: 5.1.0a1736835965
4
4
  Summary: A Pulumi package to create TLS resources in Pulumi programs.
5
5
  License: Apache-2.0
6
6
  Project-URL: Homepage, https://pulumi.io
7
7
  Project-URL: Repository, https://github.com/pulumi/pulumi-tls
8
8
  Keywords: pulumi,tls
9
- Requires-Python: >=3.8
9
+ Requires-Python: >=3.9
10
10
  Description-Content-Type: text/markdown
11
- Requires-Dist: parver >=0.2.1
12
- Requires-Dist: pulumi <4.0.0,>=3.0.0
13
- Requires-Dist: semver >=2.8.1
11
+ Requires-Dist: parver>=0.2.1
12
+ Requires-Dist: pulumi<4.0.0,>=3.142.0
13
+ Requires-Dist: semver>=2.8.1
14
+ Requires-Dist: typing-extensions>=4.11; python_version < "3.11"
14
15
 
15
16
  [![Actions Status](https://github.com/pulumi/pulumi-tls/workflows/master/badge.svg)](https://github.com/pulumi/pulumi-tls/actions)
16
17
  [![Slack](http://www.pulumi.com/images/docs/badges/slack.svg)](https://slack.pulumi.com)
@@ -0,0 +1,21 @@
1
+ pulumi_tls/__init__.py,sha256=Fk7hjyRIMx42E0iGoNp4d238SBG6PAUxDzvlIndTJck,1523
2
+ pulumi_tls/_inputs.py,sha256=PQxQn6BDHAQwXF-qvyfIdMAbsixOzmzKym5ANi10wIU,17876
3
+ pulumi_tls/_utilities.py,sha256=-gxwnD6__OYdSf8jJgJijNuu-UHUwi5pJ1H7-eIHDhg,10504
4
+ pulumi_tls/cert_request.py,sha256=R5fJPBIewv1tIx7nqOUj9PL9tmxeFgShMmYXeVeXE1U,23043
5
+ pulumi_tls/get_certificate.py,sha256=kbPamAhcT_bW9nL37bHxj48D0LzdLWwSiw4ir5nW7L4,6376
6
+ pulumi_tls/get_public_key.py,sha256=ndZDPFICnzqvcDl1DDfiimtn5ZRJXEb8YHHQGNxCSQI,12375
7
+ pulumi_tls/locally_signed_cert.py,sha256=WStwmPMzTraFvM9hUJ3PQHoug62hkhM_YESzugEtGdU,38405
8
+ pulumi_tls/outputs.py,sha256=9Q2gHOiTBCNAhI7p6J9POXrctjp3avC-89hVlfo8ia4,15751
9
+ pulumi_tls/private_key.py,sha256=isK_78l0Hhm_OKaOq546gDPTkwFDZG_VP7thH1e_YSI,25535
10
+ pulumi_tls/provider.py,sha256=kozHxv6INMJ2zUDv2d8TQmJGr7uFVHPoieddw0M3iPo,4787
11
+ pulumi_tls/pulumi-plugin.json,sha256=P3FcRMRSubBgnjZ4XjYL0iJPFkOikn4_GRT3xfo746g,79
12
+ pulumi_tls/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
13
+ pulumi_tls/self_signed_cert.py,sha256=pocshB1RvT2FaDlcKRasq8sbT5lW1-XNkWKwoRttFQw,48642
14
+ pulumi_tls/config/__init__.py,sha256=cfY0smRZD3fDVc93ZIAxEl_IM2pynmXB52n3Ahzi030,285
15
+ pulumi_tls/config/__init__.pyi,sha256=fnsZ-Suvu3YbJRGB-tjcmI1mjoq0AzdZXUZHXdbnNCk,648
16
+ pulumi_tls/config/outputs.py,sha256=zzpj6leD9hzCMjZXOO0Pz53IdeDBUZbiPjr-HrSicWw,2827
17
+ pulumi_tls/config/vars.py,sha256=IIfZBN532Qh-2Z1O5ANibIraohA229yGyNP03b-PmNY,835
18
+ pulumi_tls-5.1.0a1736835965.dist-info/METADATA,sha256=Ib0FB0P72os5Azog_cqczyc1jgjGLVktAld-K1tktBM,2490
19
+ pulumi_tls-5.1.0a1736835965.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
20
+ pulumi_tls-5.1.0a1736835965.dist-info/top_level.txt,sha256=w0yJOTuCUb1BpNsSTm0FJZPucueobFIfzPGzjYklx1U,11
21
+ pulumi_tls-5.1.0a1736835965.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.42.0)
2
+ Generator: setuptools (75.8.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1,21 +0,0 @@
1
- pulumi_tls/__init__.py,sha256=Fk7hjyRIMx42E0iGoNp4d238SBG6PAUxDzvlIndTJck,1523
2
- pulumi_tls/_inputs.py,sha256=KVpnu-mvOyzrpVpdrb90KBWDhaN_i67rIkdR3d8qJlw,14351
3
- pulumi_tls/_utilities.py,sha256=b6gJn0IIeM1t6Q7EVjqw3yhuGyP-uENQhtL5yp7aHR8,9248
4
- pulumi_tls/cert_request.py,sha256=rHD9oA0Whh3gsRzgAdCpFj0cRjB1jEaIeyJZ-OIAUJs,20547
5
- pulumi_tls/get_certificate.py,sha256=lUy1OLl5oA8GbQnOeVy6F7Sfd8pWSgCnZ1g9gV9Jr30,5540
6
- pulumi_tls/get_public_key.py,sha256=xi9De65moARolWkV91G1zAtJMjhRFTn4e9U6sl7ftzg,10105
7
- pulumi_tls/locally_signed_cert.py,sha256=4NvYD8E-YpLQ-rIncp90RC7FDtJoMSYkoOjmuXHm2zM,41155
8
- pulumi_tls/outputs.py,sha256=3Yjo4iKbFD4gJQhCGGWwocpCAuS3V-d6nvQ9lseB3Qg,14909
9
- pulumi_tls/private_key.py,sha256=l7YLkUhXlp-lLWST8p34AoR0zMI_Dj2qRlQEf8sjMVg,22201
10
- pulumi_tls/provider.py,sha256=GAIHbL660HmefqI6S05zA77JT1tVZVpxwSKnONjxqIM,4571
11
- pulumi_tls/pulumi-plugin.json,sha256=2ADHqCdf08udDO1YqVdDR76NxjDeYeP-Cs1zG4KQmnk,40
12
- pulumi_tls/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
13
- pulumi_tls/self_signed_cert.py,sha256=t_MyOK6xCSMMiBeCcNZEKdafd5w903BTKt5ufrfKl4M,50239
14
- pulumi_tls/config/__init__.py,sha256=cfY0smRZD3fDVc93ZIAxEl_IM2pynmXB52n3Ahzi030,285
15
- pulumi_tls/config/__init__.pyi,sha256=kaPJpeRs8A7zNA-3MY-QL0zyxMV0oqUrYrsLj3HpqEg,474
16
- pulumi_tls/config/outputs.py,sha256=SYfBlhKnqFeIaEpQLFgdBfABD4pzTkAlZTuwWWsGQ4A,2653
17
- pulumi_tls/config/vars.py,sha256=wTZ5QbW-pH76tJ5PSA2zAFV4bPdtC5pmxQsV7jRd3c8,661
18
- pulumi_tls-5.1.0a1710160622.dist-info/METADATA,sha256=vTvP6InEU4Xzkfb8HaNiXUD3ht-7Wcdtrihkacad6wE,2427
19
- pulumi_tls-5.1.0a1710160622.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
20
- pulumi_tls-5.1.0a1710160622.dist-info/top_level.txt,sha256=w0yJOTuCUb1BpNsSTm0FJZPucueobFIfzPGzjYklx1U,11
21
- pulumi_tls-5.1.0a1710160622.dist-info/RECORD,,