@pulumi/tls 5.0.0-alpha.0 → 5.0.0-alpha.1766507560

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
@@ -6,11 +6,13 @@ import * as outputs from "./types/output";
6
6
  *
7
7
  * ```typescript
8
8
  * import * as pulumi from "@pulumi/pulumi";
9
- * import * as fs from "fs";
9
+ * import * as std from "@pulumi/std";
10
10
  * import * as tls from "@pulumi/tls";
11
11
  *
12
12
  * const example = new tls.CertRequest("example", {
13
- * privateKeyPem: fs.readFileSync("private_key.pem"),
13
+ * privateKeyPem: std.file({
14
+ * input: "private_key.pem",
15
+ * }).then(invoke => invoke.result),
14
16
  * subject: {
15
17
  * commonName: "example.com",
16
18
  * organization: "ACME Examples, Inc",
@@ -35,11 +37,7 @@ export declare class CertRequest extends pulumi.CustomResource {
35
37
  */
36
38
  static isInstance(obj: any): obj is CertRequest;
37
39
  /**
38
- * The certificate request data in [PEM (RFC 1421)](https://datatracker.ietf.org/doc/html/rfc1421) format. **NOTE**: the
39
- * [underlying](https://pkg.go.dev/encoding/pem#Encode)
40
- * [libraries](https://pkg.go.dev/golang.org/x/crypto/ssh#MarshalAuthorizedKey) that generate this value append a `\n` at
41
- * the end of the PEM. In case this disrupts your use case, we recommend using
42
- * [`trimspace()`](https://www.terraform.io/language/functions/trimspace).
40
+ * 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()`.
43
41
  */
44
42
  readonly certRequestPem: pulumi.Output<string>;
45
43
  /**
@@ -55,9 +53,7 @@ export declare class CertRequest extends pulumi.CustomResource {
55
53
  */
56
54
  readonly keyAlgorithm: pulumi.Output<string>;
57
55
  /**
58
- * Private key in [PEM (RFC 1421)](https://datatracker.ietf.org/doc/html/rfc1421) format, that the certificate will belong
59
- * to. This can be read from a separate file using the [`file`](https://www.terraform.io/language/functions/file)
60
- * interpolation function. Only an irreversible secure hash of the private key will be stored in the Terraform state.
56
+ * 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.
61
57
  */
62
58
  readonly privateKeyPem: pulumi.Output<string>;
63
59
  /**
@@ -82,11 +78,7 @@ export declare class CertRequest extends pulumi.CustomResource {
82
78
  */
83
79
  export interface CertRequestState {
84
80
  /**
85
- * The certificate request data in [PEM (RFC 1421)](https://datatracker.ietf.org/doc/html/rfc1421) format. **NOTE**: the
86
- * [underlying](https://pkg.go.dev/encoding/pem#Encode)
87
- * [libraries](https://pkg.go.dev/golang.org/x/crypto/ssh#MarshalAuthorizedKey) that generate this value append a `\n` at
88
- * the end of the PEM. In case this disrupts your use case, we recommend using
89
- * [`trimspace()`](https://www.terraform.io/language/functions/trimspace).
81
+ * 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()`.
90
82
  */
91
83
  certRequestPem?: pulumi.Input<string>;
92
84
  /**
@@ -102,9 +94,7 @@ export interface CertRequestState {
102
94
  */
103
95
  keyAlgorithm?: pulumi.Input<string>;
104
96
  /**
105
- * Private key in [PEM (RFC 1421)](https://datatracker.ietf.org/doc/html/rfc1421) format, that the certificate will belong
106
- * to. This can be read from a separate file using the [`file`](https://www.terraform.io/language/functions/file)
107
- * interpolation function. Only an irreversible secure hash of the private key will be stored in the Terraform state.
97
+ * 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.
108
98
  */
109
99
  privateKeyPem?: pulumi.Input<string>;
110
100
  /**
@@ -129,9 +119,7 @@ export interface CertRequestArgs {
129
119
  */
130
120
  ipAddresses?: pulumi.Input<pulumi.Input<string>[]>;
131
121
  /**
132
- * Private key in [PEM (RFC 1421)](https://datatracker.ietf.org/doc/html/rfc1421) format, that the certificate will belong
133
- * to. This can be read from a separate file using the [`file`](https://www.terraform.io/language/functions/file)
134
- * interpolation function. Only an irreversible secure hash of the private key will be stored in the Terraform state.
122
+ * 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.
135
123
  */
136
124
  privateKeyPem: pulumi.Input<string>;
137
125
  /**
package/certRequest.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- // *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
2
+ // *** WARNING: this file was generated by pulumi-language-nodejs. ***
3
3
  // *** Do not edit by hand unless you're certain you know what you are doing! ***
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
5
  exports.CertRequest = void 0;
@@ -10,11 +10,13 @@ const utilities = require("./utilities");
10
10
  *
11
11
  * ```typescript
12
12
  * import * as pulumi from "@pulumi/pulumi";
13
- * import * as fs from "fs";
13
+ * import * as std from "@pulumi/std";
14
14
  * import * as tls from "@pulumi/tls";
15
15
  *
16
16
  * const example = new tls.CertRequest("example", {
17
- * privateKeyPem: fs.readFileSync("private_key.pem"),
17
+ * privateKeyPem: std.file({
18
+ * input: "private_key.pem",
19
+ * }).then(invoke => invoke.result),
18
20
  * subject: {
19
21
  * commonName: "example.com",
20
22
  * organization: "ACME Examples, Inc",
@@ -33,7 +35,7 @@ class CertRequest extends pulumi.CustomResource {
33
35
  * @param opts Optional settings to control the behavior of the CustomResource.
34
36
  */
35
37
  static get(name, id, state, opts) {
36
- return new CertRequest(name, state, Object.assign(Object.assign({}, opts), { id: id }));
38
+ return new CertRequest(name, state, { ...opts, id: id });
37
39
  }
38
40
  /**
39
41
  * Returns true if the given object is an instance of CertRequest. This is designed to work even
@@ -50,24 +52,24 @@ class CertRequest extends pulumi.CustomResource {
50
52
  opts = opts || {};
51
53
  if (opts.id) {
52
54
  const state = argsOrState;
53
- resourceInputs["certRequestPem"] = state ? state.certRequestPem : undefined;
54
- resourceInputs["dnsNames"] = state ? state.dnsNames : undefined;
55
- resourceInputs["ipAddresses"] = state ? state.ipAddresses : undefined;
56
- resourceInputs["keyAlgorithm"] = state ? state.keyAlgorithm : undefined;
57
- resourceInputs["privateKeyPem"] = state ? state.privateKeyPem : undefined;
58
- resourceInputs["subject"] = state ? state.subject : undefined;
59
- resourceInputs["uris"] = state ? state.uris : undefined;
55
+ resourceInputs["certRequestPem"] = state?.certRequestPem;
56
+ resourceInputs["dnsNames"] = state?.dnsNames;
57
+ resourceInputs["ipAddresses"] = state?.ipAddresses;
58
+ resourceInputs["keyAlgorithm"] = state?.keyAlgorithm;
59
+ resourceInputs["privateKeyPem"] = state?.privateKeyPem;
60
+ resourceInputs["subject"] = state?.subject;
61
+ resourceInputs["uris"] = state?.uris;
60
62
  }
61
63
  else {
62
64
  const args = argsOrState;
63
- if ((!args || args.privateKeyPem === undefined) && !opts.urn) {
65
+ if (args?.privateKeyPem === undefined && !opts.urn) {
64
66
  throw new Error("Missing required property 'privateKeyPem'");
65
67
  }
66
- resourceInputs["dnsNames"] = args ? args.dnsNames : undefined;
67
- resourceInputs["ipAddresses"] = args ? args.ipAddresses : undefined;
68
- resourceInputs["privateKeyPem"] = (args === null || args === void 0 ? void 0 : args.privateKeyPem) ? pulumi.secret(args.privateKeyPem) : undefined;
69
- resourceInputs["subject"] = args ? args.subject : undefined;
70
- resourceInputs["uris"] = args ? args.uris : undefined;
68
+ resourceInputs["dnsNames"] = args?.dnsNames;
69
+ resourceInputs["ipAddresses"] = args?.ipAddresses;
70
+ resourceInputs["privateKeyPem"] = args?.privateKeyPem ? pulumi.secret(args.privateKeyPem) : undefined;
71
+ resourceInputs["subject"] = args?.subject;
72
+ resourceInputs["uris"] = args?.uris;
71
73
  resourceInputs["certRequestPem"] = undefined /*out*/;
72
74
  resourceInputs["keyAlgorithm"] = undefined /*out*/;
73
75
  }
@@ -1 +1 @@
1
- {"version":3,"file":"certRequest.js","sourceRoot":"","sources":["../certRequest.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AAGzC,yCAAyC;AAEzC;;;;;;;;;;;;;;;;GAgBG;AACH,MAAa,WAAY,SAAQ,MAAM,CAAC,cAAc;IAClD;;;;;;;;OAQG;IACI,MAAM,CAAC,GAAG,CAAC,IAAY,EAAE,EAA2B,EAAE,KAAwB,EAAE,IAAmC;QACtH,OAAO,IAAI,WAAW,CAAC,IAAI,EAAO,KAAK,kCAAO,IAAI,KAAE,EAAE,EAAE,EAAE,IAAG,CAAC;IAClE,CAAC;IAKD;;;OAGG;IACI,MAAM,CAAC,UAAU,CAAC,GAAQ;QAC7B,IAAI,GAAG,KAAK,SAAS,IAAI,GAAG,KAAK,IAAI,EAAE;YACnC,OAAO,KAAK,CAAC;SAChB;QACD,OAAO,GAAG,CAAC,cAAc,CAAC,KAAK,WAAW,CAAC,YAAY,CAAC;IAC5D,CAAC;IA6CD,YAAY,IAAY,EAAE,WAAgD,EAAE,IAAmC;QAC3G,IAAI,cAAc,GAAkB,EAAE,CAAC;QACvC,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;QAClB,IAAI,IAAI,CAAC,EAAE,EAAE;YACT,MAAM,KAAK,GAAG,WAA2C,CAAC;YAC1D,cAAc,CAAC,gBAAgB,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC,CAAC,SAAS,CAAC;YAC5E,cAAc,CAAC,UAAU,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC;YAChE,cAAc,CAAC,aAAa,CA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AM,CAAC,GAAG,IAAI,EAAE,IAAI,CAAC;YACpC,cAAc,CAAC,gBAAgB,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC;YACrD,cAAc,CAAC,cAAc,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC;SACtD;QACD,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,IAAI,CAAC,CAAC;QACnE,MAAM,UAAU,GAAG,EAAE,uBAAuB,EAAE,CAAC,eAAe,CAAC,EAAE,CAAC;QAClE,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;QAC7C,KAAK,CAAC,WAAW,CAAC,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,CAAC;IAChE,CAAC;;AA9FL,kCA+FC;AAjFG,gBAAgB;AACO,wBAAY,GAAG,mCAAmC,CAAC"}
package/config/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- // *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
2
+ // *** WARNING: this file was generated by pulumi-language-nodejs. ***
3
3
  // *** Do not edit by hand unless you're certain you know what you are doing! ***
4
4
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
5
5
  if (k2 === undefined) k2 = k;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../config/index.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;;;;;;;;;;;;;;AAEjF,kBAAkB;AAClB,yCAAuB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../config/index.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;;;;;;;;;;;;;;;AAEjF,kBAAkB;AAClB,yCAAuB"}
package/config/vars.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- // *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
2
+ // *** WARNING: this file was generated by pulumi-language-nodejs. ***
3
3
  // *** Do not edit by hand unless you're certain you know what you are doing! ***
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
5
  const pulumi = require("@pulumi/pulumi");
@@ -1 +1 @@
1
- {"version":3,"file":"vars.js","sourceRoot":"","sources":["../../config/vars.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;AAEjF,yCAAyC;AAMzC,MAAM,QAAQ,GAAG,IAAI,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAM1C,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,OAAO,EAAE;IACpC,GAAG;QACC,OAAO,QAAQ,CAAC,SAAS,CAAuB,OAAO,CAAC,CAAC;IAC7D,CAAC;IACD,UAAU,EAAE,IAAI;CACnB,CAAC,CAAC"}
1
+ {"version":3,"file":"vars.js","sourceRoot":"","sources":["../../config/vars.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;AAEjF,yCAAyC;AAMzC,MAAM,QAAQ,GAAG,IAAI,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAM1C,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,OAAO,EAAE;IACpC,GAAG;QACC,OAAO,QAAQ,CAAC,SAAS,CAAuB,OAAO,CAAC,CAAC;IAC7D,CAAC;IACD,UAAU,EAAE,IAAI;CACnB,CAAC,CAAC"}
@@ -43,7 +43,7 @@ export interface GetCertificateResult {
43
43
  */
44
44
  readonly verifyChain?: boolean;
45
45
  }
46
- export declare function getCertificateOutput(args?: GetCertificateOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output<GetCertificateResult>;
46
+ export declare function getCertificateOutput(args?: GetCertificateOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetCertificateResult>;
47
47
  /**
48
48
  * A collection of arguments for invoking getCertificate.
49
49
  */
package/getCertificate.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- // *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
2
+ // *** WARNING: this file was generated by pulumi-language-nodejs. ***
3
3
  // *** Do not edit by hand unless you're certain you know what you are doing! ***
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
5
  exports.getCertificateOutput = exports.getCertificate = void 0;
@@ -16,7 +16,13 @@ function getCertificate(args, opts) {
16
16
  }
17
17
  exports.getCertificate = getCertificate;
18
18
  function getCertificateOutput(args, opts) {
19
- return pulumi.output(args).apply((a) => getCertificate(a, opts));
19
+ args = args || {};
20
+ opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
21
+ return pulumi.runtime.invokeOutput("tls:index/getCertificate:getCertificate", {
22
+ "content": args.content,
23
+ "url": args.url,
24
+ "verifyChain": args.verifyChain,
25
+ }, opts);
20
26
  }
21
27
  exports.getCertificateOutput = getCertificateOutput;
22
28
  //# sourceMappingURL=getCertificate.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getCertificate.js","sourceRoot":"","sources":["../getCertificate.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AAGzC,yCAAyC;AAEzC,SAAgB,cAAc,CAAC,IAAyB,EAAE,IAA2B;IACjF,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,yCAAyC,EAAE;QACpE,SAAS,EAAE,IAAI,CAAC,OAAO;QACvB,KAAK,EAAE,IAAI,CAAC,GAAG;QACf,aAAa,EAAE,IAAI,CAAC,WAAW;KAClC,EAAE,IAAI,CAAC,CAAC;AACb,CAAC;AATD,wCASC;AA6CD,SAAgB,oBAAoB,CAAC,IAA+B,EAAE,IAA2B;IAC7F,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,CAAM,EAAE,EAAE,CAAC,cAAc,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAA;AACzE,CAAC;AAFD,oDAEC"}
1
+ {"version":3,"file":"getCertificate.js","sourceRoot":"","sources":["../getCertificate.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;;AAEjF,yCAAyC;AAGzC,yCAAyC;AAEzC,SAAgB,cAAc,CAAC,IAAyB,EAAE,IAA2B;IACjF,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;IAClB,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,IAAI,IAAI,EAAE,CAAC,CAAC;IACzE,OAAO,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,yCAAyC,EAAE;QACpE,SAAS,EAAE,IAAI,CAAC,OAAO;QACvB,KAAK,EAAE,IAAI,CAAC,GAAG;QACf,aAAa,EAAE,IAAI,CAAC,WAAW;KAClC,EAAE,IAAI,CAAC,CAAC;AACb,CAAC;AARD,wCAQC;AA6CD,SAAgB,oBAAoB,CAAC,IAA+B,EAAE,IAAiC;IACnG,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;IAClB,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,IAAI,IAAI,EAAE,CAAC,CAAC;IACzE,OAAO,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,yCAAyC,EAAE;QAC1E,SAAS,EAAE,IAAI,CAAC,OAAO;QACvB,KAAK,EAAE,IAAI,CAAC,GAAG;QACf,aAAa,EAAE,IAAI,CAAC,WAAW;KAClC,EAAE,IAAI,CAAC,CAAC;AACb,CAAC;AARD,oDAQC"}
package/getPublicKey.d.ts CHANGED
@@ -8,16 +8,20 @@ import * as pulumi from "@pulumi/pulumi";
8
8
  *
9
9
  * ```typescript
10
10
  * import * as pulumi from "@pulumi/pulumi";
11
- * import * as fs from "fs";
11
+ * import * as std from "@pulumi/std";
12
12
  * import * as tls from "@pulumi/tls";
13
13
  *
14
14
  * const ed25519_example = new tls.PrivateKey("ed25519-example", {algorithm: "ED25519"});
15
- * const privateKeyPem-example = tls.getPublicKeyOutput({
15
+ * // Public key loaded from a terraform-generated private key, using the PEM (RFC 1421) format
16
+ * const privateKeyPem_example = tls.getPublicKeyOutput({
16
17
  * privateKeyPem: ed25519_example.privateKeyPem,
17
18
  * });
18
- * const privateKeyOpenssh-example = tls.getPublicKey({
19
- * privateKeyOpenssh: fs.readFileSync("~/.ssh/id_rsa_rfc4716"),
20
- * });
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
+ * }));
21
25
  * ```
22
26
  */
23
27
  export declare function getPublicKey(args?: GetPublicKeyArgs, opts?: pulumi.InvokeOptions): Promise<GetPublicKeyResult>;
@@ -62,7 +66,13 @@ export interface GetPublicKeyResult {
62
66
  * 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, as per the rules for `publicKeyOpenssh` and ECDSA P224 limitations.
63
67
  */
64
68
  readonly publicKeyFingerprintSha256: string;
69
+ /**
70
+ * 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()`.
71
+ */
65
72
  readonly publicKeyOpenssh: string;
73
+ /**
74
+ * 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()`.
75
+ */
66
76
  readonly publicKeyPem: string;
67
77
  }
68
78
  /**
@@ -74,19 +84,23 @@ export interface GetPublicKeyResult {
74
84
  *
75
85
  * ```typescript
76
86
  * import * as pulumi from "@pulumi/pulumi";
77
- * import * as fs from "fs";
87
+ * import * as std from "@pulumi/std";
78
88
  * import * as tls from "@pulumi/tls";
79
89
  *
80
90
  * const ed25519_example = new tls.PrivateKey("ed25519-example", {algorithm: "ED25519"});
81
- * const privateKeyPem-example = tls.getPublicKeyOutput({
91
+ * // Public key loaded from a terraform-generated private key, using the PEM (RFC 1421) format
92
+ * const privateKeyPem_example = tls.getPublicKeyOutput({
82
93
  * privateKeyPem: ed25519_example.privateKeyPem,
83
94
  * });
84
- * const privateKeyOpenssh-example = tls.getPublicKey({
85
- * privateKeyOpenssh: fs.readFileSync("~/.ssh/id_rsa_rfc4716"),
86
- * });
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
+ * }));
87
101
  * ```
88
102
  */
89
- export declare function getPublicKeyOutput(args?: GetPublicKeyOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output<GetPublicKeyResult>;
103
+ export declare function getPublicKeyOutput(args?: GetPublicKeyOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetPublicKeyResult>;
90
104
  /**
91
105
  * A collection of arguments for invoking getPublicKey.
92
106
  */
package/getPublicKey.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- // *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
2
+ // *** WARNING: this file was generated by pulumi-language-nodejs. ***
3
3
  // *** Do not edit by hand unless you're certain you know what you are doing! ***
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
5
  exports.getPublicKeyOutput = exports.getPublicKey = void 0;
@@ -14,16 +14,20 @@ const utilities = require("./utilities");
14
14
  *
15
15
  * ```typescript
16
16
  * import * as pulumi from "@pulumi/pulumi";
17
- * import * as fs from "fs";
17
+ * import * as std from "@pulumi/std";
18
18
  * import * as tls from "@pulumi/tls";
19
19
  *
20
20
  * const ed25519_example = new tls.PrivateKey("ed25519-example", {algorithm: "ED25519"});
21
- * const privateKeyPem-example = tls.getPublicKeyOutput({
21
+ * // Public key loaded from a terraform-generated private key, using the PEM (RFC 1421) format
22
+ * const privateKeyPem_example = tls.getPublicKeyOutput({
22
23
  * privateKeyPem: ed25519_example.privateKeyPem,
23
24
  * });
24
- * const privateKeyOpenssh-example = tls.getPublicKey({
25
- * privateKeyOpenssh: fs.readFileSync("~/.ssh/id_rsa_rfc4716"),
26
- * });
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
+ * }));
27
31
  * ```
28
32
  */
29
33
  function getPublicKey(args, opts) {
@@ -44,20 +48,29 @@ exports.getPublicKey = getPublicKey;
44
48
  *
45
49
  * ```typescript
46
50
  * import * as pulumi from "@pulumi/pulumi";
47
- * import * as fs from "fs";
51
+ * import * as std from "@pulumi/std";
48
52
  * import * as tls from "@pulumi/tls";
49
53
  *
50
54
  * const ed25519_example = new tls.PrivateKey("ed25519-example", {algorithm: "ED25519"});
51
- * const privateKeyPem-example = tls.getPublicKeyOutput({
55
+ * // Public key loaded from a terraform-generated private key, using the PEM (RFC 1421) format
56
+ * const privateKeyPem_example = tls.getPublicKeyOutput({
52
57
  * privateKeyPem: ed25519_example.privateKeyPem,
53
58
  * });
54
- * const privateKeyOpenssh-example = tls.getPublicKey({
55
- * privateKeyOpenssh: fs.readFileSync("~/.ssh/id_rsa_rfc4716"),
56
- * });
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
+ * }));
57
65
  * ```
58
66
  */
59
67
  function getPublicKeyOutput(args, opts) {
60
- return pulumi.output(args).apply((a) => getPublicKey(a, opts));
68
+ args = args || {};
69
+ opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
70
+ return pulumi.runtime.invokeOutput("tls:index/getPublicKey:getPublicKey", {
71
+ "privateKeyOpenssh": args.privateKeyOpenssh,
72
+ "privateKeyPem": args.privateKeyPem,
73
+ }, opts);
61
74
  }
62
75
  exports.getPublicKeyOutput = getPublicKeyOutput;
63
76
  //# sourceMappingURL=getPublicKey.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getPublicKey.js","sourceRoot":"","sources":["../getPublicKey.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AACzC,yCAAyC;AAEzC;;;;;;;;;;;;;;;;;;;;GAoBG;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;AA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C;AAPD,gDAOC"}
package/index.d.ts CHANGED
@@ -13,9 +13,7 @@ export declare const LocallySignedCert: typeof import("./locallySignedCert").Loc
13
13
  export { PrivateKeyArgs, PrivateKeyState } from "./privateKey";
14
14
  export type PrivateKey = import("./privateKey").PrivateKey;
15
15
  export declare const PrivateKey: typeof import("./privateKey").PrivateKey;
16
- export { ProviderArgs } from "./provider";
17
- export type Provider = import("./provider").Provider;
18
- export declare const Provider: typeof import("./provider").Provider;
16
+ export * from "./provider";
19
17
  export { SelfSignedCertArgs, SelfSignedCertState } from "./selfSignedCert";
20
18
  export type SelfSignedCert = import("./selfSignedCert").SelfSignedCert;
21
19
  export declare const SelfSignedCert: typeof import("./selfSignedCert").SelfSignedCert;
package/index.js CHANGED
@@ -1,8 +1,22 @@
1
1
  "use strict";
2
- // *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
2
+ // *** WARNING: this file was generated by pulumi-language-nodejs. ***
3
3
  // *** Do not edit by hand unless you're certain you know what you are doing! ***
4
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
5
+ if (k2 === undefined) k2 = k;
6
+ var desc = Object.getOwnPropertyDescriptor(m, k);
7
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
8
+ desc = { enumerable: true, get: function() { return m[k]; } };
9
+ }
10
+ Object.defineProperty(o, k2, desc);
11
+ }) : (function(o, m, k, k2) {
12
+ if (k2 === undefined) k2 = k;
13
+ o[k2] = m[k];
14
+ }));
15
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
17
+ };
4
18
  Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.types = exports.config = exports.SelfSignedCert = exports.Provider = exports.PrivateKey = exports.LocallySignedCert = exports.getPublicKeyOutput = exports.getPublicKey = exports.getCertificateOutput = exports.getCertificate = exports.CertRequest = void 0;
19
+ exports.types = exports.config = exports.SelfSignedCert = exports.PrivateKey = exports.LocallySignedCert = exports.getPublicKeyOutput = exports.getPublicKey = exports.getCertificateOutput = exports.getCertificate = exports.CertRequest = void 0;
6
20
  const pulumi = require("@pulumi/pulumi");
7
21
  const utilities = require("./utilities");
8
22
  exports.CertRequest = null;
@@ -17,8 +31,8 @@ exports.LocallySignedCert = null;
17
31
  utilities.lazyLoad(exports, ["LocallySignedCert"], () => require("./locallySignedCert"));
18
32
  exports.PrivateKey = null;
19
33
  utilities.lazyLoad(exports, ["PrivateKey"], () => require("./privateKey"));
20
- exports.Provider = null;
21
- utilities.lazyLoad(exports, ["Provider"], () => require("./provider"));
34
+ __exportStar(require("./provider"), exports);
35
+ const provider_1 = require("./provider");
22
36
  exports.SelfSignedCert = null;
23
37
  utilities.lazyLoad(exports, ["SelfSignedCert"], () => require("./selfSignedCert"));
24
38
  // Export sub-modules:
@@ -53,7 +67,7 @@ pulumi.runtime.registerResourcePackage("tls", {
53
67
  if (type !== "pulumi:providers:tls") {
54
68
  throw new Error(`unknown provider type ${type}`);
55
69
  }
56
- return new exports.Provider(name, undefined, { urn });
70
+ return new provider_1.Provider(name, undefined, { urn });
57
71
  },
58
72
  });
59
73
  //# sourceMappingURL=index.js.map
package/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AACzC,yCAAyC;AAK5B,QAAA,WAAW,GAA+C,IAAW,CAAC;AACnF,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC,aAAa,CAAC,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC;AAGhE,QAAA,cAAc,GAAqD,IAAW,CAAC;AAC/E,QAAA,oBAAoB,GAA2D,IAAW,CAAC;AACxG,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC,gBAAgB,EAAC,s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C,UAAU,EAAE;IAC/B,iBAAiB,EAAE,CAAC,IAAY,EAAE,IAAY,EAAE,GAAW,EAA2B,EAAE;QACpF,IAAI,IAAI,KAAK,sBAAsB,EAAE;YACjC,MAAM,IAAI,KAAK,CAAC,yBAAyB,IAAI,EAAE,CAAC,CAAC;SACpD;QACD,OAAO,IAAI,mBAAQ,CAAC,IAAI,EAAO,SAAS,EAAE,EAAE,GAAG,EAAE,CAAC,CAAC;IACvD,CAAC;CACJ,CAAC,CAAC"}
@@ -32,24 +32,13 @@ export declare class LocallySignedCert extends pulumi.CustomResource {
32
32
  */
33
33
  readonly caPrivateKeyPem: pulumi.Output<string>;
34
34
  /**
35
- * Certificate data in [PEM (RFC 1421)](https://datatracker.ietf.org/doc/html/rfc1421) format. **NOTE**: the
36
- * [underlying](https://pkg.go.dev/encoding/pem#Encode)
37
- * [libraries](https://pkg.go.dev/golang.org/x/crypto/ssh#MarshalAuthorizedKey) that generate this value append a `\n` at
38
- * the end of the PEM. In case this disrupts your use case, we recommend using
39
- * [`trimspace()`](https://www.terraform.io/language/functions/trimspace).
35
+ * 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()`.
40
36
  */
41
37
  readonly certPem: pulumi.Output<string>;
42
38
  /**
43
39
  * Certificate request data in [PEM (RFC 1421)](https://datatracker.ietf.org/doc/html/rfc1421) format.
44
40
  */
45
41
  readonly certRequestPem: pulumi.Output<string>;
46
- /**
47
- * The resource will consider the certificate to have expired the given number of hours before its actual expiry time. This
48
- * can be useful to deploy an updated certificate in advance of the expiration of the current certificate. However, the old
49
- * certificate remains valid until its true expiration time, since this resource does not (and cannot) support certificate
50
- * revocation. Also, this advance update can only be performed should the Terraform configuration be applied during the
51
- * early renewal period. (default: `0`)
52
- */
53
42
  readonly earlyRenewalHours: pulumi.Output<number>;
54
43
  /**
55
44
  * Is the generated certificate representing a Certificate Authority (CA) (default: `false`).
@@ -105,24 +94,13 @@ export interface LocallySignedCertState {
105
94
  */
106
95
  caPrivateKeyPem?: pulumi.Input<string>;
107
96
  /**
108
- * Certificate data in [PEM (RFC 1421)](https://datatracker.ietf.org/doc/html/rfc1421) format. **NOTE**: the
109
- * [underlying](https://pkg.go.dev/encoding/pem#Encode)
110
- * [libraries](https://pkg.go.dev/golang.org/x/crypto/ssh#MarshalAuthorizedKey) that generate this value append a `\n` at
111
- * the end of the PEM. In case this disrupts your use case, we recommend using
112
- * [`trimspace()`](https://www.terraform.io/language/functions/trimspace).
97
+ * 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()`.
113
98
  */
114
99
  certPem?: pulumi.Input<string>;
115
100
  /**
116
101
  * Certificate request data in [PEM (RFC 1421)](https://datatracker.ietf.org/doc/html/rfc1421) format.
117
102
  */
118
103
  certRequestPem?: pulumi.Input<string>;
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
104
  earlyRenewalHours?: pulumi.Input<number>;
127
105
  /**
128
106
  * Is the generated certificate representing a Certificate Authority (CA) (default: `false`).
@@ -169,13 +147,6 @@ export interface LocallySignedCertArgs {
169
147
  * Certificate request data in [PEM (RFC 1421)](https://datatracker.ietf.org/doc/html/rfc1421) format.
170
148
  */
171
149
  certRequestPem: pulumi.Input<string>;
172
- /**
173
- * The resource will consider the certificate to have expired the given number of hours before its actual expiry time. This
174
- * can be useful to deploy an updated certificate in advance of the expiration of the current certificate. However, the old
175
- * certificate remains valid until its true expiration time, since this resource does not (and cannot) support certificate
176
- * revocation. Also, this advance update can only be performed should the Terraform configuration be applied during the
177
- * early renewal period. (default: `0`)
178
- */
179
150
  earlyRenewalHours?: pulumi.Input<number>;
180
151
  /**
181
152
  * Is the generated certificate representing a Certificate Authority (CA) (default: `false`).
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- // *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
2
+ // *** WARNING: this file was generated by pulumi-language-nodejs. ***
3
3
  // *** Do not edit by hand unless you're certain you know what you are doing! ***
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
5
  exports.LocallySignedCert = void 0;
@@ -16,7 +16,7 @@ class LocallySignedCert extends pulumi.CustomResource {
16
16
  * @param opts Optional settings to control the behavior of the CustomResource.
17
17
  */
18
18
  static get(name, id, state, opts) {
19
- return new LocallySignedCert(name, state, Object.assign(Object.assign({}, opts), { id: id }));
19
+ return new LocallySignedCert(name, state, { ...opts, id: id });
20
20
  }
21
21
  /**
22
22
  * Returns true if the given object is an instance of LocallySignedCert. This is designed to work even
@@ -33,45 +33,45 @@ class LocallySignedCert extends pulumi.CustomResource {
33
33
  opts = opts || {};
34
34
  if (opts.id) {
35
35
  const state = argsOrState;
36
- resourceInputs["allowedUses"] = state ? state.allowedUses : undefined;
37
- resourceInputs["caCertPem"] = state ? state.caCertPem : undefined;
38
- resourceInputs["caKeyAlgorithm"] = state ? state.caKeyAlgorithm : undefined;
39
- resourceInputs["caPrivateKeyPem"] = state ? state.caPrivateKeyPem : undefined;
40
- resourceInputs["certPem"] = state ? state.certPem : undefined;
41
- resourceInputs["certRequestPem"] = state ? state.certRequestPem : undefined;
42
- resourceInputs["earlyRenewalHours"] = state ? state.earlyRenewalHours : undefined;
43
- resourceInputs["isCaCertificate"] = state ? state.isCaCertificate : undefined;
44
- resourceInputs["readyForRenewal"] = state ? state.readyForRenewal : undefined;
45
- resourceInputs["setSubjectKeyId"] = state ? state.setSubjectKeyId : undefined;
46
- resourceInputs["validityEndTime"] = state ? state.validityEndTime : undefined;
47
- resourceInputs["validityPeriodHours"] = state ? state.validityPeriodHours : undefined;
48
- resourceInputs["validityStartTime"] = state ? state.validityStartTime : undefined;
36
+ resourceInputs["allowedUses"] = state?.allowedUses;
37
+ resourceInputs["caCertPem"] = state?.caCertPem;
38
+ resourceInputs["caKeyAlgorithm"] = state?.caKeyAlgorithm;
39
+ resourceInputs["caPrivateKeyPem"] = state?.caPrivateKeyPem;
40
+ resourceInputs["certPem"] = state?.certPem;
41
+ resourceInputs["certRequestPem"] = state?.certRequestPem;
42
+ resourceInputs["earlyRenewalHours"] = state?.earlyRenewalHours;
43
+ resourceInputs["isCaCertificate"] = state?.isCaCertificate;
44
+ resourceInputs["readyForRenewal"] = state?.readyForRenewal;
45
+ resourceInputs["setSubjectKeyId"] = state?.setSubjectKeyId;
46
+ resourceInputs["validityEndTime"] = state?.validityEndTime;
47
+ resourceInputs["validityPeriodHours"] = state?.validityPeriodHours;
48
+ resourceInputs["validityStartTime"] = state?.validityStartTime;
49
49
  }
50
50
  else {
51
51
  const args = argsOrState;
52
- if ((!args || args.allowedUses === undefined) && !opts.urn) {
52
+ if (args?.allowedUses === undefined && !opts.urn) {
53
53
  throw new Error("Missing required property 'allowedUses'");
54
54
  }
55
- if ((!args || args.caCertPem === undefined) && !opts.urn) {
55
+ if (args?.caCertPem === undefined && !opts.urn) {
56
56
  throw new Error("Missing required property 'caCertPem'");
57
57
  }
58
- if ((!args || args.caPrivateKeyPem === undefined) && !opts.urn) {
58
+ if (args?.caPrivateKeyPem === undefined && !opts.urn) {
59
59
  throw new Error("Missing required property 'caPrivateKeyPem'");
60
60
  }
61
- if ((!args || args.certRequestPem === undefined) && !opts.urn) {
61
+ if (args?.certRequestPem === undefined && !opts.urn) {
62
62
  throw new Error("Missing required property 'certRequestPem'");
63
63
  }
64
- if ((!args || args.validityPeriodHours === undefined) && !opts.urn) {
64
+ if (args?.validityPeriodHours === undefined && !opts.urn) {
65
65
  throw new Error("Missing required property 'validityPeriodHours'");
66
66
  }
67
- resourceInputs["allowedUses"] = args ? args.allowedUses : undefined;
68
- resourceInputs["caCertPem"] = args ? args.caCertPem : undefined;
69
- resourceInputs["caPrivateKeyPem"] = (args === null || args === void 0 ? void 0 : args.caPrivateKeyPem) ? pulumi.secret(args.caPrivateKeyPem) : undefined;
70
- resourceInputs["certRequestPem"] = args ? args.certRequestPem : undefined;
71
- resourceInputs["earlyRenewalHours"] = args ? args.earlyRenewalHours : undefined;
72
- resourceInputs["isCaCertificate"] = args ? args.isCaCertificate : undefined;
73
- resourceInputs["setSubjectKeyId"] = args ? args.setSubjectKeyId : undefined;
74
- resourceInputs["validityPeriodHours"] = args ? args.validityPeriodHours : undefined;
67
+ resourceInputs["allowedUses"] = args?.allowedUses;
68
+ resourceInputs["caCertPem"] = args?.caCertPem;
69
+ resourceInputs["caPrivateKeyPem"] = args?.caPrivateKeyPem ? pulumi.secret(args.caPrivateKeyPem) : undefined;
70
+ resourceInputs["certRequestPem"] = args?.certRequestPem;
71
+ resourceInputs["earlyRenewalHours"] = args?.earlyRenewalHours;
72
+ resourceInputs["isCaCertificate"] = args?.isCaCertificate;
73
+ resourceInputs["setSubjectKeyId"] = args?.setSubjectKeyId;
74
+ resourceInputs["validityPeriodHours"] = args?.validityPeriodHours;
75
75
  resourceInputs["caKeyAlgorithm"] = undefined /*out*/;
76
76
  resourceInputs["certPem"] = undefined /*out*/;
77
77
  resourceInputs["readyForRenewal"] = undefined /*out*/;