@pulumi/tls 5.0.2 → 5.0.3

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.
package/certRequest.d.ts CHANGED
@@ -4,21 +4,21 @@ import * as outputs from "./types/output";
4
4
  /**
5
5
  * ## Example Usage
6
6
  *
7
- * <!--Start PulumiCodeChooser -->
8
7
  * ```typescript
9
8
  * import * as pulumi from "@pulumi/pulumi";
10
- * import * as fs from "fs";
9
+ * import * as std from "@pulumi/std";
11
10
  * import * as tls from "@pulumi/tls";
12
11
  *
13
12
  * const example = new tls.CertRequest("example", {
14
- * privateKeyPem: fs.readFileSync("private_key.pem", "utf8"),
13
+ * privateKeyPem: std.file({
14
+ * input: "private_key.pem",
15
+ * }).then(invoke => invoke.result),
15
16
  * subject: {
16
17
  * commonName: "example.com",
17
18
  * organization: "ACME Examples, Inc",
18
19
  * },
19
20
  * });
20
21
  * ```
21
- * <!--End PulumiCodeChooser -->
22
22
  */
23
23
  export declare class CertRequest extends pulumi.CustomResource {
24
24
  /**
package/certRequest.js CHANGED
@@ -8,21 +8,21 @@ const utilities = require("./utilities");
8
8
  /**
9
9
  * ## Example Usage
10
10
  *
11
- * <!--Start PulumiCodeChooser -->
12
11
  * ```typescript
13
12
  * import * as pulumi from "@pulumi/pulumi";
14
- * import * as fs from "fs";
13
+ * import * as std from "@pulumi/std";
15
14
  * import * as tls from "@pulumi/tls";
16
15
  *
17
16
  * const example = new tls.CertRequest("example", {
18
- * privateKeyPem: fs.readFileSync("private_key.pem", "utf8"),
17
+ * privateKeyPem: std.file({
18
+ * input: "private_key.pem",
19
+ * }).then(invoke => invoke.result),
19
20
  * subject: {
20
21
  * commonName: "example.com",
21
22
  * organization: "ACME Examples, Inc",
22
23
  * },
23
24
  * });
24
25
  * ```
25
- * <!--End PulumiCodeChooser -->
26
26
  */
27
27
  class CertRequest extends pulumi.CustomResource {
28
28
  /**
package/getPublicKey.d.ts CHANGED
@@ -6,21 +6,23 @@ import * as pulumi from "@pulumi/pulumi";
6
6
  *
7
7
  * ## Example Usage
8
8
  *
9
- * <!--Start PulumiCodeChooser -->
10
9
  * ```typescript
11
10
  * import * as pulumi from "@pulumi/pulumi";
12
- * import * as fs from "fs";
11
+ * import * as std from "@pulumi/std";
13
12
  * import * as tls from "@pulumi/tls";
14
13
  *
15
14
  * const ed25519_example = new tls.PrivateKey("ed25519-example", {algorithm: "ED25519"});
15
+ * // Public key loaded from a terraform-generated private key, using the PEM (RFC 1421) format
16
16
  * const privateKeyPem-example = tls.getPublicKeyOutput({
17
17
  * privateKeyPem: ed25519_example.privateKeyPem,
18
18
  * });
19
- * const privateKeyOpenssh-example = tls.getPublicKey({
20
- * privateKeyOpenssh: fs.readFileSync("~/.ssh/id_rsa_rfc4716", "utf8"),
21
- * });
19
+ * // Public key loaded from filesystem, using the Open SSH (RFC 4716) format
20
+ * const privateKeyOpenssh-example = std.file({
21
+ * input: "~/.ssh/id_rsa_rfc4716",
22
+ * }).then(invoke => tls.getPublicKey({
23
+ * privateKeyOpenssh: invoke.result,
24
+ * }));
22
25
  * ```
23
- * <!--End PulumiCodeChooser -->
24
26
  */
25
27
  export declare function getPublicKey(args?: GetPublicKeyArgs, opts?: pulumi.InvokeOptions): Promise<GetPublicKeyResult>;
26
28
  /**
@@ -80,21 +82,23 @@ export interface GetPublicKeyResult {
80
82
  *
81
83
  * ## Example Usage
82
84
  *
83
- * <!--Start PulumiCodeChooser -->
84
85
  * ```typescript
85
86
  * import * as pulumi from "@pulumi/pulumi";
86
- * import * as fs from "fs";
87
+ * import * as std from "@pulumi/std";
87
88
  * import * as tls from "@pulumi/tls";
88
89
  *
89
90
  * const ed25519_example = new tls.PrivateKey("ed25519-example", {algorithm: "ED25519"});
91
+ * // Public key loaded from a terraform-generated private key, using the PEM (RFC 1421) format
90
92
  * const privateKeyPem-example = tls.getPublicKeyOutput({
91
93
  * privateKeyPem: ed25519_example.privateKeyPem,
92
94
  * });
93
- * const privateKeyOpenssh-example = tls.getPublicKey({
94
- * privateKeyOpenssh: fs.readFileSync("~/.ssh/id_rsa_rfc4716", "utf8"),
95
- * });
95
+ * // Public key loaded from filesystem, using the Open SSH (RFC 4716) format
96
+ * const privateKeyOpenssh-example = std.file({
97
+ * input: "~/.ssh/id_rsa_rfc4716",
98
+ * }).then(invoke => tls.getPublicKey({
99
+ * privateKeyOpenssh: invoke.result,
100
+ * }));
96
101
  * ```
97
- * <!--End PulumiCodeChooser -->
98
102
  */
99
103
  export declare function getPublicKeyOutput(args?: GetPublicKeyOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output<GetPublicKeyResult>;
100
104
  /**
package/getPublicKey.js CHANGED
@@ -12,21 +12,23 @@ const utilities = require("./utilities");
12
12
  *
13
13
  * ## Example Usage
14
14
  *
15
- * <!--Start PulumiCodeChooser -->
16
15
  * ```typescript
17
16
  * import * as pulumi from "@pulumi/pulumi";
18
- * import * as fs from "fs";
17
+ * import * as std from "@pulumi/std";
19
18
  * import * as tls from "@pulumi/tls";
20
19
  *
21
20
  * const ed25519_example = new tls.PrivateKey("ed25519-example", {algorithm: "ED25519"});
21
+ * // Public key loaded from a terraform-generated private key, using the PEM (RFC 1421) format
22
22
  * const privateKeyPem-example = tls.getPublicKeyOutput({
23
23
  * privateKeyPem: ed25519_example.privateKeyPem,
24
24
  * });
25
- * const privateKeyOpenssh-example = tls.getPublicKey({
26
- * privateKeyOpenssh: fs.readFileSync("~/.ssh/id_rsa_rfc4716", "utf8"),
27
- * });
25
+ * // Public key loaded from filesystem, using the Open SSH (RFC 4716) format
26
+ * const privateKeyOpenssh-example = std.file({
27
+ * input: "~/.ssh/id_rsa_rfc4716",
28
+ * }).then(invoke => tls.getPublicKey({
29
+ * privateKeyOpenssh: invoke.result,
30
+ * }));
28
31
  * ```
29
- * <!--End PulumiCodeChooser -->
30
32
  */
31
33
  function getPublicKey(args, opts) {
32
34
  args = args || {};
@@ -44,21 +46,23 @@ exports.getPublicKey = getPublicKey;
44
46
  *
45
47
  * ## Example Usage
46
48
  *
47
- * <!--Start PulumiCodeChooser -->
48
49
  * ```typescript
49
50
  * import * as pulumi from "@pulumi/pulumi";
50
- * import * as fs from "fs";
51
+ * import * as std from "@pulumi/std";
51
52
  * import * as tls from "@pulumi/tls";
52
53
  *
53
54
  * const ed25519_example = new tls.PrivateKey("ed25519-example", {algorithm: "ED25519"});
55
+ * // Public key loaded from a terraform-generated private key, using the PEM (RFC 1421) format
54
56
  * const privateKeyPem-example = tls.getPublicKeyOutput({
55
57
  * privateKeyPem: ed25519_example.privateKeyPem,
56
58
  * });
57
- * const privateKeyOpenssh-example = tls.getPublicKey({
58
- * privateKeyOpenssh: fs.readFileSync("~/.ssh/id_rsa_rfc4716", "utf8"),
59
- * });
59
+ * // Public key loaded from filesystem, using the Open SSH (RFC 4716) format
60
+ * const privateKeyOpenssh-example = std.file({
61
+ * input: "~/.ssh/id_rsa_rfc4716",
62
+ * }).then(invoke => tls.getPublicKey({
63
+ * privateKeyOpenssh: invoke.result,
64
+ * }));
60
65
  * ```
61
- * <!--End PulumiCodeChooser -->
62
66
  */
63
67
  function getPublicKeyOutput(args, opts) {
64
68
  return pulumi.output(args).apply((a) => getPublicKey(a, opts));
@@ -1 +1 @@
1
- {"version":3,"file":"getPublicKey.js","sourceRoot":"","sources":["../getPublicKey.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AACzC,yCAAyC;AAEzC;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,SAAgB,YAAY,CAAC,IAAuB,EAAE,IAA2B;IAC7E,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;IAElB,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,IAAI,IAAI,EAAE,CAAC,CAAC;IACzE,OAAO,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,qCAAqC,EAAE;QAChE,mBAAmB,EAAE,IAAI,CAAC,iBAAiB;QAC3C,eAAe,EAAE,IAAI,CAAC,aAAa;KACtC,EAAE,IAAI,CAAC,CAAC;AACb,CAAC;AARD,oCAQC;AAqDD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,SAAgB,kBAAkB,CAAC,IAA6B,EAAE,IAA2B;IACzF,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,CAAM,EAAE,EAAE,CAAC,YAAY,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAA;AACvE,CAAC;AAFD,gDAEC"}
1
+ {"version":3,"file":"getPublicKey.js","sourceRoot":"","sources":["../getPublicKey.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AACzC,yCAAyC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,SAAgB,YAAY,CAAC,IAAuB,EAAE,IAA2B;IAC7E,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;IAElB,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,IAAI,IAAI,EAAE,CAAC,CAAC;IACzE,OAAO,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,qCAAqC,EAAE;QAChE,mBAAmB,EAAE,IAAI,CAAC,iBAAiB;QAC3C,eAAe,EAAE,IAAI,CAAC,aAAa;KACtC,EAAE,IAAI,CAAC,CAAC;AACb,CAAC;AARD,oCAQC;AAqDD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,SAAgB,kBAAkB,CAAC,IAA6B,EAAE,IAA2B;IACzF,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,CAAM,EAAE,EAAE,CAAC,YAAY,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAA;AACvE,CAAC;AAFD,gDAEC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pulumi/tls",
3
- "version": "v5.0.2",
3
+ "version": "v5.0.3",
4
4
  "description": "A Pulumi package to create TLS resources in Pulumi programs.",
5
5
  "keywords": [
6
6
  "pulumi",