pulumi-tls 5.0.0a0__tar.gz → 5.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of pulumi-tls might be problematic. Click here for more details.

Files changed (30) hide show
  1. {pulumi_tls-5.0.0a0 → pulumi_tls-5.1.0}/PKG-INFO +9 -7
  2. {pulumi_tls-5.0.0a0 → pulumi_tls-5.1.0}/pulumi_tls/_inputs.py +131 -0
  3. {pulumi_tls-5.0.0a0 → pulumi_tls-5.1.0}/pulumi_tls/_utilities.py +83 -6
  4. {pulumi_tls-5.0.0a0 → pulumi_tls-5.1.0}/pulumi_tls/cert_request.py +33 -56
  5. pulumi_tls-5.1.0/pulumi_tls/config/__init__.pyi +22 -0
  6. {pulumi_tls-5.0.0a0 → pulumi_tls-5.1.0}/pulumi_tls/config/outputs.py +23 -0
  7. {pulumi_tls-5.0.0a0 → pulumi_tls-5.1.0}/pulumi_tls/config/vars.py +5 -0
  8. {pulumi_tls-5.0.0a0 → pulumi_tls-5.1.0}/pulumi_tls/get_certificate.py +23 -10
  9. {pulumi_tls-5.0.0a0 → pulumi_tls-5.1.0}/pulumi_tls/get_public_key.py +42 -15
  10. {pulumi_tls-5.0.0a0 → pulumi_tls-5.1.0}/pulumi_tls/locally_signed_cert.py +9 -61
  11. {pulumi_tls-5.0.0a0 → pulumi_tls-5.1.0}/pulumi_tls/outputs.py +9 -0
  12. {pulumi_tls-5.0.0a0 → pulumi_tls-5.1.0}/pulumi_tls/private_key.py +13 -48
  13. {pulumi_tls-5.0.0a0 → pulumi_tls-5.1.0}/pulumi_tls/provider.py +8 -3
  14. pulumi_tls-5.1.0/pulumi_tls/pulumi-plugin.json +5 -0
  15. {pulumi_tls-5.0.0a0 → pulumi_tls-5.1.0}/pulumi_tls/self_signed_cert.py +21 -87
  16. {pulumi_tls-5.0.0a0 → pulumi_tls-5.1.0}/pulumi_tls.egg-info/PKG-INFO +10 -8
  17. {pulumi_tls-5.0.0a0 → pulumi_tls-5.1.0}/pulumi_tls.egg-info/SOURCES.txt +2 -2
  18. pulumi_tls-5.1.0/pulumi_tls.egg-info/requires.txt +6 -0
  19. pulumi_tls-5.1.0/pyproject.toml +22 -0
  20. pulumi_tls-5.0.0a0/pulumi_tls/pulumi-plugin.json +0 -4
  21. pulumi_tls-5.0.0a0/pulumi_tls.egg-info/not-zip-safe +0 -1
  22. pulumi_tls-5.0.0a0/pulumi_tls.egg-info/requires.txt +0 -3
  23. pulumi_tls-5.0.0a0/setup.py +0 -66
  24. {pulumi_tls-5.0.0a0 → pulumi_tls-5.1.0}/README.md +0 -0
  25. {pulumi_tls-5.0.0a0 → pulumi_tls-5.1.0}/pulumi_tls/__init__.py +0 -0
  26. {pulumi_tls-5.0.0a0 → pulumi_tls-5.1.0}/pulumi_tls/config/__init__.py +0 -0
  27. {pulumi_tls-5.0.0a0 → pulumi_tls-5.1.0}/pulumi_tls/py.typed +0 -0
  28. {pulumi_tls-5.0.0a0 → pulumi_tls-5.1.0}/pulumi_tls.egg-info/dependency_links.txt +0 -0
  29. {pulumi_tls-5.0.0a0 → pulumi_tls-5.1.0}/pulumi_tls.egg-info/top_level.txt +0 -0
  30. {pulumi_tls-5.0.0a0 → pulumi_tls-5.1.0}/setup.cfg +0 -0
@@ -1,13 +1,17 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.2
2
2
  Name: pulumi_tls
3
- Version: 5.0.0a0
3
+ Version: 5.1.0
4
4
  Summary: A Pulumi package to create TLS resources in Pulumi programs.
5
- Home-page: https://pulumi.io
6
5
  License: Apache-2.0
6
+ Project-URL: Homepage, https://pulumi.io
7
7
  Project-URL: Repository, https://github.com/pulumi/pulumi-tls
8
- Keywords: pulumi tls
9
- Platform: UNKNOWN
8
+ Keywords: pulumi,tls
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.142.0
13
+ Requires-Dist: semver>=2.8.1
14
+ Requires-Dist: typing-extensions>=4.11; python_version < "3.11"
11
15
 
12
16
  [![Actions Status](https://github.com/pulumi/pulumi-tls/workflows/master/badge.svg)](https://github.com/pulumi/pulumi-tls/actions)
13
17
  [![Slack](http://www.pulumi.com/images/docs/badges/slack.svg)](https://slack.pulumi.com)
@@ -63,5 +67,3 @@ and interact closely with TLS resources.
63
67
 
64
68
 
65
69
  For further information, please visit [the TLS provider docs](https://www.pulumi.com/docs/intro/cloud-providers/tls) or for detailed reference documentation, please visit [the API docs](https://www.pulumi.com/docs/reference/pkg/tls).
66
-
67
-
@@ -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__, *,
@@ -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,9 +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)](https://datatracker.ietf.org/doc/html/rfc1421) format, that the certificate will belong
27
- to. This can be read from a separate file using the [`file`](https://www.terraform.io/language/functions/file)
28
- interpolation function. Only an irreversible secure hash of the private key will be stored in the Terraform state.
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.
29
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).
30
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).
31
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.
@@ -45,9 +48,7 @@ class CertRequestArgs:
45
48
  @pulumi.getter(name="privateKeyPem")
46
49
  def private_key_pem(self) -> pulumi.Input[str]:
47
50
  """
48
- Private key in [PEM (RFC 1421)](https://datatracker.ietf.org/doc/html/rfc1421) format, that the certificate will belong
49
- to. This can be read from a separate file using the [`file`](https://www.terraform.io/language/functions/file)
50
- interpolation function. Only an irreversible secure hash of the private key will be stored in the Terraform state.
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.
51
52
  """
52
53
  return pulumi.get(self, "private_key_pem")
53
54
 
@@ -116,17 +117,11 @@ class _CertRequestState:
116
117
  uris: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None):
117
118
  """
118
119
  Input properties used for looking up and filtering CertRequest resources.
119
- :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
120
- [underlying](https://pkg.go.dev/encoding/pem#Encode)
121
- [libraries](https://pkg.go.dev/golang.org/x/crypto/ssh#MarshalAuthorizedKey) that generate this value append a `\\n` at
122
- the end of the PEM. In case this disrupts your use case, we recommend using
123
- [`trimspace()`](https://www.terraform.io/language/functions/trimspace).
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()`.
124
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).
125
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).
126
123
  :param pulumi.Input[str] key_algorithm: Name of the algorithm used when generating the private key provided in `private_key_pem`.
127
- :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
128
- to. This can be read from a separate file using the [`file`](https://www.terraform.io/language/functions/file)
129
- interpolation function. Only an irreversible secure hash of the private key will be stored in the Terraform state.
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.
130
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.
131
126
  :param pulumi.Input[Sequence[pulumi.Input[str]]] uris: List of URIs for which a certificate is being requested (i.e. certificate subjects).
132
127
  """
@@ -149,11 +144,7 @@ class _CertRequestState:
149
144
  @pulumi.getter(name="certRequestPem")
150
145
  def cert_request_pem(self) -> Optional[pulumi.Input[str]]:
151
146
  """
152
- The certificate request data in [PEM (RFC 1421)](https://datatracker.ietf.org/doc/html/rfc1421) format. **NOTE**: the
153
- [underlying](https://pkg.go.dev/encoding/pem#Encode)
154
- [libraries](https://pkg.go.dev/golang.org/x/crypto/ssh#MarshalAuthorizedKey) that generate this value append a `\\n` at
155
- the end of the PEM. In case this disrupts your use case, we recommend using
156
- [`trimspace()`](https://www.terraform.io/language/functions/trimspace).
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()`.
157
148
  """
158
149
  return pulumi.get(self, "cert_request_pem")
159
150
 
@@ -201,9 +192,7 @@ class _CertRequestState:
201
192
  @pulumi.getter(name="privateKeyPem")
202
193
  def private_key_pem(self) -> Optional[pulumi.Input[str]]:
203
194
  """
204
- Private key in [PEM (RFC 1421)](https://datatracker.ietf.org/doc/html/rfc1421) format, that the certificate will belong
205
- to. This can be read from a separate file using the [`file`](https://www.terraform.io/language/functions/file)
206
- interpolation function. Only an irreversible secure hash of the private key will be stored in the Terraform state.
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.
207
196
  """
208
197
  return pulumi.get(self, "private_key_pem")
209
198
 
@@ -244,7 +233,7 @@ class CertRequest(pulumi.CustomResource):
244
233
  dns_names: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
245
234
  ip_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
246
235
  private_key_pem: Optional[pulumi.Input[str]] = None,
247
- subject: Optional[pulumi.Input[pulumi.InputType['CertRequestSubjectArgs']]] = None,
236
+ subject: Optional[pulumi.Input[Union['CertRequestSubjectArgs', 'CertRequestSubjectArgsDict']]] = None,
248
237
  uris: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
249
238
  __props__=None):
250
239
  """
@@ -252,24 +241,23 @@ class CertRequest(pulumi.CustomResource):
252
241
 
253
242
  ```python
254
243
  import pulumi
244
+ import pulumi_std as std
255
245
  import pulumi_tls as tls
256
246
 
257
247
  example = tls.CertRequest("example",
258
- private_key_pem=(lambda path: open(path).read())("private_key.pem"),
259
- subject=tls.CertRequestSubjectArgs(
260
- common_name="example.com",
261
- organization="ACME Examples, Inc",
262
- ))
248
+ private_key_pem=std.file(input="private_key.pem").result,
249
+ subject={
250
+ "common_name": "example.com",
251
+ "organization": "ACME Examples, Inc",
252
+ })
263
253
  ```
264
254
 
265
255
  :param str resource_name: The name of the resource.
266
256
  :param pulumi.ResourceOptions opts: Options for the resource.
267
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).
268
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).
269
- :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
270
- to. This can be read from a separate file using the [`file`](https://www.terraform.io/language/functions/file)
271
- interpolation function. Only an irreversible secure hash of the private key will be stored in the Terraform state.
272
- :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.
273
261
  :param pulumi.Input[Sequence[pulumi.Input[str]]] uris: List of URIs for which a certificate is being requested (i.e. certificate subjects).
274
262
  """
275
263
  ...
@@ -283,14 +271,15 @@ class CertRequest(pulumi.CustomResource):
283
271
 
284
272
  ```python
285
273
  import pulumi
274
+ import pulumi_std as std
286
275
  import pulumi_tls as tls
287
276
 
288
277
  example = tls.CertRequest("example",
289
- private_key_pem=(lambda path: open(path).read())("private_key.pem"),
290
- subject=tls.CertRequestSubjectArgs(
291
- common_name="example.com",
292
- organization="ACME Examples, Inc",
293
- ))
278
+ private_key_pem=std.file(input="private_key.pem").result,
279
+ subject={
280
+ "common_name": "example.com",
281
+ "organization": "ACME Examples, Inc",
282
+ })
294
283
  ```
295
284
 
296
285
  :param str resource_name: The name of the resource.
@@ -311,7 +300,7 @@ class CertRequest(pulumi.CustomResource):
311
300
  dns_names: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
312
301
  ip_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
313
302
  private_key_pem: Optional[pulumi.Input[str]] = None,
314
- subject: Optional[pulumi.Input[pulumi.InputType['CertRequestSubjectArgs']]] = None,
303
+ subject: Optional[pulumi.Input[Union['CertRequestSubjectArgs', 'CertRequestSubjectArgsDict']]] = None,
315
304
  uris: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
316
305
  __props__=None):
317
306
  opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
@@ -348,7 +337,7 @@ class CertRequest(pulumi.CustomResource):
348
337
  ip_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
349
338
  key_algorithm: Optional[pulumi.Input[str]] = None,
350
339
  private_key_pem: Optional[pulumi.Input[str]] = None,
351
- subject: Optional[pulumi.Input[pulumi.InputType['CertRequestSubjectArgs']]] = None,
340
+ subject: Optional[pulumi.Input[Union['CertRequestSubjectArgs', 'CertRequestSubjectArgsDict']]] = None,
352
341
  uris: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None) -> 'CertRequest':
353
342
  """
354
343
  Get an existing CertRequest resource's state with the given name, id, and optional extra
@@ -357,18 +346,12 @@ class CertRequest(pulumi.CustomResource):
357
346
  :param str resource_name: The unique name of the resulting resource.
358
347
  :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
359
348
  :param pulumi.ResourceOptions opts: Options for the resource.
360
- :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
361
- [underlying](https://pkg.go.dev/encoding/pem#Encode)
362
- [libraries](https://pkg.go.dev/golang.org/x/crypto/ssh#MarshalAuthorizedKey) that generate this value append a `\\n` at
363
- the end of the PEM. In case this disrupts your use case, we recommend using
364
- [`trimspace()`](https://www.terraform.io/language/functions/trimspace).
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()`.
365
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).
366
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).
367
352
  :param pulumi.Input[str] key_algorithm: Name of the algorithm used when generating the private key provided in `private_key_pem`.
368
- :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
369
- to. This can be read from a separate file using the [`file`](https://www.terraform.io/language/functions/file)
370
- interpolation function. Only an irreversible secure hash of the private key will be stored in the Terraform state.
371
- :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.
372
355
  :param pulumi.Input[Sequence[pulumi.Input[str]]] uris: List of URIs for which a certificate is being requested (i.e. certificate subjects).
373
356
  """
374
357
  opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
@@ -388,11 +371,7 @@ class CertRequest(pulumi.CustomResource):
388
371
  @pulumi.getter(name="certRequestPem")
389
372
  def cert_request_pem(self) -> pulumi.Output[str]:
390
373
  """
391
- The certificate request data in [PEM (RFC 1421)](https://datatracker.ietf.org/doc/html/rfc1421) format. **NOTE**: the
392
- [underlying](https://pkg.go.dev/encoding/pem#Encode)
393
- [libraries](https://pkg.go.dev/golang.org/x/crypto/ssh#MarshalAuthorizedKey) that generate this value append a `\\n` at
394
- the end of the PEM. In case this disrupts your use case, we recommend using
395
- [`trimspace()`](https://www.terraform.io/language/functions/trimspace).
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()`.
396
375
  """
397
376
  return pulumi.get(self, "cert_request_pem")
398
377
 
@@ -424,9 +403,7 @@ class CertRequest(pulumi.CustomResource):
424
403
  @pulumi.getter(name="privateKeyPem")
425
404
  def private_key_pem(self) -> pulumi.Output[str]:
426
405
  """
427
- Private key in [PEM (RFC 1421)](https://datatracker.ietf.org/doc/html/rfc1421) format, that the certificate will belong
428
- to. This can be read from a separate file using the [`file`](https://www.terraform.io/language/functions/file)
429
- interpolation function. Only an irreversible secure hash of the private key will be stored in the Terraform state.
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.
430
407
  """
431
408
  return pulumi.get(self, "private_key_pem")
432
409
 
@@ -0,0 +1,22 @@
1
+ # coding=utf-8
2
+ # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
3
+ # *** Do not edit by hand unless you're certain you know what you are doing! ***
4
+
5
+ import copy
6
+ import warnings
7
+ import sys
8
+ import pulumi
9
+ import pulumi.runtime
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
15
+ from .. import _utilities
16
+ from . import outputs
17
+
18
+ proxy: Optional[str]
19
+ """
20
+ Proxy used by resources and data sources that connect to external endpoints.
21
+ """
22
+
@@ -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
 
@@ -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